CN111835798B - Communication system capable of chatting with 2G equipment - Google Patents
Communication system capable of chatting with 2G equipment Download PDFInfo
- Publication number
- CN111835798B CN111835798B CN201910303127.3A CN201910303127A CN111835798B CN 111835798 B CN111835798 B CN 111835798B CN 201910303127 A CN201910303127 A CN 201910303127A CN 111835798 B CN111835798 B CN 111835798B
- Authority
- CN
- China
- Prior art keywords
- app
- equipment
- processing module
- server
- unread
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a communication system capable of chatting with 2G equipment, which comprises an APP (application), a server and 2G equipment, wherein the APP is connected with the server, and the server is connected with the 2G equipment; the APP comprises a first main control unit, a first socket long connection processing module, a first HTTP short connection processing module, an APP and 2G equipment connection relation establishing module, a first unread offline message processing module, an APP data sending module for the 2G equipment and an APP message receiving module from the 2G equipment; the 2G device comprises a second main control unit, a second socket long connection processing module, a second HTTP short connection processing module and a second unread offline message processing module. The invention realizes that the 2G equipment can directly chat with the intelligent machine only by using the 2G signal without installing chat APP, and thoroughly avoids the defects of insufficient flow, limited storage, low network transmission speed and incapability of installing APP of the 2G equipment.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a communication system capable of chatting with a 2G device.
Background
At present, chat tools in the market, including WeChat, QQ, strange and the like, are all based on smart phones, chat objects are all directed to 3G or 4G equipment with corresponding chat applications installed on the smart phones, and chat communication only occurs between the 3G and 4G intelligent equipment. Although smart phones have become popular, a significant portion of the population still uses the original 2G feature phone devices in remote areas or older people. The 2G device has the characteristics of insufficient flow, limited storage, low network transmission speed, incapability of installing APP and the like, and is not suitable for directly carrying out chat communication with the existing chat tool. That is, no tools are currently on the market that support direct chat communication with 2G devices.
The above disadvantages need to be improved.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a communication system capable of chatting with 2G equipment.
The technical scheme of the invention is as follows:
a communication system capable of chatting with 2G equipment comprises an APP (application), a server and 2G equipment, wherein the APP is connected with the server, and the server is connected with the 2G equipment;
the APP comprises a first main control unit, a first socket long connection processing module, a first HTTP short connection processing module, an APP and 2G equipment connection relation establishing module, a first unread offline message processing module, an APP data sending module for 2G equipment and an APP message receiving module from 2G equipment, wherein the first main control unit is connected with the first socket long connection processing module, the first HTTP short connection processing module, the APP and 2G equipment connection relation establishing module, the first unread offline message processing module, the APP data sending module for 2G equipment and the APP message receiving module from 2G equipment, and the first socket long connection processing module and the first HTTP short connection processing module are connected with the server;
the 2G device comprises a second main control unit, a second socket long connection processing module, a second HTTP short connection processing module and a second unread offline message processing module, the second main control unit is connected with the second socket long connection processing module, the second HTTP short connection processing module and the second unread offline message processing module, and the second socket long connection processing module and the second HTTP short connection processing module are connected with the server.
Furthermore, after the user logs in the APP, the APP is in an online state, and the APP and the server establish long socket connection through the first long socket connection processing module.
Further, the APP and 2G device connection relationship establishing module specifically includes: the APP establishes a connection relation with the 2G equipment through inputting a friend making code;
or, the APP establishes a connection relation with the 2G device through a friend-making two-dimensional code of the 2G device.
Further, inputting a friend making code or a friend making two-dimensional code of the 2G scanning device to request the server through the first HTTP short connection processing module, and the server generates an unread message request instruction and waits for the 2G device to obtain the unread message request instruction;
the 2G equipment can inquire an unread message request instruction of the server through the second HTTP short connection processing module at regular time, when the unread message request instruction is inquired, the 2G equipment establishes socket long connection with the server through the second socket long connection processing module and obtains the unread message request instruction in the server;
and when the 2G equipment agrees or rejects the request instruction of the APP, the 2G equipment transmits the request result to the server through the second socket long connection processing module, and the server pushes the request result to the APP.
Further, when the 2G device agrees to the request instruction of the APP, the connection relationship between the APP and the 2G device is already established, and then the chat can be directly performed;
when the 2G equipment rejects the request instruction of the APP, the connection relation between the APP and the 2G equipment is not established, and direct chatting cannot be carried out.
Further, the first unread offline message processing module specifically includes: the APP acquires the unread offline messages and requests the server through a first HTTP short connection processing module, and the APP takes out all the unread offline messages in a server database;
the second unread offline message processing module specifically includes: the 2G equipment acquires the unread offline message through the second socket long connection processing module, and the 2G equipment only acquires the latest message.
Further, the number of unread offline messages stored by the server is less than 300, and when the number of unread offline messages increases, the oldest unread offline message is directly deleted.
Further, the APP sends a data module to the 2G device, specifically: the APP sends the chat messages to the server through the socket long connection established between the first socket long connection processing module and the server, and the server judges whether the chat messages need to be pushed to the 2G equipment or not;
when the 2G equipment is in a chat interface, the 2G equipment and the server are in a socket long connection state through a second socket long connection processing module, and at the moment, the server directly pushes chat messages sent by the APP to the 2G equipment;
when the 2G equipment is not in a chat interface, the 2G equipment and the server are not in a socket long connection state, at the moment, the chat message sent by the APP is stored to the server, and the chat message is set as an unread offline message;
the 2G equipment can inquire whether unread offline messages exist or not through a second http short connection processing module at regular time;
if the unread offline messages exist, when the 2G equipment user enters the chat interface and establishes socket long connection with the server through the second socket long connection processing module, the second socket long connection processing module extracts the latest unread offline messages from the server, and the server sets the extracted unread offline messages as read.
Further, the APP receives a message module from the 2G device, specifically: when the APP is online, the APP and the server establish socket long connection through a first socket long connection processing module, the 2G equipment sends chat messages to the server, and the server pushes the chat messages to the APP;
when the APP is offline, the APP and the server are not in a socket long connection state, the chat messages are stored in the server, and the chat messages are set to be unread offline messages.
Further, when the APP logs in again or goes online from offline, the APP requests all the previously unread offline message lists through the first HTTP short connection processing module, and the server sets the taken unread offline messages as read.
The invention according to the scheme has the beneficial effects that:
the communication system capable of chatting with the 2G equipment provided by the invention realizes that the 2G equipment can directly chat with the intelligent machine only by using 2G signals, does not need to install chatting APP, and thoroughly avoids the defects of insufficient flow, limited storage, low network transmission speed and incapability of installing APP of the 2G equipment.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic view of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the present invention more clearly apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
It will be understood that when an element is referred to as being "secured to" or "disposed on" another element, it can be directly or indirectly disposed on the other element. When an element is referred to as being "connected to" another element, it can be directly or indirectly connected to the other element. The terms "upper", "lower", "left", "right", "front", "rear", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like indicate orientations or positions based on the orientations or positions shown in the drawings, and are for convenience of description only and not to be construed as limiting the technical solution. The terms "first", "second" and "first" are used merely for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features. The meaning of "plurality" is two or more unless specifically limited otherwise.
Referring to fig. 1, a communication system capable of chatting with 2G devices includes an APP, a server, and 2G devices, where the APP is connected to the server, and the server is connected to the 2G devices;
the APP comprises a first main control unit, a first socket long connection processing module, a first HTTP short connection processing module, an APP and 2G equipment connection relation establishing module, a first unread offline message processing module, an APP data sending module for the 2G equipment and an APP message receiving module from the 2G equipment, the first main control unit is connected with the first socket long connection processing module, the first HTTP short connection processing module, the APP and 2G equipment connection relation establishing module, the first unread offline message processing module, the APP data sending module for the 2G equipment and the APP message receiving module from the 2G equipment, and the first socket long connection processing module and the first HTTP short connection processing module are connected with the server;
the 2G device comprises a second main control unit, a second socket long connection processing module, a second HTTP short connection processing module and a second unread offline message processing module, the second main control unit is connected with the second socket long connection processing module, the second HTTP short connection processing module and the second unread offline message processing module, and the second socket long connection processing module and the second HTTP short connection processing module are connected with the server.
The communication system capable of chatting with the 2G device provided by the embodiment has the beneficial effects that:
the communication system capable of chatting with the 2G equipment provided by the invention realizes that the 2G equipment can directly chatting with the intelligent machine only by using a 2G signal, does not need to install a chatting APP, and thoroughly avoids the defects of insufficient flow, limited storage, low network transmission speed and incapability of installing the APP of the 2G equipment.
Preferably, after the user logs in the APP, the APP is in an online state, and the APP and the server establish a socket long connection through the first socket long connection processing module.
In one embodiment, the socket long connection can ensure that the chat messages are transmitted and received in time, and a response mechanism for receiving the messages and an unread offline message processing module ensure that the messages are not lost.
Preferably, the APP and 2G device connection relationship establishing module specifically includes: the APP establishes a connection relation with the 2G equipment by inputting the friend-making code; or the APP establishes a connection relation with the 2G device through a friend-making two-dimensional code of the 2G device.
Preferably, the friend-making code is input or the friend-making two-dimensional code of the 2G scanning device requests a server through a first HTTP short connection processing module, the server generates an unread message request instruction and waits for the 2G device to obtain the unread message request instruction;
the 2G equipment can inquire an unread message request instruction of the server through the second HTTP short connection processing module at regular time, when the unread message request instruction is inquired, the 2G equipment establishes socket long connection with the server through the second socket long connection processing module and obtains the unread message request instruction from the server;
and when the 2G equipment agrees or rejects the request instruction of the APP, the 2G equipment transmits the request result to the server through the second socket long connection processing module, and the server pushes the request result to the APP.
Preferably, when the 2G device agrees to the request instruction of the APP, the connection relationship between the APP and the 2G device is already established, and then the chat can be directly performed;
when the 2G equipment rejects the APP request instruction, the connection relation between the APP and the 2G equipment is not established, and direct chatting cannot be carried out.
In one embodiment, the APP adding 2G device is unidirectional, the APP can actively send an adding application to the 2G device, and the 2G device cannot actively send an adding application to the APP, which mainly considers the difficult operability of the 2G device and the need of simple operation of the old equipment.
Preferably, the first unread offline message processing module specifically includes: the APP acquires the unread offline messages and requests the server through the first HTTP short connection processing module, and the APP takes out all the unread offline messages in the server database;
the second unread offline message processing module specifically includes: the 2G equipment acquires the unread offline message through the second socket long connection processing module, and the 2G equipment only acquires the latest message.
Preferably, the number of unread offline messages stored by the server is less than 300, and when the number of unread offline messages is increased, the oldest unread offline message is directly deleted.
Preferably, the APP sends a data module to the 2G device, specifically: the APP sends the chat message to the server through the socket long connection established between the first socket long connection processing module and the server, and the server judges whether the chat message needs to be pushed to the 2G equipment or not;
when the 2G equipment is in a chat interface, the 2G equipment and the server are in a socket long connection state through a second socket long connection processing module, and at the moment, the server directly pushes chat messages sent by the APP to the 2G equipment;
when the 2G equipment is not in a chat interface, the 2G equipment and the server are not in a socket long connection state, at the moment, the chat message sent by the APP is stored to the server, and the chat message is set as an unread offline message;
the 2G equipment can inquire whether unread offline messages exist or not through a second http short connection processing module at regular time;
if the unread offline messages exist, when the 2G equipment user enters the chat interface and establishes socket long connection with the server through the second socket long connection processing module, the second socket long connection processing module takes out the latest unread offline messages from the server, and the server sets the taken unread offline messages as read.
Preferably, the APP sends the chat message to the server, and the 2G device reads the chat message as required, so that the traffic of the 2G device can be saved, and the chat system can adapt to the environmental condition that the storage of the 2G device is insufficient.
Preferably, the APP receives a message module from the 2G device, specifically: when the APP is online, the APP and the server establish socket long connection through a first socket long connection processing module, the 2G equipment sends chat messages to the server, and the server pushes the chat messages to the APP;
when the APP is offline, the APP and the server are not in a socket long connection state, the chat messages are stored in the server, and the chat messages are set to be unread offline messages.
Preferably, when the APP logs in again or goes online from offline, the APP requests all the previously unread offline message lists through the first HTTP short connection processing module, and the server sets the taken unread offline messages as read.
Preferably, considering that the 2G device is mostly old people, typing words is difficult, so that the message type of the APP and the 2G device only supports voice chat.
Preferably, the 2G device has limited storage, cannot store many messages, is relatively confused in a multi-user chat scene, and is not suitable for the chat of the 2G device, so that the chat of the APP and the 2G device only supports single chat.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.
Claims (1)
1. A communication system capable of chatting with a 2G device, comprising: the system comprises an APP, a server and 2G equipment, wherein the APP is connected with the server, and the server is connected with the 2G equipment;
the APP comprises a first main control unit, a first socket long connection processing module, a first HTTP short connection processing module, an APP and 2G equipment connection relation establishing module, a first unread offline message processing module, an APP data sending module for 2G equipment and an APP message receiving module from 2G equipment, wherein the first main control unit is connected with the first socket long connection processing module, the first HTTP short connection processing module, the APP and 2G equipment connection relation establishing module, the first unread offline message processing module, the APP data sending module for 2G equipment and the APP message receiving module from 2G equipment, and the first socket long connection processing module and the first HTTP short connection processing module are connected with the server;
the 2G device comprises a second main control unit, a second socket long connection processing module, a second HTTP short connection processing module and a second unread offline message processing module, wherein the second main control unit is connected with the second socket long connection processing module, the second HTTP short connection processing module and the second unread offline message processing module, and the second socket long connection processing module and the second HTTP short connection processing module are connected with the server;
after a user logs in an APP, the APP is in an online state, and the APP and the server establish socket long connection through the first socket long connection processing module;
APP and 2G equipment connection relation establish module specifically is: the APP establishes a connection relation with the 2G equipment by inputting a friend-making code;
or the APP establishes a connection relation with the 2G equipment through a friend-making two-dimensional code of the 2G equipment;
inputting a friend making code or a friend making two-dimensional code of a 2G scanning device to request the server through the first HTTP short connection processing module, generating an unread message request instruction by the server, and waiting for the 2G device to obtain the unread message request instruction;
the 2G equipment can inquire an unread message request instruction of the server through the second HTTP short connection processing module at regular time, and when the unread message request instruction is inquired, the 2G equipment establishes socket long connection with the server through the second socket long connection processing module and acquires the unread message request instruction from the server;
when the 2G equipment agrees or rejects the request instruction of the APP, the 2G equipment transmits the request result to the server through the second socket long connection processing module, and the server pushes the request result to the APP;
when the 2G equipment agrees to the request instruction of the APP, the connection relation between the APP and the 2G equipment is established, and the chat can be directly carried out subsequently;
when the 2G equipment rejects the request instruction of the APP, the connection relation between the APP and the 2G equipment is not established, and direct chatting cannot be carried out;
the first unread offline message processing module specifically includes: the APP acquires the unread offline messages and requests the server through a first HTTP short connection processing module, and the APP takes out all the unread offline messages of a server database;
the second unread offline message processing module specifically includes: the 2G equipment acquires the unread offline message through the second socket long connection processing module, and the 2G equipment only acquires the latest message;
the number of unread offline messages stored by the server is less than 300, and when the number of unread offline messages is increased, the earliest unread offline message is directly deleted;
the APP sends a data module to the 2G device, and the data module specifically comprises: the APP sends the chat messages to the server through the socket long connection established between the first socket long connection processing module and the server, and the server judges whether the chat messages need to be pushed to the 2G equipment or not;
when the 2G equipment is in a chat interface, the 2G equipment and the server are in a socket long connection state through a second socket long connection processing module, and at the moment, the server directly pushes chat messages sent by the APP to the 2G equipment;
when the 2G equipment is not in a chat interface, the 2G equipment and the server are not in a socket long connection state, at the moment, the chat message sent by the APP is stored in the server, and the chat message is set as an unread offline message;
the 2G equipment can inquire whether unread offline messages exist or not through a second http short connection processing module at regular time;
if the unread offline messages exist, when the 2G equipment user enters the chat interface, socket long connection is established between the second socket long connection processing module and the server, the second socket long connection processing module is used for taking out the latest unread offline messages from the server, and the server sets the taken unread offline messages as read ones;
the APP receives a message module from the 2G device, specifically: when the APP is online, the APP and the server establish socket long connection through a first socket long connection processing module, the 2G equipment sends chat messages to the server, and the server pushes the chat messages to the APP;
when the APP is offline, the APP and the server are not in a socket long connection state, the chat message is stored in the server, and the chat message is set as an unread offline message;
when the APP logs in again or enters online from offline, the APP requests all the previously unread offline message lists through the first HTTP short connection processing module, and the server sets the taken unread offline messages as read.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910303127.3A CN111835798B (en) | 2019-04-16 | 2019-04-16 | Communication system capable of chatting with 2G equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910303127.3A CN111835798B (en) | 2019-04-16 | 2019-04-16 | Communication system capable of chatting with 2G equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111835798A CN111835798A (en) | 2020-10-27 |
CN111835798B true CN111835798B (en) | 2023-01-31 |
Family
ID=72915734
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910303127.3A Active CN111835798B (en) | 2019-04-16 | 2019-04-16 | Communication system capable of chatting with 2G equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111835798B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104243558A (en) * | 2014-08-28 | 2014-12-24 | 广州汇心网络有限公司 | Family service system based on mobile Internet |
CN105391776A (en) * | 2015-10-20 | 2016-03-09 | 上海斐讯数据通信技术有限公司 | Communication method and system for long connection message |
CN105554020A (en) * | 2016-01-12 | 2016-05-04 | 成都素颜信息技术有限公司 | Real-time communication system based on socket.io and communication method thereof |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2619355A1 (en) * | 2005-08-15 | 2007-02-22 | John Roujinsky | Method and system for obtaining feedback from at least one recipient via a telecommunication network |
-
2019
- 2019-04-16 CN CN201910303127.3A patent/CN111835798B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104243558A (en) * | 2014-08-28 | 2014-12-24 | 广州汇心网络有限公司 | Family service system based on mobile Internet |
CN105391776A (en) * | 2015-10-20 | 2016-03-09 | 上海斐讯数据通信技术有限公司 | Communication method and system for long connection message |
CN105554020A (en) * | 2016-01-12 | 2016-05-04 | 成都素颜信息技术有限公司 | Real-time communication system based on socket.io and communication method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN111835798A (en) | 2020-10-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103326923B (en) | Method and device for information sharing | |
EP1653693B1 (en) | File transmission method in instant messaging service | |
US20090181705A1 (en) | Mail transmission system and method and push mail server | |
CN102355637A (en) | Mobile terminal instant communication processing method and device | |
CN103096271A (en) | Information pushing system and information pushing method | |
EP1469654A3 (en) | Network device, system and method for providing list of controlled devices | |
KR100779012B1 (en) | Communication system and method between other messengers | |
CN101018349A (en) | A method for sending the SMS of the mobile phone number to the Internet program | |
CN101599921B (en) | Enterprise instant communication system and file transfer method thereof | |
KR100450144B1 (en) | Communication system for supporting bi-direction communication between internet instant messenger and mobile device | |
JP2005353056A (en) | State information synchronizing method of imps client | |
CN111835798B (en) | Communication system capable of chatting with 2G equipment | |
CN101442842A (en) | Virtual terminal server, mobile communication terminal, communication control system, and communication control method | |
US11153240B2 (en) | Method, system and computer program product for selectively adapting and transmitting messaging data | |
CN102256224A (en) | Short message reminding method, equipment and communication system | |
CN114050986B (en) | Signaling tracking method, device, equipment and storage medium | |
CN102572099B (en) | Status query time interval determination method, device and system for mobile terminal | |
KR101065672B1 (en) | Multimedia Answering System | |
KR100495357B1 (en) | method for providing message by use of a feature code and storage medium thereof | |
TW201021531A (en) | Method and related apparatus for managing short messages in a mobile communication system | |
JP2002150457A (en) | Emergency information transmission method | |
CN101026787A (en) | Method for transmitting short message given to telephone numbers to Inter net programme | |
CN1901595B (en) | Method for sending fax to radio fax device | |
KR101690604B1 (en) | Chatting system and method based on wire/wireless web | |
KR100717855B1 (en) | Information transmission system and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |