CN107704491B - Message processing method and device - Google Patents

Message processing method and device Download PDF

Info

Publication number
CN107704491B
CN107704491B CN201710726992.XA CN201710726992A CN107704491B CN 107704491 B CN107704491 B CN 107704491B CN 201710726992 A CN201710726992 A CN 201710726992A CN 107704491 B CN107704491 B CN 107704491B
Authority
CN
China
Prior art keywords
data
browser
push message
message
server
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
CN201710726992.XA
Other languages
Chinese (zh)
Other versions
CN107704491A (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
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 CN201710726992.XA priority Critical patent/CN107704491B/en
Publication of CN107704491A publication Critical patent/CN107704491A/en
Application granted granted Critical
Publication of CN107704491B publication Critical patent/CN107704491B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Abstract

The invention discloses a message processing method and a message processing device. Wherein, the method comprises the following steps: the browser acquires first data pushed by a server; the browser filters the first data to obtain second data, wherein the second data are data which are not stored locally in the browser; the browser creates a first push message indicated by the second data; the browser displays the first push message. The invention solves the technical problem that the browser cannot receive the latest push message.

Description

Message processing method and device
Technical Field
The present invention relates to the field of message processing, and in particular, to a message processing method and apparatus.
Background
At present, with the development of the internet, intelligent push messages based on user behavior records and user behavior big data are more and more common. For example, the desktop operating system and the conventional desktop software have a message pushing function, a message can be pushed through the website definition, and the latest message is fed back to the user in the form of a message prompt, but the message is not pushed by the browser.
As can be seen from the above, the message processing in the prior art is only suitable for being implemented on the desktop side and the desktop software, and has only a simple function of pushing the latest message. The information pushing function of an intelligent browser based on a client browser B/S framework is not continued, and the browser cannot push the latest information.
In view of the above-mentioned problem that the browser in the related art cannot receive the latest push message, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a message processing method and a message processing device, which at least solve the technical problem that a browser cannot receive the latest push message.
According to an aspect of an embodiment of the present invention, a message processing method is provided. The message processing method comprises the following steps: the browser acquires first data pushed by a server; the browser filters the first data to obtain second data, wherein the second data are data which are not stored locally in the browser; the browser creates a first push message indicated by the second data; the browser displays the first push message.
According to another aspect of the embodiment of the invention, a message processing device is also provided. The message processing apparatus includes: the first acquisition unit is used for enabling the browser to acquire first data pushed by the server; the filtering unit is used for enabling the browser to filter the first data to obtain second data, wherein the second data are data which are not stored locally in the browser; a creating unit configured to cause the browser to create a first push message indicated by the second data; a display unit for causing the browser to display the first push message.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium. The storage medium includes a stored program, wherein the program executes the message processing method of the embodiment of the present invention when running.
According to another aspect of the embodiment of the invention, an electronic device is also provided. The electronic device comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, and the processor executes the message processing method of the embodiment of the invention through the computer program.
In the embodiment of the invention, first data pushed by a server is obtained through a browser; the browser filters the first data to obtain second data, wherein the second data are data which are not stored locally in the browser; the browser creates a first push message indicated by the second data; the browser displays the first push message. The browser filters the received push data to obtain data which is not stored locally so as to ensure that the displayed push message is the latest message, thereby achieving the technical effect that the browser receives the latest push message and further solving the technical problem that the browser cannot receive the latest push message.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of a hardware environment for a message processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a message processing method according to an embodiment of the invention;
FIG. 3 is a flowchart of a method for filtering first data by a browser according to an embodiment of the present invention;
FIG. 4 is a flow diagram of another message processing method according to an embodiment of the invention;
fig. 5 is a flowchart of a method for a browser to create a first push message indicated by second data, according to an embodiment of the present invention;
FIG. 6 is a flow diagram of another message processing method according to an embodiment of the invention;
FIG. 7 is a flow diagram of another message processing method according to an embodiment of the invention;
fig. 8 is a flowchart of a method for a browser to display a first push message according to an embodiment of the present invention;
FIG. 9 is a flow diagram of another message processing method according to an embodiment of the invention;
FIG. 10 is a flow diagram of another message processing method according to an embodiment of the invention;
FIG. 11 is a schematic diagram of a data source store according to an embodiment of the present invention;
FIG. 12 is a schematic diagram of a message processing architecture according to an embodiment of the present invention;
FIG. 13 is a schematic diagram of a communication method of message processing according to an embodiment of the present invention;
FIG. 14 is a schematic diagram of another browser displaying push messages in accordance with an embodiment of the present invention;
FIG. 15 is a diagram illustrating a browser displaying push messages, in accordance with an embodiment of the present invention;
FIG. 16 is a diagram of another browser displaying push messages, in accordance with an embodiment of the present invention;
fig. 17 is a schematic diagram of a message processing apparatus according to an embodiment of the present invention; and
fig. 18 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In one embodiment of the present invention, an embodiment of a message processing method is provided.
Alternatively, in this embodiment, the message processing method described above may be applied to a hardware environment formed by the server 102 and the terminal 104 as shown in fig. 1. Fig. 1 is a schematic diagram of a hardware environment of a message processing method according to an embodiment of the present invention. As shown in fig. 1, a server 102 is connected to a terminal 104 via a network including, but not limited to: the terminal 104 is not limited to a PC, a mobile phone, a tablet computer, etc. in a wide area network, a metropolitan area network, or a local area network. The message processing method according to the embodiment of the present invention may be executed by the server 102, or executed by the terminal 104, or executed by both the server 102 and the terminal 104. The message processing method of the embodiment of the present invention executed by the terminal 104 may also be executed by a browser installed thereon.
Fig. 2 is a flow chart of a message processing method according to an embodiment of the present invention. As shown in fig. 2, the method may include the steps of:
in step S202, the browser obtains the first data pushed by the server.
In the technical solution provided by step S202 in the present application, the browser acquires the first data pushed by the server.
In this embodiment, the browser and the server first establish a communication connection, and may establish communication with the server through a Web Notifications interface. The Web Notifications interface can enable a Web page to directly pop up a message dialog box on a browser and display a Web page message, for example, the Web notification interface is used for pushing messages on message processing websites such as instant messaging and e-mails.
After the browser establishes a communication connection with the server, the browser obtains first data pushed by the server, where the first data may be push data sent by an application to the browser through the server, for example, push data sent by an instant messaging application to the browser through the server, and is used to generate a message pushed by the server to the browser. The browser puts the first data pushed by the server into a preset cache data pool, and may receive and store the first data in the cache data pool through a data thread, for example, receive and store the first data through a rendering thread.
And step S204, the browser filters the first data to obtain second data.
In the technical solution provided in the foregoing step S204 of the present application, the browser performs filtering processing on the first data to obtain second data, where the second data is data that is not locally stored in the browser.
After the browser establishes a communication connection with the server, the script and the data source are loaded in advance. The script provides a processable file for the information processing method, the data source is used by the script, and the data source may request the server for obtaining a multidirectional data source in real time through a preset protocol, for example, the multidirectional data source may be obtained by requesting the server for obtaining the multidirectional data source in real time through a webscoket protocol, where the webscoket protocol is a new protocol in HyperText Markup Language (HTML), and it implements full duplex communication between the browser and the server, and the multidirectional data source may be from a news System, an Automatic Management System (AMS), an advertisement System, and the like, which are not limited herein.
After the browser acquires the first data pushed by the server, the browser performs filtering processing on the first data to obtain second data which is not locally stored in the browser, and the first data can be compared by using the data source through the data thread to perform filtering processing on the first data, for example, data corresponding to messages which are clicked and browsed before by a user in the first data are filtered to obtain second data which is the latest data pushed to the browser by the server, and the second data is stored.
Optionally, in the process of communicating with the server, the browser in this embodiment may implement a large number of tasks in parallel in the background, for example, when the browser has not received the push data of the server, the background may process other data, when the data needs to be updated, if the browser has not received an operation of the user, for example, an operation of receiving no download message is received, the operation is not executed, after the operation of the user is received, the operation may be executed to update the data, the push message of the server may be received again subsequently, and an operation behavior of the user is submitted, so that a response speed of the front end to the push message is improved.
Optionally, the server may analyze the historical browsing records of the user to obtain information of interest to the user, and the browser receives data corresponding to the information of interest to the user, which is pushed by the server, so that the user experience is improved, and the utilization rate of system resources is also improved.
Optionally, in this embodiment, the browser performs filtering processing on the first data through a Local Storage interface (Local Storage), and the Local Storage interface does not need a plug-in, so that the browser can perform filtering processing on the first data faster, which is beneficial to rendering a webpage and improves the utilization rate of the system.
In step S206, the browser creates a first push message indicated by the second data.
In the technical solution provided by step S206 described above in this application, the browser creates a first push message indicated by the second data.
After the browser performs filtering processing on the first data to obtain the second data, the browser creates a first push message indicated by the second data, where the first push message may be a notification message pushed by a server, for example, a notification message for an application pushed by the server. The browser may construct the second data according to a preset function, for example, construct the second data through a Notification (Notification) function, construct a title in the first push message, and construct an option for enhancing the Notification, for example, an icon, a text body, and the like, which is not limited herein.
In step S208, the browser displays the first push message.
In the technical solution provided in the foregoing step S208 of the present application, the browser displays the first push message.
After the browser creates the first push message indicated by the second data, the browser displays the first push message, and once the first push message is created, the first push message is immediately displayed at a preset position of a page of the browser, for example, a lower left corner of the page. The first push message displayed by the browser may be used to indicate a notification message of the browser, for example, a push message indicating that the browser is currently available for use. The method can also be used for prompting whether the user receives the notification message, for example, whether the application program is allowed to send the notification message to the desktop is prompted, the user can select options of 'allow', 'disallow', 'say later' and the like to further confirm, the pushed messages read by the user can be displayed, and the number of the pushed messages which are not read by the user is displayed, so that the purpose of displaying the pushed messages by the browser is achieved, and the user experience is improved.
Through the steps S202 to S208, first data pushed by the server is acquired through the browser; the browser filters the first data to obtain second data, wherein the second data are data which are not stored locally in the browser; the browser creates a first push message indicated by the second data; the browser displays the first push message. The browser filters the received push data to obtain data which is not stored locally so as to ensure that the displayed push message is the latest message, thereby achieving the technical effect that the browser receives the latest push message and further solving the technical problem that the browser cannot receive the latest push message.
As an optional implementation manner, in step S204, the filtering, by the browser, the first data to obtain the second data includes: the browser filters data included in the locally stored third data from the first data to obtain second data.
Fig. 3 is a flowchart of a method for filtering first data by a browser according to an embodiment of the present invention. As shown in fig. 3, the method comprises the steps of:
in step S301, the browser obtains the third data locally stored in the browser.
In the technical solution provided in the foregoing step S301 in the present application, the browser acquires third data locally stored in the browser.
After the browser acquires the first data pushed by the server, the browser acquires locally stored third data, where the third data is data loaded into the browser after a communication connection between the browser and the server is opened, and may be data obtained based on a historical operation behavior of a user, for example, data corresponding to a pushed message clicked by the user, data corresponding to a certain type of message that the user is interested in, and data from a news system, an automatic management system AMS activity system, and an advertisement system, and this is not limited here. This third data may be used by a script in the message processing method of this embodiment.
In step S302, the browser filters data included in the third data from the first data to obtain second data.
In the technical solution provided in the foregoing step S302 of the present application, the browser filters data included in the third data from the first data to obtain the second data.
After the browser acquires third data locally stored in the browser, the browser filters data included in the third data from the first data to obtain second data, the browser can filter data included in the third data from the first data through a Local Storage interface, and can filter data included in the third data from the first data from a cache pool through a recognition thread to obtain the latest data pushed to the browser by the server.
In the embodiment, the third data stored locally in the browser is acquired through the browser; the browser filters data included in the third data from the first data to obtain second data, so that the purpose that the browser filters the first data to obtain the second data is achieved, and the browser further creates a first push message indicated by the second data; the browser displays the first push message, so that the technical effect that the browser receives the latest push message is achieved, and the technical problem that the browser cannot receive the latest push message is solved.
As an optional implementation manner, before the browser acquires the third data stored locally in the browser in step S301, the method further includes: the browser sends a first request to the server; the browser acquires the data source and stores the data source to the local of the browser.
Fig. 4 is a flow chart of another message processing method according to an embodiment of the present invention. As shown in fig. 4, the method comprises the steps of:
in step S401, the browser sends a first request to the server.
In the technical solution provided in the foregoing step S401 of the present application, before the browser acquires third data locally stored in the browser, the browser sends a first request to the server, where the first request is used to request the server to send a data source including the third data.
Before the browser acquires the third data stored locally in the browser, the browser sends a first request to the server, where the first request may be used to request the server to send a data source and a script including the third data in advance, so that the browser loads the data source and the script in advance, where the data source is used by the script in the message processing method of the embodiment.
Optionally, the data source is a multi-directional data source, and may be a data source from a news system AMS campaign system, an advertisement system, and the like, without limitation. The first request is for requesting the server to send a data source from a news system, AMS campaign system, advertising system, etc. The data source may include data that is not of interest to the user for filtering out data included in the data source in the first data.
Step S402, the browser acquires a data source and stores the data source to the local of the browser.
In the technical solution provided by step S402, the browser obtains the data source, and stores the data source to the local of the browser.
After the browser sends the first request to the server, the server receives and responds to the first request to obtain a data source, the data source is sent to the browser, the browser obtains the data source, an engine of the data source is analyzed, data in the data source is analyzed, the data obtained through analysis are collected and stored in a warehouse, and the data source is stored to the local of the browser.
Optionally, after the browser acquires the data in the news system, the automatic management system AMS activity system, and the advertisement system, the engine used by the browser is analyzed, the data in the news system, the automatic management system AMS activity system, and the advertisement system is analyzed, the data is summarized, then sorted and stored in a warehouse, and the data is loaded through configured parameters, so that loading of multiple data sources is realized, and the loaded data sources may include data corresponding to messages that have been clicked and browsed by the user before. The configuration parameter may be information related to a data source, such as column information and website information pushed by a server, which is not limited herein.
The embodiment sends a first request to the server by the browser before the browser acquires third data stored locally in the browser, wherein the first request is used for requesting the server to send a data source including the third data; the browser acquires a data source and stores the data source to the local of the browser, the browser filters data included in the data source from the first data to obtain second data, and a first push message indicated by the second data is created; the browser displays the first push message, so that the technical effect that the browser receives the latest push message is achieved, and the technical problem that the browser cannot receive the latest push message is solved.
As an optional implementation manner, in step S202, the acquiring, by the browser, the first data pushed by the server includes: the browser acquires and stores first data pushed by the server through a first data thread; step S204, the browser performs filtering processing on the first data to obtain second data, including: and the browser filters the first data through a second data thread to obtain second data, wherein the second data thread is different from the first data thread.
The data thread is a single sequential control flow in a program, and the multiple data threads complete different work for simultaneously operating multiple threads in a single program. When the browser acquires the first data pushed by the server, the browser acquires and stores the first data pushed by the server through a first data thread, which may be a rendering thread, for receiving and storing the first data.
Optionally, after the Web Notification communication is opened between the browser and the server, the rendering thread stores the first data pushed by the server from the cache data pool.
When the browser filters the first data to obtain second data, the browser may filter the first data through a second data thread, where the second data thread may be an identification thread and is used to filter the first data and display the push identifier. The second data thread is different from the first data thread, so that the storage of the first data and the filtering processing of the first data can be realized in parallel, and the problems of low display and low performance of a low-end browser are solved, thereby ensuring that the message processing method can be smoothly carried out on a low-end machine, and improving the user experience.
In the embodiment, the browser acquires and stores the first data pushed by the server through the first data thread to realize that the browser acquires the first data pushed by the server, the browser filters the first data through the second data thread to obtain the second data to realize that the browser filters the first data to obtain the second data, and the browser further creates the first push message indicated by the second data; the browser displays the first push message, so that the technical effect that the browser receives the latest push message is achieved, and the technical problem that the browser cannot receive the latest push message is solved.
As an alternative implementation, in step S206, the browser creating the first push message indicated by the second data includes: the browser constructs the second data through a preset function to obtain title information in the first push message, wherein the title information is used for indicating a title of the first push message; and/or the browser constructs the second data through a preset function to obtain option information in the first push message, wherein the option information is used for displaying the first push message.
Fig. 5 is a flowchart of a method for creating a first push message indicated by second data by a browser according to an embodiment of the present invention. As shown in fig. 5, the method comprises the steps of:
step S501, the browser constructs the second data through a preset function, so as to obtain the header information in the first push message.
In the technical solution provided in the foregoing step S501 of the present application, the browser constructs the second data through a preset function, and obtains title information in the first push message, where the title information is used to indicate a title of the first push message.
After the browser filters the first data to obtain second data, the browser constructs the second data through a preset function, where the preset function is a function for constructing data pushed by a server to generate a push message of the server, for example, the preset function is a notify construction function. The constructor may be used to construct the header information displayed in the second push message to allow the user to quickly clarify the subject matter of the first push message.
Step S502, the browser constructs the second data through a preset function to obtain option information in the first push message.
In the technical solution provided in the foregoing step S502 of the present application, the browser constructs the second data through a preset function to obtain option information in the first push message, where the option information is used to display the first push message.
And after the browser filters the first data to obtain second data, the browser constructs the second data through a preset function to obtain option information in the first push message. For example, the option information is icon format icon, which can be used for system icon, software icon, etc., and such icon extension is x-icon, x-ico. The option information may also be a text body, which defines the body of the document and contains all the contents of the document, such as text, hyperlinks, images, tables, lists, and the like.
According to the embodiment, the browser constructs the second data through a preset function to obtain the title information in the first push message, wherein the title information is used for indicating the title of the first push message; and/or the browser constructs the second data through a preset function to obtain option information in the first push message, wherein the option information is used for displaying the first push message, the purpose that the browser creates the first push message indicated by the second data is achieved, and the browser further displays the first push message, so that the technical effect that the browser receives the latest push message is achieved, and the technical problem that the browser cannot receive the latest push message is solved.
As an optional implementation manner, after the browser displays the first push message in step S208, the method further includes: the browser triggers a preset event corresponding to the received preset operation executed on the first push message.
Fig. 6 is a flow chart of another message processing method according to an embodiment of the present invention. As shown in fig. 6, the method further comprises the steps of:
in step S601, the browser receives a preset operation performed on the first push message.
In the technical solution provided in the foregoing step S601 of the present application, the browser receives a preset operation performed on the first push message.
After the browser creates the first push message, the browser immediately displays the first push message, and the browser receives a preset operation executed on the first push message. Optionally, the browser receiving the preset operation performed on the first push information includes at least one of: the browser receives display operation executed on the first push information, wherein the display operation is used for indicating and displaying the first push information; the browser receives a click operation executed on the first push information, wherein the click operation is used for indicating that the first push information is clicked; the browser receives a closing operation performed on the first push information, wherein the closing operation is used for indicating to close the first push information, namely, the first push message exits from the display.
Step S602, the browser triggers a preset event corresponding to a preset operation.
In the technical solution provided in the foregoing step S602 of the present application, the browser triggers a preset event corresponding to a preset operation, where the preset event is used to track a current state of the first push message.
After the browser receives a preset operation performed on the first push message, in order to track the current state of the first push message, the browser triggers a preset event corresponding to the preset operation. For example, when a first push message is displayed to the user, the browser triggers a display event (show); a click event (click) is triggered when the user clicks on the first push message. When the first push message is closed, the browser triggers a close event (close); when the first push message is in error, the browser triggers an error event (error), which is typically triggered by the browser when the first push message cannot be displayed for some reason.
In the embodiment, after the browser displays the first push message, the browser receives a preset operation performed on the first push message, wherein the preset operation is used for tracking the current state of the first push message; the browser triggers a preset event corresponding to the preset operation, so that the purpose of tracking the current state of the first push message is achieved.
As an optional implementation manner, after the browser displays the first push message in step S208, the method further includes: under the condition that a second push message which has identification information and is not displayed by the browser exists locally in the browser, replacing the second push message with a first push message; and under the condition that a second push message which has identification information and is displayed by the browser exists locally in the browser, closing the second push message and displaying the first push message.
Fig. 7 is a flowchart of another message processing method according to an embodiment of the present invention. As shown in fig. 7, the method further comprises the steps of:
in step S701, the browser adds identification information to the first push message.
In the technical solution provided by step S701 above in this application, the browser adds identification information to the first push message.
When the browser displays the push messages of the server, when a large number of push messages of the server are displayed, and when push messages which are already viewed by the user or are not interested exist in the large number of push messages, the browser can also cause annoyance to the user, and further user experience is influenced. For example, if the instant messaging application prompts the user for each incoming message through the server, the browser displays a large number of pushed messages. To avoid flooding the desktop with a large number of push messages, a queue of pending messages needs to be taken over.
Optionally, after the browser displays the first push message, the browser adds identification information to the first push message, where the identification information is used to mark the first push message, and optionally, push messages of the same type or the same type have the same identification.
Step S702, replace the second push message with the first push message.
In the technical solution provided in the above step S702 of the present application, in the case that a second push message which has identification information and is not displayed by the browser exists locally in the browser, the second push message is replaced with the first push message.
After the browser adds the identification information to the first push message, if a second push message pushed to the browser by a server before also has the same identification information and is not yet displayed by the browser, the first push message will replace the second push message and can be displayed by the browser.
Step S703, the second push message is closed, and the first push message is displayed.
In the technical solution provided in the above step S703, when the second push message that has identification information and is displayed by the browser exists locally in the browser, the second push message is closed, and the first push message is displayed.
After the browser adds the identification information to the first push message, if a second push message pushed to the browser by a server before also has the same identification information and is displayed by the browser, closing the second push message and displaying the latest first push message.
Optionally, the push message displayed by the browser may be a push message generated by an application, for example, a notification message generated by an instant messaging application, and as the case may be, there are two ways to notify that a click event occurs, and in a case where a program of the application is not closed or is shifted to the background, the browser receives a click event, and in other cases, the browser receives a system message.
The embodiment adds the identification information to the first push message by the browser after the browser displays the first push message; under the condition that a second push message which has identification information and is not displayed by the browser exists locally in the browser, replacing the second push message with a first push message; under the condition that the second push message which has identification information and is displayed by the browser exists locally in the browser, the second push message is closed, and the first push message is displayed, so that the effect that the browser displays a large number of push messages is avoided.
As an alternative embodiment, the step S208, the displaying the first push message by the browser includes: and the browser calls and displays the adjusted first push message at a preset position.
Fig. 8 is a flowchart of a method for displaying a first push message by a browser according to an embodiment of the present invention. As shown in fig. 8, the method comprises the steps of:
step S801, the browser adjusts the first push message to obtain the adjusted first push message.
In the technical solution provided in the foregoing step S801 of the present application, the browser adjusts the first push message to obtain the adjusted first push message.
After the browser creates the first push message indicated by the second data, the browser adjusts the first push message, and the adjusted first push message can be obtained by adjusting the first push message through hypertext markup language (HTML), Cascading Style Sheets (CSS), and transliteration scripting language (JavaScript, JS). The cascading style sheet CSS is a computer language that uses HTML or a subset XML of the standard universal markup language to express a file style, and the transliteration script language JS is a dynamic type, weak type, prototype-based language, and has a built-in support type.
Step S802, the browser calls and displays the adjusted first push message at a preset position.
In the technical solution provided in the above step S802 of the present application, the browser calls and displays the adjusted first push message at a preset position.
After the first push message is adjusted by the browser, the adjusted first push message is obtained, the browser is called, and the adjusted first push message is displayed at a preset position of a page of the browser, for example, the first push message displayed by the browser can be used for indicating a notification message of the browser, and can also be used for prompting a user whether to receive the notification message, for example, whether to allow an application program to send the notification message to a desktop, and the number of the push messages read by the user and the number of the push messages not read can be displayed, so that the purpose of displaying the push message by the browser is achieved, and user experience is improved.
As an optional implementation manner, after the browser displays the first push message in step S208, the method further includes: and the browser modifies the locally stored data of the browser to obtain fourth data, wherein the fourth data comprises second data, and the fourth data is used for filtering fifth data pushed by the server.
After the browser displays the first push message, the browser modifies locally stored data of the browser, namely, the browser rewrites the stored data corresponding to the Local Storage interface according to the second data, the second data is added to the locally stored data to obtain fourth data, wherein the second data becomes historical push data of the server, the first push message becomes historical push message of the server, and is used for comparison and feedback of push data of a subsequent server, and when Local interaction is performed, relevant information submitted to the server is fed back. Optionally, the browser acquires fifth data pushed by the server; the browser acquires locally stored fourth data of the browser; the browser filters data included in the fourth data from the fifth data to obtain sixth data, wherein the sixth data are data which are not stored locally in the browser; the browser creates a third push message indicated by the sixth data; the browser displays the third push message, so that the technical effect that the browser receives the latest push message is achieved, and the technical problem that the browser cannot receive the latest push message is solved.
According to the embodiment, the data source is loaded in advance, the push data is captured in real time through the Web Notifications interface, the push data is compared with the Local data through the Local Storage interface, the push data is filtered, and the push message is identified, so that the aim of displaying the latest push message by the browser is fulfilled, and the phenomenon that a large amount of push messages are displayed by the browser is avoided; the embodiment is matched with system monitoring and data submission feedback to feed back push messages to different users, so that the message reminding function of the browser is realized. In addition, the embodiment uses the HTML5 technology to push the message processing method of the embodiment under multiple terminals and cross-platform, and feeds back the message in real time; the embodiment utilizes two data threads to solve the problems of low display and performance of the low-end browser, thereby ensuring that the message processing method can be smoothly carried out on the low-end machine and improving the user experience; the data feedback and latest information quick acquisition path of the embodiment can be suitable for a method for acquiring push messages of multiple terminals, including browsers such as desktop PC terminals and mobile terminal devices.
According to the embodiment, the browser realizes the function of filtering the push messages in a mode of combining the Web Notifications interface and the Local Storage interface, a good message pushing effect is achieved, and the user can quickly obtain the push messages through timely message prompt, so that the user experience is improved, the method is suitable for message feedback of multiple terminals, and the effect of intelligently and quickly showing the prompt messages on the multiple terminals is achieved.
In another embodiment of the present invention, the technical solution of the present invention will be described with reference to preferred embodiments.
In the embodiment, the intelligent message pushing of the browser has important significance for the intelligent message pushing of the B/S framework of the client browser, and has real-time property, intelligent pushing property and historical record screening property for the Internet age, particularly the mobile Internet age. The history record filtering is to record a message previously pushed to the user, an operation behavior of the user on the pushed message, and the like.
In view of the importance of message pushing at a browser end, the embodiment uses a Web page notification Web Notifications interface to obtain the pushed data of a server on the basis of the HTML5 technology, and uses a Local Storage interface to load a universal news data source in advance, so that the pushed data can be filtered on a B/S framework of a client browser, the latest pushed message sent by the server end in real time is displayed, and then the user feeds back the pushed message, such as clicking, viewing, marking and the like, so as to obtain good message feedback of the user, improve user experience, enable the user to receive the latest message pushed by the server in time, and facilitate the reinforcement of personal center communities in the era of mobile internet.
The embodiment loads a script and a data source in advance, wherein the script is a file required by the message processing method of the embodiment, and the data source is used by the script. After loading the script and data, the push data is captured in real time and compared with stored data that locally includes the data source. Optionally, the pushed data of the server is acquired through a Web notification interface, the pushed data is compared with Local stored data through a Local Storage interface, and submission and feedback of the data are performed in cooperation with user operation monitored by the system, so that push messages fed back to different users through an HTML5 technology are fed back, and a message reminding function of the desktop is achieved.
The embodiment enables the browser to push messages under multiple terminals and cross-platform by using the HTML5 technology, and specifically, the problem of historical data filtering can be solved by comparing the push data of the server with the locally stored data, and the push messages indicated by the filtered data are displayed, and the feedback of the user to the push messages is received in real time. For some browsers which do not support the HTML5 technology, only the pop-up message is generated on the current webpage of the browser, so as to solve the problems of presentation and performance of the low-end machine of the low-end browser, and thus, smooth message pushing on the low-end machine is ensured.
Fig. 9 is a flowchart of another message processing method according to an embodiment of the present invention. As shown in fig. 9, the method includes the steps of:
step S901, start Web Notifications interface communication.
And starting Web Notifications interface communication between the browser and the server. The Web Notifications interface can enable a Web page to directly pop up a message dialog box on a browser and display Web page messages, such as message push on message processing websites of instant messaging applications, e-mails and the like.
Step S902, send a request to the server in advance, and load the data source.
After the Web Notifications interface communication is started, the browser sends a request to the server in real time through a WebSocket protocol, and the WebSocket protocol realizes the full duplex communication between the browser and the server. The request is used for requesting the server to obtain a data source, wherein full-duplex communication between the browser and the server is realized. The data source may be from a news system, an automated management system AMS, an advertising system, and the like, without limitation. The server receives the request, responds to the request, and sends a data source to the browser. After receiving the data source, the browser sorts the data into a warehouse through data collection and then arrangement, and loads the multidirectional data source and a script corresponding to the data source through related information configured by the data source.
Fig. 10 is a flowchart of another message processing method according to an embodiment of the present invention. As shown in fig. 10, the method further comprises the steps of:
step S1001, starts Web Notifications interface communication.
Before receiving the push data sent by the server, the browser establishes Web Notifications interface communication with the server.
Step S1002, store the push data to the cache pool.
After the communication of the Web Notifications interface is started, the browser stores the received push data into a specified cache pool, and the cache pool is also a cache data pool.
And step S1003, starting a rendering thread.
After the browser stores the received pushed data into the designated cache pool, a data thread which is used for receiving and storing the data is started, namely, a rendering thread is started.
Step S1004, store the push data.
After the rendering thread is started, the pushed data is stored.
In step S1005, the identification thread is started.
And after the browser stores the received push data into the appointed cache pool, starting a data thread for filtering and displaying feedback with the push mark, namely starting an identification thread.
Optionally, in the process of communicating with the server, the browser in this embodiment may implement a large number of tasks in parallel in the background, for example, when the browser has not received the push data of the server, the background may process other data, when the data needs to be updated, if the browser has not received an operation of the user, for example, an operation of receiving no download message is received, the operation is not executed, after the operation of the user is received, the operation may be executed to update the data, the push message of the server may be received again subsequently, and an operation behavior of the user is submitted, so that a response speed of the front end to the push message is improved.
Optionally, the server may analyze the historical browsing records of the user to obtain information of interest to the user, and the browser receives data corresponding to the information of interest to the user, which is pushed by the server, so that the user experience is improved, and the utilization rate of system resources is also improved.
And step S1006, comparing and storing.
The push data of the server is compared with the local storage data of the browser to filter the data in the push data, wherein the data include the local storage data, so that the filtered data are obtained, and then the filtered data are stored, and the directional comparison of the data is realized.
Optionally, the embodiment performs data communication between the browser and the server through a WebSocket protocol to perform real-time feedback, and implements Local information Storage and received data filtering comparison through a Local Storage interface.
Step S1007, the data is confirmed to be the latest pushed data.
And after storing the filtered data, confirming that the filtered data is the latest pushed data.
Step S1008, style model integration is carried out on the latest pushed data to obtain a push message.
After confirming that the data is the latest pushed data, the latest pushed data is subjected to style model integration, and a push message indicated by the latest pushed data can be constructed by using a notification constructor. This constructor requires a title to be displayed in the push message and options to enhance the notification, such as icon format with an extension of icon, ico, or text body, etc.
In step S1009, the push message is popped up and displayed.
And after the latest pushed data is subjected to style model integration to obtain a push message, popping up and displaying the push message.
FIG. 11 is a diagrammatic representation of a data source store in accordance with an embodiment of the present invention. As shown in FIG. 11, the script and data source are loaded in advance. The data source of the embodiment is a multi-directional data source, and the data source is from a news system AMS activity system and an advertisement system. The first request is for requesting the server to send a data source from a news system, AMS campaign system, advertising system, etc. After data of data sources of systems such as a news system, an AMS activity system, an advertisement system and the like are obtained, an engine of the data source is analyzed, the data in the data source is analyzed, the data are summarized, loading of a plurality of data sources is realized through loading of configured parameters under the condition that a user agrees to loading, and the loaded data sources can comprise data corresponding to messages clicked and browsed by the user before. The configuration parameter may be information related to a data source, such as column information and website information pushed by a server, which is not limited herein.
Optionally, the data source includes data that is not of interest to the user for filtering out data included in the data source in the first data.
Fig. 12 is a schematic diagram of a message processing structure according to an embodiment of the present invention. As shown in fig. 12, the application is an application program for receiving a push message of a server, and the application includes a push notification message framework connected to a push client for receiving the push message transmitted by the push client. The push client is connected with a push notification server for pushing notification messages through a communication protocol between the client and the server, the communication protocol can be a WebSocket protocol, and the push notification server and the Web server are communicated through the communication protocol between the server and the server. Under the condition that communication connection is established between the push client and the push notification server and between the push notification server and the Web server, the Web server pushes the latest message to the push client through the push notification server, and the push client can execute the message processing method of the embodiment of the invention through the notification message frame so as to realize the purpose of pushing the latest message.
The push message of the server may be a notification message, and in this embodiment, after the push data is filtered, a notification message corresponding to the filtered data is created, and the filtered data may be constructed by using a notify construction function. This constructor requires a title to be displayed within the notification and some options to enhance the notification, such as icon format, or text body.
Once the notification message is created, the notification message is immediately displayed. To track the current state of the notification message, four events may be triggered at the notification instance level. For example, a show event, triggered when a notification message is displayed to a user; a click event, triggered when a user clicks on a notification message; a close event, triggered when the notification message is closed; an error event, which is triggered when an error occurs in the notification message, and this is usually the case when the notification message cannot be displayed normally for some reason.
In this embodiment, displaying a large number of notification messages may degrade the user experience. For example, if an instant messaging application prompts the user for each incoming message, there may be hundreds of unnecessary notification messages that flood the user's desktop. To avoid hundreds of unnecessary notifications from flooding a user's desktop, a queue of pending messages needs to be taken over.
Therefore, a flag is added to the created new notification message. If another notification message has been displayed with the same label, the new notification message replaces the notification message with the same label. If another notification message has the same mark and is already displayed, closing the notification message with the same mark and displaying a new notification message.
Fig. 13 is a diagram of a communication method of message processing according to an embodiment of the present invention. As shown in fig. 13, the browser and the server communicate with each other through a WebSocket protocol, the browser sends a Close frame (Close frame) to the server when closing the notification message, and after receiving the Close frame, the server responds to the Close frame to obtain a response Close frame, that is, allows the browser to Close the push message. The server sends a response closing data frame to the browser, the browser closes the push message after receiving the response closing data frame, and the browser and the server do not communicate through a WebSocket protocol any more.
Alternatively, when a user clicks on a notification message generated by an application, there will be two ways of being informed of the occurrence of the click event, as the case may be. If the application is not closed or goes to background, a click event is received. In other cases, a system message may be received.
When the browser of the embodiment performs content style push presentation of the notification message, the browser adjusts and calls the notification message through an HTML/CSS cascading style sheet/JS transliteration script language.
Fig. 14 is a schematic diagram of another browser displaying a push message according to an embodiment of the present invention. As shown in fig. 14, the notification message of the IE browser is displayed, for example, the displayed notification message is "IE Web Notifications", and the current browser that is valid at present, for example, "Now available for internet Explorer", can also be displayed, so that the purpose of displaying the push message by the browser is achieved, and the user experience is further improved.
Fig. 15 is a schematic diagram of a browser displaying a push message according to an embodiment of the present invention. As shown in fig. 15, a push message sent by the server is displayed at a preset position of the browser page, "Do you wave desktop notifications, org to send you desktop notifications? ". In addition, whether the application program is allowed to send the notification message to the desktop is also displayed, the user can select options such as "low", "Deny", "Not Now" to further confirm, and the number of pushed messages read by the user and the number of pushed messages Not read by the user can also be displayed, so that the purpose of displaying the pushed messages by the browser is achieved, and the user experience is further improved.
Fig. 16 is a schematic diagram of another browser displaying a push message according to an embodiment of the present invention. As shown in fig. 16, the page of the browser displays the pushed messages that have not been read by the user, for example, the pushed messages (Notifications) that have been read by the user are identified by a first color identifier, which may be gray, the pushed messages that have not been read by the user are identified by a second color identifier, the pushed messages that have not been read can be identified by highlight red, and the number of unread messages is displayed, for example, 10. When the user operates the button corresponding to the second color identifier, the unread push message can be viewed, so that the purpose of displaying the push message by the browser is achieved, and the user experience is further improved.
The embodiment may also notify the modification of the local data thread. After the user selects and receives the push information of the server, the Local Storage data is rewritten, which can be used for comparison feedback of data pushed by a subsequent server, and relevant information submitted to the server is fed back during Local interaction, for example, an operation message of the user on the push information is submitted to the server.
According to the embodiment, the data source is loaded in advance, the pushed data is captured in real time through the Web Notifications interface, the pushed data is compared with the Local data through the Local Storage interface, the pushed data is filtered, the Local stored data can be identified through the Local Storage interface, the system is matched with the operation behavior of a user on the pushed message, data submission feedback is carried out, and the pushed message is fed back to different users. According to the embodiment, the information pushing can be carried out under multiple terminals and cross-platform conditions by using the HTML5 technology, two data threads are used for realizing data bidirectional judgment, the problem of historical data filtering is solved by real-time feedback, for some browsers which do not support the HTML5 technology, a popup message is only generated on the current webpage of the browser, the problems of display and performance of low-end machines of the low-end browsers are solved, the information pushing can be smoothly carried out on the low-end machines, good experience is brought to users, a way for the users to quickly acquire the pushed information is realized, and the method is suitable for multiple terminals including desktop PC terminals, mobile terminal equipment and the like.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In another embodiment of the present invention, a message processing apparatus for implementing the message processing method is also provided. Fig. 17 is a schematic diagram of a message processing apparatus according to an embodiment of the present invention. As shown in fig. 17, the apparatus may include: a first acquisition unit 10, a filtering unit 20, a creation unit 30 and a display unit 40.
A first obtaining unit 10, configured to enable the browser to obtain the first data pushed by the server.
And the filtering unit 20 is configured to enable the browser to filter the first data to obtain second data, where the second data is data that is not stored locally in the browser.
A creating unit 30 for causing the browser to create the first push message indicated by the second data.
A display unit 40 for causing the browser to display the first push message.
It should be noted that the first obtaining unit 10 in this embodiment may be configured to execute step S202 in embodiment 1 of this application, the filtering unit 20 in this embodiment may be configured to execute step S204 in embodiment 1 of this application, the creating unit 30 in this embodiment may be configured to execute step S206 in embodiment 1 of this application, and the displaying unit 40 in this embodiment may be configured to execute step S208 in embodiment 1 of this application.
Optionally, the filtering unit 20 comprises: the device comprises a first acquisition module and a first filtering module. The first obtaining module is used for the browser to obtain locally stored third data of the browser; and the first filtering module is used for filtering the data included in the third data from the first data by the browser to obtain second data.
Optionally, the apparatus further comprises: a sending unit and a second acquiring unit. The sending unit is used for enabling the browser to send a first request to the server before the browser obtains third data locally stored in the browser, wherein the first request is used for requesting the server to send a data source comprising the third data; and the second acquisition unit is used for enabling the browser to acquire the data source and storing the data source to the local of the browser.
Optionally, the first obtaining unit 10 includes: the second acquisition module is used for enabling the browser to acquire and store the first data pushed by the server through the first data thread; the filter unit 20 includes: and the second filtering module is used for enabling the browser to filter the first data through a second data thread to obtain second data, wherein the second data thread is different from the first data thread.
Optionally, the creating unit 30 includes: the first construction module is used for enabling the browser to construct the second data through a preset function to obtain the title information in the first push message, wherein the title information is used for indicating the title of the first push message; and/or the second constructing module is used for enabling the browser to construct the second data through a preset function to obtain option information in the first push message, wherein the option information is used for displaying the first push message.
Optionally, the apparatus further comprises: the device comprises a receiving unit and a triggering unit. The receiving unit is used for enabling the browser to receive preset operation executed on the first push message after the browser displays the first push message; and the triggering unit is used for enabling the browser to trigger a preset event corresponding to the preset operation, wherein the preset event is used for tracking the current state of the first push message.
Optionally, the apparatus further comprises: an adding unit, a replacing unit and a closing unit. The adding unit is used for enabling the browser to add identification information to the first push message after the browser displays the first push message; the replacing unit is used for replacing the second push message which has the identification information and is not displayed by the browser into the first push message under the condition that the second push message exists locally in the browser; and the closing unit is used for closing the second push message and displaying the first push message under the condition that the second push message which has the identification information and is displayed by the browser exists locally in the browser.
Alternatively, the display unit 40 includes: the device comprises an adjusting module and a display module. The adjusting module is used for enabling the browser to adjust the first push message to obtain the adjusted first push message; and the display module is used for enabling the browser to call and display the adjusted first push message at a preset position.
Optionally, the apparatus further comprises: and the modifying unit is used for enabling the browser to modify the locally stored data of the browser after the browser displays the first push message, so as to obtain fourth data, wherein the fourth data comprises second data, and the fourth data is used for filtering fifth data pushed by the server.
In this embodiment, the first obtaining unit 10 enables the browser to obtain first data pushed by the server, the filtering unit 20 enables the browser to filter the first data to obtain second data, where the second data is data that is not locally stored in the browser, the creating unit 30 enables the browser to create a first push message indicated by the second data, and the displaying unit 40 is used to enable the browser to display the first push message.
It should be noted here that the above units and modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
In another embodiment of the present invention, an electronic device for implementing the message processing method is also provided.
Fig. 18 is a block diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 18, the electronic device may include: one or more (only one shown) processors 181, memory 183. Optionally, as shown in fig. 18, the electronic apparatus may further include a transmission device 185 and an input/output device 187.
The memory 183 may be used to store software programs and modules, such as program instructions/modules corresponding to the message processing method and apparatus in the embodiments of the present invention, and the processor 181 executes various functional applications and data processing by running the software programs and modules stored in the memory 183, that is, implements the message processing method described above. The memory 183 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, memory 183 may further include memory located remotely from processor 181, which may be connected to electronic devices via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 185 is used for receiving or transmitting data via a network, and may also be used for data transmission between the processor and the memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 185 includes a Network adapter (NIC) that can be connected to a router via a Network cable to communicate with the internet or a local area Network. In one example, the transmission device 185 is a Radio Frequency (RF) module for communicating with the internet by wireless.
Among other things, the memory 183 is used to store application programs.
The processor 181 may invoke an application stored in the memory 183 via the transmission device 185 to perform the following steps:
the browser acquires first data pushed by a server;
the browser filters the first data to obtain second data, wherein the second data are data which are not stored locally in the browser;
the browser creates a first push message indicated by the second data;
the browser displays the first push message.
The processor 181 is further configured to perform the following steps: the browser acquires third data stored locally in the browser; the browser filters data included in the third data from the first data to obtain second data.
The processor 181 is further configured to perform the following steps: before the browser acquires third data locally stored in the browser, the browser sends a first request to a server, wherein the first request is used for requesting the server to send a data source comprising the third data; the browser acquires the data source and stores the data source to the local of the browser.
The processor 181 is further configured to perform the following steps: the browser acquires and stores first data pushed by the server through a first data thread; and the browser filters the first data through a second data thread to obtain second data, wherein the second data thread is different from the first data thread.
The processor 181 is further configured to perform the following steps: the browser constructs the second data through a preset function to obtain title information in the first push message, wherein the title information is used for indicating a title of the first push message; and/or the browser constructs the second data through a preset function to obtain option information in the first push message, wherein the option information is used for displaying the first push message.
The processor 181 is further configured to perform the following steps: after the browser displays the first push message, the browser receives a preset operation executed on the first push message; the browser triggers a preset event corresponding to the preset operation, wherein the preset event is used for tracking the current state of the first push message.
The processor 181 is further configured to perform the following steps: after the browser displays the first push message, the browser adds identification information to the first push message; under the condition that a second push message which has identification information and is not displayed by the browser exists locally in the browser, replacing the second push message with a first push message; and under the condition that a second push message which has identification information and is displayed by the browser exists locally in the browser, closing the second push message and displaying the first push message.
The processor 181 is further configured to perform the following steps: the browser adjusts the first push message to obtain the adjusted first push message; and the browser calls and displays the adjusted first push message at a preset position.
The processor 181 is further configured to perform the following steps: after the browser displays the first push message, the browser modifies locally stored data of the browser to obtain fourth data, wherein the fourth data comprises second data, and the fourth data is used for filtering fifth data pushed by the server.
The embodiment of the invention provides a message processing scheme. Acquiring first data pushed by a server through a browser; the browser filters the first data to obtain second data, wherein the second data are data which are not stored locally in the browser; the browser creates a first push message indicated by the second data; the browser displays the first push message. The browser filters the received push data to obtain data which is not stored locally so as to ensure that the displayed push message is the latest message, thereby achieving the technical effect that the browser receives the latest push message and further solving the technical problem that the browser cannot receive the latest push message.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It will be understood by those skilled in the art that the structure shown in fig. 18 is merely an illustration, and the electronic device may be a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and an electronic device such as a Mobile Internet Device (MID), a PAD, etc. Fig. 18 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 18, or have a different configuration than shown in FIG. 18.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program for instructing hardware associated with an electronic device, and the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
In yet another embodiment of the present invention, a storage medium is also provided. Alternatively, in this embodiment, the storage medium may be a program code for executing the message processing method.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
the browser acquires first data pushed by a server;
the browser filters the first data to obtain second data, wherein the second data are data which are not stored locally in the browser;
the browser creates a first push message indicated by the second data;
the browser displays the first push message.
Optionally, the storage medium is further arranged to store program code for performing the steps of: the browser acquires third data stored locally in the browser; the browser filters data included in the third data from the first data to obtain second data.
Optionally, the storage medium is further arranged to store program code for performing the steps of: before the browser acquires third data locally stored in the browser, the browser sends a first request to a server, wherein the first request is used for requesting the server to send a data source comprising the third data; the browser acquires the data source and stores the data source to the local of the browser.
Optionally, the storage medium is further arranged to store program code for performing the steps of: the browser acquires and stores first data pushed by the server through a first data thread; and the browser filters the first data through a second data thread to obtain second data, wherein the second data thread is different from the first data thread.
Optionally, the storage medium is further arranged to store program code for performing the steps of: the browser constructs the second data through a preset function to obtain title information in the first push message, wherein the title information is used for indicating a title of the first push message; and/or the browser constructs the second data through a preset function to obtain option information in the first push message, wherein the option information is used for displaying the first push message.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the browser displays the first push message, the browser receives a preset operation executed on the first push message; the browser triggers a preset event corresponding to the preset operation, wherein the preset event is used for tracking the current state of the first push message.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the browser displays the first push message, the browser adds identification information to the first push message; under the condition that a second push message which has identification information and is not displayed by the browser exists locally in the browser, replacing the second push message with a first push message; and under the condition that a second push message which has identification information and is displayed by the browser exists locally in the browser, closing the second push message and displaying the first push message.
Optionally, the storage medium is further arranged to store program code for performing the steps of: the browser adjusts the first push message to obtain the adjusted first push message; and the browser calls and displays the adjusted first push message at a preset position.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the browser displays the first push message, the browser modifies locally stored data of the browser to obtain fourth data, wherein the fourth data comprises second data, and the fourth data is used for filtering fifth data pushed by the server.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed browser can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (13)

1. A message processing method, comprising:
the browser acquires first data pushed by a server;
the browser sends a first request to the server, wherein the first request is used for requesting the server to send a data source;
the browser acquires the data source and stores the data source to the local of the browser;
the browser compares the first data by using the data source to filter data corresponding to messages clicked and browsed by a user account of the browser in the first data, so as to obtain second data newly pushed to the browser by the server, wherein the second data is data which is not stored locally in the browser;
the browser creates a first push message indicated by the second data;
the browser displays the first push message.
2. The method according to claim 1, wherein the comparing, by the browser, the first data with the data source to filter out data corresponding to a message that is clicked and browsed by a user account of the browser from the first data, and obtaining second data that is newly pushed to the browser by the server comprises:
the browser acquires third data stored locally in the browser, wherein the data source comprises the third data;
and the browser filters the data included in the third data from the first data to obtain the second data.
3. The method of claim 1,
the browser acquiring the first data pushed by the server comprises: the browser acquires and stores the first data pushed by the server through a first data thread;
the browser compares the first data by using the data source to filter data corresponding to messages clicked and browsed by a user account of the browser in the first data, and obtaining second data newly pushed to the browser by the server includes: and the browser filters the first data through a second data thread to obtain second data, wherein the second data thread is different from the first data thread.
4. The method of claim 1, wherein the browser creating the first push message indicated by the second data comprises:
the browser constructs the second data through a preset function to obtain title information in the first push message, wherein the title information is used for indicating a title of the first push message; and/or
And the browser constructs the second data through a preset function to obtain option information in the first push message, wherein the option information is used for displaying the first push message.
5. The method of any of claims 1-4, wherein after the browser displays the first push message, the method further comprises:
the browser receives a preset operation executed on the first push message;
and the browser triggers a preset event corresponding to the preset operation, wherein the preset event is used for tracking the current state of the first push message.
6. The method of any of claims 1-4, wherein after the browser displays the first push message, the method further comprises:
the browser adds identification information to the first push message;
replacing a second push message which has the identification information and is not displayed by the browser with the first push message when the second push message exists locally on the browser;
and closing the second push message and displaying the first push message under the condition that the second push message which has the identification information and is displayed by the browser exists locally in the browser.
7. The method of any of claims 1-4, the browser displaying the first push message comprising:
the browser adjusts the first push message to obtain the adjusted first push message;
and the browser calls and displays the adjusted first push message at a preset position.
8. The method of any of claims 1-4, wherein after the browser displays the first push message, the method further comprises:
and the browser modifies the locally stored data of the browser to obtain fourth data, wherein the fourth data comprises the second data, and the fourth data is used for filtering fifth data pushed by the server.
9. A message processing apparatus, comprising:
the first acquisition unit is used for enabling the browser to acquire first data pushed by the server;
the filtering unit is used for comparing the first data by using a data source through the browser so as to filter data corresponding to messages clicked and browsed by a user account of the browser in the first data, and obtain second data which is newly pushed to the browser by the server, wherein the second data is data which is not stored locally in the browser;
a creating unit configured to cause the browser to create a first push message indicated by the second data;
a display unit configured to cause the browser to display the first push message;
the device further comprises:
a sending unit, configured to enable the browser to send a first request to the server before the browser obtains third data locally stored in the browser, where the first request is used to request the server to send the data source;
and the second acquisition unit is used for enabling the browser to acquire the data source and store the data source to the local of the browser.
10. The apparatus of claim 9, wherein the filter unit comprises:
the first obtaining module is used for obtaining third data stored locally in the browser by the browser, wherein the data source comprises the third data;
and the first filtering module is used for filtering the data included in the third data from the first data by the browser to obtain the second data.
11. The apparatus of claim 9,
the first acquisition unit includes: the second obtaining module is used for enabling the browser to obtain and store the first data pushed by the server through a first data thread;
the filter unit includes: and the second filtering module is used for enabling the browser to filter the first data through a second data thread to obtain the second data, wherein the second data thread is different from the first data thread.
12. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program executes the message processing method of any one of claims 1 to 8.
13. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the message processing method of any one of claims 1 to 8 by the computer program.
CN201710726992.XA 2017-08-22 2017-08-22 Message processing method and device Active CN107704491B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710726992.XA CN107704491B (en) 2017-08-22 2017-08-22 Message processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710726992.XA CN107704491B (en) 2017-08-22 2017-08-22 Message processing method and device

Publications (2)

Publication Number Publication Date
CN107704491A CN107704491A (en) 2018-02-16
CN107704491B true CN107704491B (en) 2022-01-04

Family

ID=61170970

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710726992.XA Active CN107704491B (en) 2017-08-22 2017-08-22 Message processing method and device

Country Status (1)

Country Link
CN (1) CN107704491B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110769069B (en) * 2019-10-30 2022-01-11 许继集团有限公司 Method and device for pushing alarm information

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1529863A (en) * 2001-07-16 2004-09-15 �ʼҷ����ֵ������޹�˾ Personalized filter for web browsing
CN101431484A (en) * 2008-11-24 2009-05-13 阿里巴巴集团控股有限公司 Message transmission method and apparatus
CN103327049A (en) * 2012-03-22 2013-09-25 腾讯科技(深圳)有限公司 Rich content pushing method and system based on browser address bar
CN104778226A (en) * 2015-03-26 2015-07-15 小米科技有限责任公司 Webpage content item shielding method and webpage content item shielding device
CN105827510A (en) * 2016-03-31 2016-08-03 维沃移动通信有限公司 Push message processing method for mobile terminal, and mobile terminal
CN105915612A (en) * 2016-04-19 2016-08-31 北京金山安全软件有限公司 Push message acquisition method, message push method and device

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1203283B1 (en) * 1999-06-30 2009-11-04 Silverbrook Research Pty. Limited Method and system for collaborative document markup
AU2009326848B2 (en) * 2008-12-08 2015-03-12 FnF Group Pty Ltd System and method for adapting an internet and intranet filtering system
GB0911858D0 (en) * 2009-07-08 2009-08-19 Digital Distrib Networks Ltd Message handling method and system
US9177011B2 (en) * 2011-12-22 2015-11-03 Magnet Forensics Inc. Systems and methods for locating application specific data
CN102622443A (en) * 2012-03-13 2012-08-01 北京邮电大学 Customized screening system and method for microblog
CN103581249B (en) * 2012-07-31 2018-07-06 腾讯科技(上海)有限公司 A kind of information-pushing method, system and client
CN103399861B (en) * 2013-07-04 2017-03-08 百度在线网络技术(北京)有限公司 A kind of network address in Web side navigation recommends methods, devices and systems
CN104468649B (en) * 2013-09-16 2018-06-05 北大方正集团有限公司 Server, terminal, data delivery system and data push method
EP3207468A1 (en) * 2015-07-22 2017-08-23 Deutsche Telekom AG A system for providing recommendation information for user device
CN106202427B (en) * 2016-07-12 2022-02-11 腾讯科技(深圳)有限公司 Application processing method and device and computer storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1529863A (en) * 2001-07-16 2004-09-15 �ʼҷ����ֵ������޹�˾ Personalized filter for web browsing
CN101431484A (en) * 2008-11-24 2009-05-13 阿里巴巴集团控股有限公司 Message transmission method and apparatus
CN103327049A (en) * 2012-03-22 2013-09-25 腾讯科技(深圳)有限公司 Rich content pushing method and system based on browser address bar
CN104778226A (en) * 2015-03-26 2015-07-15 小米科技有限责任公司 Webpage content item shielding method and webpage content item shielding device
CN105827510A (en) * 2016-03-31 2016-08-03 维沃移动通信有限公司 Push message processing method for mobile terminal, and mobile terminal
CN105915612A (en) * 2016-04-19 2016-08-31 北京金山安全软件有限公司 Push message acquisition method, message push method and device

Also Published As

Publication number Publication date
CN107704491A (en) 2018-02-16

Similar Documents

Publication Publication Date Title
US9558476B2 (en) Method and device for editing workspace data objects
CN104253741B (en) A kind of method for sending information, relevant apparatus and system
US20150074548A1 (en) Information Sharing Method and Apparatus
CN105871690B (en) Method and device for realizing instant messaging
US20140344707A1 (en) Information Distribution Method and Device
CN109936621B (en) Information security multi-page message pushing method, device, equipment and storage medium
CN104243273A (en) Method and device for displaying information on instant messaging client and information display system
CN106951220B (en) Data processing method and device
US9542365B1 (en) Methods for generating e-mail message interfaces
CN105205072B (en) The methods of exhibiting and system of webpage information
CN103853767A (en) Method and device for sharing social circle based on browser
US20200233878A1 (en) Card-based information management method and system
CN107045546B (en) Webpage processing method and device and intelligent terminal
CN102831150B (en) Browser and local exchange method, system and the terminal applied
CN109829121B (en) Method and device for reporting click behavior data
US20140157104A1 (en) Dynamic sharing and updating of a web page
CN107704491B (en) Message processing method and device
CN109446451B (en) Webpage display method, device, medium and computing equipment
US9467413B2 (en) Method and system for replying to website update event
CN116112457A (en) Method, device, computer equipment and storage medium for notifying message
CN105338091A (en) High-transmission-efficiency personalized information interface display method and apparatus
US20230004261A1 (en) Data processing method, terminal device and server device
CN116225286A (en) Page jump control method, operating system, electronic device and storage medium
CN109768921B (en) Data transparent transmission method and corresponding instant communication terminal
WO2014084771A1 (en) Dynamic sharing and updating of a web page

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