CN103391240B - Instant messaging achieving method and device - Google Patents

Instant messaging achieving method and device Download PDF

Info

Publication number
CN103391240B
CN103391240B CN201310268680.0A CN201310268680A CN103391240B CN 103391240 B CN103391240 B CN 103391240B CN 201310268680 A CN201310268680 A CN 201310268680A CN 103391240 B CN103391240 B CN 103391240B
Authority
CN
China
Prior art keywords
instant messaging
lan
message packets
local area
area network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310268680.0A
Other languages
Chinese (zh)
Other versions
CN103391240A (en
Inventor
蓝中第
庞孟羽
陈添
李帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201310268680.0A priority Critical patent/CN103391240B/en
Publication of CN103391240A publication Critical patent/CN103391240A/en
Priority to PCT/CN2014/080779 priority patent/WO2014206305A1/en
Application granted granted Critical
Publication of CN103391240B publication Critical patent/CN103391240B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/06Message adaptation to terminal or network requirements
    • H04L51/066Format adaptation, e.g. format conversion or compression
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/214Monitoring or handling of messages using selective forwarding

Abstract

The invention discloses an instant messaging achieving method and device. The method includes determining the transmission network type of interacted message data packages when detecting instant messaging message interaction; conducting format processing on the interacted data packages according to the preset data format if the network is a local area network; transmitting the interacted message data packages subjected to format processing to target users through the local area network or displaying the interacted message data packages subjected to format processing in an instant messaging application. By means of the method and device, a function of instant messaging can be achieved in the local area network on the basis of achievement of the existing instant messaging application, quick interaction between the users of the instant messaging application of the local area network is facilitated, external bandwidth resources are saved to some extent, and bandwidth pressure is reduced.

Description

A kind of instant messaging implementation method and device
Technical field
The present invention relates to instant messaging technical field, particularly relate to a kind of instant messaging implementation method and device.
Background technology
IM(Instant Messenger, instant messaging) be a kind of service of the instant interchange message based on current internet and communication network.By the related application of IM, people can exchange with other users anywhere or anytime when there being the network coverage, and send message or message, IM has become a kind of indispensable service of communication between society people.
But, in the prior art, IM user must pass through router, obtains wifi, GPRS(GeneralPacket Radio Service, general packet radio service technology) etc. be linked in the Internet and realize instant messaging, even if the IM user initiating instant messaging is in same local area network (LAN).When adopting the instant messaging of the IM user of existing techniques in realizing in same local area network (LAN), do not use the transmittability of local area network (LAN), and occupy the external network bandwidth, waste bandwidth resources to a certain extent.
Summary of the invention
Embodiment of the present invention technical problem to be solved is, provides a kind of instant messaging implementation method and device, can realize instant messaging in a local network.
On the one hand, embodiments provide a kind of instant messaging implementation method, comprising:
When the interacting message of instant messaging being detected, determine the transmission network type of mutual message packets;
If network type is local area network (LAN), according to preset data format, format analysis processing is carried out to described mutual message packets;
By local area network (LAN) the mutual message packets after described format analysis processing be transferred to targeted customer or in instant communication applications, show the mutual message packets after described format analysis processing.
On the other hand, the embodiment of the present invention additionally provides a kind of instant messaging implement device, comprising:
Determination module, for when the interacting message of instant messaging being detected, determines the transmission network type of mutual message packets;
Processing module, if be local area network (LAN) for network type, carries out format analysis processing according to preset data format to described mutual message packets;
Output module, for being transferred to targeted customer by local area network (LAN) by the mutual message packets after described format analysis processing or showing the mutual message packets after described format analysis processing in instant communication applications.
Again on the one hand, the embodiment of the present invention additionally provides a kind of computer-readable storage medium, has program stored therein in described computer-readable storage medium, and this program comprises above-mentioned instant messaging implementation method when performing.
The embodiment of the present invention can when instant communication applications generation message packets be mutual, according to the type of the network of this message packets of transmission, perform different Message Processing, can on the basis of realization ensureing existing instant messaging application, realize the function of instant messaging in a local network, mutual fast between the user that the instant messaging being conducive to local area network (LAN) is applied, also save external bandwidth resources to a certain extent, the bandwidth pressure of alleviation.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of a kind of instant messaging implementation method of the embodiment of the present invention;
Fig. 2 is the schematic flow sheet of the another kind of instant messaging implementation method of the embodiment of the present invention;
Fig. 3 is the schematic diagram of a kind of near field user interface of the embodiment of the present invention;
Fig. 4 is the structural representation of a kind of instant messaging implement device of the embodiment of the present invention;
Fig. 5 is the structural representation of the another kind of instant messaging implement device of the embodiment of the present invention;
Fig. 6 is wherein a kind of structural representation of the processing module in Fig. 5;
Fig. 7 is wherein a kind of structural representation of the determination module in Fig. 5.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Refer to Fig. 1, it is the schematic flow sheet of a kind of instant messaging implementation method of the embodiment of the present invention, the described method of the embodiment of the present invention can be applicable to panel computer, mobile phone, electronic reader, remote controller, PC PC, notebook computer, mobile unit, Web TV, wearable device etc. and has in the smart machine of network function, concrete, described method comprises:
S101: when the interacting message of instant messaging being detected, determines the transmission network type of mutual message packets.
In embodiments of the present invention, described mutual message packets comprises: the message packets that other user terminals that local terminal receives send, or the message packets that local terminal sends to other user terminals.The network type transmitting mutual message packets comprises local area network (LAN), and for non-local nets such as the wide area networks that is linked into the Internet.
Network of network type for transmitting described mutual message packets specifically by the mode of monitor channel port, can judge that the port (lan port or WAN port) received corresponding to described mutual message packets determines the network type transmitting described mutual message packets; The network type transmitting described mutual message packets can also be determined according to transmitting terminal user ID entrained in described mutual message packets and receiving terminal user ID, wherein, as long as have a user ID be specified format net in instant messaging account time, the network type can determining to transmit this mutual message packets is local area network (LAN).
S102: if network type is local area network (LAN), according to preset data format, format analysis processing is carried out to described mutual message packets.To process described mutual message packets according to preset data format and mainly comprise: according to data format during preset local network transport, data format when wrapping in local network transport to described mutual message data and local instant messaging are applied between the data format that can identify and are carried out format conversion processing.
S103: by local area network (LAN) the mutual message packets after described format analysis processing is transferred to targeted customer or shows the mutual message packets after described format analysis processing in instant communication applications.
Based on local area network (LAN) UPNP(Universal Plug and Play between each equipment in local area network (LAN), UPnP) etc. agreement in the message packets of local area network (LAN) internal transmission specific data structure, in described S102, if when receiving described mutual message packets or be about to use local area network (LAN) to send described mutual message packets to other LAN subscribers from local area network (LAN) (when the network type transmitted is local area network (LAN)), first according to the data structure used during local area network (LAN) internal transmission message packets and preset data format, the message packets mutual to this processes, then the transmission performing data or the Graphics Processing performed in instant communication applications.
Concrete, when described mutual message packets is as data to be transmitted bag, need this packet to encapsulate according to the data structure can transmitted in local area network (LAN), so that can receive and dispatch normally in the local area network (LAN) of this locality.When described mutual message packets is the packet of being come by local network transport received, decode according to the data structure transmitted in local area network (LAN), obtain the message content in message packets, and then discernible data format is applied in the instant messaging this message content being packaged into this locality, so that after this instant messaging is applied in and carries out corresponding data processing, show corresponding message content in display interface.
Further, if network type is non-local net, then described mutual message packets is processed, so that show the message content of described mutual message packets or send described mutual message packets according to the processing rule of instant messaging application.Namely when network type is non-local net, as during for wide area network, then the direct processing logic according to existing instant messaging processes described mutual message packets, so that when this mutual message packets is the data to be displayed bag received, the message content of the message packets received normally can be shown in the display interface of instant communication applications; Or when this mutual message packets is data to be transmitted bag, send this packet waiting for transmission to other users.Its detailed process is same as the prior art, is not repeated herein.
The embodiment of the present invention can when instant communication applications generation message packets be mutual, according to the type of the network of this message packets of transmission, perform different Message Processing, can on the basis of realization ensureing existing instant messaging application, realize the function of instant messaging in a local network, mutual fast between the user that the instant messaging being conducive to local area network (LAN) is applied, also save external bandwidth resources to a certain extent, the bandwidth pressure of alleviation.
Refer to Fig. 2 again, it is the schematic flow sheet of the another kind of instant messaging implementation method of the embodiment of the present invention, the described method of the embodiment of the present invention can be applicable to panel computer, mobile phone, electronic reader, remote controller, PC PC, notebook computer, mobile unit, Web TV, wearable device etc. and has in the smart machine of network function, concrete, described method comprises:
S201: when preset local communication switching flag bits is set to effective, according to instant messaging application account and/or the local device mark of the current login of local terminal, generates instant messaging account in net; For identifying the instant messaging service of opening in local area network (LAN) when described preset local communication switching flag bits is set to effective, carry out instant messaging by local area network (LAN).
After the instant messaging application that user opens a terminal, detect whether local communication switch mark position is effective, namely judge whether user manually opens local communication flag bit, open the function of the instant messaging service in local area network (LAN).If user selects to open this function, then need the account apply according to the instant messaging of current login each/or local device identify instant messaging account in generation net that can use in local area network (LAN).Concrete, in this net, the form of instant messaging account can be: UIN appdomain/devguid, and wherein, UIN is the instant messaging account of current login, and appdomain is the device type of terminal, and devguid is the unique identification of terminal.
In this net instant messaging account be used for terminal current this terminal equipment of unique identification in a local network, and come for distinguishing with normal instant messaging application account, so that follow-up when needs are by local area network messaging packet, the type of the network of this message packets of transmission can be identified rapidly.
S202: each peer user terminal of searching in local area network (LAN) the instant messaging service of having opened in local area network (LAN) based on LAN protocol.
Existing UPNP agreement specifically can be adopted to search local area network (LAN), and other has opened the node of the instant messaging service in local area network (LAN), and certification.After certification is passed through, can record in the user interface of near field and show each certification pass through after the user ID corresponding to node.Concrete, described near field user interface can be shown in Figure 3.Concrete, after the described S202 of execution, described method can also comprise:
Display near field user interface, records user ID in the user interface of described near field, and described user ID comprises the user ID of each peer user terminal of searching in local area network (LAN) the instant messaging service of having opened in local area network (LAN) based on LAN protocol;
When the interpolation operation user ID in the user interface of described near field being added to good friend being detected, extract the instant messaging account in user ID corresponding in the user interface of described near field, and add process based on the instant messaging account initiation good friend extracted.
In the near field user interface of display, user can select arbitrary each user ID wherein to initiate instant telecommunication session at any time as required.And the interpolation mode of operation of good friend can be added by such as right button, user corresponding for one or more user ID in the user interface of described near field is added to good friend.After interpolation operation being detected, terminal only need according to the form of instant messaging account in net, extract instant messaging application account wherein, the good friend then applied based on existing instant messaging adds flow process and completes good friend and add required information interaction, completes good friend's interpolation.
Completing after good friend adds operation, based on instant messaging account in the net that the instant messaging application account added as a friend is corresponding, all chat records being dumped in instant messaging chat history, and being associated with this instant messaging application account.
It should be noted that, when practical operation, described S201 and described S202 also can carry out simultaneously, namely when preset local communication switching flag bits is set to effective, while generating the interior instant messaging account of net, search other users of local area network (LAN) based on LAN protocol.
S203: set up the LAN data communication channel with described each peer user terminal, to realize the communication between each peer user terminal of local area network (LAN).
After each peer user terminal finding the instant messaging service of opening in local area network (LAN), specifically can set up communication channel between this terminal and described peer user terminal based on UPNP agreement, namely WLAN communication channel is set up, specifically can comprise: set up small data (below 128K) UDP(User DatagramProtocol, User Datagram Protoco (UDP)) communication channel, and set up large data communication HTTP(Hypertexttransfer protocol, HTML (Hypertext Markup Language)) channel.Described small data communication channel is for realizing the transmission of heartbeat signal, or the transmission of small text message packets, and described large data communication channel then can when needed in order to transmit the such as message packets such as picture, video.
S204: when the interacting message of instant messaging being detected, determines the transmission network type of mutual message packets.
Mutual message packets can be specifically needed to send out a message packets to be transmitted of going by local terminal, or receives the message packets to be shown that other users send over.
Wherein, when described mutual message packets is data to be transmitted bag, described S204 can comprise:
Detect targeted customer's mark of carrying in described mutual message packets;
If the targeted customer detected is designated instant messaging account in net, then determine that the network type of described mutual message packets is local area network (LAN).Otherwise, be then as non-local nets such as wide area networks.
When described mutual message packets is the data to be displayed bag received, described S204 can comprise:
Detect the transmit leg user ID of carrying in described mutual message packets;
If the transmit leg user ID detected is instant messaging account in net, then determine that the network type of described mutual message packets is local area network (LAN).Otherwise, be then as non-local nets such as wide area networks.
When described mutual message packets is the data to be displayed bag received, described S204 can also comprise: if described mutual message packets is received by described LAN data communication channel, then determine that the network type of described mutual message packets is local area network (LAN).Otherwise, be then as non-local nets such as wide area networks.
When described S204 determines that network type is local area network (LAN), perform following S205; Otherwise, perform following S207.
S205: if network type is local area network (LAN), according to preset data format, format analysis processing is carried out to described mutual message packets.
Wherein, in embodiments of the present invention, described S205 specifically can comprise: if network type is local area network (LAN), detects the type of interaction of described mutual message packets; When the type of interaction of described mutual message packets is the data to be transmitted bag of instant messaging application, according to preset data format, encapsulation process is carried out to described mutual message packets; When the type of interaction of described mutual message packets is the data to be displayed bag received, according to preset data format, described mutual message packets is decoded, extract corresponding message content.
Wherein, export in instant messaging application to show after processing the message content extracted in above-mentioned and specifically can comprise: the message content of extraction is packaged into instant messaging and applies discernible packet; Processing rule according to instant messaging application carries out Graphics Processing to encapsulating the discernible packet obtained, and shows the message content of described extraction in the display interface of instant communication applications.Wherein, obtain after local instant messaging applies the packet that can identify in encapsulation, the Graphics Processing carried out can be identical with the processing logic that existing instant messaging is applied to show message content, is not repeated herein.
S206: by local area network (LAN) the mutual message packets after described format analysis processing is transferred to targeted customer or shows the mutual message packets after described format analysis processing in instant communication applications.
S207: if network type is non-local net, then process described mutual message packets, so that show the message content of described mutual message packets or send described mutual message packets according to the processing rule of instant messaging application.
When network type is non-local net, prior art is adopted to the message packets to be shown received or to the processing mode of packet waiting for transmission, simultaneously, that applies instant messaging comprises login, initiation session, file transfer, the relevant treatment logics such as good friend's management are also same as the prior art, all repeat no more at this.
The embodiment of the present invention additionally provides a kind of computer-readable storage medium, has program stored therein in this computer-readable storage medium, and this program performs the instant messaging implementation method comprising the corresponding embodiment of above-mentioned Fig. 1 to Fig. 2.
The embodiment of the present invention can when instant communication applications generation message packets be mutual, according to the type of the network of this message packets of transmission, perform different Message Processing, can on the basis of realization ensureing existing instant messaging application, realize the function of instant messaging in a local network, mutual fast between the user that the instant messaging being conducive to local area network (LAN) is applied, also save external bandwidth resources to a certain extent, the bandwidth pressure of alleviation.And, wherein by arranging instant messaging account in net, the network type determined can be distinguished rapidly, reduce message packets to transmit in a local network or the delay of normal transmission, equally, channel when wrapping in transmission based on the message data received, also can distinguish the network type determined rapidly, also ensure that message packets is transmitted or the delay of normal transmission in a local network.
Below the instant messaging implement device of the embodiment of the present invention is described.
Concrete, refer to Fig. 4, it is the structural representation of a kind of instant messaging implement device of the embodiment of the present invention, the described device of the embodiment of the present invention can be arranged on panel computer, mobile phone, electronic reader, remote controller, PC PC, notebook computer, mobile unit, Web TV, wearable device etc. and have in the smart machine of network function, concrete, described device comprises:
Determination module 1, for when the interacting message of instant messaging being detected, determines the transmission network type of mutual message packets;
Processing module 2, if be local area network (LAN) for network type, carries out format analysis processing according to preset data format to described mutual message packets;
Output module 3, for being transferred to targeted customer by local area network (LAN) by the mutual message packets after described format analysis processing or showing the mutual message packets after described format analysis processing in instant communication applications.
Described mutual message packets comprises: other user terminals that local terminal receives send over message packets to be shown, or the message packets to be transmitted that local terminal sends to other user terminals.The network type transmitting mutual message packets comprises local area network (LAN), and for non-local nets such as the wide area networks that is linked into the Internet.
The network of network type that described processing module 1 determines transmitting described mutual message packets specifically by the mode of monitor channel port, can judge that the port (lan port or WAN port) received corresponding to described mutual message packets determines the network type transmitting described mutual message packets; The network type transmitting described mutual message packets can also be determined according to transmitting terminal user ID entrained in described mutual message packets and receiving terminal user ID, wherein, as long as have a user ID be specified format net in instant messaging account time, the network type can determining to transmit this mutual message packets is local area network (LAN).
For described processing module 2, due between each equipment in local area network (LAN) based on the message packets of the agreements such as local area network (LAN) UPNP in local area network (LAN) internal transmission specific data structure, therefore, if when receiving described mutual message packets or be about to use local area network (LAN) to send described mutual message packets to other LAN subscribers from local area network (LAN) (when the network type transmitted is local area network (LAN)), described processing module 2 is first according to the data structure used during local area network (LAN) internal transmission message packets and preset data format, the message packets mutual to this processes, then by the message packets after described processing module 2 processes by described output module 3 export to corresponding communication channel send to targeted customer or export to instant messaging apply in be shown to user.
Further, if network type is non-local net, the processing rule of described processing module 2 also for applying according to instant messaging processes described mutual message packets, so that show the message content of described mutual message packets or send described mutual message packets.
Namely when network type is non-local net, as during for wide area network, described processing module 2 directly processes described mutual message packets according to the processing logic of existing instant messaging, so that when this mutual message packets is the data to be displayed bag received, the message content of the message packets received normally can be shown in the display interface of instant communication applications; Or when this mutual message packets is data to be transmitted bag, send this packet waiting for transmission to other users.Its detailed process is same as the prior art, is not repeated herein.
The embodiment of the present invention can when instant communication applications generation message packets be mutual, according to the type of the network of this message packets of transmission, perform different Message Processing, can on the basis of realization ensureing existing instant messaging application, realize the function of instant messaging in a local network, mutual fast between the user that the instant messaging being conducive to local area network (LAN) is applied, also save external bandwidth resources to a certain extent, the bandwidth pressure of alleviation.
Refer to Fig. 5 again, it is the structural representation of the another kind of instant messaging implement device of the embodiment of the present invention, the described device of the embodiment of the present invention can be arranged on panel computer, mobile phone, electronic reader, remote controller, PC PC, notebook computer, mobile unit, Web TV, wearable device etc. and have in the smart machine of network function, described device comprises determination module 1 in an embodiment and processing module 2, in embodiments of the present invention, described device can also comprise:
First near-field treatment module 4, for when preset local communication switching flag bits is set to effective, according to instant messaging application account and/or the local device mark of the current login of local terminal, generates instant messaging account in net; For identifying the instant messaging service of opening in local area network (LAN) when described preset local communication switching flag bits is set to effective, carry out instant messaging by local area network (LAN).
After the instant messaging application that user opens a terminal, detect whether local communication switch mark position is effective, namely judge whether user manually opens local communication flag bit, open the function of the instant messaging service in local area network (LAN).If user selects to open this function, then account apply according to the instant messaging of current login by described first near-field treatment module 4 is each/or local device identify instant messaging account in generation net that can use in local area network (LAN).
In this net instant messaging account be used for terminal current this terminal equipment of unique identification in a local network, and come for distinguishing with normal instant messaging application account, so that follow-up when needs messaging packet, the type of the network of this message packets of transmission can be identified rapidly.
Further, described device can also comprise:
Second near-field treatment module 5, for searching in local area network (LAN) each peer user terminal of the instant messaging service of having opened in local area network (LAN) based on LAN protocol; And set up the LAN data communication channel with described each peer user terminal, to realize the communication between each peer user terminal of local area network (LAN).
Described second near-field treatment module 5 specifically can adopt existing UPNP agreement to search local area network (LAN), and other has opened the node of the instant messaging service in local area network (LAN), and certification.After certification is passed through, can record in the user interface of near field and show each certification pass through after the user ID corresponding to node.
Further, the described device of the embodiment of the present invention can also comprise:
Display module 6, for showing near field user interface, record user ID in the user interface of described near field, described user ID comprises the user ID of each peer user terminal of searching in local area network (LAN) the instant messaging service of having opened in local area network (LAN) based on LAN protocol;
Add module 7, for when the interpolation operation user ID in the user interface of described near field being added to good friend being detected, extract the instant messaging account in user ID corresponding in the user interface of described near field, and add process based on the instant messaging account initiation good friend extracted.
In the near field user interface that described display module 6 shows, user can select arbitrary each user ID wherein to initiate instant telecommunication session at any time as required.And the interpolation mode of operation of good friend can be added by such as right button, user corresponding for one or more user ID in the user interface of described near field is added to good friend.Described interpolation module 7 is after interpolation operation being detected, only need according to the form of instant messaging account in net, extract instant messaging application account wherein, the good friend then applied based on existing instant messaging adds flow process and completes good friend and add required information interaction, completes good friend's interpolation.
Complete after good friend adds operation, described interpolation module 7 is also for based on instant messaging account in net corresponding to the instant messaging application account added as a friend, all chat records are dumped in instant messaging chat history, and is associated with this instant messaging application account.
Further alternatively, refer to Fig. 6, be wherein a kind of structural representation of the processing module in Fig. 5, described processing module 2 comprises:
Detecting unit 21, if be local area network (LAN) for network type, detects the type of interaction of described mutual message packets;
First processing unit 22, for when the type of interaction of described mutual message packets be instant messaging application data to be transmitted bag time, according to preset data format, encapsulation process is carried out to described mutual message packets;
Second processing unit 23, for when the type of interaction of described mutual message packets is the data to be displayed bag received, decodes to described mutual message packets according to preset data format, extracts corresponding message content.
Further alternatively, when the type of interaction of described mutual message packets is the data to be displayed bag received, described processing module 2 can also comprise with lower unit perform process operation accordingly.
Extraction unit, for when the type of interaction of described mutual message packets is the data to be displayed bag received, decodes to described mutual message packets according to preset data format, extracts corresponding message content;
Encapsulation unit, applies discernible packet for the message content of extraction is packaged into instant messaging;
Output unit, carrying out Graphics Processing for the processing rule applied according to instant messaging to encapsulating the discernible packet obtained, showing the message content of described extraction in the display interface of instant communication applications.
Further alternatively, refer to Fig. 7, be wherein a kind of structural representation of the determination module in Fig. 5, described determination module 1 comprises:
Label detection unit 11, for when described mutual message packets is data to be transmitted bag, detects targeted customer's mark of carrying in described mutual message packets;
First determining unit 12, if the targeted customer for detecting is designated instant messaging account in net, then determines that the network type of described mutual message packets is local area network (LAN).
Further alternatively, then refer to Fig. 7, described determination module 1 can also comprise:
Second determining unit 13, if received by described LAN data communication channel for described mutual message packets, then determines that the network type of described mutual message packets is local area network (LAN).
The embodiment of the present invention can when instant communication applications generation message packets be mutual, according to the type of the network of this message packets of transmission, perform different Message Processing, can on the basis of realization ensureing existing instant messaging application, realize the function of instant messaging in a local network, mutual fast between the user that the instant messaging being conducive to local area network (LAN) is applied, also save external bandwidth resources to a certain extent, the bandwidth pressure of alleviation.And, wherein by arranging instant messaging account in net, the network type determined can be distinguished rapidly, reduce message packets to transmit in a local network or the delay of normal transmission, equally, channel when wrapping in transmission based on the message data received, also can distinguish the network type determined rapidly, also ensure that message packets is transmitted or the delay of normal transmission in a local network.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, this program is when performing, can in instant messaging, according to the network condition of message packets mutual in transmission instant messaging, corresponding format analysis processing is performed to mutual message packets, complete the flow process of the embodiment comprised as above-mentioned each side method, to reach when realizing existing instant messaging, realize instant messaging in a local network.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random AccessMemory, RAM) etc.
Above disclosedly be only present pre-ferred embodiments, certainly can not limit the interest field of the present invention with this, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained.

Claims (15)

1. an instant messaging implementation method, is characterized in that, comprising:
When preset local communication switching flag bits is set to effective, according to instant messaging application account and/or the local device mark of the current login of local terminal, generate instant messaging account in net;
When the interacting message of instant messaging being detected, determine the transmission network type of mutual message packets;
If network type is local area network (LAN), according to preset data format, format analysis processing is carried out to described mutual message packets;
By local area network (LAN) the mutual message packets after described format analysis processing be transferred to targeted customer or in instant communication applications, show the mutual message packets after described format analysis processing;
Wherein, for identifying the instant messaging service of opening in local area network (LAN) when described preset local communication switching flag bits is set to effective, instant messaging is carried out by local area network (LAN).
2. the method for claim 1, is characterized in that, if described network type is local area network (LAN), carries out format analysis processing, comprising according to preset data format to described mutual message packets:
If network type is local area network (LAN), detect the type of interaction of described mutual message packets;
When the type of interaction of described mutual message packets is the data to be transmitted bag of instant messaging application, according to preset data format, encapsulation process is carried out to described mutual message packets;
When the type of interaction of described mutual message packets is the data to be displayed bag received, according to preset data format, described mutual message packets is decoded, extract corresponding message content.
3. method as claimed in claim 2, is characterized in that, describedly in instant communication applications, shows the mutual message packets after described format analysis processing, comprising:
The message content of extraction is packaged into instant messaging and applies discernible packet;
After Graphics Processing being carried out to the discernible packet that encapsulation obtains according to the processing rule of instant messaging application, in the display interface of instant communication applications, show the message content of described extraction.
4. method as claimed in claim 2, is characterized in that, when described mutual message packets is data to be transmitted bag, described in when the interacting message of instant messaging being detected, determine the transmission network type of mutual message packets, comprising:
Detect targeted customer's mark of carrying in described mutual message packets;
If the targeted customer detected is designated instant messaging account in net, then determine that the network type of described mutual message packets is local area network (LAN).
5. method as claimed in claim 2, is characterized in that, described the interacting message of instant messaging detected time, before determining the transmission network type of mutual message packets, also comprise:
Each peer user terminal of the instant messaging service of having opened in local area network (LAN) is searched in local area network (LAN) based on LAN protocol;
Set up the LAN data communication channel with described each peer user terminal, to realize the communication between each peer user terminal of local area network (LAN).
6. method as claimed in claim 5, it is characterized in that, when the type of interaction of described mutual message packets is the data to be displayed bag received, described in when the interacting message of instant messaging being detected, determine the transmission network type of mutual message packets, comprising:
If described mutual message packets is received by described LAN data communication channel, then determine that the network type of described mutual message packets is local area network (LAN).
7. the method as described in any one of claim 1-6, is characterized in that, also comprises:
Display near field user interface, records user ID in the user interface of described near field, and described user ID comprises the user ID of each peer user terminal of searching in local area network (LAN) the instant messaging service of having opened in local area network (LAN) based on LAN protocol;
When the interpolation operation user ID in the user interface of described near field being added to good friend being detected, extract the instant messaging account in user ID corresponding in the user interface of described near field, and add process based on the instant messaging account initiation good friend extracted.
8. method as claimed in claim 7, is characterized in that, also comprise:
If network type is non-local net, then described mutual message packets is processed, so that show the message content of described mutual message packets or send described mutual message packets according to the processing rule of instant messaging application.
9. an instant messaging implement device, is characterized in that, comprising:
First near-field treatment module, for when preset local communication switching flag bits is set to effective, according to instant messaging application account and/or the local device mark of the current login of local terminal, generates instant messaging account in net; For identifying the instant messaging service of opening in local area network (LAN) when described preset local communication switching flag bits is set to effective, carry out instant messaging by local area network (LAN);
Determination module, for when the interacting message of instant messaging being detected, determines the transmission network type of mutual message packets;
Processing module, if be local area network (LAN) for network type, carries out format analysis processing according to preset data format to described mutual message packets;
Output module, for being transferred to targeted customer by local area network (LAN) by the mutual message packets after described format analysis processing or showing the mutual message packets after described format analysis processing in instant communication applications.
10. device as claimed in claim 9, it is characterized in that, described processing module comprises:
Detecting unit, if be local area network (LAN) for network type, detects the type of interaction of described mutual message packets;
First processing unit, for when the type of interaction of described mutual message packets be instant messaging application data to be transmitted bag time, according to preset data format, encapsulation process is carried out to described mutual message packets;
Second processing unit, for when the type of interaction of described mutual message packets is the data to be displayed bag received, decodes to described mutual message packets according to preset data format, extracts corresponding message content.
11. devices as claimed in claim 10, it is characterized in that, described processing module also comprises:
Extraction unit, for when the type of interaction of described mutual message packets is the data to be displayed bag received, decodes to described mutual message packets according to preset data format, extracts corresponding message content;
Encapsulation unit, applies discernible packet for the message content of extraction is packaged into instant messaging;
Output unit, carrying out Graphics Processing for the processing rule applied according to instant messaging to encapsulating the discernible packet obtained, showing the message content of described extraction in the display interface of instant communication applications.
12. devices as claimed in claim 10, it is characterized in that, described determination module comprises:
Label detection unit, for when described mutual message packets is data to be transmitted bag, detects targeted customer's mark of carrying in described mutual message packets;
First determining unit, if the targeted customer for detecting is designated instant messaging account in net, then determines that the network type of described mutual message packets is local area network (LAN).
13. devices as claimed in claim 10, is characterized in that, also comprise:
Second near-field treatment module, for searching in local area network (LAN) each peer user terminal of the instant messaging service of having opened in local area network (LAN) based on LAN protocol; And set up the LAN data communication channel with described each peer user terminal, to realize the communication between each peer user terminal of local area network (LAN).
14. devices as claimed in claim 13, it is characterized in that, described determination module comprises:
Second determining unit, if received by described LAN data communication channel for described mutual message packets, then determines that the network type of described mutual message packets is local area network (LAN).
15. devices as described in any one of claim 9-14, is characterized in that, also comprise:
Display module, for showing near field user interface, record user ID in the user interface of described near field, described user ID comprises the user ID of each peer user terminal of searching in local area network (LAN) the instant messaging service of having opened in local area network (LAN) based on LAN protocol;
Add module, for when the interpolation operation user ID in the user interface of described near field being added to good friend being detected, extract the instant messaging account in user ID corresponding in the user interface of described near field, and add process based on the instant messaging account initiation good friend extracted.
CN201310268680.0A 2013-06-28 2013-06-28 Instant messaging achieving method and device Active CN103391240B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201310268680.0A CN103391240B (en) 2013-06-28 2013-06-28 Instant messaging achieving method and device
PCT/CN2014/080779 WO2014206305A1 (en) 2013-06-28 2014-06-26 Methods and apparatuses for instant messaging

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310268680.0A CN103391240B (en) 2013-06-28 2013-06-28 Instant messaging achieving method and device

