CN107544852B - Page information display method and device - Google Patents

Page information display method and device Download PDF

Info

Publication number
CN107544852B
CN107544852B CN201611076342.7A CN201611076342A CN107544852B CN 107544852 B CN107544852 B CN 107544852B CN 201611076342 A CN201611076342 A CN 201611076342A CN 107544852 B CN107544852 B CN 107544852B
Authority
CN
China
Prior art keywords
client
information
page
server
display
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
CN201611076342.7A
Other languages
Chinese (zh)
Other versions
CN107544852A (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 CN201611076342.7A priority Critical patent/CN107544852B/en
Publication of CN107544852A publication Critical patent/CN107544852A/en
Application granted granted Critical
Publication of CN107544852B publication Critical patent/CN107544852B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a page information display method and device. Wherein, the method comprises the following steps: the client acquires information edited in an editing page on the client through an event bus on the client; the client sends the information to a display page on the client through an event bus; and the client displays the information in the display page. The invention solves the technical problems that the display of the user-defined content edited by the user in the page in the related art is delayed and has lower speed.

Description

Page information display method and device
Technical Field
The invention relates to the field of computers, in particular to a page information display method and device.
Background
With the rapid development of internet technology, user demands are increasing, and user original Content (UGC) needs to be published in a page, for example, in a WeChat friend circle. In the related art, a sending process using a relatively wide UGC may be as shown in fig. 1, where in fig. 1, PostActivtity denotes a UGC sending page, in the sending page, a user may edit a to-be-sent UGC, PostAsyncTask denotes an asynchronous task of sending the UGC, and ListActivity denotes a list page presenting the UGC, as shown in fig. 1, the user edits the UGC at PostActivtity, then sends the edited UGC to PostAsyncTask, and after the implementation, a backend server submits the UGC, and displays the UGC in ListActivity after receiving a confirmation message returned by the server. In the related technology, the UGC sending mode is that only after the UGC is successfully submitted to a background server, the page jumps to the UGC list page, and the user can see the UGC which is issued by the user at the moment.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a page information display method and device, which at least solve the technical problems that the display of user-defined contents edited by a user in a page in the related art is delayed and the speed is slow.
According to an aspect of an embodiment of the present invention, there is provided a page information display method, including: the client acquires information edited in an editing page on the client through an event bus on the client; the client sends the information to a display page on the client through an event bus; and the client displays the information in the display page.
According to another aspect of the embodiments of the present invention, there is also provided a page information display apparatus including: the client side is used for acquiring information edited in an editing page on the client side through an event bus on the client side; the first sending unit is used for sending the information to a display page on the client by the client through an event bus; and the first display unit is used for displaying information in the display page by the client.
In the embodiment of the invention, a client is adopted to obtain the information edited in an editing page on the client through an event bus on the client; the client sends the information to a display page on the client through an event bus; the method for displaying the information in the display page by the client sends the information edited in the editing page on the client to the display page through the event bus on the client for displaying, achieves the purpose of quickly displaying the information edited in the editing page on the client in the display page of the client, thereby realizing the technical effects of shortening the time delay of the information edited in the editing page displayed on the client in the display page and accelerating the display speed, and further solving the technical problems of delay and lower speed of displaying the user-defined content edited by the user in the page in the related art.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic diagram of a UGC transmission flow according to the related art;
FIG. 2 is a schematic diagram of a hardware environment of a page information display method according to an embodiment of the present invention;
FIG. 3 is a flow chart of an alternative method of displaying page information according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of the UGC transmission process in accordance with the preferred embodiment of the present invention;
FIG. 5 is a schematic diagram of the system architecture of the UGC transmission process in accordance with the preferred embodiment of the present invention;
FIG. 6 is a schematic diagram of an alternative page information display apparatus according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of an alternative page information display apparatus according to an embodiment of the present invention;
FIG. 8 is a schematic view of an alternative page information display apparatus according to an embodiment of the present invention;
FIG. 9 is a schematic view of an alternative page information display apparatus according to an embodiment of the present invention;
FIG. 10 is a schematic view of an alternative page information display apparatus according to an embodiment of the present invention; and
fig. 11 is a block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, partial terms or terms appearing in the description of the embodiments of the present invention are applied to the following explanations:
IntentService: the android programming method is characterized in that the task execution does not interfere with a UI thread (main thread), the lifecycle of the android programming can be managed by the android programming, and after the task execution is finished, the IntentService can terminate the lifecycle of the android programming and wait for the recovery of related resources by a system.
RxJava: is an open source implementation of Reactivex on Java. Observable and Subscriber are two main classes. On RxJava, an observer is a class that issues data streams or events, and a Subscriber is a class that handles (takes action on) these issued items.
RxBus: is an event bus implemented using Rxjava technology.
UGC: user Generated Content refers to User originated Content, such as Content sent in WeChat friend circles.
AsyncTask: asynchronous tasks which are frequently used in android development can be used for some asynchronous tasks, and main thread resources are not occupied.
Example 1
According to the embodiment of the invention, the embodiment of the method for displaying the page information is provided.
Alternatively, in the present embodiment, the page information display method described above may be applied to a hardware environment formed by the server 102 and the terminal 104 as shown in fig. 2. As shown in fig. 2, server 102 is connected to terminals 104 via a network, including but not limited to: the terminal 104 is not limited to a PC, a mobile phone, a tablet computer, etc. in a wide area network, a metropolitan area network, or a local area network. The page information display method according to the embodiment of the present invention may be executed by the server 102, or executed by the terminal 104, or executed by both the server 102 and the terminal 104. The terminal 104 may execute the page information display method according to the embodiment of the present invention by a client installed thereon.
Fig. 3 is a flowchart of an alternative page information display method according to an embodiment of the present invention, and as shown in fig. 3, the method may include the following steps:
step S202, the client acquires information edited in an editing page on the client through an event bus on the client;
step S204, the client sends the information to a display page on the client through an event bus;
in step S206, the client displays information in the display page.
Through the steps S202 to S206, the information edited in the editing page on the client is sent to the display page through the event bus on the client for display, so that the purpose of quickly displaying the information edited in the editing page on the client in the display page of the client is achieved, the technical problems that the custom content edited by the user is delayed and the speed is slow when the custom content is displayed in the page in the related art are solved, the time delay of the information edited in the editing page displayed on the client in the display page is shortened, and the display speed is accelerated.
In the technical solution provided in step S202, the type of the client is not specifically limited in the embodiment of the present invention, and for example, the client may be an instant messaging client (e.g., WeChat), or a game client. The client can be installed on the terminal, the type and the model of the terminal are not particularly limited in the embodiment of the invention, and the terminal can be a PC, a mobile phone, a tablet computer and the like. The client in the embodiment of the present invention may have an editing page, and the user may edit information in the editing page, wherein the type of the information edited by the user in the editing page is not specifically limited by the present invention, and the information edited by the user in the editing page may include but is not limited to: text, pictures, audio, video, etc.
The event bus on the client in the embodiment of the invention is equivalent to a master controller or a master dispatching desk of the client, and the event bus can uniformly dispatch and distribute a plurality of events or a plurality of tasks in the client. In an actual application scenario, an event bus on a client may detect whether there is information edited in an editing page of the client in real time, and when the information is detected to exist, the client may acquire the information edited in the editing page of the client by a user using the event bus on the client.
Taking the posting of the friend circle at the wechat client as an example, the user can edit the friend circle information to be sent in an editing page (namely, a friend circle posting page) of the wechat client, and after the user edits the friend circle information to be sent, the user can trigger an event bus on the wechat client to immediately acquire the friend circle information to be sent edited by the user by clicking a sending button.
In the technical solution provided in step S204, the client in the embodiment of the present invention may further have a display page, and the information edited in the editing page on the client by the user may be displayed in the display page, which may include but is not limited to: text, pictures, audio, video, etc. Taking the case of posting a friend circle at the WeChat client as an example, the editing page of the WeChat client can be a friend circle posting page, in the friend circle posting page, the user can edit the friend circle information to be sent, the display page of the WeChat client can be a friend circle refreshing page, and in the friend circle refreshing page, the sent friend circle information of the user and the WeChat friends of the user can be displayed.
After the event bus on the client acquires the information edited in the edit page on the client by the user, the information can be encapsulated into a message body, and the message body is sent to the display page on the client.
It should be noted that, in the embodiment of the present invention, the edit page and the display page of the client are displayed as an editable page and a display page at the front end of the client, and may be two data structures at the background of the client, and the behavior of the user on the edit page at the front end of the client in the background may be an editing operation on the data structure corresponding to the edit page. The editing page and the display page on the client can perform data transmission between the two data structures corresponding to the client background through an event bus on the client.
In the technical solution provided in step S206, after the display page on the client receives the message body sent by the event bus on the client, the message body may be analyzed, information edited by the editing page on the client by the user is obtained from the message body, and the information is displayed in the display page. It should be noted that, in the embodiment of the present invention, a display manner and a display position of information in a display page are not specifically limited, taking posting a friend circle at a wechat client as an example, after a user edits friend circle information to be sent in a friend circle posting page of the wechat client and clicks a "send" button, the friend circle information may be displayed at an uppermost position of a friend circle refreshing page of the wechat client.
It should be noted that, in the page information display method of the embodiment of the present invention, the information edited by the user in the editing page on the client is sent to the display page on the client through the event bus on the client for display, and compared with the case where the client sends the information edited in the editing page on the client to the server, and the edited information is displayed in the display page on the client after the server confirms that the information is successfully received.
For the above steps S202 to S206, taking the case of publishing a friend circle at the wechat client as an example, specifically: the user can edit friend circle information to be sent in an editing page (namely a friend circle publishing page) of the WeChat client, the user clicks a sending button after the editing is finished, at the moment, an event bus on the WeChat client immediately acquires the friend circle information to be sent and sends the friend circle information to a display page (namely a friend circle refreshing page) on the WeChat client for displaying, the process can be shown in the front end of the WeChat client that the user clicks the sending button, the page directly jumps to the friend circle refreshing page from the friend circle publishing page, the jumping process is very short, and the user experience is very good.
It should be noted that, in the page information display method of the embodiment of the present invention, while the event bus on the client sends the information edited in the editing page of the user on the client to the display page on the client, the information may also be sent to the server, so that the server may record and store the information, and further, the friend of the user at the client may share the information edited by the user, for example, after the first user at the wechat client sends the friend circle information, the wechat friend of the first user may share the friend circle information sent by the first user in the wechat client that the first user logs in. It should be further noted that, after the client sends the information edited by the user in the edit page on the client to the server, the server may successfully receive the information or may not successfully receive the information, and after the server successfully receives the information, the server may return a confirmation message to the event bus on the client to notify the event bus that the information has been successfully received; when the server fails to receive the message sent by the client to the server, the server may return a failure message to the event bus on the client to notify the event bus that the message was not successfully received.
For the case that the server successfully receives the information edited by the user in the edit page on the client, which is sent by the event bus on the client, see the following detailed description of the alternative embodiment, which is specifically as follows:
as an alternative embodiment, when the client sends information to the display page on the client through the event bus, the alternative embodiment may further include the following steps:
in step S2052, the client sends the information to the server.
In the technical solution provided in step S2052, while the client sends the information edited by the user in the editing page on the client to the display page on the client through the event bus, the client may send the information edited by the user in the editing page on the client to the server at the same time. Optionally, the optional embodiment may instantiate an IntentService in the Activity sending the information, where the IntentService has an independent life cycle, and after the task is executed, the life cycle may be terminated, and the system waits for the recovery of the relevant resource. And sending the information edited by the editing page of the user on the client by using the IntentService. After the user finishes editing the information on the editing page, the IntentService can be delivered to the server. After receiving the information edited by the user in the editing page on the client, the server can perform relevant processing on the information and then record and store the information, so that other clients can quickly and accurately send the information to other clients when requesting the information from the server.
Step S2054, when the client receives the confirmation message returned by the server through the event bus, the client parses the first state parameter from the confirmation message, where the confirmation message is a message that is fed back to the client after the server successfully receives the information.
In the technical solution provided in step S2054, after the server successfully receives the information sent by the event bus on the client, the server may return an acknowledgement message to the event bus, where the acknowledgement message may be used to indicate that the server has successfully received the information. The confirmation message returned by the server may carry a first status parameter, where the first status parameter may be used to identify a display status, such as a display time, a display location, and the like, of information edited by the user in the editing page in the display page. Alternatively, the first state parameter may include, but is not limited to: the time when the server receives the information; the model of the terminal where the client is located; the location of the client, etc. After the event bus receives the confirmation message returned by the server, the client can analyze the confirmation message, and analyze the confirmation message to obtain the first state parameter.
In step S2056, the client sends the first state parameter to the display page through the event bus.
In the technical solution provided in step S2056, after the client analyzes the first state parameter from the confirmation message, the client may send the first state parameter to the display page through the event bus, so as to display the first state parameter in the display interface, thereby completing and supplementing the information displayed in the display page.
In step S2058, the client displays the first state parameter on a position adjacent to the information in the display page.
In the technical solution provided in step S2058, the information edited by the user in the edit page is displayed in the display page on the client, and after the client analyzes the confirmation message returned from the server to obtain the first status parameter, the first status parameter may be displayed at a position adjacent to the information in the display page. It should be further noted that, in this embodiment, the adjacent position is not specifically limited, and the first state parameter may be located at an adjacent position above, below, to the left, and to the right of the above information.
Through the steps S2052 to S2058, the first state parameter obtained by parsing the confirmation message returned from the server is displayed at the position adjacent to the information in the display page, so that the display state of the information edited by the user in the editing page in the display page can be visually presented in the display page.
It should be noted that, it is assumed that a first user logs in a client by using a first terminal, a second user logs in the client by using a second terminal, and the second user is a friend of the first user in the client. After only performing step S202, step S204, and step S206, the information edited by the first user in the edit page of the client may be displayed in the display page of the client in the first terminal, but the display information may be viewed by only the first user, and the second user cannot be viewed in the display page of the client in the second terminal. After step S202, step S204, step S2052 to step S2058, and step S206 are executed, information edited by the first user in the edit page of the client and the first state parameter may be displayed in the display page of the client in both the first terminal and the second terminal, that is, the first user may view the display information in the display page of the client in the first terminal, and the second user may view the display information in the display page of the client in the second terminal.
As an alternative embodiment, after the client receives the acknowledgement message returned by the server on the event bus, or when the client sends the information to the display page on the client through the event bus, the embodiment may further include the following steps:
step S20551, the client sends the second state parameter of the client to a display page through the event bus;
in step S20553, the client displays the second status parameter in the display page at a position adjacent to the information.
It should be noted that, in the last optional embodiment of the present invention, the first status parameter may include time when the server receives the information, a model of a terminal where the client is located, and a location of the client, and the information included in the first status parameter is obtained by parsing the information after the event bus receives the acknowledgment message returned by the server. And the first status parameter in this alternative embodiment only includes the time when the server receives the information, the second status parameter includes the model of the terminal where the client is located and the location of the client, wherein, the first state parameter is analyzed and obtained from the event bus after receiving the confirmation message returned by the server and is sent to the display page, the second state parameter is pre-acquired by the client through self configuration, and can be sent to a display page on the client through the event bus after the event bus receives the confirmation message returned by the server, it is also possible that while the client sends the information edited by the user in the edit page to the display page on the client through the event bus, and sending the second state parameter to a display page on the client through the event bus so as to display the second state parameter at the adjacent position of the information in the display page on the client.
The optional embodiment may be a substitute for the previous optional embodiment of the present invention, in which the second state parameter may be sent to the display page on the client through an event bus on the client, and the second state parameter does not need to be analyzed from a confirmation message returned by the server, so that the time delay of the display page of the second state parameter on the client can be further shortened, and further, the display speed of the second state parameter in the display page is increased, and the user experience is improved.
For the case that the server fails to receive the information edited by the user in the edit page on the client sent by the event bus on the client, refer to the following detailed description of the alternative embodiment, which is specifically as follows:
as an optional embodiment, after the client sends the information to the server, the optional embodiment may further include:
step S20532, when receiving a failure message returned by the server, the client resends the information to the server, where the failure message is used to indicate that the server has not successfully received the information.
It should be noted that, if the server fails to successfully receive the information edited in the edit page by the user sent by the client, the server may return a failure message to the client on the client, where the failure message may be used to indicate that the server fails to successfully receive the information. After receiving the failure message, the client may perform a retransmission operation on the information edited by the user in the editing page. It should be noted here that, in the optional embodiment, the RxJava technology is used to ensure the success rate of information transmission, that is, the client may send the edited information to IntentService, and the IntentService forwards the information to the server, and if the server fails to receive the information, a failure message is returned to the IntentService, and at this time, the embodiment starts an RxJava retransmission mechanism, and retransmits the information to the server.
The embodiment returns the failure message to the client at the server, and the success rate of information sending can be ensured by sending the information to the server again, so that the purpose of improving the user experience is achieved.
As an alternative embodiment, after the client resends the information to the server, the alternative embodiment may further include the following steps:
step S20534 of recording the number of retransmissions of the information;
in step S20536, when the number of retransmissions exceeds the predetermined threshold, the client transmits a notification message to the event bus, where the notification message is used to notify the event bus that the display page is instructed to cancel the display information.
It should be noted that, after the first retransmission of the information by the client, the optional embodiment may record the retransmission number of the information, and determine whether the retransmission number exceeds a predetermined threshold, where the embodiment of the present invention does not specifically limit the predetermined threshold, and may set or adjust the predetermined threshold according to actual requirements, and when it is determined that the retransmission number does not exceed the predetermined threshold, if the retransmission server still fails to receive the information successfully, the client may continue to retransmit the information after receiving a failure message returned by the server; when it is determined that the number of retransmissions exceeds the predetermined threshold, the client may send a notification message to the event bus to notify the event bus to instruct the display page on the client to cancel displaying the information, where the notification message may be used to notify the event bus to instruct the display page on the client to cancel displaying the information.
Optionally, when the server still fails to receive the information after repeated retransmission, the client may send a reminding message to the user to remind the user whether the edited information is unsuccessfully sent, edited again or sent again, so that interaction with the user can be increased to a certain extent, the success rate of information sending can be improved, and further the use experience of the user is improved.
The optional embodiment can ensure the success rate of information transmission through an information retransmission mechanism, and determines whether to cancel the information display by judging whether the retransmission times exceeds a preset threshold value in the information retransmission process, so that the information displayed in the display page of the client is effective information, the effective information can be information which is successfully received and recorded and stored by the server, and the use experience of a user is further improved.
The invention also provides a preferred embodiment, which provides a method for sending UGC with better experience by using IntentService and RxJava, the method instantiates one IntentService in the Activity for sending UGC, the IntentService is specially responsible for sending UGC, and the method is different from PostAsyncTask in that the IntentService does not need to be hosted in the Activity and has an independent life cycle, therefore, once a user edits the UGC, the UGC to be sent is handed to the IntentService for sending, and the page for editing the UGC can be destroyed. Meanwhile, the UGC to be sent can be encapsulated into a message body and written into the RxBus by the method, at the moment, the UGC list page finds that the UGC message to be sent on the RxBus is to be sent, the message is obtained, UGC content is analyzed from the message, and the UGC content is presented on the UGC list page. So far the UGC seen by the user has been transmitted, the user is given the perception that UGC was transmitted on the order of seconds. However, at this time, intetsecrce still interacts with the server to push the UGC content to the server, until the success, intetsecrce writes a message that the UGC was successfully sent upward, and the UGC list page at this time takes this message, parses out the UGC-related state change message, updates the UGC-related UGC content in the UGC list page, and completes the whole process.
In an actual application scenario, the method comprises the following specific operation steps:
(1) defining a PostUGCIntentservice, which is inherited to the Intentservice, needing to realize an onHandleIntent method, realizing the interaction with a background server in the onHandleIntent method, and sending UGC to the background server.
(2) The process of using RxJava package sending is to configure the path of the background server and the content of UGC needing to be sent, then write successful and failed callback functions, and write UGC change information returned by the background into an event bus RxBus in the successful and failed callback functions.
(3) And assembling the PostUGCIntentservice with the number and the transmitting method of the RxJava package, and thus finishing the whole steps. The mode of use is very simple, and the specific code is as follows:
Figure BDA0001165863470000131
Figure BDA0001165863470000141
the sending process of the UGC of the preferred embodiment may be as shown in fig. 4, where PostActivity in fig. 4 represents a UGC publishing page, a user may edit the UGC to be sent in the publishing page, IntentService represents a service sending the UGC, ListActivity represents a list page presenting the UGC, and RxBus represents an event bus on the client. As shown in fig. 4, the PostActivity may obtain the edited UGC, pull up the IntentService, send the edited UGC to the IntentService, and the IntentService may forward the edited UGC to the server, and meanwhile, the PostActivity may also send the edited UGC to the event bus RxBus, and the RxBus sends the edited UGC to the ListActivity for display after receiving the edited UGC. After the server successfully receives the edited UGC and returns a confirmation message to the IntentService, the IntentService can inform the RxBus that the UGC is successfully sent, the RxBus can analyze the state parameters of the UGC from the RxBus after receiving the notification and send the state parameters to the ListActivity, and the ListActivity can update the related fields of the UGC by using the state parameters.
The system architecture of the UGC sending process of the preferred embodiment may be as shown in fig. 5, where the UGC sending page, the UGC list page, the RxBus, the IntentService sending UGC service, and the RxJava retry mechanism are all on the client, and the server is on the background server. The UGC publication page can obtain the edited UGC and send the UGC to IntentService, the IntentService can forward the UGC to the server, meanwhile, the UGC publication page can also send the UGC to RxBus, and the RxBus sends the received UGC to the UGC list page for display. The server can send a result notification to the IntentService after successfully receiving the UGC, and if the result notification is a message reception failure notification, the RxJava retransmission mechanism is started to retransmit the UGC to the server by using the IntentService; if the result notification is a message reception success notification, the IntentService can send the notification to the RxBus, and the RxBus sends a result updating notification to the UGC list page after receiving the notification, so that the UGC related field is updated by using the state parameter of the UGC obtained through analysis.
Compared with the traditional UGC sending mode, the preferred embodiment is obviously a great improvement on user experience, and can realize a mechanism of automatically retrying sending when sending errors occur due to the combination of an RxJava technology, thereby ensuring the success rate of sending the UGC, and meanwhile, an event bus realized by RxBus is adopted, so that the UGC sending success and failure can be timely notified to the UGC list page.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
According to the embodiment of the invention, the page information display device for implementing the page information display method is also provided. Fig. 6 is a schematic diagram of an alternative page information display apparatus according to an embodiment of the present invention, and as shown in fig. 6, the apparatus may include:
an obtaining unit 22, configured to obtain, by the client, information edited in an editing page on the client through an event bus on the client; a first sending unit 24, configured to send information to a display page on the client through an event bus by the client; and a first display unit 26 for the client to display information in the display page.
It should be noted that the acquiring unit 22 in this embodiment may be configured to execute step S202 in embodiment 1 of this application, the first sending unit 24 in this embodiment may be configured to execute step S204 in embodiment 1 of this application, and the first displaying unit 26 in this embodiment may be configured to execute step S206 in embodiment 1 of this application.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of embodiment 1 described above. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 2, and may be implemented by software or hardware.
As an alternative embodiment, as shown in fig. 7, the page information display device of this embodiment may further include: a second sending unit 252, configured to send information to the server when the client sends the information to the display page on the client through the event bus; the parsing unit 254 is configured to, when the client receives a confirmation message returned by the server through the event bus, parse the first state parameter from the confirmation message, where the confirmation message is a message that the server successfully receives the information and then feeds back the information to the client; a third sending unit 256, configured to send the first state parameter to the display page through the event bus by the client; and a second display unit 258, configured to display the first state parameter in a display page at a position adjacent to the information by the client.
It should be noted that the second sending unit 252 in this embodiment may be configured to execute step S2052 in embodiment 1 of this application, the parsing unit 254 in this embodiment may be configured to execute step S2054 in embodiment 1 of this application, the third sending unit 256 in this embodiment may be configured to execute step S2056 in embodiment 1 of this application, and the second displaying unit 258 in this embodiment may be configured to execute step S2058 in embodiment 1 of this application.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of embodiment 1 described above. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 2, and may be implemented by software or hardware.
As an alternative embodiment, as shown in fig. 8, the page information display device of this embodiment may further include: a fourth sending unit 2551, configured to, after the client receives the confirmation message returned by the server on the event bus, or when the client sends information to the display page on the client through the event bus, send the second state parameter of the client to the display page through the event bus; and a third display unit 2553, configured to display the second state parameter in a position where the information is adjacent in the display page by the client.
It should be noted that the fourth sending unit 2551 in this embodiment may be configured to execute step S20551 in embodiment 1 of this application, and the third displaying unit 2553 in this embodiment may be configured to execute step S20553 in embodiment 1 of this application.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of embodiment 1 described above. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 2, and may be implemented by software or hardware.
As an alternative embodiment, as shown in fig. 9, the page information display device of this embodiment may further include: a retransmission unit 2532, configured to, after the client sends the information to the server, when a failure message returned by the server is received, the client resends the information to the server, where the failure message is used to indicate that the server has not successfully received the information.
It should be noted that the retransmission unit 2532 in this embodiment can be used to execute step S20532 in embodiment 1 of this application.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of embodiment 1 described above. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 2, and may be implemented by software or hardware.
As an alternative embodiment, as shown in fig. 10, the page information display device of this embodiment may further include: a recording unit 2534, configured to record the number of retransmissions of the information after the client retransmits the information to the server; a fifth sending unit 2536, configured to, when the number of retransmissions exceeds a predetermined threshold, send a notification message to the event bus, where the notification message is used to notify the event bus that the display page is instructed to cancel the display information.
It should be noted that the recording unit 2534 in this embodiment may be configured to execute step S20534 in embodiment 1 of this application, and the fifth transmitting unit 2536 in this embodiment may be configured to execute step S20536 in embodiment 1 of this application.
As an alternative embodiment, the first status parameter may comprise at least one of: the time when the server receives the information; the model of the terminal where the client is located; the location of the client.
As an alternative embodiment, the first status parameter may include a time when the server receives the information, and the second status parameter may include at least one of: the model of the terminal where the client is located; the location of the client.
Through the module, the purpose of quickly displaying the information edited in the editing page on the client in the display page of the client is achieved, the technical problems that the user-defined content edited by a user is delayed and slow to display in the page in the related art are solved, the time delay of the information edited in the editing page displayed on the client in the display page is shortened, and the display speed is accelerated.
Example 3
According to the embodiment of the invention, the terminal for implementing the page information display method is also provided.
Fig. 11 is a block diagram of a terminal according to an embodiment of the present invention, and as shown in fig. 11, the terminal may include: one or more processors 201 (only one of which is shown), a memory 203, and a transmission means 205, as shown in fig. 11, the terminal may further include an input/output device 207.
The memory 203 may be used to store software programs and modules, such as program instructions/modules corresponding to the page information display method and apparatus in the embodiments of the present invention, and the processor 201 executes various functional applications and data processing by running the software programs and modules stored in the memory 203, that is, implements the above-mentioned page information display method. The memory 203 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 203 may further include memory located remotely from the processor 201, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 205 is used for receiving or sending data via a network, and can also be used for data transmission between a processor and a memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 205 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 205 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Wherein the memory 203 is specifically used for storing application programs.
The processor 201 may call the application stored in the memory 203 via the transmission means 205 to perform the following steps: the client acquires information edited in an editing page on the client through an event bus on the client; the client sends the information to a display page on the client through an event bus; and the client displays the information in the display page.
The processor 201 is further configured to perform the following steps: when the client sends the information to a display page on the client through the event bus, the client sends the information to the server; when the client receives a confirmation message returned by the server through the event bus, the first state parameter is analyzed from the confirmation message, wherein the confirmation message is a message fed back to the client after the server successfully receives the message; the client sends the first state parameter to a display page through an event bus; the client displays the first state parameter on the position adjacent to the information in the display page.
The processor 201 is further configured to perform the following steps: after the client receives the confirmation message returned by the server on the event bus, or when the client sends the information to the display page on the client through the event bus, the client sends the second state parameter of the client to the display page through the event bus; and the client displays the second state parameter on a position adjacent to the information in the display page.
The processor 201 is further configured to perform the following steps: after the client sends the information to the server, the client sends the information to the server again when receiving a failure message returned by the server, wherein the failure message is used for indicating that the server does not successfully receive the information.
The processor 201 is further configured to perform the following steps: recording the retransmission times of the information after the client retransmits the information to the server; and when the retransmission times exceed a preset threshold value, the client sends a notification message to the event bus, wherein the notification message is used for notifying the event bus that the display page is instructed to cancel the display information.
The embodiment of the invention provides a page information display scheme. The information edited in the editing page on the client is sent to the display page through the event bus on the client for display, so that the purpose of quickly displaying the information edited in the editing page on the client in the display page of the client is achieved, the technical problems that the custom content edited by a user is delayed and the speed is slow when the user displays the custom content in the page in the related art are solved, the time delay of the information edited in the editing page displayed on the client in the display page is shortened, and the technical effect of accelerating the display speed is achieved.
Optionally, the specific examples in this embodiment may refer to the examples described in embodiment 1 and embodiment 2, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 11 is only an illustration, and the terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 11 is a diagram illustrating a structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 11, or have a different configuration than shown in FIG. 11.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Example 4
The embodiment of the invention also provides a storage medium. Alternatively, in this embodiment, the storage medium may be a program code for executing the page information display method.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
s1, the client side obtains the information edited in the editing page on the client side through the event bus on the client side;
s2, the client sends the information to the display page on the client through the event bus;
s3, the client displays the information in the display page.
Optionally, the storage medium is further arranged to store program code for performing the steps of: when the client sends the information to a display page on the client through the event bus, the client sends the information to the server; when the client receives a confirmation message returned by the server through the event bus, the first state parameter is analyzed from the confirmation message, wherein the confirmation message is a message fed back to the client after the server successfully receives the message; the client sends the first state parameter to a display page through an event bus; the client displays the first state parameter on the position adjacent to the information in the display page.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the client receives the confirmation message returned by the server on the event bus, or when the client sends the information to the display page on the client through the event bus, the client sends the second state parameter of the client to the display page through the event bus; and the client displays the second state parameter on a position adjacent to the information in the display page.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the client sends the information to the server, the client sends the information to the server again when receiving a failure message returned by the server, wherein the failure message is used for indicating that the server does not successfully receive the information.
Optionally, the storage medium is further arranged to store program code for performing the steps of: recording the retransmission times of the information after the client retransmits the information to the server; and when the retransmission times exceed a preset threshold value, the client sends a notification message to the event bus, wherein the notification message is used for notifying the event bus that the display page is instructed to cancel the display information.
Optionally, the specific examples in this embodiment may refer to the examples described in embodiment 1 and embodiment 2, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (12)

1. A page information display method is characterized by comprising the following steps:
when a sending button in an editing page on a client is clicked, triggering the client to acquire information edited in the editing page on the client through an event bus on the client, wherein the information is original content of a user to be sent;
the client sends the information to a display page on the client through the event bus; and
the client jumps to the display page from the editing page and displays the information in the display page;
wherein, when the client sends the information to a display page on the client through the event bus, the method further comprises: the client sends the information to a server;
when a failure message returned by the server is received, the client resends the information to the server, wherein the failure message is used for indicating that the server does not successfully receive the information;
recording the number of retransmissions of said information; and when the retransmission times exceed a preset threshold value, the client sends a notification message to the event bus, wherein the notification message is used for notifying the event bus to indicate the display page to cancel the display of the information.
2. The method of claim 1, further comprising:
when the client receives a confirmation message returned by the server through the event bus, analyzing a first state parameter from the confirmation message, wherein the confirmation message is a message fed back to the client after the server successfully receives the information;
the client sends the first state parameter to the display page through the event bus;
and the client displays the first state parameter on a position adjacent to the information in the display page.
3. The method of claim 2, wherein after the client receives the confirmation message returned by the server on the event bus or when the client sends the information to a display page on the client through the event bus, the method further comprises:
the client sends the second state parameter of the client to the display page through the event bus;
and the client displays the second state parameter on a position adjacent to the information in the display page.
4. The method of claim 2, wherein the first state parameter comprises at least one of:
the time at which the server received the information;
the model of the terminal where the client is located;
a location of the client.
5. The method of claim 3, wherein the first status parameter comprises a time at which the server received the information, and wherein the second status parameter comprises at least one of: the model of the terminal where the client is located; a location of the client.
6. A page information display apparatus, comprising:
the client side obtains information edited in the editing page on the client side through an event bus on the client side when a sending button in the editing page on the client side is clicked, wherein the information is original content of a user to be sent;
the first sending unit is used for sending the information to a display page on the client by the client through the event bus; and
the first display unit is used for jumping from the editing page to the display page by the client and displaying the information in the display page;
the second sending unit is used for sending the information to a server by the client when the client sends the information to a display page on the client through the event bus;
a retransmission unit, configured to, after the client sends the information to a server, when a failure message returned by the server is received, the client resends the information to the server, where the failure message is used to indicate that the server has not successfully received the information;
a recording unit, configured to record the number of times of retransmission of the information after the client retransmits the information to the server;
a fifth sending unit, configured to, when the number of retransmissions exceeds a predetermined threshold, send, by the client, a notification message to the event bus, where the notification message is used to notify the event bus that the display page cancels the display of the information.
7. The apparatus of claim 6, further comprising:
the analysis unit is used for analyzing a first state parameter from the confirmation message when the client receives the confirmation message returned by the server through the event bus, wherein the confirmation message is a message fed back to the client after the server successfully receives the information;
a third sending unit, configured to send, by the client, the first state parameter to the display page through the event bus;
and the second display unit is used for displaying the first state parameter on the position adjacent to the information in the display page by the client.
8. The apparatus of claim 7, further comprising:
a fourth sending unit, configured to, after the client receives, in the event bus, a confirmation message returned by the server, or when the client sends the information to a display page on the client through the event bus, send, by the client, a second state parameter of the client to the display page through the event bus;
and the third display unit is used for displaying the second state parameter on the position adjacent to the information in the display page by the client.
9. The apparatus of claim 7, wherein the first state parameter comprises at least one of:
the time at which the server received the information;
the model of the terminal where the client is located;
a location of the client.
10. The apparatus of claim 8, wherein the first status parameter comprises a time at which the server receives the information, and wherein the second status parameter comprises at least one of: the model of the terminal where the client is located; a location of the client.
11. A computer-readable storage medium comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 5.
12. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 5 by means of the computer program.
CN201611076342.7A 2016-11-29 2016-11-29 Page information display method and device Active CN107544852B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611076342.7A CN107544852B (en) 2016-11-29 2016-11-29 Page information display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611076342.7A CN107544852B (en) 2016-11-29 2016-11-29 Page information display method and device

Publications (2)

Publication Number Publication Date
CN107544852A CN107544852A (en) 2018-01-05
CN107544852B true CN107544852B (en) 2020-08-11

Family

ID=60966826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611076342.7A Active CN107544852B (en) 2016-11-29 2016-11-29 Page information display method and device

Country Status (1)

Country Link
CN (1) CN107544852B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284098A (en) * 2018-09-25 2019-01-29 四川长虹电器股份有限公司 Method based on RxJava building event bus RxBus

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100251783B1 (en) * 1997-10-18 2000-06-01 윤종용 Apparatus for displaying short message transmission state in mobile radio terminal equipment and method thereof
CN101291490A (en) * 2008-05-30 2008-10-22 宇龙计算机通信科技(深圳)有限公司 Mobile terminal, method and system thereof for short message sending, receiving and displaying
CN102025759B (en) * 2009-09-16 2013-04-17 中国电信股份有限公司 Method and system for providing user generated content (UGC) sharing businesses in real time
CN103634198B (en) * 2012-08-29 2018-07-27 深圳市京弘全智能科技股份有限公司 A kind of interface display method and device of instant communication software
CN103906066B (en) * 2012-12-27 2016-03-23 腾讯科技(北京)有限公司 The harassing and wrecking screen method that a kind of user-generated content is mentioned and device
CN104113572B (en) * 2013-04-19 2018-09-28 腾讯科技(深圳)有限公司 Dissemination method, system and the fore device of user-generated content
CN103402172B (en) * 2013-06-25 2016-12-28 百度在线网络技术(北京)有限公司 The display packing of a kind of short message, device and system
CN103399745A (en) * 2013-07-31 2013-11-20 北京小米科技有限责任公司 Method, device and terminal device for sending instant messages

Also Published As

Publication number Publication date
CN107544852A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
CN108536468A (en) Profile acquisition method, providing method, device and equipment
CN110113252B (en) Method and device for processing applet notification message and computer storage medium
US10530716B2 (en) Voice chat mode self-adapting method and apparatus
TWI609342B (en) System and method of an enterprise mobile message
CN111835837B (en) Message pushing method and system with multi-terminal adaptation
CN108712320B (en) Message pushing method and device
CN111901225B (en) Message prompting method and device, storage medium and electronic device
CN111917843A (en) Message pushing method, computer equipment and storage medium
CN105407407A (en) Video playing method and device
CN108900627B (en) Network request method, terminal device and storage medium
CN105871955A (en) Distributed file system-based processing method, server and client
CN108170609A (en) Localization method, device, computer equipment and the readable storage medium storing program for executing of program bug
CN109408251B (en) Message sending method and device and message receiving processing method and device
US9614900B1 (en) Multi-process architecture for a split browser
CN107544852B (en) Page information display method and device
CN106302093B (en) Communication method, system and server
CN114663057A (en) Workflow management system, method and electronic equipment
CN105337926B (en) Multi-terminal linkage method and related equipment and system
EP2814201A1 (en) Notification message sending method, system, manipulation apparatus, and terminal device
CN111346386B (en) Message processing method and device
CN108268183B (en) Method and device for processing communication message in data object information page
WO2016090328A1 (en) Processing unstructured messages
CN107423446A (en) New media based on cloud storage automates credible deployment system and method
CN109408104B (en) Method and device for acquiring game integration information
CN109243437A (en) Reminding method, device, storage medium and the electronic device of information

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