CN109962953A - Client communication method for building up and device - Google Patents
Client communication method for building up and device Download PDFInfo
- Publication number
- CN109962953A CN109962953A CN201711419252.8A CN201711419252A CN109962953A CN 109962953 A CN109962953 A CN 109962953A CN 201711419252 A CN201711419252 A CN 201711419252A CN 109962953 A CN109962953 A CN 109962953A
- Authority
- CN
- China
- Prior art keywords
- client
- long connection
- communication
- target
- destination client
- 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
-
- 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
Abstract
The present invention is suitable for field of communication technology, a kind of client communication method for building up and device provided by the invention, this method comprises: receiving the communication request that cloud device is sent, the target identities mark of destination client is carried in communication request, communication request is sent to cloud device by least one source client;According to the client identity mark and the corresponding relationship of long connection prestored, the corresponding long connection of target identities mark is obtained;Judgement is whether the corresponding long connection of target identities mark can be used;If it is determined that the corresponding long connection of target identities mark is available, then corresponding long connection is identified by target identities and send communication request information to destination client, communication request information is used to indicate destination client and source client is established and communicated to connect.The embodiment of the present invention can realize multiple client to the communication control demand of specific client in the case where client terminal quantity is more.
Description
Technical field
The invention belongs to field of communication technology more particularly to a kind of client communication method for building up and device.
Background technique
With the fast development of cloud technology, more and more cloud devices are applied in network system, most commonly seen
Be with cloud device come come carry out big data storage or carry out big data operation, equipment controls other clients beyond the clouds
Application still be in blank stage.Communication connection between existing traditional client and client is relatively conventional, but this
Kind of mode is then needed when occurring that multiple client is needed to control some specific client by multiple client and specific
Client is all connected on server, realizes that multiple client controls some client by server.But due to existing
The attachable client terminal quantity of server is limited, causes to be unable to satisfy multiple client in the case where client terminal quantity is more
To the communication control demand of specific client.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of client communication method for building up and device, it can be in client
In a fairly large number of situation, realize multiple client to the communication control demand of specific client.
The embodiment of the present invention in a first aspect, providing a kind of client communication method for building up, comprising:
The communication request that cloud device is sent is received, the target identities mark of destination client is carried in the communication request
Know, the communication request is sent to the cloud device by least one source client;
According to the client identity mark and the corresponding relationship of long connection prestored, it is corresponding to obtain the target identities mark
Long connection;
Judge whether the corresponding long connection of the target identities mark can be used;
It can be used if it is determined that the target identities identify corresponding long connection, then pass through the target identities and identify corresponding length
Connection send communication request information to the destination client, the communication request information be used to indicate the destination client with
Source client establishes communication connection.
The second aspect of the embodiment of the present invention provides a kind of client communication and establishes device, comprising:
Communication request receiving module carries mesh in the communication request for receiving the communication request of cloud device transmission
The target identities mark of client is marked, the communication request is sent to the cloud device by least one source client;
Long connection obtains module, for obtaining institute according to the client identity mark and the corresponding relationship of long connection prestored
State the corresponding long connection of target identities mark;
Long connection judgment module, for judging whether the corresponding long connection of the target identities mark can be used;
Communication building block, for if it is determined that the corresponding long connection of target identities mark is available, then by the mesh
It marks the corresponding long connection of identity and sends communication request information to the destination client, the communication request information is for referring to
Show that the destination client and source client are established to communicate to connect.
The third aspect of the embodiment of the present invention, provides the terminal device that a kind of client communication is established, including memory,
Processor and storage in the memory and the computer program that can run on the processor, the processor execution
The step of above-mentioned client communication method for building up is realized when the computer program.
The fourth aspect of the embodiment of the present invention, provides a kind of computer readable storage medium, described computer-readable to deposit
Storage media is stored with computer program, and the computer program realizes above-mentioned client communication foundation side when being executed by processor
The step of method.
The beneficial effect of the embodiment of the present invention compared with prior art is: client communication provided in an embodiment of the present invention is built
Cube method and device carry the target body of destination client by receiving the communication request of cloud device transmission in communication request
Part mark, communication request are sent to cloud device by least one source client;According to the client identity mark and length prestored
The corresponding relationship of connection obtains the corresponding long connection of target identities mark;Judgement is that the corresponding long connection of target identities mark is
It is no available;If it is determined that the corresponding long connection of target identities mark is available, then corresponding long connection is identified by target identities and sent
Communication request information is to destination client, and communication request information is used to indicate destination client and source client establishes communication link
It connects.Communication request of the embodiment of the present invention due to receiving at least one source client using cloud device, then according to the mesh
Mark the corresponding long connection of identity and established with destination client and communicated to connect, can in the case where client terminal quantity is more,
Realize multiple client to the communication control demand of specific client.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art
Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some
Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these
Attached drawing obtains other attached drawings.
Fig. 1 is a kind of flow diagram for client communication method for building up that one embodiment of the invention provides;
Fig. 2 be another embodiment of the present invention provides a kind of client communication method for building up flow diagram;
Fig. 3 is a kind of flow diagram for client communication method for building up that further embodiment of this invention provides;
Fig. 4 is a kind of flow diagram for client communication method for building up that yet another embodiment of the invention provides;
Fig. 5 is the structural block diagram that a kind of client communication that one embodiment of the invention provides establishes device;
Fig. 6 is the schematic block diagram for the terminal device that a kind of client communication that one embodiment of the invention provides is established.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed
Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific
The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity
The detailed description of road and method, in case unnecessary details interferes description of the invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instruction
Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded
Body, step, operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment
And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on
Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is
Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt
Be construed to " when ... " or " once " or " in response to determination " or " in response to detecting ".Similarly, phrase " if it is determined that " or
" if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true
It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
With reference to Fig. 1, Fig. 1 is a kind of flow diagram for client communication method for building up that one embodiment of the invention provides.
The method can be applied on server or other terminal devices, and details are as follows for the method:
S101: the communication request that cloud device is sent is received, the target identities mark of destination client is carried in communication request
Know, communication request is sent to cloud device by least one source client.
In the present embodiment, source client can be terminal device, be also possible to cloud device.Destination client can also be with
It is terminal device, is also possible to cloud device.The target identities mark of destination client can be but not limited to destination client
Device identification, factory number etc..Wherein it can be cloud server with end equipment.
S102: it according to the client identity mark and the corresponding relationship of long connection prestored, obtains target identities mark and corresponds to
Long connection.
In the present embodiment, long connection, which refers to, passes through transmission control protocol between client and server
(Transmission Control Protocol, TCP) or Hyper text transfer control protocol (Hyper Text Transfer
Protocol, HTTP) agreement establish socket network connection.According to the difference of client, client is established with server
The type of long connection is also different.
S103: judge whether the corresponding long connection of target identities mark can be used.
In the present embodiment, target identities, which identify corresponding long connection, to lead to long company due to the variation of communication interface
It connects unavailable, it is therefore desirable to be judged in advance.
S104: if it is determined that the corresponding long connection of target identities mark is available, then corresponding length is identified even by target identities
Communication request information is received and sent to destination client, communication request information is used to indicate destination client and source client is established and led to
Letter connection.
In the present embodiment, the communication connection that communication request information is used to establish destination client and source client is established.
The communication request that cloud device is sent is received from the present embodiment it is found that passing through, carries target customer in communication request
The target identities at end identify, and communication request is sent to cloud device by least one source client;According to the client body prestored
The corresponding relationship of part mark and long connection, the corresponding long connection of acquisition target identities mark;Judgement is that target identities mark corresponds to
Long connection whether can be used;If it is determined that the corresponding long connection of target identities mark is available, then identified by target identities corresponding
Long connection sends communication request information to destination client, and communication request information is used to indicate destination client and builds with source client
Vertical communication connection.The embodiment of the present invention receives the communication request of at least one source client due to use cloud device, then root
It establishes and communicates to connect with destination client according to the corresponding long connection of target identities mark, it can be more in client terminal quantity
In the case of, realize multiple client to the communication control demand of specific client.
With reference to Fig. 2, Fig. 2 be another embodiment of the present invention provides a kind of client communication method for building up process signal
Figure.On the basis of the above embodiments, specifically details are as follows by above-mentioned steps S103:
S201: the communication interface that corresponding long connection obtains destination client is identified according to target identities.
In the present embodiment, long connection can prestore in the server, according in the long connection prestored identity with
The corresponding relationship of the communication interface of client obtains target identities and identifies corresponding communication interface.
S202: judge whether communication interface can be used.
In the present embodiment, if communication interface is connect with destination client, it is determined that communication interface is available;If if communication connects
Mouth connect with other clients or without connection client, it is determined that communication interface is unavailable.
S203: if it is determined that communication interface is unavailable, then the not available prompt information of communication interface is sent to cloud device, is mentioned
Show that information is used to indicate cloud device and sends prompt information to source client.
In the present embodiment, prompt information can be short message form, be also possible to speech form.
From the present embodiment it is found that further whether can judge destination client by judging whether communication interface can be used
It is connect with server, improves destination client and source client establishes the reliability of communication connection.
With reference to Fig. 3, Fig. 3 is a kind of process signal for client communication method for building up that further embodiment of this invention provides
Figure.On the basis of the above embodiments, it identifies corresponding long connection by the target identities in above-mentioned steps S104 and sends and lead to
Believe the process of solicited message to the destination client, specific details are as follows:
S301: detection target identities identify the type of corresponding long connection.
In the present embodiment, the type of long connection is related with the type of destination client, if destination client sets for cloud
Standby, then target identities identify the type websocket long connection of corresponding long connection;If if destination client is terminal device,
Then target identities identify the type socket long connection of corresponding long connection.
S302: if it is websocket long connection that target identities, which identify corresponding long connection type, the client prestored is inquired
The long connection corresponding relationship at end and websocket communication interface obtains the corresponding target websocket communication in destination client and connects
Mouthful.
In the present embodiment, the corresponding websocket communication interface of websocket long connection, socket long connection correspond to
Socket communication interface.
S303: communication request information is sent to destination client by target websocket communication interface.
S304: if it is socket long connection that target identities, which identify corresponding long connection type, the client prestored is inquired
With the long connection corresponding relationship of socket communication interface, the corresponding target socket communication interface in destination client is obtained.
S305: communication request information is sent to destination client by target socket communication interface.
From the present embodiment it is found that identifying the type of corresponding long connection by target identities, the destination client is determined
Corresponding destinations traffic interface (websocket communication interface or socket communication interface), can be realized for different targets
Client establishes communication connection by different communication interface, with guarantee the high efficiency that information is sent after communication connection is established and
Stability.
With reference to Fig. 4, Fig. 4 is a kind of process signal for client communication method for building up that yet another embodiment of the invention provides
Figure.On the basis of the above embodiments, the present embodiment is described in detail to establish destination client and communicate with target websocket and be connect
The mistake of the long corresponding relationship connected of the corresponding relationship of the long connection of mouth and destination client and target socket communication interface
Journey, comprising:
S401: it receives the long connection that destination client is sent and establishes request, long connection establishes request and carries destination client
Identity.
S402: judge whether destination client is cloud device according to the identity of destination client.
S403: it if it is determined that destination client is cloud device, then saves destination client and is communicated with target websocket and connect
The corresponding relationship of the long connection of mouth.
S404: it if it is determined that destination client is non-cloud device, then saves destination client and is communicated with target socket and connect
The corresponding relationship of the long connection of mouth.
In the present embodiment, non-cloud device is terminal device.
In the present embodiment, request is established by receiving the long connection that destination client is sent, and according to destination client
Identity judge whether destination client is cloud device, determine destination client be cloud device, then save target visitor
The corresponding relationship of the long connection of family end and target websocket communication interface, can be realized and build for different destination clients
The corresponding relationship for standing the long connection of different destination client and destinations traffic interface, is used for subsequent progress destination client and source
Client establishes communication connection.
In one embodiment of the invention, described if it is determined that the communication interface is unavailable after, further includes:
The broadcasting packet for reconnecting request is sent to all clients;
If receiving the response message for the reconnect that the destination client is sent, the response message will be received
Communication interface be determined as the new available communication interfaces of the destination client.
From the present embodiment it is found that by sending broadcasting packet, to realize the reconnect of destination client.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process
Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit
It is fixed.
Corresponding to the client communication method for building up of foregoing embodiments, Fig. 5 is a kind of visitor that one embodiment of the invention provides
The structural block diagram of family end connection setup device, for ease of description, only parts related to embodiments of the present invention are shown.Reference
Fig. 5, the device include: communication request receiving module 501, long connection acquisition module 502, long connection judgment module 503 and communication
Establish module 504.
Communication request receiving module 501 carries in the communication request for receiving the communication request of cloud device transmission
The target identities of destination client identify, and the communication request is sent to the cloud device by least one source client;
Long connection obtains module 502, for obtaining according to the client identity mark and the corresponding relationship of long connection prestored
The target identities identify corresponding long connection;
Long connection judgment module 503, for judging whether the corresponding long connection of the target identities mark can be used;
Communication building block 504 is used for if it is determined that the corresponding long connection of target identities mark is available, then by described
The corresponding long connection of target identities mark sends communication request information to the destination client, and the communication request information is used for
It indicates that the destination client and source client are established to communicate to connect.
The communication request that cloud device is sent is received from above-described embodiment it is found that passing through, target visitor is carried in communication request
The target identities at family end identify, and communication request is sent to cloud device by least one source client;According to the client prestored
The corresponding relationship of identity and long connection obtains the corresponding long connection of target identities mark;Judgement is target identities mark pair
Whether the long connection answered can be used;If it is determined that the corresponding long connection of target identities mark is available, is then identified and corresponded to by target identities
Long connection send communication request information to destination client, communication request information is used to indicate destination client and source client
Establish communication connection.Communication request of the embodiment of the present invention due to receiving at least one source client using cloud device, then
It is established and is communicated to connect with destination client according to the corresponding long connection of target identities mark, it can be more in client terminal quantity
In the case where, realize multiple client to the communication control demand of specific client.
With reference to Fig. 5, in one embodiment of the invention, on the basis of the above embodiments, the long connection judgment mould
Block 503, comprising:
First acquisition unit 5031, for obtaining the target customer according to the corresponding long connection of target identities mark
The communication interface at end;
Judging unit 5032, for judging whether the communication interface can be used;
First transmission unit 5033, for if it is determined that the communication interface is unavailable, then sending the communication interface can not
For prompt information to the cloud device, it is objective to source that the prompt information is used to indicate the cloud device transmission prompt information
Family end.
With reference to Fig. 5, in one embodiment of the invention, on the basis of the above embodiments, the communication building block
504, comprising:
Detection unit 5041 identifies the type of corresponding long connection for detecting the target identities;
Second acquisition unit 5042, if identifying corresponding long connection type for the target identities is websocket long
Connection then inquires the long connection corresponding relationship of the client and websocket communication interface prestored, obtains the target visitor
The corresponding target websocket communication interface in family end;
Second transmission unit 5043, for sending communication request information extremely by the target websocket communication interface
The destination client;
Third acquiring unit 5044, if identifying corresponding long connection type for the target identities as socket long company
It connects, then inquires the long connection corresponding relationship of the client and socket communication interface prestored, obtain the destination client
Corresponding target socket communication interface;
Third transmission unit 5045, for by target socket communication interface transmission communication request information to described
Destination client.
With reference to Fig. 5, in one embodiment of the invention, on the basis of the above embodiments, described device further include:
Request receiving module 505 is established in long connection, establishes request for receiving the long connection that the destination client is sent,
The identity that request carries the destination client is established in the long connection;
Destination client judgment module 506, for judging the target visitor according to the identity of the destination client
Whether family end is cloud device;
First corresponding relationship preserving module 507, be used for if it is determined that the destination client be non-cloud device, then save institute
State the corresponding relationship of the long connection of destination client and target websocket communication interface;
Second corresponding relationship preserving module 508 is used for if it is determined that the destination client is terminal device, then described in preservation
The corresponding relationship of the long connection of destination client and target socket communication interface.
With reference to Fig. 5, in one embodiment of the invention, on the basis of the above embodiments, described device further include:
Broadcasting packet sending module 509 reconnects the broadcasting packet requested to all clients for sending;
Communication interface determining module 510, if the response report for receiving the reconnect that the destination client is sent
The communication interface for receiving the response message is then determined as the new available communication interfaces of the destination client by text.
Referring to Fig. 6, Fig. 6 is the schematic block for the terminal device that a kind of client communication that one embodiment of the invention provides is established
Figure.Terminal 600 in the present embodiment as shown in FIG. 6 may include: one or more processors 601, one or more inputs
Equipment 602, one or more then output equipments 603 and one or more memories 604.Above-mentioned processor 601, input equipment
602, then output equipment 603 and memory 604 by communication bus 605 complete mutual communication.Memory 604 is for storing
Computer program, the computer program include program instruction.The program that processor 601 is used to execute the storage of memory 604 refers to
It enables.Wherein, processor 601 is configured for that described program instruction execution or less is called to operate:
Processor 601 carries destination client in the communication request for receiving the communication request of cloud device transmission
Target identities mark, the communication request is sent to the cloud device by least one source client;According to the visitor prestored
The corresponding relationship of the identity of family end and long connection obtains the corresponding long connection of the target identities mark;Judge the target
Whether the corresponding long connection of identity can be used;It can be used if it is determined that the target identities identify corresponding long connection, then pass through institute
It states the corresponding long connection of target identities mark and sends communication request information to the destination client, the communication request information is used
It is communicated to connect in indicating that the destination client and source client are established.
Further, processor 601 are also used to identify corresponding long connection according to the target identities and obtain the target
The communication interface of client;Judge whether the communication interface can be used;If it is determined that the communication interface is unavailable, then described in transmission
To the cloud device, the prompt information is used to indicate the cloud device transmission and mentions the not available prompt information of communication interface
Show information to source client.
Further, processor 601 are also used to detect the type that the target identities identify corresponding long connection;If institute
Stating target identities and identifying corresponding long connection type be websocket long connection, then inquire the client prestored and
The long connection corresponding relationship of websocket communication interface obtains the corresponding target websocket communication in the destination client and connects
Mouthful;Communication request information is sent to the destination client by the target websocket communication interface;If the target body
It is socket long connection that part, which identifies corresponding long connection type, then inquires the client and socket communication interface prestored
Long connection corresponding relationship, obtains the corresponding target socket communication interface in the destination client;Pass through the target socket
Communication interface sends communication request information to the destination client.
Further, processor 601 are also used to receive the long connection that the destination client is sent and establish request, described
The identity that request carries the destination client is established in long connection;Institute is judged according to the identity of the destination client
State whether destination client is cloud device;If it is determined that the destination client is cloud device, then the target customer is saved
The corresponding relationship at end and the long connection of target websocket communication interface;If it is determined that the destination client is non-cloud device,
Then save the corresponding relationship of the long connection of the destination client and target socket communication interface.
Further, processor 601 are also used to send the broadcasting packet for reconnecting request to all clients;If connecing
Receive the response message for the reconnect that the destination client is sent, then it is the communication interface for receiving the response message is true
It is set to the new available communication interfaces of the destination client.
It should be appreciated that in embodiments of the present invention, alleged processor 601 can be central processing unit (Central
Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital
Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit,
ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic
Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at
Reason device is also possible to any conventional processor etc..
Input equipment 602 may include that Trackpad, fingerprint adopt sensor (for acquiring the finger print information and fingerprint of user
Directional information), microphone etc., output equipment 603 may include display (LCD etc.), loudspeaker etc..
The memory 604 may include read-only memory and random access memory, and to processor 601 provide instruction and
Data.The a part of of memory 604 can also include nonvolatile RAM.For example, memory 604 can also be deposited
Store up the information of device type.
In the specific implementation, processor 601 described in the embodiment of the present invention, input equipment 602, output equipment 603 can
Implementation described in the first embodiment and second embodiment of service request method provided in an embodiment of the present invention is executed,
Also the implementation of terminal described in the embodiment of the present invention can be performed, details are not described herein.
A kind of computer readable storage medium, the computer-readable storage medium are provided in another embodiment of the invention
Matter is stored with computer program, and the computer program includes program instruction, realization when described program instruction is executed by processor
All or part of the process in above-described embodiment method can also instruct relevant hardware to complete by computer program,
The computer program can be stored in a computer readable storage medium, the computer program when being executed by processor,
The step of above-mentioned each embodiment of the method can be achieved.Wherein, the computer program includes computer program code, the meter
Calculation machine program code can be source code form, object identification code form, executable file or certain intermediate forms etc..The calculating
Machine readable medium may include: any entity or device, recording medium, USB flash disk, the shifting that can carry the computer program code
Dynamic hard disk, magnetic disk, CD, computer storage, read-only memory (Read-Only Memory, ROM), random access memory
(Random Access Memory, RAM), electric carrier signal, telecommunication signal and software distribution medium etc..It needs to illustrate
It is that the content that the computer-readable medium includes can be fitted according to the requirement made laws in jurisdiction with patent practice
When increase and decrease, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier wave
Signal and telecommunication signal.
The computer readable storage medium can be the internal storage unit of terminal described in aforementioned any embodiment, example
Such as the hard disk or memory of terminal.The computer readable storage medium is also possible to the External memory equipment of the terminal, such as
The plug-in type hard disk being equipped in the terminal, intelligent memory card (SMC, Smart Media Card), secure digital (Secure
Digital, SD) card, flash card (Flash Card) etc..Further, the computer readable storage medium can also be wrapped both
The internal storage unit for including the terminal also includes External memory equipment.The computer readable storage medium is described for storing
Other programs and data needed for computer program and the terminal.The computer readable storage medium can be also used for temporarily
Ground stores the data that has exported or will export.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware
With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This
A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially
Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not
It is considered as beyond the scope of this invention.
It is apparent to those skilled in the art that for convenience of description and succinctly, the end of foregoing description
The specific work process at end and unit, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
In several embodiments provided herein, it should be understood that disclosed terminal and method can pass through it
Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only
Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be tied
Another system is closed or is desirably integrated into, or some features can be ignored or not executed.In addition, shown or discussed phase
Mutually between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication of device or unit
Connection is also possible to electricity, mechanical or other form connections.
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.Some or all of unit therein can be selected to realize the embodiment of the present invention according to the actual needs
Purpose.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, is also possible to two or more units and is integrated in one unit.It is above-mentioned integrated
Unit both can take the form of hardware realization, can also realize in the form of software functional units.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace
It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right
It is required that protection scope subject to.
Claims (10)
1. a kind of client communication method for building up characterized by comprising
The communication request that cloud device is sent is received, the target identities mark of destination client, institute are carried in the communication request
It states communication request and the cloud device is sent to by least one source client;
The corresponding relationship with long connection is identified according to the client identity prestored, obtains the corresponding length of the target identities mark even
It connects;
Judge whether the corresponding long connection of the target identities mark can be used;
It can be used if it is determined that the target identities identify corresponding long connection, then pass through the corresponding length of target identities mark and connect
Communication request information is sent to the destination client, the communication request information is used to indicate the destination client and source visitor
Communication connection is established at family end.
2. client communication method for building up according to claim 1, which is characterized in that the judgement is the target identities mark
Know whether corresponding long connection can be used, comprising:
The communication interface that corresponding long connection obtains the destination client is identified according to the target identities;
Judge whether the communication interface can be used;
If it is determined that the communication interface is unavailable, then sends the not available prompt information of the communication interface and set to the cloud
Standby, the prompt information is used to indicate the cloud device and sends prompt information to source client.
3. the communication establishing method between client according to claim 1, which is characterized in that described to pass through the target identities
It identifies corresponding long connection and sends communication request information to the destination client, comprising:
Detect the type that the target identities identify corresponding long connection;
If it is websocket long connection that the target identities, which identify corresponding long connection type, the client prestored is inquired
The long connection corresponding relationship at end and websocket communication interface, it is logical to obtain the corresponding target websocket in the destination client
Believe interface;
Communication request information is sent to the destination client by the target websocket communication interface;
If it be socket long connection that the target identities, which identify corresponding long connection type, inquire the client prestored and
The long connection corresponding relationship of socket communication interface, obtains the corresponding target socket communication interface in the destination client;
Communication request information is sent to the destination client by the target socket communication interface.
4. client communication method for building up according to claim 3, which is characterized in that further include:
It receives the long connection that the destination client is sent and establishes request, the long connection establishes request and carries the target customer
The identity at end;
Judge whether the destination client is cloud device according to the identity of the destination client;
If it is determined that the destination client is cloud device, then saves the destination client and communicated with target websocket and connect
The corresponding relationship of the long connection of mouth;
If it is determined that the destination client is non-cloud device, then the destination client and target socket communication interface are saved
Long connection corresponding relationship.
5. client communication method for building up according to claim 2, which is characterized in that described if it is determined that the communication interface
After unavailable, further includes:
The broadcasting packet for reconnecting request is sent to all clients;
If receiving the response message for the reconnect that the destination client is sent, the logical of the response message will be received
Letter interface is determined as the new available communication interfaces of the destination client.
6. a kind of client communication establishes device characterized by comprising
Communication request receiving module carries target visitor for receiving the communication request of cloud device transmission in the communication request
The target identities at family end identify, and the communication request is sent to the cloud device by least one source client;
Long connection obtains module, for obtaining the mesh according to the client identity mark and the corresponding relationship of long connection prestored
Mark the corresponding long connection of identity;
Long connection judgment module, for judging whether the corresponding long connection of the target identities mark can be used;
Communication building block is used to then pass through the target body if it is determined that the corresponding long connection of target identities mark is available
The corresponding long connection of part mark sends communication request information to the destination client, and the communication request information is used to indicate institute
It states destination client and source client is established and communicated to connect.
7. client communication according to claim 6 establishes device, which is characterized in that the long connection judgment module, packet
It includes:
First acquisition unit, for identifying the communication that corresponding long connection obtains the destination client according to the target identities
Interface;
Judging unit, for judging whether the communication interface can be used;
First transmission unit is used to then send the not available prompt of the communication interface if it is determined that the communication interface is unavailable
To the cloud device, the prompt information is used to indicate the cloud device and sends prompt information to source client information.
8. client communication according to claim 6 establishes device, which is characterized in that the communication building block, comprising:
Detection unit identifies the type of corresponding long connection for detecting the target identities;
Second acquisition unit is looked into if identifying corresponding long connection type for the target identities is websocket long connection
The long connection corresponding relationship for asking the client and websocket communication interface prestored, it is corresponding to obtain the destination client
Target websocket communication interface;
Second transmission unit, for sending communication request information to the target by the target websocket communication interface
Client;
Third acquiring unit is inquired if identifying corresponding long connection type for the target identities is socket long connection
The long connection corresponding relationship of the client and socket communication interface that prestore, obtains the corresponding target in the destination client
Socket communication interface;
Third transmission unit, for sending communication request information to the target customer by the target socket communication interface
End.
9. the terminal device that a kind of client communication is established, including memory, processor and storage are in the memory simultaneously
The computer program that can be run on the processor, which is characterized in that the processor executes real when the computer program
Now such as the step of client communication method for building up described in any one of claim 1 to 5.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists
In realization such as client communication foundation side described in any one of claim 1 to 5 when the computer program is executed by processor
The step of method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711419252.8A CN109962953A (en) | 2017-12-25 | 2017-12-25 | Client communication method for building up and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711419252.8A CN109962953A (en) | 2017-12-25 | 2017-12-25 | Client communication method for building up and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109962953A true CN109962953A (en) | 2019-07-02 |
Family
ID=67020740
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711419252.8A Pending CN109962953A (en) | 2017-12-25 | 2017-12-25 | Client communication method for building up and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109962953A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111148276A (en) * | 2020-01-13 | 2020-05-12 | 武汉慧联无限科技有限公司 | Communication method, device, base station and storage medium based on LoRa technology |
CN111629059A (en) * | 2020-05-27 | 2020-09-04 | 浪潮电子信息产业股份有限公司 | Cluster communication method, system, equipment and computer readable storage medium |
CN111970340A (en) * | 2020-07-30 | 2020-11-20 | 北京大米科技有限公司 | Information transmission method, readable storage medium and electronic device |
CN112395112A (en) * | 2020-11-30 | 2021-02-23 | 深圳市和讯华谷信息技术有限公司 | Application message processing method and device, computer equipment and storage medium |
CN113301299A (en) * | 2021-05-06 | 2021-08-24 | 厦门市思芯微科技有限公司 | Multi-channel video transmission method, system, terminal and storage medium |
CN113840006A (en) * | 2021-09-27 | 2021-12-24 | 平安国际智慧城市科技股份有限公司 | Management method and device of inquiry interface, electronic equipment and storage medium |
CN114040005A (en) * | 2021-10-18 | 2022-02-11 | 中国联合网络通信集团有限公司 | Data transmission method, device and storage medium |
CN114598739A (en) * | 2022-02-28 | 2022-06-07 | 阿里巴巴(中国)有限公司 | Processing method, device and system of communication channel based on cloud application |
Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101617304A (en) * | 2007-01-29 | 2009-12-30 | 索尼株式会社 | Support the shared home media platform of multi-user's control |
CN103019197A (en) * | 2012-12-03 | 2013-04-03 | 海信集团有限公司 | Method and system for conducting long-range control on intelligent terminal device |
CN103841124A (en) * | 2012-11-20 | 2014-06-04 | 华为终端有限公司 | Method, apparatus, and system for establishing communication connection among users |
CN103856627A (en) * | 2012-11-29 | 2014-06-11 | Lg电子株式会社 | Home appliance, mobile terminal, and operation method thereof |
CN104683470A (en) * | 2015-03-11 | 2015-06-03 | 北京京东尚科信息技术有限公司 | Intelligent household equipment control method and system |
CN105187479A (en) * | 2015-06-25 | 2015-12-23 | 上海卓悠网络科技有限公司 | Method and system for controlling multiple intelligent devices, and controller |
CN105340308A (en) * | 2013-06-24 | 2016-02-17 | 瑞典爱立信有限公司 | Gateway, client device and methods for facilitating communication between a client device and an application server |
CN105577818A (en) * | 2016-01-22 | 2016-05-11 | 腾讯科技(深圳)有限公司 | Data transmission methods and apparatuses, and vehicle-mounted terminal |
CN105956111A (en) * | 2016-05-03 | 2016-09-21 | 中山市奥创通风设备有限公司 | Cloud service intelligent control system for air purifier |
CN105974901A (en) * | 2016-06-24 | 2016-09-28 | 赛酷特(北京)信息技术有限公司 | Remote control system and method |
CN106254464A (en) * | 2016-08-07 | 2016-12-21 | 深圳市小马立行科技有限公司 | A kind of vehicle intelligent terminal and network communication method thereof |
CN106341489A (en) * | 2016-10-09 | 2017-01-18 | 珠海我爱拍科技有限公司 | Control system for remote interaction with intelligent Internet of things equipment through webpage |
CN106357454A (en) * | 2016-10-08 | 2017-01-25 | 武汉斗鱼网络科技有限公司 | Log system control device and method |
CN107172211A (en) * | 2017-07-07 | 2017-09-15 | 北京奇艺世纪科技有限公司 | Communication connection request method for building up and server |
CN107222545A (en) * | 2017-06-20 | 2017-09-29 | 北京全域医疗技术有限公司 | A kind of data transmission method and device |
CN107493349A (en) * | 2017-09-27 | 2017-12-19 | 四川长虹电器股份有限公司 | Household intelligent gateway control system and method based on WebSocket |
-
2017
- 2017-12-25 CN CN201711419252.8A patent/CN109962953A/en active Pending
Patent Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101617304A (en) * | 2007-01-29 | 2009-12-30 | 索尼株式会社 | Support the shared home media platform of multi-user's control |
CN103841124A (en) * | 2012-11-20 | 2014-06-04 | 华为终端有限公司 | Method, apparatus, and system for establishing communication connection among users |
CN103856627A (en) * | 2012-11-29 | 2014-06-11 | Lg电子株式会社 | Home appliance, mobile terminal, and operation method thereof |
CN103019197A (en) * | 2012-12-03 | 2013-04-03 | 海信集团有限公司 | Method and system for conducting long-range control on intelligent terminal device |
CN105340308A (en) * | 2013-06-24 | 2016-02-17 | 瑞典爱立信有限公司 | Gateway, client device and methods for facilitating communication between a client device and an application server |
CN104683470A (en) * | 2015-03-11 | 2015-06-03 | 北京京东尚科信息技术有限公司 | Intelligent household equipment control method and system |
CN105187479A (en) * | 2015-06-25 | 2015-12-23 | 上海卓悠网络科技有限公司 | Method and system for controlling multiple intelligent devices, and controller |
CN105577818A (en) * | 2016-01-22 | 2016-05-11 | 腾讯科技(深圳)有限公司 | Data transmission methods and apparatuses, and vehicle-mounted terminal |
CN105956111A (en) * | 2016-05-03 | 2016-09-21 | 中山市奥创通风设备有限公司 | Cloud service intelligent control system for air purifier |
CN105974901A (en) * | 2016-06-24 | 2016-09-28 | 赛酷特(北京)信息技术有限公司 | Remote control system and method |
CN106254464A (en) * | 2016-08-07 | 2016-12-21 | 深圳市小马立行科技有限公司 | A kind of vehicle intelligent terminal and network communication method thereof |
CN106357454A (en) * | 2016-10-08 | 2017-01-25 | 武汉斗鱼网络科技有限公司 | Log system control device and method |
CN106341489A (en) * | 2016-10-09 | 2017-01-18 | 珠海我爱拍科技有限公司 | Control system for remote interaction with intelligent Internet of things equipment through webpage |
CN107222545A (en) * | 2017-06-20 | 2017-09-29 | 北京全域医疗技术有限公司 | A kind of data transmission method and device |
CN107172211A (en) * | 2017-07-07 | 2017-09-15 | 北京奇艺世纪科技有限公司 | Communication connection request method for building up and server |
CN107493349A (en) * | 2017-09-27 | 2017-12-19 | 四川长虹电器股份有限公司 | Household intelligent gateway control system and method based on WebSocket |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111148276A (en) * | 2020-01-13 | 2020-05-12 | 武汉慧联无限科技有限公司 | Communication method, device, base station and storage medium based on LoRa technology |
CN111148276B (en) * | 2020-01-13 | 2023-05-05 | 武汉慧联无限科技有限公司 | Communication method, device, base station and storage medium based on LoRa technology |
CN111629059A (en) * | 2020-05-27 | 2020-09-04 | 浪潮电子信息产业股份有限公司 | Cluster communication method, system, equipment and computer readable storage medium |
CN111629059B (en) * | 2020-05-27 | 2022-12-16 | 浪潮电子信息产业股份有限公司 | Cluster communication method, system, equipment and computer readable storage medium |
CN111970340A (en) * | 2020-07-30 | 2020-11-20 | 北京大米科技有限公司 | Information transmission method, readable storage medium and electronic device |
CN111970340B (en) * | 2020-07-30 | 2023-06-16 | 北京大米科技有限公司 | Information transmission method, readable storage medium, and electronic device |
CN112395112A (en) * | 2020-11-30 | 2021-02-23 | 深圳市和讯华谷信息技术有限公司 | Application message processing method and device, computer equipment and storage medium |
CN113301299A (en) * | 2021-05-06 | 2021-08-24 | 厦门市思芯微科技有限公司 | Multi-channel video transmission method, system, terminal and storage medium |
CN113840006A (en) * | 2021-09-27 | 2021-12-24 | 平安国际智慧城市科技股份有限公司 | Management method and device of inquiry interface, electronic equipment and storage medium |
CN113840006B (en) * | 2021-09-27 | 2023-07-11 | 深圳平安智慧医健科技有限公司 | Method and device for managing inquiry interface, electronic equipment and storage medium |
CN114040005A (en) * | 2021-10-18 | 2022-02-11 | 中国联合网络通信集团有限公司 | Data transmission method, device and storage medium |
CN114598739A (en) * | 2022-02-28 | 2022-06-07 | 阿里巴巴(中国)有限公司 | Processing method, device and system of communication channel based on cloud application |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109962953A (en) | Client communication method for building up and device | |
CN107993149B (en) | Account information management method, system and readable storage medium | |
US20170163479A1 (en) | Method, Device and System of Renewing Terminal Configuration In a Memcached System | |
US20170163478A1 (en) | Method,electronic device and system for updating client configuration in key-value pair database | |
CN109788461A (en) | Bluetooth dual mode data communication means and device | |
CN108646146A (en) | Distribution wire On-line Fault monitoring method and terminal device | |
CN104079630A (en) | Business server side load balancing method, client side, server side and system | |
CN103139157B (en) | A kind of based on the network communication method of socket, Apparatus and system | |
CN109040210B (en) | Communication method between applications, terminal equipment and storage medium | |
CN108540218A (en) | Electric power optical cable safety failure processing method and processing device | |
CN105897652A (en) | Standard protocol based heterogeneous terminal dynamic access method | |
CN105183452A (en) | Spring AOP based remote protocol service middleware for monitoring power distribution device | |
CN109474540B (en) | Method and device for identifying OPC (optical proximity correction) flow | |
CN110166322B (en) | Detection method and related device for metering automation terminal | |
CN104993980A (en) | Long connection application access safety control method and system | |
CN111817878A (en) | Networking method and device of intelligent equipment and cloud server | |
CN111092952A (en) | Data interaction method and related product | |
CN114338477B (en) | Communication link monitoring method, device, equipment and storage medium | |
CN103491057A (en) | Method, system and device for sharing session data | |
CN106211058A (en) | The method and system of terminal positioning | |
CN109388598A (en) | A kind of information processing method and general-purpose serial bus USB cluster server | |
CN104994116A (en) | Method, device and system for multi-screen unified communication | |
CN108023837B (en) | Virtual network switch system and establishing method thereof | |
CN105871917A (en) | Transmission control protocol TCP connection scheduling method and device | |
CN105516087A (en) | Socket communication interface system based on process control server |
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: 20190702 |