CN110113416B - Method and device for displaying information - Google Patents

Method and device for displaying information Download PDF

Info

Publication number
CN110113416B
CN110113416B CN201910376850.4A CN201910376850A CN110113416B CN 110113416 B CN110113416 B CN 110113416B CN 201910376850 A CN201910376850 A CN 201910376850A CN 110113416 B CN110113416 B CN 110113416B
Authority
CN
China
Prior art keywords
information
state information
user
response
displayed
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
CN201910376850.4A
Other languages
Chinese (zh)
Other versions
CN110113416A (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.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910376850.4A priority Critical patent/CN110113416B/en
Publication of CN110113416A publication Critical patent/CN110113416A/en
Application granted granted Critical
Publication of CN110113416B publication Critical patent/CN110113416B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/75Indicating network or usage conditions on the user display

Abstract

The embodiment of the disclosure discloses a method and a device for displaying information. One embodiment of the method comprises: in response to the detection of the update of the user state of the user, recording the current user state information of the user by using a single instance class, wherein the user state is used for representing the page visited by the user and/or the user operation of the user; responding to the received push information which is sent by the server and comprises the information to be displayed and the matching state information corresponding to the information to be displayed, and determining whether the matching state information is matched with the current user state information by utilizing a single instance; and displaying the information to be displayed in response to the fact that the matching state information is matched with the current user state information. The embodiment realizes the unified management of the relevant processing logic for displaying the information to be displayed.

Description

Method and device for displaying information
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a method and a device for displaying information.
Background
Information push is a technical direction of the internet in a very hot state today. Generally, the server can mine information valuable to the user according to the interest of the user and push the information to the user so as to reduce the time for searching on the network by the user.
In some cases, the information that the server desires to push is based on a specific scenario or a specific occasion. For example, some push information is intended to be presented to a user when the user accesses a certain page. Some push information is intended to be presented to the user when the user performs a certain operation.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for displaying information.
In a first aspect, an embodiment of the present disclosure provides a method for presenting information, the method including: in response to the detection of the update of the user state of the user, recording the current user state information of the user by using a single instance class, wherein the user state is used for representing the page visited by the user and/or the user operation of the user; responding to the received push information which is sent by the server and comprises the information to be displayed and the matching state information corresponding to the information to be displayed, and determining whether the matching state information is matched with the current user state information by utilizing a single instance; and displaying the information to be displayed in response to the fact that the matching state information is matched with the current user state information.
In some embodiments, in response to receiving push information that is sent by a server and includes information to be displayed and matching state information corresponding to the information to be displayed, determining whether the matching state information matches with current user state information by using a singleton class, includes: and in response to the fact that the current user state information belongs to a preset state information set and in response to the fact that push information which is sent by a server and comprises the information to be displayed and matching state information corresponding to the information to be displayed is received, determining whether the matching state information is matched with the current user state information or not by utilizing a single instance class.
In some embodiments, determining whether the matching state information matches the current user state information using a singleton class includes: determining whether the push information meets a preset condition or not by using a singleton class; and in response to determining that the push information meets the preset condition, determining whether the matching state information is matched with the current user state information by using the singleton class.
In some embodiments, the above method further comprises: in response to determining that the matching state information does not match the current user state information, storing the push information; in response to detecting the next update of the user state, recording the latest user state information by using the singleton class, and determining whether the matching state information is matched with the latest user state information; and displaying the information to be displayed in response to determining that the matching state information is matched with the latest user state information.
In some embodiments, in response to determining that the matching state information matches the latest user state information, presenting information to be presented includes: determining whether the push information meets a preset condition or not by using a singleton class; and displaying the information to be displayed in response to the fact that the pushing information meets the preset condition and the matching state information is matched with the latest user state information.
In some embodiments, the information to be presented includes a link address of the target page; and displaying the information to be displayed, including: and displaying the target page indicated by the link address.
In a second aspect, an embodiment of the present disclosure provides an apparatus for presenting information, the apparatus including: the recording unit is configured to record current user state information of the user by using a single instance class in response to detecting the update of the user state of the user, wherein the user state is used for representing the page visited by the user and/or the user operation of the user; the matching unit is configured to respond to the received push information which is sent by the server and comprises the information to be displayed and the matching state information corresponding to the information to be displayed, and determine whether the matching state information is matched with the current user state information by using a single instance; and the display unit is configured to display the information to be displayed in response to the fact that the matching state information is matched with the current user state information.
In some embodiments, the matching unit is further configured to determine, by using a singleton class, whether the matching state information matches the current user state information in response to determining that the current user state information belongs to a preset state information set and in response to receiving push information sent by the server and including the information to be displayed and the matching state information corresponding to the information to be displayed.
In some embodiments, the matching unit is further configured to determine whether the push information meets the preset condition by using a singleton class; and in response to determining that the push information meets the preset condition, determining whether the matching state information is matched with the current user state information by using the singleton class.
In some embodiments, the above apparatus further comprises: a storage unit configured to store the push information in response to determining that the matching state information does not match the current user state information; the matching unit is further configured to record the latest user status information with a singleton class in response to detecting a next update of the user status, and determine whether the matching status information matches the latest user status information; the presentation unit is further configured to present the information to be presented in response to determining that the matching state information matches the latest user state information.
In some embodiments, the presentation unit is further configured to determine whether the push information meets a preset condition by using a singleton class; and displaying the information to be displayed in response to the fact that the pushing information meets the preset condition and the matching state information is matched with the latest user state information.
In some embodiments, the information to be presented includes a link address of the target page; and the presentation unit is further configured to: and displaying the target page indicated by the link address.
In a third aspect, an embodiment of the present disclosure provides a terminal, including: one or more processors; storage means for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method as described in any implementation of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable medium on which a computer program is stored, which computer program, when executed by a processor, implements the method as described in any of the implementations of the first aspect.
According to the method and the device for displaying information, the update of the user state is recorded by using the singleton class, when the push information is received, whether the information to be displayed in the push information needs to be displayed at present is judged by using the singleton class, and when the information needs to be displayed, the information to be displayed is displayed on the terminal equipment corresponding to the user.
In the prior art, it is usually determined whether to display information to be displayed according to respective classes corresponding to respective user states. In this way, the relevant processing logic for displaying the information to be displayed is dispersed in each class, so that unified management is inconvenient, and the relevant processing logic for displaying the information to be displayed is difficult to maintain and update.
According to the method and the device for displaying the information, the updating of the user state and the related processing logic for displaying the information to be displayed are realized by a single instance, so that the related processing logic for displaying the information to be displayed can be managed in a unified manner, and the maintenance and the updating of the related processing logic for displaying the information to be displayed are facilitated.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present disclosure may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for presenting information in accordance with the present disclosure;
FIG. 3 is a schematic diagram of one application scenario of a method for presenting information in accordance with an embodiment of the present disclosure;
FIG. 4 is a flow diagram of yet another embodiment of a method for presenting information in accordance with the present disclosure;
FIG. 5 is a schematic block diagram illustrating one embodiment of an apparatus for presenting information in accordance with the present disclosure;
FIG. 6 is a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary architecture 100 to which embodiments of the disclosed method for presenting information or apparatus for presenting information may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 101, 102, 103 interact with a server 105 via a network 104 to receive or send messages or the like. Various client applications may be installed on the terminal devices 101, 102, 103. Such as browser-type applications, search-type applications, content sharing-type applications, and the like.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices including, but not limited to, smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server that provides various services, such as a backend server that provides support for applications installed on the terminal devices 101, 102, 103. The server 105 may send push information to the applications installed on the terminal devices 101, 102, 103 for presentation by the clients.
It should be noted that the method for presenting information provided by the embodiments of the present disclosure is generally performed by the terminal devices 101, 102, 103, and accordingly, the apparatus for presenting information is generally disposed in the terminal devices 101, 102, 103.
The server 105 may be hardware or software. When the server 105 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server 105 is software, it may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules used to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for presenting information in accordance with the present disclosure is shown. The method for presenting information comprises the following steps:
in step 201, in response to detecting the update of the user state of the user, current user state information of the user is recorded by using a single instance class.
In this embodiment, the user may refer to a user corresponding to an execution subject (such as terminal devices 101, 102, and 103 shown in fig. 1) of the method for presenting information. The user state may be used to characterize the page visited by the user and/or the user's user actions.
The user can access different pages by using the execution main body, and can execute various user operations on the content displayed by the execution main body. The user operation may refer to any operation that the execution agent can receive. Such as a click operation, a comment operation, etc.
An update to a user state may refer to a change in pages visited by the user and/or a change in user operation. For example, a user jumps from one page to another. For another example, the user has performed a certain operation.
The user state information may be used to characterize the user state. The current user state information may be used to characterize the user's current user state. The user status information can be represented in different ways by technicians according to actual application requirements. For example, various different character strings may be set as the user status information to respectively represent different user statuses.
A singleton class may refer to a class that employs a singleton schema. A singleton class may have only one instance, thus ensuring that external operations are all the same instance object. The singleton class may provide a method for recording the current user state information of the user to record the current user state information of the user when the user state is updated. At this time, when the user status is updated, the method for recording the current user status information of the user may be accessed by an instance of the singleton class to record the current user status information of the user.
For example, if the user jumps from page "a" to page "B", the singleton class may record the current user state information as if the user is accessing page "B". For another example, the user has performed a comment operation on page "B". The singleton class may record the current user status information as the comment operation is finished. Of course, in some cases, it may also record the current user status information as that the user is in page "B", and the comment operation is finished.
Step 202, in response to receiving push information which is sent by the server and includes information to be displayed and matching state information corresponding to the information to be displayed, determining whether the matching state information is matched with the current user state information by using a singleton class.
In this embodiment, the information to be presented may be information that is desired to be presented at the execution subject. It should be understood that the information to be presented may also be indicative of the content desired to be presented at the execution body described above. For example, the information to be presented may be a connection address or the like of information desired to be presented at the execution subject described above.
The matching state information corresponding to the information to be displayed may refer to a user state of the user when the information to be displayed is expected to be displayed. That is, when the user status indicated by the status information is matched, the information to be displayed is expected to be displayed.
Alternatively, a connection may be established with the server under control of a singleton class (e.g., a long connection is constructed). The relevant processing logic for establishing communication connection with the server is also written in a single instance class.
Optionally, in response to determining that the current user state information belongs to a preset state information set and in response to receiving push information which is sent by the server and includes the information to be displayed and matching state information corresponding to the information to be displayed, determining whether the matching state information matches with the current user state information by using a singleton class.
Wherein the set of state information may be preset by a technician. The user state indicated by the state information in the state information set may be a user state allowing presentation of the information to be presented. At this time, it may be determined whether the current user status information belongs to the status information set.
If the current user state information does not belong to the state information set, the information to be displayed can be known in time and cannot be displayed. If the current user state information belongs to the state information set, whether the matching state information is matched with the current user state information can be further judged.
Alternatively, it may be determined whether the push information meets the preset condition by using a singleton class. And in response to determining that the push information meets the preset condition, determining whether the matching state information is matched with the current user state information by using the singleton class.
The preset conditions can be set by technicians according to actual application requirements. For example, if there is time-sensitive push information, the preset condition may indicate that the push information is valid.
As an example, the push information may also include an expiration date. At this time, it may be judged whether or not the current time is before the effective date. If the current time is before the valid time, the push information can be indicated to be valid. If the current time is after the valid time, the push information can be indicated to be invalid.
By utilizing the preset condition of the state information set to filter the pushed information in advance, the situation that the pushed information which cannot be displayed or the pushed information which is invalid is further processed can be effectively avoided, and therefore the processing efficiency of the pushed information can be improved.
In this embodiment, it may be compared whether the user status indicated by the matching status information is consistent with the user status indicated by the current user status information. If the user state indicated by the matching state information is consistent with the user state indicated by the current user state information, it may be indicated that the matching state information is matched with the current user state information. On the contrary, if the user status indicated by the matching status information is inconsistent with the user status indicated by the current user status information, it may indicate that the matching status information is not matched with the current user status information.
It should be understood that the push information may also include other information according to different application requirements. For example, the push information may also include an identification of the information to be presented, and the like.
Step 203, responding to the matching state information and the current user state information, and displaying the information to be displayed.
In this embodiment, when it is determined that the matching state information matches the current user state information, the execution subject may present information to be presented. When it is determined that the matching state information does not match the current user state information, the information to be presented may be discarded.
Optionally, before discarding the information to be presented, the reason for discarding, the identification of the discarded information to be presented, and the like may be recorded.
Optionally, the information to be presented may include a connection address of the target page. Wherein, the target page can be a page expected to be displayed. At this time, the execution body may present a target page indicated by the link address. For example, the execution body may open the link address using an application such as a locally installed browser.
The execution main body can also control the display of the information to be displayed by utilizing the single instance class. The control logic that will show the information to be shown is also written in a single instance class.
With continued reference to fig. 3, fig. 3 is a schematic diagram 300 of an application scenario of the method for presenting information according to the present embodiment. In the application scenario of fig. 3, when the user clicks the top page control displayed by the terminal device 301, the page displayed by the terminal device 301 jumps to the top page. At this time, the singleton class 302 may record the current state information as a home page.
If the current day is the valentine's day, the server expects to show a page specially designed for the valentine's day for introducing the current day time-limited activities to the user when the user accesses the home page. At this time, the server 303 may send the push information 304 to the terminal device 301. Wherein, the push information 304 may include the address and the top page of the page to be shown (i.e. the page used for introducing the activity of the current date),
when the terminal device 301 receives the push information 304, since the user is currently accessing the home page, the page to be shown indicated by the address of the page to be shown can be shown on the terminal device 301 (as shown by reference numeral 305 in the figure).
According to the method provided by the embodiment of the disclosure, the updating of the user state and the related processing logic for displaying the information to be displayed are realized through a single instance class, so that the related processing logic for displaying the information to be displayed can be uniformly managed, and the maintenance and the updating of the related processing logic for displaying the information to be displayed are facilitated.
With further reference to FIG. 4, a flow 400 of yet another embodiment of a method for presenting information is shown. The process 400 of the method for presenting information includes the steps of:
in response to detecting the update of the user state of the user, current user state information of the user is recorded by using a single instance class, step 401.
Step 402, in response to receiving push information which is sent by a server and includes information to be displayed and matching state information corresponding to the information to be displayed, determining whether the matching state information is matched with the current user state information by using a singleton class.
And 403, in response to determining that the matching state information is matched with the current user state information, displaying the information to be displayed.
The specific implementation process of the steps 401, 402, and 403 may refer to the related descriptions of the steps 201, 202, and 203 in the corresponding embodiment of fig. 2, and will not be described herein again.
In response to determining that the matching state information does not match the current user state information, step 404, store the push information.
Step 405, in response to detecting the next update of the user status, records the latest user status information with a singleton class, and determines whether the matching status information matches the latest user status information.
Step 406, in response to determining that the matching state information matches the latest user state information, displaying the information to be displayed.
Alternatively, it may be determined whether the push information meets the preset condition by using a singleton class. And displaying the information to be displayed in response to the fact that the pushing information meets the preset condition and the matching state information is matched with the latest user state information.
The preset conditions can be set by technicians according to actual application requirements. For example, if the update time of the current user state is longer than the update time of the last user state, the push information may be invalid. At this time, the preset condition may indicate that the push information is valid. Therefore, whether the push information meets the preset condition or not can be judged firstly, so that the follow-up processing of invalid push information is avoided.
Optionally, in response to determining that the push information does not meet the preset condition, deleting the stored push information to release the storage space.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the method for presenting information in the present embodiment highlights a step of storing the push information instead of directly discarding the push information when the matching state information does not match the current user state information. Therefore, according to the scheme described in this embodiment, when the user status is updated next time, the matching status information in the push information and the current latest user status information can be continuously compared, so that when the matching status information is matched with the current latest user status information, the information to be displayed is displayed to the user. And when the matching state information is not matched with the current user state information, the push information is directly discarded, so that the display rate of the information to be displayed is effectively improved.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides an embodiment of an apparatus for presenting information, which corresponds to the method embodiment shown in fig. 2, and which may be applied in various electronic devices in particular.
As shown in fig. 5, the apparatus 500 for presenting information provided by the present embodiment includes a recording unit 501, a matching unit 502, and a presenting unit 503. The recording unit 501 is configured to record, in response to detecting an update of a user state of a user, current user state information of the user by using a single instance class, where the user state is used to represent a page accessed by the user and/or a user operation of the user; the matching unit 502 is configured to determine whether the matching state information matches with the current user state information by using a singleton class in response to receiving push information sent by the server and including the information to be displayed and the matching state information corresponding to the information to be displayed; the presentation unit 503 is configured to present the information to be presented in response to determining that the matching status information matches the current user status information.
In the present embodiment, in the apparatus 500 for presenting information: the specific processing of the recording unit 501, the matching unit 502 and the displaying unit 503 and the technical effects thereof can refer to the related descriptions of step 201, step 202 and step 203 in the corresponding embodiment of fig. 2, which are not repeated herein.
In some optional implementations of the present embodiment, the matching unit 502 is further configured to: in response to the fact that the current user state information belongs to a preset state information set and in response to the fact that the push information which is sent by the server and comprises the information to be displayed and the matching state information corresponding to the information to be displayed is received, determining whether the matching state information is matched with the current user state information or not by utilizing a single instance
In some optional implementations of the present embodiment, the matching unit 502 is further configured to: determining whether the push information meets a preset condition or not by using a singleton class; and in response to determining that the push information meets the preset condition, determining whether the matching state information is matched with the current user state information by using the singleton class.
In some optional implementations of this embodiment, the apparatus 500 further includes: a storage unit (not shown in the figures) is configured to store the push information in response to determining that the matching state information does not match the current user state information; the matching unit 502 is further configured to record the latest user status information using a singleton class in response to detecting the next update of the user status, and determine whether the matching status information matches the latest user status information; the presentation unit 503 is further configured to present the information to be presented in response to determining that the matching status information matches the latest user status information.
In some optional implementations of this embodiment, the presentation unit 503 is further configured to: determining whether the push information meets a preset condition or not by using a singleton class; and displaying the information to be displayed in response to the fact that the pushing information meets the preset condition and the matching state information is matched with the latest user state information.
In some optional implementation manners of this embodiment, the information to be displayed includes a link address of the target page; and the presentation unit 503 is further configured to: and displaying the target page indicated by the link address.
The device provided by the above embodiment of the present disclosure, in response to detecting the update of the user state of the user, records the current user state information of the user by using a single instance class through the recording unit, where the user state is used to represent a page visited by the user and/or a user operation of the user; the matching unit responds to the received push information which is sent by the server and comprises the information to be displayed and the matching state information corresponding to the information to be displayed, and whether the matching state information is matched with the current user state information or not is determined by utilizing a single instance; the display unit displays the information to be displayed in response to the fact that the matching state information is matched with the current user state information, and achieves updating of the user state and relevant processing logic of the information to be displayed through a single instance, so that the relevant processing logic of the information to be displayed can be managed and displayed in a unified mode, and maintenance and updating of the relevant processing logic of the information to be displayed are facilitated.
Referring now to fig. 6, shown is a schematic diagram of an electronic device (e.g., terminal device in fig. 1) 600 suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the use range of the embodiments of the present disclosure.
As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc., output devices 607 including, for example, a liquid crystal display (L CD), speaker, vibrator, etc., storage devices 608 including, for example, magnetic tape, hard disk, etc., and communication devices 609.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of embodiments of the present disclosure.
It should be noted that the computer readable medium described in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the terminal; or may exist separately and not be assembled into the terminal. The computer readable medium carries one or more programs which, when executed by the terminal, cause the terminal to: in response to the detection of the update of the user state of the user, recording the current user state information of the user by using a single instance class, wherein the user state is used for representing the page visited by the user and/or the user operation of the user; responding to the received push information which is sent by the server and comprises the information to be displayed and the matching state information corresponding to the information to be displayed, and determining whether the matching state information is matched with the current user state information by utilizing a single instance; and displaying the information to be displayed in response to the fact that the matching state information is matched with the current user state information.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including AN object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a recording unit, a matching unit, and a presentation unit. Where the names of the elements do not in some cases constitute a limitation on the elements themselves, for example, a presentation element may also be described as an "element that presents information to be presented in response to determining that the matching status information matches the current user status information.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (10)

1. A method for presenting information, comprising:
in response to the detection of the update of the user state of the user, recording the current user state information of the user by using a method for recording the current user state information of the user, which is provided by a single instance class, wherein the user state is used for representing the page visited by the user and/or the user operation of the user;
responding to the received push information which is sent by a server and comprises the information to be displayed and the matching state information corresponding to the information to be displayed, and determining whether the matching state information is matched with the current user state information or not by using the singleton class, wherein the singleton class is also used for controlling the establishment of communication connection with the server;
and in response to determining that the matching state information is matched with the current user state information, displaying the information to be displayed by using the singleton class control.
2. The method of claim 1, wherein the determining, by using the singleton class, whether the matching state information matches the current user state information in response to receiving push information that is sent by a server and includes information to be displayed and matching state information corresponding to the information to be displayed comprises:
and in response to the fact that the current user state information belongs to a preset state information set and in response to the fact that push information which is sent by a server and comprises information to be displayed and matching state information corresponding to the information to be displayed is received, determining whether the matching state information is matched with the current user state information or not by utilizing the singleton class.
3. The method of claim 1, wherein said determining whether the match status information matches the current user status information using the singleton class comprises:
determining whether the push information meets a preset condition or not by using the singleton class;
and in response to determining that the push information meets a preset condition, determining whether the matching state information is matched with the current user state information by using the singleton class.
4. The method of claim 1, wherein the method further comprises:
in response to determining that the matching state information does not match current user state information, storing the push information;
in response to detecting the next update of the user state, recording the latest user state information by using the singleton class, and determining whether the matching state information is matched with the latest user state information;
and displaying the information to be displayed in response to determining that the matching state information is matched with the latest user state information.
5. The method of claim 4, wherein the presenting the information to be presented in response to determining that the matching state information matches the latest user state information comprises:
determining whether the push information meets a preset condition or not by using the singleton class;
and displaying the information to be displayed in response to determining that the push information meets a preset condition and in response to determining that the matching state information is matched with the latest user state information.
6. The method according to one of claims 1 to 5, wherein the information to be presented comprises a link address of a target page; and
the displaying the information to be displayed comprises:
and displaying the target page indicated by the link address.
7. An apparatus for presenting information, comprising:
the recording unit is configured to record the current user state information of the user by utilizing a method for recording the current user state information of the user, which is provided by a single instance, in response to the detection of the update of the user state of the user, wherein the user state is used for representing the page visited by the user and/or the user operation of the user;
the matching unit is configured to respond to the received push information which is sent by a server and comprises information to be displayed and matching state information corresponding to the information to be displayed, and determine whether the matching state information is matched with the current user state information or not by using the singleton class, wherein the singleton class is also used for controlling the establishment of communication connection with the server;
a presentation unit configured to present the information to be presented using the singleton class control in response to determining that the matching state information matches the current user state information.
8. The apparatus of claim 7, wherein the apparatus further comprises:
a storage unit configured to store the push information in response to determining that the matching state information does not match current user state information;
the matching unit is further configured to record the latest user state information using the singleton class in response to detecting the next update of the user state, and determine whether the matching state information matches the latest user state information;
the presentation unit is further configured to present the information to be presented in response to determining that the matching state information matches the latest user state information.
9. A terminal, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201910376850.4A 2019-05-07 2019-05-07 Method and device for displaying information Active CN110113416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910376850.4A CN110113416B (en) 2019-05-07 2019-05-07 Method and device for displaying information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910376850.4A CN110113416B (en) 2019-05-07 2019-05-07 Method and device for displaying information

Publications (2)

Publication Number Publication Date
CN110113416A CN110113416A (en) 2019-08-09
CN110113416B true CN110113416B (en) 2020-08-07

Family

ID=67488481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910376850.4A Active CN110113416B (en) 2019-05-07 2019-05-07 Method and device for displaying information

Country Status (1)

Country Link
CN (1) CN110113416B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111680243B (en) * 2020-04-16 2023-09-22 上海淇玥信息技术有限公司 Page display method and device, electronic equipment and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7107575B1 (en) * 2002-08-21 2006-09-12 Cisco Technology, Inc. Method and system for providing a single object instance per client-server session
CN106021459A (en) * 2016-05-17 2016-10-12 欢聚时代文化传媒(北京)有限公司 Method and device for pushing rich media information
CN106603125A (en) * 2016-11-29 2017-04-26 新智数字科技有限公司 Method and device of realizing data interaction with Bluetooth device
CN106843953A (en) * 2017-01-16 2017-06-13 百融(北京)金融信息服务股份有限公司 Application program transverse direction switching system and method based on iOS system
CN109544210A (en) * 2018-10-23 2019-03-29 深圳豪客互联网有限公司 A kind of advertisement demonstration method, system and computer readable storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090122573A (en) * 2008-05-26 2009-12-01 주식회사 케이티 Mobile terminal for supporting advertisement service mobile terminal and method thereof
CN101520870A (en) * 2009-04-17 2009-09-02 武汉刻度科技发展有限公司 Visit control method and device of business logic objects
KR102045377B1 (en) * 2013-03-05 2019-11-15 에스케이플래닛 주식회사 Apparatus and terminal for advertisement service, and service method using the same
CN104281574A (en) * 2013-07-01 2015-01-14 腾讯科技(深圳)有限公司 Information recommending method, device and system
CN105549867B (en) * 2014-11-03 2019-09-17 航天信息股份有限公司 One kind being used for .NET forms program display information alert frame method
CN105808636B (en) * 2016-02-03 2020-11-27 北京中搜云商网络技术有限公司 Hypertext link pushing system based on APP information data
CN107577821A (en) * 2017-09-21 2018-01-12 星潮闪耀移动网络科技(中国)有限公司 The method, apparatus and equipment of a kind of information recommendation
CN108965389B (en) * 2018-06-13 2021-07-06 南京尚网网络科技有限公司 Method for displaying information

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7107575B1 (en) * 2002-08-21 2006-09-12 Cisco Technology, Inc. Method and system for providing a single object instance per client-server session
CN106021459A (en) * 2016-05-17 2016-10-12 欢聚时代文化传媒(北京)有限公司 Method and device for pushing rich media information
CN106603125A (en) * 2016-11-29 2017-04-26 新智数字科技有限公司 Method and device of realizing data interaction with Bluetooth device
CN106843953A (en) * 2017-01-16 2017-06-13 百融(北京)金融信息服务股份有限公司 Application program transverse direction switching system and method based on iOS system
CN109544210A (en) * 2018-10-23 2019-03-29 深圳豪客互联网有限公司 A kind of advertisement demonstration method, system and computer readable storage medium

Also Published As

Publication number Publication date
CN110113416A (en) 2019-08-09

Similar Documents

Publication Publication Date Title
WO2020143555A1 (en) Method and device used for displaying information
CN111459364B (en) Icon updating method and device and electronic equipment
CN110619100B (en) Method and apparatus for acquiring data
CN115757400B (en) Data table processing method, device, electronic equipment and computer readable medium
CN110704833A (en) Data permission configuration method, device, electronic device and storage medium
CN111273830A (en) Data display method and device, electronic equipment and computer readable medium
WO2020199659A1 (en) Method and apparatus for determining push priority information
CN111694629A (en) Information display method and device and electronic equipment
US20230385080A1 (en) Method and apparatus for presenting information on lock screen interface, terminal, and storage medium
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN110113416B (en) Method and device for displaying information
CN110442416B (en) Method, electronic device and computer-readable medium for presenting information
CN112905281A (en) View display method and device, electronic equipment and storage medium
CN111756953A (en) Video processing method, device, equipment and computer readable medium
CN110827037A (en) Data interaction method and device based on block chain
CN110619079B (en) Method and device for pushing information
CN111460020B (en) Method, device, electronic equipment and medium for resolving message
CN114327453A (en) Page display method, device, equipment and storage medium
CN113918659A (en) Data operation method and device, storage medium and electronic equipment
CN112685075A (en) Gray scale distribution method and device, electronic equipment and computer readable medium
CN111459893A (en) File processing method and device and electronic equipment
CN111581246A (en) Method, device, electronic equipment and computer readable medium for generating data
CN111580890A (en) Method, apparatus, electronic device, and computer-readable medium for processing features
CN110716699A (en) Method and apparatus for writing data
CN116360710B (en) Data storage method applied to server cluster, electronic device and readable medium

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
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder