WO2022001220A1 - Method for presenting shared display element in pages, and electronic device and storage medium - Google Patents

Method for presenting shared display element in pages, and electronic device and storage medium Download PDF

Info

Publication number
WO2022001220A1
WO2022001220A1 PCT/CN2021/082389 CN2021082389W WO2022001220A1 WO 2022001220 A1 WO2022001220 A1 WO 2022001220A1 CN 2021082389 W CN2021082389 W CN 2021082389W WO 2022001220 A1 WO2022001220 A1 WO 2022001220A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
display element
shared display
data
shared
Prior art date
Application number
PCT/CN2021/082389
Other languages
French (fr)
Chinese (zh)
Inventor
杨树彬
Original Assignee
掌阅科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 掌阅科技股份有限公司 filed Critical 掌阅科技股份有限公司
Publication of WO2022001220A1 publication Critical patent/WO2022001220A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Definitions

  • the present disclosure relates to the technical field of terminals, and in particular, to a method for displaying shared display elements in a page, an electronic device and a storage medium.
  • the application provides a variety of different pages to display information, and each page can be switched and jumped. For example, jump from the current page to the next page.
  • the page data of the next page is obtained for rendering and display, and the visual effect presented to the user is that the next page directly covers the current page.
  • the present disclosure is proposed to provide a display method, electronic device and storage medium for sharing display elements in a page that overcome the above problems or at least partially solve the above problems.
  • a method for displaying shared display elements in a page including:
  • the at least one shared display element is rendered and displayed according to the motion trajectory data and the zoom size data of the at least one shared display element, and other pages except the at least one shared display element in the second page are displayed according to the page data of the second page returned by the server. Elements are rendered for display.
  • an electronic device including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface communicate with each other through the communication bus;
  • the memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform the following operations:
  • the at least one shared display element is rendered and displayed according to the motion trajectory data and the zoom size data of the at least one shared display element, and other pages except the at least one shared display element in the second page are displayed according to the page data of the second page returned by the server. Elements are rendered for display.
  • a non-volatile computer-readable storage medium where at least one executable instruction is stored in the non-volatile computer-readable storage medium, and the executable instruction causes a processor to perform the following operations :
  • the at least one shared display element is rendered and displayed according to the motion trajectory data and the zoom size data of the at least one shared display element, and other pages except the at least one shared display element in the second page are displayed according to the page data of the second page returned by the server. Elements are rendered for display.
  • a computer program product comprising a computing program stored on the above-mentioned non-volatile computer-readable storage medium.
  • the display method, electronic device and storage medium for sharing display elements in pages of the present disclosure it is detected whether the second page and the first page have at least one same display element based on the jump request from the first page to the second page. share the display element; if so, determine the motion trajectory data of the at least one shared display element according to the first position of the at least one shared display element on the first page and the second position of the second page; according to the at least one shared display element in the first position
  • the first size of the page and the second size of the second page determine the scaling size data of the at least one shared display element; the at least one shared display element is rendered and displayed according to the motion trajectory data and the scaling size data of the at least one shared display element, and
  • the page data of the second page returned by the server renders and displays other page elements in the second page except at least one shared display element.
  • FIG. 1 shows a flowchart of a method for displaying shared display elements in a page provided by an embodiment of the present disclosure
  • FIG. 2 shows a flowchart of a method for displaying shared display elements in a page provided by another embodiment of the present disclosure
  • Figure 3a shows a schematic diagram of a first page in an embodiment of the present disclosure
  • Fig. 3b shows a schematic diagram of a second page in an embodiment of the present disclosure
  • FIG. 4 shows a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • FIG. 1 shows a flowchart of a method for displaying shared display elements in a page provided by an embodiment of the present disclosure. As shown in FIG. 1 , the method includes the following steps:
  • Step S110 based on the jump request from the first page to the second page, detect whether the second page and the first page have at least one shared display element that is the same as the display element.
  • the jump request from the first page to the second page may be triggered according to a user operation, or may be triggered according to an application automatic jump request.
  • the second page contains at least one same display element as the first page, and the same display element contained in the first page and the second page is the first page. and shared display elements between the second page.
  • This step is equivalent to detecting whether the second page multiplexes the display elements in the first page and the number of the multiplexed display elements.
  • Step S120 if the second page and the first page have at least one shared display element that is the same as the display element, determine at least one shared display element according to the at least one shared display element at the first position on the first page and at the second position on the second page. Displays the movement track data of the element.
  • the shared display element is rendered mainly from two aspects of position change and size change.
  • For the position change of the shared display element determine the motion trajectory of the shared display element according to the first position of the shared display element on the first page and the second position on the second page, and obtain motion trajectory data for indicating the shared display element . Specifically, according to the coordinates of the first position of the shared display element on the first page and the coordinates of the second position of the shared display element on the second page, determine the coordinate data of the trajectory between the first position and the second position , that is, the exercise track data of the shared display element is obtained.
  • the motion trajectory of the shared display element is a straight trajectory from the first position to the second position.
  • Step S130 Determine scaling size data of the at least one shared display element according to the first size of the at least one shared display element on the first page and the second size of the at least one shared display element.
  • For the size change of the shared display element according to the first size of the shared display element on the first page and the second size of the second page, determine the size of the shared display element that needs to be enlarged or reduced, and generate Share the zoom size data of the display element to zoom in or out.
  • Step S140 Render and display at least one shared display element according to the motion trajectory data and zoom size data of the at least one shared display element, and perform a display of at least one shared display element in the second page according to the page data of the second page returned by the server. other page elements for rendering display.
  • the rendering display of the second page is divided into two parts: one is the rendering display of shared display elements, which is specifically rendered and displayed according to the determined motion trajectory data and zoom size data.
  • the vision presented to the user is the dynamic effect of the shared display element changing and moving along the motion track, that is, the effect seen by the user is that the shared display element directly moves smoothly from the first position to the second position, and the size Also changed from the first size to the second size.
  • the effect seen by the user is that the second page directly covers the first page, and the effect of dynamic transition of the shared display element from the first position to the second position cannot be presented.
  • the second is the rendering and display of other page elements except the shared display element. Specifically, the other page elements are rendered and displayed according to the page data of the second page returned by the server.
  • the method for displaying shared display elements in a page based on the jump request from the first page to the second page, it is detected whether the second page and the first page have at least one shared display element that is the same as the display element. , then according to the position and size of the shared display element on the first page and the second page respectively, determine the motion trajectory data and scaled size data of the shared display element, and then render the shared display according to the motion trajectory data and scaled size data of the shared display element. elements, and render and display other page elements in the second page except the shared display elements according to the page data returned by the server.
  • FIG. 2 shows a flowchart of a method for displaying shared display elements in a page provided by another embodiment of the present disclosure. As shown in FIG. 2 , the method includes the following steps:
  • Step S210 based on the jump request from the first page to the second page, detect whether the second page and the first page have at least one shared display element that is the same as the display element.
  • the jump request from the first page to the second page is triggered according to the user's operation on the entry in the first page for jumping to the second page.
  • multiple books are displayed on the book list page, and the entry for jumping to the book details page on the book list page is set in the display area of each book.
  • a jump request from the book list page to the book details page of the book is triggered.
  • the jump request from the first page to the second page is triggered according to the automatic jump request of the application. For example, after the screen-opening page is displayed, it will automatically jump to the homepage of the application. Then, the jump request from the screen-opening page to the homepage of the application is triggered according to the automatic jumping requirement of the application.
  • Each different page of the application has a corresponding page template, and the page template specifies each page element displayed on the page and its position and size. Based on this, whether there is a shared display element between the second page and the first page can be detected through the page templates of the first page and the second page.
  • Step S220 if it is detected that the second page and the first page have at least one shared display element with the same display element, determine at least one shared display element according to the at least one shared display element in the first position of the first page and the second position of the second page. Share the motion trajectory data of display elements.
  • the shared display elements are rendered mainly from three aspects: position change, size change, and change speed.
  • For the position change of the shared display element determine the motion trajectory of the shared display element according to the first position of the shared display element on the first page and the second position on the second page, and obtain motion trajectory data for indicating the shared display element . Specifically, according to the coordinates of the first position of the shared display element on the first page and the coordinates of the second position of the shared display element on the second page, determine the coordinate data of the trajectory between the first position and the second position , that is, the exercise track data of the shared display element is obtained.
  • the motion trajectory of the shared display element is a straight trajectory from the first position to the second position.
  • Step S230 Determine scaling size data of the at least one shared display element according to the first size of the at least one shared display element on the first page and the second size of the at least one shared display element.
  • the size change of the shared display element according to the first size of the shared display element on the first page and the second size of the second page, determine the size of the shared display element that needs to be enlarged or reduced, and get the Share the zoom size data of the display element to zoom in or out.
  • Step S240 determining the movement distance data of the at least one shared display element according to the first position of the at least one shared display element on the first page and the second position of the second page; Set the movement duration data, and calculate the movement speed data of at least one shared display element.
  • the motion duration of the shared display element is fixed, then the shared display element is determined according to the first position of the shared display element on the first page and the second position of the second page. Movement distance; then, according to the movement distance of the shared display element and the fixed duration, the movement speed of the shared display element is calculated.
  • the motion trajectory, zoom size, and motion speed of the shared display element are determined, and the rendering display is performed according to these three factors, and the rendering effect is: within a fixed time period, the shared display element is displayed at a certain speed by The first position is moved to the second position, and the size is scaled from the first size to the second size.
  • Step S250 according to the motion trajectory data, zoom size data and motion speed data of at least one shared display element, read and render and display at least one shared display element from the local cache, and according to the page data of the second page returned by the server Other page elements in the second page except at least one shared display element are rendered and displayed.
  • the rendering display of the second page in this embodiment is divided into two parts: one is the rendering display of the shared display elements in the second page.
  • the second is the rendering display of other page elements except shared display elements. Each of them will be described below.
  • the display elements multiplexed among the pages can be determined, for example, the display elements multiplexed among the pages are detected according to the page templates of the pages.
  • the shared display elements are cached locally, the shared display elements between each page are acquired from the server in advance, and cached locally. For example, after requesting the page data of the first page, the display element of the first page reused by the second page can be cached, and when jumping to the second page, the display element can be directly read from the cache. , without requesting to the server.
  • the shared display element in the second page read and render the shared display element locally according to its corresponding motion trajectory data, zoom size data, and motion speed data.
  • the motion trajectory of the shared display element is a straight line from the first position to the second position
  • the scaled size of the shared display element is enlarged from the first size to the second size
  • the motion speed is 1 cm/ms (the preset motion duration is 3 milliseconds, and the linear trajectory distance is 3 centimeters)
  • the visual effect of the rendering display is: the shared display element with a duration of 3 milliseconds moves from the first position to the second position in a straight line, and the size is enlarged from the first size to the second Dimension transition animation.
  • the at least one shared display element and its relevant basic information are read from the local cache and rendered and displayed. If the second page also contains the relevant basic information of the shared display element, the relevant basic information of the shared display element will also be cached locally in advance. When rendering and displaying, the shared display element and its related basic information will be read and rendered from the local cache. information.
  • the book list page and the book details page reuse the e-book cover element, and the relevant basic information of the e-book cover element is requested from the server in advance according to the book identifier of any book in the book list page.
  • the book identifier of any book in the book list page Such as book title, author, content introduction, book catalog, etc., and cache it locally.
  • rendering and display is performed according to the page data of the second page returned by the server.
  • the page data of the second page can also be requested from the server in advance and cached locally, for example, the page data of the second page can be cached when the first page or even a page before the first page.
  • the method of the embodiment of the present disclosure can be applied to an e-book application.
  • the e-book application includes a book list page, a book detail page, a bookshelf page, a book order page, etc.
  • the display elements multiplexed by each page usually include an e-book cover element.
  • FIG. 3a shows a schematic diagram of the first page in the embodiment of the present disclosure
  • FIG. Schematic diagram, as shown in Figures 3a and 3b the first page is the book list page
  • the second page is the book details page
  • the first page and the second page reuse the book cover element
  • the book cover is in the first page.
  • position and size are not the same as the position and size on the second page.
  • the visual effect presented to the user is: the book cover 3 moves from its first position on the first page to its position on the second page.
  • the size of the book cover 3 is continuously enlarged, from the first size in the first page to the second size in the second page at a constant speed, at the same time, the second page
  • the other page elements are rendered normally.
  • the visual effect presented to the user in the prior art is that the second page directly covers the first page. Compared with the prior art, the rendering display effect of the method in the embodiment of the present application is better.
  • Shared display elements can also be creative elements.
  • creative elements usually have two display resource slots, one is the opening page, and the other is the focus map on the book list page, that is, the opening page.
  • the advertising material elements will be reused between the page and the book list page, and the jump between the two pages may also be processed by the method of this embodiment.
  • the following steps are further performed: calculating the background processing layer data to be displayed in the second page according to the at least one shared display element rendered and displayed;
  • the processing layer data rendering shows the background processing layer in the second page.
  • data for rendering the background processing layer of the second page is calculated according to the rendered shared display element. For example, first perform color extraction processing on the rendered shared display element, and extract the main color data of the shared display element; then, the shared display element is enlarged and Gaussian blurred; then, the extracted theme color data is appended to the enlarged On the shared display element with Gaussian blurring, the background processing layer data is obtained; finally, the background processing layer of the second page is rendered and displayed according to the background layer processing data.
  • the second page of the final rendering display also has a background layer, and the display effect is better.
  • the second page does not contain the same shared display element as any display element in the first page, all page elements of the second page are rendered and displayed according to the page data of the second page returned by the server.
  • the method for displaying shared display elements in a page based on the jump request from the first page to the second page, it is detected whether the second page contains the same shared display elements as the display elements in the first page; If it is included, determine the motion trajectory data of the shared display element according to the position of the shared display element on the first page and the second page, and determine the shared display element according to the size of the shared display element on the first page and the size of the second page.
  • the scaled size data of the display element and the motion speed data of the shared display element are determined; then, according to the motion trajectory data, the scaled size data and the motion speed data of the shared display element, the data is read from the local cache for the shared display element and its related
  • the basic information is rendered and displayed, and at the same time, other display elements other than the shared display elements in the second page are rendered and displayed.
  • a method for rendering and displaying the background layer of the second page based on the shared display element is also provided, which can beautify the second page and further improve the rendering and display effect of the page.
  • An embodiment of the present disclosure provides a non-volatile computer-readable storage medium, where the non-volatile computer-readable storage medium stores at least one executable instruction, and the computer-executable instruction can execute any of the foregoing method embodiments. Display method of shared display elements in the page.
  • Executable instructions can specifically be used to cause the processor to perform the following operations:
  • the at least one shared display element is rendered and displayed according to the motion trajectory data and the zoom size data of the at least one shared display element, and other pages except the at least one shared display element in the second page are displayed according to the page data of the second page returned by the server. Elements are rendered for display.
  • the executable instructions cause the processor to:
  • At least one shared display element is rendered and displayed according to the motion speed data.
  • the executable instructions cause the processor to:
  • the executable instructions cause the processor to perform the following operations: if it is detected that the second page contains relevant basic information of at least one shared display element, read and render from the local cache the at least one shared display element and its relevant basic information.
  • the jump request from the first page to the second page is triggered according to the user's operation on the entry in the first page for jumping to the second page, or the jump request is automatically jumped according to the application Triggered by demand.
  • the shared display elements include: a creative element and/or an e-book cover element.
  • the relevant basic information of the shared display element includes one or more of the following: book name, book author, book content introduction, and book catalog.
  • the executable instructions cause the processor to:
  • the background processing layer in the second page is rendered and displayed according to the background processing layer data.
  • the shared display elements can be dynamically moved to the corresponding corresponding pages of the next page under the premise of ensuring the normal rendering and display of the next page.
  • the dynamic effect of the position improves the rendering and display effect when the page is jumped.
  • FIG. 4 shows a schematic structural diagram of an embodiment of an electronic device of the present disclosure, and the specific embodiment of the present disclosure does not limit the specific implementation of the electronic device.
  • the electronic device may include: a processor (processor) 402 , a communication interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .
  • processor processor
  • Communication interface Communication Interface
  • memory memory
  • the processor 402 , the communication interface 404 , and the memory 406 communicate with each other through the communication bus 408 .
  • the communication interface 404 is used for communicating with network elements of other devices such as clients or other servers.
  • the processor 402, configured to execute the program 410, may specifically execute the relevant steps in the above-mentioned embodiments of the method for displaying shared display elements in the page of the electronic device.
  • the program 410 may include program code including computer operation instructions.
  • the processor 402 may be a central processing unit (CPU), or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present disclosure.
  • the one or more processors included in the electronic device may be the same type of processors, such as one or more CPUs; or may be different types of processors, such as one or more CPUs and one or more ASICs.
  • the memory 406 is used to store the program 410 .
  • Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.
  • the program 410 can specifically be used to cause the processor 402 to perform the following operations:
  • the at least one shared display element is rendered and displayed according to the motion trajectory data and the zoom size data of the at least one shared display element, and other pages except the at least one shared display element in the second page are displayed according to the page data of the second page returned by the server. Elements are rendered for display.
  • program 410 causes processor 402 to perform the following operations:
  • At least one shared display element is rendered and displayed according to the motion speed data.
  • program 410 causes processor 402 to perform the following operations:
  • program 410 causes processor 402 to perform the following operations:
  • the at least one shared display element and its relevant basic information are read and rendered from the local cache.
  • the jump request from the first page to the second page is triggered according to the user's operation on the entry in the first page for jumping to the second page, or the jump request is automatically jumped according to the application Triggered by demand.
  • the shared display elements include: a creative element and/or an e-book cover element.
  • the relevant basic information of the shared display element includes one or more of the following: book name, book author, book content introduction, and book catalog.
  • program 410 causes processor 402 to perform the following operations:
  • the background processing layer in the second page is rendered and displayed according to the background processing layer data.
  • the shared display elements can be dynamically moved to the corresponding corresponding pages of the next page under the premise of ensuring the normal rendering and display of the next page.
  • the dynamic effect of the position improves the rendering and display effect when the page is jumped.
  • modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment.
  • the modules or units or components in the embodiments may be combined into one module or unit or component, and further they may be divided into multiple sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method so disclosed may be employed in any combination unless at least some of such features and/or procedures or elements are mutually exclusive. All processes or units of equipment are combined.
  • Each feature disclosed in this specification may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
  • Various component embodiments of the present disclosure may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof.
  • a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components according to embodiments of the present disclosure.
  • DSP digital signal processor
  • the present disclosure can also be implemented as apparatus or apparatus programs (eg, computer programs and computer program products) for performing some or all of the methods described herein.
  • Such a program implementing the present disclosure may be stored on a computer-readable medium, or may be in the form of one or more signals. Such signals may be downloaded from Internet sites, or provided on carrier signals, or in any other form.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

