Virtual pet interaction method and electronic device

By detecting UI element events on electronic devices to control the behavior of virtual pets, and combining skeletal animation with the generation of real pet images, virtual pets can perform actions within the same layer. This solves the problem of the lack of realism and fun in virtual pet interactions in existing technologies and improves the user experience.

WO2026000875A1PCT designated stage Publication Date: 2026-01-02HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/140076
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-27
Filing Date
2024-12-17
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Existing virtual pet interaction methods lack realism, flexibility, and fun on electronic devices, have poor interface display, weak user engagement, and lack emotional value.

Method used

By detecting events of target UI elements, the virtual pet is controlled to perform behaviors within the same layer, including contact and non-contact interactions. Skeletal animation slices are used to control the virtual pet's movements, enabling cross-device interaction and image synchronization. Virtual pets are generated by combining real pet images, and the interaction methods are adjusted based on system, environment, and user information.

Benefits of technology

It improves the realism, flexibility, and fun of virtual pet interaction, enhances the emotional value for users, and improves the interface display and user stickiness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024140076_02012026_PF_FP_ABST
    Figure CN2024140076_02012026_PF_FP_ABST
Patent Text Reader

Abstract

A virtual pet interaction method and an electronic device, relating to the technical field of electronic devices, and capable of improving the authenticity, flexibility and interestingness of virtual pet interaction, and satisfying emotional needs of users. The method is applied to a first electronic device having a display screen, and comprises: upon detecting that a first event occurs in a target UI element, the first electronic device controls, in response to the first event, a virtual pet to execute a first behavior, wherein when the first electronic device controls the virtual pet to execute the first behavior, the virtual pet and the target UI element are located at the same layer.
Need to check novelty before this filing date? Find Prior Art

Description

Virtual pet interaction method and electronic device

[0001] The present application claims priority from the Chinese patent application No. 202410860392.2 filed on June 27, 2024, and entitled "Virtual pet interaction method and electronic device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the technical field of electronic devices, and in particular to a virtual pet interaction method and an electronic device. BACKGROUND

[0003] Nowadays, the pet market is showing a trend of gradual expansion, and the number of pet users is increasing. Pets are as important as family members. Based on this pet-keeping trend, the current electronic device presents an electronic image of a virtual pet to realize interaction between the user and the virtual pet. In the current scheme, the virtual pet presented by the electronic device can only realize some pre-set simple interactions and does not have authenticity, the interface display effect is poor, the interaction effect is not good, and the emotional value obtained by the user is very limited, which is weak in stickiness for the user, lacks flexibility and interest. SUMMARY

[0004] The present application provides a virtual pet interaction method and an electronic device, which can improve the authenticity, flexibility and interest of virtual pet interaction, improve the interface display effect and virtual pet interaction effect, and meet the emotional value of the user.

[0005] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:

[0006] In a first aspect, a virtual pet interaction method is provided, applied to a first electronic device with a display screen, the method comprising: detecting that a target user interface (UI) element occurs a first event; in response to the first event, controlling a virtual pet to perform a first behavior, wherein the virtual pet and the target UI element are in the same layer when the control of the virtual pet to perform the first behavior ends.

[0007] Based on the technical solution, when the target UI element of the electronic device occurs the first event, the electronic device controls the virtual pet to perform a certain behavior, that is, the virtual pet can perform a certain behavior in response to the target UI element occurring the first event, that is, the interaction with the target UI element is realized, and when the control of the virtual pet performing the behavior ends, the virtual pet and the target UI element are in the same layer, so that the virtual pet can perform more flexible actions, and the interface display effect and the interaction effect of the virtual pet can be improved, for example, the virtual pet can perform a similar contact interaction of exploring from behind the target UI element, which can improve the authenticity, flexibility and interestingness of the virtual pet interaction, and meet the emotional value of the user.

[0008] In a possible design, during the control of the virtual pet performing the first behavior, the virtual pet and the target UI element are in the same layer. In this way, during the control of the virtual pet performing a certain behavior, the virtual pet and the target UI element are in the same layer, and during the performance of the certain behavior by the virtual pet, the virtual pet can also perform a contact interaction with the target UI element, which can make the virtual pet perform more flexible actions during the performance of the first behavior, improve the authenticity, flexibility and interestingness of the virtual pet interaction, and further improve the interface display effect and the interaction effect of the virtual pet, and meet the emotional value of the user.

[0009] In one scenario, the virtual pet and the target UI element can be in the same layer before the virtual pet performs the first behavior. In another scenario, the virtual pet and the target UI element are in different layers before the virtual pet performs the first behavior, and then the first electronic device can control the virtual pet to switch to the layer where the target UI element is located before controlling the virtual pet to continue performing the first behavior. In the above two scenarios, during the control of the virtual pet performing the first behavior by the first electronic device, the virtual pet and the target UI element are in the same layer. This can make the virtual pet perform more flexible actions during the control of the virtual pet performing the first behavior, improve the authenticity, flexibility and interestingness of the virtual pet interaction, and further improve the interface display effect and the interaction effect of the virtual pet, and meet the emotional value of the user.

[0010] In yet another scenario, the virtual pet and the target UI element are in different layers before the virtual pet performs the first behavior, and the first electronic device can control the virtual pet to switch to the layer of the target UI element during the control of the virtual pet performing the first behavior. In this scenario, during the control of the virtual pet performing the first behavior by the first electronic device, the virtual pet and the target UI element are in the same layer in some stages and are not in the same layer in some stages.

[0011] In other scenarios, the virtual pet is in a different layer from the target UI element before performing the first behavior, and the first electronic device can further control the virtual pet to switch to the layer of the target UI element when the control of the virtual pet to perform the first behavior ends. The solution in this scenario can be applicable to some non-contact interactions, such as: the virtual pet does not contact the target UI element during the entire process of performing the first behavior.

[0012] In a possible design, when the control of the virtual pet to perform the first behavior ends, the display area of the virtual pet on the display screen and the display area of the target UI element on the display screen have an overlapping part. In this way, when the control of the virtual pet to perform the first behavior ends, the virtual pet and the target UI element have an overlapping part in the display area on the display screen, such as: the virtual pet lies on the target UI element, or the virtual pet pokes from behind the target UI element. The effect of the virtual pet performing such a contact interaction can be implemented, and the authenticity, flexibility and interestingness of the virtual pet interaction can be improved, thereby improving the interface display effect and the interaction effect of the virtual pet, and meeting the emotional value of the user.

[0013] In a possible design, the first event includes at least one of appearing on the display screen, changing in a display position on the display screen, changing in a display form on the display screen, or changing in contained content. In this way, when the target UI element appears on the display screen, changes in a display position, changes in a display form, or changes in contained content, the virtual pet can perform a corresponding behavior, and a corresponding interaction effect can be implemented, thereby improving the authenticity, flexibility and interestingness of the virtual pet interaction, improving the interface display effect and the interaction effect of the virtual pet, and meeting the emotional value of the user.

[0014] In a possible design, the control of the virtual pet to perform the first behavior in response to the first event includes: in response to the target UI element being displayed in a first area on the display screen, the virtual pet is controlled to be displayed in a second area on the display screen, the first area being different from the second area. The first area being different from the second area can mean that the first area and the second area have no overlapping area. Alternatively, the virtual pet can be displayed in the first area or not displayed in the first area before being moved. In this way, when the target UI element is displayed in a certain area, the virtual pet is controlled to be displayed in another area, and the effect of the virtual pet avoiding the target UI element or following the target UI element to move can be implemented.

[0015] In a possible design, the first area on the display screen where the target UI element is displayed, and the second area on the display screen where the virtual pet is controlled to display, are different. In this way, when the target UI element is displayed in one area and then moves to another area, the virtual pet is controlled to display in the other area, so that the effect of following or avoiding the target UI element can be achieved.

[0016] In a possible design, the first behavior of the virtual pet is controlled to be performed in response to the first event, including: the virtual pet is controlled to display in an area adjacent to or overlapping with a display area of the target UI element in response to the target UI element appearing on the display screen; or, the target UI element is used to show progress of an application activity, and the virtual pet is controlled to display in an area adjacent to or overlapping with a display area of the target UI element in response to the application activity shown by the target UI element meeting a preset progress. In this way, when the target UI element appears on the display screen, the virtual pet is controlled to display in an area adjacent to or overlapping with the target UI element, so that the effect of reminding interaction with the UI element can be achieved. Alternatively, when the application activity shown by the target UI element meets a preset progress, such as when an order is about to be delivered, the virtual pet is controlled to display in an area adjacent to or overlapping with the target UI element, so that the effect of reminding the progress of the application activity can be achieved.

[0017] In a possible design, the target UI element is generated based on at least one of system information, first electronic device information, environment information, and user information, where the system information is related to a system activity of the first electronic device, the first electronic device information is related to a state of the first electronic device, the environment information is related to a surrounding environment of the first electronic device, and the user information is related to a user. In this way, the target UI element can be generated based on information related to a system activity of the electronic device, information related to a state of the electronic device, information related to a surrounding environment of the electronic device, and information related to a user, so that the virtual pet can indirectly interact with the system activity, the state of the electronic device, the surrounding environment of the electronic device, and the user, and the authenticity, flexibility, and interest of the interaction of the virtual pet can be improved, so that the interface display effect and the interaction effect of the virtual pet can be improved, and the emotional value of the user can be met.

[0018] In a possible design, the target UI element includes one or more of an application icon and a card, and the card includes one or more of a notification message and a live window.

[0019] In a possible design, the method further includes: in response to the running interface of the first application being switched from the first interface to a second interface, the virtual pet is displayed on a blank area of the second interface by the first interface. In this way, when the running interface of an application is switched, the virtual pet can be controlled to follow the interface switching and be displayed, for example, the first application can be a desktop application, which can enable the virtual pet to be always present on the desktop, so that the user can always see the virtual pet, and the virtual pet can be present on the blank area on the desktop, which can avoid blocking other elements on the desktop, thereby improving the interface display effect and the interaction effect of the virtual pet.

[0020] In a possible design, the method further includes: controlling the virtual pet to present a first image on the display screen based on first information, the first image corresponding to the first information; and / or, controlling the virtual pet to perform a second behavior based on the first information; wherein the first information includes at least one of first electronic device information, environment information, and user information, the first electronic device information is related to a state of the first electronic device, the environment information is related to a surrounding environment in which the first electronic device is located, and the user information is related to a user. In this way, the electronic device can also control the virtual pet to present a corresponding image or perform a corresponding behavior based on information related to the state of the electronic device, information related to the surrounding environment of the electronic device, and information related to the user, which can realize the interaction between the virtual pet and the information, improve the authenticity, flexibility, and interestingness of the virtual pet interaction, and meet the emotional value of the user.

[0021] In a possible design, different first information corresponds to different first images; or, different first information corresponds to different second behaviors. In this way, different information corresponds to different images of the virtual pet or different behaviors performed by the virtual pet, which can make the interaction effect of the virtual pet more rich, improve the authenticity, flexibility, and interestingness of the virtual pet interaction, thereby improving the interface display effect and the interaction effect of the virtual pet, and meeting the emotional value of the user.

[0022] In a possible design, the first electronic device information includes a state of the first electronic device; or, the environment information includes a state of a surrounding environment in which the first electronic device is located; or, the user information includes at least one of a user state, a user activity, and a user operation.

[0023] In a possible design, the controlling the virtual pet to present a first image on the display screen based on the first information includes: the first information indicates that the first electronic device is in a snowy weather, and the virtual pet is controlled to present a snowing image on the display screen; or, the first information indicates that air flow around the first electronic device flows, and the virtual pet is controlled to present a hair-raising image on the display screen; or, the first information indicates a user's birthday, and the virtual pet is controlled to present a birthday celebration image on the display screen; or, the first information indicates that the user is listening to music, and the virtual pet is controlled to present a music listening image on the display screen; and the snowing image, the hair-raising image, the birthday celebration image and the music listening image are different.

[0024] In a possible design, the controlling the virtual pet to perform a second behavior based on the first information includes: the first information indicates that the first electronic device is in a snowy weather, and the virtual pet is controlled to play with snow on the display screen; or, the first information indicates that the first electronic device is tilted or shaken, and the virtual pet is controlled to move a display position on the display screen; or, the first information indicates a user's birthday, and the virtual pet is controlled to send birthday greetings to the user on the display screen; or, the first information indicates that the user is listening to music, and the virtual pet is controlled to shake on the display screen; or, the first information indicates that the user's gaze is fixed, and the virtual pet is controlled to interact with the user's gaze on the display screen.

[0025] In a possible design, the behaviors performed by the virtual pet at different times are the same as those of a real pet corresponding to the virtual pet. In this way, the behaviors performed by the virtual pet at different times are the same as those of the real pet, so that the personality characteristics of the virtual pet are consistent with those of the real pet, and the virtual pet is more consistent with the real pet, and the emotional value of the user can be met.

[0026] In a possible design, the virtual pet is generated based on an image of a real pet. In this way, the virtual pet corresponding to the user is generated based on the real pet of the user, so that the virtual pet and the real pet have a similarity, the virtual pet is equivalent to a clone of the real pet, the emotional connection between the virtual pet and the user can be increased, and the user stickiness can be improved.

[0027] In a possible design, the images of the virtual pets generated based on the images of the real pets in different images are different. In this way, the image of the virtual pet is consistent with that of the real pet, and the image of the virtual pet is more diverse, and the effect of thousands of people with thousands of faces can be achieved.

[0028] In a possible design, the different real pets include real pets at different ages. In this way, the images of the real pets at different ages are different, and the images of the generated virtual pets are different, which can enable the image of the virtual pet to be updated according to the growth of the real pet, so that the virtual pet is equivalent to a virtual pet of the real pet, can increase the emotional connection with the user, and improve the user stickiness.

[0029] In a possible design, the method further includes: in a case where the first electronic device establishes a connection with a second electronic device, controlling the virtual pet to move out of the display screen of the first electronic device, and sending a synchronization message to the second electronic device, where the synchronization message is used to instruct the second electronic device to display the virtual pet. In this way, the virtual pet on one electronic device can move to another electronic device to be displayed, and cross-device interaction of the virtual pet can be implemented.

[0030] In a possible design, the controlling, in a case where the first electronic device establishes a connection with the second electronic device, the virtual pet to move out of the display screen of the first electronic device includes: in a case where the first electronic device establishes a connection with the second electronic device, and the first electronic device is turned off and the second electronic device is turned on, controlling the virtual pet to move out of the display screen of the first electronic device. In this way, when the first electronic device is turned off and the second electronic device is turned on, the first electronic device controls the virtual pet to move from the first electronic device to the display screen of the second electronic device, so that the cross-device interaction effect is better.

[0031] In a possible design, the method further includes: in a case where the first electronic device establishes a connection with a third electronic device, controlling the virtual pet on the first electronic device to interact with the virtual pet on the third electronic device. In this way, the virtual pets on different electronic devices can also interact with each other.

[0032] In a possible design, the controlling, in a case where the first electronic device establishes a connection with the third electronic device, the virtual pet on the first electronic device to interact with the virtual pet on the third electronic device includes: in a case where the first electronic device establishes a connection with the third electronic device and the first electronic device and the third electronic device are close to each other, controlling the virtual pet on the first electronic device to interact with the virtual pet on the third electronic device. In this way, when different electronic devices establish a connection and are close to each other, the virtual pets on the different electronic devices interact with each other, and the interaction effect is improved.

[0033] In a possible design, the method further includes: in a case where the first electronic device establishes a connection with a fourth electronic device, controlling a target virtual pet to move onto the display screen and display, the target virtual pet being a virtual pet set on the fourth electronic device; and controlling the target virtual pet to interact with the virtual pet on the display screen. In this way, virtual pets on different electronic devices can also move onto the same electronic device to interact.

[0034] In a possible design, a rendering performance of the first electronic device is greater than or equal to a preset performance, and in a case where the target virtual pet is controlled to move onto the display screen and display, the target virtual pet is rendered by the first electronic device; or the rendering performance of the first electronic device is less than the preset performance, and in a case where the target virtual pet is controlled to move onto the display screen and display, the target virtual pet is rendered by the fourth electronic device. In this way, when a virtual pet moves from one electronic device to another electronic device to display, the rendering of the virtual pet can be performed by the other electronic device based on a rendering performance of the other electronic device, and the rendering effect can be ensured.

[0035] In a possible design, the controlling the virtual pet to perform the first behavior in response to the first event includes: in response to the first event, determining a target skeletal animation clip corresponding to the first behavior, the target skeletal animation clip being one or more of skeletal animation clips corresponding to the virtual pet, each of the skeletal animation clips corresponding to a part of a body of the virtual pet; and controlling the target skeletal animation clip to move, so that the virtual pet performs the first behavior. In this way, the skeletal animation clip corresponding to the behavior to be performed by the virtual pet is determined first, and each skeletal animation clip corresponds to a part of the body of the virtual pet, and the virtual pet can be controlled to perform the corresponding behavior by controlling the movement of the skeletal animation clip. In this way, the movement of the virtual pet is controlled by using the skeletal animation, and the virtual pet can perform another action while the previous action is not completed, for example, the virtual pet can perform another action such as playing a ball while performing an eating action. Compared with the interaction mode of playing a preset virtual pet animation, the virtual pet can respond to the interaction of the user in time and the interaction flexibility and interest can be improved by using the skeletal animation to control the virtual pet.

[0036] In a possible design, the first behavior includes at least one action, and the determining the target skeletal animation clip corresponding to the first behavior includes: determining a target skeletal animation clip corresponding to each action in the at least one action. In this way, one behavior can be composed of one or more actions, the skeletal animation clip corresponding to each action is determined, and then the target skeletal animation clip is controlled to move to perform each action, and the effect of performing the first behavior can be achieved.

[0037] In a possible design, the determining of the target skeletal animation clip corresponding to each of the at least one action comprises: determining the target skeletal animation clip based on the each of the at least one action and a preset mapping relationship, the preset mapping relationship being a correspondence between actions and skeletal animation clips. In this way, the skeletal animation clip corresponding to each of the at least one action can be determined based on the correspondence between actions and skeletal animation clips, and thus the skeletal animation required for performing a certain behavior can be implemented.

[0038] In a possible design, the controlling of the movement of the target skeletal animation clip comprises: changing a position and an orientation of the target skeletal animation clip.

[0039] In a possible design, the at least one action comprises one or more of running, jumping, laughing, grinning, shaking hands, showing teeth, wagging tail, scratching, clapping, lying, rolling, eating, sticking out tongue, and sneezing.

[0040] In a second aspect, a virtual pet interaction method is provided, and the method is applied to a first electronic device with a display screen, and the method comprises: displaying a first interface, the first interface comprising a target UI element; detecting that the target UI element triggers a first event; in response to the first event, controlling a virtual pet to perform a first behavior.

[0041] In a possible design, when the controlling of the virtual pet to perform the first behavior ends, the virtual pet is in the same layer as the target UI element.

[0042] In a third aspect, a virtual pet interaction method is provided, and the method is applied to a second electronic device with a display screen, and the method comprises: the second electronic device establishes a connection with a first electronic device, and the first electronic device is provided with a first virtual pet; in response to the connection, controlling the first virtual pet to move onto the display screen and be displayed.

[0043] In a possible design, the controlling of the first virtual pet to move onto the display screen and be displayed in response to the connection comprises: in response to the connection, and when the first electronic device is turned off and the second electronic device is turned on, controlling the first virtual pet to move onto the display screen and be displayed.

[0044] In a possible design, the rendering performance of the second electronic device is greater than or equal to a preset performance, and when the first virtual pet is controlled to move onto the display screen and be displayed, the first virtual pet is rendered by the second electronic device; or, the rendering performance of the second electronic device is less than the preset performance, and when the first virtual pet is controlled to move onto the display screen and be displayed, the first virtual pet is rendered by the first electronic device.

[0045] In a possible design, the second electronic device further displays a second virtual pet on the display screen; after the first virtual pet is controlled to move onto the display screen, the method further includes: controlling the first virtual pet to interact with the second virtual pet on the display screen.

[0046] In a possible design, the second virtual pet is a virtual pet that is moved onto the display screen of the second electronic device from a third electronic device.

[0047] In a fourth aspect, a virtual pet interaction method is provided, and the method is applied to a first electronic device with a display screen, and the method includes: establishing a connection between the first electronic device and a second electronic device, and a first virtual pet is arranged on the first electronic device; in response to the connection, the first virtual pet is controlled to move out of the display screen, and a synchronization message is sent to the second electronic device, where the synchronization message is used to instruct the second electronic device to display the virtual pet.

[0048] In a fifth aspect, a virtual pet interaction method is provided, and the method is applied to an electronic device with a display screen, and the method includes: determining a target bone animation clip corresponding to a first behavior to be performed by a virtual pet on the electronic device, the target bone animation clip being one or more of bone animation clips corresponding to the virtual pet, and each of the bone animation clips corresponding to the virtual pet corresponding to a part of a body of the virtual pet; and controlling the target bone animation clip to move, so that the virtual pet performs the first behavior.

[0049] In a possible design, the first behavior includes at least one action, and the determining of the target bone animation clip corresponding to the first behavior to be performed by the virtual pet on the electronic device includes: determining a target bone animation clip corresponding to each action in the at least one action.

[0050] In a possible design, the determining of the target bone animation clip corresponding to each action in the at least one action includes: determining the target bone animation clip based on the each action and a preset mapping relationship, where the preset mapping relationship is a corresponding relationship between actions and bone animation clips.

[0051] In a sixth aspect, an electronic device is provided, which has a function of implementing the method in any design in any of the above first aspect to fourth aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0052] In a seventh aspect, an electronic device is provided, including a processor, a display screen, and a memory, the memory, the display screen, and the processor being coupled, the memory being configured to store program code including instructions, the processor being configured to read the instructions from the memory to cause the electronic device to perform the method according to any one of the first aspect to the fourth aspect.

[0053] In a possible design of the electronic device, the electronic device further includes a communication interface, which can be configured to enable the electronic device to communicate with other devices (e.g., a server). For example, the communication interface can be a transceiver, an input / output interface, an interface circuit, an output circuit, an input circuit, a pin, or a related circuit.

[0054] In an eighth aspect, a computer-readable storage medium is provided, including a computer program, which, when executed on an electronic device, causes the electronic device to perform the method according to any one of the first aspect to the fourth aspect.

[0055] In a ninth aspect, a computer program product is provided, including a computer program or instructions, which, when executed on a computer, causes the computer to perform the method according to any one of the first aspect to the fourth aspect.

[0056] In a tenth aspect, a chip system is provided, including at least one processor and at least one interface circuit, the at least one interface circuit being configured to perform a transceiving function and send instructions to the at least one processor, and when the at least one processor executes the instructions, the at least one processor performs the method according to any one of the first aspect to the fourth aspect.

[0057] In an eleventh aspect, a communication system is provided, including a first electronic device and a second electronic device, or a first electronic device and a third electronic device, or a first electronic device and a fourth electronic device, or a first electronic device, a second electronic device, and a third electronic device, and the electronic devices are configured to implement the method according to the corresponding aspect and the corresponding design.

[0058] It should be noted that the technical effects brought by any one of the designs of the second aspect to the eleventh aspect can be referred to the technical effects brought by the corresponding design of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0059] FIG. 1 is a schematic diagram of a pet image pre-stored in an electronic device according to an embodiment of the present application;

[0060] FIG. 2 is a structural schematic diagram of an electronic device according to an embodiment of the present application;

[0061] FIG. 3 is a structural schematic diagram of another electronic device according to an embodiment of the present application;

[0062] FIG. 4 is a schematic diagram of a scenario of starting a virtual pet function according to an embodiment of the present application;

[0063] FIG. 5 is a schematic diagram of an interface of a user album according to an embodiment of the present application;

[0064] FIG. 6 is a schematic diagram of a process of generating a virtual pet according to an embodiment of the present application;

[0065] FIG. 7a is a schematic diagram of another process of generating a virtual pet according to an embodiment of the present application;

[0066] FIG. 7b is a schematic diagram of a virtual pet generated based on images of real pets at different age stages according to an embodiment of the present application;

[0067] FIG. 8 is a schematic diagram of a skeletal animation slice according to an embodiment of the present application;

[0068] FIG. 9 is a schematic diagram of personality characteristics of a kitten according to an embodiment of the present application;

[0069] FIG. 10 is a schematic diagram of a virtual pet according to an embodiment of the present application;

[0070] FIG. 11 is a schematic diagram of interaction between a virtual pet and a user according to an embodiment of the present application;

[0071] FIG. 12 is a schematic diagram of eye contact interaction between a virtual pet and a user according to an embodiment of the present application;

[0072] FIG. 13 is a schematic diagram of a virtual pet catching a butterfly according to an embodiment of the present application;

[0073] FIG. 14 is a schematic diagram of a virtual pet avoiding an application icon according to an embodiment of the present application;

[0074] FIG. 15 is a schematic diagram of a virtual pet avoiding a card according to an embodiment of the present application;

[0075] FIG. 16 is a schematic diagram of a virtual pet reminding a notification message according to an embodiment of the present application;

[0076] FIG. 17 is a schematic diagram of a virtual pet reminding a live window according to an embodiment of the present application;

[0077] FIG. 18 is a schematic diagram of a virtual pet following a desktop according to an embodiment of the present application;

[0078] FIG. 19 is a schematic diagram of a virtual pet performing animation according to a posture of a device according to an embodiment of the present application;

[0079] FIG. 20 is a schematic diagram of a virtual pet interacting with an environment in which a device is located according to an embodiment of the present application;

[0080] FIG. 21 is a schematic diagram of a virtual pet performing cross-device flow according to an embodiment of the present application;

[0081] FIG. 22 is a schematic diagram of another virtual pet performing cross-device flow according to an embodiment of the present application;

[0082] FIG. 23 is a schematic diagram of a software structure of an electronic device according to an embodiment of the present application;

[0083] FIG. 24 is a schematic diagram of a method flow of a virtual pet performing cross-device interaction according to an embodiment of the present application;

[0084] FIG. 25 is a schematic diagram of another virtual pet performing cross-device flow according to an embodiment of the present application;

[0085] FIG. 26 is a schematic diagram of an effect of virtual pets on different electronic devices interacting with each other according to an embodiment of the present application;

[0086] FIG. 27 is a schematic diagram of a method flow of a virtual pet interacting according to an embodiment of the present application;

[0087] FIG. 28 is a schematic diagram of another structure of an electronic device according to an embodiment of the present application;

[0088] FIG. 29 is a schematic diagram of a structure of a chip system according to an embodiment of the present application. DETAILED DESCRIPTION

[0089] In the description of the present application, unless otherwise specified, " / " represents that the objects before and after the " / " are in an "or" relationship, for example, A / B can represent A or B; "and / or" in the present application is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent: A alone, A and B together, B alone, where A, B can be singular or plural.

[0090] In the description of the present application, unless otherwise specified, "multiple" means two or more than two. "At least one of the following" or the like means any combination of the items, including any combination of single item or multiple items. For example, at least one of a, b, or c, can represent: a, b, c, a and b, a and c, b and c, a and b and c, where a, b, c can be single or multiple.

[0091] In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the terms "first", "second", etc. are used to distinguish the same or similar items with basically the same function and role. Those skilled in the art can understand that the terms "first", "second", etc. do not limit the quantity and execution order, and the terms "first", "second", etc. also do not necessarily mean different.

[0092] Currently, the image of a virtual pet (or electronic pet, digital pet, etc.) presented on an electronic device is pre-stored in the electronic device. For example, FIG. 1 shows some examples of pet images pre-stored in an electronic device. As shown in (1) to (3) of FIG. 1, a puppy image presented on a folding screen outer screen, as shown in (4) to (6) of FIG. 1, a kitten image presented on a folding screen outer screen, as shown in (7) of FIG. 1, a parrot image presented on a folding screen outer screen, as shown in (8) of FIG. 1, an animated puppy image presented on a watch, etc. The effect of the user interacting with these pre-stored virtual pets is achieved by playing pre-stored animation frames. For example, the electronic device can pre-store animation frames that achieve the interaction effect, the user can perform a click or other interaction operation on the virtual pet on the display screen, and in response to the operation, the electronic device can play the animation frame corresponding to the operation (for example, a 3-second puppy playing ball animation).

[0093] The image of the virtual pet pre-stored in the electronic device is not related to the image of the pet actually raised by the user, and the emotional connection with the user is weak. Using the method of playing pre-stored virtual pet animations to achieve interaction with the user will lose user stickiness after a few plays, the interaction method is relatively single and lacks authenticity. Moreover, when the current animation has not finished playing, the next animation cannot be played. At this time, if the electronic device receives other interaction operations performed by the user at the time of playing the previous animation, the electronic device will continue to play the next animation corresponding to the other interaction operation after the previous animation is played, which makes the virtual pet unable to respond to the user's interaction in a timely manner, making the interaction effect poor, lacking flexibility and interest.

[0094] Therefore, the embodiments of the present application provide a virtual pet interaction method, which can improve the authenticity, flexibility and interest of virtual pet interaction, and meet the emotional value of the user.

[0095] The technical solutions provided by the embodiments of the present application can be applied to an electronic device 200 or a system comprising the electronic device 200.

[0096] Exemplarily, the electronic device 200 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, and / or a smart city device, and the specific type of the electronic device is not specially limited in the embodiments of the present application.

[0097] As shown in FIG. 2, the electronic device 200 can include a processor 210, a memory 220, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a sensor module 280, a key 290, a camera 291, a display screen 292, and the like.

[0098] The processor 210 can include one or more processing units, for example: the processor 210 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), and the like. Among them, different processing units can be independent devices, or can be integrated in one or more processors.

[0099] The controller can generate operation control signals according to instruction operation codes and timing signals to complete the control of fetching and executing instructions.

[0100] The processor 210 can also include a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory can hold instructions or data that the processor 210 has recently used or has used frequently. If the processor 210 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the processor 210, thereby improving the efficiency of the system.

[0101] In some embodiments, the processor 210 can include one or more interfaces, such as a USB interface 230.

[0102] In some embodiments of the present application, the processor 210 can be used to generate a virtual pet and can also be used to control the virtual pet to interact.

[0103] The memory 220 can be used to store computer executable program codes, which include instructions. The memory 220 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application required by a function (such as an image playing function, etc.), and the like. The data storage area can store data created during the use of the electronic device 200, etc. In addition, the memory 220 can include a high-speed random access memory and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 210 executes various functional applications and data processing of the electronic device 200 by running the instructions stored in the memory 220 and / or the instructions stored in the memory disposed in the processor.

[0104] In some embodiments of the present application, the memory 220 can also be used to store photos, videos, etc. of a real pet taken, which can be used to generate a virtual pet.

[0105] In yet some embodiments of the present application, the memory 220 can be used to store a preset image of a virtual pet, which can be used to generate a virtual pet suitable for different users.

[0106] In yet some embodiments of the present application, the memory 220 can also be used to store a mapping relationship between a skeletal animation clip and an action, which can be used to control the virtual pet to perform various actions and thus realize various interaction effects of the virtual pet.

[0107] The charging management module 240 is used to receive a charging input from a charger. The charging management module 240 can charge the battery 242 and also supply power to the electronic device through the power management module 241.

[0108] The power management module 241 is configured to connect the battery 242 and the charging management module 240 to the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240 to power the processor 210, the memory 220, the display screen 292, the camera 291, the wireless communication module 260, and the like.

[0109] The wireless communication function of the electronic device 200 can be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor, and the baseband processor, and the like.

[0110] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals.

[0111] The mobile communication module 250 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, and the like, which is applied to the electronic device 200.

[0112] The wireless communication module 260 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, and the like, which is applied to the electronic device 200.

[0113] In some embodiments, the antenna 1 and the mobile communication module 250 of the electronic device 200 are coupled, and the antenna 2 and the wireless communication module 260 are coupled, so that the electronic device 200 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include global positioning system (GPS), global navigation satellite system (GLONASS), beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS).

[0114] In some embodiments of the present application, the wireless communication module 260 can be used to connect with other electronic devices to achieve cross-device interaction of virtual pets.

[0115] The audio module 270 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal.

[0116] The sensor module 280 includes a gyro sensor 280A, an air flow sensor 280B, an acceleration sensor 280C, etc.

[0117] The gyro sensor 180B can be used to determine the motion posture of the electronic device 200. In some embodiments, the angular velocity of the electronic device 200 around three axes (i.e., x, y and z axes) can be determined by the gyro sensor 180B.

[0118] The air flow sensor 280B can be used to measure parameters of the air flow (such as speed, direction, turbulence level, etc.) to sense the flow of the air flow.

[0119] The acceleration sensor 280C can be used to detect the magnitude of the acceleration of the electronic device 200 in various directions (generally three axes). When the electronic device 200 is stationary, the magnitude and direction of gravity can be detected.

[0120] The keys 290 include a power key, a volume key, etc. The keys 290 can be mechanical keys. They can also be touch keys.

[0121] The electronic device 200 can implement a photographing function through an ISP, the camera 291, a video codec, a GPU, the display screen 292, and an application processor, etc.

[0122] The camera 291 is used to capture still images or videos. In some embodiments, the electronic device 200 can include one or N cameras 291, N being a positive integer greater than 1.

[0123] In some embodiments of the present application, the camera 291 can be used to take photos, videos, etc. of real pets.

[0124] The electronic device 200 implements a display function through a GPU, the display screen 292, and an application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 292 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 can include one or more GPUs that execute program instructions to generate or change display information.

[0125] The display screen 292 is used to display images, videos, etc. The display screen 292 includes a display panel. In some embodiments, the electronic device 200 can include one or N display screens 292, N being a positive integer greater than 1.

[0126] In some embodiments of the present application, the display screen 292 can be used to display virtual pets, various interactive effects of virtual pets.

[0127] The software system of the electronic device 200 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. Embodiments of the present application take a layered architecture as an example to exemplarily illustrate the software structure of the electronic device 200.

[0128] FIG. 3 is a schematic diagram of the software structure of the electronic device 200 according to an embodiment of the present application.

[0129] ​The layered architecture divides software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the electronic device 200 can include three layers, from top to bottom, an application layer, an application framework layer, and a system service layer. It can be understood that the division of the layers shown in FIG. 3 and the modules included in each layer are only exemplary, and in actual application, there can be differences, such as: the virtual pet service can also be located in the application framework layer, etc.

[0130] The application layer includes a series of application packages, such as system applications, third-party applications, etc. The system applications can include, but are not limited to, calendar applications, music applications, desktop applications, notification applications, and various system pre-installed application programs.

[0131] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some pre-defined functions.

[0132] As shown in FIG. 3, the application framework layer can include ArkUI, javascript API (JS API), etc. ArkUI can provide application developers with infrastructure for developing user interfaces (UIs), such as the basic components (such as various UI controls such as buttons, lists, etc.) shown in FIG. 3, display animations (animation design and effect rendering), etc. It can also provide view layout (such as placing and arranging various components), interaction event handling (such as clicking and sliding), and corresponding programming languages and programming models, etc.

[0133] In some embodiments of the present application, ArkUI can also be used to provide a virtual pet advanced component (or control), which can be used to implement the display of a virtual pet and various interactive effects of the virtual pet. For example, the virtual pet advanced component can include a virtual pet component. Optionally, the virtual pet component can also include various accessories that can be used in cooperation with the virtual pet component to achieve various interactive effects of the virtual pet. For example, the accessories can include, but are not limited to, electronic products (such as earphones, mobile phones, watches, tablets, etc.), hats (such as ski hats, party hats, baseball caps, swimming caps, etc.), clothes (such as raincoats, swimsuits, etc.), shoes (such as snowshoes, snow boots, slippers, sports shoes, running shoes, etc.), vehicles (such as bicycles, cars, tricycles, etc.), sports equipment (such as snowboards, trekking poles), furniture (such as sofas, beds, coffee tables, etc.), pet toys (such as dolls, tennis balls, chew ropes, frisbees, chew toys, etc.), pet food (such as pet food, pet snacks, etc.), pet utensils (such as pet bowls), pet resting tools (such as pet cages, cat litter, etc.), and the like, which can be components corresponding to the images of various objects in real life.

[0134] The JS API can be used to provide APIs written in the JavaScript language. Optionally, these APIs can be integrated into a software development kit (SDK).

[0135] The system service layer includes a series of services, such as a virtual pet service and a rendering service. The virtual pet service can be used to provide various services related to virtual pets to the application layer to implement the display of a virtual pet and various interactive effects of the virtual pet in the embodiments of the present application. The virtual pet service can be called by system applications through a virtual pet advanced component and called by third-party applications through an SDK. The embodiments of the present application do not limit the way in which the virtual pet service is called by an application.

[0136] The virtual pet service can include virtual pet management, multi-device communication, resource loading, data processing, bone analysis, texture binding, and animation analysis. The virtual pet management can be used to manage the state of a virtual pet and the execution of a virtual pet bone animation. For more information about bone animation, please refer to the description below. The multi-device communication can be used to implement communication between devices to achieve cross-device interaction of a virtual pet. The resource loading can be used to load various resources required to implement a virtual pet bone animation, such as bone resources, skin texture resources, and animation resources. The data processing can be used to process data for cross-device communication, such as synchronization messages. The bone analysis can be used to analyze bone resources of a bone animation. The texture binding can be used to bind skin textures of a bone animation. The animation analysis can be used to analyze animation resources of a bone animation. The Run Time can be used to schedule and manage bone analysis, texture binding, and animation analysis.

[0137] The rendering service can be used for image rendering, compositing, layer processing, etc. to realize various interactive effects of the virtual pet. For example, the rendering service can include a physics engine, a particle engine, a 2D engine, a 3D engine, etc. The physics engine can be used to calculate motion, rotation and collision reaction by giving various components real physical properties. The particle engine can be used to calculate motion, rotation and collision reaction by giving various components real particle properties. The 2D engine is a drawing engine for 2D drawing. The 3D engine is a drawing engine for 3D drawing.

[0138] It can be understood that the structures shown in FIG. 2 and FIG. 3 do not constitute a specific limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0139] The technical solutions provided in the embodiments of the present application can be implemented in a device having a structure as shown in FIG. 2 and FIG. 3. In the following, taking a mobile phone as an example of the electronic device, the technical solutions provided in the embodiments of the present application are introduced.

[0140] The embodiments of the present application provide a virtual pet, which can be generated based on a real pet of a user. In this way, a corresponding virtual pet is generated for the user based on the real pet of the user, so that there is a similarity between the virtual pet and the real pet, the virtual pet is equivalent to a duplicate of the real pet, and the emotional connection between the user and the virtual pet can be increased, and the user stickiness can be improved.

[0141] In some embodiments, the virtual pet can be generated based on an image of the real pet. Optionally, the image of the real pet can be a photo, a video, etc. of the real pet taken. In some examples, after the user starts the virtual pet function of the user, in response to the starting operation, the mobile phone can generate the virtual pet based on the image of the real pet, and present the virtual pet on the display screen. Taking an example in which the user starts the virtual pet function through a setting application, as shown in (1) of FIG. 4, the mobile phone can display a running interface 400 of the setting application, wherein one or more options are included in the running interface 400, and each option can perform different settings. For example, the one or more options include a desktop, an external screen and a personalization option 401, and the user can start the virtual pet function through the option.

[0142] As the user can perform an operation such as clicking on the desktop, the outer screen, and the personalized option 401, the phone can display one or more cards implementing the personalized settings of the desktop, the outer screen, and the like, such as a theme card, a screen-off display card, a pet card 411, and the like, as shown in the interface 410 in (2) of FIG. 4. The user can start the virtual pet function through the pet card 411. As the phone detects an operation such as the user clicking on the pet card 411, the phone can display a function button 421 included in the interface 420 shown in (3) of FIG. 4 in response to the operation. As the phone detects an operation such as the user starting the function button 421, the phone starts the virtual pet function in response to the operation.

[0143] Of course, the user can also start the virtual pet function in other ways, such as through a service card on the desktop, and the like. The embodiments of the present application do not make specific limitations thereto.

[0144] In some embodiments, the phone can not store a virtual pet when starting the virtual pet function for the first time. Therefore, to facilitate the virtual pet being presented on the display screen of the phone after the virtual pet function is started, the phone can generate a virtual pet based on an image of a real pet when starting the virtual pet function for the first time. Of course, when the phone starts the virtual pet function for the first time, the phone or other devices (such as the cloud, and the like) can have stored a virtual pet. In this case, the phone can not need to perform the aforementioned process of generating a virtual pet based on an image of a real pet when starting the virtual pet function. Alternatively, in some scenarios, because the time since the last start of the phone is relatively long, the image of the real pet can have changed. In this case, the phone can also perform the aforementioned process of generating a virtual pet based on an image of a real pet.

[0145] When the phone starts the virtual pet function, the phone can first obtain an image of a real pet. The image of the real pet can be selected by the user or automatically identified by the phone. For example, the phone can request the user to authorize access to the photo album of the user. In the case of obtaining the authorization of the user, in some examples, the phone can present the photos, videos, and the like included in the photo album of the user, as shown in FIG. 5. The user can select some or all of the photos, videos, and the like of the real pet from the photos, videos, and the like shown in FIG. 5, and the phone can generate a virtual pet based on the photos, videos, and the like of the real pet selected by the user.

[0146] In some examples, the phone can automatically identify the photos and / or videos of the real pet from the photos and / or videos stored in the user album, and then generate the virtual pet based on the identified photos and / or videos of the real pet. It can be understood that the user album can only store the photos and / or videos of the real pet, or can also store other photos and / or videos. The phone can obtain the permission to access all the photos and / or videos in the user album, or can obtain the permission to access part of the photos and / or videos in the user album, such as the permission to access only the photos and / or videos of the real pet.

[0147] The above examples are based on the case that the user album has stored the photos and / or videos of the real pet when the phone accesses the user album. In other examples, the user album can not store any photos and / or videos of the real pet, and the phone can also remind the user to take some photos and / or videos of the real pet.

[0148] It can be understood that the above examples are based on the case that the phone obtains the photos and / or videos of the real pet from the album in the system for generating the virtual pet. In other examples, the phone can also obtain the photos and / or videos of the real pet from other devices, and the embodiments of the present application do not limit the specific location of the phone to obtain the photos and / or videos of the real pet.

[0149] Then, after the phone obtains the photos and / or videos of the real pet by the above method, the phone can generate the virtual pet based on the obtained photos and / or videos of the real pet. It can be understood that the embodiments of the present application are based on the case that the phone generates the virtual pet by itself, and in other embodiments, the operation of generating the virtual pet can also be performed by other devices, and the other devices send the generated virtual pet to the phone.

[0150] In some embodiments, the phone can generate the virtual pet based on the preset virtual pet image and the photos and / or videos of the real pet. The preset virtual pet image can be a virtual pet image designed in advance based on the real pet. The preset virtual pet image can have preset external characteristics (such as various external characteristics including but not limited to face shape, pattern, hair length, ear length, leg length, body length, tail length, etc., or appearance characteristics). For example, according to the classification (or breed category) of the real pet, Table 1 shows some examples of preset virtual pet images of different categories provided by the embodiments of the present application.

[0151] Table 1

[0152] It can be understood that Table 1 is only some exemplary descriptions made for the convenience of understanding, and in actual application, more coarse-grained categories or more fine-grained categories of virtual pet images can be preset according to the classification of real pets, such as only presetting dog images without further subdividing large dog images, small dog images, special dog images, and the like. For example, cat images can also be preset as short-haired cat images, long-haired cat images, short-tailed cat images, and the like.

[0153] In this embodiment, as a specific implementation, the mobile phone can obtain the semantic data corresponding to the real pet by performing feature recognition on the images in the photos, videos, and the like of the real pet obtained by the mobile phone through artificial intelligence (AI) technology and the like. The semantic data can be used to determine the category of the real pet. For example, the semantic data can include one or more of the following features of the real pet, such as face shape, color, pattern, hair length, ear length, leg length, stretch, tail length, and the like. The mobile phone can generate a virtual pet based on the preset virtual pet images of different categories, the category of the real pet recognized, and the features of the real pet. For example, the mobile phone can first determine a virtual pet image of the same category as the real pet recognized, and then replace the features of the virtual pet image with the features of the real pet recognized, thereby generating a virtual pet. For example, as shown in FIG. 6, the mobile phone performs feature recognition on the image 600 of a Corgi through AI technology and the like, obtains the semantic data of the Corgi, determines that the category of the Corgi is a small dog image based on the semantic data, and further obtains the features of the Corgi. Then, the features of the small dog image included in the preset virtual pet images of different categories are replaced with the features of the Corgi, thereby obtaining a virtual pet 610 corresponding to the Corgi. It can be understood that only one image of the Corgi is shown in FIG. 6, but in actual application, the mobile phone can perform feature recognition based on multiple images through AI technology.

[0154] In some embodiments, the phone can also generate the virtual pet based on the photo, video of the real pet and a preset model. For example, the phone can directly input the image in the photo, video of the real pet into the preset model, and output the corresponding virtual pet through the preset model. Optionally, as shown in (1) of FIG. 7a, the preset model can be obtained by training the diffusion model with the image 700 of the real pet and a pet-specific feature library as training data. Of course, in actual training, the diffusion model can also be implemented as other machine learning models or neural network models. The pet-specific feature library is a database constructed to contain the appearance features of different real pets. Optionally, the pet-specific feature library can be constructed based on the image of the real pet combined with the vector quantization variational autoencoder (VQ-VAE) technology, of course, it can also be realized by other statistical methods.

[0155] Taking a cat as an example, as shown in (2) of FIG. 7a, after inputting the image 710 of the cat into the preset model, the virtual pet 720 corresponding to the cat can be output. It can be understood that only one image of the real pet is shown in (1) and (2) of FIG. 7a, but in actual application, multiple images can be implemented.

[0156] In some scenarios, the phone can obtain multiple photos, videos of different real pets due to various reasons such as the user may select multiple photos, videos of different real pets at the same time, or the user album may store multiple photos, videos of different real pets, etc. The multiple different real pets can be pets of different species (such as Cocker, Golden Retriever, Ragdoll, Hairless Cat, etc.), or pets of the same species but different appearance, and the virtual pets generated based on the images of the different pets (which can be referred to as virtual pets corresponding to the real pets) can be different. In this scenario, in order to be able to generate the virtual pet corresponding to the real pet, the phone can classify the obtained photos, videos of different real pets by image clustering, etc., so as to classify the photos, videos of the same real pet under the same real pet, and then generate the virtual pet corresponding to each real pet based on the photos, videos corresponding to each real pet. Optionally, when the phone generates multiple virtual pets at the same time, the phone can present one or more of the virtual pets at the same time.

[0157] In some scenarios, the appearance of the real pet can change, such as the real pet growing from a juvenile to an adult, or the pet owner dyeing or styling the hair of the real pet, etc. Any of the foregoing reasons can cause the appearance of the real pet to change. At this time, the phone can also update the corresponding virtual pet based on the changed appearance of the real pet, so that the appearance of the presented virtual pet can adapt to the changed virtual pet, further increasing the emotional connection of the user. For example, the phone can generate a virtual pet based on the image (such as a photo, a video, etc.) of the changed real pet. Illustratively, Figures 7b (1) to (4) show four examples of virtual pets generated based on images of real pets at different age stages, respectively, provided in an embodiment of the present application. Optionally, the operation of updating the virtual pet can be triggered by the user, or can be performed automatically by the phone. In the scenario where the phone performs the operation automatically, to ensure the user experience, the phone can also request authorization from the user before presenting the updated virtual pet, to determine whether to present the updated virtual pet. The present application does not limit the manner in which the phone triggers the update of the virtual appearance. Optionally, the image of the real pet used to update the virtual pet, such as the photo or video of the changed real pet, can be selected by the user, or can be automatically recognized by the phone using a manner such as that described above. The present application does not limit the manner in which the phone obtains the image of the changed real pet.

[0158] The generation process of the virtual pet is introduced above. The interactive effects of the virtual pet are introduced below.

[0159] In some embodiments, various interactive effects of the virtual pet can be achieved through skeletal animation. Skeletal animation is an animation technique based on a skeletal system, which can simulate the movement of a human body or other organisms, making the character more realistic and lively in animation. The core of skeletal animation is the skeletal system, which can include bones, joints, and controllers, which together form the skeletal architecture of the skeletal character. The bone is the skeleton of the character, the joint is used to connect different bones, and the controller is used to control the movement of the bone (such as changing the position and orientation of the bone). Through modeling and control of the skeletal system, various actions of the character can be achieved, such as walking, running, jumping, etc. Skeletal animation can be based on keyframe animation, which controls the movement of the character by setting keyframes. First, determine the key actions of the character in the animation sequence, then set the pose and expression of the character on these key actions to obtain keyframes, and automatically calculate the intermediate frames according to the keyframes, which can achieve smooth animation effects. Skeletal animation also involves skin binding technology, which binds the skin of the character to the skeletal system, so that the skin of the character can deform following the movement of the bone, and thus the character can present a realistic appearance in animation.

[0160] In this embodiment, as one possible implementation, the mobile phone can generate, based on the virtual pet generated above, bone animation clips for implementing bone animation, each bone animation clip can correspond to a part of the virtual pet's body, for example, the bone animation clip can include clips corresponding to body parts such as head, two ears, two eyes, tail, left front leg, right front leg, left hind leg, right hind leg, torso, nose, mouth, tongue, eyebrow, beard, etc., each bone animation clip can be composed of a bone and a skin bound to the bone (the skin can be characterized by the pet's external features), and different bone animation clips can be connected by joints, when one bone animation clip moves, the bone animation clips connected thereto will also move accordingly. For example, taking the virtual pet 610 shown in FIG. 6 as the virtual pet generated, the bone animation clips generated by the mobile phone based on the virtual pet 610 can be as shown in (1) of FIG. 8, such as head clip 801, torso clip 802, right hind leg clip 803, etc. For example, taking the virtual pet 720 shown in (2) of FIG. 7a as the virtual pet generated, the bone animation clips generated by the mobile phone based on the virtual pet 720 can be as shown in (2) of FIG. 8, such as head clip 811, tail clip 812, ear clip 813, etc.

[0161] Optionally, the process of generating bone animation clips based on the virtual pet for implementing bone animation can be completed by a human, for example, a human can slice the body parts of the generated virtual pet, bind a bone to each clip, and set the joint connection relationship between different clips, thereby obtaining bone animation clips. Alternatively, the process of generating bone animation clips based on the virtual pet for implementing bone animation can also be implemented by a model, for example, the virtual pet can be input into a preset model, and the model can directly output bone animation clips. The embodiments of the present application do not limit the manner of generating bone animation clips.

[0162] Then, the mobile phone can control the corresponding bone animation clip to move (for example, control the position, orientation, etc. to change), thereby controlling the virtual pet to perform different actions, such as running, jumping, laughing, grinning, shaking hands, showing teeth, wagging tail, scratching, clapping, lying, rolling, eating, sticking out tongue, sneezing, etc., to achieve the interactive effect of the virtual pet. In this way, the virtual pet can be controlled to move by means of bone animation, even if the virtual pet has not completed the previous action, the virtual pet can also perform the next action, for example, when the virtual pet is performing the action of eating, the action has not been completed, and the virtual pet can perform other actions, such as playing ball. Compared with the manner of playing a preset virtual pet animation for interaction, the manner of controlling the virtual pet by means of bone animation can enable the virtual pet to respond to the user's interaction in a timely manner, and improve the flexibility and interest of the interaction.

[0163] In some embodiments, to facilitate the mobile phone to determine which bone animation clip needs to be controlled to perform a certain action of the virtual pet, in some embodiments, the mobile phone can be pre-stored with a mapping relationship between bone animation clips and actions, and the mobile phone can determine the bone animation clip corresponding to the action of the virtual pet based on the mapping relationship. Of course, the mobile phone can also determine the bone animation clip corresponding to the action of the virtual pet through other manners, such as through a pre-stored AI model.

[0164] For example, in combination with the example of the bone animation clip described above, Table 2 shows an example of a mapping relationship provided by an embodiment of the present application.

[0165] Table 2

[0166] It can be understood that Table 1 is only an example for illustration, and in actual application, the actions performed by the virtual pet can be more abundant, such as eating actions (such as eating pet food, gnawing bones, drinking water, etc.), playing actions (such as rolling, airplane ears, finger joints, playing cat sticks, catching mice, etc.), resting actions (such as sleeping, rolling, squinting, scratching, etc.), and various other actions, and the bone animation clips corresponding to each action can be different from those in Table 2.

[0167] It can be understood that in the embodiments of the present application, the virtual pet is first generated, and then the corresponding bone animation clip is generated based on the virtual pet. In other embodiments, the bone animation clip can also be directly generated, such as generating the bone animation clip based on the image (such as a photo, a video, etc.) of the real pet. Optionally, the image (such as a photo, a video, etc.) of the real pet can be input into an AI model, and the bone animation clip is directly output by the model. Alternatively, the bone animation clip corresponding to the real pet can also be obtained by adopting the manner described above, such as pre-storing the bone animation clip corresponding to different categories of pets, and then replacing the skin (such as the external features) bound to the bone animation clip of the same category as the real pet with the skin of the real pet.

[0168] In some scenarios, different real pets have different behavior habits, and therefore, in some embodiments, the mobile phone can also acquire behavior characteristics, personality characteristics, etc. of the real pet, and then control the virtual pet to interact based on the behavior characteristics, personality characteristics, etc. of the real pet in combination with the skeletal animation described above, so as to further increase user stickiness. That is, the interaction effect of the presented virtual pet is related to the behavior characteristics, personality characteristics, etc. of the real pet. Alternatively, the behavior characteristics, personality characteristics, etc. of the real pet can also be acquired by performing feature analysis on images (such as photos, videos, etc.) of the real pet. As described above, in addition to the appearance characteristics of the real pet, the semantic data can also include the behavior characteristics, personality characteristics, etc. of the real pet. The behavior characteristics can refer to which behaviors exist in the real pet, and the personality characteristics can refer to the occurrence regularity (such as events, places, scenes, etc.) of the behavior characteristics of the real pet.

[0169] For example, taking a cat as a real pet, Table 3 shows some examples of behavior characteristics of cats provided by embodiments of the present application.

[0170] Table 3

[0171] As shown in Table 3, the cat has behavior characteristics such as eating, drinking, fluffing, lying like a concubine, and airplane ears, which are not introduced here. Correspondingly, the behavior characteristics of the virtual pet corresponding to the cat presented are consistent with the cat. It can be understood that the behavior characteristics of different real pets can be different, and correspondingly, the interaction effects of different virtual pets corresponding to different real pets presented can also be different. For example: cat A can have the behavior characteristic of tearing down the house, and the virtual pet corresponding to cat A can have the interaction of tearing down the house. Cat B can not have the behavior characteristic of tearing down the house, and the virtual pet corresponding to cat B can not have the interaction of tearing down the house. For another example: cat B has the behavior characteristic of airplane ears, and the virtual pet corresponding to cat B has the behavior of airplane ears, while cat A does not have the behavior characteristic of airplane ears, and the virtual pet corresponding to cat A also does not have the behavior of airplane ears.

[0172] For example, still taking the real pet as a kitten, FIG. 9 shows an example of the character features of a kitten provided by an embodiment of the present application. As shown in FIG. 9, the kitten will eat (such as eat food, drink water, etc.) at 8 o'clock in the morning, be active (such as lie on a table, go to the toilet, etc.) at 10 o'clock, play (such as destroy a house, stroll, scratch, etc.) at 12 o'clock, and so on. Correspondingly, the character features of the virtual pet corresponding to the kitten presented are consistent with the kitten. For example, as shown in FIG. 9, the effect of the virtual pet presented on the mobile phone can be as shown in FIG. 10(1) to FIG. 10(8). As shown in FIG. 10(1), at 8 o'clock, the virtual pet on the mobile phone is eating. As shown in FIG. 10(2), at 10 o'clock, the virtual pet on the mobile phone is active. As shown in FIG. 10(3), at 12 o'clock, the virtual pet on the mobile phone is playing. As shown in FIG. 10(4), at 14 o'clock, the virtual pet on the mobile phone is taking a break. As shown in FIG. 10(5), at 16 o'clock, the virtual pet on the mobile phone is playing. As shown in FIG. 10(6), at 18 o'clock, the virtual pet on the mobile phone is eating. As shown in FIG. 10(7), at 20 o'clock, the virtual pet on the mobile phone is interacting. As shown in FIG. 10(8), at 22 o'clock, the virtual pet on the mobile phone is sleeping.

[0173] Optionally, the virtual pet shown in (1) to (8) of FIG. 10 is dynamic, i.e. the virtual pet performing a behavior can be an animation effect rather than a static image. For example, taking the animation of the virtual pet shown in (1) of FIG. 10 eating as an example, the process of generating the animation of the virtual pet eating is introduced in combination with the bone animation described above. When the mobile phone determines that the animation effect of the virtual pet eating is to be presented, it first determines which actions are included in the animation effect. If only the eating action is included, the mobile phone determines the bone animation slices required for the eating action based on the mapping relationship between the bone animation slices and actions such as the bone animation described above. For example, if the bone animation slices include a mouth slice and a tongue slice, the mobile phone determines the key frames required for the animation effect of the virtual pet eating by calling the cute pet service shown in FIG. 3, obtains the key frames by changing the position and orientation of the mouth slice and the tongue slice, and obtains the positions of the mouth slice and the tongue slice in other image frames by key frame difference and the like. Finally, the mobile phone renders and composites each frame of image based on the position and orientation of the mouth slice and the tongue slice in each frame of image by calling the rendering service shown in FIG. 3, thereby realizing the animation effect of the virtual pet eating. It can be understood that, since the mouth and tongue of a real pet are constantly moving when the pet is eating, the position and orientation of the mouth slice and the tongue slice included in different frames of image can be different. Optionally, for bone animation slices corresponding to other body parts that are not moving, such as tail slices and limb slices, the position and orientation of the bone animation slices in different frames of image can be the same. It can also be understood that, since the animation effect of the virtual pet eating shown in (1) of FIG. 10 also requires a food bowl and pet food, the cute pet service can also call these small accessories from the cute pet advanced components and render and composite the small accessories and the virtual pet together by the rendering service, thereby realizing the animation effect of the virtual pet eating.

[0174] Similarly, the personality characteristics of different real pets can be different. Accordingly, the interaction effects of the virtual pets corresponding to different real pets presented can also be different. For example, cat C has the personality characteristic of eating at 7 am and going to the toilet at 8 am, and accordingly the virtual pet corresponding to cat C can present the interaction effect of eating at 7 am and going to the toilet at 8 am. Cat D has the personality characteristic of going to the toilet at 7 am and eating at 8 am, and accordingly the virtual pet corresponding to cat D can present the interaction effect of going to the toilet at 7 am and eating at 8 am. In this way, the behavior characteristics and personality characteristics of the virtual pet determine the interaction effect of the virtual pet, and the behavior characteristics and personality characteristics of the virtual pet are consistent with those of the real pet, which makes the virtual pet more consistent with the real pet and can satisfy the emotional connection of the user.

[0175] Optionally, when the behavior characteristics, personality characteristics, etc. of the real pet change, the behavior characteristics, personality characteristics, etc. of the virtual pet corresponding to the real pet can also change accordingly to maintain consistency with the real pet. For example, the mobile phone can determine whether the behavior characteristics, personality characteristics, etc. of the real pet change through the image (such as a photo, a video, etc.) of the real pet. The embodiments of the present application do not limit the manner and timing of determining whether the behavior characteristics, personality characteristics, etc. of the real pet change.

[0176] The above describes the interactive effect of the virtual pet based on the behavior characteristics and personality characteristics of the real pet, i.e. the effect of the virtual pet itself interacting. The following describes the interactive effect of the virtual pet in other scenarios.

[0177] In some embodiments, the virtual pet can also interact with other subjects. For example, the subjects can include, but are not limited to, one or more of the following: a user, an element in the device, a device, an environment in which the device is located, etc. For example, the element in the device can include, but is not limited to, one or more of the following: an application icon, a component, an application, a card, a system service, a window, etc. Optionally, the aforementioned devices can refer to a device that enables the virtual pet, such as a mobile phone. The following still takes the mobile phone as an example.

[0178] In some implementations, the interaction between the virtual pet and the user can include presenting at least one of the image and the animation of the virtual pet corresponding to the user activity. For example, Table 4 shows some examples of user activities provided by the embodiments of the present application.

[0179] Table 4

[0180] In combination with Table 4, for example, taking the user activity of celebrating a birthday as an example, when the mobile phone determines that it is the user's birthday, the mobile phone can present the image of the virtual pet celebrating a birthday (for example, the virtual pet can wear a birthday hat, or a birthday cake can be placed in front of the virtual pet, etc.), and can also present the animation effect of the virtual pet sending birthday greetings to the user, such as the animation of the virtual pet making a bow. For example, in this example, taking the virtual pet as a kitten as an example, Fig. 11 (1) shows an example of the animation of the virtual pet sending birthday greetings to the user provided by the embodiments of the present application.

[0181] Optionally, the phone can determine whether it is the user's birthday by calling the calendar application, etc., and then realize the aforementioned interactive effect of the virtual pet. As shown in the structure of Fig. 3, when the application framework layer's virtual pet high-level component determines that it is the user's birthday by calling the calendar application of the application layer, it is determined that the virtual pet image that has had a birthday is to be presented and the animation effect of the virtual pet presenting birthday greetings to the user is to be presented. Then, the virtual pet high-level component calls the virtual pet service and the rendering service in the system service layer to generate the animation effect. Specifically, the virtual pet service can first determine the several actions corresponding to the animation effect of the virtual pet presenting birthday greetings to the user. Of course, the determination operation can also be performed by other modules. It can be understood that in the embodiments of the present application, one virtual pet's interactive animation can contain one or more different actions, and the skeletal animation clip corresponding to each action can be completely different, or partially or wholly the same. Then, based on the mapping relationship between the skeletal animation clip and the action described above, the skeletal animation clip corresponding to each action is determined, i.e., the skeletal animation clip that needs to be controlled to move is determined. The several key frames required for the animation effect of the virtual pet presenting birthday greetings to the user are determined, and the position, orientation, etc. of the skeletal animation clip that needs to be controlled to move included in these key frames are changed, and the position, orientation, etc. of the skeletal animation clip that needs to be controlled to move in other image frames are obtained through key frame difference value, etc. The rendering service is called based on the position, orientation, etc. of the skeletal animation clip that needs to be controlled to move in each image frame to render and synthesize each image frame, i.e., the animation effect of the virtual pet presenting birthday greetings to the user is realized. Similarly, since the birthday hat and other small accessories are required in the animation effect, therefore, the virtual pet service can also call these small accessories from the virtual pet high-level component, and render and synthesize these small accessories and the virtual pet through the rendering service, to realize the animation effect of the virtual pet presenting birthday greetings to the user.

[0182] For another example: taking the user activity of listening to music as an example, the phone determines that the user is listening to music, and the phone can present the virtual pet image of listening to music (e.g., the virtual pet can wear earphones, etc.), and can also present the animation effect of the virtual pet listening to music, such as the animation of the virtual pet swaying with the music, etc. In this example, the virtual pet is still taken as a cat, and Fig. 11 (2) shows an example of the virtual pet listening to music according to an embodiment of the present application. Optionally, the phone can determine whether the user is listening to music by calling the music application, etc., such as when the music application is in the state of playing music, the phone can determine that the user is listening to music, and vice versa. The generation of the animation in this example can refer to the specific implementation described above.

[0183] As described above, as one possible implementation, the user activity can be perceived based on the application (e.g., running status of the application, data record of the application, etc.) in the embodiments of the present application. Of course, in other implementations, the user activity can also be perceived in other manners, such as obtained from other devices, or actively input by the user, etc.

[0184] In some other implementations, the virtual pet interacting with the user can further include presenting at least one of an image and an animation of the virtual pet corresponding to the user status. For example, the user status can include, but is not limited to, the user's physical status (e.g., healthy, sick, etc.), emotional status (e.g., happy, angry, sad, worried, etc.), eye status (e.g., staring at the screen), etc. For example, the user's physical status can be determined by heart rate, body temperature, pulse, blood pressure, etc. For example, the phone can obtain the heart rate, body temperature, pulse, blood pressure, etc. from the electronic device (e.g., watch, bracelet, etc.) worn by the user to determine the user's physical status. The emotional status can be determined by facial expression, speaking tone, etc. For example, the phone can capture the user's facial expression through the camera, and capture the user's speaking tone through the microphone, etc. The eye status can be determined based on the user's visual focus, facial position, etc. Similarly, the phone can obtain the user's eye status through the camera, eye tracking sensor, etc. It can be understood that the embodiments of the present application do not limit the manner of determining the user status.

[0185] For example, taking the user staring at the screen as an example, the phone can present an animation effect of the virtual pet interacting with the user in the eye. For example, still taking the virtual pet as a cat as an example, FIG. 12 shows an animation example of the virtual pet interacting with the user in the eye according to an embodiment of the present application. For example, when the user is not staring at the screen, the phone can present the virtual pet as shown in (1) of FIG. 12. When the user is staring at the screen, the virtual pet on the phone can change the staring direction from (1) of FIG. 12 to (2) of FIG. 12, and the staring direction of the virtual pet shown in (2) of FIG. 12 can be connected to the user's line of sight direction. For example, taking the current emotional status of the user as sad as an example, the phone can present an animation effect of the virtual pet comforting the user, such as the virtual pet performing a funny action, or presenting various animation effects such as handing a tissue to the user, etc. For example, taking the current physical status of the user as fever as an example, the phone can present a virtual pet image of the virtual pet with fever, such as placing a fever-reducing patch on the forehead, or a virtual pet with an intravenous drip, or presenting an animation effect of reminding the user to take medicine, etc.

[0186] Optionally, in the example shown in FIG. 12, in combination with the architecture shown in FIG. 3, when the pet high-level component of the application layer determines to present the animation effect of eye contact with the user, the generation of the animation effect can be performed by calling the pet service and the rendering service in the system service layer. Similarly, the pet service can first determine a number of actions corresponding to the animation effect of eye contact with the user. Then, based on the mapping relationship between the bone animation clip and the action described above, the bone animation clip (such as the two eye clips) corresponding to each action is determined, that is, the bone animation clip that needs to be controlled to move is determined. And determine a few key frames needed for eye contact with the user, by changing the position, orientation, etc. of the bone animation clip that needs to be controlled to move included in these key frames, and by key frame difference value and other ways to obtain the position, orientation, etc. of the bone animation clip that needs to be controlled to move in other image frames. Based on the position, orientation, etc. of the bone animation clip that needs to be controlled to move in each image frame, the rendering service is called to render and synthesize each image frame, that is, the animation effect of eye contact with the user can be realized.

[0187] In yet some implementations, the virtual pet interacting with the user can also present at least one of the image and the animation of the virtual pet corresponding to the user operation. The user operation can be an operation for controlling a target virtual object on the mobile phone. Optionally, the virtual object can be an object that interacts with the virtual pet in the same animation as the virtual pet. The number of optional virtual objects can be one or more. For example, the user operation can include various key operations, gesture operations, voice operations, etc. Optionally, the mobile phone can perceive the user operation through the display screen and various types of sensors. When the mobile phone detects the user operation, the virtual object presented on the mobile phone can move to a position, and correspondingly, the virtual pet can move following the target virtual object. It can be understood that the present application does not specifically limit the position of the virtual object after moving and the position of the virtual pet after moving.

[0188] Taking the click operation or the air gesture as an example, when the mobile phone detects the click operation or the air gesture performed by the user, the target virtual object presented on the mobile phone can move to the position where the user performs the click operation, or move to the position of the user's hand, or move to other positions that have a corresponding relationship with the above positions, etc. Correspondingly, the position of the virtual pet will move following the virtual object.

[0189] In this example, taking the virtual pet as a cat and the virtual object as a butterfly as an example, FIG. 13 shows an animation example of the virtual pet catching the butterfly according to an embodiment of the present application. When the mobile phone presents the animation interface shown in FIG. 13 (1), the user can move the position of the butterfly 1301, and accordingly, the virtual pet 1302 will follow the butterfly and move, thereby presenting the animation effect of the cat catching the butterfly. Assuming that the user moves the butterfly 1301 shown in FIG. 13 (1) to the position shown in FIG. 13 (2) according to the direction of the arrow, in response to the operation, the virtual pet 1302 also moves with the movement of the butterfly 1301, and the virtual pet 1302 also moves to the position shown in FIG. 13 (2). Optionally, during the movement of the butterfly 1301, since the position of the butterfly 1301 is constantly changing, the position of the virtual pet 1302 can also constantly change following the position of the butterfly 1301.

[0190] It can be understood that FIG. 13 takes the virtual object as a butterfly as an example, and in other scenarios, the virtual pet can also be presented as other things, such as a cat toy, a ball, a shuttlecock, a jump rope, a doll, and various things that can interact with the virtual pet. The specific presentation of the virtual object is not limited in the embodiments of the present application.

[0191] Optionally, in the example shown in FIG. 13, the positional relationship between the virtual object and the virtual pet can meet a preset condition (such as the distance between the two meeting a preset distance range), or the positional relationship between the virtual object and the virtual pet can also be random, that is, not a fixed positional relationship. When the mobile phone determines the actions to be performed by the virtual pet based on one or more factors such as the position of the virtual object on the display screen, the moving distance, the moving direction, the moving speed, and the like, the animation effect of the virtual pet interacting with the virtual object is presented, and then the rendering, composition and display of the animation are performed based on the determined actions. For the specific implementation, refer to the related implementation described above.

[0192] In some implementations, the interaction between the virtual pet and the element in the device can include one or more of the virtual pet avoiding the element in the device, the virtual pet reminding the element in the device, and the virtual pet following the element in the device to move. In this implementation, when the element in the device is a UI element, the virtual pet and the element interacting can be rendered into the same layer. Optionally, for different UI elements in the device, the corresponding layers can be the same or different.

[0193] For example, the elements in the virtual pet avoiding device can include UI elements (such as application icons, widgets, cards, etc.) on the virtual pet avoiding display screen. Optionally, in this example, the virtual pet and the UI elements on the display screen can not block each other. For example, taking the virtual pet avoiding application icon as an example, FIG. 14 shows an example of a virtual pet avoiding application icon provided by an embodiment of the present application. As shown in FIG. 14, the virtual pet 1401 can avoid the application icon 1402, that is, the display of the virtual pet 1401 does not block the display of the application icon 1402. For another example, taking the virtual pet avoiding card as an example, FIG. 15 shows an example of a virtual pet avoiding card provided by an embodiment of the present application. As shown in the interface (1) of FIG. 15, the mobile phone displays a virtual pet 1501 and a card 1502 presenting the number of steps, and the virtual pet 1501 does not block the card 1502. Subsequently, the user performs a drag operation on the card 1502 shown in (1) of FIG. 15, such as dragging in the direction of the arrow from the position shown in (1) of FIG. 15 to the position shown in (2) of FIG. 15, that is, the position shown in (3) of FIG. 15. Correspondingly, the virtual pet 1501 can be displayed by moving from the position shown in (1) of FIG. 15 to the position shown in (3) of FIG. 15, as shown in (3) of FIG. 15, the virtual pet 1501 can jump to the position above the card 1502 to avoid the card 1502. It can be understood that in the example shown in FIG. 15, during the movement of the card 1502, the virtual pet 1501 does not move, and in other examples, during the movement of the card 1502, the virtual pet 1501 can also move (such as running, walking, jumping, etc.) correspondingly to ensure that the virtual pet and the card do not block each other.

[0194] In the examples shown in FIG. 14 and FIG. 15, when the mobile phone determines the actions to be performed by the virtual pet when presenting the animation effect of the virtual pet avoiding UI element based on one or more factors such as the position of the UI element on the display screen, the movement distance, the movement direction, the movement speed, etc., the mobile phone further performs rendering, composition and display of the animation based on the determined actions. For the specific implementation, refer to the related implementation described above.

[0195] For example, the virtual pet reminding the elements in the device can include the virtual pet reminding the UI elements (such as including but not limited to notification messages, live windows, etc.) presented on the display screen.

[0196] Taking the virtual pet reminding the notification message as an example, FIG. 16 shows a schematic diagram of the virtual pet reminding the notification message according to an embodiment of the present application. As shown in (1) of FIG. 16, the lock screen interface displays the virtual pet 1601. When the phone receives the notification message, as shown in (2) of FIG. 16, the phone can present the notification message, such as the notification message 1611, and the virtual pet 1601 can remind the notification message 1611, such as the virtual pet 1601 jumping above the notification message 1611.

[0197] In some scenarios, the phone can receive multiple notification messages, and the phone can present the multiple notification messages simultaneously. In this case, the virtual pet can also remind the multiple notification messages. As shown in (3) of FIG. 16, the phone displays not only the notification message 1611, but also the notification message 1621, the notification message 1622, and the like. The virtual pet 1601 can simultaneously remind the multiple notification messages, such as the virtual pet 1601 lying above the notification message at the top, such as the notification message 1622. Optionally, the notification message 1622 can shield the body part of the virtual pet 1601, such as the lower body of the virtual pet 1601 being shielded by the notification message 1622, and only the head and the front legs being exposed. In this way, when the phone displays multiple notification messages simultaneously, the display screen occupies a large area. In this case, the virtual pet lying above the notification message at the top can save the occupied area of the virtual pet, and can avoid the virtual pet shielding other elements on the interface. When the phone outputs one or two notification messages, the display screen area occupied by the notification messages is small. In this case, the virtual pet standing on the notification message is displayed, and does not shield other elements on the interface. Of course, when the phone outputs a small number of notification messages (such as one or two notification messages), the virtual pet can also adopt the manner shown in (3) of FIG. 16 to lie above the notification message.

[0198] Optionally, the specific mode (such as the standing mode, the lying mode, the curled mode, the stretched mode, and the like) of the virtual pet can be determined based on the size of the remaining idle area on the display screen.

[0199] In the example shown in FIG. 16, the virtual pet and the notification message can be rendered to the same layer.

[0200] As an example of the virtual pet reminding the live window, FIG. 17 shows a schematic diagram of a virtual pet reminding a live window according to an embodiment of the present application. It can be understood that when an application is running in the background, the live window can be used to show the progress of the activity of the application. For example, the live window can be in the form of a pill icon, a card, or the like, and can be presented at the top left corner of the screen or the top of the screen. As shown in (1) of FIG. 17, the phone can display a virtual pet 1701 and a live window 1702 of a food delivery application, and the live window 1702 can be used to remind the delivery progress of the food delivery (e.g., 10 minutes left). When the activity shown by the live window is about to end, as shown in (2) of FIG. 17, the live window 1702 reminds that the food delivery is 1 minute left, and the virtual pet 1701 can remind the live window 1702, as shown in (2) of FIG. 17, the virtual pet 1701 jumps to the live window 1702.

[0201] In some examples, the user can also perform an operation of zooming in (or expanding the activity details, etc.) on the live window. As shown in (2) of FIG. 17, the user performs an operation (not shown in FIG. 17) such as clicking on the live window 1702, and in response to the operation, as shown in (3) of FIG. 17, the live window 1702 is zoomed in and presented in the form of a notification window 1703. In this example, the virtual pet 1701 can also remind the notification window 1703, for example, the virtual pet 1701 can lie above the notification window 1703. In this example, part of the body of the virtual pet 1701 can be blocked by the notification window 1703. Optionally, in this example, the virtual pet 1701 can be in the form shown in (3) of FIG. 17 when the live window 1702 is presented in the form of the notification window 1703. The virtual pet 1701 can also be in the form shown in (3) of FIG. 17 when the live window 1702 is presented in the form of the notification window 1703, and the activity shown by the notification window 1703 is about to end, for example, the notification window 1703 reminds that the food delivery is 1 minute left.

[0202] As shown in the example of FIG. 17, the virtual pet and the live window can be rendered to the same layer.

[0203] For example, the virtual pet following the movement of the element in the device can include following the movement of various UI elements such as a desktop, an application icon, a component, a window, a notification message, a card, etc. Optionally, the movement of the UI element can include movement on the current screen, and can also include cross-screen movement, etc. For example, taking the virtual pet following the movement of the desktop as an example, FIG. 18 shows a schematic diagram of a virtual pet following the movement of a desktop according to an embodiment of the present application. As shown in (1) of FIG. 18, the mobile phone displays a main desktop 1800, wherein the main desktop 1800 includes a virtual pet 1801. The user can perform left and right sliding operations, etc. to switch the desktops. For example, when the mobile phone detects an operation such as a left sliding operation of the user, the mobile phone displays a secondary desktop 1820 in response to the operation, as shown in (3) of FIG. 18. Correspondingly, the virtual pet 1801 moves to the secondary desktop 1820 and is displayed on the secondary desktop 1820. Optionally, during the entire sliding process, the mobile phone can also present an intermediate interface 1810 as shown in (2) of FIG. 18. The intermediate interface 1810 can include part of the content of the main desktop 1800 and part of the content of the secondary desktop 1820. Correspondingly, the virtual pet 1801 can also move to the intermediate interface 1810 and be displayed on the intermediate interface 1810. That is, during the entire sliding operation of the user, the virtual pet can constantly move so that the virtual pet can be presented on the display screen at all times.

[0204] Of course, in other examples, the user can also drag UI elements such as an application icon, a component, a notification message, a card, etc. to move the UI elements, and the virtual pet can also constantly move following the dragging operation of the user.

[0205] For the animation implementation of the virtual pet in FIGS. 16-18, refer to the related implementation described above.

[0206] In some implementations, the virtual pet interacting with the device can include presenting at least one of an image and an animation of the virtual pet corresponding to a state of the device. Optionally, the state of the device can be sensed by various sensors such as an acceleration sensor, a gyroscope sensor, a temperature sensor, a positioning sensor, etc. The manner of sensing the state of the device is not limited in the embodiments of the present application. For example, Table 5 shows some examples of the state of the device according to an embodiment of the present application.

[0207] Table 5

[0208] For example, in combination with the example shown in Table 5, taking the device state as the posture of the device as an example, FIG. 19 shows an example of a virtual pet performing animation according to the posture of the device according to an embodiment of the present application. As shown in FIG. 19, when the posture of the mobile phone is as shown in (1) of FIG. 19, the mobile phone is not tilted or shaken, and at this time, the virtual pet 1900 (such as a small Corgi playing on a skateboard) can be presented in the center of the display screen. If the mobile phone is tilted or shaken, such as when the mobile phone changes to the posture as shown in (2) of FIG. 19, the virtual pet 1900 can move to a position on the left side of the display screen. Optionally, the direction and speed of movement of the virtual pet can be related to the degree of tilt or the degree of shaking of the device. In this way, the virtual pet can present different interactive effects under different degrees of tilt or different degrees of shaking, making the virtual pet more realistic.

[0209] For example, taking the device state as the body state of the device as an example, when the power of the mobile phone is insufficient, the virtual pet presented on the mobile phone can be a listless image (such as lying down, ears drooping, etc.). For example, taking the device state as the location of the device as an example, when the mobile phone is indoors, the virtual pet presented on the mobile phone can be in a caged state (such as being placed in a cage), and the virtual pet can run around in the cage. When the mobile phone is outdoors, the virtual pet presented on the mobile phone can be in a free-ranging state (such as not being placed in a cage), and the virtual pet can run around.

[0210] In some implementations, the interaction of the virtual pet with the environment in which the device is located can include at least one of presenting an image of the virtual pet corresponding to the environment state and presenting animation of the virtual pet corresponding to the environment state. For example, the environment state can include, but is not limited to, a weather state (such as rain, snow, wind, sunny, cloudy, airflow, etc.), a light state (such as day, night, etc.), and the like. Optionally, the environment state can be obtained through an application (such as a weather application), a sensor (such as an airflow sensor), and the like.

[0211] For example, FIG. 20 shows a schematic diagram of a virtual pet interacting with an environment in which a device is located according to an embodiment of the present application. As shown in (1) of FIG. 20, when the weather state is snowing, the virtual pet presented on the mobile phone can be as shown in virtual pet 2000, which is playing in the snow with snow goggles and a hat, and stepping on a skateboard. As shown in (2) of FIG. 20, when the airflow is sensed, the virtual pet presented on the mobile phone can be as shown in (a) and (b) of virtual pet 2010 shown in (2) of FIG. 20, which is in a puffed-up image. Optionally, as shown in (b) of (2) of FIG. 20, the virtual pet 2010 can also jump, etc.

[0212] Similarly, the generation of the animation effect of the virtual pet shown in FIGS. 19-20 can refer to the related implementation described above. The generation of the interactive animation involved in the embodiments described below can also refer to the related implementation described above.

[0213] The above describes the interactive effect of the virtual pet presented on the same device. In some embodiments, the virtual pet can also perform cross-device interaction. Among them, the cross-device interaction can refer to the virtual pet presented on a certain electronic device can also be displayed on other electronic devices. Optionally, the aforementioned two electronic devices can be the same type of electronic device, or different types of electronic devices.

[0214] As shown in (1) of FIG. 21, the virtual pet 2100 is displayed on the mobile phone 10. When the mobile phone 10 is turned off (or called screen off), as shown in (2) of FIG. 21, the virtual pet 2100 can gradually move out of the mobile phone 10. At the same time, as shown in (3) of FIG. 21, when the user raises the wrist, the watch 20 worn on the wrist is turned on, and the virtual pet 2100 moves to the watch 20 to be displayed.

[0215] As shown in (1) of FIG. 22, when the user gets into the car and places the mobile phone 10 in the vehicle, the virtual pet 2200 is displayed on the mobile phone 10. When the user starts the vehicle, as shown in (2) of FIG. 22, the virtual pet 2200 gradually moves out of the mobile phone 10. Finally, as shown in (3) of FIG. 22, the virtual pet moves into the display on the car machine 30 and is finally displayed on the car machine 30.

[0216] Optionally, in the examples shown in FIGS. 21 and 22, before the virtual pet on one electronic device (hereinafter referred to as electronic device 1) is transferred to another electronic device (hereinafter referred to as electronic device 2) to be displayed, a communication connection has been established between the electronic device 1 and the electronic device 2. Exemplarily, the communication connection can include but is not limited to Wi-Fi, Bluetooth, distributed soft bus, etc. It can be understood that the number of electronic devices 2 can be one or more.

[0217] Exemplarily, in this embodiment, FIG. 23 shows a software structure diagram of an electronic device 1 and an electronic device 2 provided by the embodiments of the present application. As shown in FIG. 23, the electronic device 1 and the electronic device 2 include a virtual pet service, a data communication module, and a communication hardware, etc. Among them, the virtual pet service includes virtual pet management and data collaboration. The virtual pet management can be used to manage the state of the virtual pet and the execution of the virtual pet skeleton animation. The data collaboration can be used for data sharing between different devices. Optionally, the virtual pet service shown in FIG. 23 can also include one or more modules included in the virtual pet service in the architecture shown in FIG. 3.

[0218] The data communication module includes a device discovery module and a communication capability module. The device discovery module can be used to discover other electronic devices. The communication capability module can be used to provide the communication capability of the electronic device and realize the communication connection with other electronic devices. Optionally, the data communication module shown in FIG. 23 can be realized as the multi-device communication in the architecture shown in FIG. 3. The communication hardware includes a Wi-Fi module and a Bluetooth module. The Wi-Fi module can be used to establish a communication connection by using Wi-Fi. The Bluetooth module can be used to establish a communication connection by using Bluetooth.

[0219] Optionally, the electronic device 1 and the electronic device 2 shown in FIG. 23 can further include one or more modules in the architecture shown in FIG. 3, such as an application package in the application program layer and a component in the application program framework layer.

[0220] In some scenarios, the electronic device 2 can be an electronic device with weak rendering capability. In this scenario, the rendering operation can be performed by the electronic device 1. For example, the electronic device 1 not only performs message synchronization, but also sends the image frame of the rendered virtual pet to the electronic device 2. For example, FIG. 24(1) shows a method flow diagram of virtual pet cross-device interaction provided by an embodiment of the present application. As shown in FIG. 24(1), the method includes the following steps:

[0221] S2401, the electronic device 1 determines that the focus device is transferred while displaying the virtual pet.

[0222] The focus device can refer to the electronic device for displaying the virtual pet. The determination of the transfer of the focus device can refer to the determination that the electronic device for displaying the virtual pet is changed from the electronic device 1 to another electronic device other than the electronic device 1, such as the electronic device 2. For example, when the electronic device 1 establishes a connection with the electronic device 2, the electronic device 1 can determine the transfer of the focus device when detecting a target operation performed by the user. For example, the target operation can be various key operations, gesture operations, voice instructions, etc. The target operation can be an operation performed on the electronic device 1 or the electronic device 2. In some examples, when the type of the electronic device 2 is different, the target operation can be different. For example, when the electronic device 2 is a wearable device, the target operation can include a screen-off operation on the electronic device 1. When the electronic device 2 is a car machine, the target operation can include an operation of putting down the electronic device 1.

[0223] S2402, the electronic device 1 displays an animation of the virtual pet disappearing.

[0224] For example, the animation of the virtual pet disappearing can be the animation effect shown in FIG. 21(2) presented by the mobile phone 10. The animation effect shown in FIG. 22(2) displayed by the mobile phone 10 can also be used.

[0225] In some embodiments, the electronic device 1 can not display the animation of the virtual pet disappearing, and directly stop presenting the virtual pet.

[0226] S2403, the electronic device 1 generates the virtual pet.

[0227] In some embodiments, the electronic device 1 can generate an appearance animation (such as a video stream, etc.) of the virtual pet in addition to generating the virtual pet. The appearance animation of the virtual pet can refer to an animation of the virtual pet when the virtual pet starts to be displayed on the electronic device 2. For example, the appearance animation can be an animation of the virtual pet displayed on the watch 20 as shown in (3) of FIG. 21, or an animation of the virtual pet gradually moving into the car machine 30 as shown in (3) of FIG. 22, etc.

[0228] In some embodiments, the electronic device 1 can generate an appearance animation (such as a video stream, etc.) of the virtual pet in addition to generating the virtual pet. The appearance animation of the virtual pet can refer to an animation of the virtual pet when the virtual pet starts to be displayed on the electronic device 2. For example, the appearance animation can be an animation of the virtual pet displayed on the watch 20 as shown in (3) of FIG. 21, or an animation of the virtual pet gradually moving into the car machine 30 as shown in (3) of FIG. 22, etc.

[0229] S2404, the electronic device 1 sends a synchronization message to the electronic device 2. Correspondingly, the electronic device 2 receives the synchronization message from the electronic device 2.

[0230] In some embodiments, the synchronization message can also carry the virtual pet generated in step S2403, the appearance animation of the virtual pet, etc., so that the electronic device 2 can present the virtual pet or the appearance animation of the virtual pet based on the synchronization message.

[0231] Optionally, the virtual pet, the appearance animation of the virtual pet, etc. generated by the electronic device 1 can not be carried in the synchronization message, but be sent through one or more additional messages. The present application does not limit the order of execution of step S2403 and step S2404.

[0232] S2405, the electronic device 2 displays the virtual pet.

[0233] In some embodiments, the electronic device 2 can directly display the virtual pet. In other embodiments, the electronic device 2 can also display the appearance animation of the virtual pet.

[0234] In some embodiments, the electronic device 2 can first receive a user operation before executing step S2405, and then execute step S2405 in response to the user operation. For example, the user operation can be various key operations, gesture operations, voice instructions, etc. For example, the wrist lifting operation as shown in FIG. 21, the power-on operation as shown in FIG. 22, etc.

[0235] Subsequently, when the virtual pet is presented on the electronic device 2, the interaction effect of the virtual pet can refer to the related implementation of being presented on the mobile phone described above. Optionally, in order to facilitate various animation effects of the virtual pet when the virtual pet is presented on the electronic device 2, the electronic device 1 can also send the skeletal animation clip of the virtual pet to the electronic device 2, or the skeletal animation clip can also be generated by the electronic device 2, and the like.

[0236] In other scenarios, the electronic device 2 can be an electronic device with strong rendering capability, in which case the rendering operation can be performed by the electronic device 2 itself. For example, the electronic device 1 can only perform message synchronization, and the image frame of the virtual pet can be rendered by the electronic device itself. For example, in this scenario, FIG. 24(2) shows another method flow diagram of cross-device interaction of a virtual pet provided by an embodiment of the present application. As shown in FIG. 24(2), the method includes the following steps:

[0237] S2411, the electronic device 1 determines that the focus device is transferred in the case of displaying the virtual pet.

[0238] S2412, the electronic device 1 displays an animation of the virtual pet disappearing.

[0239] The introduction of steps S2411 to S2412 can refer to the introduction of the corresponding steps shown in FIG. 24(1).

[0240] S2413, the electronic device 1 sends a synchronization message to the electronic device 2. Correspondingly, the electronic device 2 receives the synchronization message from the electronic device 2.

[0241] In this embodiment, the synchronization message is used to instruct the electronic device 2 to present the virtual pet.

[0242] S2414, the electronic device 2 generates the virtual pet.

[0243] In this embodiment, the electronic device 2 generating the virtual pet can mean that the electronic device 2 renders the image of the virtual pet.

[0244] In some embodiments, in addition to generating the virtual pet, the electronic device 2 can also generate an appearance animation (such as a video stream, etc.) of the virtual pet. Optionally, in order to facilitate the image of the virtual pet generated by the electronic device 2 to be consistent with that in the electronic device 1, the electronic device 1 can also instruct the image of the virtual pet to the electronic device 1.

[0245] S2415, the electronic device 2 displays the virtual pet.

[0246] The introduction of step S2415 can refer to the corresponding introduction of step S2405 shown in FIG. 24(1).

[0247] It can be understood that in the above embodiments, the virtual pet on one electronic device is transferred to another electronic device for display. In other embodiments, the virtual pets on multiple electronic devices can be simultaneously transferred to the same electronic device for display, to realize the interaction (such as fighting, wrestling, roaring at each other, or other interactions) of multiple pets. For example, as shown in (1) of FIG. 25, a virtual pet 2501 is displayed on the mobile phone 10, and a virtual pet 2502 is displayed on the mobile phone 40. As shown in (2) of FIG. 25, the virtual pet 2501 and the virtual pet 2502 can be simultaneously transferred to the car machine 30 for display. Similarly, in this example, the mobile phone 10 and the mobile phone 40 can also display an animation of the virtual pet disappearing, and the car machine 30 can also display an animation of the virtual pet appearing. Optionally, before the virtual pets on the mobile phone 10 and the mobile phone 40 are presented on the car machine 30, a communication connection can also be established between the mobile phone 10 and the car machine 30, and between the mobile phone 40 and the car machine 30. The communication connection can be described with reference to the above description. Similarly, in this embodiment, the transfer operation can also be performed when the user puts down the mobile phone and starts the vehicle (i.e., starts the car machine), or the transfer operation can also be performed under other user operations.

[0248] In yet other embodiments, the virtual pets presented on different electronic devices can also interact (such as roaring at each other, looking at each other, or other interactions). For example, FIG. 26 shows an effect schematic diagram of the interaction between virtual pets presented on different electronic devices according to an embodiment of the present application. As shown in FIG. 26, when the mobile phone 10 and the mobile phone 40 approach each other, such as when the distance between the mobile phone 10 and the mobile phone 40 meets a predetermined range and a communication connection is established between the two, the virtual pet 2601 on the mobile phone 10 and the virtual pet 2602 on the mobile phone 40 can interact. Optionally, the approach between the mobile phone 10 and the mobile phone 40 can be determined by various sensors, or communication technology, or positioning technology, etc.

[0249] For example, FIG. 27 shows a flowchart of a virtual pet interaction method according to an embodiment of the present application. As shown in FIG. 27, the method includes the following steps:

[0250] S2701, the first electronic device detects that a target UI element has a first event.

[0251] The first electronic device includes a display screen. Optionally, the first event can include at least one of the following: appearing on the display screen (e.g., the notification message 1611 appearing on the display screen as shown in FIG. 16), a change in a display position on the display screen (e.g., a change in the position of the card 1502 showing the number of steps as shown in FIG. 15), a change in a display form on the display screen (e.g., a change in the form of the live window 1702 as shown in (2) of FIG. 17 to the form of the notification window 1703 as shown in (3) of FIG. 17), and a change in the content contained. Optionally, the change in the content contained can include a specific change in the content contained, or a specific content changing, that is, not all changes in the content can be the first event. For example, the change in the content contained can refer to a change in the progress of an application activity, such as meeting a preset progress, etc., such as a change in the content in the live window 1702 from the content shown in (1) of FIG. 17 to the content shown in (2) of FIG. 17.

[0252] Optionally, the target UI element can be generated based on at least one of system information, first electronic device information, environment information, and user information, wherein the system information is related to a system activity in the first electronic device, the first electronic device information is related to a state of the first electronic device, the environment information is related to a surrounding environment in which the first electronic device is located, and the user information is related to a user. For details of these parameters, refer to the relevant description below.

[0253] Optionally, the target UI element can include one or more of an application icon and a card, and the card can include one or more of a notification message and a live window. In the embodiments of the present application, the target UI element can be part of the UI elements contained in the first electronic device, that is, only when a specific UI element has the first event, the first electronic device will execute step S2702. For example, the desktop can also be a UI element, but when the desktop has the first event, the first electronic device will not execute step S2702.

[0254] S2702, in response to the first event, the first electronic device controls the virtual pet to perform the first behavior.

[0255] When the control of the virtual pet performing the first behavior ends, the virtual pet and the target UI element are in the same layer.

[0256] In some embodiments, during the process of controlling the virtual pet to perform the first behavior, the virtual pet is in the same layer as the target UI element. In this embodiment, as one possible implementation, the virtual pet can be in the same layer as the target UI element before the virtual pet performs the first behavior. As another possible implementation, the virtual pet is in a different layer from the target UI element before the virtual pet performs the first behavior, and the first electronic device can first control the virtual pet to switch to the layer in which the target UI element is located, and then control the virtual pet to continue performing the first behavior, when the first electronic device controls the virtual pet to start performing the first behavior. In the above two implementations, the virtual pet is in the same layer as the target UI element throughout the process of the first electronic device controlling the virtual pet to perform the first behavior.

[0257] As yet another possible implementation, the virtual pet is in a different layer from the target UI element before the virtual pet performs the first behavior, and the first electronic device can control the virtual pet to switch to the layer in which the target UI element is located, during the process of the first electronic device controlling the virtual pet to perform the first behavior. In this implementation, the virtual pet is in the same layer as the target UI element in some stages and is in different layers in other stages, throughout the process of the first electronic device controlling the virtual pet to perform the first behavior.

[0258] In other embodiments, the virtual pet is in a different layer from the target UI element before the virtual pet performs the first behavior, and the first electronic device can further control the virtual pet to switch to the layer in which the target UI element is located, when the first electronic device controls the virtual pet to end performing the first behavior. In this embodiment, the virtual pet is in the same layer as the target UI element only when the first electronic device controls the virtual pet to end performing the first behavior. In other stages, the virtual pet is in different layers from the target UI element.

[0259] In some embodiments, when the first electronic device controls the virtual pet to end performing the first behavior, the display area of the virtual pet on the display screen and the display area of the target UI element on the display screen have an overlapping part. As shown in the example of (3) in FIG. 16, the virtual pet 1601 is above the notification message 1622, and the display area of the virtual pet 1601 and the display area of the notification message 1622 have an overlapping part.

[0260] In some embodiments, the first behavior can be generated by a skeletal animation. In response to the first event, the first electronic device can determine a target skeletal animation clip corresponding to the first behavior, the target skeletal animation clip being one or more of the skeletal animation clips corresponding to the virtual pet, each of the skeletal animation clips corresponding to a part of the body of the virtual pet. The first electronic device can control the target skeletal animation clip to move, such as changing the position and orientation of the target skeletal animation clip, so that the virtual pet performs the first behavior. For the description of the skeletal animation clip corresponding to the virtual pet, reference can be made to the description of the skeletal animation clip described above.

[0261] Optionally, the first behavior can include at least one action, and the first electronic device determining the target skeletal animation clip corresponding to the first behavior can be specifically implemented as determining the target skeletal animation clip corresponding to each action in the at least one action. For example, the at least one action includes one or more of running, jumping, laughing, grinning, shaking hands, showing teeth, wagging tail, scratching, clapping, lying, rolling, eating, sticking out tongue, sneezing, and the like.

[0262] In some embodiments, the first electronic device can determine the target skeletal animation clip based on each action and a preset mapping relationship, the preset mapping relationship being a correspondence between actions and skeletal animation clips. The preset mapping relationship can be the preset mapping relationship between the skeletal animation clip and the action as described above.

[0263] In some embodiments, step S2702 can be specifically implemented as: in response to the target UI element being displayed in a first area on the display screen, controlling the virtual pet to move to a second area on the display screen for display, the first area being different from the second area, and the first area and the second area having no overlapping part. Optionally, the target UI element displayed in the first area on the display screen can be displayed on the display screen at the beginning, or can be moved to the first area from other areas on the display screen. For example, in response to the target UI element being moved to the first area from a third area on the display screen, the first electronic device controls the virtual pet to move to the second area for display, the third area being different from the first area, as shown in the example of FIG. 15. Optionally, the second area and the third area can be the same or different.

[0264] In yet some embodiments, step S2702 can also be specifically implemented as: in response to the target UI element appearing on the display screen, the first electronic device controls the virtual pet to move to an area adjacent to the display area of the target UI element (as shown in the example of (2) in FIG. 16) or an area having an overlapping part (as shown in the example of (3) in FIG. 16) for display. Alternatively, the target UI element is used to show the progress of an application activity, and in response to the application activity progress shown by the target UI element meeting a preset progress, the first electronic device controls the virtual pet to move to an area adjacent to the display area of the target UI element or an area having an overlapping part for display, as shown in the example of FIG. 17.

[0265] In some embodiments, in response to the running interface of the first application being switched from the first interface to the second interface, the first electronic device can also control the virtual pet to move from the first interface to the second interface for display. For example, as shown in the example of FIG. 18, the first application can be a desktop application as described above, and the first interface and the second interface can be a main desktop, a secondary desktop, or the like.

[0266] In some embodiments, the first electronic device can control the virtual pet to present a first image on the display screen based on the first information, the first image corresponding to the first information. Alternatively, the first electronic device can control the virtual pet to perform a second behavior based on the first information. The first information includes at least one of first electronic device information, environment information, and user information. The first electronic device information is related to the state of the first electronic device. The environment information is related to the surrounding environment of the first electronic device. The user information is related to the user. The second behavior can also be generated by the skeletal animation, and the specific implementation can refer to the related implementation of the first behavior. Alternatively, the first image corresponding to different first information is different. And / or, the second behavior corresponding to different first information is different.

[0267] Alternatively, in the embodiments of the present application, the first electronic device information includes the state of the first electronic device. Alternatively, the environment information includes the state of the surrounding environment of the first electronic device. Alternatively, the user information includes at least one of the user state, the user activity, and the user operation. For the introduction of these parameters, please refer to the above description.

[0268] For example, when the first information indicates that the first electronic device is in a snowy weather, the first electronic device controls the virtual pet to present a snowing image on the display screen, as shown in the example of (1) in FIG. 20. Alternatively, when the first information indicates that the air flow around the first electronic device is flowing, the first electronic device controls the virtual pet to present a hair-raising image on the display screen, as shown in the example of (2) in FIG. 20. Alternatively, when the first information indicates the user's birthday, the first electronic device controls the virtual pet to present a birthday image on the display screen, as shown in the example of (1) in FIG. 11. Alternatively, when the first information indicates that the user is listening to music, the first electronic device controls the virtual pet to present a music listening image on the display screen, as shown in the example of (2) in FIG. 11. The snowing image, the hair-raising image, the birthday image, and the music listening image are different from each other.

[0269] For example, when the first information indicates that the first electronic device is in a snowy weather, the second behavior is that the virtual pet plays with the snow on the display screen, as shown in the example of (1) in FIG. 20. Alternatively, when the first information indicates that the first electronic device is tilted or shaken, the second behavior is that the virtual pet moves the display position on the display screen, as shown in FIG. 19. Alternatively, when the first information indicates the user's birthday, the second behavior is that the virtual pet sends birthday greetings to the user on the display screen, as shown in the example of (1) in FIG. 11. Alternatively, when the first information indicates that the user is listening to music, the second behavior is that the virtual pet shakes on the display screen, as shown in the example of (2) in FIG. 11. Alternatively, when the first information indicates that the user's gaze is staring, the second behavior is that the virtual pet interacts with the user's gaze on the display screen, as shown in FIG. 12.

[0270] In some embodiments, the behaviors performed by the virtual pet at different time instants are the same as those of the real pet corresponding to the virtual pet, as shown in the example of FIG. 10.

[0271] In some embodiments, when the first electronic device establishes a connection with the second electronic device, the first electronic device can control the virtual pet to move out of the display screen of the first electronic device, and can also send a synchronization message to the second electronic device, which can be used to instruct the second electronic device to display the virtual pet, as shown in step S2404 or step S2413 of FIG. 24. Correspondingly, the second electronic device can control the virtual pet to move into the display screen of the second electronic device. Optionally, the first electronic device can control the virtual pet to gradually move out of the display screen of the first electronic device. The second electronic device can also control the virtual pet to gradually move into the display screen of the second electronic device, as shown in the example of FIG. 21.

[0272] In some embodiments, when the first electronic device establishes a connection with the second electronic device, and the first electronic device is turned off and the second electronic device is turned on, the virtual pet is controlled to move out of the display screen of the first electronic device. Correspondingly, the second electronic device can control the virtual pet to move into the display screen of the second electronic device.

[0273] In some embodiments, when the first electronic device establishes a connection with the third electronic device, the first electronic device can also control the virtual pet on the first electronic device to interact with the virtual pet on the third electronic device. Optionally, the first electronic device can control the virtual pet on the first electronic device to interact with the virtual pet on the third electronic device when the first electronic device establishes a connection with the third electronic device and they are close to each other, as shown in the example of FIG. 26.

[0274] In some embodiments, when the first electronic device establishes a connection with the fourth electronic device, the first electronic device can control the target virtual pet to move into the display screen of the first electronic device to be displayed, and the target virtual pet is the virtual pet set on the fourth electronic device. The first electronic device can also control the target virtual pet to interact with the virtual pet on the display screen. The virtual pet can be originally set on the first electronic device, or can be transmitted from another electronic device (as shown in the example of FIG. 25).

[0275] Optionally, in this embodiment, the rendering performance of the first electronic device is greater than or equal to the preset performance, and when the target virtual pet is controlled to move into the display screen to be displayed, the target virtual pet is rendered by the first electronic device. Or, the rendering performance of the first electronic device is less than the preset performance, and when the target virtual pet is controlled to move into the display screen to be displayed, the first virtual pet is rendered by the fourth electronic device. The specific implementation can refer to the related implementation of FIG. 24.

[0276] Similarly, in the above embodiment, when the virtual pet on the first electronic device is transmitted to the second electronic device, who specifically renders the virtual pet can also be determined based on the rendering performance of the second electronic device.

[0277] The above mainly introduces the solutions provided by the embodiments of the present application from the perspective of methods. It can be understood that, in order to implement the above functions, the electronic device comprises a hardware structure and / or a software module corresponding to the execution of each function. The units and algorithm steps of each example described in combination with the embodiments disclosed in the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is implemented in hardware or computer-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the technical solutions of the embodiments of the present application.

[0278] The embodiments of the present application can divide the functional modules of the electronic device according to the above method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated in one processing unit. The integrated unit can be implemented in the form of hardware or software functional module. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical functional division. Actual implementation can have another division manner.

[0279] As shown in FIG. 28, it is a structural schematic diagram of an electronic device provided by the embodiments of the present application. The electronic device 2800 can be used to implement the methods executed by each electronic device described in the above various method embodiments. For example, the electronic device 2800 can include a processing unit 2801 and a display unit 2802.

[0280] The processing unit 2801 is configured to support the electronic device 2800 to perform the processing functions described in any one of FIGS. 1 to 27, and the display unit 2802 is configured to support the electronic device 2800 to perform the display functions described in any one of FIGS. 1 to 27.

[0281] Optionally, the electronic device 2800 shown in FIG. 28 can further include a communication unit 2803, which can be used to support the electronic device 2800 to perform the communication functions described in any one of FIGS. 1 to 27.

[0282] Optionally, the electronic device 2800 shown in FIG. 28 can further include a storage unit (not shown in FIG. 28), which stores a program or instructions. When the processing unit 2801 executes the program or instructions, the electronic device 2800 shown in FIG. 28 can perform the methods described in the above method embodiments.

[0283] The technical effects of the electronic device 2800 shown in FIG. 28 can refer to the technical effects described in the above method embodiments, which are not described here again. The processing unit 2801 involved in the electronic device 2800 shown in FIG. 28 can be implemented by a processor or a processor-related circuit component, and can be a processor or a processing module. The communication unit 2803 can be implemented by a transceiver or a transceiver-related circuit component, and can be a transceiver or a receiving module. The display unit 2802 can be implemented by a display screen-related component.

[0284] The embodiments of the present application also provide a chip system, as shown in FIG. 29, which includes at least one processor 2901 and at least one interface circuit 2902. The processor 2901 and the interface circuit 2902 can be interconnected through a line. For example, the interface circuit 2902 can be used to receive signals from other devices. For another example, the interface circuit 2902 can be used to send signals to other devices (such as the processor 2901). Illustratively, the interface circuit 2902 can read instructions stored in a memory and send the instructions to the processor 2901. When the instructions are executed by the processor 2901, the electronic device can perform each step performed by the electronic device in the above embodiments. Of course, the chip system can also include other discrete devices, which are not limited in the embodiments of the present application.

[0285] Optionally, the processor in the chip system can be one or more. The processor can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented by software, the processor can be a general-purpose processor, which is implemented by reading software codes stored in a memory.

[0286] Optionally, the memory in the chip system can also be one or more. The memory can be integrated with the processor, or can be separately arranged from the processor, which is not limited in the present application. Illustratively, the memory can be a non-transient processor, such as a read-only memory (ROM), which can be integrated on the same chip as the processor, or can be separately arranged on different chips. The type of the memory and the arrangement of the memory and the processor are not limited in the present application.

[0287] For example, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD) or other integrated chip.

[0288] It should be understood that each step in the above method embodiments can be completed by integrated logic circuits of hardware in the processor or instructions in the form of software. The method steps disclosed in combination with the embodiments of the present application can be directly embodied as hardware processor execution or executed by a combination of hardware and software modules in the processor.

[0289] The embodiments of the present application also provide a computer storage medium, which stores computer instructions. When the computer instructions run on an electronic device, the electronic device executes the method described in the above method embodiments.

[0290] The embodiments of the present application provide a computer program product, which includes computer programs or instructions. When the computer programs or instructions run on a computer, the computer executes the method described in the above method embodiments.

[0291] The embodiments of the present application also provide a communication system, which can include multiple electronic devices, such as two electronic devices (electronic device 1 and electronic device 2) shown in FIG. 24, or two electronic devices (mobile phone 10 and mobile phone 40) shown in FIG. 26. Alternatively, it can include three electronic devices (such as mobile phone 10, mobile phone 40 and car machine 30) in the scenario shown in FIG. 25, and the above-mentioned methods are implemented by cooperation between the electronic devices.

[0292] In addition, the embodiments of the present application also provide a device, which can be a chip, a component or a module. The device can include a processor and a memory connected to each other. The memory is used to store computer execution instructions. When the device runs, the processor can execute the computer execution instructions stored in the memory, so that the device executes the method in each of the above method embodiments.

[0293] Among them, the electronic device, computer storage medium, computer program product, communication system or chip provided by the embodiment are used to execute the corresponding method provided above, so the beneficial effects achieved by them can refer to the beneficial effects of the corresponding method provided above, which will not be repeated here.

[0294] Through the above description of the embodiments, those skilled in the art can understand that, for the convenience and brevity of description, only the above division of functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0295] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other ways. Each embodiment can be combined or referred to each other in the case of no conflict. The apparatus embodiment described above is only schematic, for example, the division of modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed each other can be through some interface, indirect coupling or communication connection between the devices or units, which can be electrical, mechanical or other forms.

[0296] The unit described as a separate component can be or can not be physically separated, and the component shown as a unit can be one physical unit or multiple physical units, that is, can be located in one place, or can be distributed to multiple different places. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.

[0297] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit.

[0298] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The software product is stored in a storage medium, including a plurality of instructions to make a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the various embodiments of the method of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0299] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A virtual pet interaction method, characterized in that, Applied to a first electronic device having a display screen, the method includes: The first event was detected in the target user interface (UI) element. In response to the first event, the virtual pet is controlled to perform a first behavior, wherein when the virtual pet finishes performing the first behavior, the virtual pet and the target UI element are on the same layer.

2. The method according to claim 1, characterized in that, During the process of controlling the virtual pet to perform the first behavior, the virtual pet and the target UI element are on the same layer.

3. The method according to claim 1 or 2, characterized in that, When the virtual pet finishes performing the first action, there is an overlap between the display area of ​​the virtual pet on the display screen and the display area of ​​the target UI element on the display screen.

4. The method according to any one of claims 1-3, characterized in that, The first event includes at least one of the following: appearing on the display screen, a change in the display position on the display screen, a change in the display form on the display screen, and a change in the content contained therein.

5. The method according to any one of claims 1-2 and 4, characterized in that, The response to the first event, controlling the virtual pet to perform the first action, includes: In response to the target UI element being displayed in a first area on the display screen, the virtual pet is controlled to move to a second area on the display screen, the first area being different from the second area.

6. The method according to claim 5, characterized in that, The step of controlling the virtual pet to move to a second area of ​​the display screen in response to the target UI element being displayed in a first area on the display screen includes: In response to the target UI element moving from a third area on the display screen to the first area, the virtual pet is controlled to move to the second area, the third area being different from the first area.

7. The method according to any one of claims 1-6, characterized in that, The response to the first event, controlling the virtual pet to perform the first action, includes: In response to the target UI element appearing on the display screen, the virtual pet is controlled to move to an area adjacent to or overlapping with the display area of ​​the target UI element. Alternatively, the target UI element is used to display the progress of the application activity. In response to the application activity progress displayed by the target UI element meeting a preset progress, the virtual pet is controlled to move to an area adjacent to the display area of ​​the target UI element or an area with overlapping parts.

8. The method according to any one of claims 1-7, characterized in that, The target UI element is generated based on at least one of system information, first electronic device information, environmental information, and user information, wherein the system information is related to system activities in the first electronic device, the first electronic device information is related to the state of the first electronic device, the environmental information is related to the surrounding environment of the first electronic device, and the user information is related to the user.

9. The method according to claim 8, characterized in that, The target UI elements include one or more of the following: application icons and cards.

10. The method according to any one of claims 1-2 and 4-9, characterized in that, The method further includes: In response to the first application's running interface switching from the first interface to the second interface, the virtual pet is controlled to move from the first interface to a blank area of ​​the second interface for display.

11. The method according to any one of claims 1-10, characterized in that, The method further includes: Based on the first information, the virtual pet is controlled to present a first image on the display screen, and the first image corresponds to the first information; And / or, Based on the first information, control the virtual pet to perform the second action; The first information includes at least one of first electronic device information, environmental information, and user information. The first electronic device information is related to the state of the first electronic device, the environmental information is related to the surrounding environment of the first electronic device, and the user information is related to the user.

12. The method according to claim 11, characterized in that, Different first pieces of information correspond to different first images; or, different first pieces of information correspond to different second behaviors.

13. The method according to any one of claims 8-9 and 11-12, characterized in that, The information of the first electronic device includes the status of the first electronic device; Alternatively, the environmental information may include the state of the surrounding environment in which the first electronic device is located; Alternatively, the user information may include at least one of user status, user activity, and user actions.

14. The method according to any one of claims 1-13, characterized in that, The virtual pet performs the same behaviors as the real pet corresponding to the virtual pet at different times.

15. The method according to any one of claims 1-14, characterized in that, The method further includes: When the first electronic device and the second electronic device establish a connection, the virtual pet is controlled to move off the display screen of the first electronic device and a synchronization message is sent to the second electronic device, the synchronization message being used to instruct the second electronic device to display the virtual pet.

16. The method according to claim 15, characterized in that, When the first electronic device and the second electronic device establish a connection, controlling the virtual pet to move off the display screen of the first electronic device includes: When the first electronic device establishes a connection with the second electronic device, and the screen of the first electronic device is off while the screen of the second electronic device is on, the virtual pet is controlled to move off the display screen of the first electronic device.

17. The method according to any one of claims 1-16, characterized in that, The method further includes: When the first electronic device and the third electronic device establish a connection, the virtual pet on the first electronic device is controlled to interact with the virtual pet on the third electronic device.

18. The method according to claim 17, characterized in that, When a connection is established between the first electronic device and the third electronic device, controlling the virtual pet on the first electronic device to interact with the virtual pet on the third electronic device includes: When the first electronic device and the third electronic device establish a connection and are close to each other, the virtual pet on the first electronic device is controlled to interact with the virtual pet on the third electronic device.

19. The method according to any one of claims 1-18, characterized in that, The method further includes: When the first electronic device and the fourth electronic device establish a connection, the target virtual pet is controlled to move into the display screen for display. The target virtual pet is the virtual pet set on the fourth electronic device. Control the target virtual pet to interact with the virtual pet on the display screen.

20. The method according to claim 19, characterized in that, The rendering performance of the first electronic device is greater than or equal to the preset performance. When the target virtual pet is moved onto the display screen, the target virtual pet is rendered by the first electronic device. or, The rendering performance of the first electronic device is lower than the preset performance. When the target virtual pet is moved onto the display screen, the target virtual pet is rendered by the fourth electronic device.

21. The method according to any one of claims 1-20, characterized in that, The response to the first event, controlling the virtual pet to perform the first action, includes: In response to the first event, a target skeletal animation slice corresponding to the first behavior is determined, wherein the target skeletal animation slice is one or more of the skeletal animation slices corresponding to the virtual pet, and each slice of the skeletal animation slices corresponding to the virtual pet corresponds to a part of the virtual pet's body; Control the movement of the target skeletal animation slice so that the virtual pet performs the first behavior.

22. The method according to claim 21, characterized in that, The first action includes at least one movement, and determining the target skeletal animation slice corresponding to the first action includes: Determine the target skeletal animation slice corresponding to each of the at least one actions.

23. The method according to claim 22, characterized in that, Determining the target skeletal animation slice corresponding to each of the at least one actions includes: The target skeletal animation slice is determined based on each action and a preset mapping relationship, wherein the preset mapping relationship is the correspondence between actions and skeletal animation slices.

24. The method according to any one of claims 21-23, characterized in that, The control of the target skeletal animation slice motion includes: Change the position and orientation of the target skeletal animation slice.

25. An electronic device, characterized in that, include: The electronic device includes a processor, a display screen, and a memory, wherein the memory and the display screen are coupled to the processor, the memory is used to store program code including instructions, and the processor reads the instructions from the memory to cause the electronic device to perform the method as described in any one of claims 1-24.

26. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1-24.

27. A computer program product, characterized in that, The computer program product includes: a computer program or instructions that, when run on a computer, cause the computer to perform the method as described in any one of claims 1-24.

Citation Information

Patent Citations

  • Location-based mobile virtual pet system and method thereof

    CN102202256A

  • Electronic pet controlled via cellphone and interacted with via cellphone

    CN103877727A

  • Animation generation method, device and system and storage medium

    CN111968207A

  • Virtual pet control method, mobile device and computer storage medium

    CN111973980A

  • Interaction method of interactive wallpaper, electronic equipment and computer readable storage medium

    CN115793938A