Page transition animation processing method, device and electronic device
By obtaining and filling animation resource files from the server according to the starting and target page types on the client, generating and playing transition animations, the problem of a lot of manpower consuming animation writing and modification in the prior art is solved, and more flexible and efficient animation configuration and updates are achieved.
Patent Information
- Application Number
- CN202110529699.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-14
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2041-05-14
AI Technical Summary
In the prior art, writing and modifying page transition animations requires a lot of manpower, which limits the flexibility and application efficiency of transition animations.
By responding to the user's page switching operation, the animation resource file is obtained from the server according to the starting page type and the target page type, and the transition animation file is generated by filling the content data on the client to realize the playback of the animation.
There is no need to embed animation code in client applications in advance, which significantly improves the flexibility and update efficiency of transition animations and reduces labor costs.
Smart Images

Figure CN113420246B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a method, device and electronic equipment for processing page transition animation, and belongs to the field of computer technology. Background Art
[0002] At present, various application platforms are committed to providing users with a good user experience in the application, so that users can stay in the application for a longer time. When using the application, users often switch pages. For example, when visiting an e-commerce application, they select a product of interest from a page containing multiple product views and click on it, and then jump to the view that focuses on displaying the clicked product. This process involves page switching, and the page switching process requires obtaining new page data from the platform, which may require a certain waiting time. Therefore, transition animations are generally added during the process of switching between two pages to improve the user experience.
[0003] In the existing technical solutions, developers need to pre-animate the file code for each page jump, and need to obtain the original page and target page of the page jump in advance. This processing method has the following problems. Page transitions are heavily dependent on the preparation of pre-animation codes. These animation codes need to be installed on the user terminal together with the application code. If new page transition requirements arise, or the existing transition animation needs to be modified, new code development and release of a new application version are required. This method consumes a lot of manpower and limits the flexibility of transition animation applications. Summary of the invention
[0004] The embodiment of the present invention provides a method, device and electronic device for processing page transition animation, so that the implementation of the transition animation is more flexible.
[0005] In order to achieve the above object, an embodiment of the present invention provides a method for processing a page transition animation, comprising:
[0006] In response to the user's page switching operation, the animation resource file is obtained from the server according to the starting page type and the target page type;
[0007] Obtaining page data of the start page and / or cache data of the target page, and filling the animation resource file with content data;
[0008] Generate a transition animation file according to the animation resource file and play it.
[0009] The embodiment of the present invention further provides a device for processing page transition animation, comprising:
[0010] An animation resource file acquisition module, used to respond to the user's page switching operation and acquire the animation resource file from the server according to the starting page type and the target page type;
[0011] Animation data processing module, used to obtain page data of the starting page and / or cache data of the target page, and fill the animation resource file with content data;
[0012] The animation playing module generates a transition animation file according to the animation resource file and plays it.
[0013] The embodiment of the present invention also provides a method for processing page transition animation, including:
[0014] Get the starting page type and target page type corresponding to the user's page switching operation;
[0015] Obtain the corresponding animation resource file according to the start page type and the target page type, and send it to the client;
[0016] According to the address information of the target page visited by the user, the page data of the target page is sent to the client.
[0017] An embodiment of the present invention further provides an electronic device, including:
[0018] Memory, used to store programs;
[0019] The processor is used to run the program stored in the memory to execute the aforementioned page transition animation processing method.
[0020] The page transition animation processing method, device and electronic device of the embodiment of the present invention obtain the corresponding animation resource file through the page type before and after the page switch, and then generate an animation file for playback on the client by filling in content data, thereby forming a transition animation. This method does not need to embed animation code in the client application in advance, so that the transition animation can be configured and updated more flexibly.
[0021] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A schematic diagram of a process flow of a method for processing page transition animation according to an embodiment of the present invention;
[0023] Figure 2A schematic diagram of an application scenario of a method for processing page transition animation according to an embodiment of the present invention;
[0024] Figure 3 The figure is a schematic diagram showing an example of a transition animation according to an embodiment of the present invention.
[0025] Figure 4 It is a structural schematic diagram of a device for processing page transition animation according to an embodiment of the present invention;
[0026] Figure 5 Schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0028] The technical solution of the present invention is further illustrated by some specific embodiments below.
[0029] like Figure 1 As shown, it is a flow chart of a method for processing page transition animation according to an embodiment of the present invention. Figure 2 As shown, it is a schematic diagram of an application scenario of the method for processing page transition animation according to an embodiment of the present invention. Figure 3 As shown, it is a schematic diagram of a display example of a transition animation of an embodiment of the present invention. The method of the embodiment of the present invention can be applied to the client side, and is used for the client application to generate and play the transition animation when executing a page jump. Specifically, the method may include:
[0030] S101: In response to the user's page switching operation, the animation resource file is obtained from the server according to the starting page type and the target page type. The starting page and the target page mentioned here are two pages relative to the jump operation triggered by the page switching, that is, the page switching operation is triggered from the starting page, and after the transition animation, the target page is presented. The above-mentioned server can also apply the corresponding application service platform in the cloud that provides various services. Figure 2 As shown, as an example, the client includes two modules, the routing center and the transition framework, and the server in the figure corresponds to the application service platform. The routing center of the client is mainly used to obtain page data according to the accessed page address and perform page switching and other processing, which also includes extracting page data from the local cache. In an embodiment of the present invention, the user's page switching operation will also trigger the routing center to obtain animation resource files from the server.
[0031] The page type mentioned here can include the view type of the page and the content type such as text, pictures, videos, etc. filled in the page. By configuring animation resource files according to the types of the previous and next pages, the number of files can be greatly reduced. Specifically, the animation resource files used can be determined according to the view types of the starting page and the target page. For example, if the starting page is Figure 3 As shown, it contains multiple small view areas, while the target page is a full-screen view. For such view types of previous and next pages, an animation resource file that presents an animation effect of changing from small to large can be used. For example, the start page is a page with more text content, and a link that triggers jumping to another video playback page is inserted in the text content. For such previous and next page types, a transition animation effect can be used in which the start page gradually fades away and the first frame of the video in the target page gradually appears. The division of page types and the determination of the animation resource files to be used based on the combination of the start page and the target page can be determined according to actual needs.
[0032] In an embodiment of the present invention, an animation resource file refers to a file that is pre-configured with animation logic such as animation actions and animation effects, but is not filled with specific animation content. For example, an animation resource file based on a Lottie framework can be used. Lottie is an animation resource framework that supports multiple platforms. The generated animation resource file can be in JSON format and can be directly used on platforms such as iOS, Android, Web, and React Native (an open source application architecture developed by Facebook) without any other additional operations. In an embodiment of the present invention, animation resource files that match various start page types and target page types are pre-configured on the server. In these animation resource files, specific content data in the page can be left blank by using placeholders, and the client can fill it in according to the content data of the specific start page and target page.
[0033] S102: Obtain page data of the start page and / or cache data of the target page, and fill the animation resource file with content data. Specifically, the animation resource file may be filled with content data according to the content identified by the placeholder in the animation resource file. Figure 2 As shown in , as an example, the transition framework is mainly used to perform processing related to the transition animation. The content data filling in this step is processed by the transition framework, and the content data of the transition framework is provided by the routing center.
[0034] As described above, the part of the animation resource file involving specific animation content is occupied in advance with placeholders, and then the client fills it according to the currently available data. The existing data mentioned here includes the page data of the starting page and / or the cached data of the target page. For the page switching operation, the starting page is the current page, and its page data is the latest. For the target page, there may be some cached data, that is, the cached data generated by the user opening the target page before. Based on these data, the filling content required by the animation resource file can be provided. Among them, different types of content data can be identified by setting placeholders, such as using different placeholders for pictures, texts or videos. In addition, different placeholders can correspond to different contents through pre-agreed rules. In the view page of the application, various text contents or picture contents can be given a unified name identifier, such as "product name", "author", "date", "cover image", etc. Correspondingly, the placeholders can also be given the same identifier in the animation resource file, so that the corresponding content data can be obtained from the page data of the starting page and / or the cached data of the target page according to different placeholders, thereby completing the animation content filling. In some cases, the above content data can be obtained in combination with user operations, and the page data of the starting page and / or the cached data of the target page can be obtained according to the page area where the user's page switching operation is located. Figure 3 As shown, a method for processing a transition animation is shown as an example. In view A, the user clicks on the upper left sub-page area to trigger page switching, where the page in view A is the starting page, the page in view C is the target page, and view B is the middle page in the transition process. The special effect of the entire transition animation is that the view of the page area clicked by the user in view A gradually becomes larger to cover the entire page, and finally jumps to the target page. When the client detects the user's click operation, it obtains the page data of the corresponding sub-view area in the starting page as the content data for filling according to the position of the user's click, that is, obtains the picture and text of the sub-view area in the upper left corner of the starting view as the picture and text used in the animation, and fills the animation resource file with content.
[0035] In addition, in the case where an image in the target page is needed as content data of the animation resource file, if the target page is accessed, it can be obtained from the cache data of the target page. In addition, in the case where the target page and the start page have the same part in view, for example, Figure 3The example shown is used to illustrate that the image in the target page (the image in view C) is actually the image of the sub-page in the start page, but the image size is different. In this case, the image in the sub-page can be directly used as content data, but some size enlargement processing may be required. As another way to obtain the image in the target page, the image of the target page can be obtained from a CDN (Content Distribute Network) server used for image caching and / or image processing according to the preload address of the image in the target page to fill it into the animation resource file. The image here may include pictures or videos, etc., and generally pictures are obtained. For some application platforms, if a large amount of image data is involved, a CDN server dedicated to storing images will be set up, and the pictures published in the page will be stored in the CDN server. In the page file, a preload address pointing to the storage location of the CDN server will be embedded for the picture content or video content. The client can obtain the image data through the preload address for caching and loading. Therefore, in the process of filling the animation resource file, the corresponding image file can be obtained by obtaining the preloading address corresponding to the image in the target page. The preloading address of the image in the target page can also come from the cache data of the target page, or the preloading address of the image in each page pre-stored by the application.
[0036] In addition, in parallel with step 102 or after step 102 is executed, step S103 may be further included: according to the view information of the start page and / or the view information of the target page, the animation dependency data is obtained, and the animation attribute information of the animation resource file is corrected according to the animation dependency data. As an example, the processing of this step may be performed by Figure 2 This is achieved using the transition framework in .
[0037] The animation attribute information mentioned here refers to the coordinate data, view size data, etc. required to realize the animation effect included in the animation resource file, which are related to the terminal device used by the user or the view position of the start page. Animation dependency data refers to the protection and view-related information in the start page and / or target page, such as the user click position, the position information of the pictures and texts of the start page and the target page, the picture size in the target page and the start page, and other information. Through the animation dependency data, the start frame, the end frame and the various animation attribute parameters required for the change process of the animation can be determined, so as to combine the transition logic configured in the animation resource file and the content data mentioned above, and a complete animation file can be generated. Generally speaking, the start frame of the transition animation corresponds to the view of the current page (start page), and the end frame corresponds to the view of the target page. It should be noted that the start frame and the end frame of the animation file are in different files from the start page and the target page, that is, the two only have a corresponding relationship, not the same view. However, as a transition animation file, in order to achieve a better connection effect, the start frame and the end frame will try to use a view close to the start page and the target page.
[0038] S104: Generate a transition animation file based on the animation resource file and play it. After the content data filling in step S102 and the animation attribute information correction in step S103 are executed, a transition animation file can be generated. After that, multiple animation views are formed according to the running transition animation file, and then loaded and played to achieve the transition effect. As an example, the processing of this step can be performed by Figure 2 The above transition effect can refer to the transition between two scenes (i.e. two pieces of material, such as two pages), using certain techniques such as wiping, superposition, and page curling to achieve a smooth transition between scenes or plots, or to achieve the effect of enriching the picture to attract the audience. The processing logic of the transition effect already exists in the animation resource file.
[0039] In addition, after the user triggers the page switching operation, the client will request the cloud service platform to record the target page, that is, during the execution of the above steps S101 to S104, the target page view will be cached and loaded synchronously, and then, after the transition animation file is played, the target page view can be loaded, thereby completing the jump from the start page to the target page. The cache loading of the target page can be completed by the routing center of the client.
[0040] The method for processing page transition animation in an embodiment of the present invention obtains the corresponding animation resource file through the page types before and after the page switch, and then generates an animation file for playback on the client by filling in content data, thereby forming a transition animation. This method does not need to embed animation code in the client application in advance, so that the configuration and update of the transition animation can be performed more flexibly.
[0041] Accordingly, on the server side, the following page transition animation processing method may also be applied to interact with the client to complete the transition animation processing. The server may be a server on an application service platform that provides various services in the cloud. Specifically, the method may include:
[0042] S201: Obtaining the starting page type and target page type corresponding to the user's page switching operation. After collecting the user's page switching operation, the client can obtain the corresponding starting page type and target page type and report them to the server so that the server can determine the animation resource file.
[0043] S202: Obtain corresponding animation resource files according to the starting page type and the target page type, and send them to the client. The server selects appropriate animation resource files according to a preset matching strategy and provides them to the client, and the client fills them according to the currently available data to generate a transition animation file.
[0044] S203: Send the page data of the target page to the client according to the address information of the target page visited by the user. While or after providing the animation resource file to the client, the page data of the target page can be sent to the client so that the client can present the view of the target page after playing the transition animation file. The method for processing the page transition animation of the embodiment of the present invention determines the corresponding animation resource file according to the page type before and after the page switching is obtained from the client, and provides it to the client so that the client can generate and play the transition animation by filling it with content data. In this way, there is no need to embed the animation code in the client application in advance, so that the configuration and update of the transition animation can be performed more flexibly.
[0045] The processing method of the page transition animation of the embodiment of the present invention can also be applied to scenes such as games and virtual live broadcasts to make the effects of live broadcasts and games more vivid and rich. For example, there are many situations in the game where transitions are required, such as entering the game from the game login interface, or performing different scene conversions during the game. In these cases, the switching of different scene pages can correspond to the situations of the start page and the target page in the embodiment of the present invention. The corresponding animation resource files can be determined according to the types of different scene pages, and filled according to the actual game cache data to generate the transition animation in the game scene. For another example, in the live broadcast scene, the anchor may also switch between the live broadcast interface and the content display interface. These interfaces can also correspond to the situations of the start page and the target page in the embodiment of the present invention. According to different live broadcast scenes, and the types of the live broadcast interface and the content display interface, the corresponding animation resource files are determined, and filled according to the actual live broadcast scene data to generate the transition animation in the live broadcast scene.
[0046] In addition, it should be noted that the above-mentioned animation resource files can be pre-configured on the client side, so that the client can obtain the animation resource files locally according to the types of the starting page and the target page to fill. A data packet containing multiple animation resource files can be stored locally on the client, and updated animation resource files and corresponding configuration data can be regularly obtained from the server. The configuration data may include a matching strategy for animation resource files determined according to the types of the starting page and the target page. The animation resource files pre-configured by different clients may be different, and may be determined according to the page access habits of users of each client, that is, more commonly used animation resource files are stored, and animation resource files corresponding to page types that users do not frequently visit can be obtained through interaction with the cloud server. By configuring the animation resource files locally on the client, when a page switch occurs, the animation resource files can be obtained more efficiently and configured accordingly.
[0047] like Figure 4 As shown, it is a schematic diagram of the structure of a device for processing page transition animation according to an embodiment of the present invention. The device according to the embodiment of the present invention can be applied to a client side, and is used for generating and playing a transition animation when an application of the client performs a page jump. Specifically, the device may include:
[0048] The animation resource file acquisition module 11 is used to obtain the animation resource file from the server according to the starting page type and the target page type in response to the user's page switching operation. The starting page and the target page mentioned here are two pages relative to the jump operation triggered by the page switching, that is, the page switching operation is triggered from the starting page, and after the transition animation, the target page is presented.
[0049] The page type mentioned here can include the view type of the page and the content types such as text, pictures, videos, etc. filled in the page. By configuring the animation resource files according to the types of the previous and next pages, the number of files can be greatly reduced. The classification of page types and the animation resource files used according to the combination of the starting page and the target page can be determined according to actual needs.
[0050] In the embodiment of the present invention, the animation resource file refers to a file that pre-configured animation actions and animation effects and other animation logic, but is not filled with specific animation content. For example, an animation resource file based on the Lottie framework can be used. In the embodiment of the present invention, animation resource files that match various start page types and target page types are pre-configured on the server. In these animation resource files, the specific content data in the page can be left blank by means of placeholders, and the client can fill it in according to the content data of the specific start page and target page.
[0051] The animation data processing module 12 is used to obtain the page data of the start page and / or the cache data of the target page, and fill the animation resource file with content data. Specifically, the animation resource file can be filled with content data according to the content identified by the placeholder in the animation resource file.
[0052] As mentioned earlier, the part of the animation resource file that involves specific animation content is occupied in advance by placeholders, and then the client fills it in according to the currently available data. The existing data here includes the page data of the starting page and / or the cached data of the target page. For page switching operations, the starting page is the current page, and its page data is the latest. For the target page, there may be some cached data, that is, the cached data generated when the user has previously opened the target page. Based on this data, the filling content required by the animation resource file can be provided. In some cases, the above-mentioned content data can be obtained in combination with user operations. According to the page area where the user's page switching operation is located, the page data of the starting page and / or the cached data of the target page are obtained.
[0053] In addition, in the case where the image in the target page is needed as the content data of the animation resource file, if the target page is being accessed, it can be obtained from the cache data of the target page. In addition, in the case where the target page and the start page have the same part in view, the image in the subpage can be directly used as the content data, but some size enlargement processing may be required. As another way to obtain the image in the target page, the image of the target page can be obtained from the CDN server used for image caching and / or image processing according to the preload address of the image in the target page to fill it into the animation resource file. The image here may include pictures or videos.
[0054] In addition, the animation data processing module 12 can also be used to obtain animation dependency data according to the view information of the start page and / or the view information of the target page, and correct the animation attribute information of the animation resource file according to the animation dependency data.
[0055] The animation attribute information mentioned here refers to the coordinate data, view size data, etc. required to realize the animation effect included in the animation resource file, which are related to the terminal device used by the user or the view position of the start page. Animation dependency data refers to the protection and view-related information in the start page and / or target page, such as the user click position, the position information of the pictures and texts of the start page and the target page, the picture size in the target page and the start page, and other information. Through the animation dependency data, the start frame, the end frame and the various animation attribute parameters required for the change process of the animation can be determined, so as to combine the transition logic configured in the animation resource file and the content data mentioned above, and a complete animation file can be generated. Generally speaking, the start frame of the transition animation corresponds to the view of the current page (start page), and the end frame corresponds to the view of the target page. It should be noted that the start frame and the end frame of the animation file are in different files from the start page and the target page, that is, the two only have a corresponding relationship, not the same view. However, as a transition animation file, in order to achieve a better connection effect, the start frame and the end frame will try to use a view close to the start page and the target page.
[0056] Animation playing module 13 generates transition animation file according to animation resource file, and plays. After the animation resource file is filled with content data and the correction of animation attribute information, the transition animation file can be generated, and then, a plurality of animation views are formed according to the running transition animation file, and then loaded and played to realize the transition effect. The above-mentioned transition effect can refer to two scenes (i.e. two sections of materials, for example two pages), and adopts certain techniques such as wiping, superposition, curling, etc. to realize the smooth transition between scenes or plots, or reach the effect of enriching the picture to attract the audience. The processing logic of the transition effect is realized and already exists in the animation resource file.
[0057] In addition, after the user triggers the page switching operation, the client will request the cloud service platform for a record of the target page, that is, in the process of generating and playing the transition animation, the target page view will be cached and loaded synchronously. Then, after the transition animation file is played, the target page view can be loaded, thereby completing the jump from the start page to the target page.
[0058] The page transition animation processing device of the embodiment of the present invention obtains the corresponding animation resource file through the page types before and after the page switch, and then generates an animation file for playback on the client by filling in content data, thereby forming a transition animation. This method does not need to embed animation code in the client application in advance, so that the transition animation can be configured and updated more flexibly.
[0059] Correspondingly, on the server side, the following page transition animation processing device may also be included, which is used to interact with the client to complete the transition animation processing. The device may be deployed on an application service platform that provides various services in the cloud. Specifically, the device may include:
[0060] The page type acquisition module 21 is used to acquire the starting page type and target page type corresponding to the user's page switching operation from the client. After collecting the user's page switching operation, the client can acquire the corresponding starting page type and target page type and report them to the server for the server to determine the animation resource file.
[0061] The animation resource file sending module 22 is used to obtain the corresponding animation resource file according to the starting page type and the target page type, and send it to the client. The server selects the appropriate animation resource file according to the preset matching strategy and provides it to the client, and the client fills it according to the currently available data to generate a transition animation file.
[0062] The page data sending module 23 is used to send the page data of the target page to the client according to the address information of the target page visited by the user. When or after providing the animation resource file to the client, the page data of the target page can be sent to the client so that the client can present the view of the target page after playing the transition animation file.
[0063] The page transition animation processing device of the embodiment of the present invention determines the corresponding animation resource file according to the page type before and after the page switch obtained from the client, and provides it to the client so that the client can generate and play the transition animation by filling it with content data. This method does not need to embed the animation code in the client application in advance, so that the transition animation can be configured and updated more flexibly.
[0064] The above embodiments describe the process and device structure of the page transition animation processing method. The functions of the above method and device can be implemented by means of an electronic device, such as Figure 5 As shown, it is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention, which specifically includes: a memory 110 and a processor 120.
[0065] The memory 110 is used to store programs.
[0066] In addition to the above-mentioned programs, the memory 110 may also be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.
[0067] The memory 110 may be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0068] The processor 120 is coupled to the memory 110 and is used to execute the program in the memory 110 to perform the operation steps of the page transition animation processing method described in the above embodiment.
[0069] In addition, the processor 120 may also include the various modules described in the aforementioned embodiments to perform page transition animation processing, and the memory 110 may be used, for example, to store data required for these modules to perform operations and / or output data.
[0070] The specific description of the above-mentioned processing process, the detailed description of the technical principle and the detailed analysis of the technical effect have been described in detail in the previous embodiments and will not be repeated here.
[0071] Furthermore, as shown in the figure, the electronic device may also include other components such as a communication component 130, a power component 140, an audio component 150, and a display 160. The figure only schematically shows some components, which does not mean that the electronic device only includes the components shown in the figure.
[0072] The communication component 130 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component 130 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 130 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0073] The power supply component 140 provides power to various components of the electronic device. The power supply component 140 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device.
[0074] The audio component 150 is configured to output and / or input audio signals. For example, the audio component 150 includes a microphone (MIC), and when the electronic device is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 110 or sent via the communication component 130. In some embodiments, the audio component 150 also includes a speaker for outputting audio signals.
[0075] The display 160 includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0076] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0077] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for processing a page transition animation, comprising: In response to the user's page switching operation, the animation resource file is obtained from the server according to the starting page type and the target page type; Obtaining page data of the start page and / or cache data of the target page, and filling the animation resource file with content data; Generate a transition animation file according to the animation resource file and play it; The animation resource file is pre-configured with logic of animation actions and animation effects, and the animation resource file also includes placeholders corresponding to the cached data, and the placeholders are used to identify different types of content data. The page data of the start page and / or the cached data of the target page are obtained, and the content data filling of the animation resource file includes: According to the content identified by the placeholder in the animation resource file, the corresponding content data is acquired from the cache data, and the animation resource file is filled with the content data.
2. The method according to claim 1, wherein: Also includes: According to the view information of the start page and / or the view information of the target page, the animation dependency data is acquired, and the animation attribute information of the animation resource file is corrected according to the animation dependency data.
3. The method according to claim 1, wherein: Also includes: According to the preload address of the image in the target page, the image of the target page is obtained from a CDN server used for image caching and / or image processing, and is filled into the animation resource file.
4. The method according to claim 1, wherein: Also includes: The target page view is cached and loaded, and after the transition animation file is played, the target page view is loaded.
5. The method according to claim 1, wherein: Obtaining the page data of the start page and / or the cache data of the target page includes: According to the page area where the user's page switching operation is located, the page data of the starting page and / or the cache data of the target page are obtained.
6. A device for processing page transition animation, comprising: An animation resource file acquisition module, used to respond to the user's page switching operation and acquire the animation resource file from the server according to the starting page type and the target page type; Animation data processing module, used to obtain page data of the starting page and / or cache data of the target page, and fill the animation resource file with content data; An animation playing module generates a transition animation file according to the animation resource file and plays it; The animation resource file is pre-configured with the logic of animation actions and animation effects, and the animation resource file also includes a placeholder corresponding to the cache data, and the placeholder is used to identify different types of content data. The animation data processing module is also used to: According to the content identified by the placeholder in the animation resource file, corresponding content data is acquired from the cache data to fill the animation resource file with content data.
7. The device according to claim 6, wherein: The animation data processing module is also used to obtain animation dependency data according to the view information of the start page and / or the view information of the target page, and to correct the animation property information of the animation resource file according to the animation dependency data.
8. A method for processing a page transition animation, comprising: Get the starting page type and target page type corresponding to the user's page switching operation; Obtaining a corresponding animation resource file according to the start page type and the target page type, and sending the file to the client; wherein the animation resource file is pre-configured with the logic of animation actions and animation effects, and the animation resource file also includes a placeholder corresponding to the cached data, and the placeholder is used to identify different types of content data, so that the client can obtain the corresponding content data from the existing data according to the content identified by the placeholder in the animation resource file, and fill the animation resource file with the content data to generate a transition animation file; According to the address information of the target page visited by the user, the page data of the target page is sent to the client.
9. An electronic device, comprising: Memory, used to store programs; A processor is used to run the program stored in the memory to execute the page transition animation processing method described in any one of claims 1 to 5 and claim 8.
Citation Information
Patent Citations
Interface switching method and device
CN104639725A
Page switching method for mobile terminal, and mobile terminal
CN107943552A