CN105302590B - Information processing method and device - Google Patents

Information processing method and device Download PDF

Info

Publication number
CN105302590B
CN105302590B CN201410351857.8A CN201410351857A CN105302590B CN 105302590 B CN105302590 B CN 105302590B CN 201410351857 A CN201410351857 A CN 201410351857A CN 105302590 B CN105302590 B CN 105302590B
Authority
CN
China
Prior art keywords
prompt information
prompt
information
display state
message
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
CN201410351857.8A
Other languages
Chinese (zh)
Other versions
CN105302590A (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 CN201410351857.8A priority Critical patent/CN105302590B/en
Publication of CN105302590A publication Critical patent/CN105302590A/en
Application granted granted Critical
Publication of CN105302590B publication Critical patent/CN105302590B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses an information processing method and device, wherein the method comprises the following steps: triggering a current page of a client to acquire N pieces of prompt information, wherein N is a positive integer greater than or equal to 1; determining M pieces of first prompt information meeting a first preset condition from the N pieces of prompt information, wherein the first preset condition represents that the first prompt information is new prompt information; m is a positive integer less than or equal to N; caching the M pieces of first prompt information in a cache space; when a webpage is triggered through a current page of a client, switching corresponding icons in the webpage from a first display state to a second display state according to the M pieces of first prompt information; the first display state is different from the second display state, and the webpage is embedded in the client.

Description

Information processing method and device
Technical Field
The present invention relates to information processing technologies in the field of communications, and in particular, to an information processing method and apparatus.
Background
Currently, when an application is used in a terminal, a situation that an embedded Web page (Web) is called through a client exists, and related content is displayed on the Web page. However, the client and the web page embedded therein respectively obtain the prompt information from different servers, for example, when the client is a microblog and the web page is a page embedded in the microblog, the client can obtain the prompt information from each server in a polling manner, and when the web page loads page data after being triggered, the web page can request the prompt information from the server by sending a browser request; therefore, the microblog and the embedded webpage do not acquire information at the same time, so that the acquired prompt information is different. Therefore, the user cannot be guaranteed not to be influenced by the used application, the client and the embedded webpage thereof can obtain the same prompt information, and the use experience of the user is influenced.
Disclosure of Invention
In view of the above, embodiments of the present invention provide an information processing method and apparatus, which at least solve the above problems in the prior art.
The technical scheme of the embodiment of the invention is realized as follows:
an information processing method of an embodiment of the present invention is used for a client, and the method includes:
triggering a current page of a client to acquire N pieces of prompt information, wherein N is a positive integer greater than or equal to 1;
determining M pieces of first prompt information meeting a first preset condition from the N pieces of prompt information, wherein the first preset condition represents that the first prompt information is new prompt information; m is a positive integer less than or equal to N;
caching the M pieces of first prompt information in a cache space;
when a webpage is triggered through a current page of a client, switching corresponding icons in the webpage from a first display state to a second display state according to the M pieces of first prompt information; the first display state is different from the second display state, and the webpage is embedded in the client.
Preferably, switching the corresponding icon in the webpage from the first display state to the second display state according to the M first prompt messages includes:
extracting first prompt information from the M pieces of first prompt information cached in the cache space of the client one by one;
judging whether the first prompt message is stored or not according to the message identifier in the first prompt message, if not, switching the icon corresponding to the first prompt message from the first display state to the second display state, and caching the message identifier of the first prompt message in the cache space of the webpage.
Preferably, after the icon corresponding to the first prompt message is switched from the first display state to the second display state, the method further includes:
when detecting that the corresponding icon in the webpage is switched from the second display state to the first display state, generating response information by using the information identifier of the first prompt information; and setting the read identifier of the first prompt message corresponding to the cache space of the client to be read according to the message identifier in the response message.
Preferably, switching the icon corresponding to the client from the first display state to the second display state according to the M first prompt messages includes:
extracting first prompt information from the M pieces of first prompt information cached in the cache space of the client one by one;
judging whether the first prompt information is the first prompt information stored in the cache space of the webpage according to the information identifier in the first prompt information, if not, switching the icon corresponding to the first prompt information from the first display state to the second display state, and caching the first prompt information in the cache space of the webpage;
if so, judging whether the version number in the first prompt message is the same as the version number in the stored first prompt message; if not, switching the icon corresponding to the first prompt message from the first display state to the second display state, and updating the first prompt message stored in the cache space of the webpage;
if the first prompt information is the same as the second prompt information, judging whether the read identifier of the first prompt information is set to be read, if so, not operating, and enabling the icon corresponding to the first prompt information to keep a first display state; otherwise, updating the stored first prompt information in the cache space of the webpage page, and keeping the second display state of the icon.
Preferably, the determining M first prompt messages meeting a first preset condition from the N prompt messages includes:
extracting prompt messages from the N prompt messages one by one;
judging whether the prompt information is cached prompt information or not according to the information identifier of the prompt information, if not, determining that the prompt information meets a first preset condition, and taking the prompt information as first prompt information;
if the prompt information is cached, judging whether the version number of the prompt information is consistent with the cached version number of the prompt information with the same information identifier, if so, judging that the prompt information is not in accordance with a first preset condition;
if not, judging whether the read identification recorded in the cached prompt information with the same information identification is set as read, if so, judging that the prompt information does not accord with a first preset condition, otherwise, judging that the prompt information accords with the first preset condition, and taking the prompt information as the first prompt information.
An apparatus of an embodiment of the present invention, the apparatus includes:
the receiving unit is used for acquiring N pieces of prompt information, wherein N is a positive integer greater than or equal to 1;
the information processing unit is used for triggering a current page of the client, acquiring N pieces of prompt information through the receiving unit, and determining M pieces of first prompt information meeting a first preset condition from the N pieces of prompt information, wherein the preset condition represents that the first prompt information is new prompt information; m is a positive integer less than or equal to N; caching the M pieces of first prompt information in a first cache unit; when a webpage is triggered through a current page of a client, switching corresponding icons in the webpage from a first display state to a second display state according to the M pieces of first prompt information; the first display state is different from the second display state, and the webpage is embedded in the client;
and the first cache unit is used as a cache space of the client and caches the M pieces of first prompt information.
Preferably, the apparatus further comprises: the second cache unit is used as a cache unit of a webpage page and caches the information identifier of the first prompt message;
correspondingly, the information processing unit is further configured to extract the first prompt information from the M pieces of first prompt information cached in the first caching unit one by one; judging whether the first prompt message is the stored first prompt message or not according to the message identifier in the first prompt message, if not, switching the icon corresponding to the first prompt message from the first display state to the second display state, and caching the message identifier of the first prompt message in a second cache unit.
Preferably, the information processing unit is further configured to generate response information by using an information identifier of the first prompt information when it is detected that a corresponding icon in a web page is switched from a second display state to the first display state; and setting the read identifier of the first prompt message corresponding to the first cache unit as read according to the message identifier in the response message.
Preferably, the information processing unit is further configured to extract the first prompt information from the M pieces of first prompt information cached in the first caching unit one by one; judging whether the first prompt information is stored in a cache space of a webpage or not according to an information identifier in the first prompt information, if not, switching an icon corresponding to the first prompt information from a first display state to a second display state, and caching the first prompt information in a second cache unit; if so, judging whether the version number in the first prompt message is the same as the version number in the stored first prompt message; if not, switching the icon corresponding to the first prompt message from a first display state to a second display state, and caching the first prompt message in a second cache unit; if the first prompt information is the same as the second prompt information, judging whether the read identifier of the first prompt information is set to be read, if so, not operating, and enabling the icon corresponding to the first prompt information to keep a first display state; otherwise, updating the stored first prompt information in the second cache unit, and keeping the second display state of the icon.
Preferably, the information processing unit is further configured to extract prompt information from the N pieces of prompt information one by one; judging whether the prompt information is cached prompt information or not according to the information identifier of the prompt information, if not, determining that the prompt information meets a first preset condition, and taking the prompt information as first prompt information; if the prompt information is cached, judging whether the version number of the prompt information is consistent with the cached version number of the prompt information with the same information identifier, if so, judging that the prompt information is not in accordance with a first preset condition; if not, judging whether the read identification recorded in the cached prompt information with the same information identification is set as read, if so, judging that the prompt information does not accord with a first preset condition, otherwise, judging that the prompt information accords with the first preset condition, and taking the prompt information as the first prompt information.
By adopting the information processing method and the device provided by the invention, new prompt information can be acquired through the client, and when the webpage is triggered, the display state of the corresponding icon is switched by the webpage according to the new prompt information acquired by the client. Therefore, the client and the webpage can be guaranteed to obtain the same prompt information, and the use experience of a user is improved.
Drawings
FIG. 1 is a flow chart of an information processing method according to an embodiment of the present invention;
FIG. 2 is a diagram of a first page display interface according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a webpage display interface according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a determination process in an embodiment of the present invention;
FIG. 5 is a schematic diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
The following describes the embodiments in further detail with reference to the accompanying drawings.
The first embodiment is as follows:
the present embodiment provides an information processing method, as shown in fig. 1, including:
step 101: triggering a current page of a client to acquire N pieces of prompt information, wherein N is a positive integer greater than or equal to 1;
step 102: determining M pieces of first prompt information which accord with a first preset condition from the N pieces of prompt information, wherein the preset condition represents that the first prompt information is new prompt information; m is a positive integer greater than or equal to 1 and less than or equal to N;
step 103: caching the M pieces of first prompt information in a cache space;
step 104: when a webpage is triggered through a current page of a client, switching corresponding icons in the webpage from a first display state to a second display state according to the M pieces of first prompt information; the first display state is different from the second display state, and the webpage is embedded in the client.
Here, the client may be a native application, such as a microblog, and the current page of the client may be as shown in fig. 2.
Preferably, the acquiring N prompt messages may include: when a user opens the current page of the client, a polling request is sent to the corresponding server to acquire prompt information.
The prompt message comprises: information identification, version number, identification of whether read is available. The information identifier may include content, an icon, or a location corresponding to the prompt information; the version number can be the updating time of the prompt message; the identifier of whether to read may be used to characterize whether the user has clicked the icon corresponding to the prompt message, for example, when the user has clicked the icon, the identifier of whether to read may be set to a value of "tune". The specific style of the first display state is not limited in this embodiment.
Preferably, the prompt message may further include: the display type and the display content of the second display state; in a specific implementation, the display style may be a specific icon displayed, for example, a solid dot, as shown in fig. 3, the display color may be red or any other color, and the display position is an upper right corner, an upper left corner, a lower right corner, or the like of the icon;
in addition, it is understood that the display types and the display contents may be other various types, for example, the display types may be in a manner of changing the color, shape, and the like of the icon. The information content may be used to represent specific displayed content, for example, a number may be included to represent the number of specific updated information in the next level page corresponding to the icon, as shown in fig. 3, H in a dot 31 on the upper right of the icon, where H may be a positive integer.
The judging whether the prompt information meets the preset condition may include: judging whether the same prompt information exists in a local cache space or not according to the information identifier of the prompt information, if not, the prompt information is new prompt information and accords with preset conditions;
if yes, judging whether the prompt information with the same information identification stored in the local cache space has the same version number according to the version number of the prompt information, if yes, judging that the prompt information is not new prompt information and does not accord with preset conditions, and if not, judging that the prompt information is new prompt information and accords with the preset conditions.
Preferably, after the caching the M first prompt messages, the method further includes: determining to display a second identifier at an icon corresponding to the first prompt message in a current page of the client according to the message identifier in the first prompt message;
the second identifier may be displayed according to a preset parameter, and the preset parameter may be a position and a color for displaying the second identifier. The second mark may be a dot as shown at the icon 21 in fig. 2, and it is understood that the color may be any color, and the position may not be limited to the upper right of the icon shown in fig. 2, but may be any position of the icon.
In addition, after determining an icon corresponding to the prompt information to be displayed in the current page of the client and displaying the second identifier at the icon, the method may further include: after the touch operation of the user is detected, the icon is determined to be clicked according to the touch operation, the icon is controlled not to display the second identifier, and the identifier which is stored by the icon and is read or not in the first prompt information corresponding to the icon is set to be read.
The embedding may be understood as displaying the web page at a specified position of the current page of the client while running the web page, for example, as shown in fig. 2 and 3, where the current page of the client may be the display interface shown in fig. 2, and the web page may be, as shown in fig. 3, displaying the web page 32 on the basis of the toolbar storing the current page of the client.
The triggering web page may include: the user determines to open the webpage according to the operation of the user by selecting an icon, such as the icon 21 in fig. 2, in the current page of the client, so that the webpage is switched from the closed state to the open state.
The switching the corresponding icon in the display interface of the webpage from the first display state to the second display state according to the M pieces of first prompt information includes:
extracting first prompt information from the M pieces of first prompt information one by one;
judging whether the first prompt information is the first prompt information stored in the cache space corresponding to the webpage or not according to the information identifier in the first prompt information, if not, switching the icon corresponding to the first prompt information from the first display state to the second display state, and caching the first prompt information in the cache space corresponding to the webpage;
if so, judging whether the version number in the first prompt message is the same as the version number in the stored first prompt message; if not, switching the icon corresponding to the first prompt message from the first display state to the second display state, and updating the first prompt message stored in the cache space corresponding to the webpage;
if the first prompt information is the same as the second prompt information, judging whether the read identifier of the first prompt information is set to be read, if so, not operating, and enabling the icon corresponding to the first prompt information to keep a first display state; otherwise, updating the stored first prompt information in the cache space corresponding to the webpage, and keeping the second display state of the icon.
The manner of extracting the first prompt information from the M first prompt information one by one may be that a javascript interface is added to the current page and the web page of the client, and the web page extracts the first prompt information from the M first prompt information through the javascript interface.
Or, the sending the M first prompt messages to the web page may include: and sending the information identifier, the version number and the identifier of whether the information identifier, the version number and the identifier are read in the M pieces of first prompt information to a cache space of the webpage.
Correspondingly, the switching the corresponding icon in the display interface of the web page from the first display state to the second display state according to the M first prompt messages includes:
extracting first prompt information from the M pieces of first prompt information one by one;
judging whether the first prompt message is the stored first prompt message or not according to the message identifier in the first prompt message, if not, switching the icon corresponding to the first prompt message from the first display state to the second display state, and caching the first prompt message in the cache space corresponding to the webpage.
In addition, after the icon corresponding to the first prompt message is switched from the first display state to the second display state, the method further includes: when it is detected that a corresponding icon in a display interface of a webpage is switched from a second display state to the first display state, response information is generated; and setting the read-free mark of the prompt message in the cache space of the current page of the client as read according to the response message.
Preferably, the determining, from the N pieces of prompt information, M pieces of first prompt information meeting a first preset condition may include, as shown in fig. 4:
step 401: extracting prompt messages from the N prompt messages one by one;
step 402: judging whether the prompt information is cached prompt information or not according to the information identification of the prompt information, if not, determining that the prompt information meets the preset condition, and taking the prompt information as first prompt information; if the prompt message is cached, go to step 403;
step 403: judging whether the version number of the prompt message is consistent with the cached version number of the prompt message with the same message identifier, if so, judging that the prompt message is not in accordance with a preset condition; otherwise, go to step 404;
step 404: judging whether the read identification recorded in the cached prompt information with the same information identification is set as read or not, if so, judging that the prompt information does not accord with the preset condition; otherwise, the prompt message accords with a preset condition and is used as a first prompt message.
The following explains this embodiment by taking the client as a microblog, the web page as a web page embedded in the microblog, and the prompt information as red dot data as an example:
a user starts a microblog, displays a current page of the microblog, sends a polling request to each server to obtain prompt information, and caches the prompt information after obtaining the prompt information;
when a user clicks an icon in a navigation bar of a microblog and triggers and displays a corresponding web page, the microblog calls a javascript interface on the web page to transmit prompt information to the web page;
the web page reads the html local storage, after the prompt information is obtained, the web page traverses the prompt information transmitted through the microblog, whether each prompt information has a record in the html local storage is judged through the information identifier of the prompt information, if not, the icon corresponding to the prompt information is switched to a second display state, for example, a red dot is displayed at the corresponding icon, and the prompt information is stored in the html local storage;
if the local storage has records, judging whether the version numbers are the same and different, switching the icon corresponding to the prompt message to a second display state, for example, displaying a red dot at the corresponding icon, if the version numbers are the same, judging whether the red dot is extinguished by a user through a read identifier, if the red dot is extinguished, not displaying, and if the red dot is not extinguished, switching the icon corresponding to the prompt message to the second display state, for example, displaying the red dot at the corresponding icon.
The content presented in a Web page, such as a Web page, is obtained by sending a browser request. When a user triggers an action of displaying the web page, the webview control sends a request to acquire the content of the web page.
For the server side, whether each user lights the red dot or not is not required to be stored, the displaying and extinguishing of the red dot are controlled by the version number (version) of the red dot data, when the user lights out the red dot (here, the user lights out the red dot through an interaction such as touch click), corresponding records are made in the web page through html local storage, if the red dot needs to be lighted, the version number of the red dot data is modified, the version number of the red dot data is changed, and because the version number is different from that in the html local storage and a new data user does not go out, the web page displays the red dot after being judged.
Therefore, by adopting the scheme, the new prompt information can be acquired through the client, and when the webpage is triggered, the display state of the corresponding icon is switched by the webpage according to the new prompt information acquired by the client. Therefore, the client and the webpage can be guaranteed to obtain the same prompt information, and the use experience of a user is improved.
Example two:
the present embodiment provides an apparatus, as shown in fig. 5, including:
a receiving unit 51, configured to obtain N pieces of prompt information, where N is a positive integer greater than or equal to 1;
the information processing unit 52 is configured to trigger a current page of the client, acquire N pieces of prompt information through the receiving unit, and determine M pieces of first prompt information meeting a first preset condition from the N pieces of prompt information, where the preset condition indicates that the first prompt information is new prompt information; m is a positive integer less than or equal to N; caching the M pieces of first prompt information in a first cache unit; when a webpage is triggered through a current page of a client, switching corresponding icons in a display interface of the webpage from a first display state to a second display state according to the M pieces of first prompt information; the first display state is different from the second display state, and the webpage is embedded in the client;
the first caching unit 53 is configured to serve as a caching space of the client, and cache the M first prompt messages.
Here, the client may be a native application, such as a microblog, and a display interface thereof may be as shown in fig. 2. The webpage is embedded in the client, and further, the embedding can be understood as displaying the webpage at a specified position of the client while running the webpage.
Preferably, the receiving unit 51 may be further configured to initiate a polling request to obtain the prompt information from the corresponding server when the user opens the first page.
The prompt message comprises: information identification, version number, identification of whether read is available. The information identifier may include content, an icon, or a location corresponding to the prompt information; the version number can be the updating time of the prompt message; the identifier of whether to read may be used to characterize whether the user has clicked the icon corresponding to the prompt message, for example, when the user has clicked the icon, the identifier of whether to read may be set to a value of "tune".
The specific style of the first display state is not limited in this embodiment.
Preferably, the prompt message may further include: the display type and the display content of the second display state; in a specific implementation, the display style may be a specific icon displayed, for example, a solid dot, as shown in fig. 3, the display color may be red or any other color, and the display position is an upper right corner, an upper left corner, a lower right corner, or the like of the icon; in addition, it is understood that the display types and the display contents may be other various types, for example, the display types may be in a manner of changing the color, shape, and the like of the icon. The information content may be used to represent specific displayed content, for example, a number may be included to represent the number of specific updated information in the next level page corresponding to the icon, as shown in fig. 3, H in a dot 31 on the upper right of the icon, where H may be a positive integer.
Preferably, the prompt message may further include a storage duration; correspondingly, the method may further include: judging whether the storage time length exceeds a preset time length threshold value or not, and if so, deleting the prompt message; therefore, the prompt information corresponding to the content which is not clicked and checked by the user can not be stored in the local cache corresponding to the current page of the client for a long time, and therefore the cache space is saved.
The information processing unit is specifically used for judging whether the same prompt information exists in the first cache unit according to the information identifier of the prompt information, and if not, the prompt information is new prompt information and meets the preset condition; if yes, judging whether the prompt information with the same information identification stored in the local cache space has the same version number according to the version number of the prompt information, if yes, judging that the prompt information is not new prompt information and does not accord with preset conditions, and if not, judging that the prompt information is new prompt information and accords with the preset conditions.
Preferably, the information processing unit is further configured to determine, after the caching of the M first prompt messages, an icon corresponding to the prompt message to be displayed in the current page of the client according to an information identifier in the prompt message, and display a second identifier at the icon; the second identifier may be displayed according to a preset parameter, and the preset parameter may be a position and a color for displaying the second identifier. The second mark may be a dot as shown at the icon 21 in fig. 2, and it is understood that the color may be any color, and the position may not be limited to the upper right of the icon shown in fig. 2, but may be any position of the icon.
The device further comprises: the second cache unit 54 is configured to serve as a cache unit of a web page, and cache the information identifier of the first prompt information;
correspondingly, the information processing unit is further configured to extract the first prompt information from the M pieces of first prompt information cached in the first caching unit one by one; judging whether the first prompt message is the stored first prompt message or not according to the message identifier in the first prompt message, if not, switching the icon corresponding to the first prompt message from the first display state to the second display state, and caching the message identifier of the first prompt message in a second cache unit.
The information processing unit is further configured to generate response information by using the information identifier of the first prompt information when it is detected that a corresponding icon in a display interface of a web page is switched from a second display state to the first display state; and setting the read identifier of the first prompt message corresponding to the first cache unit as read according to the message identifier in the response message.
The information processing unit is further used for extracting the first prompt information from the M pieces of first prompt information cached in the first caching unit one by one; judging whether the first prompt information is stored in a cache space corresponding to the webpage or not according to the information identifier in the first prompt information, if not, switching an icon corresponding to the first prompt information from a first display state to a second display state, and caching the first prompt information in a second cache unit; if so, judging whether the version number in the first prompt message is the same as the version number in the stored first prompt message; if not, switching the icon corresponding to the first prompt message from a first display state to a second display state, and caching the first prompt message in a second cache unit; if the first prompt information is the same as the second prompt information, judging whether the read identifier of the first prompt information is set to be read, if so, not operating, and enabling the icon corresponding to the first prompt information to keep a first display state; otherwise, updating the stored first prompt information in the second cache unit, and keeping the second display state of the icon.
The information processing unit is further used for extracting prompt information from the N prompt information one by one; judging whether the prompt information is cached prompt information or not according to the information identifier of the prompt information, if not, determining that the prompt information meets a first preset condition, and taking the prompt information as first prompt information; if the prompt information is cached, judging whether the version number of the prompt information is consistent with the cached version number of the prompt information with the same information identifier, if so, judging that the prompt information is not in accordance with a first preset condition; if not, judging whether the read identification recorded in the cached prompt information with the same information identification is set as read, if so, judging that the prompt information does not accord with a first preset condition, otherwise, judging that the prompt information accords with the first preset condition, and taking the prompt information as the first prompt information.
Therefore, by adopting the scheme, the new prompt information can be acquired through the client, and when the webpage is triggered, the display state of the corresponding icon is switched by the webpage according to the new prompt information acquired by the client. Therefore, the client and the webpage can be guaranteed to obtain the same prompt information, and the use experience of a user is improved.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
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, that is, 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, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. An information processing method for a client, the method comprising:
triggering a current page of a client to acquire N pieces of prompt information, wherein N is a positive integer greater than or equal to 1;
determining M pieces of first prompt information meeting a first preset condition from the N pieces of prompt information, wherein the first preset condition represents that the first prompt information is new prompt information; m is a positive integer less than or equal to N;
caching the M pieces of first prompt information in a cache space;
when a webpage is triggered through a current page of a client, switching corresponding icons in the webpage from a first display state to a second display state according to the M pieces of first prompt information; the first display state is different from the second display state, and the webpage is embedded in the client.
2. The method of claim 1, wherein switching the corresponding icon in the web page from a first display state to a second display state according to the M first prompt messages comprises:
extracting first prompt information from the M pieces of first prompt information cached in the cache space of the client one by one;
judging whether the first prompt information exists in the cache space of the webpage according to the information identifier in the first prompt information, if not, switching the icon corresponding to the first prompt information from a first display state to a second display state, and caching the information identifier of the first prompt information in the cache space of the webpage.
3. The method according to claim 2, wherein after the icon corresponding to the first prompt message is switched from the first display state to the second display state, the method further comprises:
when detecting that the corresponding icon in the webpage is switched from the second display state to the first display state, generating response information by using the information identifier of the first prompt information; and setting the read identifier of the first prompt message corresponding to the cache space of the client to be read according to the message identifier in the response message.
4. The method of claim 1, wherein switching the corresponding icon in the web page from a first display state to a second display state according to the M first prompt messages comprises:
extracting first prompt information from the M pieces of first prompt information cached in the cache space of the client one by one;
judging whether the first prompt information is the first prompt information stored in the cache space of the webpage according to the information identifier in the first prompt information, if not, switching the icon corresponding to the first prompt information from the first display state to the second display state, and caching the first prompt information in the cache space of the webpage;
if so, judging whether the version number in the first prompt message is the same as the version number in the stored first prompt message; if not, switching the icon corresponding to the first prompt message from the first display state to the second display state, and updating the first prompt message stored in the cache space of the webpage;
if the first prompt information is the same as the second prompt information, judging whether the read identifier of the first prompt information is set to be read, if so, not operating, and enabling the icon corresponding to the first prompt information to keep a first display state; otherwise, updating the stored first prompt information in the cache space of the webpage page, and keeping the second display state of the icon.
5. The method according to claim 1, wherein the determining M first prompt messages meeting a first preset condition from the N prompt messages comprises:
extracting prompt messages from the N prompt messages one by one;
judging whether the prompt information is cached prompt information or not according to the information identifier of the prompt information, if not, determining that the prompt information meets a first preset condition, and taking the prompt information as first prompt information;
if the prompt information is cached, judging whether the version number of the prompt information is consistent with the cached version number of the prompt information with the same information identifier, if so, judging that the prompt information is not in accordance with a first preset condition;
if not, judging whether the read identification recorded in the cached prompt information with the same information identification is set as read, if so, judging that the prompt information does not accord with a first preset condition, otherwise, judging that the prompt information accords with the first preset condition, and taking the prompt information as the first prompt information.
6. An information processing apparatus characterized in that the apparatus comprises:
the receiving unit is used for acquiring N pieces of prompt information, wherein N is a positive integer greater than or equal to 1;
the information processing unit is used for triggering a current page of the client, acquiring N pieces of prompt information through the receiving unit, and determining M pieces of first prompt information meeting a first preset condition from the N pieces of prompt information, wherein the preset condition represents that the first prompt information is new prompt information; m is a positive integer less than or equal to N; caching the M pieces of first prompt information in a first cache unit; when a webpage is triggered through a current page of a client, switching corresponding icons in the webpage from a first display state to a second display state according to the M pieces of first prompt information; the first display state is different from the second display state, and the webpage is embedded in the client;
and the first cache unit is used as a cache space of the client and caches the M pieces of first prompt information.
7. The apparatus of claim 6, further comprising: the second cache unit is used as a cache unit of a webpage page and caches the information identifier of the first prompt message;
correspondingly, the information processing unit is further configured to extract the first prompt information from the M pieces of first prompt information cached in the first caching unit one by one; judging whether a unit of the second cache of the first prompt message has the first prompt message or not according to the message identifier in the first prompt message, if not, switching an icon corresponding to the first prompt message from a first display state to a second display state, and caching the message identifier of the first prompt message in the second cache unit.
8. The apparatus according to claim 7, wherein the information processing unit is further configured to generate response information using the information identifier of the first prompt information when detecting that the corresponding icon in the web page is switched from the second display state to the first display state; and setting the read identifier of the first prompt message corresponding to the first cache unit as read according to the message identifier in the response message.
9. The apparatus according to claim 6, wherein the information processing unit is further configured to extract the first hint information from the M first hint information buffered in the first buffer unit one by one; judging whether the first prompt information is stored in a cache space of a webpage or not according to an information identifier in the first prompt information, if not, switching an icon corresponding to the first prompt information from a first display state to a second display state, and caching the first prompt information in a second cache unit; if so, judging whether the version number in the first prompt message is the same as the version number in the stored first prompt message; if not, switching the icon corresponding to the first prompt message from a first display state to a second display state, and caching the first prompt message in a second cache unit; if the first prompt information is the same as the second prompt information, judging whether the read identifier of the first prompt information is set to be read, if so, not operating, and enabling the icon corresponding to the first prompt information to keep a first display state; otherwise, updating the stored first prompt information in the second cache unit, and keeping the second display state of the icon.
10. The apparatus according to claim 6, wherein the information processing unit is further configured to extract prompt information from the N prompt information one by one; judging whether the prompt information is cached prompt information or not according to the information identifier of the prompt information, if not, determining that the prompt information meets a first preset condition, and taking the prompt information as first prompt information; if the prompt information is cached, judging whether the version number of the prompt information is consistent with the cached version number of the prompt information with the same information identifier, if so, judging that the prompt information is not in accordance with a first preset condition; if not, judging whether the read identification recorded in the cached prompt information with the same information identification is set as read, if so, judging that the prompt information does not accord with a first preset condition, otherwise, judging that the prompt information accords with the first preset condition, and taking the prompt information as the first prompt information.
CN201410351857.8A 2014-07-22 2014-07-22 Information processing method and device Active CN105302590B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410351857.8A CN105302590B (en) 2014-07-22 2014-07-22 Information processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410351857.8A CN105302590B (en) 2014-07-22 2014-07-22 Information processing method and device

Publications (2)

Publication Number Publication Date
CN105302590A CN105302590A (en) 2016-02-03
CN105302590B true CN105302590B (en) 2020-03-17

Family

ID=55199886

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410351857.8A Active CN105302590B (en) 2014-07-22 2014-07-22 Information processing method and device

Country Status (1)

Country Link
CN (1) CN105302590B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106874328B (en) * 2016-07-08 2021-03-19 创新先进技术有限公司 Data processing method and equipment
CN108449261B (en) * 2018-03-19 2020-10-02 腾讯科技(深圳)有限公司 Message prompting method, message version number processing method, device and storage medium
CN109816824A (en) * 2018-12-27 2019-05-28 宁波玖优电子科技有限公司 A kind of control method of smart lock
CN112130949A (en) * 2020-09-27 2020-12-25 北京达佳互联信息技术有限公司 Prompt resource display method and device and computer readable storage medium
CN114461106B (en) * 2021-07-02 2024-04-12 北京字跳网络技术有限公司 Display method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102088466A (en) * 2009-12-07 2011-06-08 腾讯科技(深圳)有限公司 Micro-blog browsing method and relevant equipment
CN102447647A (en) * 2010-10-13 2012-05-09 腾讯科技(深圳)有限公司 Notification method, device and system based on new information
CN102541852A (en) * 2010-12-07 2012-07-04 奇智软件(北京)有限公司 Client software achieving method for web page application
CN102868590A (en) * 2011-07-08 2013-01-09 腾讯科技(北京)有限公司 Method and system for calling client by embedded webpage
CN103856508A (en) * 2012-11-30 2014-06-11 腾讯科技(深圳)有限公司 Data unvarnished transmission method and corresponding instant communication terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102088466A (en) * 2009-12-07 2011-06-08 腾讯科技(深圳)有限公司 Micro-blog browsing method and relevant equipment
CN102447647A (en) * 2010-10-13 2012-05-09 腾讯科技(深圳)有限公司 Notification method, device and system based on new information
CN102541852A (en) * 2010-12-07 2012-07-04 奇智软件(北京)有限公司 Client software achieving method for web page application
CN102868590A (en) * 2011-07-08 2013-01-09 腾讯科技(北京)有限公司 Method and system for calling client by embedded webpage
CN103856508A (en) * 2012-11-30 2014-06-11 腾讯科技(深圳)有限公司 Data unvarnished transmission method and corresponding instant communication terminal

Also Published As

Publication number Publication date
CN105302590A (en) 2016-02-03

Similar Documents

Publication Publication Date Title
CN105302590B (en) Information processing method and device
US10079854B1 (en) Client-side protective script to mitigate server loading
CN109388762B (en) Application sharing method and device
EP2854372A1 (en) Method and device for displaying pushed information
CN106708496B (en) Processing method and device for label page in graphical interface
JP6945447B2 (en) How to call the local keyboard on the HTML page of the user terminal device and its device
CN111898152B (en) Page display method, electronic equipment and storage medium
CN104980404B (en) Method and system for protecting account information security
CN106649518B (en) Method and device for processing dynamic information data
CN108173814A (en) Detection method for phishing site, terminal device and storage medium
WO2018133772A1 (en) Method, device, storage medium, and electronic device for obtaining webpage resources
CN104881273A (en) Webpage rendering analysis method and terminal device
CN102752371A (en) Method for achieving splash on client side and client side
US20230221952A1 (en) Disabling a script based on indications of unsuccessful execution of the script
CN112905928A (en) Webpage refreshing method and device, electronic equipment and storage medium
WO2015088996A1 (en) Web page rendering on wireless devices
CN105677678A (en) Determination method for first screen positions of pages, webpage information display method and system
CN104571812B (en) Information processing method and electronic equipment
CN105590057B (en) Webpage security index evaluation method and device
CN102957749B (en) A kind of for providing the method for information, device and equipment
CN107968799B (en) Information acquisition method, terminal equipment and system
CN112351009B (en) Network security protection method and device, electronic equipment and readable storage medium
JP2019506783A (en) Terminal control apparatus and method using notification message
CN107463837A (en) A kind of information processing method and mobile terminal
CN107948291B (en) Terminal control method, device and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant