CN105306338B - Message reminding method and device - Google Patents
Message reminding method and device Download PDFInfo
- Publication number
- CN105306338B CN105306338B CN201410367698.0A CN201410367698A CN105306338B CN 105306338 B CN105306338 B CN 105306338B CN 201410367698 A CN201410367698 A CN 201410367698A CN 105306338 B CN105306338 B CN 105306338B
- Authority
- CN
- China
- Prior art keywords
- data packet
- network data
- application server
- specific application
- 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
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention provides a message reminding method and a device, wherein the method comprises the following steps: intercepting a network data packet sent by a specific application server; analyzing the intercepted network data packet, and judging whether the network data packet contains information indicating that a user logs in; and when the network data packet contains information indicating that the user has logged in, displaying message reminding information. By the method and the device, the user does not need to keep the instant messaging page in the opening state of the foreground during instant messaging, so that other webpages can be browsed or other applications can be operated by using the browser while the instant messaging is carried out, and the user can operate the user terminal more flexibly and more efficiently even during the communication.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a message reminding method and device.
Background
With the popularization and development of the internet, Instant Messaging (IM) has become an important means for people to communicate. The communication tool has the advantages of real-time performance, cross-platform performance, low cost, high efficiency and the like, so that the use ratio of the communication tool in network communication application exceeds that of an electronic mail, and the communication tool becomes a main tool for the current internet communication.
The webpage instant messaging is used for communication on a Web platform, so that the trouble of downloading a client is eliminated, and a good communication interactive interface can be provided for a user. However, due to hardware limitations of some communication terminals, for example, UIWebView (UIWebView is a browser control in the iOS of the apple development operating system, and is used to browse a web page and open a document), offline cache cannot be implemented, and when a web page is used for instant messaging, it is often necessary to keep the browser in the foreground and keep the browser in the open state of a user communication interface. Therefore, other operations can not be performed during the webpage instant messaging, and the use is inconvenient.
Disclosure of Invention
The embodiment of the invention aims to provide a message reminding method and a message reminding device so as to solve the problem that other operations cannot be performed during webpage instant messaging, so that the terminal is inconvenient to use.
The embodiment of the invention provides a message reminding method, which comprises the following steps:
intercepting a network data packet sent by a specific application server;
analyzing the intercepted network data packet, and judging whether the network data packet contains information indicating that a user logs in;
and when the network data packet contains information indicating that the user has logged in, displaying message reminding information.
The embodiment of the present invention further provides a message reminding device, including:
the intercepting module is used for intercepting a network data packet sent by a specific application server;
the analysis module is used for analyzing the intercepted network data packet and judging whether the network data packet contains information indicating that the user logs in;
and the reminding module is used for displaying message reminding information when the network data packet contains information indicating that the user logs in.
Compared with the prior art, the invention has the beneficial effects that: the method and the device of the embodiment of the invention intercept and analyze the network data packet sent by the specific application server at the network layer, so that the receiving of the instant messaging data packet can get rid of the function limitation of a communication terminal browser, and an instant messaging page does not need to be kept in an open state of a foreground, therefore, a user can browse other webpages or operate other applications by using the browser while carrying out instant messaging, thereby leading the user to operate a user terminal more flexibly and more efficiently even in communication.
Drawings
Fig. 1 is a schematic application environment diagram of a message reminding method and apparatus according to an embodiment of the present invention;
fig. 2 is a flowchart of a message reminding method according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a display manner of a message reminding message according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating a display manner of a message reminding message according to an embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating another display manner of a message reminding message according to an embodiment of the present invention;
FIG. 6 is a flow chart of another message alert method according to an embodiment of the present invention;
FIG. 7 is a block diagram of a message alert device according to an embodiment of the present invention;
fig. 8 is a structural diagram of another message reminding apparatus according to an embodiment of the present invention.
Detailed Description
The foregoing and other technical and scientific aspects, features and advantages of the present invention will be apparent from the following detailed description of preferred embodiments, which is to be read in connection with the accompanying drawings. While the present invention has been described in connection with the preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, but is intended to cover various modifications, equivalent arrangements, and specific embodiments thereof.
The embodiment of the invention relates to a message reminding method and a message reminding device, which are used for sending reminding information to a user when receiving a message sent by a specific application server in any using state of the user side. Please refer to fig. 1, which is a schematic diagram of an application environment of the method and apparatus. A user terminal 100, comprising: a memory 102, a memory controller 104, one or more processors (only one shown) 106, a peripheral interface 108, and a network controller 112. It is understood that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the user terminal 100. For example, the user terminal 100 may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 102 may be used to store software programs and modules, such as program instructions/modules corresponding to the message reminding method in the embodiment of the present invention, and the processor 106 executes various functional applications and data processing by executing the software programs and modules stored in the memory 102, so as to implement the method described above.
The memory 102 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 102 may further include memory remotely located from the processor 106, and these remote memories may be connected to the user terminal 100 through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. Access to the memory 102 by the processor 106, and possibly other components, may be under the control of the memory controller 104.
The peripheral interface 108 couples various input/output devices to the processor 106. The processor 106 executes various software, instructions, and data processing within the memory 102. In some embodiments, the peripheral interface 108, the processor 106, and the memory controller 104 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips.
The network controller 112 is used for receiving and transmitting network signals. The network signal may include a wireless signal or a wired signal. In one example, the network signal is a wired network signal. At this time, the network controller 112 may include a processor, a random access memory, a converter, a crystal oscillator, and the like.
The software programs and modules stored in the memory 102 may include: an operating system 122 and a browser engine 124. The operating system 122 may be, for example, LINUX, UNIX, WINDOWS, which may include various software components and/or drivers for managing system tasks (e.g., memory management, storage device control, power management, etc.), and may communicate with various hardware or software components to provide an operating environment for other software components. The browser engine 124 runs on the basis of the operating system 122. Browser engine 124 may be, for example, a Webkit browser engine.
An embodiment of the present invention provides a message reminding method, please refer to fig. 2, which includes the following steps:
s201, intercepting the network data packet sent by the specific application server.
The specific application server is a remote server which communicates with the user side when the user side carries out webpage instant messaging. A Uniform Resource Location (uri) address of the specific application server may be preset, so that the data packet sent by the specific application server may be accurately intercepted according to the set uri address.
Since it is common in communication protocols for the network layer to provide routing and addressing functions, the network packets are intercepted at the network layer.
S202, analyzing the intercepted network data packet, and judging whether the network data packet contains information indicating that the user has logged in.
The purpose of this step is to filter the intercepted network data packet, the data packet sent by the specific application server may contain various contents, and the message to be reminded in the embodiment of the present invention is directed to the web page instant messaging, so whether the intercepted network data packet contains the content that needs to be reminded to the user is judged by detecting whether the data packet contains the information indicating that the user has logged in. If the network packet contains information indicating that the user has logged in, indicating that the network packet contains communication content to be sent to the user, the process proceeds to step S203. If the network data packet does not contain the information indicating that the user logs in, which indicates that the network data packet does not contain the communication content sent to the user, the network data packet is not processed, and the data packet sent by the specific application server is continuously monitored.
The information indicating that the user has logged in is used for judging the login state of the user, for example, the information indicating that the user has logged in may be a contact list, that is, whether the contact list exists in the network data packet is checked in the parsing process, and if so, it is indicated that the user has logged in. Of course, in addition to checking whether the network data packet has information indicating that the user has logged in, the login status of the user may also be determined in other manners, for example, a separate key value indicating the login status of the user is set in the data packet, and the login status of the user is determined by checking the value of the key value.
In addition, in the parsing process, besides the information indicating that the user has logged in, other contents in the network data packet, such as user login state information, the number of message pieces, message contents, and the like, can also be parsed at the same time, so that when the message reminding information is subsequently displayed, the parsed contents can be added to the message reminding information as needed.
S203, when the network data packet contains the information indicating that the user has logged in, displaying message reminding information.
The display mode of the message reminding information may be set as required, for example, a message reminding icon is set on a user interface of the browser, please refer to fig. 3, after the browser is started, a message reminding icon 31 is displayed on the left side, and when the user does not log in, the message reminding icon 31 is displayed in gray. Clicking on the message alert icon 31 may link to an instant messaging page, thereby completing the login process. When the user logs in, the message alert icon 31 is displayed in a set color (e.g., green). When the user side receives an instant message sent by a specific application server, the number of messages which are not read by the user is displayed on the message reminding icon 31, and the message sender or the message type and the like are displayed below the page, as shown in fig. 4, wherein the number "2" is displayed on the message reminding icon 31, which indicates that two instant messages are not read by the user, and the "XXX" displayed below the page indicates the sender of the current message, and the "test" indicates a text message. When the message alert icon 31 is clicked, it may be switched to an instant messaging page for viewing by the user.
For another example, the message reminding information may be directly displayed on the screen in a notification manner, please refer to fig. 5, when the user uses another application program, and when the user receives the instant messaging message sent by the specific application server, the message reminding notification is displayed on the screen, and when the user clicks the notification, the user may directly switch to the instant messaging page of the browser for querying.
Please refer to fig. 6, which is a flowchart illustrating another message reminding method according to an embodiment of the present invention, including the following steps:
s601, intercepting the network request sent to the specific application server.
Only interception can be performed by rewriting the canInitWithRequest methodwww.xxx.com(URL address of specific application server) related request.
S602, resending the intercepted network request to the specific application server through the ASIHTTPRequest.
ASIHTTPRequest is an open source item that is made directly on CFNet (CFNet is a network class library), providing a strong encapsulation of HTTP network traffic. Asittprequest may handle basic interactions with the server.
The network data packet fed back by the specific application server can be intercepted more accurately by intercepting the network request sent to the specific application server and then sending the network request again.
S603, receiving the network data packet returned by the specific application server in real time through ASIHTTPRequest within a certain time period after the network request is sent to the specific application server.
After receiving the network request, the specific application server processes the request, and therefore a delay is inevitably generated between receiving the request and feeding back the data packet, so that when the network request is sent, the timeout time of the request may be changed to an appropriate time period, for example, 60S, that is, the certain time period may be 60S.
S604, analyzing the intercepted network data packet, and judging whether the network data packet has a contact list.
In the instant communication process, the contact list of the user appears in the data packet only under the condition that the user logs in, so that the login state of the user is judged according to the step. The following is part of the content of a network packet:
the received network data packet can be parsed by using a JSONKit (the JSONKit is a library for processing json data and has the advantages of high efficiency and convenience in use), and when the data packet contains a key value: the ContactList, which means that there is a contact list in the data packet, indicates that the login is successful, and then step S605 is performed. Otherwise, the data packet is not processed.
S605, obtaining the information of the message type in the network data packet.
Specifically, in the process of analyzing the network data packet, the key value may be acquired: the MsgType (message list) is obtained by the corresponding value, and the message type is obtained, for example, MsgType represents text information when it is 1, and a picture when it is 3.
And S606, displaying the message reminding information according to the message type. For example, words of test or jpe are displayed in the message reminding information to indicate that the corresponding message is a text message or a picture message, respectively.
The message reminding method provided by the embodiment of the invention can be used for intercepting and analyzing the network data packet sent by the specific application server at the network layer, so that the receiving of the instant messaging data packet can get rid of the function limitation of a communication terminal browser, and an instant messaging page does not need to be kept in an open state of a foreground, therefore, a user can browse other webpages or operate other applications by using the browser while carrying out instant messaging, and the user can operate a user side more flexibly and more efficiently even in communication.
An embodiment of the present invention further provides a message alert device, please refer to fig. 7, which is a structural diagram of a message alert device according to an embodiment of the present invention, the device includes: an interception module 71, a parsing module 72 and a reminder module 73.
The interception module 71 is configured to intercept a network data packet sent by a specific application server. The specific application server is a remote server which communicates with the user side when the user side carries out webpage instant messaging. The Url address of the specific application server can be preset, so that the data packet sent by the specific application server can be accurately intercepted in a network layer according to the set Url address.
The analyzing module 72 is configured to analyze the network data packet intercepted by the intercepting module 71, and determine whether the network data packet contains information indicating that the user has logged in. An important function of the parsing module 72 is to filter the intercepted network data packet, and determine whether the intercepted network data packet has content that needs to be reminded to the user by detecting whether the data packet has information indicating that the user has logged in. In addition to obtaining the information indicating that the user has logged in, the parsing process may also parse other contents in the network data packet, such as user login status information, the number of message pieces, message contents, and the like.
When the analyzing module 72 analyzes that the network data packet contains information indicating that the user has logged in, the reminding module 73 displays message reminding information. The display mode of the message reminding information may be set as required, for example, a message reminding icon may be set on the user interface of the browser, and the reminding module 73 may remind the user to view the instant messaging message by using different display modes of the message reminding icon. For another example, the reminding module 73 can display the message reminding information directly on the screen by way of notification.
Please refer to fig. 7, which is a structural diagram of another message reminding apparatus according to an embodiment of the present invention, in which, compared with the embodiment of fig. 6, the intercepting module 71 of this embodiment further includes: a network request intercepting unit 711, a resending unit 712, and a receiving unit 713. The parsing module 72 of this embodiment further includes: a contact list acquisition unit 721 and a message type acquisition unit 722.
The network request intercepting unit 711 is configured to intercept a network request issued to the specific application server.
The resending unit 712 is configured to resend the network request intercepted by the network request intercepting unit 711 to the specific application server through the asihtttprequest. The network data packet fed back by the specific application server can be intercepted more accurately by intercepting the network request sent to the specific application server and then sending the network request again.
The receiving unit 713 is configured to receive the network data packet returned by the specific application server through the asittprequest. After the resending unit 712 sends the network request, the receiving unit 713 may receive the network data packet sent by the specific application server in real time within a set certain time period (for example, 60S).
The contact list obtaining unit 721 is configured to analyze the intercepted network data packet, and determine whether there is a contact list in the network data packet. In the instant messaging process, the contact list of the user appears in the data packet only if the user has logged in, and thus the contact list acquisition unit 721 determines the login state of the user by detecting the contact list.
The message type obtaining unit 722 is configured to obtain the message type information in the network data packet, so that when the reminding module 73 displays the message reminding information, the message type can be displayed at the same time. For example, words of test or jpe are displayed in the message reminding information to indicate that the corresponding message is a text message or a picture message, respectively.
The message reminding device provided by the embodiment of the invention intercepts and analyzes the network data packet sent by the specific application server at the network layer, so that the receiving of the instant messaging data packet can get rid of the function limitation of a communication terminal browser, and an instant messaging page does not need to be kept in an open state of a foreground, therefore, a user can browse other webpages or operate other applications by using the browser while carrying out instant messaging, and the user can operate a user side more flexibly and more efficiently even in communication.
Through the above description of the embodiments, it is clear to those skilled in the art that the embodiments of the present invention may be implemented by hardware, or by software plus a necessary general hardware platform. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the various implementation scenarios of the embodiments of the present invention.
Although the present invention has been described with reference to a preferred embodiment, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (14)
1. A message reminding method is characterized by comprising the following steps:
intercepting a network request sent to a specific application server based on a uniform resource locator Url address of the specific application server at a network layer;
resending the intercepted network request to the particular application server;
receiving a network data packet returned by the specific application server;
analyzing the received network data packet, and judging whether the network data packet contains information indicating that a user logs in;
and when the network data packet contains information indicating that the user has logged in, displaying message reminding information.
2. The message alert method as claimed in claim 1, wherein the intercepted network request is retransmitted to the specific application server by an asihtttprequest method, and the network packet returned by the specific application server is received by the asihtttprequest method.
3. The message alert method as in claim 1, wherein the step of receiving the network data packet returned by the particular application server comprises: and receiving the network data packet sent by the specific application server in real time within a certain time period after the network request is sent to the specific application server.
4. The message alert method as in claim 3, wherein the certain period of time is 60 s.
5. The message alert method as claimed in claim 1, wherein the step of parsing the intercepted network packet and determining whether there is information indicating that the user has logged in the network packet comprises:
analyzing the intercepted network data packet, and judging whether the network data packet has a contact list or not.
6. The message alert method as in claim 1, wherein the step of parsing the intercepted network packet comprises: and acquiring the information of the message type in the network data packet.
7. A message alert device, comprising:
the intercepting module is used for intercepting a network data packet sent by a specific application server; the interception module comprises:
a network request intercepting unit, configured to intercept, in a network layer, a network request sent to a specific application server based on a uniform resource locator, Url, address of the specific application server;
a resending unit, configured to resend the intercepted network request to the specific application server;
a receiving unit, configured to receive a network data packet returned by the specific application server;
the analysis module is used for analyzing the received network data packet and judging whether the network data packet contains information indicating that a user logs in;
and the reminding module is used for displaying the message reminding information when the network data packet contains information indicating that the user logs in.
8. The message alert device of claim 7,
the resending unit resends the intercepted network request to the specific application server by an ASIHTTPRequest method;
the receiving unit receives the network data packet returned by the specific application server through an ASIHTTPRequest method.
9. The message alert device according to claim 7, wherein the receiving unit receives the network data packet transmitted from the specific application server in real time within a certain time period after the network request is sent to the specific application server.
10. The message reminder apparatus of claim 9, wherein the certain period of time is 60 s.
11. The message alert apparatus as in claim 7, wherein the parsing module further comprises:
and the contact list acquisition unit is used for analyzing the intercepted network data packet and judging whether a contact list exists in the network data packet.
12. The message alert apparatus as in claim 7, wherein the parsing module further comprises:
and the message type acquisition unit is used for acquiring the information of the message types in the network data packet.
13. An electronic device, characterized in that the electronic device comprises:
a memory for storing executable instructions;
a processor, configured to execute the executable instructions to implement the message alert method as claimed in any one of claims 1 to 6.
14. A computer-readable storage medium having stored thereon executable instructions for, when executed, implementing a message alert method as claimed in any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410367698.0A CN105306338B (en) | 2014-07-29 | 2014-07-29 | Message reminding method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410367698.0A CN105306338B (en) | 2014-07-29 | 2014-07-29 | Message reminding method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105306338A CN105306338A (en) | 2016-02-03 |
CN105306338B true CN105306338B (en) | 2020-04-07 |
Family
ID=55203113
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410367698.0A Active CN105306338B (en) | 2014-07-29 | 2014-07-29 | Message reminding method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105306338B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105847112B (en) * | 2016-03-11 | 2020-06-16 | 深圳前海财信云科技有限公司 | Data updating method, client and system |
CN108573002B (en) * | 2017-03-14 | 2022-04-26 | 阿里巴巴集团控股有限公司 | Method and device for providing page information |
CN116841685A (en) * | 2019-05-20 | 2023-10-03 | 腾讯科技(深圳)有限公司 | Page processing method and device and related equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101005463A (en) * | 2006-01-17 | 2007-07-25 | 千橡世纪科技发展(北京)有限公司 | System and method for sending information to table-top system in browsing device net page |
CN103051516A (en) * | 2011-10-17 | 2013-04-17 | 腾讯科技(深圳)有限公司 | Message prompting method and device of instant messaging client |
CN103532824A (en) * | 2012-07-06 | 2014-01-22 | 阿里巴巴集团控股有限公司 | Notification method, browser and server for instant communication message |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8204938B2 (en) * | 2003-02-14 | 2012-06-19 | Devereux Research Ab Llc | System and method for immediate and delayed real-time communication activities using availability data from and communications through an external instant messaging system |
-
2014
- 2014-07-29 CN CN201410367698.0A patent/CN105306338B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101005463A (en) * | 2006-01-17 | 2007-07-25 | 千橡世纪科技发展(北京)有限公司 | System and method for sending information to table-top system in browsing device net page |
CN103051516A (en) * | 2011-10-17 | 2013-04-17 | 腾讯科技(深圳)有限公司 | Message prompting method and device of instant messaging client |
CN103532824A (en) * | 2012-07-06 | 2014-01-22 | 阿里巴巴集团控股有限公司 | Notification method, browser and server for instant communication message |
Also Published As
Publication number | Publication date |
---|---|
CN105306338A (en) | 2016-02-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9961129B2 (en) | Business transaction correlation with client request monitoring data | |
CN112148674B (en) | Log data processing method, device, computer equipment and storage medium | |
US10795629B2 (en) | Text and custom format information processing method, client, server, and computer-readable storage medium | |
US9794242B2 (en) | Method, apparatus and application platform for realizing logon to an application service website | |
US10404633B2 (en) | Enhanced video instant messaging processing | |
US20160080474A1 (en) | Instance backed mobile devices | |
US20150281035A1 (en) | Monitoring of Node.JS Applications | |
CN104852919A (en) | Method and apparatus for realizing portal authentication | |
CN109302340B (en) | Buried point data reporting method and device and computer readable storage medium | |
CN105306338B (en) | Message reminding method and device | |
CN105634929A (en) | Instant messaging method and device based on web page | |
US9106596B2 (en) | Method and apparatus of configuring a data broadcast service | |
US9942177B1 (en) | Method and system for real-time data updates | |
CN112015383A (en) | Login method and device | |
CN110213155B (en) | Communication processing method, communication processing device, related equipment and storage medium | |
KR102196403B1 (en) | Reduced redirection | |
US20180109426A1 (en) | Host pair detection | |
CN111107080B (en) | Error information pushing method, device and equipment and readable storage medium | |
CN112306791B (en) | Performance monitoring method and device | |
CN109756393B (en) | Information processing method, system, medium, and computing device | |
CN103812756B (en) | A kind of method and device of web-based instant messaging | |
EP3151519A1 (en) | An intelligent system of unified content posting | |
CN106937322B (en) | Flow consumption monitoring method and device | |
CN113079055A (en) | Method and device for dynamically acquiring AGV (automatic guided vehicle) running data | |
CN105516017A (en) | Directed acceleration method and device, and terminal equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | 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 |