Publications (2)

Publication Number Publication Date
CN103391240A CN103391240A (en) 2013-11-13
CN103391240B true CN103391240B (en) 2015-07-01

Family

ID=49535403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310268680.0A Active CN103391240B (en) 2013-06-28 2013-06-28 Instant messaging achieving method and device

Country Status (2)

Country Link
CN (1) CN103391240B (en)
WO (1) WO2014206305A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103391240B (en) * 2013-06-28 2015-07-01 腾讯科技(深圳)有限公司 Instant messaging achieving method and device
CN103747350A (en) * 2013-11-28 2014-04-23 乐视致新电子科技(天津)有限公司 Method and system for interaction among terminal devices
CN106171038B (en) * 2014-03-12 2019-11-15 腾讯科技(深圳)有限公司 The method and apparatus for connecting peripheral devices to user equipment by Bluetooth protocol
CN105592414B (en) * 2014-11-18 2019-01-15 联想(北京)有限公司 A kind of information processing method and the first electronic equipment
CN106411691A (en) * 2016-05-31 2017-02-15 要宇轩 Voice public service method and system in instant messenger application
KR20200144721A (en) 2019-06-19 2020-12-30 라인플러스 주식회사 Method and system for generating chat room according to condition
CN110474834A (en) * 2019-06-28 2019-11-19 深圳快胜时尚科技有限公司 A kind of method, electronic equipment and storage medium keeping instant messaging real-time

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1885861A (en) * 2005-06-20 2006-12-27 腾讯科技(深圳)有限公司 Method for searching instantaneous communication user in LAN
CN101834878A (en) * 2010-01-29 2010-09-15 陈时军 Multiuser system privilege management method and instant messaging system applying same

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FI20041630A0 (en) * 2004-12-20 2004-12-20 Nokia Corp A method and apparatus for replacing a device during an active connection
CN100592720C (en) * 2006-12-22 2010-02-24 腾讯科技(深圳)有限公司 Method and system for implementing instant communication between external network user and LAN user
CN101815265B (en) * 2010-02-10 2012-09-05 播思通讯技术(北京)有限公司 Widget information transmission method and widget information transmission system
CN102891890B (en) * 2012-09-26 2015-07-29 腾讯科技(深圳)有限公司 Exchange method between a kind of terminal and relevant device, system
CN103391240B (en) * 2013-06-28 2015-07-01 腾讯科技(深圳)有限公司 Instant messaging achieving method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1885861A (en) * 2005-06-20 2006-12-27 腾讯科技(深圳)有限公司 Method for searching instantaneous communication user in LAN
CN101834878A (en) * 2010-01-29 2010-09-15 陈时军 Multiuser system privilege management method and instant messaging system applying same

Also Published As

Publication number Publication date
CN103391240A (en) 2013-11-13
WO2014206305A1 (en) 2014-12-31

Similar Documents

Publication Publication Date Title
CN103391240B (en) Instant messaging achieving method and device
CN109152095B (en) Wireless network connection method for terminal
CN104702406B (en) Auth method and device
CN104380797B (en) For providing the method and apparatus of the notice of network access technique handover event
CN107231606A (en) WiFi method of network entry, intelligent hardware devices and electric terminal
CN110121902B (en) Communication establishment method and terminal
CN102891890B (en) Exchange method between a kind of terminal and relevant device, system
CN104821929B (en) Multi-medium data sharing method and terminal
CN107371221B (en) Select method, apparatus, mobile terminal and the readable storage medium storing program for executing of network
CN111629452A (en) Data transmission control method and device, storage medium and electronic equipment
CN111224792B (en) Conference access method and device
CN110399578A (en) Page access method and device
CN107193445A (en) Interface of mobile terminal switches display methods and display device
WO2021228132A1 (en) Information sending method, resource processing method, apparatus, and electronic device
CN109379742A (en) A kind of cut-in method of WLAN, device and storage medium
CN107613536A (en) Select method, apparatus, mobile terminal and the readable storage medium storing program for executing of network
CN111629024A (en) Data transmission control method and device, storage medium and electronic equipment
WO2021228131A1 (en) Information transmission method and apparatus, and electronic device
CN103763125A (en) Statistical method and device for number of actual users in operator network
CN107466033A (en) IMS register method, device, mobile terminal and storage medium
CN104202432B (en) Remote web management system and management method
CN105743866B (en) A kind of processing method and gateway of message
CN104349202B (en) Video acquiring method and device
CN104980793B (en) A kind of method and terminal of video detection
WO2020043059A1 (en) Method and apparatus for displaying service identifier and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20211103

Address after: 518057 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 floors

Patentee after: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

Patentee after: TENCENT CLOUD COMPUTING (BEIJING) Co.,Ltd.

Address before: 2, 518057, East 403 room, SEG science and Technology Park, Zhenxing Road, Shenzhen, Guangdong, Futian District

Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

TR01 Transfer of patent right