Pet animation implementation processing method and device based on intelligent terminal and terminal
By implementing pet animation processing methods on smart terminals, the problem of smartphones lacking pet animation gradient function is solved, providing a convenient interactive experience and improving memory operation efficiency.
Patent Information
- Application Number
- CN202411326394.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2024-12-20
AI Technical Summary
Existing smartphones lack pet animation gradient function, which leads to inconvenience in user interaction experience.
By implementing pet animation processing methods on the smart terminal, it includes detecting and enabling pet animation functions, monitoring the status of the secondary screen, loading and shuffling pre-stored pet animation resources, adjusting animations based on battery capacity and unread message status, providing full-screen control display animations, And stop playing when the secondary screen is turned off.
New features of smartphones have been added to provide convenient interactive experience, improve user experience, save memory resources, and achieve smoother animation playback.
Smart Images

Figure CN119172467A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart terminals, and in particular to a pet animation processing method and device based on smart terminals, a smart terminal and a storage medium. Background Art
[0002] With the development of science and technology and the continuous improvement of people's living standards, the use of various smart terminals and smartphones is becoming more and more common.
[0003] With the development of smart phone technology, more and more mobile phones are equipped with secondary screens (such as dual-screen mobile phones, smart phones, etc.). The secondary screen provides users with more interaction methods and application scenarios. However, smart phones in the prior art do not have a pet animation gradient function, which is sometimes inconvenient.
[0004] Therefore, the existing technology still needs to be improved and developed. Summary of the invention
[0005] The technical problem to be solved by the present invention is that, in view of the above-mentioned defects of the prior art, a pet animation implementation processing method, device, smart terminal and storage medium based on a smart terminal are provided. The present invention adds new functions to smart phones, has a pet animation gradient function, has a convenient interactive experience, and provides convenience for users.
[0006] The technical solution adopted by the present invention to solve the problem is as follows:
[0007] A pet animation processing method based on a smart terminal, comprising:
[0008] When the pet animation function is detected to be turned on, the pet animation service is started;
[0009] Monitor the current status of the smartphone's secondary screen;
[0010] When it is detected that the current state of the secondary screen of the smart phone is a bright screen display state, control loading of a designated resource directory that pre-stores a variety of pet animation resources;
[0011] Randomly call one of the pet animation resources from the specified resource directory that stores multiple pet animation resources and form the current pet animation, and add a full-screen control on the secondary screen of the smartphone to play the current pet animation;
[0012] After playing the current pet animation, randomly obtain pet animation resources from another directory from the specified resource directory that stores multiple pet animation resources, and play the pet animation. This is played in a loop until the secondary screen of the smartphone is turned off to end the pet animation playback.
[0013] The method for realizing pet animation based on a smart terminal, wherein, when the pet animation function is detected to be turned on, before the step of controlling the start of the pet animation service, includes:
[0014] A plurality of pet animation resources are preset, and each of the pet animation resources is stored in a designated resource directory of the smart phone in a frame order.
[0015] The method for realizing processing of pet animation based on a smart terminal, wherein the monitoring of the current state of the secondary screen of the smart phone further comprises:
[0016] Monitor the smartphone for unread messages;
[0017] Detecting a low battery state of a smartphone when the processing power level is below a predetermined value;
[0018] Monitor the smartphone’s charging status;
[0019] The method for realizing processing of pet animation based on a smart terminal, wherein when the current state of the secondary screen of the smart phone is detected to be a bright screen display state, the step of controlling the loading of a designated resource directory that pre-stores a plurality of pet animation resources comprises:
[0020] Control the playback of the specified pet animation based on the current state of the smartphone.
[0021] The method for realizing processing of pet animation based on a smart terminal, wherein the steps of randomly calling one of the pet animation resources from the specified resource directory storing multiple pet animation resources loaded to form the current pet animation, and adding a full-screen control on the secondary screen of the smart phone to play the current pet animation include:
[0022] When the monitoring smartphone is in a state where there are unread messages, the currently randomly played pet dog animation is paused and the first designated pet dog animation is played;
[0023] When the battery level of the smartphone is lower than a preset value, the currently randomly played pet dog animation is paused and the second designated pet dog animation is played.
[0024] When the monitoring smart phone is in a charging state, the currently randomly played pet dog animation is paused and the third specified pet dog animation is played.
[0025] The method for realizing processing of pet animation based on a smart terminal, wherein the first specified pet dog animation is: a pet animation of a pet dog holding an envelope in its mouth;
[0026] The second designated pet dog animation is: a pet dog gently pushes a food bowl to the middle of the screen with one front paw to indicate that the owner provides food;
[0027] The third designated pet dog animation is: a pet animation of a pet dog lowering its head to eat dog food.
[0028] The method for realizing processing of pet animation based on a smart terminal, wherein the step of detecting that the current state of the secondary screen of the smart phone is a bright screen display state comprises:
[0029] Real-time detection of whether the smartphone's secondary screen receives a double-click instruction;
[0030] When it is detected that the secondary screen of the smartphone receives a double-click instruction, the secondary screen of the smartphone is controlled to be in a bright screen display state.
[0031] A pet animation processing device based on a smart terminal, wherein the device comprises:
[0032] A presetting module, used for presetting a plurality of pet animation resources, and storing each of the pet animation resources in a designated resource directory of a smart phone in a frame order;
[0033] The pet animation function activation module is used to control the activation of the pet animation service when the activation of the pet animation function is detected;
[0034] The status monitoring module is used to monitor the current status of the secondary screen of the smartphone;
[0035] A loading module, used for controlling the loading of a designated resource directory pre-stored with a variety of pet animation resources when detecting that the current state of the secondary screen of the smart phone is a bright screen display state;
[0036] A random calling module is used to randomly call one of the pet animation resources from the specified resource directory that stores multiple pet animation resources and form the current pet animation, and add a full-screen control on the secondary screen of the smartphone to play the current pet animation;
[0037] The loop playback control module is used to play the current pet animation, and then randomly obtain pet animation resources from another directory from the specified resource directory that stores multiple pet animation resources, and play the pet animation in a loop until the secondary screen of the smartphone is turned off to end the pet animation playback.
[0038] An intelligent terminal includes a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, including the method for executing any one of the methods described above.
[0039] A non-transitory computer-readable storage medium, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any one of the methods described above.
[0040] Beneficial effects of the invention: The invention provides a pet animation processing method, device, smart terminal and storage medium based on a smart terminal. The invention reads resources by means of built-in APK and plays them in the form of frame animation, which reduces the running memory and improves the memory operation efficiency. The invention adds new functions to smart phones, has a pet animation gradient function, has a convenient interactive experience, and provides convenience for users. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 It is a flowchart of a pet animation processing method based on a smart terminal provided in Example 1 of the present invention.
[0043] Figure 2 It is a schematic diagram of a pet animation storage directory of a pet animation processing method based on a smart terminal provided in Example 1 of the present invention.
[0044] Figure 3 It is a pet animation frame structure diagram of a pet animation storage directory of a pet animation processing method based on a smart terminal in specific application embodiment 1 of the present invention.
[0045] Figure 4 It is a flowchart of a pet animation implementation method based on a smart terminal according to a specific application embodiment 2 of the present invention.
[0046] Figure 5 It is a flowchart of a pet animation implementation method based on a smart terminal according to a specific application embodiment 3 of the present invention.
[0047] Figure 6 It is a principle block diagram of an embodiment of a pet animation processing device based on a smart terminal provided by the present invention.
[0048] Figure 7 It is a block diagram of the internal structure principle of the intelligent terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0050] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0051] The present invention provides a pet animation processing method based on a smart terminal. The smart terminal of the present invention is described by taking a smart phone as an example, and taking a smart phone equipped with a secondary screen (such as a dual-screen mobile phone, a smart phone, etc.) as an example. The secondary screen provides users with more interaction methods and application scenarios, and the present invention provides a virtual pet function. The secondary screen electronic pet dog can not only interact with the user on the main screen, but also make full use of the characteristics of the secondary screen to bring users a richer and more immersive experience.
[0052] The introduction of the electronic pet dog on the secondary screen can effectively utilize the idle time of the mobile phone secondary screen and provide users with continuous companionship and entertainment. This form of virtual pet can also help users find a little fun and relaxation in their busy daily lives.
[0053] Specifically, Figure 1 As shown, a pet animation processing method based on a smart terminal in Embodiment 1 of the present invention comprises the following steps:
[0054] Step S100: pre-set a plurality of pet animation resources, and store each of the pet animation resources in a designated resource directory of the smart phone in a frame order.
[0055] In the embodiment of the present invention, a plurality of pet animation resources are pre-set, and this process involves creating or collecting a plurality of different types of pet dog animations. These animations may include the performances of virtual pet dogs of different breeds in various activities, such as running, jumping, sitting, wagging tails, etc. Through the diverse animation resources, a rich visual experience can be provided to the user.
[0056] In the embodiment of this step, the storage is performed in the order of frames. Specifically, the pet dog animation of this embodiment is composed of a series of static images (frames), and these images are played in a specific order to form a dynamic effect. In this step, it is ensured that the frames of each animation are stored in the correct order so that they can be presented smoothly when played. For example, the animation of a dog running may be composed of multiple consecutive postures, and these postures need to be arranged in sequence.
[0057] In this step, the designated resource directory stored in the smartphone is specifically to store these multiple pet animation resources in different designated folders of the smartphone; that is, all frames of each pet dog animation resource are stored in a designated folder of the smartphone, and different pet dog animation resources are stored in different designated folders of the smartphone, so that the application or user can quickly access and call these resources. The designated directory can be a resource folder inside the application to ensure the organization and manageability of the resources.
[0058] The present invention can reduce the runtime loading time and improve the response speed of the application by pre-storing the animation resources in a specified directory. This means that users will not feel delays due to loading animations when using the application. And the animation resources are stored in a specific directory in frame order, which is convenient for developers to manage and update, ensuring the organization and maintainability of the resources. Developers can easily replace or add new animations without having to reorganize the entire resource library. And the setting of multiple animation resources allows developers to achieve more creative expressions in the application, increase interactivity and fun. For example, users can choose different dogs to interact with, and each dog has a unique animation performance.
[0059] Step S200, when it is detected that the pet animation function is turned on, control the start of the pet animation service;
[0060] In this step, when the user selects or enables the pet animation feature in the application, this action is confirmed through an event listener or state check mechanism. This can be the user clicking a button, toggling a switch, or selecting a related option in the settings.
[0061] In the present invention, once it is detected that the user has turned on the pet animation function, the application will trigger the corresponding service or module to start the animation. This may involve calling a specific animation engine or rendering module to start playing the preset pet animation. At this point, the present invention will ensure that all necessary resources (such as animation frames, sound effects, etc.) are loaded and ready.
[0062] In this step, by detecting the user's operation in real time and starting the corresponding animation service, the application can provide instant feedback and enhance the user's interactive experience. For example, after the user turns on the animation function, they can immediately see the dynamic performance of the pet dog, which will make them feel more involved.
[0063] It also improves resource utilization efficiency, because animation services are only started when users need them, which can effectively save device resources (such as memory and processing power). This means that when users do not use animation functions, the application can remain lightweight and improve overall performance.
[0064] And by automatically starting the animation service, users can enjoy a smoother experience without manual operation or waiting for loading. This seamless transition makes users feel more natural and comfortable when using the application.
[0065] This design pattern makes it easy to expand more animation features in the future. For example, developers can add new pet animations in subsequent versions by simply calling new services when the function is detected to be turned on, without having to refactor the entire system.
[0066] Step S300, monitoring the current state of the secondary screen of the smart phone;
[0067] In the embodiment of the present invention, the smartphone is described by taking a dual-screen smartphone and a folding-screen smartphone as examples, because only dual-screen smartphones and folding-screen smartphones have a secondary screen. The pet animation of the present invention is mainly displayed on the secondary screen. Therefore, it is necessary to monitor the current state of the secondary screen of the smartphone in real time, including the screen-on state and the screen-off state.
[0068] Step S400: when it is detected that the current state of the secondary screen of the smart phone is a bright screen display state, control loading of a designated resource directory that pre-stores a variety of pet animation resources;
[0069] When implemented specifically, the current state of the smartphone's secondary screen will be detected in real time. This process can be monitored by the application (such as dual-screen phones and folding screen phones have secondary screens). Through the system API, the monitoring application can determine whether the secondary screen is in the bright screen state, that is, whether it is displaying content. This is usually achieved by monitoring the event of screen state change.
[0070] In this step, once the secondary screen is detected and confirmed to be in the light-on state, the application will automatically load the pet dog animation resources stored in the specified resource directory. These resources may include different animation frames, sound effect files and other related materials, so as to control the display of dynamic content on the secondary screen in the following steps.
[0071] For example, when an app called "Pet Dog Assistant" is developed, users can interact with a virtual pet dog on the secondary screen. When the user is using the phone, the secondary screen is turned off. When the user receives a new message or notification, the secondary screen automatically lights up. If the application detects that the status of the secondary screen has changed to the light screen through the system API, it confirms that the animation resource can be loaded.
[0072] In this step, once it is confirmed that the secondary screen is lit, the application immediately loads the pre-stored pet dog animation resources from the specified resource directory, such as animations of a dog wagging its tail, jumping, or playing.
[0073] This step can effectively improve the efficiency of pet animation loading by preloading in advance. By pre-storing animation resources and loading them when needed, the application can reduce loading time and provide a smoother user experience. Users do not need to wait for a long loading process and can enjoy the animation effect immediately.
[0074] Step S500: randomly retrieve one of the pet animation resources from the specified resource directory that stores multiple pet animation resources and form the current pet animation, and add a full-screen control on the secondary screen of the smart phone to play the current pet animation;
[0075] In the embodiment of the present invention, a plurality of different pet dog animation resources are pre-stored in the designated resource directory of the smartphone; in the present invention, a resource directory containing a plurality of pet dog animations is first loaded. These animations can be short videos or GIFs of different breeds of dogs playing, running, or doing other interesting actions.
[0076] After loading is completed, the present invention randomly selects an animation resource from one of the files in the specified resource directory. This randomness can increase the diversity of user experience, so that the animation played each time can be different.
[0077] Once the animation resource is selected, the present invention converts it into the animation of the current frame. This means that the system extracts a certain frame of the animation as the currently displayed content. And on the secondary screen of the smartphone, the system adds a full-screen control, allowing the user to watch the current frame of the pet animation in full-screen mode. This design can enhance the user's viewing experience and make the animation more vivid.
[0078] The entire selected pet dog animation will be played on the secondary screen, and users can enjoy this interesting visual experience.
[0079] For example, when there is an application named "Pet Paradise", after the user opens the application, the present invention will randomly select a file of pet dog animation from a resource library containing a specified directory of 100 different pet dog animations, such as an animation of a pet dog laughing happily on the secondary screen. This design makes the user feel happy.
[0080] The benefit of this step is that by randomly selecting different animations, users can get a sense of freshness every time they use the app, which increases interactivity and fun. In addition, pet dog animations are usually very visually appealing, which can attract users' attention and increase the frequency of app usage. In addition, the design of the full-screen control allows users to choose the viewing mode according to their needs, providing greater flexibility. In addition, pet dog animations can trigger users' emotional resonance and increase the emotional connection between users and the app.
[0081] Step S600, after playing the current pet animation, randomly obtain pet animation resources from another directory from the specified resource directory that stores multiple pet animation resources, and play the pet animation. This is played in a loop until the secondary screen of the smartphone is turned off to end the pet animation playback.
[0082] In this step embodiment, a process of playing a pet dog animation in a loop is described until the secondary screen of the smartphone turns off.
[0083] Specifically, in the embodiment of the present invention, after playing the current pet animation, the pet animation resources in another directory are randomly obtained from the loaded designated resource directory storing multiple pet animation resources.
[0084] That is, when one of the randomly acquired pet animations is finished playing, the present invention will randomly select another pet dog animation from the specified directory of the loaded storage of multiple pet animation resources. This process ensures that the animation played each time is different, which increases the fun of watching.
[0085] In the embodiment of the present invention, the newly selected pet animation will be loaded and played, and the user can continue to enjoy the new pet dog animation. This process will be repeated continuously to form a cycle.
[0086] In the embodiment of the present invention, different pet animations will continue to be played in a loop on the secondary screen until the secondary screen of the user's smartphone turns off. The off screen state usually means that the secondary screen of the smartphone turns off automatically, and the system automatically stops playing the animation to save battery and resources.
[0087] For example, when one of the pet animations is played on the secondary screen, when the pet animation is finished, the present invention will randomly select another pet animation to play, and the cycle will continue. The user will see the new animation on the secondary screen and can continue to enjoy the process.
[0088] In the embodiment of the present invention, when the secondary screen of the smart phone enters the off-screen state, the pet animation will be controlled to automatically stop playing, ensuring that energy consumption is not wasted. This setting of the present invention not only improves the user experience, but also allows users to enjoy the cute pet dog animation anytime when needed.
[0089] It can be seen that in the present invention, through loop playback, users can enjoy the animation of the pet dog for a long time, which is suitable for parties, leisure time or as leisure and entertainment. And the constantly changing animation content can attract the attention of users, increase their dependence on the application and the frequency of use. And when the secondary screen is turned off, the playback is automatically stopped, which can effectively save battery and device resources and extend the use time of the device.
[0090] In a further embodiment, monitoring the current state of the secondary screen of the smart phone further includes:
[0091] Monitor the smartphone for unread messages;
[0092] Detecting a low battery state of a smartphone when the processing power level is below a predetermined value;
[0093] Monitor the smartphone’s charging status;
[0094] Among them, monitoring whether the smartphone has unread messages, specifically, the application of the present invention detects whether the smartphone has unread messages (such as text messages, social media notifications, etc.). If there are unread messages, the present invention can display a designated pet animation on the secondary screen in the following steps for message reminder to ensure that the user does not miss important information.
[0095] The present invention monitors the low power state of the smartphone when the power level is lower than a predetermined value. Specifically, the present invention monitors the battery level of the smartphone in real time. If the power level is lower than a preset threshold (e.g., 20%), the present invention can play a designated pet animation reminder.
[0096] The present invention can detect that the smartphone is in a charging state, specifically, when the smartphone is connected to a charger, and can then select another pet animation to play and remind the smartphone that it is currently charging.
[0097] In this way, by monitoring unread messages, the present invention allows users to obtain important information in a timely manner while enjoying animations, thereby avoiding missing important notifications. Furthermore, by monitoring multiple states, the application can respond to user needs more intelligently and provide a personalized use experience.
[0098] In a further embodiment, the pet animation processing method based on the intelligent terminal of the present invention further comprises the steps of:
[0099] In the embodiment of the present invention, the specified pet animation can be controlled to be played according to the current state of the smart phone.
[0100] When the monitored smartphone is in a state where there are unread messages, the control is to pause the currently randomly played pet dog animation, and control the playing of the first specified pet dog animation; for example, when the monitored smartphone is in a state where there are unread messages, the control is to pause the currently randomly played animation, and call up the playing of the specified pet animation HJM_SC15: a pet animation with an envelope in its mouth.
[0101] When the monitoring smartphone processes a low power state below a predetermined value, the control pauses the currently randomly played pet dog animation and controls the playback of a second designated pet dog animation. For example, when the monitoring smartphone processes a low power state below a predetermined value, such as below 20% power, the control pauses the currently randomly played animation and plays the designated pet animation HJM_SC13: A pet animation in which a front paw gently pushes a food bowl to the middle of the screen to signal the owner to provide food.
[0102] When the monitoring smartphone is in charging state, the currently randomly played pet dog animation is paused, and the third designated pet dog animation is played. The currently randomly played animation is paused, and the designated pet animation HJM_SC14 is played: a pet animation of lowering its head to eat dog food.
[0103] In a further embodiment of the present invention, the method for realizing processing of pet animation based on a smart terminal, wherein the first specified pet dog animation is: a pet animation of a pet dog holding an envelope in its mouth;
[0104] The second designated pet dog animation is: a pet dog gently pushes a food bowl to the middle of the screen with one front paw, indicating that the owner provides food.
[0105] The third designated pet dog animation is: a pet animation of a pet dog lowering its head to eat dog food.
[0106] In a further embodiment of the present invention, the method for realizing processing of pet animation based on a smart terminal, wherein the step of detecting that the current state of the secondary screen of the smart phone is a bright screen display state comprises:
[0107] Step S101, detecting in real time whether the secondary screen of the smart phone receives a double-click instruction;
[0108] In this step, the application will continue to monitor the touch input of the secondary screen, especially the double-click operation. The double-click command is usually a common gesture used by users to quickly activate certain functions or interfaces. Through real-time detection, the application can respond quickly to user operations.
[0109] Step S102: When it is detected that the secondary screen of the smart phone receives a double-click instruction, the secondary screen of the smart phone is controlled to be in a bright screen display state.
[0110] In the embodiment of the present invention, once the application detects a double-click instruction on the secondary screen, it will immediately switch the secondary screen to a bright screen state. This means that the secondary screen will change from a dormant or off-screen state to an active state, and the user can immediately see the content or interact. For example, immediately control the secondary screen to randomly display a pet animation.
[0111] For example, when a user wants to display a pet animation on the secondary screen of a smartphone, the user only needs to double-click on the secondary screen, and the application will immediately detect this instruction and switch the secondary screen to the bright screen state. In the bright screen state, the secondary screen will be controlled to display the pet animation immediately; when the secondary screen is displayed for a period of time, if the user does not watch the pet animation on the secondary screen, the user can double-click the secondary screen again, and the application will switch the secondary screen back to the dark screen state to save battery power.
[0112] Of course, when the present invention is implemented, when the secondary screen displays the pet animation for more than a predetermined time, such as 5 minutes, the screen can be automatically turned off to save battery power. This design of the present invention not only improves the user's operating convenience, but also ensures the efficient use of the device and enhances the overall user experience.
[0113] The advantage of the present invention is that the double-click gesture is an intuitive and fast operation mode, and the user can wake up the secondary screen without complicated operations. This convenience makes it smoother for users to use applications and reduces waiting time. By activating the secondary screen only when the user needs it (i.e., when double-clicking), the application can effectively save battery power. The secondary screen remains off when not in use to avoid unnecessary power consumption.
[0114] The present invention is further described in detail below through specific application examples:
[0115] The second embodiment provides a pet animation processing method based on a smart terminal, comprising the following steps:
[0116] S11, pre-set a variety of pet dog animation resources, and store the pet dog animation resources in a designated location of the smart phone in a frame order.
[0117] In the embodiment of the present invention, the designed various pet animation resources are first stored in the System area directory of the mobile phone system:
[0118] For example, it is stored in the root directory: system / media / config / pets / ;
[0119] like Figure 2 As shown, the folders for various pet actions are stored in the Pets directory;
[0120] Each folder in the specified directory represents a type of pet action, such as Figure 2 As shown:
[0121] Among them, HJM_SC01...HJM_SC12 are random play animations;
[0122] HJM_SC13, HJM_SC14, HJM_SC15 are specific playback animations;
[0123] HJM_SC01: Pops its head out from the middle of the screen, then lies on the screen with its paws, shakes its head left and right, and opens its eyes;
[0124] HJM_SC02: Put your head close to the center of the screen, close your eyes and sniff;
[0125] HJM_SC03: Stands in the middle of the screen with its tail upturned, tilts its head and blinks one eye (like a cute greeting);
[0126] HJM_SC04: Sitting in the middle of the screen, blinking cutely, wagging its tail from side to side, and barking;
[0127] HJM_SC05: Walks out from the left side of the screen, wagging its tail, holding a Frisbee in its mouth, and walks to the center of the screen to give it to its owner;
[0128] HJM_SC06: Chasing its tail twice, then turning to the center of the screen, lying on its front paws and shaking its head left and right at the screen;
[0129] HJM_SC07: Sitting in the middle of the screen, purring cutely toward the sky;
[0130] HJM_SC08: Turns his head from the left side of the screen to face the center of the screen, blinks cutely, and rubs the screen with his nose;
[0131] HJM_SC09: Lying on all fours on the ground pretending to sleep, opening his eyes to look at his master and then closing them again;
[0132] HJM_SC10: The owner throws the ball in from outside the screen, and the cute pet jumps up and catches the ball with its mouth;
[0133] HJM_SC11: Walks from the left side of the screen to the center, then lies on all fours, blinking at the owner;
[0134] HJM_SC12: The dog starts from all fours and tries to stand on its hind paws. It is a short process but needs to be natural. Then the front paws naturally swing up and down against the body.
[0135] HJM_SC13: Gently push the food bowl to the middle of the screen with one front paw, signaling the owner to provide food;
[0136] HJM_SC14: Lower your head and eat dog food;
[0137] HJM_SC15: Holding an envelope in his mouth;
[0138] S12. In the embodiment of the present invention, each single directory stores all animation picture resources of the same pet animation;
[0139] like Figure 3As shown in the figure, the HJM_SC14 directory stores all the frame animation pictures of the dog eating dog food, and the png format frame pictures are as follows Figure 3 shown.
[0140] S12, control the start of the secondary screen application --> load the secondary screen specified resource directory:
[0141] system / media / config / pets / Get all the files in the directory, sort them by file name, create CacheEntryKey objects containing the file path and name, and store them in a HashMap by type.
[0142] CacheEntryKey structure member variables;
[0143] path: indicates the absolute path of the file.
[0144] type: indicates the type of file (type is the file name).
[0145] S13, controlling all pet types to be played randomly and in a loop;
[0146] For example 1): traverse the HJM_SC01 directory file array lockFiles;
[0147] 2): For each file, create a FileInputStream object fis to read the file content;
[0148] 3): Use the BitmapDrawable constructor to convert the input stream into a bitmap drawing object bitmapDrawable. If the bitmapDrawable is not null, add it as a frame to the animationDrawable;
[0149] 4): Set the frame interval to 30 milliseconds. Finally, display it in ImageView and start the animation;
[0150] 5): After playing the current animation, randomly obtain other directories JIM_SC01, HJM_SC02, HJM_SC03.......HJM_SC010 and play them in a loop.
[0151] S14. Control the playing of the specified pet animation according to the current state of the smartphone;
[0152] For example, 1). When the smartphone is in the state of receiving unread messages, the current random animation is paused and the specified HJM_SC15: holding an envelope in the mouth is played;
[0153] 2). When the smartphone is in a low battery state, for example, the battery is less than 20%, the control pauses the current random animation and plays the specified HJM_SC13: Gently push the food bowl to the middle of the screen with one front paw, indicating the owner to provide food;
[0154] 3). When the smartphone is in charging state, the control will pause the current random animation and play the specified HJM_SC14: Lower your head to eat dog food.
[0155] like Figure 4 As shown, this embodiment 3 provides a pet animation processing method based on a smart terminal, comprising the following steps:
[0156] S30, start the secondary screen application;
[0157] S31, load all resource types of the secondary screen pet, such as the resource directory system / media / config / pets / ;
[0158] S32, obtaining a single pet resource and forming a frame animation;
[0159] S33. Add imageView full screen control;
[0160] S34, play the current frame animation;
[0161] S35, after playing the current frame animation, continue to randomly load the next frame animation resource;
[0162] That is, in the embodiment of the present invention, when it is detected that the secondary screen is in the bright screen state, the pet animation is controlled to be played, and after the current animation is played, other directories are randomly obtained again: the next frame animation resource is loaded, and the playback is looped.
[0163] like Figure 5 As shown, this embodiment 5 provides a pet animation processing method based on a smart terminal, comprising the following steps:
[0164] S41, when a text message is detected from a smart phone, enter S42, interrupt the current random playing of frame animation, enter S43, load the frame animation resource in the directory of specific frame animation resource HJMSC15; then enter S64;
[0165] S51, when a low battery reminder is given (for example, when the battery of a smartphone is less than 20%), enter step S52, interrupt the current host to play the animation, and enter S53, load a specific frame animation resource in the directory HJM_SC15; then enter S64;
[0166] S61, when the mobile phone is charging, enter step S62, interrupt the current host machine to play the animation, and enter S63, load the specific frame animation resource in the HJM_SC15 directory; then enter S64;
[0167] S64, obtaining a single pet resource and forming a frame animation;
[0168] S65. Add imageView full screen control;
[0169] S66. Play the current frame animation.
[0170] In this embodiment, when the smartphone randomly plays pet animations, if the smartphone is detected to be in the following three states: for example, 1) the smartphone is monitored to be in a state of having unread messages; 2) the smartphone is monitored to be in a low power state of processing power lower than a predetermined value; 3) the smartphone is monitored to be in a charging state, the corresponding pet animations are controlled to be displayed respectively to remind the user that the smartphone is in different states, thereby improving the user experience.
[0171] Exemplary Devices
[0172] like Figure 6 As shown, an embodiment of the present invention provides a pet animation processing device based on a smart terminal, the device comprising:
[0173] The presetting module 310 is used to pre-set a plurality of pet animation resources and store each of the pet animation resources in a designated resource directory of the smart phone in a frame order;
[0174] The pet animation function activation module 320 is used to control the activation of the pet animation service when detecting that the pet animation function is activated;
[0175] The status monitoring module 330 is used to monitor the current status of the secondary screen of the smart phone;
[0176] The loading module 340 is used to control the loading of a designated resource directory that pre-stores a variety of pet animation resources when detecting that the current state of the secondary screen of the smart phone is a bright screen display state;
[0177] The random retrieval module 350 is used to randomly retrieve one of the pet animation resources from the specified resource directory that stores multiple pet animation resources and form the current pet animation, and add a full-screen control on the secondary screen of the smart phone to play the current pet animation;
[0178] The loop playback control module 360 is used to play the current pet animation, and then randomly obtain pet animation resources from another directory from the loaded specified resource directory that stores multiple pet animation resources, and play the pet animation in a loop until the secondary screen of the smartphone is turned off to end the pet animation playback, as described above.
[0179] Based on the above embodiments, the present invention further provides an intelligent terminal, whose principle block diagram can be shown as follows: Figure 7 As shown. The intelligent terminal includes a processor, a memory, a network interface, a display screen, and a database connected through a system bus. Among them, the processor of the intelligent terminal is used to provide computing and control capabilities. The memory of the intelligent terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the intelligent terminal is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a pet animation implementation processing method based on the intelligent terminal is implemented. The database of the intelligent terminal is used to store a pet animation implementation processing program based on the intelligent terminal.
[0180] Those skilled in the art will understand that Figure 7 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the smart terminal to which the scheme of the present invention is applied. The specific smart terminal may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0181] In one embodiment, a smart terminal is provided, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, and the one or more programs include instructions for performing the following operations:
[0182] When the pet animation function is detected to be turned on, the pet animation service is started;
[0183] Monitor the current status of the smartphone's secondary screen;
[0184] When it is detected that the current state of the secondary screen of the smart phone is a bright screen display state, control loading of a designated resource directory that pre-stores a variety of pet animation resources;
[0185] Randomly call one of the pet animation resources from the specified resource directory that stores multiple pet animation resources and form the current pet animation, and add a full-screen control on the secondary screen of the smartphone to play the current pet animation;
[0186] After playing the current pet animation, randomly obtain pet animation resources from another directory from the loaded specified resource directory that stores multiple pet animation resources, and play the pet animation. This is played in a loop until the secondary screen of the smartphone is turned off to end the pet animation playback, as described above.
[0187] Wherein, when the pet animation function is detected to be turned on, the step of controlling the start of the pet animation service includes:
[0188] A plurality of pet animation resources are preset, and each of the pet animation resources is stored in a designated resource directory of the smart phone in a frame order.
[0189] Wherein, monitoring the current state of the secondary screen of the smart phone also includes:
[0190] Monitor the smartphone for unread messages;
[0191] Detecting a low battery state of a smartphone when the processing power level is below a predetermined value;
[0192] Monitor the smartphone’s charging status;
[0193] Wherein, when detecting that the current state of the secondary screen of the smart phone is a bright screen display state, the step of controlling to load a designated resource directory pre-stored with a plurality of pet animation resources comprises:
[0194] Control the playback of the specified pet animation based on the current state of the smartphone.
[0195] The steps of randomly retrieving one of the pet animation resources from the loaded specified resource directory storing multiple pet animation resources and forming the current pet animation, and adding a full-screen control on the secondary screen of the smart phone to play the current pet animation include:
[0196] When the monitoring smartphone is in a state where there are unread messages, the currently randomly played pet dog animation is paused and the first designated pet dog animation is played;
[0197] When the battery level of the smartphone is lower than a preset value, the currently randomly played pet dog animation is paused and the second designated pet dog animation is played.
[0198] When the monitoring smart phone is in a charging state, the currently randomly played pet dog animation is paused and the third specified pet dog animation is played.
[0199] The first designated pet dog animation is: a pet animation of a pet dog holding an envelope in its mouth
[0200] The second designated pet dog animation is: a pet dog gently pushes a food bowl to the middle of the screen with one front paw to indicate that the owner provides food;
[0201] The third designated pet dog animation is: a pet animation of a pet dog lowering its head to eat dog food.
[0202] The step of detecting that the current state of the secondary screen of the smart phone is a bright screen display state comprises:
[0203] Real-time detection of whether the smartphone's secondary screen receives a double-click instruction;
[0204] When it is detected that the secondary screen of the smartphone receives a double-click instruction, the secondary screen of the smartphone is controlled to be in a bright screen display state, as described above.
[0205] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0206] In summary, the present invention provides a pet animation processing method, device, smart terminal and storage medium based on a smart terminal. The present invention reads resources by being built outside the APK and plays them in the form of frame animation, which reduces the running memory and improves the memory operation efficiency. The present invention adds new functions to the smart phone, has a pet animation gradient function, has a convenient interactive experience, and provides convenience for users.
Claims
1. A pet animation processing method based on an intelligent terminal, characterized in that: include: When the pet animation function is detected to be turned on, the pet animation service is started; Monitor the current status of the smartphone's secondary screen; When it is detected that the current state of the secondary screen of the smart phone is a bright screen display state, control loading of a specified resource directory that pre-stores a variety of pet animation resources; Randomly call one of the pet animation resources from the specified resource directory that stores multiple pet animation resources and form the current pet animation, and add a full-screen control on the secondary screen of the smartphone to play the current pet animation; After playing the current pet animation, randomly obtain pet animation resources from another directory from the specified resource directory that stores multiple pet animation resources, and play the pet animation. This is played in a loop until the secondary screen of the smartphone is turned off to end the pet animation playback.
2. The pet animation processing method based on the intelligent terminal according to claim 1 is characterized in that: The step of controlling the start of the pet animation service when the pet animation function is detected to be turned on includes: A plurality of pet animation resources are preset, and each of the pet animation resources is stored in a designated resource directory of the smart phone in a frame order.
3. The pet animation processing method based on the intelligent terminal according to claim 1 is characterized in that: The monitoring of the current state of the secondary screen of the smart phone also includes: Monitor the smartphone for unread messages; Detecting a low battery state of a smartphone processing power level below a predetermined value; Monitors the smartphone's charging status.
4. The method for realizing pet animation based on a smart terminal according to claim 3, characterized in that: When the current state of the secondary screen of the smart phone is detected to be a bright screen display state, the step of controlling the loading of a designated resource directory that pre-stores a plurality of pet animation resources comprises: Control the playback of the specified pet animation based on the current state of the smartphone.
5. The method for realizing pet animation based on a smart terminal according to claim 4, characterized in that: The steps of randomly retrieving one of the pet animation resources from the specified resource directory that stores multiple pet animation resources and forming the current pet animation, and adding a full-screen control on the secondary screen of the smart phone to play the current pet animation include: When the monitoring smartphone is in a state where there are unread messages, the currently randomly played pet dog animation is paused and the first designated pet dog animation is played; When the processing power of the smartphone is monitored to be lower than a predetermined value, the currently randomly played pet dog animation is paused and the second designated pet dog animation is played; When the monitoring smart phone is in a charging state, the currently randomly played pet dog animation is paused and the third specified pet dog animation is played.
6. The method for realizing pet animation based on a smart terminal according to claim 5, characterized in that: The first designated pet dog animation is: a pet animation of a pet dog holding an envelope in its mouth The second designated pet dog animation is: a pet dog gently pushes a food bowl to the middle of the screen with one front paw to indicate that the owner provides food; The third designated pet dog animation is: a pet animation of a pet dog lowering its head to eat dog food.
7. The method for realizing pet animation based on a smart terminal according to claim 1, characterized in that: The step of detecting that the current state of the secondary screen of the smart phone is a bright screen display state comprises: Real-time detection of whether the smartphone's secondary screen receives a double-click instruction; When it is detected that the secondary screen of the smartphone receives a double-click instruction, the secondary screen of the smartphone is controlled to be in a bright screen display state.
8. A pet animation processing device based on an intelligent terminal, characterized in that: The device comprises: A presetting module, used for presetting a plurality of pet animation resources, and storing each of the pet animation resources in a designated resource directory of a smart phone in a frame order; The pet animation function activation module is used to control the activation of the pet animation service when the activation of the pet animation function is detected; The status monitoring module is used to monitor the current status of the secondary screen of the smartphone; A loading module, used for controlling the loading of a designated resource directory pre-stored with a variety of pet animation resources when detecting that the current state of the secondary screen of the smart phone is a bright screen display state; A random calling module is used to randomly call one of the pet animation resources from the specified resource directory that stores multiple pet animation resources and form the current pet animation, and add a full-screen control on the secondary screen of the smartphone to play the current pet animation; The loop playback control module is used to play the current pet animation, and then randomly obtain pet animation resources from another directory from the specified resource directory that stores multiple pet animation resources, and play the pet animation in a loop until the secondary screen of the smartphone is turned off to end the pet animation playback.
9. An intelligent terminal, characterized in that: The device comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, and the one or more programs include being used to execute the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method as described in any one of claims 1 to 7.