A method for presenting a shared display element in pages, the method comprising: step S110, on the basis of a request for jumping from a first page to a second page, detecting whether the second page and the first page have a shared display element; step S120, if so, determining motion trajectory data of the shared display element according to the position of the shared display element on the first page and the second page; step S130, determining scaling size data of the shared display element according to the size of the shared display element on the first page and the second page; and step S140, rendering and presenting the shared display element according to the motion trajectory data and the scaling size data of the shared display element, and according to page data, returned by a server, of the second page, rendering and presenting other page elements, other than the shared display element, on the second page. By means of a shared display element, a rendering and presentation effect during page jumping is promoted. In addition, further disclosed are an electronic device and a storage medium which correspond to the method.

Description

页面中共享显示元素的展示方法、电子设备及存储介质Display method, electronic device and storage medium for shared display elements in a page
相关申请的交叉参考CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求于2020年6月30日提交中国专利局、申请号为202010615124.6、名称为“页面中共享显示元素的展示方法、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on June 30, 2020 with the application number 202010615124.6 and titled "Display Method, Electronic Device and Storage Medium for Shared Display Elements in Pages", the entire contents of which are approved by Reference is incorporated in this application.
技术领域technical field
本公开涉及终端技术领域,具体涉及一种页面中共享显示元素的展示方法、电子设备及存储介质。The present disclosure relates to the technical field of terminals, and in particular, to a method for displaying shared display elements in a page, an electronic device and a storage medium.
背景技术Background technique
随着科技的不断发展,各种网络服务应用的功能日益强大,应用中提供了多种不同的页面来展示信息,各个页面之间可以相互切换跳转,例如,由当前页面向下一个页面跳转时,获取下一个页面的页面数据进行渲染展示,呈现给用户的视觉效果是下一个页面直接覆盖当前页面。With the continuous development of science and technology, the functions of various network service applications are becoming more and more powerful. The application provides a variety of different pages to display information, and each page can be switched and jumped. For example, jump from the current page to the next page. When turning, the page data of the next page is obtained for rendering and display, and the visual effect presented to the user is that the next page directly covers the current page.
但是,发明人在实现本公开的过程发现:应用中的不同页面会复用相同的显示元素,也即不同的页面之间是有联系的,而现有技术中页面跳转处理方式切断了这种页面之间的在显示元素上的联系,缺乏一种针对于复用相同显示元素的页面之间的跳转处理方法。However, in the process of implementing the present disclosure, the inventor found that different pages in the application reuse the same display elements, that is, different pages are related, and the page jump processing method in the prior art cuts off this. There is no connection between pages on display elements, and there is a lack of a jump processing method for pages that reuse the same display elements.
发明内容SUMMARY OF THE INVENTION
鉴于上述问题,提出了本公开以便提供一种克服上述问题或者至少部分地解决上述问题的页面中共享显示元素的展示方法、电子设备及存储介质。In view of the above problems, the present disclosure is proposed to provide a display method, electronic device and storage medium for sharing display elements in a page that overcome the above problems or at least partially solve the above problems.
根据本公开的一个方面,提供了一种页面中共享显示元素的展示方法,包括:According to an aspect of the present disclosure, a method for displaying shared display elements in a page is provided, including:
基于由第一页面向第二页面的跳转请求,检测第二页面与第一页面是否 存在至少一个显示元素相同的共享显示元素;Based on the jump request from the first page to the second page, detect whether the second page and the first page have at least one shared display element identical to the display element;
若是,根据至少一个共享显示元素在第一页面的第一位置和在第二页面的第二位置,确定至少一个共享显示元素的运动轨迹数据;If so, determine the motion trajectory data of the at least one shared display element according to the first position of the at least one shared display element on the first page and the second position of the second page;
根据至少一个共享显示元素在第一页面的第一尺寸和在第二页面的第二尺寸,确定至少一个共享显示元素的缩放尺寸数据;determining the scaling size data of the at least one shared display element according to the first size of the at least one shared display element on the first page and the second size of the second page;
根据至少一个共享显示元素的运动轨迹数据和缩放尺寸数据渲染展示至少一个共享显示元素,并根据服务器所返回的第二页面的页面数据对第二页面中除至少一个共享显示元素之外的其他页面元素进行渲染展示。The at least one shared display element is rendered and displayed according to the motion trajectory data and the zoom size data of the at least one shared display element, and other pages except the at least one shared display element in the second page are displayed according to the page data of the second page returned by the server. Elements are rendered for display.
根据本公开的又一方面,提供了一种电子设备,包括:处理器、存储器、通信接口和通信总线,处理器、存储器和通信接口通过通信总线完成相互间的通信;According to another aspect of the present disclosure, an electronic device is provided, including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface communicate with each other through the communication bus;
存储器用于存放至少一可执行指令,可执行指令使处理器执行以下操作:The memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform the following operations:
基于由第一页面向第二页面的跳转请求,检测第二页面与第一页面是否存在至少一个显示元素相同的共享显示元素;based on the jump request from the first page to the second page, detecting whether the second page and the first page have at least one shared display element that is the same as the display element;
若是,根据至少一个共享显示元素在第一页面的第一位置和在第二页面的第二位置,确定至少一个共享显示元素的运动轨迹数据;If so, determine the motion trajectory data of the at least one shared display element according to the first position of the at least one shared display element on the first page and the second position of the second page;
根据至少一个共享显示元素在第一页面的第一尺寸和在第二页面的第二尺寸,确定至少一个共享显示元素的缩放尺寸数据;determining the scaling size data of the at least one shared display element according to the first size of the at least one shared display element on the first page and the second size of the second page;
根据至少一个共享显示元素的运动轨迹数据和缩放尺寸数据渲染展示至少一个共享显示元素,并根据服务器所返回的第二页面的页面数据对第二页面中除至少一个共享显示元素之外的其他页面元素进行渲染展示。The at least one shared display element is rendered and displayed according to the motion trajectory data and the zoom size data of the at least one shared display element, and other pages except the at least one shared display element in the second page are displayed according to the page data of the second page returned by the server. Elements are rendered for display.
根据本公开的再一方面,提供了一种非易失性计算机可读存储介质,该非易失性计算机可读存储介质中存储有至少一可执行指令,可执行指令使处理器执行以下操作:According to yet another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, where at least one executable instruction is stored in the non-volatile computer-readable storage medium, and the executable instruction causes a processor to perform the following operations :
基于由第一页面向第二页面的跳转请求,检测第二页面与第一页面是否存在至少一个显示元素相同的共享显示元素;based on the jump request from the first page to the second page, detecting whether the second page and the first page have at least one shared display element that is the same as the display element;
若是,根据至少一个共享显示元素在第一页面的第一位置和在第二页面 的第二位置,确定至少一个共享显示元素的运动轨迹数据;If so, determine the motion trajectory data of at least one shared display element at the first position of the first page and the second position of the second page according to at least one shared display element;
根据至少一个共享显示元素在第一页面的第一尺寸和在第二页面的第二尺寸,确定至少一个共享显示元素的缩放尺寸数据;determining the scaling size data of the at least one shared display element according to the first size of the at least one shared display element on the first page and the second size of the second page;
根据至少一个共享显示元素的运动轨迹数据和缩放尺寸数据渲染展示至少一个共享显示元素,并根据服务器所返回的第二页面的页面数据对第二页面中除至少一个共享显示元素之外的其他页面元素进行渲染展示。The at least one shared display element is rendered and displayed according to the motion trajectory data and the zoom size data of the at least one shared display element, and other pages except the at least one shared display element in the second page are displayed according to the page data of the second page returned by the server. Elements are rendered for display.
根据本公开的再又一方面,还提供了一种计算机程序产品,该计算机程序产品包括存储在上述非易失性计算机可读存储介质上的计算程序。According to yet another aspect of the present disclosure, there is also provided a computer program product, the computer program product comprising a computing program stored on the above-mentioned non-volatile computer-readable storage medium.
根据本公开的页面中共享显示元素的展示方法、电子设备及存储介质,通过基于由第一页面向第二页面的跳转请求,检测第二页面与第一页面是否存在至少一个显示元素相同的共享显示元素;若是,根据至少一个共享显示元素在第一页面的第一位置和在第二页面的第二位置,确定至少一个共享显示元素的运动轨迹数据;根据至少一个共享显示元素在第一页面的第一尺寸和在第二页面的第二尺寸,确定至少一个共享显示元素的缩放尺寸数据;根据至少一个共享显示元素的运动轨迹数据和缩放尺寸数据渲染展示至少一个共享显示元素,并根据服务器所返回的第二页面的页面数据对第二页面中除至少一个共享显示元素之外的其他页面元素进行渲染展示。通过上述方式,在具有共享显示元素的页面之间跳转时,能够在保证下一个页面的正常渲染展示的前提下实现共享显示元素以动态变化的方式移动到下一个页面的相应位置的动态效果,提升了页面跳转时的渲染展示效果。According to the display method, electronic device and storage medium for sharing display elements in pages of the present disclosure, it is detected whether the second page and the first page have at least one same display element based on the jump request from the first page to the second page. share the display element; if so, determine the motion trajectory data of the at least one shared display element according to the first position of the at least one shared display element on the first page and the second position of the second page; according to the at least one shared display element in the first position The first size of the page and the second size of the second page determine the scaling size data of the at least one shared display element; the at least one shared display element is rendered and displayed according to the motion trajectory data and the scaling size data of the at least one shared display element, and The page data of the second page returned by the server renders and displays other page elements in the second page except at least one shared display element. Through the above method, when jumping between pages with shared display elements, the dynamic effect of moving the shared display elements to the corresponding position of the next page in a dynamic way can be realized under the premise of ensuring the normal rendering and display of the next page. , which improves the rendering and display effect of page jumps.
上述说明仅是本公开技术方案的概述,为了能够更清楚了解本公开的技术手段,而可依照说明书的内容予以实施,并且为了让本公开的上述和其它目的、特征和优点能够更明显易懂,以下特举本公开的具体实施方式。The above description is only an overview of the technical solutions of the present disclosure. In order to understand the technical means of the present disclosure more clearly, it can be implemented according to the contents of the description, and in order to make the above-mentioned and other purposes, features and advantages of the present disclosure more obvious and easy to understand , the following specific embodiments of the present disclosure are given.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本公开的限制。而且在整个附图中,用相同的参考符号表示 相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are for purposes of illustrating preferred embodiments only and are not to be considered limiting of the present disclosure. Also, the same components are denoted by the same reference numerals throughout the drawings. In the attached image:
图1示出了本公开实施例提供的页面中共享显示元素的展示方法流程图;FIG. 1 shows a flowchart of a method for displaying shared display elements in a page provided by an embodiment of the present disclosure;
图2示出了本公开另一实施例提供的页面中共享显示元素的展示方法的流程图;FIG. 2 shows a flowchart of a method for displaying shared display elements in a page provided by another embodiment of the present disclosure;
图3a示出了本公开实施例中第一页面的示意图;Figure 3a shows a schematic diagram of a first page in an embodiment of the present disclosure;
图3b示出了本公开实施例中第二页面的示意图;Fig. 3b shows a schematic diagram of a second page in an embodiment of the present disclosure;
图4示出了本公开实施例提供的电子设备的结构示意图。FIG. 4 shows a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure will be more thoroughly understood, and will fully convey the scope of the present disclosure to those skilled in the art.
图1示出了本公开实施例提供的页面中共享显示元素的展示方法流程图,如图1所示,该方法包括以下步骤:FIG. 1 shows a flowchart of a method for displaying shared display elements in a page provided by an embodiment of the present disclosure. As shown in FIG. 1 , the method includes the following steps:
步骤S110,基于由第一页面向第二页面的跳转请求,检测第二页面与第一页面是否存在至少一个显示元素相同的共享显示元素。Step S110, based on the jump request from the first page to the second page, detect whether the second page and the first page have at least one shared display element that is the same as the display element.
其中,由第一页面向第二页面的跳转请求可以是根据用户操作触发的,也可以是根据应用自动跳转需求触发的。The jump request from the first page to the second page may be triggered according to a user operation, or may be triggered according to an application automatic jump request.
可选地,根据第一页面和第二页面的页面模板,检测第二页面是否与第一页面包含至少一个相同的显示元素,第一页面和第二页面包含的相同的显示元素就是第一页面和第二页面之间的共享显示元素。该步骤相当于检测第二页面是否复用了第一页面中的显示元素及复用的显示元素的数量。Optionally, according to the page templates of the first page and the second page, it is detected whether the second page contains at least one same display element as the first page, and the same display element contained in the first page and the second page is the first page. and shared display elements between the second page. This step is equivalent to detecting whether the second page multiplexes the display elements in the first page and the number of the multiplexed display elements.
步骤S120,若第二页面与第一页面存在至少一个显示元素相同的共享显示元素,根据至少一个共享显示元素在第一页面的第一位置和在第二页面的第二位置,确定至少一个共享显示元素的运动轨迹数据。Step S120, if the second page and the first page have at least one shared display element that is the same as the display element, determine at least one shared display element according to the at least one shared display element at the first position on the first page and at the second position on the second page. Displays the movement track data of the element.
由于同一个显示元素在不同页面的位置和尺寸都有所不同,由第一页面向第二页面跳转时,最终的目的是要使第二页面中的所有显示元素都是按照规定的位置和尺寸展示的,本实施例的方法中,也主要是从位置变化和尺寸变化两方面来渲染共享显示元素。Since the position and size of the same display element are different on different pages, when jumping from the first page to the second page, the ultimate goal is to make all the display elements in the second page follow the specified position and size. In terms of size, in the method of this embodiment, the shared display element is rendered mainly from two aspects of position change and size change.
对于共享显示元素的位置改变,根据共享显示元素在第一页面的第一位置和在第二页面的第二位置,确定该共享显示元素的运动轨迹,得到用于指示共享显示元素的运动轨迹数据。具体地,根据共享显示元素在第一页面中的第一位置的坐标,以及共享显示元素在第二页面的第二位置的坐标,确定由第一位置和第二位置之间的轨迹的坐标数据,即得到共享显示元素的运功轨迹数据。可选地,共享显示元素的运动轨迹为第一位置到第二位置的直线轨迹。For the position change of the shared display element, determine the motion trajectory of the shared display element according to the first position of the shared display element on the first page and the second position on the second page, and obtain motion trajectory data for indicating the shared display element . Specifically, according to the coordinates of the first position of the shared display element on the first page and the coordinates of the second position of the shared display element on the second page, determine the coordinate data of the trajectory between the first position and the second position , that is, the exercise track data of the shared display element is obtained. Optionally, the motion trajectory of the shared display element is a straight trajectory from the first position to the second position.
步骤S130,根据至少一个共享显示元素在第一页面的第一尺寸和在第二页面的第二尺寸,确定至少一个共享显示元素的缩放尺寸数据。Step S130: Determine scaling size data of the at least one shared display element according to the first size of the at least one shared display element on the first page and the second size of the at least one shared display element.
对于共享显示元素的尺寸改变,根据共享显示元素在第一页面的第一尺寸和在第二页面的第二尺寸,确定需要将共享显示元素进行放大的尺寸或者缩小的尺寸,生成用于指示将共享显示元素进行放大或者缩小的缩放尺寸数据。For the size change of the shared display element, according to the first size of the shared display element on the first page and the second size of the second page, determine the size of the shared display element that needs to be enlarged or reduced, and generate Share the zoom size data of the display element to zoom in or out.
步骤S140,根据至少一个共享显示元素的运动轨迹数据和缩放尺寸数据渲染展示至少一个共享显示元素,并根据服务器所返回的第二页面的页面数据对第二页面中除至少一个共享显示元素之外的其他页面元素进行渲染展示。Step S140: Render and display at least one shared display element according to the motion trajectory data and zoom size data of the at least one shared display element, and perform a display of at least one shared display element in the second page according to the page data of the second page returned by the server. other page elements for rendering display.
本实施例中,对第二页面的渲染展示分为了两个部分:一是共享显示元素的渲染展示,具体根据确定的运动轨迹数据和缩放尺寸数据进行渲染展示。通过这种方式,呈现给用户的视觉是共享显示元素变化着沿运动轨迹移动的动态效果,也即,用户看到的效果是共享显示元素直接由第一位置平滑移动到第二位置,并且尺寸也由第一尺寸变化为第二尺寸。而现有技术的方式中,用户看到的效果是第二页面直接覆盖了第一页面,无法呈现出共享显示元素由第一位置的动态过渡第二位置的效果。In this embodiment, the rendering display of the second page is divided into two parts: one is the rendering display of shared display elements, which is specifically rendered and displayed according to the determined motion trajectory data and zoom size data. In this way, the vision presented to the user is the dynamic effect of the shared display element changing and moving along the motion track, that is, the effect seen by the user is that the shared display element directly moves smoothly from the first position to the second position, and the size Also changed from the first size to the second size. In the prior art, the effect seen by the user is that the second page directly covers the first page, and the effect of dynamic transition of the shared display element from the first position to the second position cannot be presented.
二是除了共享显示元素之外的其他页面元素的渲染展示,具体根据服务 器返回的第二页面的页面数据,对其他页面元素进行渲染展示。The second is the rendering and display of other page elements except the shared display element. Specifically, the other page elements are rendered and displayed according to the page data of the second page returned by the server.
根据本实施例所提供的页面中共享显示元素的展示方法,基于第一页面向第二页面的跳转请求,检测第二页面与第一页面是否存在至少一个显示元素相同的共享显示元素,若是,则根据共享显示元素分别在第一页面和第二页面的位置和尺寸,确定共享显示元素的运动轨迹数据和缩放尺寸数据,之后,根据共享显示元素的运动轨迹数据和缩放尺寸数据渲染共享显示元素,并根据服务端返回的页面数据渲染展示第二页面中除共享显示元素之外的其他页面元素。通过上述方式,在具有共享显示元素的页面之间跳转时,能够在保证下一个页面的正常渲染展示的前提下实现共享显示元素以动态变化的方式移动到下一个页面的相应位置的动态效果,提升了页面跳转时的渲染展示效果。According to the method for displaying shared display elements in a page provided by this embodiment, based on the jump request from the first page to the second page, it is detected whether the second page and the first page have at least one shared display element that is the same as the display element. , then according to the position and size of the shared display element on the first page and the second page respectively, determine the motion trajectory data and scaled size data of the shared display element, and then render the shared display according to the motion trajectory data and scaled size data of the shared display element. elements, and render and display other page elements in the second page except the shared display elements according to the page data returned by the server. Through the above method, when jumping between pages with shared display elements, the dynamic effect of moving the shared display elements to the corresponding position of the next page in a dynamic way can be realized under the premise of ensuring the normal rendering and display of the next page. , which improves the rendering and display effect of page jumps.
图2示出了本公开另一实施例提供的页面中共享显示元素的展示方法的流程图,如图2所示,该方法包括以下步骤:FIG. 2 shows a flowchart of a method for displaying shared display elements in a page provided by another embodiment of the present disclosure. As shown in FIG. 2 , the method includes the following steps:
步骤S210,基于由第一页面向第二页面的跳转请求,检测第二页面与第一页面是否存在至少一个显示元素相同的共享显示元素。Step S210, based on the jump request from the first page to the second page, detect whether the second page and the first page have at least one shared display element that is the same as the display element.
其中,由第一页面向第二页面的跳转请求是根据用户对第一页面中用于跳转至第二页面的入口的操作而触发的。以电子书应用为例,书籍榜单页面中展示多本书籍,书籍榜单页面中用于跳转至书籍详情页面的入口设置在各本书籍的展示区域内,当用户对任一书籍的展示区域内的入口进行操作时,触发由书籍榜单页面向该书籍的书籍详情页面的跳转请求。The jump request from the first page to the second page is triggered according to the user's operation on the entry in the first page for jumping to the second page. Taking the e-book application as an example, multiple books are displayed on the book list page, and the entry for jumping to the book details page on the book list page is set in the display area of each book. When the entry in the area is operated, a jump request from the book list page to the book details page of the book is triggered.
或者,由第一页面向第二页面的跳转请求时根据应用自动跳转需求而触发。例如,开屏页面展示结束之后,会自动跳转至应用的首页,那么,由开屏页面向应用首页的跳转请求就是根据应用自动跳转需求而触发的。Or, the jump request from the first page to the second page is triggered according to the automatic jump request of the application. For example, after the screen-opening page is displayed, it will automatically jump to the homepage of the application. Then, the jump request from the screen-opening page to the homepage of the application is triggered according to the automatic jumping requirement of the application.
应用的各个不同的页面都具有相应的页面模板,页面模板中规定了页面中展示的各个页面元素及其位置和尺寸。基于此,可通过第一页面和第二页面的页面模板检测第二页面与第一页面之间是否存在共享显示元素。Each different page of the application has a corresponding page template, and the page template specifies each page element displayed on the page and its position and size. Based on this, whether there is a shared display element between the second page and the first page can be detected through the page templates of the first page and the second page.
步骤S220,若检测第二页面与第一页面存在至少一个显示元素相同的共享显示元素,根据至少一个共享显示元素在第一页面的第一位置和在第二页面的第二位置,确定至少一个共享显示元素的运动轨迹数据。Step S220, if it is detected that the second page and the first page have at least one shared display element with the same display element, determine at least one shared display element according to the at least one shared display element in the first position of the first page and the second position of the second page. Share the motion trajectory data of display elements.
本实施例的方法中,主要是从位置变化、尺寸变化以及变化速度三个方面来渲染共享显示元素。In the method of this embodiment, the shared display elements are rendered mainly from three aspects: position change, size change, and change speed.
对于共享显示元素的位置改变,根据共享显示元素在第一页面的第一位置和在第二页面的第二位置,确定该共享显示元素的运动轨迹,得到用于指示共享显示元素的运动轨迹数据。具体地,根据共享显示元素在第一页面中的第一位置的坐标,以及共享显示元素在第二页面的第二位置的坐标,确定由第一位置和第二位置之间的轨迹的坐标数据,即得到共享显示元素的运功轨迹数据。可选地,共享显示元素的运动轨迹为第一位置到第二位置的直线轨迹。For the position change of the shared display element, determine the motion trajectory of the shared display element according to the first position of the shared display element on the first page and the second position on the second page, and obtain motion trajectory data for indicating the shared display element . Specifically, according to the coordinates of the first position of the shared display element on the first page and the coordinates of the second position of the shared display element on the second page, determine the coordinate data of the trajectory between the first position and the second position , that is, the exercise track data of the shared display element is obtained. Optionally, the motion trajectory of the shared display element is a straight trajectory from the first position to the second position.
步骤S230,根据至少一个共享显示元素在第一页面的第一尺寸和在第二页面的第二尺寸,确定至少一个共享显示元素的缩放尺寸数据。Step S230: Determine scaling size data of the at least one shared display element according to the first size of the at least one shared display element on the first page and the second size of the at least one shared display element.
对于共享显示元素的尺寸改变,根据共享显示元素在第一页面的第一尺寸和在第二页面的第二尺寸,确定需要将共享显示元素进行放大的尺寸或者缩小的尺寸,得到用于指示将共享显示元素进行放大或者缩小的缩放尺寸数据。For the size change of the shared display element, according to the first size of the shared display element on the first page and the second size of the second page, determine the size of the shared display element that needs to be enlarged or reduced, and get the Share the zoom size data of the display element to zoom in or out.
步骤S240,根据至少一个共享显示元素在第一页面的第一位置和在第二页面的第二位置,确定至少一个共享显示元素的运动距离数据;根据至少一个共享显示元素的运动距离数据以及预设运动时长数据,计算至少一个共享显示元素的运动速度数据。Step S240, determining the movement distance data of the at least one shared display element according to the first position of the at least one shared display element on the first page and the second position of the second page; Set the movement duration data, and calculate the movement speed data of at least one shared display element.
对于共享元素的变化速度,本实施例中,共享显示元素的运动时长是固定的,则根据共享显示元素在第一页面的第一位置和在第二页面的第二位置,确定共享显示元素的运动距离;然后,根据共享显示元素的运动距离和该固定时长,计算出共享显示元素的运动速度。As for the change speed of the shared element, in this embodiment, the motion duration of the shared display element is fixed, then the shared display element is determined according to the first position of the shared display element on the first page and the second position of the second page. Movement distance; then, according to the movement distance of the shared display element and the fixed duration, the movement speed of the shared display element is calculated.
本实施例中,确定了共享显示元素的运动轨迹、缩放尺寸以及运动速度,依据这三方面的因素进行渲染展示,则渲染的效果为:在固定的时长内,共享显示元素按照一定的速度由第一位置移动到第二位置、尺寸由第一尺寸缩放为第二尺寸。In this embodiment, the motion trajectory, zoom size, and motion speed of the shared display element are determined, and the rendering display is performed according to these three factors, and the rendering effect is: within a fixed time period, the shared display element is displayed at a certain speed by The first position is moved to the second position, and the size is scaled from the first size to the second size.
步骤S250,根据至少一个共享显示元素的运动轨迹数据、缩放尺寸数据以及运动速度数据,从本地缓存读取并渲染展示至少一个共享显示元素,并 根据服务器所返回的第二页面的页面数据对第二页面中除至少一个共享显示元素之外的其他页面元素进行渲染展示。Step S250, according to the motion trajectory data, zoom size data and motion speed data of at least one shared display element, read and render and display at least one shared display element from the local cache, and according to the page data of the second page returned by the server Other page elements in the second page except at least one shared display element are rendered and displayed.
同样地,本实施例中对第二页面的渲染展示分为两个部分:一是第二页面中共享显示元素的渲染展示。二是除了共享显示元素之外的其他页面元素的渲染展示。下面分别进行说明。Similarly, the rendering display of the second page in this embodiment is divided into two parts: one is the rendering display of the shared display elements in the second page. The second is the rendering display of other page elements except shared display elements. Each of them will be described below.
具体实施时,各个页面之间复用的显示元素是可以确定的,例如根据各个页面的页面模板检测出各个页面之间复用的显示元素。本实施例的方法中,在本地缓存有共享显示元素,预先从服务端获取各个页面之间的共享显示元素,并缓存到本地。例如,可以在请求到第一页面的页面数据之后,就将第二页面复用的第一页面的显示元素缓存下来,向第二页面跳转时,直接从缓存中读取该显示元素即可,无需向服务器请求。During specific implementation, the display elements multiplexed among the pages can be determined, for example, the display elements multiplexed among the pages are detected according to the page templates of the pages. In the method of this embodiment, the shared display elements are cached locally, the shared display elements between each page are acquired from the server in advance, and cached locally. For example, after requesting the page data of the first page, the display element of the first page reused by the second page can be cached, and when jumping to the second page, the display element can be directly read from the cache. , without requesting to the server.
针对于第二页面中的共享显示元素,根据其对应的运动轨迹数据、缩放尺寸数据以及运动速度数据,并从本地读取并渲染该共享显示元素。例如,共享显示元素的运动轨迹为第一位置到第二位置的直线轨迹,共享显示元素的缩放尺寸为由第一尺寸放大为第二尺寸,运动速度为1厘米/毫秒(预设运动时长为3毫秒,直线轨迹距离为3厘米),那么,则渲染展示的视觉效果为:时长为3毫秒的、共享显示元素由第一位置直线移动到第二位置且尺寸由第一尺寸放大为第二尺寸的过渡动画。For the shared display element in the second page, read and render the shared display element locally according to its corresponding motion trajectory data, zoom size data, and motion speed data. For example, the motion trajectory of the shared display element is a straight line from the first position to the second position, the scaled size of the shared display element is enlarged from the first size to the second size, and the motion speed is 1 cm/ms (the preset motion duration is 3 milliseconds, and the linear trajectory distance is 3 centimeters), then, the visual effect of the rendering display is: the shared display element with a duration of 3 milliseconds moves from the first position to the second position in a straight line, and the size is enlarged from the first size to the second Dimension transition animation.
在一种可选的方式中,若检测出第二页面包含至少一个共享显示元素的相关基础信息,从本地缓存读取并渲染展示至少一个共享显示元素及其相关基础信息。如果第二页面还包含共享显示元素的相关基础信息,同样也会预先将共享显示元素的相关基础信息缓存到本地,进行渲染展示时,从本地缓存读取并渲染展示共享显示元素及其相关基础信息。In an optional manner, if it is detected that the second page contains relevant basic information of at least one shared display element, the at least one shared display element and its relevant basic information are read from the local cache and rendered and displayed. If the second page also contains the relevant basic information of the shared display element, the relevant basic information of the shared display element will also be cached locally in advance. When rendering and displaying, the shared display element and its related basic information will be read and rendered from the local cache. information.
例如,电子书应用中,书籍榜单页面和书籍详情页面复用电子书封面元素,则预先根据书籍榜单页面中的任一书籍的书籍标识向服务端请求电子书封面元素的相关基础信息,如书名、作者、内容简介、书籍目录等等,并缓存到本地。For example, in an e-book application, the book list page and the book details page reuse the e-book cover element, and the relevant basic information of the e-book cover element is requested from the server in advance according to the book identifier of any book in the book list page. Such as book title, author, content introduction, book catalog, etc., and cache it locally.
针对于第二页面中除共享显示元素之外的其他页面元素,根据服务器返回的第二页面的页面数据进行渲染展示。具体实施时,也可以预先向服务器 请求第二页面的页面数据,并缓存在本地,例如,可以在第一页面甚至第一页面更前的页面时,就将第二页面的页面数据缓存下来。For other page elements in the second page except the shared display element, rendering and display is performed according to the page data of the second page returned by the server. During specific implementation, the page data of the second page can also be requested from the server in advance and cached locally, for example, the page data of the second page can be cached when the first page or even a page before the first page.
本公开实施例的方法可应用于电子书应用,电子书应用中包括书籍榜单页面、书籍详情页面、书架页面、书籍订单页等等,各个页面复用的显示元素通常包括电子书封面元素。The method of the embodiment of the present disclosure can be applied to an e-book application. The e-book application includes a book list page, a book detail page, a bookshelf page, a book order page, etc. The display elements multiplexed by each page usually include an e-book cover element.
下面参照附图来说明本公开实施例方法应用于电子书应用时的效果,图3a示出了本公开实施例中第一页面的示意图,图3b示出了本公开实施例中第二页面的示意图,如图3a、3b所示,第一页面为书籍榜单页面,第二页面为书籍详情页面,第一页面和第二页面复用了书籍封面元素,并且,书籍封面在第一页面中的位置和尺寸与在第二页面的位置和尺寸均不相同。根据用户对书籍榜单页面中书籍的展示区域执行点击操作,触发由书籍榜单页面向该书籍的书籍详情页面的跳转请求,本示例中,用户点击了第三本书籍的展示区域内的入口,那么,采用本公开实施例的方法,用户执行了点击操作之后,呈现给用户的视觉效果为:书籍封面3由其在第一页面中的第一位置移动到了其在第二页面中的第二位置,在移动过程中,书籍封面3的尺寸不断放大,由其在第一页面中的第一尺寸匀速放大为其在第二页面中的第二尺寸,于此同时,第二页面中的其他页面元素正常渲染展示。而现有技术的呈现给用户的视觉效果就是第二页面直接覆盖第一页面。相比于现有技术,本申请实施例的方法的渲染展示效果更佳。The effect of applying the method of the embodiment of the present disclosure to an electronic book application will be described below with reference to the accompanying drawings. FIG. 3a shows a schematic diagram of the first page in the embodiment of the present disclosure, and FIG. Schematic diagram, as shown in Figures 3a and 3b, the first page is the book list page, the second page is the book details page, the first page and the second page reuse the book cover element, and the book cover is in the first page. position and size are not the same as the position and size on the second page. According to the user's click operation on the display area of the book on the book list page, a jump request from the book list page to the book details page of the book is triggered. In this example, the user clicks on the display area of the third book. Then, using the method of the embodiment of the present disclosure, after the user performs the click operation, the visual effect presented to the user is: the book cover 3 moves from its first position on the first page to its position on the second page. In the second position, during the moving process, the size of the book cover 3 is continuously enlarged, from the first size in the first page to the second size in the second page at a constant speed, at the same time, the second page The other page elements are rendered normally. However, the visual effect presented to the user in the prior art is that the second page directly covers the first page. Compared with the prior art, the rendering display effect of the method in the embodiment of the present application is better.
共享展示元素也可以为广告素材元素,在实际应用中,广告素材元素通常有两个展示资源位,一是开屏页面,二是书籍榜单页面中的焦点图,也就是说,开屏页面和书籍榜单页面之间会复用广告素材元素,这两个页面之间的跳转也可采用本实施例的方法进行处理。Shared display elements can also be creative elements. In practical applications, creative elements usually have two display resource slots, one is the opening page, and the other is the focus map on the book list page, that is, the opening page. The advertising material elements will be reused between the page and the book list page, and the jump between the two pages may also be processed by the method of this embodiment.
在一种可选的方式中,在渲染展示至少一个共享显示元素之后,进一步执行以下步骤:根据所渲染展示的至少一个共享显示元素,计算第二页面中待展示的背景处理层数据;根据背景处理层数据渲染展示第二页面中的背景处理层。In an optional manner, after the at least one shared display element is rendered and displayed, the following steps are further performed: calculating the background processing layer data to be displayed in the second page according to the at least one shared display element rendered and displayed; The processing layer data rendering shows the background processing layer in the second page.
在渲染展示共享显示元素之后,根据所渲染的共享显示元素,计算用于渲染第二页面的背景处理层的数据。例如,首先对所渲染的共享显示元素进 行取色处理,提取出共享显示元素的主体颜色数据;然后,将共享显示元素进行放大和高斯模糊处理;然后,将提取的主题颜色数据附加到经过放大和高斯模糊的共享显示元素上,得到背景处理层数据;最后,根据背景层处理数据渲染展示第二页面的背景处理层。该方式中,最终渲染展示的第二页面还具有背景层,显示效果更佳。After the shared display element is rendered and displayed, data for rendering the background processing layer of the second page is calculated according to the rendered shared display element. For example, first perform color extraction processing on the rendered shared display element, and extract the main color data of the shared display element; then, the shared display element is enlarged and Gaussian blurred; then, the extracted theme color data is appended to the enlarged On the shared display element with Gaussian blurring, the background processing layer data is obtained; finally, the background processing layer of the second page is rendered and displayed according to the background layer processing data. In this method, the second page of the final rendering display also has a background layer, and the display effect is better.
另外,如果第二页面不包含与第一页面中任一显示元素相同的共享显示元素,则根据服务器所返回的第二页面的页面数据,渲染展示第二页面的所有页面元素。In addition, if the second page does not contain the same shared display element as any display element in the first page, all page elements of the second page are rendered and displayed according to the page data of the second page returned by the server.
根据本公开实施例所提供的页面中共享显示元素的展示方法,基于第一页面向第二页面的跳转请求,检测第二页面是否包含与第一页面中的显示元素相同的共享显示元素;如果包含,则根据共享显示元素在第一页面和在第二页面的位置,确定共享显示元素的运动轨迹数据,以及根据共享显示元素在第一页面的尺寸和在第二页面的尺寸,确定共享显示元素的缩放尺寸数据,以及确定共享显示元素的运动速度数据;之后,根据共享显示元素的运动轨迹数据、缩放尺寸数据以及运动速度数据,从本地缓存中读取数据对共享显示元素及其相关基础信息进行渲染展示,同时,对第二页面中除共享显示元素之外的其他显示元素进行渲染显示。通过上述方式,在具有共享显示元素的页面之间跳转时,能够在保证下一个页面的正常渲染展示的前提下实现共享显示元素以动态变化的方式移动到下一个页面的相应位置的动态效果,提升了页面跳转时的渲染展示效果。同时,通过将共享显示元素及其相关基础信息缓存在本地,渲染展示时无需从服务端请求数据,能够避免页面跳转时延迟卡顿的情况。此外,还提供了一种基于共享显示元素的第二页面的背景层的渲染显示方法,能够美化第二页面,进一步提升页面的渲染展示效果。According to the method for displaying shared display elements in a page provided by the embodiment of the present disclosure, based on the jump request from the first page to the second page, it is detected whether the second page contains the same shared display elements as the display elements in the first page; If it is included, determine the motion trajectory data of the shared display element according to the position of the shared display element on the first page and the second page, and determine the shared display element according to the size of the shared display element on the first page and the size of the second page. The scaled size data of the display element and the motion speed data of the shared display element are determined; then, according to the motion trajectory data, the scaled size data and the motion speed data of the shared display element, the data is read from the local cache for the shared display element and its related The basic information is rendered and displayed, and at the same time, other display elements other than the shared display elements in the second page are rendered and displayed. Through the above method, when jumping between pages with shared display elements, the dynamic effect of moving the shared display elements to the corresponding position of the next page in a dynamic way can be realized under the premise of ensuring the normal rendering and display of the next page. , which improves the rendering and display effect of page jumps. At the same time, by caching the shared display elements and their related basic information locally, there is no need to request data from the server when rendering and displaying, which can avoid the situation that the page is delayed and stuck. In addition, a method for rendering and displaying the background layer of the second page based on the shared display element is also provided, which can beautify the second page and further improve the rendering and display effect of the page.
本公开实施例提供了一种非易失性计算机可读存储介质,该非易失性计算机可读存储介质存储有至少一可执行指令,该计算机可执行指令可执行上述任意方法实施例中的页面中共享显示元素的展示方法。An embodiment of the present disclosure provides a non-volatile computer-readable storage medium, where the non-volatile computer-readable storage medium stores at least one executable instruction, and the computer-executable instruction can execute any of the foregoing method embodiments. Display method of shared display elements in the page.
可执行指令具体可以用于使得处理器执行以下操作:Executable instructions can specifically be used to cause the processor to perform the following operations:
基于由第一页面向第二页面的跳转请求,检测第二页面与第一页面是否 存在至少一个显示元素相同的共享显示元素;Based on the jump request from the first page to the second page, detect whether the second page and the first page have at least one shared display element identical to the display element;
若是,根据至少一个共享显示元素在第一页面的第一位置和在第二页面的第二位置,确定至少一个共享显示元素的运动轨迹数据;If so, determine the motion trajectory data of the at least one shared display element according to the first position of the at least one shared display element on the first page and the second position of the second page;
根据至少一个共享显示元素在第一页面的第一尺寸和在第二页面的第二尺寸,确定至少一个共享显示元素的缩放尺寸数据;determining the scaling size data of the at least one shared display element according to the first size of the at least one shared display element on the first page and the second size of the second page;
根据至少一个共享显示元素的运动轨迹数据和缩放尺寸数据渲染展示至少一个共享显示元素,并根据服务器所返回的第二页面的页面数据对第二页面中除至少一个共享显示元素之外的其他页面元素进行渲染展示。The at least one shared display element is rendered and displayed according to the motion trajectory data and the zoom size data of the at least one shared display element, and other pages except the at least one shared display element in the second page are displayed according to the page data of the second page returned by the server. Elements are rendered for display.
在一种可选的方式中,可执行指令使处理器执行以下操作:In an optional manner, the executable instructions cause the processor to:
根据至少一个共享显示元素在第一页面的第一位置和在第二页面的第二位置,确定至少一个共享显示元素的运动距离数据;determining the movement distance data of the at least one shared display element according to the first position of the at least one shared display element on the first page and the second position of the second page;
根据至少一个共享显示元素的运动距离数据以及预设运动时长数据,计算至少一个共享显示元素的运动速度数据;Calculate the movement speed data of the at least one shared display element according to the movement distance data and the preset movement duration data of the at least one shared display element;
依据运动速度数据,渲染展示至少一个共享显示元素。At least one shared display element is rendered and displayed according to the motion speed data.
在一种可选的方式中,可执行指令使处理器执行以下操作:In an optional manner, the executable instructions cause the processor to:
从本地缓存读取并渲染展示至少一个共享显示元素。Reads and renders at least one shared display element from the local cache.
在一种可选的方式中,可执行指令使处理器执行以下操作:若检测出第二页面包含至少一个共享显示元素的相关基础信息,从本地缓存读取并渲染展示至少一个共享显示元素及其相关基础信息。In an optional manner, the executable instructions cause the processor to perform the following operations: if it is detected that the second page contains relevant basic information of at least one shared display element, read and render from the local cache the at least one shared display element and its relevant basic information.
在一种可选的方式中,由第一页面向第二页面的跳转请求是根据用户对第一页面中用于跳转至第二页面的入口的操作而触发,或者,根据应用自动跳转需求而触发。In an optional manner, the jump request from the first page to the second page is triggered according to the user's operation on the entry in the first page for jumping to the second page, or the jump request is automatically jumped according to the application Triggered by demand.
在一种可选的方式中,共享显示元素包括:广告素材元素和/或电子书封面元素。In an optional manner, the shared display elements include: a creative element and/or an e-book cover element.
在一种可选的方式中,当共享显示元素为电子书封面元素时,共享显示元素的相关基础信息包括以下中的一种或多种:书籍名称、书籍作者、书籍内容简介、书籍目录。In an optional manner, when the shared display element is an e-book cover element, the relevant basic information of the shared display element includes one or more of the following: book name, book author, book content introduction, and book catalog.
在一种可选的方式中,可执行指令使处理器执行以下操作:In an optional manner, the executable instructions cause the processor to:
在渲染展示至少一个共享显示元素之后,根据所渲染展示的至少一个共享显示元素,计算第二页面中待展示的背景处理层数据;After the at least one shared display element is rendered and displayed, calculating the background processing layer data to be displayed in the second page according to the at least one shared display element rendered and displayed;
根据背景处理层数据渲染展示第二页面中的背景处理层。The background processing layer in the second page is rendered and displayed according to the background processing layer data.
由此可见,通过上述方式,在具有共享显示元素的页面之间跳转时,能够在保证下一个页面的正常渲染展示的前提下实现共享显示元素以动态变化的方式移动到下一个页面的相应位置的动态效果,提升了页面跳转时的渲染展示效果。It can be seen that, through the above method, when jumping between pages with shared display elements, the shared display elements can be dynamically moved to the corresponding corresponding pages of the next page under the premise of ensuring the normal rendering and display of the next page. The dynamic effect of the position improves the rendering and display effect when the page is jumped.
图4示出了本公开电子设备实施例的结构示意图,本公开具体实施例并不对电子设备的具体实现做限定。FIG. 4 shows a schematic structural diagram of an embodiment of an electronic device of the present disclosure, and the specific embodiment of the present disclosure does not limit the specific implementation of the electronic device.
如图4所示,该电子设备可以包括:处理器(processor)402、通信接口(Communications Interface)404、存储器(memory)406、以及通信总线408。As shown in FIG. 4 , the electronic device may include: a processor (processor) 402 , a communication interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .
其中:处理器402、通信接口404、以及存储器406通过通信总线408完成相互间的通信。通信接口404,用于与其它设备比如客户端或其它服务器等的网元通信。处理器402,用于执行程序410,具体可以执行上述用于电子设备的页面中共享显示元素的展示方法实施例中的相关步骤。The processor 402 , the communication interface 404 , and the memory 406 communicate with each other through the communication bus 408 . The communication interface 404 is used for communicating with network elements of other devices such as clients or other servers. The processor 402, configured to execute the program 410, may specifically execute the relevant steps in the above-mentioned embodiments of the method for displaying shared display elements in the page of the electronic device.
具体地,程序410可以包括程序代码,该程序代码包括计算机操作指令。Specifically, the program 410 may include program code including computer operation instructions.
处理器402可能是中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本公开实施例的一个或多个集成电路。电子设备包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。The processor 402 may be a central processing unit (CPU), or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present disclosure. The one or more processors included in the electronic device may be the same type of processors, such as one or more CPUs; or may be different types of processors, such as one or more CPUs and one or more ASICs.
存储器406,用于存放程序410。存储器406可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 406 is used to store the program 410 . Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.
程序410具体可以用于使得处理器402执行以下操作:The program 410 can specifically be used to cause the processor 402 to perform the following operations:
基于由第一页面向第二页面的跳转请求,检测第二页面与第一页面是否 存在至少一个显示元素相同的共享显示元素;Based on the jump request from the first page to the second page, detect whether the second page and the first page have at least one shared display element identical to the display element;
若是,根据至少一个共享显示元素在第一页面的第一位置和在第二页面的第二位置,确定至少一个共享显示元素的运动轨迹数据;If so, determine the motion trajectory data of the at least one shared display element according to the first position of the at least one shared display element on the first page and the second position of the second page;
根据至少一个共享显示元素在第一页面的第一尺寸和在第二页面的第二尺寸,确定至少一个共享显示元素的缩放尺寸数据;determining the scaling size data of the at least one shared display element according to the first size of the at least one shared display element on the first page and the second size of the second page;
根据至少一个共享显示元素的运动轨迹数据和缩放尺寸数据渲染展示至少一个共享显示元素,并根据服务器所返回的第二页面的页面数据对第二页面中除至少一个共享显示元素之外的其他页面元素进行渲染展示。The at least one shared display element is rendered and displayed according to the motion trajectory data and the zoom size data of the at least one shared display element, and other pages except the at least one shared display element in the second page are displayed according to the page data of the second page returned by the server. Elements are rendered for display.
在一种可选的方式中,程序410使处理器402执行以下操作:In an optional manner, program 410 causes processor 402 to perform the following operations:
根据至少一个共享显示元素在第一页面的第一位置和在第二页面的第二位置,确定至少一个共享显示元素的运动距离数据;determining the movement distance data of the at least one shared display element according to the first position of the at least one shared display element on the first page and the second position of the second page;
根据至少一个共享显示元素的运动距离数据以及预设运动时长数据,计算至少一个共享显示元素的运动速度数据;Calculate the movement speed data of the at least one shared display element according to the movement distance data and the preset movement duration data of the at least one shared display element;
依据运动速度数据,渲染展示至少一个共享显示元素。At least one shared display element is rendered and displayed according to the motion speed data.
在一种可选的方式中,程序410使处理器402执行以下操作:In an optional manner, program 410 causes processor 402 to perform the following operations:
从本地缓存读取并渲染展示至少一个共享显示元素。Reads and renders at least one shared display element from the local cache.
在一种可选的方式中,程序410使处理器402执行以下操作:In an optional manner, program 410 causes processor 402 to perform the following operations:
若检测出第二页面包含至少一个共享显示元素的相关基础信息,从本地缓存读取并渲染展示至少一个共享显示元素及其相关基础信息。If it is detected that the second page contains relevant basic information of at least one shared display element, the at least one shared display element and its relevant basic information are read and rendered from the local cache.
在一种可选的方式中,由第一页面向第二页面的跳转请求是根据用户对第一页面中用于跳转至第二页面的入口的操作而触发,或者,根据应用自动跳转需求而触发。In an optional manner, the jump request from the first page to the second page is triggered according to the user's operation on the entry in the first page for jumping to the second page, or the jump request is automatically jumped according to the application Triggered by demand.
在一种可选的方式中,共享显示元素包括:广告素材元素和/或电子书封面元素。In an optional manner, the shared display elements include: a creative element and/or an e-book cover element.
在一种可选的方式中,共享显示元素为电子书封面元素时,共享显示元素的相关基础信息包括以下中的一种或多种:书籍名称、书籍作者、书籍内容简介、书籍目录。In an optional manner, when the shared display element is an electronic book cover element, the relevant basic information of the shared display element includes one or more of the following: book name, book author, book content introduction, and book catalog.
在一种可选的方式中,程序410使处理器402执行以下操作:In an optional manner, program 410 causes processor 402 to perform the following operations:
在渲染展示至少一个共享显示元素之后,根据所渲染展示的至少一个共享显示元素,计算第二页面中待展示的背景处理层数据;After the at least one shared display element is rendered and displayed, calculating the background processing layer data to be displayed in the second page according to the at least one shared display element rendered and displayed;
根据背景处理层数据渲染展示第二页面中的背景处理层。The background processing layer in the second page is rendered and displayed according to the background processing layer data.
由此可见,通过上述方式,在具有共享显示元素的页面之间跳转时,能够在保证下一个页面的正常渲染展示的前提下实现共享显示元素以动态变化的方式移动到下一个页面的相应位置的动态效果,提升了页面跳转时的渲染展示效果。It can be seen that, through the above method, when jumping between pages with shared display elements, the shared display elements can be dynamically moved to the corresponding corresponding pages of the next page under the premise of ensuring the normal rendering and display of the next page. The dynamic effect of the position improves the rendering and display effect when the page is jumped.
在此提供的算法或显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本公开实施例也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本公开的内容,并且上面对特定语言所做的描述是为了披露本公开的最佳实施方式。The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used with teaching based on this. The structure required to construct such a system is apparent from the above description. Furthermore, embodiments of the present disclosure are not directed to any particular programming language. It is to be understood that various programming languages may be used to implement the disclosures described herein and that the descriptions of specific languages above are intended to disclose the best mode of the disclosure.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本公开的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. It will be understood, however, that embodiments of the present disclosure may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
类似地,应当理解,为了精简本公开并帮助理解各个公开方面中的一个或多个,在上面对本公开的示例性实施例的描述中,本公开实施例的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本公开要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,公开方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本公开的单独实施例。Similarly, it is to be understood that in the above descriptions of example embodiments of the present disclosure, various features of embodiments of the present disclosure are sometimes grouped together into a single implementation in order to simplify the disclosure and to aid in the understanding of one or more of the various disclosed aspects. examples, figures, or descriptions thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed disclosure requires more features than are expressly recited in each claim. Rather, as the following claims reflect, disclosed aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of the present disclosure.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或 过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art will understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. The modules or units or components in the embodiments may be combined into one module or unit or component, and further they may be divided into multiple sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method so disclosed may be employed in any combination unless at least some of such features and/or procedures or elements are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本公开的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, it will be understood by those skilled in the art that although some of the embodiments herein include certain features, but not others, included in other embodiments, that combinations of features of the different embodiments are intended to be within the scope of the present disclosure And form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
本公开的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本公开实施例的一些或者全部部件的一些或者全部功能。本公开还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本公开的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。Various component embodiments of the present disclosure may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components according to embodiments of the present disclosure. The present disclosure can also be implemented as apparatus or apparatus programs (eg, computer programs and computer program products) for performing some or all of the methods described herein. Such a program implementing the present disclosure may be stored on a computer-readable medium, or may be in the form of one or more signals. Such signals may be downloaded from Internet sites, or provided on carrier signals, or in any other form.
应该注意的是上述实施例对本公开进行说明而不是对本公开进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本公开可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。上述实施例中的步骤,除有特殊说明外,不应理解为对执行顺序的限定。It should be noted that the above-described embodiments illustrate rather than limit the disclosure, and that alternative embodiments may be devised by those skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present disclosure may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. do not denote any order. These words can be interpreted as names. The steps in the above embodiments should not be construed as limitations on the execution order unless otherwise specified.

Claims (18)

  1. 一种页面中共享显示元素的展示方法,包括:A method for displaying shared display elements in a page, comprising:
    基于由第一页面向第二页面的跳转请求,检测第二页面与第一页面是否存在至少一个显示元素相同的共享显示元素;based on the jump request from the first page to the second page, detecting whether the second page and the first page have at least one shared display element that is the same as the display element;
    若是,根据至少一个共享显示元素在所述第一页面的第一位置和在所述第二页面的第二位置,确定所述至少一个共享显示元素的运动轨迹数据;If so, determining the motion trajectory data of the at least one shared display element according to the first position of the at least one shared display element on the first page and the second position of the second page;
    根据所述至少一个共享显示元素在所述第一页面的第一尺寸和在所述第二页面的第二尺寸,确定所述至少一个共享显示元素的缩放尺寸数据;determining the scaling size data of the at least one shared display element according to the first size of the at least one shared display element on the first page and the second size of the second page;
    根据所述至少一个共享显示元素的运动轨迹数据和缩放尺寸数据渲染展示所述至少一个共享显示元素,并根据服务器所返回的所述第二页面的页面数据对所述第二页面中除所述至少一个共享显示元素之外的其他页面元素进行渲染展示。The at least one shared display element is rendered and displayed according to the motion trajectory data and zoom size data of the at least one shared display element, and the second page is removed from the second page according to the page data of the second page returned by the server. At least one other page element other than the shared display element is rendered and displayed.
  2. 根据权利要求1所述的方法,其中,所述方法还包括:The method of claim 1, wherein the method further comprises:
    根据所述至少一个共享显示元素在所述第一页面的第一位置和在所述第二页面的第二位置,确定所述至少一个共享显示元素的运动距离数据;determining the movement distance data of the at least one shared display element according to the first position of the at least one shared display element on the first page and the second position of the second page;
    根据所述至少一个共享显示元素的运动距离数据以及预设运动时长数据,计算所述至少一个共享显示元素的运动速度数据;Calculate the movement speed data of the at least one shared display element according to the movement distance data and the preset movement duration data of the at least one shared display element;
    所述渲染展示所述至少一个共享显示元素具体为:依据运动速度数据,渲染展示所述至少一个共享显示元素。The rendering and displaying of the at least one shared display element is specifically: rendering and displaying the at least one shared display element according to the motion speed data.
  3. 根据权利要求1或2所述的方法,其中,在本地缓存有所述至少一个共享显示元素;The method of claim 1 or 2, wherein the at least one shared display element is locally cached;
    所述渲染展示所述至少一个共享显示元素具体为:从本地缓存读取并渲染展示所述至少一个共享显示元素。The rendering and displaying of the at least one shared display element is specifically: reading from the local cache and rendering and displaying the at least one shared display element.
  4. 根据权利要求3所述的方法,其中,在本地还缓存有所述至少一个共享显示元素的相关基础信息;The method according to claim 3, wherein the relevant basic information of the at least one shared display element is further cached locally;
    所述渲染展示所述至少一个共享显示元素进一步包括:若检测出第二页面包含所述至少一个共享显示元素的相关基础信息,从本地缓存读取并渲染展示所述至少一个共享显示元素及其相关基础信息。The rendering and displaying the at least one shared display element further includes: if it is detected that the second page contains the relevant basic information of the at least one shared display element, reading and rendering the at least one shared display element from the local cache and displaying the at least one shared display element and the same. relevant basic information.
  5. 根据权利要求1-4中任一项所述的方法,其中,所述由第一页面向第二页面的跳转请求是根据用户对所述第一页面中用于跳转至所述第二页面的入口的操作而触发,或者,根据应用自动跳转需求而触发。The method according to any one of claims 1-4, wherein the jump request from the first page to the second page is based on a user's request for jumping to the second page in the first page It is triggered by the operation of the entry of the page, or it is triggered according to the requirement of automatic jumping of the application.
  6. 根据权利要求1-5中任一项所述的方法,其中,所述方法应用于电子书应用,所述共享显示元素包括:广告素材元素和/或电子书封面元素。The method according to any one of claims 1-5, wherein the method is applied to an e-book application, and the shared display elements include: an advertising material element and/or an e-book cover element.
  7. 根据权利要求6所述的方法,其中,当所述共享显示元素为电子书封面元素时,所述共享显示元素的相关基础信息包括以下中的一种或多种:The method according to claim 6, wherein, when the shared display element is an electronic book cover element, the relevant basic information of the shared display element includes one or more of the following:
    书籍名称、书籍作者、书籍内容简介、书籍目录。Book name, book author, book content introduction, book catalog.
  8. 根据权利要求1-6中任一项所述的方法,其中,在所述渲染展示所述至少一个共享显示元素之后,所述方法进一步包括:The method of any one of claims 1-6, wherein after the rendering reveals the at least one shared display element, the method further comprises:
    根据所渲染展示的所述至少一个共享显示元素,计算所述第二页面中待展示的背景处理层数据;calculating background processing layer data to be displayed in the second page according to the at least one shared display element rendered and displayed;
    根据所述背景处理层数据渲染展示第二页面中的背景处理层。The background processing layer in the second page is rendered and displayed according to the background processing layer data.
  9. 一种电子设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;An electronic device, comprising: a processor, a memory, a communication interface and a communication bus, the processor, the memory and the communication interface communicate with each other through the communication bus;
    所述存储器用于存放至少一可执行指令,所述可执行指令使所述处理器执行以下操作:The memory is used to store at least one executable instruction, and the executable instruction causes the processor to perform the following operations:
    基于由第一页面向第二页面的跳转请求,检测第二页面与第一页面是否存在至少一个显示元素相同的共享显示元素;based on the jump request from the first page to the second page, detecting whether the second page and the first page have at least one shared display element that is the same as the display element;
    若是,根据至少一个共享显示元素在所述第一页面的第一位置和在所述第二页面的第二位置,确定所述至少一个共享显示元素的运动轨迹数据;If so, determining the motion trajectory data of the at least one shared display element according to the first position of the at least one shared display element on the first page and the second position of the second page;
    根据所述至少一个共享显示元素在所述第一页面的第一尺寸和在所述第二页面的第二尺寸,确定所述至少一个共享显示元素的缩放尺寸数据;determining the scaling size data of the at least one shared display element according to the first size of the at least one shared display element on the first page and the second size of the second page;
    根据所述至少一个共享显示元素的运动轨迹数据和缩放尺寸数据渲染展示所述至少一个共享显示元素,并根据服务器所返回的所述第二页面的页面数据对所述第二页面中除所述至少一个共享显示元素之外的其他页面元素进行渲染展示。The at least one shared display element is rendered and displayed according to the motion trajectory data and zoom size data of the at least one shared display element, and the second page is removed from the second page according to the page data of the second page returned by the server. At least one other page element other than the shared display element is rendered and displayed.
  10. 根据权利要求9所述的电子设备,所述可执行指令进一步使所述处理器执行以下操作:9. The electronic device of claim 9, the executable instructions further cause the processor to:
    根据所述至少一个共享显示元素在所述第一页面的第一位置和在所述第二页面的第二位置,确定所述至少一个共享显示元素的运动距离数据;determining the movement distance data of the at least one shared display element according to the first position of the at least one shared display element on the first page and the second position of the second page;
    根据所述至少一个共享显示元素的运动距离数据以及预设运动时长数据,计算所述至少一个共享显示元素的运动速度数据;Calculate the movement speed data of the at least one shared display element according to the movement distance data and the preset movement duration data of the at least one shared display element;
    依据运动速度数据,渲染展示所述至少一个共享显示元素。The at least one shared display element is rendered and displayed according to the motion speed data.
  11. 根据权利要求9或10所述的电子设备,所述可执行指令进一步使所述处理器执行以下操作:The electronic device of claim 9 or 10, the executable instructions further cause the processor to:
    从本地缓存读取并渲染展示所述至少一个共享显示元素。The at least one shared display element is read and rendered from the local cache.
  12. 根据权利要求11所述的电子设备,所述可执行指令进一步使所述处理器执行以下操作:12. The electronic device of claim 11, the executable instructions further cause the processor to:
    若检测出第二页面包含所述至少一个共享显示元素的相关基础信息,从本地缓存读取并渲染展示所述至少一个共享显示元素及其相关基础信息。If it is detected that the second page contains relevant basic information of the at least one shared display element, the at least one shared display element and its relevant basic information are read and rendered from the local cache to display.
  13. 根据权利要求9-12中任一项所述的电子设备,其中,所述由第一页面向第二页面的跳转请求是根据用户对所述第一页面中用于跳转至所述第二页面的入口的操作而触发,或者,根据应用自动跳转需求而触发。The electronic device according to any one of claims 9-12, wherein the jump request from the first page to the second page is based on a user's request for jumping to the first page in the first page. Triggered by the operation of the entry of the second page, or triggered according to the requirement of automatic jumping of the application.
  14. 根据权利要求9-13中任一项所述的电子设备,其中,所述方法应用于电子书应用,所述共享显示元素包括:广告素材元素和/或电子书封面元素。The electronic device according to any one of claims 9-13, wherein the method is applied to an e-book application, and the shared display elements include: an advertising material element and/or an e-book cover element.
  15. 根据权利要求14所述的电子设备,其中,当所述共享显示元素为电子书封面元素时,所述共享显示元素的相关基础信息包括以下中的一种或多种:书籍名称、书籍作者、书籍内容简介、书籍目录。The electronic device according to claim 14, wherein, when the shared display element is an electronic book cover element, the relevant basic information of the shared display element includes one or more of the following: book name, book author, Book content introduction, book catalog.
  16. 根据权利要求9-14中任一项所述的电子设备,所述可执行指令进一步使所述处理器执行以下操作:The electronic device of any of claims 9-14, the executable instructions further cause the processor to:
    在所述渲染展示所述至少一个共享显示元素之后,根据所渲染展示的所述至少一个共享显示元素,计算所述第二页面中待展示的背景处理层数据;After the at least one shared display element is rendered and displayed, calculating background processing layer data to be displayed in the second page according to the at least one shared display element rendered and displayed;
    根据所述背景处理层数据渲染展示第二页面中的背景处理层。The background processing layer in the second page is rendered and displayed according to the background processing layer data.
  17. 一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质中存储有至少一可执行指令,所述可执行指令使处理器执行前述任一权利要求1-8所述的页面中共享显示元素的展示方法。A non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium stores at least one executable instruction, the executable instruction enables a processor to execute any one of the preceding claims 1-8. The display method of shared display elements in the described page.
  18. 一种计算机程序产品,所述计算机程序产品包括存储在非易失性计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被处理器执行时,使所述处理器执行前述任一权利要求1-8所述的页面中共享显示元素的展示方法。A computer program product comprising a computer program stored on a non-volatile computer-readable storage medium, the computer program comprising program instructions that, when executed by a processor, cause the The processor executes the method for displaying shared display elements in a page according to any one of the preceding claims 1-8.
PCT/CN2021/082389 2020-06-30 2021-03-23 Method for presenting shared display element in pages, and electronic device and storage medium WO2022001220A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010615124.6 2020-06-30
CN202010615124.6A CN111783015A (en) 2020-06-30 2020-06-30 Display method of shared display elements in page, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022001220A1 true WO2022001220A1 (en) 2022-01-06

Family

ID=72759807

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/082389 WO2022001220A1 (en) 2020-06-30 2021-03-23 Method for presenting shared display element in pages, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN111783015A (en)
WO (1) WO2022001220A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111783015A (en) * 2020-06-30 2020-10-16 掌阅科技股份有限公司 Display method of shared display elements in page, electronic equipment and storage medium
CN112596845A (en) * 2020-12-29 2021-04-02 百果园技术(新加坡)有限公司 Page switching method, device, server and storage medium
CN112905280B (en) * 2021-02-07 2023-12-15 腾竞体育文化发展(上海)有限公司 Page display method, device, equipment and storage medium
CN114567806A (en) * 2022-02-28 2022-05-31 上海哔哩哔哩科技有限公司 Cross-page switching method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103502983A (en) * 2011-04-28 2014-01-08 高通股份有限公司 Memoizing Web-browsing computation with DOM-based isomorphism
CN106156066A (en) * 2015-03-30 2016-11-23 阿里巴巴集团控股有限公司 A kind of page switching method, device and client
CN108241988A (en) * 2016-12-26 2018-07-03 北京奇虎科技有限公司 Multi-page linkage media display methods, device and intelligent terminal
CN108449638A (en) * 2018-03-15 2018-08-24 广州虎牙信息科技有限公司 A kind of method, apparatus and electronic equipment playing advertisement
CN111783015A (en) * 2020-06-30 2020-10-16 掌阅科技股份有限公司 Display method of shared display elements in page, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9639263B2 (en) * 2014-08-05 2017-05-02 Weebly, Inc. Native overlay for rapid editing of web content
CN106557529B (en) * 2015-09-30 2020-09-08 阿里巴巴集团控股有限公司 Display method and device for jump page in page jump
CN106649725B (en) * 2016-12-22 2019-11-29 前海节事科技(深圳)有限公司 A kind of page switching method and device
CN109858962B (en) * 2019-01-23 2023-04-07 掌阅科技股份有限公司 Advertisement display method based on electronic book and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103502983A (en) * 2011-04-28 2014-01-08 高通股份有限公司 Memoizing Web-browsing computation with DOM-based isomorphism
CN106156066A (en) * 2015-03-30 2016-11-23 阿里巴巴集团控股有限公司 A kind of page switching method, device and client
CN108241988A (en) * 2016-12-26 2018-07-03 北京奇虎科技有限公司 Multi-page linkage media display methods, device and intelligent terminal
CN108449638A (en) * 2018-03-15 2018-08-24 广州虎牙信息科技有限公司 A kind of method, apparatus and electronic equipment playing advertisement
CN111783015A (en) * 2020-06-30 2020-10-16 掌阅科技股份有限公司 Display method of shared display elements in page, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111783015A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
WO2022001220A1 (en) Method for presenting shared display element in pages, and electronic device and storage medium
CN104823152B (en) Augmented reality is realized using Eye-controlling focus
US8640047B2 (en) Asynchronous handling of a user interface manipulation
CN111143725A (en) Page generation method and device and electronic equipment
CN107169135B (en) Image processing method and device and electronic equipment
CN112433657B (en) Electronic book simulation page turning method, electronic equipment and computer storage medium
CN109154943A (en) Conversion based on server of the automatic broadcasting content to click play content
CN112199140A (en) Application frame insertion method and related device
CN111611037B (en) View object processing method for electronic book, electronic device and storage medium
US20190130645A1 (en) Augmented reality and virtual reality engine for virtual desktop infrastucture
US11651560B2 (en) Method and device of displaying comment information, and mobile terminal
CN106294501A (en) web animation effect display method and device
CN114900731B (en) Video definition switching method and device
CN110187816B (en) Automatic page turning method for cartoon type electronic book, computing device and storage medium
CN107430595A (en) For showing the method and system of identified text according to Fast Reading pattern
CN109725802B (en) Page interaction method and device
CN106407009A (en) Picture display method and device
WO2016184032A1 (en) Picture searching method and apparatus, and storage medium
CN111611505B (en) Method for accessing multimedia resources in electronic book, computing device and storage medium
CN106681590B (en) Method and device for displaying screen content of driving recording device
CN110569460B (en) Push information display method, push information display device and storage medium
US20100315440A1 (en) Adaptive viewing of remote documents on mobile devices
CN111198731A (en) Interface implementation method and device, electronic equipment and storage medium
CN113747223B (en) Video comment method and device and electronic equipment
US9129643B2 (en) Method and apparatus for creating a media sequence with automatic selection of an optimal sequence preset

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21832796

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21832796

Country of ref document: EP

Kind code of ref document: A1