A method, client, medium and device for playing information stream
By inserting placeholders in the parent page container in the live broadcast or video mobile app to bind the target information flow, the problem of users being unable to return to the original information flow is solved, the user's viewing interest and retention rate are improved, and the information flow is realized Seamless switching and continuous browsing.
Patent Information
- Application Number
- CN202210917091.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-01
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2042-08-01
AI Technical Summary
After users switch information flow in live broadcast or video mobile apps, they cannot conveniently return to the original information flow, resulting in a decrease in user viewing interest and a decrease in retention rate.
By inserting placeholders in the parent page container, binding the target information flow with the placeholder and playing in the parent page container, ensuring that the switched information flow is always in the same page container as the previous switched information flow. Users can easily return to the original information flow through sliding.
It improves users' viewing interest and retention rate, ensuring that users can slide up and down without limit and continuously browse relevant information flows.
Smart Images

Figure CN115484500B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of video data push, and in particular to a method, client, medium and device for playing information stream. Background Art
[0002] In the current design of live broadcast and video mobile apps, users can swipe up and down to turn pages without restriction to watch the information flow corresponding to the live broadcast room or short video displayed on each page.
[0003] And when the user switches to the current information stream by swiping up and down, he can jump to another information stream through the switching entrance without sliding, so as to watch another information stream.
[0004] However, in the related art, once the user switches from the entrance to another information flow, it is equivalent to entering a new page flow, and the relevance of the data in the new page flow to the user becomes worse (generally speaking, the first recommended information flow is the most relevant to the user and the user may be most interested in it), and the user cannot easily return to the original information flow, resulting in a decrease in the user's viewing interest and a possible decrease in user retention rate. Summary of the invention
[0005] In response to the problems existing in the prior art, the embodiments of the present invention provide a method, client, medium and device for playing information streams, so as to solve or partially solve the technical problem in the prior art that after a user jumps from a switching entrance to another information stream, he cannot conveniently return to the original information stream for viewing, resulting in a decrease in the user's viewing interest, and further resulting in a decrease in the user retention rate.
[0006] A first aspect of the present invention provides a method for playing an information stream, the method comprising:
[0007] Get the recommended feed stream;
[0008] In response to a user triggering operation on an information stream switching entry, a target information stream corresponding to the information stream switching entry is obtained, wherein the information stream switching entry is located in a parent page container; the parent page container is used to play each information stream in the list of the recommended feed stream in index order;
[0009] When it is determined that the target information flow is not in the list of the recommended feed flows, inserting a placeholder in the list of the recommended feed flows, and binding the target information flow to the placeholder;
[0010] The target information stream bound to the placeholder is played in the parent page container.
[0011] In the above scheme, the method further comprises:
[0012] Get the recommended feed stream;
[0013] Playing the first information stream in the list of the recommended feed streams through the parent page container;
[0014] In response to a user triggering operation on an information flow switching entrance, obtaining a target information flow corresponding to the information flow switching entrance, wherein the information flow switching entrance is located in the parent page container;
[0015] When it is determined that the target information flow is not in the list of the recommended feed flows, inserting a placeholder at the next position of the first information flow in the list of the recommended feed flows, and binding the target information flow to the placeholder;
[0016] The information stream played in the parent page container is switched from the first information stream to the target information stream bound to the placeholder, so that the target information stream is played in the parent page container.
[0017] In the above scheme, after the information stream played in the parent page container is switched from the first information stream to the target information stream bound to the placeholder so that the target information stream is played in the parent page container, the method further includes:
[0018] In response to the user's sliding operation on the parent page container, obtaining a second information flow corresponding to when the sliding operation stops;
[0019] The information stream played in the parent page container is switched from the target information stream to the second information stream, so that the second information stream is played in the parent page container.
[0020] In the above scheme, the method further comprises:
[0021] If it is determined that the target information stream is in the list of the recommended feed streams, obtaining first position index information of the target information stream in the list of the recommended feed streams;
[0022] Acquire second position index information of the first information stream corresponding to the first information stream before the switching is performed in the list of the recommended feed stream;
[0023] Determine a position offset based on the first position index information and the second position index information;
[0024] Determine first target sub-page container index information based on the current sub-page container index information corresponding to the first information flow and the position offset;
[0025] The target information stream is inserted into the first target sub-page container based on the first target sub-page container index information, so that the target information stream is played in the first target sub-page container; wherein the parent page container includes multiple sub-page containers.
[0026] In the above scheme, the method further comprises:
[0027] If it is determined that the user continuously slides multiple sub-page containers starting from the current sub-page container within a preset time period, obtaining the index information of the second target sub-page container corresponding to when the user stops sliding;
[0028] Based on the second target sub-page container index information, the next information stream of the current information stream in the list of the recommended feed stream is added to the second target sub-page container to play the next information stream of the current information stream; wherein the current sub-page container is used to play the current information stream.
[0029] In the above solution, the step of obtaining the second target sub-page container index information corresponding to when the user stops sliding includes:
[0030] Get the index information corresponding to the current sub-page container;
[0031] Monitor the number of sub-page containers that slide from the beginning to the end of the current sub-page container;
[0032] The index information of the second target sub-page container corresponding to when the user stops sliding is determined based on the index information corresponding to the current sub-page container and the number of sub-page containers that have been slid over.
[0033] In the above solution, obtaining the recommendation feed stream includes:
[0034] When it is determined that the preload request is triggered, a preset number of feed streams to be recommended are obtained; wherein,
[0035] When it is determined that the user clicks on the first information flow, it is determined that the preloading request is triggered; or,
[0036] When it is determined that the user browses to information at a preset position in the list of the recommended feed stream, it is determined that the preloading request is triggered; the information stream at the preset position is located at the end of the list of the recommended feed stream.
[0037] A second aspect of the present invention provides a client for playing an information stream, the client comprising:
[0038] The acquisition unit is used to acquire the recommended feed stream; in response to the user's triggering operation on the information stream switching entrance, acquire the target information stream corresponding to the information stream switching entrance, wherein the information stream switching entrance is located in a parent page container; the parent page container is used to play each information stream in the list of the recommended feed stream according to the index order;
[0039] a binding unit, configured to insert a placeholder into the list of recommended feed streams when determining that the target information stream is not in the list of recommended feed streams, and bind the target information stream to the placeholder;
[0040] The playing unit plays the target information stream bound to the placeholder in the parent page container.
[0041] According to a third aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.
[0042] According to a fourth aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any one of the methods described in the first aspect are implemented.
[0043] The present invention provides a method, client, medium and device for playing information streams, the method comprising: obtaining a recommended feed stream; responding to a user's triggering operation on an information stream switching entrance, obtaining a target information stream corresponding to the information stream switching entrance, wherein the information stream switching entrance is located in a parent page container; the parent page container is used to play each information stream in the list of the recommended feed stream in index order; when it is determined that the target information stream is not in the list of the recommended feed stream, inserting a placeholder in the list of the recommended feed stream, and binding the target information stream to the placeholder; playing the target information stream bound to the placeholder in the parent page container; in this way, after the user switches the information stream, the switched information stream and the information stream before the switch can always be in the same parent page container by inserting a placeholder in the list of the recommended feed stream; the user can still conveniently watch the information stream before the switch by sliding down, thereby improving the user's viewing interest and improving the user's retention rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] By reading the detailed description of the preferred embodiment below, various other advantages and benefits will become clear to those of ordinary skill in the art. The accompanying drawings are only used for the purpose of illustrating the preferred embodiment and are not considered to be limitations of the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings.
[0045] In the attached picture:
[0046] Figure 1 A schematic diagram of a method for playing an information stream according to an embodiment of the present invention is shown;
[0047] Figure 2 The figure shows a corresponding processing logic diagram when a user jumps from a switching entrance to a target information flow according to the prior art;
[0048] Figure 2a A schematic diagram showing the jump of information flow when a user jumps from a switching entrance to a target information flow according to the prior art;
[0049] Figure 3 A schematic diagram of corresponding processing logic when a user jumps from a switching entrance to a target information flow according to an embodiment of the present invention is shown;
[0050] Figure 3a A schematic diagram of information flow jump when a user jumps from a switching entrance to a target information flow according to an embodiment of the present invention is shown;
[0051] Figure 4 A schematic diagram of the structure of a client for playing information streams according to an embodiment of the present invention is shown;
[0052] Figure 5 A schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention is shown;
[0053] Figure 6 A schematic diagram of the structure of a computer device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0054] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0055] This embodiment provides a method for playing an information stream, such as Figure 1 As shown, the method mainly includes the following steps:
[0056] S110, obtaining a recommendation feed stream.
[0057] In one implementation, when it is determined that the preload request is triggered, a preset number of feed streams to be recommended may be obtained; wherein,
[0058] When it is determined that the user clicks on the first information flow, it is determined that the preload request is triggered; or,
[0059] When it is determined that the user browses to information at a preset position in the list of recommended feed streams, it is determined that the preloading request is triggered; the information stream at the preset position is located at the end of the list of recommended feed streams.
[0060] A feed stream is an information stream that is continuously updated and presented to users. In this embodiment, in order to ensure the real-time nature of the data and improve the smoothness of the feed stream playback process, each time a preload request is determined to be triggered, only a preset number of recommended information streams are requested from the server. The preset number can be determined based on the actual characteristics of the platform and is not limited here. Among them, the preload request can be understood as a paging request for a list of recommended feed streams.
[0061] In the code implementation, you can use the offset and PAGE_LIMIT parameters to implement it. Offset is the number of information streams that already exist in the list of recommended feed streams, and PAGE_LIMIT is the number of information streams that the client expects to obtain each time it requests. The number of information streams expected to be obtained is pre-set. For example, when preloading for the first time, offset is 0, PAGE_LIMIT = 10, then the client will request 10 information streams from the server, corresponding to the first ten information streams in the recommendation algorithm results of the backend server; the next time preloading, offset = 10, PAGE_LIMIT = 10, the client will request 10 new information streams from the server, corresponding to the 10th to 20th information streams in the recommendation algorithm results of the backend server, and so on.
[0062] For example, when the user enters the current information stream A for the first time, it is determined that the preload request is triggered, and the information stream request data is sent to the server. The server recommends a corresponding number of information streams based on the user's characteristics. The user characteristics may include: the user's historical browsing data, the type of live broadcast partition the user is currently in, and the user's viewing interests, etc. After the server returns the preset number of information streams to the client, the client generates a list of recommended feed streams based on these information streams, such as the list of recommended feed streams [A, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10].
[0063] Then the user will browse based on this list. Assuming that the information stream at the preset position is the third to last in the list, when the user browses to the A8 information stream, it is determined that the preload request is triggered again. At this time, the information stream request is resent to the server. After receiving the new information stream data fed back by the server, the new information stream data is added to the end of the list of recommended feed streams, and the list of recommended feed streams is updated to [A, A1, A2, A 3, A 4, A 5, A 6, A 7, A 8, A 9, A10...A 20]. Each information stream in the list of recommended feed streams also has corresponding position index information.
[0064] Usually, a network request takes no more than 500ms, and when a user enters a new information stream, it takes at least several seconds to browse and decide whether to continue watching. Therefore, the preloading strategy in this embodiment allows the user to browse new recommended data endlessly. In this way, the list of recommended feed streams can be continuously updated, and the user can perform unlimited up and down operations, thereby improving viewing efficiency.
[0065] When a user slides up and down from the current information flow to another information flow, the user can also directly jump to the target information flow by clicking on the information flow switching entrance. The switching entrance includes but is not limited to: rankings, recommendation lists, broadcast notifications, SMS push and other entrances.
[0066] The information flow switching entrance is located in the parent page container, and the parent page container is used to play each information flow in the list of recommended feed flows in the order of index. The parent page container contains multiple child page containers, each child page container has corresponding index information, and the child page container is used to play the corresponding information flow. It can be understood that the information flow switching entrance is located in a child page container in the parent page container.
[0067] In order to better understand the technical solution of the present application, the processing logic of the prior art when the user directly jumps to the target information flow from the switching entrance is first introduced. Figure 2 , A1~An are the information flows that users can view by sliding up and down. If the user slides from A1 to A2, there is a switch entrance on the sub-page container corresponding to A2, and the user can jump to the B1 information flow from the switch entrance. When the user jumps to the B1 information flow, the existing technology will reopen a parent page container to display B1 and the information flow after B1. At this time, B1 is equivalent to a new feed flow, and sliding down B1 again will not be able to return to the A1 information flow. Figure 2aAs shown, A1~An are some recommended live broadcast rooms (recommended feed streams) that users can watch by sliding up and down. If the user is in the A1 live broadcast room, an "upward sliding arrow" is displayed at the bottom of the screen. When the user slides the screen upward from the A1 live broadcast room, it will switch to the A2 live broadcast room after sliding. The user can click the "list widget" of the live broadcast room. After clicking the "list widget", a "regional anchor list" will pop up in the A2 live broadcast room. The user can click the link of the live broadcast room of any anchor in the list in the "regional anchor list". For example, if the user clicks the link of the live broadcast room of the anchor "Qi Ge Qi Ge" who is ranked first on the list, it will jump to the live broadcast room B1 of "Qi Ge Qi Ge"; if the user is in the B1 live broadcast room, an "upward sliding arrow" is displayed at the bottom of the screen. When the user slides the screen upward from the B1 live broadcast room, B1 is equivalent to a new feed stream. If B1 is slid down again, it will slide to the B2 live broadcast room adjacent to B1 in the new feed stream, and it is impossible to return to the A1 information stream.
[0068] In order to solve the above problems, this embodiment improves the interface (view layer) and data processing logic. For the view layer, this embodiment will display all information flows in the same parent page container, that is, all information flows share the same parent page container. When the development system type is different, the type of parent page container may be different; for example, the parent page container can be an Activity component.
[0069] When the parent page container is an Activity component, you need to first register an Activity as the parent page container. The code is as follows:
[0070] <activity
[0071] android:name=".p.rambobase.RamboPlayerActivity"
[0072] android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout"
[0073] android:exported="true"
[0074] android:label="@string / app_activity_player"
[0075] android:launchMode="singleTask"
[0076] android:screenOrientation="portrait"
[0077] android:theme="@style / Theme.AppCompat.Light.NoActionBar"
[0078] android:windowSoftInputMode="stateHidden|adjustResize" / >
[0079] In addition, the launchMode of the Activity component needs to be set to singleTask to ensure the uniqueness of the Activity component and avoid creating multiple page instances when the user switches the information flow multiple times, thereby ensuring that no new feed flow is generated when the user performs a jump operation by switching the entry.
[0080] For reference Figure 3 , assuming that the user jumps from the switching entrance on A2 to B1, B1 is still in the same recommendation feed list as A1~An. When the user slides down B1, he can return to A2.
[0081] After the Activity component is set up, create an infinite up and down page UI framework, which is implemented in this embodiment through the RecylerView+SnapHelper+NestedScroll mechanism. Among them, the RecylerView control is used to handle the interactive logic of infinite sliding in the up and down directions; the SnapHelper control is used to handle the interface rebound effect. When each page slides over a specific distance, it will be located at the target sub-page container; for example, when the finger slides up the current sub-page container for more than the preset distance, the next sub-page container of the current sub-page container will be displayed as the target sub-page container.
[0082] The NestedScroll control is used to resolve the conflict between the scrollable view inside the sub-page container and the overall sliding of the sub-page container. For example, there will be a bullet scrolling view on the sub-page container, and the sub-page container itself also needs to slide, then the NestedScroll control can resolve the conflict between the bullet scrolling view and the sub-page container itself.
[0083] In the specific implementation, the specific logic is processed through the RecyclerView control + Adatper class + LayoutManager class. Among them, the RecyclerView control is used to implement the sliding function of the sub-page container, and in order to prevent accidental sliding, it will monitor the onTouch event generated by the finger on the screen in real time to record the distance and direction of the finger movement, and determine whether it is necessary to rebound to a certain page after a specific gesture is completed based on the distance and direction of the movement.
[0084] For example, if the user makes a gesture diagonally on the screen, then if it is determined that the horizontal movement distance of the finger is less than the vertical movement distance, and the vertical movement distance is greater than the distance threshold, a rebound operation is required. If it is determined that the horizontal movement distance of the finger is greater than or equal to the vertical movement distance, or the vertical movement distance is less than or equal to the distance threshold, it is determined that a rebound operation is not required to avoid the sub-page container being switched due to the user's finger sliding lightly.
[0085] Specifically, when a finger touches the web page on a mobile terminal, ontouch events are generated, including: ontouchstart event, ontouchmove event, ontouchend event, and ontouchcancel event. When the finger is pressed, the ontouchstart event is triggered; when the finger is moved, the ontouchmove event is triggered; when the finger is removed, the ontouchend event is triggered; when some higher-level events occur (such as a call incoming or a pop-up message), the current touch operation will be canceled, that is, the ontouchcancel event is triggered. Therefore, this embodiment can record the distance and direction of finger movement through the ontouch event, and the code is implemented as follows:
[0086]
[0087]
[0088] The Adatper class is the connection layer between the view layer and the data layer. Generally speaking, the return value of the getCount() method in the Adapter represents the total number of data in the list. In order to achieve "infinite sliding", this implementation returns the getCount() method in the Adapter as a maximum value, such as the maximum value of an integer, which is 2147483647. Because there is no real "infinity" in the field of programming, this embodiment uses the maximum integer data that can be recognized in Java as the amount of data returned by getCount(), which can support users to slide up and down infinitely, and the final number of slides does not exceed the amount of data returned by getCount().
[0089] The code is implemented as follows:
[0090]
[0091] If it is determined that a rebound operation is required, the scrolling state of the sub-page container is monitored through the LayoutMananger class. When the page scrolling stops, that is, when state == RecyclerView.SCROLL_STATE_IDLE, the first distance between the current sub-page container and the center point of the screen and the second distance between the reference sub-page container and the center point of the screen can be obtained; the sub-page container corresponding to the smaller distance is rebounded to the screen for display. Among them, the reference sub-page container can be the upper sub-page container of the current sub-page container, or the next sub-page container of the current sub-page container.
[0092] For example, if the user slides down the current sub-page container and the first distance is greater than the second distance, the previous sub-page container of the current sub-page container will be bounced back to the screen for display.
[0093] The code to perform the rebound operation is as follows:
[0094]
[0095] The above is the page rebound processing logic of this embodiment. The following continues to explain the sliding operation processing logic of this embodiment.
[0096] Since the getCount() method in the Adapter class returns a maximum value, the corresponding sub-page containers are also infinite, so the user can slide up and down without limit. When the user stops sliding, the corresponding sub-page container index information is obtained, and the corresponding target information flow is determined from the list of recommended feed flows. The target information flow is added to the corresponding sub-page container when the sliding stops, so as to display the information flow content in the mainLayout interface. The specific code implementation is as follows:
[0097]
[0098] In this way, a basic sliding + rebound positioning UI framework is completed, which provides data support for the subsequent user to directly jump from the switching entrance of the sub-page container, the user to slide up and down slowly, and the processing logic of fast sliding.
[0099] S111, in response to a user triggering operation on an information stream switching entry, obtaining a target information stream corresponding to the information stream switching entry, wherein the information stream switching entry is located in a parent page container; the parent page container is used to play each information stream in the list of the recommended feed stream in index order.
[0100] Continuing with the above recommendation feed list [A, A1, A2, A3, A4, A5, A6, A7, A8, A 9, A10 ... A 20] as an example: when the user slides from A1 to A2, there is a switching entrance on the sub-page container corresponding to the A2 information flow, and the user can jump to the target information flow B1 from the switching entrance.
[0101] Then, this embodiment can respond to the user's triggering operation on the information flow switching entry and obtain the target information flow corresponding to the information flow switching entry. Since the list of recommended feed flows is updated in real time, there are two situations at this time: one is that the target information flow has been updated to the list of recommended feed flows, and the other is that the target information flow is not in the list of recommended feed flows.
[0102] In view of the above two different situations, this embodiment has corresponding execution strategies, which are described below for details.
[0103] S112: When it is determined that the target information flow is not in the list of the recommended feed flows, insert a placeholder into the list of the recommended feed flows, and bind the target information flow to the placeholder.
[0104] When it is determined that the target information flow is not in the list of recommended feed flows, a placeholder is inserted into the list of recommended feed flows, and the target information flow is bound to the placeholder.
[0105] Specifically, a placeholder may be inserted at the next position of the current information flow in the list of recommended feed flows, and the placeholder carries the target information flow ID;
[0106] Obtain the target information flow based on the target information flow ID, and cache the target information flow into the placeholder;
[0107] The sliding control is controlled to slide from the current sub-page container to the sub-page container corresponding to the placeholder, so as to use the sub-page container corresponding to the placeholder to play the target information stream.
[0108] To better understand how to insert placeholders, the first information flow is used as an example to illustrate the following:
[0109] Get the recommended feed stream;
[0110] Play the first information stream in the list of recommended feed streams through the parent page container;
[0111] In response to a user triggering operation on an information flow switching entrance, a target information flow corresponding to the information flow switching entrance is obtained, wherein the information flow switching entrance is located in a parent page container;
[0112] When it is determined that the target information flow is not in the list of recommended feed flows, inserting a placeholder at a position next to the first information flow in the list of recommended feed flows, and binding the target information flow to the placeholder;
[0113] The information stream played in the parent page container is switched from the first information stream to the target information stream bound to the placeholder, so that the target information stream is played in the parent page container.
[0114] Furthermore, after the placeholder is inserted into the next position of the first information stream, when the user continues to perform a sliding operation based on the target information stream, the method further includes:
[0115] Switching the information stream played in the parent page container from the first information stream to the target information stream bound to the placeholder, so that after the target information stream is played in the parent page container, in response to the user's sliding operation on the parent page container, a second information stream corresponding to when the sliding operation stops is obtained; wherein the second information stream is: the information stream in the list of the recommended feed stream that is adjacent to the placeholder of the first information stream before the step of inserting the placeholder in the list of the recommended feed stream and binding the target information stream to the placeholder;
[0116] The information stream played in the parent page container is switched from the target information stream to the second information stream, so that the second information stream is played in the parent page container.
[0117] Continue with Figure 3 Take A2 as an example to illustrate. Assume that A2 is the first information stream. When the user jumps from A2 to the target information stream B1, a placeholder will be inserted at the next position of A2 in the list of recommended feed streams. Then B1 will be bound to the placeholder and the B1 information stream will be played.
[0118] When the user slides up from B1 to A3, A3 is the second information stream at this time, and the information stream played in the parent page container will be switched from B1 to A3.
[0119] Understandable, see Figure 3a , the user is in the A2 live broadcast room. When the user clicks on the link of any anchor's live broadcast room in the list of the A2 live broadcast room, for example, the user clicks on the link of the live broadcast room of the anchor "Qi Ge Qi Ge" who is ranked first on the list, it will jump to the live broadcast room B1 of "Qi Ge Qi Ge" (live broadcast room B1 is located in other feed streams). During the process of jumping from the A2 live broadcast room to the live broadcast room B1, a placeholder will be inserted in the next position of A2 in the list of recommended feed streams, and then B1 will be bound to the placeholder to play the video stream of the live broadcast room B1;
[0120] When the user is in the B1 live broadcast room (an "upward sliding arrow" is displayed at the bottom of the screen), if the user slides the screen upward from the B1 live broadcast room, he will slide to the A3 live broadcast room; (a "downward sliding arrow" is displayed at the top of the screen), if the user slides the screen downward from the B1 live broadcast room, he will return to the A2 live broadcast room; that is to say, according to the technical solution of the present invention, after the user switches from the room of the recommended feed stream to the room of other feed streams through other means (for example, through rankings, recommendation lists, broadcast notifications, SMS push, etc.), the user can still browse the room videos of the recommended feed stream by continuing to slide the live broadcast room.
[0121] Specifically, when the target information flow is not in the list of recommended feed flows, a placeholder is inserted at the next position of the current information flow using RamboPagerItem.newPlaceHolder(targetId); targetId is the target information flow ID, and the placeholder is still an empty placeholder.
[0122] Then, based on the target information flow ID, the corresponding flow data (ExternalRoomInforemote) is requested from the server, and the flow data is cached or bound to the placeholder; the code implementation is as follows:
[0123]
[0124]
[0125] Finally, the LayoutManager.scrollToPosition method is used to automatically move the sliding control ReycylcerView down one grid to the position of the placeholder to display the content of the target information flow. The code implementation is as follows:
[0126] This process is automatically triggered by the code and does not cause any visual changes to the UI interface. It is imperceptible to the user. Compared with the existing technology in which an obvious black screen appears after switching to another entry, it can improve the switching quality of the information flow.
[0127] It is worth noting that obtaining the corresponding stream data based on the target information stream ID and caching the stream data in the placeholder is equivalent to inserting the target information stream into the list of recommended feed streams. However, when the preload request is triggered again later, the information stream data returned by the server may also include the target information stream; in order to ensure the uniqueness of the information stream, this embodiment needs to use a loop to traverse the list of recommended feed streams, and use the equals() method to determine whether there is an information stream with the same ID in the list. If so, one is removed. The code implementation is as follows:
[0128]
[0129]
[0130] In another embodiment, when it is determined that the target information flow is in the list of recommended feed flows, the method further includes:
[0131] Obtain the first position index information of the target information stream in the list of recommended feed streams;
[0132] Acquire second position index information of the first information stream corresponding to the first information stream before the switching is performed in the list of recommended feed streams;
[0133] Determine a position offset based on the first position index information and the second position index information;
[0134] Determine the first target sub-page container index information based on the current sub-page container index information and the position offset corresponding to the first information flow; the second target sub-page container index information is the sum of the current sub-page container index information and the position offset;
[0135] The target information stream is inserted into the first target sub-page container based on the first target sub-page container index information, so that the target information stream is played in the first target sub-page container.
[0136] It is worth noting that in the scenario of jumping from the switching entrance to the target information flow, the position index information in the list of the recommended feed flow corresponds one to one with the sub-page container index information. Therefore, after the position offset is determined, the second target sub-page container can be determined according to the offset.
[0137] The above is the processing logic for users to jump to the target information stream based on the switching entrance. It can be seen that no matter how the user switches the information stream, since the target information stream after the jump is still in the same recommended feed stream list as the first information stream, the user can easily return to the first information stream and return to the information stream that was watched for the first time, avoiding the phenomenon that the platform must watch whatever content is given, thereby improving the user's initiative to watch and further increasing the user's interest in watching.
[0138] S113, playing the target information stream bound to the placeholder in the parent page container.
[0139] As described above, the parent page container includes multiple child page containers. After the target information stream is obtained, the target information stream is bound to the placeholder, and the child page container corresponding to the placeholder is used to play the target information stream.
[0140] In one embodiment, in addition to being able to jump directly to the target information stream, the user can also view the information stream of interest by sliding up and down infinitely. Generally speaking, there are two ways of user sliding: one is slow sliding (for example, sliding only one sub-page container at a time), and the other is fast sliding (for example, sliding through multiple sub-page containers within 1 second); the processing logic of the two sliding methods is also different.
[0141] Continuing with the above recommendation feed list, suppose the user slowly slides from the sub-page container corresponding to A1 to the sub-page container corresponding to A2. At this time, the sub-page container index will increase by 1 from the sub-page container index corresponding to A1. Since in the slow sliding scenario, the sub-page container index corresponding to A1 and the position index in the list of the recommendation feed are also one-to-one corresponding, then the position index in the list of the recommendation feed will also increase by 1, that is, the data of the A2 information stream will be obtained.
[0142] Then add the A2 information stream to the corresponding sub-page container and play and display the A2 information stream.
[0143] For the fast sliding mode, in order to ensure the infinite sliding effect and avoid freezing, the sub-page container index and the position index in the list of the recommendation feed stream do not correspond one to one. The method includes:
[0144] If it is determined that the user continuously slides multiple sub-page containers within a preset time period, obtain the target sub-page container index information corresponding to when the user stops sliding;
[0145] Based on the target sub-page container index information, the next information flow data of the current information flow in the list of recommended feed flows is added to the target sub-page container.
[0146] For example, suppose the user quickly slides from the sub-page container corresponding to A1 to the sub-page container corresponding to A10. At this time, the information flow content of A2 to A9 only flashes by and does not need to be actually loaded. In order to save resources and save unnecessary loading processes, and thus avoid video freezes, the position index in the list of recommended feed streams is not from A1+9, but still from A1+1, that is, the A2 information flow is finally added to the target sub-page container. The target sub-page container here can be understood as the sub-page container corresponding to A10 in the slow sliding scenario.
[0147] In one implementation, obtaining the second target sub-page container index information corresponding to when the user stops sliding includes:
[0148] Get the index information corresponding to the current sub-page container;
[0149] Monitor the number of sub-page containers that slide from the beginning to the end of the current sub-page container;
[0150] The index information of the second target sub-page container corresponding to when the user stops sliding is determined based on the index information corresponding to the current sub-page container and the number of sub-page containers that have been slid over.
[0151] In this way, there are corresponding processing logics based on the different operation methods of users. On the basis of improving the live broadcast performance, it can also ensure the user's initiative in watching, thereby increasing the user's viewing interest and improving the user retention rate.
[0152] Based on the same inventive concept as in the above-mentioned embodiment, this embodiment also provides a client for playing information streams, such as Figure 4 As shown, the device comprises:
[0153] The acquisition unit 41 is used to acquire the recommended feed stream; in response to the user's triggering operation on the information stream switching entrance, acquire the target information stream corresponding to the information stream switching entrance, wherein the information stream switching entrance is located in a parent page container; the parent page container is used to play each information stream in the list of the recommended feed stream according to the index order;
[0154] The binding unit 42 is configured to insert a placeholder into the list of recommended feed streams when it is determined that the target information stream is not in the list of recommended feed streams, and bind the target information stream to the placeholder;
[0155] The playing unit 43 plays the target information stream bound to the placeholder in the parent page container.
[0156] Since the client introduced in the embodiment of the present invention is a client used to implement the method of playing information streams in the embodiment of the present invention, based on the method introduced in the embodiment of the present invention, the person skilled in the art can understand the specific structure and deformation of the client, so it is not repeated here. All clients used in the method of the embodiment of the present invention belong to the scope of protection of the present invention.
[0157] Based on the same inventive concept, this embodiment provides a computer device 500, such as Figure 5 As shown, it includes a memory 510, a processor 520, and a computer program 511 stored in the memory 510 and executable on the processor 520. When the processor 520 executes the computer program 511, any step of the method described above is implemented.
[0158] Based on the same inventive concept, this embodiment provides a computer-readable storage medium 600, such as Figure 6As shown, a computer program 611 is stored thereon, and when the computer program 611 is executed by a processor, the steps of any of the methods described above are implemented.
[0159] Through one or more embodiments of the present invention, the present invention has the following beneficial effects or advantages:
[0160] The present invention provides a method, client, medium and device for playing information streams, the method comprising: obtaining a recommended feed stream; responding to a user's triggering operation on an information stream switching entrance, obtaining a target information stream corresponding to the information stream switching entrance, wherein the information stream switching entrance is located in a parent page container; the parent page container is used to play each information stream in the list of the recommended feed stream in index order; when it is determined that the target information stream is not in the list of the recommended feed stream, inserting a placeholder in the list of the recommended feed stream, and binding the target information stream to the placeholder; playing the target information stream bound to the placeholder in the parent page container; in this way, after the user switches the information stream, the switched information stream and the information stream before the switch can always be in the same parent page container by inserting a placeholder in the list of the recommended feed stream; the user can still conveniently watch the information stream before the switch by sliding down, thereby improving the user's viewing interest and improving the user's retention rate.
[0161] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0162] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0163] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0164] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0165] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0166] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components of a gateway, a proxy client, or a system according to an embodiment of the present invention. The present invention may also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may have the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0167] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
[0168] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0169] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for playing an information stream, It is characterized in that The method comprises: Get the recommended feed stream; Playing the first information stream in the list of the recommended feed streams through the parent page container; In response to a sliding operation of the user, sliding from the current information stream to another information stream in a list of recommended feed streams; the list of recommended feed streams is generated by using a recommendation algorithm based on user characteristics; In response to a user triggering operation on an information flow switching entry, a target information flow corresponding to the information flow switching entry is obtained, wherein the information flow switching entry is located in a parent page container; the parent page container is used to play each information flow in the list of the recommended feed flow in index order; the information flow switching entry is: a ranking entry, a recommendation list entry, a broadcast notification entry, or a text message push entry; When it is determined that the target information stream is not in the list of the recommended feed streams, inserting a placeholder in the list of the recommended feed streams, binding the target information stream to the placeholder; and playing the target information stream bound to the placeholder in the parent page container, including: When it is determined that the target information flow is not in the list of the recommended feed flow, insert a placeholder at the next position of the first information flow in the list of the recommended feed flow, wherein the placeholder carries the target information flow ID; obtain the target information flow based on the target information flow ID, and cache the target information flow in the placeholder; bind the target information flow to the placeholder; The information stream played in the parent page container is switched from the first information stream to the target information stream bound to the placeholder, so that the target information stream is played in the parent page container, including: controlling the sliding control to slide from the current child page container to the child page container corresponding to the placeholder, so as to use the child page container corresponding to the placeholder to play the target information stream.
2. The method according to claim 1, It is characterized in that After the information stream played in the parent page container is switched from the first information stream to the target information stream bound to the placeholder so that the target information stream is played in the parent page container, the method further includes: In response to the user's sliding operation on the parent page container, obtaining a second information flow corresponding to when the sliding operation stops; The information stream played in the parent page container is switched from the target information stream to the second information stream, so that the second information stream is played in the parent page container.
3. The method according to claim 1, It is characterized in that The method further comprises: If it is determined that the target information stream is in the list of the recommended feed streams, obtaining first position index information of the target information stream in the list of the recommended feed streams; Acquire second position index information of the first information stream corresponding to the first information stream before the switching is performed in the list of the recommended feed stream; Determine a position offset based on the first position index information and the second position index information; Determine first target sub-page container index information based on the current sub-page container index information corresponding to the first information flow and the position offset; The target information stream is inserted into the first target sub-page container based on the first target sub-page container index information, so that the target information stream is played in the first target sub-page container; wherein the parent page container includes multiple sub-page containers.
4. The method according to claim 1, It is characterized in that The method further comprises: If it is determined that the user continuously slides multiple sub-page containers starting from the current sub-page container within a preset time period, obtaining the index information of the second target sub-page container corresponding to when the user stops sliding; Based on the second target sub-page container index information, the next information stream of the current information stream in the list of the recommended feed stream is added to the second target sub-page container to play the next information stream of the current information stream; wherein the current sub-page container is used to play the current information stream.
5. The method according to claim 4, It is characterized in that The obtaining of the second target sub-page container index information corresponding to when the user stops sliding includes: Get the index information corresponding to the current sub-page container; Monitor the number of sub-page containers that slide from the beginning to the end of the current sub-page container; The index information of the second target sub-page container corresponding to when the user stops sliding is determined based on the index information corresponding to the current sub-page container and the number of sub-page containers that have been slid over.
6. The method according to claim 1, It is characterized in that The obtaining of the recommendation feed stream includes: When it is determined that the preload request is triggered, a preset number of feed streams to be recommended are obtained; wherein, When it is determined that the user clicks on the first information flow, it is determined that the preloading request is triggered; or, When it is determined that the user browses to information at a preset position in the list of the recommended feed stream, it is determined that the preloading request is triggered; the information stream at the preset position is located at the end of the list of the recommended feed stream.
7. A client for playing information streams, It is characterized in that The client comprises: An acquisition unit is used to acquire a recommended feed stream; play the first information stream in the list of the recommended feed stream through a parent page container; in response to a user's sliding operation, slide from the current information stream to another information stream in the list of the recommended feed stream; the list of the recommended feed stream is generated by a recommendation algorithm based on user characteristics; in response to a user's triggering operation on an information stream switching entrance, acquire a target information stream corresponding to the information stream switching entrance, wherein the information stream switching entrance is located in a parent page container; the parent page container is used to play each information stream in the list of the recommended feed stream in an index order; the information stream switching entrance is: a ranking entrance, a recommendation list entrance, a broadcast notification entrance or a text message push entrance; a binding unit, configured to insert a placeholder into the list of recommended feed streams when determining that the target information stream is not in the list of recommended feed streams, and bind the target information stream to the placeholder; A playing unit plays the target information stream bound to the placeholder in the parent page container; The binding unit is specifically configured to: when it is determined that the target information stream is not in the list of the recommended feed streams, insert a placeholder at the next position of the first information stream in the list of the recommended feed streams, wherein the placeholder carries the target information stream ID; obtain the target information stream based on the target information stream ID, and cache the target information stream in the placeholder; and bind the target information stream to the placeholder; The playback unit is specifically used to: switch the information stream played in the parent page container from the first information stream to the target information stream bound to the placeholder, so that the target information stream is played in the parent page container, including: controlling the sliding control to slide from the current child page container to the child page container corresponding to the placeholder, so as to use the child page container corresponding to the placeholder to play the target information stream.
8. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the steps of the method according to any one of claims 1 to 6 are implemented.
