Page content display method and device, electronic equipment and computer storage medium
By receiving user swipe commands and swiping the display area according to a custom swipe amount, the problem of requiring multiple swipes to display the area in existing technologies is solved, thus improving user experience and display efficiency.
Patent Information
- Application Number
- CN202010372228.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-06
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2040-05-06
AI Technical Summary
In existing technologies, video app display pages require multiple swipes to show content that users are interested in, and the amount of swipes cannot be customized according to user needs, resulting in a poor user experience.
By receiving the user's swipe command, the display blocks on the page are swiped according to the preset swipe amount. The swipe amount is customized by the user, including swiping out of the current block and swiping into a new block. The swipe amount is calculated based on the size and number of blocks. Horizontal and vertical swipes are supported, and special processing is performed to determine whether it is a preset block.
It allows users to customize the scrolling amount of the display page according to their own needs, improving the user experience, simplifying the scrolling process of the display blocks, and making the display blocks more accurate and efficient.
Smart Images

Figure CN111580732B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of Internet, in particular to a page content display method and device, electronic equipment and computer storage medium. BACKGROUND
[0002] In a video APP (Application), a plurality of display pages are usually included, which can be a channel page for example, and each display page includes a plurality of display blocks, each display block is displayed in the display page according to certain rules, and different video contents are displayed in each display block, for example, movie contents are displayed in some display blocks, short video contents are displayed in some display blocks, and TV series contents are displayed in some display blocks.
[0003] In the prior art, the display blocks in each display page are usually fixedly displayed according to certain sorting rules, for example, each display block is classified and displayed, and popular dramas or recommended videos are usually displayed on the home page of each display page, that is, when a user opens a certain display page, the user can see these display blocks, and the remaining display blocks in the display page are classified and displayed according to types such as TV series, movies and variety shows. When the user wants to browse all the display blocks in the display page, the user needs to slide up or down in the display page with a finger, and the display blocks in the display page slide with the finger. Therefore, after receiving a sliding instruction of the user, the terminal slides the display page, and the terminal may need to receive the sliding instruction multiple times and slide the display page multiple times to slide the display block of interest of the user to the display area, for example, to display the display block of interest of the user on the screen.
[0004] The present application relates to the technical field of Internet, in particular to a page content display method and device, electronic equipment and computer storage medium.
[0005] In the prior art, the terminal usually slides the display page after receiving a sliding instruction of the user, and needs to slide the display page multiple times to slide the display block of interest of the user to the display area, so the method of the prior art cannot enable the user to customize the sliding amount of the display page according to the user's own needs, thereby causing poor user experience. SUMMARY
[0006] The present application relates to the technical field of Internet, in particular to a page content display method and device, electronic equipment and computer storage medium.
[0007] In the prior art, the terminal usually slides the display page after receiving a sliding instruction of the user, and needs to slide the display page multiple times to slide the display block of interest of the user to the display area, so the method of the prior art cannot enable the user to customize the sliding amount of the display page according to the user's own needs, thereby causing poor user experience.
[0008] receiving a sliding instruction of a user for a current display page, the current display page displaying a current display block, the display block being used to display video content;
[0009] sliding the current display block in the current display page according to a sliding amount preset by the user, the sliding amount being used to represent a sliding distance of the current display block.
[0010] Optionally, the step of sliding the current display block in the current display page according to the sliding amount preset by the user comprises:
[0011] sliding the current display block out of the current display page according to the sliding amount preset by the user;
[0012] sliding a new display block into the current display page, the new display block being different from the display content of the current display block.
[0013] Optionally, the step of sliding the current display block in the current display page according to the sliding amount preset by the user comprises:
[0014] obtaining a size of a new display block which is not displayed in the current display page;
[0015] calculating a sum of sizes of a current number of new display blocks, a first new display block of the current number of new display blocks being adjacent to a last current display block in the current display page;
[0016] determining whether the sum of sizes is greater than or equal to the sliding amount;
[0017] if the sum of sizes is greater than or equal to the sliding amount, sliding a last new display block of the current number of new display blocks to a position of the last current display block in the current display page;
[0018] if the sum of sizes is less than the sliding amount, increasing the current number by one and performing the step of calculating the sum of sizes of the current number of new display blocks.
[0019] Optionally, before the step of sliding the current display block in the current display page according to the sliding amount preset by the user, the method further comprises:
[0020] obtaining a sliding amount of a user for a current display page input by the user in the current display page, the current display page displaying a change range of the sliding amount.
[0021] Optionally, the step of obtaining the sliding amount of the user for the current display page input by the user in the current display page comprises:
[0022] Get the horizontal or vertical swipe amount entered by the user on the currently displayed page for the currently displayed area;
[0023] The step of sliding the currently displayed block in the currently displayed page according to the user-preset sliding amount includes:
[0024] Swipe the currently displayed area horizontally or vertically on the currently displayed page.
[0025] Optionally, the step of sliding the new display block into the current display page includes:
[0026] Determine whether the new display block is a preset display block, wherein the preset display block is used to display preset content;
[0027] If so, the new display area will be slid into the current display page;
[0028] If not, the preset display area will be slid into the current display page.
[0029] Optionally, the currently displayed page includes functional options; prior to the step of swiping the currently displayed block on the currently displayed page according to a user-preset swipe amount, the method further includes:
[0030] Obtain the duration of the user's continuous operation of the function options;
[0031] Using the duration and the pre-stored correspondence between the duration and the number of swipes, the number of swipes for the currently displayed block is determined;
[0032] The step of sliding the currently displayed block in the currently displayed page according to the user-preset sliding amount includes:
[0033] By utilizing the number of swipes of the currently displayed block, the currently displayed block in the currently displayed page is swiped multiple times.
[0034] Secondly, embodiments of the present invention provide a page content display device, the device comprising:
[0035] The receiving module is used to receive the user's swiping command for the currently displayed page, which displays a current display block for displaying video content;
[0036] The sliding module is used to slide the currently displayed block in the currently displayed page according to a user-preset sliding amount, where the sliding amount represents the sliding distance of the currently displayed block.
[0037] Optionally, the sliding module comprises:
[0038] a sliding-out sub-module, configured to slide out the current display block from the current display page according to a preset sliding amount of a user;
[0039] a sliding-in sub-module, configured to slide a new display block into the current display page, the new display block being different from the current display block in display content.
[0040] Optionally, the sliding module comprises:
[0041] an obtaining sub-module, configured to obtain a size of a new display block that is not displayed in the current display page;
[0042] a calculating sub-module, configured to calculate a sum of sizes of a current number of new display blocks, a first new display block of the current number of new display blocks being adjacent to a last current display block in the current display page;
[0043] a judging sub-module, configured to judge whether the sum of sizes is greater than or equal to the sliding amount;
[0044] a sliding sub-module, configured to slide a last new display block of the current number of new display blocks to a position of the last current display block in the current display page if the sum of sizes is greater than or equal to the sliding amount;
[0045] a triggering sub-module, configured to increase the current number by one and trigger the calculating sub-module to execute the step of calculating the sum of sizes of the current number of new display blocks if the sum of sizes is less than the sliding amount.
[0046] Optionally, the apparatus further comprises:
[0047] a first obtaining module, configured to obtain a sliding amount of a current display page input by a user in the current display page, the current display page displaying a change range of the sliding amount.
[0048] Optionally, the first obtaining module is specifically configured to:
[0049] obtain a horizontal sliding amount or a vertical sliding amount of a current display block input by a user in the current display page;
[0050] the sliding module is specifically configured to:
[0051] slide the current display block horizontally or vertically in the current display page.
[0052] Optionally, the sliding-in submodule comprises:
[0053] a judging unit configured to judge whether the new display block is a preset display block, the preset display block being used to display preset content;
[0054] a first sliding-in unit configured to slide the new display block into the current display page if the new display block is the preset display block;
[0055] a second sliding-in unit configured to slide the preset display block into the current display page if the new display block is not the preset display block.
[0056] Optionally, the current display page is provided with a function option; and the device further comprises:
[0057] a second obtaining module configured to obtain a time length of a user's continuous operation on the function option;
[0058] a determining module configured to determine a sliding number for the current display block by using the time length and a preset corresponding relationship between the time length and the sliding number;
[0059] the sliding module is specifically configured to:
[0060] slide the current display block in the current display page for a plurality of times by using the sliding number of the current display block.
[0061] In a third aspect, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
[0062] the memory is used to store a computer program;
[0063] the processor is used to execute the program stored on the memory, and implement the method steps of any of the page content display methods.
[0064] In a fourth aspect, the present application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of any of the page content display methods.
[0065] In a fifth aspect, the present application also provides a computer program product comprising instructions, which, when executed on a computer, cause the computer to perform the method steps of any of the page content display methods.
[0066] The present application has the following beneficial effects:
[0067] The page content display method, device, electronic device and computer storage medium provided by the embodiment of the present application, the user terminal receives the sliding instruction of the user for the current display page, the current display page displays a current display block, and the display block is used for displaying video content; and the current display block in the current display page is slid according to the preset sliding amount of the user. In the embodiment of the present application, the user can set the sliding amount according to the own demand, and the user terminal can slide the current display block in the current display page according to the preset sliding amount.
[0068] Of course, implementing any product or method of the present application does not necessarily achieve all the advantages mentioned above. BRIEF DESCRIPTION OF DRAWINGS
[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0070] Figure 1 A flowchart of a page content display method provided by the embodiment of the present application;
[0071] Figure 2a In the page content display method provided by the embodiment of the present application, a flowchart of S120 is shown;
[0072] Figure 2b A schematic diagram of a current display page provided by the embodiment of the present application;
[0073] Figure 2c Another schematic diagram of a current display page provided by the embodiment of the present application;
[0074] Figure 3 Another flowchart of S120 in the page content display method provided by the embodiment of the present application;
[0075] Figure 4 A flowchart of another page content display method provided by the embodiment of the present application;
[0076] Figure 5 A structural diagram of a dialog box provided by the embodiment of the present application;
[0077] Figure 6 A flowchart of S122 in the page display method provided by the embodiment of the present application;
[0078] Figure 7A flowchart of another page content display method provided by the embodiment of the present application is shown in FIG. 6;
[0079] Figure 8 A flowchart of another page content display method provided by the embodiment of the present application is shown in FIG. 6;
[0080] Figure 9 A flowchart of another page content display method provided by the embodiment of the present application is shown in FIG. 6;
[0081] Figure 10 A structural diagram of a page content display device provided by the embodiment of the present application is shown in FIG. 7;
[0082] Figure 11 A structural diagram of a sliding module provided by the embodiment of the present application is shown in FIG. 8;
[0083] Figure 12 A structural diagram of another sliding module provided by the embodiment of the present application is shown in FIG. 9;
[0084] Figure 13 A structural diagram of another page content display device provided by the embodiment of the present application is shown in FIG. 10;
[0085] Figure 14 A structural diagram of a sliding-in sub-module provided by the embodiment of the present application is shown in FIG. 11;
[0086] Figure 15 A structural diagram of another page content display device provided by the embodiment of the present application is shown in FIG. 12;
[0087] Figure 16 A structural diagram of an electronic device provided by the embodiment of the present application is shown in FIG. 13. DETAILED DESCRIPTION
[0088] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.
[0089] In existing technologies, display blocks on various display pages are typically arranged according to a fixed sorting rule. For example, display blocks are categorized, with popular TV dramas or recommended videos usually displayed on the homepage of each display page. That is, when a user opens a display page, they can see these display blocks. The remaining display blocks on the page are then categorized by type, such as TV series, movies, and variety shows. When a user wants to browse all the display blocks on a display page, they need to swipe up or down with their finger, and the display blocks on the page will slide along with the finger. Therefore, after receiving the user's swipe command, the terminal swipes the display page, and the terminal may need to receive swipe commands multiple times and swipe the display page multiple times to slide the display block of interest to the display area, for example, to display the display block of interest on the screen.
[0090] In the process of realizing this invention, the inventors discovered that the prior art has at least the following problems:
[0091] In existing technologies, terminals typically only swipe the displayed page after receiving a swipe command from the user, and multiple swipes are required to bring the display area of interest into the display area. Therefore, existing technologies cannot allow users to customize the amount of swiping on the display page according to their own needs, resulting in a poor user experience.
[0092] In view of this, embodiments of the present invention provide a method for displaying page content. Generally speaking, the user terminal receives a swipe command from the user for the currently displayed page, which contains a currently displayed block used to display video content. The user then swipes the currently displayed block on the current page according to a preset swipe amount. In this embodiment, the user can set the swipe amount according to their needs, and the user terminal can swipe the currently displayed block on the current page according to this preset swipe amount; that is, the swipe amount of the currently displayed block is the preset swipe amount.
[0093] like Figure 1 As shown, this embodiment of the invention provides a method for displaying page content, applied to a user terminal. The process may include:
[0094] S110 receives the user's swipe command for the currently displayed page, which displays the current display block, and the display block is used to display video content.
[0095] S120: Slide the currently displayed block on the current display page according to the user-preset sliding amount, where the sliding amount represents the sliding distance of the currently displayed block.
[0096] The page content display method provided in the embodiment of the present application can be used to slide the current display block in the current display page according to the preset sliding amount of the user, and the user terminal can slide the current display block in the current display page according to the preset sliding amount.
[0097] Further, Figure 1 In step S110 of the embodiment shown in the figure, the current display page is a display page displayed in the screen of the user terminal at the current time, and the current display page can be each channel page in the video APP, for example, a recommendation page, a movie page, a TV series page, or a variety show page, etc. The recommendation page can display various types (including movie content, TV series content, etc.) of display blocks, and when the user opens the video APP, the user enters the recommendation page directly, and the recommendation page is the current display page. When the user selects to enter another channel page, the entered channel page is the current display page.
[0098] The current display page displays the current display block. It can be understood that usually, a display interface is provided with a plurality of display blocks, but due to the small size of the screen of the user terminal, if all the display blocks are displayed in the current display page, the display blocks will be too small, and thus the user can not identify the content displayed by the display blocks by naked eyes. Therefore, the current display interface usually displays a preset number of current display blocks, and new display blocks in all display blocks are not displayed in the current display interface.
[0099] The display block can be used to display video content. For example, when the current display page is a TV series page, the display block can be a TV series, and the TV series displayed by the plurality of display blocks can be the same TV series or different TV series, for example, TV series with different names or different episodes of the same name TV series. Of course, in addition to the implementation mode shown in the example, the mode for implementing the feature also belongs to the protection scope of the embodiment of the present application.
[0100] The embodiment of the present application does not limit the specific form of the sliding instruction of the user for the current display page. For example, a button can be provided in the current display page, the button can be marked with a sliding word or an arrow icon, etc. These marks can be used to facilitate the user to know that the current display block in the current display page can be slid by clicking the button.
[0101] Further, Figure 1In step S120 of the embodiment shown, the preset sliding amount of the user can be acquired, and then the current display block in the current display page is slid according to the sliding amount. Since all the display blocks in the current display page are synchronously slid with the current display page, when the current display block is slid, the new display block not displayed in the current display page is also slid with the current display block, and the sliding amounts of the current display block and the new display block are the same, both of which are the preset sliding amount of the user.
[0102] The sliding amount can be used to represent the sliding distance of the current display block, which can be the length dimension of the current display block on the screen. For example, the sliding amount can be set as 10 mm, 20 mm, etc. The user terminal slides the current display block by 10 mm or 20 mm each time a sliding instruction is received. The sliding amount can also be the number of display blocks, that is, the user terminal slides a certain number of display blocks each time a sliding instruction is received, and the number of the display blocks slid is the same as the sliding amount. In addition, the sliding amount can have a one-to-one correspondence with the number of display blocks to be slid, and the greater the sliding amount, the more the number of display blocks to be slid, and thus the faster the sliding speed of the current display page. It should be noted that the current display page can be vertically slid or horizontally slid. When the sliding direction is vertical, the sliding amount of the current display block vertically slid each time a sliding instruction is received is the preset sliding amount.
[0103] As an optional implementation of the embodiment of the application, as shown in Figure 2a Figure 1 The step S120 of the embodiment shown can include:
[0104] S121, sliding the current display block out of the current display page according to the preset sliding amount of the user.
[0105] When the sliding instruction of the user for the current display page is received, the current display block is slid out of the current display page according to the preset sliding amount of the user, that is, the current display block is not displayed on the screen. If the number of display blocks to be slid corresponding to the sliding amount is greater than or equal to the number of current display blocks, all the current display blocks in the current display page are slid out of the current display page. If the number of display blocks to be slid corresponding to the sliding amount is less than the number of current display blocks, the front-end current display blocks in the current display block are slid out of the current display page. When the sliding direction is upward, the top end of the current display page is the front end. Similarly, when the sliding direction is downward, the bottom end of the current display page is the front end.
[0106] S122, slide the new display block into the current display page.
[0107] Since the content of each display section on the current page can be different, the content displayed in the new display section can also differ from that of the current display section. Figure 2a Corresponding to step S121 of the embodiment, when all display blocks on the current display page are the same size, the same number of new display blocks can slide into the current display page as the number of current display blocks that slide out of the current display page. That is, the same number of new display blocks are displayed on the current display page.
[0108] like Figure 2b As shown, there are four currently displayed blocks on the current page: Current Display Block 1, Current Display Block 2, Current Display Block 3, and Current Display Block 4. At this point, no new display block is shown on the current page. If a currently displayed block needs to be slid out of the current page, and the sliding direction is upward, then Current Display Block 1 will be slid out of the current page. Figure 2c To Figure 2b The currently displayed page is obtained by sliding the currently displayed block in the middle, such as Figure 2c As shown, currently displayed block 1 will no longer be displayed on the current page. Furthermore, as currently displayed block 1 slides off the current page, a new displayed block slides into the current page, as shown below. Figure 2c As shown, the new display block 1 is slid into the current display page for display. By using the above embodiment's process steps S121 and S122, the sliding process of the current display block in the current display page is relatively simple.
[0109] As an optional implementation of the present invention, such as Figure 3 As shown, Figure 1 The process step S120 of the illustrated embodiment may include:
[0110] S123, Get the size of a new display block that is not currently displayed on the page.
[0111] The preset sliding amount of the user can be acquired, and a request for acquiring the display page data can be sent to the server after that. The server sends the display page data to the user terminal after receiving the request. The display page data can include the size of each display block, such as the size of a display block displaying video content. Or the display page data can also include the interval size between display blocks displaying the same type of content, such as the interval size between two adjacent display blocks displaying advertising content. The size of each display block and the interval size can be pre-stored in the identification information of the display page. The identification information can also store the video name and video duration of each display block. The server can extract the size of the display block from the identification information of the display page and generate the display page data.
[0112] When vertical sliding of the current display block is needed, the height of each display block needs to be known. The height of each display block can be pre-set and stored in the identification information of the current display page. When horizontal sliding of the current display block is needed, the width of each display block needs to be known. The width of each display block can be pre-set and stored in the identification information of the current display page. It should be noted that the size of each display block can be determined according to its actual display size in the current display page. The size of different display blocks can be different. In addition, in order to reduce the amount of calculation, the height or width of each display block can be set to 1, 2, or 3 according to its actual display size.
[0113] During the sliding of the current display block, it can be first determined whether the size of the new display block adjacent to the last current display block in the current display page is greater than the sliding amount. If yes, the new display block adjacent to the last current display block is slid to the position of the last current display block. If no, step S124 is executed. It should be noted that in the display page, each display block is usually displayed in rows or columns. For a display page sliding upwards, each display block is usually displayed in multiple rows. The last current display block can refer to the current display block located at the bottom of the current display page. For a display page sliding to the left, each display block is usually displayed in multiple columns. The last current display block can refer to the current display block located at the right of the current display page.
[0114] S124, the sum of the sizes of the current number of new display blocks is calculated.
[0115] The current number can be the number of new display blocks whose sizes need to be calculated, and the current number can be a variable, and the initial value of the variable can be 2, and after calculating the sum of the sizes of the current number of new display blocks, if the sum of the sizes is less than the sliding amount, the current number is increased by 1, and the sum of the sizes of the new display blocks of the increased current number is calculated, and so on.
[0116] The first new display block in the current number of new display blocks is adjacent to the last current display block in the current display page. Here, the last position can be the last position towards the sliding direction, and the first position can be the first position towards the sliding direction, for example, when the sliding direction is upward, the last current display block is the current display block located at the bottom of the current display page. The first new display block in the current number of new display blocks is the next display block of the current display block located at the bottom of the current display page.
[0117] When the current display block is vertically slid, since the display blocks in the display page can be displayed in multiple rows, and different display blocks can be displayed in the same row, the heights of the display blocks in the row can be the same. Therefore, when calculating the sum of the sizes of the new display blocks, the sum of the sizes of the new display blocks in multiple rows can be calculated, and when the sum of the sizes is greater than or equal to the sliding amount, the number of rows of display blocks that need to be slid is the number of rows of new display blocks. For example, if the heights of three rows of new display blocks need to be calculated, and the height of each row of new display blocks is 1, the sum of the heights of the three rows of new display blocks is 3.
[0118] S125, determining whether the sum of the sizes is greater than or equal to the sliding amount.
[0119] It can be determined whether the sum of the sizes of the new display blocks is greater than or equal to the sliding amount, and whether to slide the current display block or update the number of current display blocks according to the determination result.
[0120] S126, if the sum of the sizes is greater than or equal to the sliding amount, the last new display block in the current number of new display blocks is slid to the position of the last current display block in the current display page.
[0121] If the sum of the sizes is greater than or equal to the sliding amount, indicating that the sliding can be performed, the last new display block in the current number of new display blocks can be slid to the position of the last current display block in the current display page. For example, when the current number is 3 and 4 rows of current display blocks are displayed in the current display page, the last new display block (the third row of new display blocks) in the 3 rows of new display blocks can be slid to the position of the fourth row of current display blocks in the current display page.
[0122] S127, if the sum of the sizes is less than the sliding amount, the current number is increased by one, and the step of S124 is performed.
[0123] If the sum of the sizes is less than the sliding amount, the current number is increased by one, and the sum of the sizes of the current number of new display blocks is calculated. For example, if the sum of the sizes of two new display blocks is less than the sliding amount, the sum of the sizes of three new display blocks is calculated.
[0124] In the embodiment of the application, the user terminal can calculate the new position in the current display page to which the new display block needs to be slid according to the sliding amount preset by the user and the sum of the sizes of the new display blocks, so that the method provided in the embodiment of the application can make the sliding of the current display block in the current display interface more accurate.
[0125] As an optional implementation manner of the embodiment of the application, a sliding prompt block can be displayed in the current display page, and a plurality of icons can be set in the sliding prompt block to prompt the user to click the icons to make the current display page slide or set the sliding amount. For example, one of the plurality of icons set in the sliding prompt block can be represented by a bidirectional arrow, and when the user wants to set the sliding amount, the user can long press the bidirectional arrow. After the user terminal detects that the user long presses the bidirectional arrow and the operation time of the user on the bidirectional arrow exceeds a preset time, for example, the preset time can be 2s, a dialog box is displayed in the current display page, and the dialog box is used to prompt the user to manually input the sliding amount.
[0126] As an optional implementation manner of the embodiment of the application, as shown in Figure 4 , the page content display method provided in the embodiment of the application can further include the following steps before the step S120 shown in Figure 1 .
[0127] S210, obtaining the sliding amount of the current display page input by the user in the current display page.
[0128] In the embodiment of the application, the change range of the sliding amount can be displayed in the current display page. A dialog box can be set in the current display page, as shown in Figure 5As shown, the dialog box can display the change range of the sliding amount, for example, the user can know the change range of the sliding amount by vertically sliding the number, and then the user can slide 2 to Figure 5 In the smaller frame, the user input sliding amount 2 is indicated.
[0129] After obtaining the user input sliding amount, a JSON (JavaScript Object Notation, JS object notation) file can be set in the user terminal, and the sliding amount is stored in the JSON file. In addition, the sliding amount can be updated to a preset database, which can be a database preset in the server. The JSON file here is a data exchange format, which can be easily read and written by users, and the machine can also easily parse the JSON file.
[0130] As an optional embodiment of the present application, Figure 4 As shown, the embodiment process step S210 can include:
[0131] The user input horizontal or vertical sliding amount for the current display block in the current display page is obtained.
[0132] Since in the video APP, not only the current display page needs to be vertically slid, but also the current display page needs to be horizontally slid, and the width and height of the display block can be different, in the current display page, the horizontal sliding amount or the vertical sliding amount can be set according to the actual sliding direction, and after the setting is completed, the user terminal can obtain the horizontal sliding amount or the vertical sliding amount.
[0133] Then Figure 1 As shown, the embodiment process step S120 can include:
[0134] The current display block is horizontally or vertically slid in the current display page.
[0135] When the user issues a vertical sliding instruction, the user terminal obtains the vertical sliding instruction, and then the user terminal vertically slides the current display block in the current display page according to the vertical sliding amount. Similarly, when the horizontal sliding instruction is obtained, the user terminal horizontally slides the current display block in the current display page according to the horizontal sliding amount.
[0136] It should be noted that a plurality of icons for indicating the sliding direction of the current display block can also be set in the sliding prompt block, and the icon can be indicated by a single arrow, wherein the direction indicated by the single arrow is the direction in which the user wants the current display block to slide. For example, when the current display block is vertically slid, two icons indicated by single arrows can be set, one of which points downward and the other of which points upward. When the user clicks the icon with the arrow pointing downward, the current display block is slid downward.
[0137] In addition, a double-click instruction of the user for the icon with the arrow pointing downward can also be received, and the display block located at the end in the current display page is slid to the last row in the current display page; and a double-click instruction of the user for the icon with the arrow pointing upward can also be received, and the display block located at the beginning in the current display page is slid to the first row in the current display page.
[0138] The embodiment of the present application fully considers different directions in which the current display page needs to be slid, and vertically slides or horizontally slides the current display block according to the vertical sliding amount or the horizontal sliding amount input by the user.
[0139] As an optional embodiment of the present application, as shown in Figure 6 as shown in the embodiment, Figure 2a the flow step S122 of the embodiment can include:
[0140] S1221, determining whether the new display block is a preset display block.
[0141] In the embodiment of the present application, the preset display block can be used to display preset content. The preset display block can be a display block that the video APP operator wants the user to see in each process of sliding the current display page, for example, the preset display block can be a display block for displaying advertising content, or the preset display block can also be a display block for displaying popular dramas.
[0142] Since each display block is stored in the server in a one-to-one correspondence between the display block and the index, wherein the display block is displayed in the order of the size of the index, for example, in a display page that can be vertically slid, the smaller the index value, the closer the display block corresponding to the index is to the front end in the current display page, therefore, when the sliding instruction of the user is obtained, whether the new display block is a preset display block can be determined according to the index value, and the following steps are used to make the preset display content always displayed in the current display page.
[0143] S1222, if yes, the new display block is slid into the current display page.
[0144] If it is judged that the new display block is the preset display block, it indicates that the new display block to be slid into the current display page is the display block desired to be displayed in the current display page, and thus the new display block can be slid into the current display page.
[0145] S1223, if not, the preset display block is slid into the current display page.
[0146] If it is judged that the new display block is not the preset display block, it indicates that the new display block to be slid into the current display page is not the display block desired to be displayed in the current display page, and thus the preset display block can be slid into the current display page by modifying the index value of the preset display block and the index value of the new display block.
[0147] In the embodiment of the application, whether the new display block is the preset display block is judged, and the preset display block is always displayed in the current display page, and thus the special requirement in the video APP can be met.
[0148] As an optional implementation of the embodiment of the application, the current display page is provided with a function option, which can be an icon for indicating sliding, and the user can slide the display block by clicking the function option.
[0149] As shown in FIG. 6, before the step S120 in the embodiment shown in FIG. 5, the page content display method provided by the embodiment of the application can further include: Figure 7 Figure 1 S220, obtaining the time length of the user's continuous operation of the function option.
[0150] The user terminal can determine the sliding times of the current display block according to the time length of the user's operation of the function option. When the user desires that the current display block can be slid for multiple times, the user can continuously operate the function option, i.e., the user can long press the function option. The user terminal can obtain the time length of the user's continuous operation of the function option.
[0151] S230, determining the sliding times of the current display block by using the time length and the corresponding relationship between the time length and the sliding times stored in advance.
[0152] S230, determining the sliding times of the current display block by using the time length and the corresponding relationship between the time length and the sliding times stored in advance.
[0153] After the duration of the user continuously operating the function option is acquired, the duration can be used to determine the number of swipes for the current display block, and a corresponding relationship between the duration and the number of swipes is pre-stored. In the corresponding relationship, the duration and the number of swipes can both be integers. However, the duration of the user continuously operating the function option can not be an integer, so after the duration is acquired, the duration can be rounded first, and then the rounded integer duration can be used to find the corresponding relationship between the duration and the number of swipes to obtain the number of swipes for the current display block.
[0154] Figure 1 The flow step S120 of the illustrated embodiment can include:
[0155] S128, swiping the current display block in the current display page a number of times according to the number of swipes for the current display block.
[0156] After the number of swipes for the current display block is obtained, the current display block can be swiped a number of times according to the number of swipes for the current display block, that is, the current display block is swiped a number of times according to the number of swipes for the current display block.
[0157] In the embodiment of the application, the duration of the user continuously operating the function option is acquired, and the number of swipes for the current display block is obtained by finding the corresponding relationship between the duration and the number of swipes, and then the current display block is swiped a number of times according to the number of swipes, so the embodiment of the application can improve the convenience of swiping the current display block, and thus improve the user experience.
[0158] As an optional implementation of the embodiment of the application, as shown in Figure 8 Figure 1 The flow step S120 of the illustrated embodiment can include:
[0159] S1291, reading the swipe amount from the user terminal and swiping the current display block in the current display page according to the swipe amount.
[0160] The user usually needs to set the swipe amount when swiping the current display page for the first time, and after the swipe amount is set, the current display block in the current display page is swiped according to the swipe amount, and it is found that the swipe is slow due to the small value of the set swipe amount, or the swipe is fast due to the large value of the set swipe amount, so the swipe amount needs to be reset in the current display page. However, the swipe amount set by the user for the first time and the swipe amount reset by the user can both be stored in the user terminal, so the swipe amount needs to be read in advance when the current display block is swiped, and therefore the swipe amount can be read from the user terminal.
[0161] Alternatively, S1292, the user's historical upload sliding amount is obtained from the server, and the current display block in the current display page is slid according to the historical upload sliding amount.
[0162] Since the user input sliding amount is usually updated in the database of the server, the user's historical upload sliding amount can also be obtained from the database of the server, and the current display block in the current display page is slid according to the historical upload sliding amount.
[0163] In addition, when the user terminal detects that the user does not reset the sliding amount, the sliding amount can be read from the JSON file stored in the user terminal, so that the embodiment of the application can shorten the time for reading the sliding amount, and thus the user terminal can respond more quickly to the sliding instruction sent by the user.
[0164] As an optional embodiment of the application, as shown in Figure 9 , the page content display method provided by the embodiment of the application can further include: Figure 1
[0165] S240, judging whether the current display page supports custom sliding.
[0166] Since there can be a feed stream display block in the current display page, the feed stream display block is a display block that can preview the video content displayed in the display block, and the feed stream display block is usually required to be a display block that cannot support custom sliding; or there can be a display block in the current display page that cannot be customized due to special reasons, for example, part of the display blocks in the current display interface are required to be displayed in the current display page as much as possible, and this part of the display block is a display block that cannot be customized. However, if the user sets the sliding amount to a large value, the number of rows of display blocks that need to be slid after obtaining the user's sliding instruction can be more than twice the number of rows of the current display block in the current display page, so some display blocks can not be displayed to the user. Therefore, it can be first judged whether the current display page supports custom sliding.
[0167] S250, if supported, sliding the current display block in the current display page according to the user's preset sliding amount.
[0168] If the current display page supports custom sliding, the user input sliding amount can be obtained, and the current display block in the current display page is slid according to the user's preset sliding amount.
[0169] S260, if not supported, sliding the current display block in the current display page according to the preset sliding manner.
[0170] In the embodiment of the present application, the preset sliding mode is a system default sliding mode. If the current display page does not support custom sliding, the current display block in the current display page is slid according to the preset sliding mode, which can be a system default sliding mode, for example, the current display block in the current display page is slid according to the sliding direction and speed of the user's finger on the current display interface.
[0171] In the embodiment of the present application, it can be judged whether the current display interface supports custom sliding, and the sliding mode of the current display page is determined according to the judgment result, so that the current display block of the current display page can be slid according to the user's custom sliding as much as possible, and the user experience is improved, and the business needs of the video APP developer that some display blocks must be displayed on the current display interface are also met.
[0172] As an optional implementation of the embodiment of the present application, Figure 9 The flow step S240 of the embodiment shown can include:
[0173] According to the attribute identifier of the current display page obtained from the server, it is judged whether the current display page supports custom sliding.
[0174] The identifier information of the current display page is usually stored in the server, which can include the name of each display block, video duration and other content, and the attribute identifier can be added to the identifier information of the display block, which can be used to identify whether the current display page supports custom sliding. For example, an is_customize field is added to the identifier information, which can be selected as 0 or 1, 0 indicating that the current display page does not support custom sliding, and 1 indicating that the current display page supports custom sliding. If the attribute identifier is not added to the identifier information, i.e., the default attribute identifier is empty, it means that the current display page does not support custom sliding.
[0175] When receiving the opening instruction of the video APP from the user, the user terminal opens the video APP and enters the current display page, first judges whether the current display page supports custom sliding according to the attribute identifier, and when the current display page supports custom sliding, a sliding prompt block is displayed, and the current display block of the current display page is slid according to the icon clicked by the user in the sliding prompt block.
[0176] In the embodiment of the present application, the attribute identifier of the current display page is obtained by the user terminal in the server in advance, and whether the current display page supports custom sliding is judged according to the attribute identifier, so that the process can be made simpler.
[0177] The embodiment of the present application provides a specific embodiment of a page content display device, which is applied to a user terminal and comprises Figure 1 The flowchart is shown in the figure, and the flowchart is shown in the figure Figure 10 , Figure 10 The figure is a structural schematic diagram of the page content display device, which can comprise:
[0178] The receiving module 310 is used for receiving a sliding instruction of a user for a current display page, and the current display page displays a current display block.
[0179] The sliding module 320 is used for sliding the current display block in the current display page according to a sliding amount preset by the user, and the sliding amount is used for representing a sliding distance of the current display block.
[0180] The page content display device provided by the embodiment of the present application comprises the following steps: a user terminal receives a sliding instruction of a user for a current display page, and the current display page displays a current display block; and the current display block is slid in the current display page according to a sliding amount preset by the user. In the embodiment of the present application, the user can set the sliding amount according to the own demand, and the user terminal can slide the current display block in the current display page according to the preset sliding amount.
[0181] As an optional implementation of the embodiment of the present application, as shown in the figure, the sliding module 320 can comprise: Figure 11
[0182] The sliding-out sub-module 321 is used for sliding the current display block out of the current display page according to the sliding amount preset by the user.
[0183] The sliding-in sub-module 322 is used for sliding a new display block into the current display page, and the new display block is different from the current display block in display content.
[0184] As an optional implementation of the embodiment of the present application, as shown in the figure, the sliding module 320 can comprise: Figure 12
[0185] The obtaining sub-module 323 is used for obtaining the size of a new display block which is not displayed in the current display page.
[0186] The calculating sub-module 324 is used for calculating the sum of the sizes of the current number of new display blocks, and the new display block located at the first position in the current number of new display blocks is adjacent to the current display block located at the last position in the current display page.
[0187] The judging sub-module 325 is used for judging whether the sum is greater than or equal to the sliding amount.
[0188] The sliding sub-module 326 is configured to slide the last new display block in the current number of new display blocks to a position of the last current display block in the current display page if the sum of the sizes is greater than or equal to the sliding amount.
[0189] The triggering sub-module 327 is configured to increase the current number by one and trigger the calculating sub-module 324 to perform the step of calculating the sum of the sizes of the current number of new display blocks if the sum of the sizes is less than the sliding amount.
[0190] As an optional implementation of the embodiment of the present application, on the basis of the device shown in the embodiment, the device provided by the embodiment of the present application can further include: Figure 10 As shown in the embodiment, the device provided by the embodiment of the present application can further include: Figure 13 As shown in the embodiment, the device provided by the embodiment of the present application can further include:
[0191] The first obtaining module 330 is configured to obtain a sliding amount input by a user in the current display page, the sliding amount being for the current display page, and the current display page displaying a change range of the sliding amount.
[0192] As an optional implementation of the embodiment of the present application, the first obtaining module 330 is specifically configured to:
[0193] Obtain a horizontal sliding amount or a vertical sliding amount input by a user in the current display page, the sliding amount being for the current display block.
[0194] The sliding module 320 is specifically configured to:
[0195] Horizontally or vertically slide the current display block in the current display page.
[0196] As an optional implementation of the embodiment of the present application, as shown in the embodiment, the sliding-in sub-module 322 can include: Figure 14
[0197] The judging unit 3221 is configured to judge whether the new display block is a preset display block, the preset display block being used to display preset content.
[0198] The first sliding-in unit 3222 is configured to slide the new display block into the current display page if the new display block is the preset display block.
[0199] The second sliding-in unit 3223 is configured to slide the preset display block into the current display page if the new display block is not the preset display block.
[0200] As an optional implementation of the embodiment of the present application, the current display page is provided with a function option. As shown in the embodiment, on the basis of the device shown in the embodiment, the page content display device provided by the embodiment of the present application can further include: Figure 10 As shown in the embodiment, the page content display device provided by the embodiment of the present application can further include: Figure 15 As shown in the embodiment, the page content display device provided by the embodiment of the present application can further include:
[0201] The second acquisition module 340 is used to acquire the duration of the user's continuous operation of the function options.
[0202] The determination module 350 is used to determine the number of slides for the currently displayed block by utilizing the duration and the pre-stored correspondence between duration and number of slides.
[0203] The aforementioned sliding module 320 is specifically used for:
[0204] Use the number of swipes of the currently displayed block to perform multiple swipes on the currently displayed block in the current display page.
[0205] This invention also provides an electronic device, such as... Figure 16 As shown, it includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404.
[0206] Memory 403 is used to store computer programs.
[0207] When processor 401 executes the program stored in memory 403, it performs the following steps:
[0208] It receives swipe commands from the user for the currently displayed page, which contains a display area for showing video content.
[0209] The currently displayed area on the page is scrolled according to the user-preset scroll amount, which represents the scrolling distance of the currently displayed area.
[0210] The electronic device provided in this embodiment of the invention allows a user terminal to receive a swipe command from a user for the currently displayed page. The currently displayed page shows a currently displayed block, which is used to display video content. The user swipes the currently displayed block on the currently displayed page according to a preset swipe amount. In this embodiment of the invention, the user can set the swipe amount according to their own needs, and the user terminal can swipe the currently displayed block on the currently displayed page according to the preset swipe amount.
[0211] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0212] The communication interface is configured to communicate between the electronic device and other devices.
[0213] The memory can include a random access memory (RAM) and can also include a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.
[0214] The aforementioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. It can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0215] In yet another embodiment provided by the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the steps of any of the aforementioned page content display methods.
[0216] In yet another embodiment provided by the present application, a computer program product containing instructions, which, when run on a computer, causes the computer to execute any of the aforementioned page content display methods.
[0217] In the embodiments described above, all or some of the steps can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or some of the steps can be implemented in the form of one or more computer programs. The computer program is stored in a computer readable medium, which can be any data storage device that can store computer programs used for or produced by electronic devices. The computer readable medium includes magnetic disk, optical disk, read-only memory (ROM), flash memory and electrical or other type of computer memory. The computer program is loaded into and executed by a computer to produce the processes or functions described above. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer program can be transmitted from one computer readable medium to another computer readable medium, for example, from a website, computer, server or data center to another website, computer, server or data center through wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave and the like) means. The computer readable medium can be any available medium or a set of media that can be accessed by a computer and includes a server, data center and the like data storage devices that include one or more available media. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, solid state disk (SSD)) and the like.
[0218] It should be noted that the terms such as first and second are used herein only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0219] Each of the embodiments in the specification is described in a related manner, and the same or similar parts between each of the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the related parts can be referred to the part of the method embodiment.
[0220] The above merely provides the preferred embodiments of the application, and not intended to limit the protection scope of the application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the application shall fall within the protection scope of the application.
Claims
1. A method for displaying page content, characterized in that, The method includes: The system receives a swipe command from the user for the currently displayed page, which contains multiple display blocks. These display blocks are used to display video content, and the different display blocks have different sizes. The system obtains the amount of scrolling input by the user on the currently displayed page, and the range of the scrolling amount is displayed on the currently displayed page. The method of sliding the currently displayed block on the currently displayed page according to the user-inputted sliding amount includes: obtaining the size of new display blocks not displayed on the currently displayed page; calculating the sum of the sizes of the current number of new display blocks, wherein the first new display block among the current number of new display blocks is adjacent to the last current display block on the current displayed page; determining whether the sum of the sizes is greater than or equal to the sliding amount; if the sum of the sizes is greater than or equal to the sliding amount, then sliding the last new display block among the current number of new display blocks to the position of the last current display block among the multiple current display blocks displayed on the current displayed page; if the sum of the sizes is less than the sliding amount, then incrementing the current number by one and performing the step of calculating the sum of the sizes of the current number of new display blocks; the sliding amount is used to represent the sliding distance of the currently displayed block.
2. The method according to claim 1, characterized in that, The step of sliding the currently displayed block in the currently displayed page according to the user-input sliding amount includes: The currently displayed block will slide out of the currently displayed page according to the amount of sliding input by the user; A new display area is slid into the current display page, and the content of the new display area is different from that of the current display area.
3. The method according to claim 1, characterized in that, The step of obtaining the scroll amount entered by the user on the currently displayed page includes: Get the horizontal or vertical swipe amount entered by the user on the currently displayed page for the currently displayed area; The step of sliding the currently displayed block in the currently displayed page according to the user-preset sliding amount includes: Swipe the currently displayed area horizontally or vertically on the currently displayed page.
4. The method according to claim 2, characterized in that, The step of sliding the new display area into the current display page includes: Determine whether the new display block is a preset display block, wherein the preset display block is used to display preset content; If so, the new display area will be slid into the current display page; If not, the preset display area will be slid into the current display page.
5. The method according to claim 1, characterized in that, The currently displayed page has function options; before the step of sliding the currently displayed block on the currently displayed page according to the user-input sliding amount, the method further includes: Obtain the duration of the user's continuous operation of the function options; Using the duration and the pre-stored correspondence between the duration and the number of swipes, the number of swipes for the currently displayed block is determined; The step of sliding the currently displayed block in the currently displayed page according to the user-input sliding amount includes: By utilizing the number of swipes of the currently displayed block, the currently displayed block in the currently displayed page is swiped multiple times.
6. A page content display device, characterized in that, The device includes: The receiving module is used to receive the user's swiping command for the currently displayed page. The currently displayed page displays multiple display blocks, which are used to display video content. The different display blocks have different sizes. The first acquisition module is used to acquire the amount of scrolling input by the user on the current display page, wherein the range of the scrolling amount is displayed on the current display page. A sliding module is used to slide the currently displayed block on the currently displayed page according to the sliding amount input by the user. The sliding module includes: an acquisition submodule, used to acquire the size of new display blocks not displayed on the currently displayed page; a calculation submodule, used to calculate the sum of the sizes of a current number of new display blocks, wherein the first new display block in the current number of new display blocks is adjacent to the last current display block in the current display page; a judgment submodule, used to determine whether the sum of the sizes is greater than or equal to the sliding amount; a sliding submodule, used to slide the last new display block in the current number of new display blocks to the position of the last current display block in the current display page if the sum of the sizes is greater than or equal to the sliding amount; and a triggering submodule, used to increment the current number by one and trigger the calculation submodule to execute the step of calculating the sum of the sizes of the current number of new display blocks if the sum of the sizes is less than the sliding amount. The sliding amount is used to represent the sliding distance of the currently displayed block.
7. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-5.
8. A computer storage medium, characterized in that, The computer storage medium stores a computer program, which, when executed by a processor, implements the steps of the method described in any one of claims 1-5.
Citation Information
Patent Citations
Method for controlling display interface to slide, and touch terminal
CN108021322A
Interface-sliding-based object display method, device and storage medium
CN109324742A