Virtual prop display method and device, storage medium and electronic device
By displaying the image to be recognized on the target client and displaying virtual props based on the recognition results, the problems of user information leakage and inefficiency during the virtual prop display process are solved, and more efficient virtual prop display and transfer are achieved.
Patent Information
- Application Number
- CN202210929424.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-03
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2042-08-03
AI Technical Summary
In the prior art, user information is easily leaked, and the display efficiency of virtual props is low.
The first interactive interface is displayed on the target client for displaying the image to be recognized, and in response to the interaction operation on the client, the target image is displayed, and the second interactive interface is displayed according to the identification information of the target part, displaying the pre-configured virtual Props.
By completing image recognition on the client, the leakage of user information is avoided, the display efficiency of virtual props is improved, and the transfer process of virtual props is optimized.
Smart Images

Figure CN117555628B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a method and device for displaying virtual props, a storage medium, and an electronic device. Background Art
[0002] Currently, most recognition programs usually use online interfaces to identify relevant images provided by users through servers. Since the images provided by users need to be transmitted to the server, the risk of user information leakage will increase. In addition, since a back-end server needs to be deployed for recognition, the efficiency of virtual props display will decrease.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a method and device for displaying a virtual prop, a storage medium, and an electronic device, so as to at least solve the technical problem in the related art that user information is easily leaked during the display of virtual props.
[0005] According to one aspect of an embodiment of the present application, a method for displaying a virtual prop is provided, comprising: displaying a first interactive interface on a target client, wherein the first interactive interface is used to display an image to be identified, and the target client is a client that allows a target account to log in; in response to a first interactive operation performed on the target client, displaying a target image, wherein the first interactive operation is used to trigger acquisition of the target image, and the target image includes a target part that the target client allows to be identified; when the target client identifies the target part, displaying a second interactive interface according to identification information of the target part, wherein the second interactive interface displays the target virtual prop, the target virtual prop is a virtual prop in a pre-configured virtual prop set that corresponds to the identification information of the target part, and the target virtual prop is a virtual prop that the target account allows to be used.
[0006] According to another aspect of an embodiment of the present application, a display device for a virtual prop is also provided, comprising: a first display module, configured to display a first interactive interface on a target client, wherein the first interactive interface is configured to display an image to be identified, and the target client is a client that allows a target account to log in; a second display module, configured to display a target image in response to a first interactive operation performed on the target client, wherein the first interactive operation is configured to trigger acquisition of the target image, and the target image includes a target part that the target client allows to be identified; a third display module, configured to display a second interactive interface according to identification information of the target part when the target client identifies the target part, wherein the second interactive interface displays the target virtual prop, the target virtual prop is a virtual prop in a pre-configured virtual prop set that corresponds to the identification information of the target part, and the target virtual prop is a virtual prop that the target account allows to be used.
[0007] Optionally, the device is used to display a second interactive interface based on identification information of the target part when the target client identifies the target part in the following manner: when the target part is identified in the target image and a target shape is identified from the target part, obtaining size information of the target shape, wherein the identification information includes the size information, and the value of the size information is used to associate with a virtual prop in the virtual prop set; and determining the target virtual prop from the virtual prop set based on the size information.
[0008] Optionally, the device is used to obtain size information of the target shape when the target part is identified in the target image and the target shape is identified from the target part in the following manner: when a palm part is identified in the target image and palm print lines are identified from the palm part, size information of the palm print lines are obtained; or when a palm part is identified in the target image and hand contour lines are identified from the palm part, size information of the hand contour lines are obtained; or when a head part is identified in the target image and a head contour line is identified from the head part, size information of the head contour line is obtained; or when an eyeball part is identified in the target image and an eye contour line is identified from the eyeball part, size information of the eye contour line is obtained.
[0009] Optionally, the device is also used for: when the first client identifies the first part, displaying the second interaction interface according to the identification information of the first part, wherein the second interaction interface displays the first virtual prop, and the first virtual prop is a virtual prop in a pre-configured virtual prop set corresponding to the identification information of the first part; when the first client identifies the second part, displaying the second interaction interface according to the identification information of the second part, wherein the second interaction interface displays the second virtual prop, and the second virtual prop is a virtual prop in a pre-configured virtual prop set corresponding to the identification information of the second part, the first part is different from the second part, and the first virtual prop is the same as or different from the second virtual prop.
[0010] Optionally, the device is further used for: when a palm part is recognized in the target image, displaying the second interaction interface according to the identification information of the palm part, wherein the second interaction interface displays the first virtual prop corresponding to the palm part; when a head part is recognized in the target image, displaying the second interaction interface according to the identification information of the head part, wherein the second interaction interface displays the second virtual prop corresponding to the head part; when an arm part is recognized in the target image, displaying the second interaction interface according to the identification information of the arm part, wherein the second interaction interface displays a third virtual prop corresponding to the arm part, wherein the third virtual prop is different from both the first virtual prop and the second virtual prop, or the third virtual prop is the same as the first virtual prop and different from the second virtual prop, or the third virtual prop is different from the first virtual prop and the same as the second virtual prop, or the third virtual prop is the same as both the first virtual prop and the second virtual prop.
[0011] Optionally, the device is used to display a target image in response to a first interactive operation performed on the target client in the following manner: in response to a first sub-interactive operation performed on the target client, display a target image acquisition frame, wherein the target image acquisition frame displays an image to be acquired, the first sub-interactive operation is used to control the target client to start acquiring images, and the first interactive operation includes the first sub-interactive operation; in response to a third sub-interactive operation performed on the target client, lock the image displayed in the target image acquisition frame as the target image; or in response to a second sub-interactive operation performed on the target client, display a target image set, wherein the target image set displays an image to be selected, the second sub-interactive operation is used to control the target client to display the target image set, and the first interactive operation includes the second sub-interactive operation; in response to a fourth sub-interactive operation performed on the target client, select the target image from the target image set, and the first interactive operation includes the fourth sub-interactive operation.
[0012] Optionally, the device is used to display a second interactive interface based on the identification information of the target part when the target client identifies the target part in the following manner: playing a first animation on the target image displayed on the first interactive interface, wherein the first animation is used to indicate that the target image is currently being scanned; during the playing of the first animation, determining the target virtual prop from the pre-configured virtual prop set based on the target image, wherein the first animation is configured to be played in a loop when the target virtual prop has not been determined; when the target virtual prop has been determined, stopping playing the first animation and displaying the second interactive interface including the target virtual prop.
[0013] Optionally, the device is also used for: when the target client identifies the target part, after displaying a second interaction interface according to the identification information of the target part, when the target virtual prop displayed in the second interaction interface is a first image, obtaining a second interaction operation on the target client, wherein the second interaction operation is used to adjust the display angle of the target virtual prop, and the display angle of the target virtual prop in the first image is a first angle; in response to the second interaction operation, replacing the first image with a second image, wherein the display angle of the target virtual prop in the second image is a second angle, and the first angle is different from the second angle.
[0014] Optionally, the device is used to replace the first image with the second image in response to the second interactive operation in the following manner: when the second interactive operation represents a drag operation on the target virtual prop, in response to the drag operation, the first image is rotated to the second image, wherein the second angle is an angle determined by adding or subtracting the first rotation angle from the first angle according to the direction of the drag operation, and the value of the first rotation angle is positively correlated with the value of the drag distance of the drag operation; or when the second interactive operation is a pressing operation performed on the target virtual prop, in response to the pressing operation, the first image is replaced with the second image. An image is rotated clockwise or counterclockwise to the second image, wherein the second angle is the angle determined by adding the second rotation angle to the first angle according to the duration of the pressing operation, and the value of the second rotation angle is positively correlated with the duration of the pressing operation; or when the second interactive operation is a click operation performed on the target virtual prop, in response to the click operation, the first image is switched to the second image, wherein the second angle is the angle determined by adding the third rotation angle to the first angle according to the number of clicks of the click operation, and the value of the third rotation angle is positively correlated with the number of clicks of the click operation.
[0015] Optionally, the device is used to display a target image in response to a first interactive operation performed on the target client in the following manner: detecting a target event corresponding to a target interactive object, wherein the target event is used to obtain the target image after being triggered, and the target interactive object is used to trigger the target event; when the target event is triggered, obtaining the target image and uploading the target image to the target client; receiving and displaying a target canvas object returned by the target client, wherein the target canvas object is a canvas object generated by the target client based on the target image, and the target canvas object allows association with a user interface element displayed on the target client.
[0016] Optionally, the device is used to obtain the target image and upload the target image to the target client when the trigger event is triggered in the following manner: obtain and upload the target image and the direction parameter and size parameter of the target image to the target client; the device is used to receive and display the target canvas object returned by the target client in the following manner: receive the target canvas object returned by the target client, wherein the target canvas object is a canvas object synthesized according to the pixel value of the target image and an initial canvas object, the size of the initial canvas object is the canvas object obtained by adjusting the direction parameter and the size parameter according to a preset standard size parameter, and the value of the size parameter of the initial canvas object is smaller than the value of the size parameter of the target image.
[0017] Optionally, the device is used to obtain the target image and upload the target image to the target client when the target event is triggered in the following manner: when the target event is triggered, the target image is obtained, and the first recognition model on the target client is called to recognize the target image to obtain target evaluation parameters, wherein the target evaluation parameters are used to represent the probability of the presence of the target part in the target image, and the first recognition model is used to identify the target part in the target image; when the target evaluation parameters meet preset conditions, the target image is uploaded to the target client.
[0018] Optionally, the device is used to display a second interactive interface based on identification information of the target part when the target client identifies the target part in the following manner: when the target client identifies the target part, calling a second recognition model on the target client to identify a target shape in the target part and determine size parameters of the target shape; determining the target virtual prop from the virtual prop set based on the size parameters of the target shape.
[0019] Optionally, the device is used to call the second recognition model on the target client to identify the target shape in the target part and determine the size parameter of the target shape in the following manner when the target client identifies the target part: call the second recognition model to identify the palm print shape in the palm part and determine the length parameter of the palm print shape when the target client identifies the target part as a palm part, wherein when the palm part includes multiple palm print shapes, the length parameter of the palm print shape is jointly determined according to the length parameters of the multiple palm print shapes; the device is used to determine the target virtual prop from the virtual prop set according to the length parameter of the palm print shape in the following manner: obtain a target value of the length parameter, wherein the target value is the sum of the tens digit value of the length parameter and the ones digit value of the length parameter; determine the target virtual prop corresponding to the target value from the virtual prop set according to the target value, wherein each virtual prop in the virtual prop set is pre-configured with a corresponding identification parameter, and the identification parameter of the target virtual prop is the same as the target value.
[0020] Optionally, the device is used to display a second interactive interface based on the identification information of the target part when the target client identifies the target part in the following manner: when the target virtual prop has been determined, obtaining a key frame set corresponding to the target virtual prop, and displaying the second interactive interface including a first key frame, wherein the first key frame is a key frame pre-set in the key frame set; when a second interactive operation is obtained on the target client, in response to the second interactive operation, replacing the first key frame with a second key frame in the key frame set, and displaying the second interactive interface including the second key frame, wherein the second interactive operation is used to adjust the display angle of the target virtual prop, and the second key frame is a key frame determined according to the operating parameters of the second interactive operation.
[0021] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned method for displaying virtual props when running.
[0022] According to another aspect of the embodiment of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the display method of the virtual props as described above.
[0023] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the virtual prop display method through the computer program.
[0024] In an embodiment of the present application, a first interactive interface is displayed on a target client, wherein the first interactive interface is used to display an image to be identified, the target client is a client that allows a target account to log in, and in response to a first interactive operation performed on the target client, a target image is displayed, wherein the first interactive operation is used to trigger acquisition of a target image, the target image includes a target part that the target client allows to be identified, and when the target client identifies the target part, a second interactive interface is displayed according to identification information of the target part, wherein the second interactive interface displays a target virtual prop, and the target virtual prop is a pre-configured virtual prop set that is consistent with the target. The target virtual props are virtual props corresponding to the identification information of the target part, and the target virtual props are virtual props allowed to be used by the target account. The target image is obtained from the image to be identified through the first interactive operation, and the target virtual props are determined and displayed from the preset virtual props set according to the identification information of the target part in the target image, so that the recognition of the target image is realized only on the client side to avoid the leakage of user information, thereby realizing the technical effect of improving the display efficiency of virtual props, optimizing the virtual props transfer process, and enriching the display method of virtual props, thereby solving the technical problem that user information is easily leaked during the display process of virtual props in the related technology.
[0025] In addition, by identifying the target shape in the target part and determining the target virtual props according to the size parameters of the target shape, the target virtual props determined by different target accounts are made as different as possible, making the virtual props obtained by users more differentiated, allowing users to obtain virtual props in a more personalized way, enriching the display method of virtual props, and further increasing users' willingness to obtain virtual props.
[0026] At the same time, since the collected images are not uploaded directly but uploaded after being resized, the problem of excessive browser computing power and excessive memory usage can be further avoided. The technical effect of reducing computing power can be achieved by optimizing the size and clarity of the image. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0028] Figure 1is a schematic diagram of an application environment of an optional method for displaying virtual props according to an embodiment of the present application;
[0029] Figure 2 is a flowchart of an optional method for displaying virtual props according to an embodiment of the present application;
[0030] Figure 3 is a schematic diagram of an optional method for displaying virtual props according to an embodiment of the present application;
[0031] Figure 4 is a schematic diagram of another optional method for displaying virtual props according to an embodiment of the present application;
[0032] Figure 5 is a schematic diagram of another optional method for displaying virtual props according to an embodiment of the present application;
[0033] Figure 6 is a schematic diagram of another optional method for displaying virtual props according to an embodiment of the present application;
[0034] Figure 7 is a schematic diagram of another optional method for displaying virtual props according to an embodiment of the present application;
[0035] Figure 8 is a schematic diagram of another optional method for displaying virtual props according to an embodiment of the present application;
[0036] Fig. 9 is a schematic diagram of another optional method for displaying virtual props according to an embodiment of the present application;
[0037] Fig.10 is a schematic diagram of another optional method for displaying virtual props according to an embodiment of the present application;
[0038] Fig.11 is a schematic diagram of another optional method for displaying virtual props according to an embodiment of the present application;
[0039] Fig.12 is a schematic structural diagram of an optional display device for virtual props according to an embodiment of the present application;
[0040] Fig.13 is a structural schematic diagram of an optional virtual prop display product according to an embodiment of the present application;
[0041] Fig.14 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0042] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0043] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0044] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretation:
[0045] Palm lines: refers to the lines on the palm.
[0046] Canvas: The Chinese name is "canvas", which is the "container" of all UI components. In a scene, multiple Canvas objects can exist, and Canvas can be "nested" between each other.
[0047] Key frame: refers to a frame where a key action in the motion change of a character or object is located. In this application, it refers to a frame where a key action in the motion change of a virtual prop is located.
[0048] The present application is described below in conjunction with embodiments:
[0049] According to one aspect of an embodiment of the present application, a method for displaying a virtual prop is provided. Optionally, in this embodiment, the method for displaying a virtual prop can be applied to Figure 1 In the hardware environment composed of the server 101 and the terminal device 103 shown in FIG. Figure 1As shown, the server 101 is connected to the terminal 103 through a network, and can be used to provide services for the terminal device or the application installed on the terminal device. The application can be a video application, an instant messaging application, a browser application, an educational application, a game application, etc. A database 105 can be set on the server or independently of the server to provide data storage services for the server 101, for example, a game data storage server. The above network can include but is not limited to: a wired network, a wireless network, wherein the wired network includes: a local area network, a metropolitan area network and a wide area network, and the wireless network includes: Bluetooth, WIFI and other networks that realize wireless communication. The terminal device 103 can be a terminal configured with an application, and can include but is not limited to at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop, a tablet computer, a handheld computer, a MID (Mobile Internet Devices, mobile Internet devices), a PAD, a desktop computer, a smart TV and other computer devices. The above server can be a single server, or a server cluster composed of multiple servers, or a cloud server. The application 107 using the above virtual prop display method is displayed through the terminal device 103 or other connected display devices.
[0050] Combination Figure 1 As shown, the above-mentioned method for displaying virtual props can be implemented in the terminal device 103 through the following steps:
[0051] S1, displaying a first interactive interface on a target client 103, wherein the first interactive interface is used to display an image to be identified, and the target client is a client that allows a target account to log in;
[0052] S2, in response to a first interactive operation performed on the target client 103, displaying a target image, wherein the first interactive operation is used to trigger acquisition of the target image, and the target image includes a target part that the target client allows to be identified;
[0053] S3, when the target client 103 identifies the target part, a second interactive interface is displayed according to the identification information of the target part, wherein the second interactive interface displays a target virtual prop, which is a virtual prop in a pre-configured virtual prop set corresponding to the identification information of the target part, and the target virtual prop is a virtual prop allowed to be used by the target account.
[0054] Optionally, in this embodiment, the above-mentioned method for displaying virtual props can also be implemented by a server, for example, Figure 1 It is implemented in the server 101 shown; or it is implemented by the user terminal and the server together.
[0055] The above is only an example and is not specifically limited in this embodiment.
[0056] Optionally, as an optional implementation, as Figure 2 As shown, the method for displaying the virtual props includes:
[0057] S202, displaying a first interactive interface on a target client, wherein the first interactive interface is used to display an image to be identified, and the target client is a client that allows the target account to log in;
[0058] Optionally, in an embodiment of the present application, the target client may include but is not limited to a game client, an e-commerce client, an instant messaging client, a browser client, etc. The target client logs in through the target account, and the target client is pre-configured with a set of virtual props, wherein the set of virtual props includes virtual props that are allowed to be transferred to the target account.
[0059] Taking a game client as an example, the game client may be a multiplayer online tactical competitive game (Multiplayer Online Battle Arena, referred to as MOBA) or a single-player game (Single-Player Game, referred to as SPG). It should be noted that the types of the game client may include but are not limited to at least one of the following: two-dimensional (Two Dimension, referred to as 2D) game client, three-dimensional (Three Dimension, referred to as 3D) game client, virtual reality (Virtual Reality, referred to as VR) game client, augmented reality (Augmented Reality, referred to as AR) game client, mixed reality (Mixed Reality, referred to as MR) game client. The above is just an example, and this embodiment does not impose any limitation on this.
[0060] Optionally, in an embodiment of the present application, the first interactive interface may include but is not limited to an interactive interface in the target client for transferring virtual items, that is, the target account obtains virtual items by entering the first interactive interface.
[0061] Optionally, in an embodiment of the present application, the above-mentioned images to be identified may include but are not limited to a pre-stored image set, such as a photo album, a picture collection, etc., and the above-mentioned images to be identified may also include but are not limited to images captured in real time by an image acquisition device.
[0062] It should be noted that the above-mentioned image to be recognized can be acquired by an image acquisition device located on the target client, and can also be acquired by an image acquisition device connected to the above-mentioned target client via a network.
[0063] For example, Figure 3is a schematic diagram of an optional method for displaying virtual props according to an embodiment of the present application, such as Figure 3 As shown, it includes interface 302, interface 304, virtual button 306 and virtual button 308, wherein interface 302 is the interactive interface displayed when the target account logs in to the target client and hopes to obtain virtual props. By performing interactive operations on the virtual button 306 on the interface 302, the display interface of the target client is switched from interface 302 to interface 304 (corresponding to the aforementioned first interactive interface). At this time, the image to be identified is displayed in the interface 304. The image to be identified can be an image captured by a camera in real time, or it can be a set of images pre-stored on the terminal where the target client is located. By performing interactive operations on the virtual button 308, the target image can be determined.
[0064] The above is only an example, and this application does not make any specific limitation.
[0065] S204, in response to a first interactive operation performed on the target client, displaying a target image, wherein the first interactive operation is used to trigger acquisition of the target image, and the target image includes a target part that is allowed to be identified by the target client;
[0066] Optionally, in an embodiment of the present application, the above-mentioned first interactive operation may include but is not limited to a combination of one or more interactions and operation methods such as clicking, long pressing, dragging, double-clicking, gestures, and voice.
[0067] Optionally, in an embodiment of the present application, the above-mentioned target image may include but is not limited to an image collected or selected by a target client, and the target client may identify the target part of the image, and the above-mentioned target part may include but is not limited to parts of a biological body such as hands, legs, head, and eyes.
[0068] It should be noted that the above-mentioned target client is pre-configured with a corresponding recognition model for identifying the target part, which may include but is not limited to a supervised or unsupervised target detection model, that is, the above-mentioned recognition model is a model that detects the target part in the image based on artificial intelligence technology.
[0069] Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0070] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0071] Computer Vision (CV) is a science that studies how to make machines "see". To put it more specifically, it refers to machine vision such as using cameras and computers to replace human eyes to identify and measure targets, and further perform graphic processing so that computer processing becomes an image that is more suitable for human eye observation or transmission to instrument detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multi-dimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and map construction, and other technologies, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.
[0072] In this embodiment, an image recognition technology based on computer vision technology is mainly applied to recognize a target part from a target image.
[0073] For example, Figure 4 is a schematic diagram of another optional method for displaying virtual props according to an embodiment of the present application, such as Figure 4 As shown, it includes interface 402, interface 404 and virtual button 406, wherein interface 402 is the first interactive interface for displaying the image to be identified, and the first interactive operation is performed on the virtual button 406 displayed on the first interactive interface to start identifying the target image. During the identification process, interface 402 can be switched to interface 404, and interface 404 is used to indicate an interactive interface for identifying the target image. After the target part is identified, interface 402 is switched to the second interactive interface to display the target virtual props determined according to the identification information obtained by identifying the target part in the target image in the second interactive interface.
[0074] The above is only an example, and this application does not make any specific limitation.
[0075] S206, when the target client identifies the target part, a second interactive interface is displayed according to the identification information of the target part, wherein the second interactive interface displays a target virtual prop, which is a virtual prop in a pre-configured virtual prop set corresponding to the identification information of the target part, and the target virtual prop is a virtual prop allowed to be used by the target account.
[0076] Optionally, in an embodiment of the present application, the target part identified by the target client can be understood as the recognition model configured by the target client scoring the object identified in the target image. If the score satisfies a preset condition, it is determined that the target part is identified in the target image; if the score does not satisfy the preset condition, it is determined that the target part is not identified in the target image.
[0077] Optionally, in an embodiment of the present application, the identification information of the target part may include but is not limited to whether a target shape exists in the target part, and when a target shape exists, size parameters of the target shape.
[0078] For example, when the target part is the palm of a biological body, the target shape may include but is not limited to palm lines, hand contours, etc., and the identification information of the target part may include but is not limited to the length of the palm lines, the length of the hand contours, etc. When the target part is the head of a biological body, the target shape may include but is not limited to the head contour of the head part, the shapes of the eyes, nose, mouth, etc. in the head part, and the identification information of the target part may include but is not limited to the length of the head contour, the length or width of the eyes, nose, mouth and other size information.
[0079] Optionally, in an embodiment of the present application, the second interactive interface is an interactive interface displaying the target virtual props. The target virtual props may include but are not limited to virtual props that are allowed to be transferred to a target account, for example, may include but are not limited to virtual equipment, virtual buildings, virtual vehicles, virtual plants, virtual pets, etc. If the target virtual props are pre-configured with virtual resources required for transfer, the target account needs to have virtual resources exceeding the amount required for the transfer of the target virtual props. When the target virtual props are transferred to the target account, the virtual resources corresponding to the target account are deducted.
[0080] It should be noted that, according to the number of virtual resources possessed by the target account, a corresponding set of virtual props can be configured for the target account, that is, multiple groups of virtual props are pre-configured, each group of virtual props in the multiple groups of virtual props corresponds to a different order of magnitude of virtual resources, when the target account holds virtual resources of a first order of magnitude, the target virtual props are automatically determined for the target account from the virtual prop set corresponding to the first order of magnitude, when the target account holds virtual resources of a second order of magnitude, the target virtual props are automatically determined for the target account from the virtual prop set corresponding to the second order of magnitude, and the first order of magnitude is smaller than the second order of magnitude.
[0081] Optionally, in an embodiment of the present application, the target virtual prop is a virtual prop in a pre-configured virtual prop set that corresponds to the identification information of the target part, which may include but is not limited to pre-configuring different identification parameters for each virtual prop in the virtual prop set, and determining the target identification parameters associated with the target image based on the identification information, and then searching the virtual prop set for a virtual prop with an identification parameter associated with the target identification parameter as the target virtual prop.
[0082] It should be noted that the above-mentioned association relationship may include but is not limited to being the same, greater than, or less than. When the target identification parameter has an association relationship with the identification parameters of multiple virtual props, the target virtual prop can be randomly determined therefrom, or multiple target virtual props that have an association relationship with the target identification parameter can be displayed simultaneously in the second interactive interface.
[0083] For example, Figure 5 is a schematic diagram of another optional method for displaying virtual props according to an embodiment of the present application, such as Figure 5 As shown, interface 502, interface 504 and virtual button 506 are included, wherein interface 502 is the interactive interface on which the target image is displayed. The target image is recognized by performing the first interactive operation on virtual button 506 displayed on interface 502. After the target part is recognized, interface 502 is switched to interface 504 to display the target virtual props determined according to the recognition information obtained by recognizing the target part in the target image in interface 504.
[0084] The above is only an example, and this application does not make any specific limitation.
[0085] For example, Figure 6 is a schematic diagram of another optional method for displaying virtual props according to an embodiment of the present application, such as Figure 6 As shown, the display method of the virtual props can be implemented on the background technology side through the following steps, wherein the virtual props are regarded as the following buildings, and the target part is regarded as the following palm:
[0086] S602, enter the topic (start displaying virtual props);
[0087] S604, loading an artificial intelligence model and a database for identifying a target part, wherein the database may include but is not limited to Open CV (Open Source Computer Vision Library, which is an open source computer vision library);
[0088] S606: Determine whether a first interactive operation is obtained (for example, Figure 3 If the result of the judgment is yes, execute step S608; if the result of the judgment is no, directly execute step S616;
[0089] S608, pull up the camera and start collecting images. If an image is collected, execute step S610; if no image is collected, directly execute step S616;
[0090] S610, identifying whether there is a palm in the image, if there is a palm in the image, executing step S608, if there is no palm in the image, directly executing step S616;
[0091] S612, if there is a palm in the image, identify the size information of the palm print, and if the size information of the palm print in the image is identified, execute step S614, and if the size information of the palm print in the image is not identified, directly execute step S616;
[0092] S614, matching a building according to the size information of the recognized palm print;
[0093] S616, exit.
[0094] Through this embodiment, a first interactive interface is displayed on a target client, wherein the first interactive interface is used to display an image to be identified, and the target client is a client that allows a target account to log in. In response to a first interactive operation performed on the target client, a target image is displayed, wherein the first interactive operation is used to trigger the acquisition of a target image, and the target image includes a target part that the target client allows to be identified. When the target client identifies the target part, a second interactive interface is displayed according to the identification information of the target part, wherein the second interactive interface displays a target virtual prop, and the target virtual prop is a virtual prop in a pre-configured virtual prop set corresponding to the identification information of the target part. The target image is acquired from the image to be identified through the first interactive operation, and the target virtual prop is determined and displayed from a preset virtual prop set according to the identification information of the target part in the target image, so that the identification of the target image is realized only on the client, and the purpose of avoiding leakage of user information is achieved, thereby achieving the technical effect of improving the display efficiency of virtual props, optimizing the virtual props transfer process, and enriching the display method of virtual props, thereby solving the technical problem of easy leakage of user information in the display process of virtual props in the related art.
[0095] As an optional solution, when the target client identifies the target part, a second interactive interface is displayed according to the identification information of the target part, including: when the target part is identified in the target image and the target shape is identified from the target part, size information of the target shape is obtained, wherein the identification information includes size information, and the value of the size information is used to associate with a virtual prop in the virtual prop set; and the target virtual prop is determined from the virtual prop set according to the size information.
[0096] Optionally, in an embodiment of the present application, when the target part is the palm of a biological body, the target shape may include but is not limited to palm print lines, hand contours, etc., and the identification information of the target part may include but is not limited to the length of the palm print lines, the length of the hand contours, etc.; when the target part is the head of a biological body, the target shape may include but is not limited to the head contour of the head part, the shapes of the eyes, nose, mouth, etc. in the head part, and the identification information of the target part may include but is not limited to the length of the head contour, the length or width of the eyes, nose, mouth, and other size information.
[0097] For example, Figure 7 is a schematic diagram of another optional method for displaying virtual props according to an embodiment of the present application, such as Figure 7As shown, it includes interface 702, interface 704, target part 706 and target shape 708, wherein interface 702 is the above-mentioned interactive interface displaying the target image, and the above-mentioned first interactive operation is performed on the virtual button displayed on interface 702 to start recognizing the target image. After the target part is recognized, interface 702 is switched to interface 704 to display the target part 706 in interface 704, and the target part 706 is recognized again to obtain the target shape 708 and the size information corresponding to the target shape 708. Taking the target part 706 as the palm as an example, the target shape may include but is not limited to the palm print in the palm, and the size information is the length of the above-mentioned palm print. The above-mentioned palm print length may include but is not limited to the length of the line segment formed by taking the left end point of each palm print as the starting point and the right end point as the end point, and connecting the starting point and the end point.
[0098] The above is only an example, and this application does not make any specific limitation.
[0099] It should be noted that when the target shape is a palm print, the size information may include but is not limited to the angle of palm print curvature, the number of palm prints, etc.
[0100] Through the embodiments of the present application, the target shape in the target part is identified, and the target virtual props are determined according to the size parameters of the target shape, so that the target virtual props determined by different target accounts are as different as possible, so that the virtual props obtained by the user are more differentiated, allowing the user to obtain virtual props in a more personalized way, enriching the display method of virtual props, and further improving the user's willingness to obtain virtual props.
[0101] As an optional scheme, when a target part is identified in a target image and a target shape is identified from the target part, size information of the target shape is obtained, including: when a palm part is identified in the target image and palm print lines are identified from the palm part, size information of the palm print lines is obtained; or when a palm part is identified in the target image and hand contour lines are identified from the palm part, size information of the hand contour lines is obtained; or when a head part is identified in the target image and a head contour line is identified from the head part, size information of the head contour line is obtained; or when an eyeball part is identified in the target image and an eye contour line is identified from the eyeball part, size information of the eye contour line is obtained.
[0102] Optionally, in an embodiment of the present application, the size information of the palm lines, the size information of the hand contour lines, the size information of the head contour lines, and the size information of the eye contour lines may include but are not limited to length, width, height, etc., and may also include but are not limited to a combination of the above multiple size information.
[0103] As an optional solution, the above method also includes: when the first client identifies the first part, displaying a second interaction interface according to the identification information of the first part, wherein the second interaction interface displays a first virtual prop, and the first virtual prop is a virtual prop in a pre-configured virtual prop set corresponding to the identification information of the first part; when the first client identifies the second part, displaying a second interaction interface according to the identification information of the second part, wherein the second interaction interface displays a second virtual prop, and the second virtual prop is a virtual prop in a pre-configured virtual prop set corresponding to the identification information of the second part, the first part is different from the second part, and the first virtual prop is the same as or different from the second virtual prop.
[0104] Optionally, in an embodiment of the present application, the first part and the second part are different parts obtained by identification, for example, the first part is the palm part, and the second part is the head part. When different parts are identified, different pre-configured virtual prop sets are obtained, and then, different first virtual props and second virtual props are obtained from different pre-configured virtual prop sets. When different parts are identified, the same pre-configured virtual prop set can also be obtained, and different first virtual props and second virtual props are obtained from the same virtual prop set. When different parts are identified, the same pre-configured virtual prop set can also be obtained, and the same first virtual props and second virtual props are obtained from the same virtual prop set.
[0105] It should be noted that different sets of virtual props or different virtual props are essentially associated with the identification information of the parts. Therefore, when different parts are identified, different virtual props can be associated with the identification information of different parts, or the same virtual props can be associated with the identification information of different parts.
[0106] As an optional solution, the method further includes: when a palm part is identified in the target image, displaying a second interaction interface according to the identification information of the palm part, wherein the second interaction interface displays a first virtual prop corresponding to the palm part; when a head part is identified in the target image, displaying a second interaction interface according to the identification information of the head part, wherein the second interaction interface displays a second virtual prop corresponding to the head part; when an arm part is identified in the target image, displaying a second interaction interface according to the identification information of the arm part, wherein the second interaction interface displays a third virtual prop corresponding to the arm part, wherein the third virtual prop is different from both the first virtual prop and the second virtual prop, or the third virtual prop is the same as the first virtual prop and different from the second virtual prop, or the third virtual prop is different from the first virtual prop and the same as the second virtual prop, or the third virtual prop is the same as both the first virtual prop and the second virtual prop.
[0107] Optionally, in an embodiment of the present application, the first virtual prop is a virtual prop corresponding to a palm part, which can be understood as the preset virtual prop set to which the first virtual prop belongs corresponds to the palm part, and then the first virtual prop is determined from the preset virtual prop set to which the first virtual prop belongs based on identification information of the palm part (for example, palm print information, palm color, etc.), and displayed as the display content of the second interactive interface.
[0108] Optionally, in an embodiment of the present application, the second virtual prop is a virtual prop corresponding to the head part, which can be understood as the preset virtual prop set to which the second virtual prop belongs corresponds to the head part, and then the second virtual prop is determined from the preset virtual prop set to which the second virtual prop belongs based on the identification information of the head part (for example, nose length information, mouth width information, etc.), and displayed as the display content of the second interactive interface.
[0109] Optionally, in an embodiment of the present application, the third virtual prop is a virtual prop corresponding to the arm part, which can be understood as the preset virtual prop set to which the third virtual prop belongs corresponds to the arm part, and then the third virtual prop is determined from the preset virtual prop set to which the third virtual prop belongs according to the identification information of the arm part (for example, arm length information, proportion information of the upper arm and forearm, etc.), and displayed as the display content of the second interactive interface.
[0110] It should be noted that the third virtual prop may be the same as the first virtual prop, that is, the virtual prop corresponding to the palm print information of the palm part and the virtual prop corresponding to the arm length information are the same virtual prop. Of course, the third virtual prop may be different from the first virtual prop, that is, the virtual prop corresponding to the palm print information of the palm part and the virtual prop corresponding to the arm length information are different virtual props. The third virtual prop may be the same as the second virtual prop, that is, the virtual prop corresponding to the nose length information of the head part and the virtual prop corresponding to the arm length information are the same virtual prop. Of course, the third virtual prop may be different from the second virtual prop, that is, the virtual prop corresponding to the nose length information of the head part and the virtual prop corresponding to the arm length information are different virtual props.
[0111] The above is only an example, and the embodiments of the present application do not make any specific limitations.
[0112] As an optional solution, in response to a first interactive operation performed on a target client, displaying a target image includes:
[0113] In response to a first sub-interaction operation performed on the target client, a target image acquisition frame is displayed, wherein the target image acquisition frame displays an image to be acquired, the first sub-interaction operation is used to control the target client to start acquiring images, and the first interaction operation includes the first sub-interaction operation; in response to a third sub-interaction operation performed on the target client, the image displayed in the target image acquisition frame is locked as the target image; or
[0114] In response to a second sub-interaction operation performed on the target client, a target image set is displayed, wherein an image to be selected is displayed in the target image set, and the second sub-interaction operation is used to control the target client to display the target image set, and the first interaction operation includes the second sub-interaction operation; in response to a fourth sub-interaction operation performed on the target client, a target image is selected from the target image set, and the first interaction operation includes the fourth sub-interaction operation.
[0115] Optionally, in an embodiment of the present application, the above-mentioned first sub-interaction operation, second sub-interaction operation, third sub-interaction operation and fourth sub-interaction operation may include but are not limited to a combination of one or more interactions and operation methods such as click, long press, drag, double-click, gesture, voice, etc., and the above-mentioned first sub-interaction operation, second sub-interaction operation, third sub-interaction operation and fourth sub-interaction operation may be all the same or all different or partially the same and partially different.
[0116] Optionally, in an embodiment of the present application, the target image acquisition frame may be a capture frame for capturing images by a camera of a terminal where the target client is located, and the image displayed in the target image acquisition frame is a continuously changing image. When a third sub-interaction operation is obtained, the image currently displayed in the target image acquisition frame is locked as the target image.
[0117] For example, Figure 8 is a schematic diagram of another optional method for displaying virtual props according to an embodiment of the present application, such as Figure 8 As shown, interface 802, interface 804 and interface 806 are included, wherein interface 802 is an interactive interface displayed after the target account logs in to the target client, and the first sub-interaction operation is performed on the virtual button "photograph" on interface 802 to start the image acquisition device of the terminal where the above-mentioned target client is located to start acquiring images, and interface 804 is displayed in the target client, and interface 804 displays a target image acquisition frame, and the target image acquisition frame displays the image acquired by the camera in real time. When the second sub-interaction operation is performed on the virtual button, the image currently displayed in the target image acquisition frame is locked as the above-mentioned target image.
[0118] The above is only an example, and this embodiment does not make any specific limitation.
[0119] Optionally, in an embodiment of the present application, the target image set may be an image set stored in a terminal where the target client is located or a connected server, and when the fourth sub-interaction operation is acquired, a target image is selected from the target image set.
[0120] For example, Fig. 9 is a schematic diagram of another optional method for displaying virtual props according to an embodiment of the present application, such as Fig. 9 As shown, interface 902, interface 904 and interface 906 are included, wherein interface 902 is an interactive interface displayed after a target account logs in to a target client, and a third sub-interaction operation is performed on a virtual button "album" on interface 902 to display interface 904 in the target client, and interface 904 displays a target image set. When a fourth sub-interaction operation is performed on an image in the target image set, the selected image is determined as the above-mentioned target image.
[0121] The above is only an example, and this embodiment does not make any specific limitation.
[0122] As an optional solution, when the target client identifies the target part, displaying the second interactive interface according to the identification information of the target part includes:
[0123] Playing a first animation on the target image displayed on the first interactive interface, wherein the first animation is used to indicate that the target image is currently being scanned;
[0124] During the playing of the first animation, a target virtual prop is determined from a pre-configured set of virtual props according to the target image, wherein the first animation is configured to be played in a loop when the target virtual prop is not determined;
[0125] When the target virtual prop has been determined, the first animation is stopped and a second interactive interface including the target virtual prop is displayed.
[0126] Optionally, in an embodiment of the present application, the first animation is used to indicate that the target image is in the scanning process of the target client, and the first animation is configured to be played in a loop or the first animation is configured to be composed of multiple sub-animations, and the multiple sub-animations are played in a loop in sequence. For example, the first animation may include but is not limited to using an animation library to use a preset algorithm to change the transparency and position of the scanning lines generated when scanning the target image, so as to reduce the user's waiting anxiety.
[0127] For example, Fig.10 is a schematic diagram of another optional method for displaying virtual props according to an embodiment of the present application, such as Fig.10As shown, interface 1002 and interface 1004 are included, wherein interface 1002 is a frame of animation in the first animation during the process of identifying the target image, the dotted line is the scan line, and the scan line is moved downward frame by frame to indicate that the target image is being identified. After a preset time, interface 1002 switches to interface 1004, and interface 1004 displays the next frame of animation of a frame in the first animation to indicate the downward movement of the scan line.
[0128] The above is only an example, and this application does not make any specific limitation.
[0129] As an optional solution, when the target client identifies the target part, after displaying the second interactive interface according to the identification information of the target part, the method further includes:
[0130] When the target virtual prop displayed in the second interactive interface is the first image, a second interactive operation is obtained on the target client, wherein the second interactive operation is used to adjust the display angle of the target virtual prop, and the display angle of the target virtual prop in the first image is the first angle;
[0131] In response to the second interaction operation, the first image is replaced with a second image, wherein the display angle of the target virtual prop in the second image is a second angle, and the first angle is different from the second angle.
[0132] Optionally, in an embodiment of the present application, the above-mentioned second interactive operation may include but is not limited to a combination of one or more interactions and operation methods such as clicking, long pressing, dragging, double-clicking, gestures, and voice.
[0133] For example, Fig.11 is a schematic diagram of another optional method for displaying virtual props according to an embodiment of the present application, such as Fig.11 As shown, it includes interface 1102 and interface 1104, wherein interface 1102 is the above-mentioned second interactive interface. By performing a second interactive operation on interface 1102, for example, a rotation operation, the target virtual prop is rotated from a first angle to a second angle in the second interactive interface, so that the user can view the above-mentioned target virtual prop from different angles.
[0134] The above is only an example, and this application does not make any specific limitation.
[0135] As an optional solution, in response to the second interaction operation, replacing the first image with the second image includes:
[0136] In a case where the second interactive operation represents a drag operation on the target virtual prop, in response to the drag operation, the first image is rotated into the second image, wherein the second angle is an angle determined by adding or subtracting the first rotation angle from the first angle according to a direction of the drag operation, and a value of the first rotation angle is positively correlated with a value of a drag distance of the drag operation; or
[0137] In the case where the second interactive operation is a pressing operation performed on the target virtual prop, in response to the pressing operation, the first image is rotated clockwise or counterclockwise into the second image, wherein the second angle is an angle determined by adding the second rotation angle to the first angle according to the duration of the pressing operation, and the value of the second rotation angle is positively correlated with the duration of the pressing operation; or
[0138] When the second interactive operation is a click operation performed on the target virtual prop, in response to the click operation, the first image is switched to the second image, wherein the second angle is an angle determined by adding the third rotation angle to the first angle according to the number of clicks of the click operation, and the value of the third rotation angle is positively correlated with the number of clicks of the click operation.
[0139] Optionally, in an embodiment of the present application, the value of the first rotation angle is determined according to the dragging distance of the drag operation. When the dragging distance is longer, the value of the first rotation angle is larger. The value of the second rotation angle is determined according to the duration of the press operation. When the duration of the press operation is longer, the value of the second rotation angle is larger. The value of the third rotation angle is determined according to the number of clicks of the click operation. When the number of clicks is greater, the value of the third rotation angle is larger.
[0140] As an optional solution, in response to a first interactive operation performed on a target client, displaying a target image includes: detecting a target event corresponding to a target interactive object, wherein the target event is used to obtain a target image after being triggered, and the target interactive object is used to trigger the target event; when the target event is triggered, obtaining the target image, and uploading the target image to the target client;
[0141] The target canvas object returned by the target client is received and displayed, wherein the target canvas object is a canvas object generated by the target client according to the target image, and the target canvas object allows association with a user interface element displayed on the target client.
[0142] Optionally, in an embodiment of the present application, the above-mentioned target event includes but is not limited to an interaction event of detecting a virtual button. After the target event is triggered, the target image uploaded by the user is obtained from the target client using the target algorithm corresponding to the interaction event.
[0143] Optionally, in an embodiment of the present application, the target canvas object may include but is not limited to a canvas object. By creating a layer object for the target image uploaded by the user, a drawing canvas method is called when an upload event occurs on the layer object. The above-mentioned drawing canvas method is used to create a canvas object, and the target image is drawn onto the canvas for display using the drawing layer method of the canvas.
[0144] Optionally, in an embodiment of the present application, the above-mentioned user interface elements may include but are not limited to UI objects, the above-mentioned UI objects may be associated as child nodes of the above-mentioned target canvas objects, and the above-mentioned UI objects may include but are not limited to virtual buttons for performing the above-mentioned first interaction operation and second interaction operation.
[0145] As an optional solution,
[0146] When the trigger event is triggered, a target image is obtained and uploaded to a target client, including: obtaining and uploading the target image and direction parameters and size parameters of the target image to the target client;
[0147] Receiving and displaying a target canvas object returned by a target client includes: receiving the target canvas object returned by the target client, wherein the target canvas object is a canvas object synthesized according to pixel values of a target image and an initial canvas object, the size of the initial canvas object is a canvas object obtained by adjusting direction parameters and size parameters according to preset standard size parameters, and the value of the size parameter of the initial canvas object is smaller than the value of the size parameter of the target image.
[0148] Optionally, in an embodiment of the present application, directly uploading the target image will cause excessive browser computation and occupy too much memory, so the size and clarity of the target image will be optimized first to reduce the amount of computation. The specific logic is: setting the maximum image size to: height 500 width 500 (the value is optional, corresponding to the aforementioned standard size), judging the direction parameters of the target image uploaded by the user, including but not limited to horizontal or vertical spreading. When the width of the target image is greater than the height, the size of the entire target image is scaled by the ratio of the height divided by 500, and the image scaling method is called to scale the target image. The main logic of image scaling is to use the canvas's drawing layer method to draw a picture of a new size (corresponding to the aforementioned standard size), and return the base64 encoded information of the target image (corresponding to the aforementioned pixel value).
[0149] Through the embodiments of the present application, since the collected images are not uploaded directly, but the original collected images are resized before being uploaded, the problem of excessive browser computing power and excessive memory usage can be further avoided. The technical effect of reducing the amount of computing power can be achieved by optimizing the size and clarity of the image.
[0150] As an optional solution, when a target event is triggered, a target image is obtained and uploaded to a target client, including:
[0151] When a target event is triggered, a target image is acquired, and a first recognition model on a target client is called to recognize the target image to obtain a target evaluation parameter, wherein the target evaluation parameter is used to represent the probability that a target part exists in the target image, and the first recognition model is used to recognize the target part in the target image;
[0152] When the target evaluation parameters meet the preset conditions, the target image is uploaded to the target client.
[0153] Optionally, in an embodiment of the present application, the above-mentioned first recognition model is a pre-trained recognition model deployed on the terminal where the target client is located, and the judgment is made according to the object returned by the discovery method by calling the recognition algorithm in the previously loaded artificial intelligence model.
[0154] Object example:
[0155] If the object is recognized, the target evaluation parameter is obtained, and the target evaluation parameter is greater than 0.15 (corresponding to the above preset condition), it means that the target part exists in the target image.
[0156] As an optional solution, when the target client identifies the target part, displaying the second interactive interface according to the identification information of the target part includes:
[0157] When the target client recognizes the target part, calling the second recognition model on the target client to recognize the target shape in the target part and determine the size parameters of the target shape;
[0158] A target virtual prop is determined from the virtual prop set according to the size parameters of the target shape.
[0159] Optionally, in an embodiment of the present application, the second recognition model may include but is not limited to being implemented using an opencv class library.
[0160] For example, if the user successfully uploads his palm, the length of the user's three palm prints is calculated, including but not limited to:
[0161] S1, using a binarization algorithm to perform binarization on the target image;
[0162] S2, performing edge refinement on the target part in the target image;
[0163] S3, locate the start and end points of multiple target shapes;
[0164] S4, calculate the average size parameter of the target shape.
[0165] Taking the target part as the palm and the target shape as the palm print as an example, the palm print length range is preset to 1 to 10, and the value of the length of the line segment connected by the first and last key points of multiple key palm prints is calculated, and only the tens digit and the ones digit are retained, and the two digits are added together. For example, when three palm prints are recognized in the palm, the lengths of the three line segments corresponding to the three palm prints are 313 pixels, then only the value "1" corresponding to the tens digit and the value "3" corresponding to the ones digit are retained, and the two digits are added together to obtain 4, and the virtual prop marked as 4 is taken out from the virtual prop set as the above-mentioned target virtual prop.
[0166] As an optional solution,
[0167] In the case where the target client recognizes the target part, calling the second recognition model on the target client to recognize the target shape in the target part, and determining the size parameter of the target shape, including: in the case where the target client recognizes that the target part is a palm part, calling the second recognition model to recognize the palm print shape in the palm part, and determining the length parameter of the palm print shape, wherein, when the palm part includes multiple palm print shapes, the length parameter of the palm print shape is determined jointly according to the length parameters of the multiple palm print shapes;
[0168] Determining a target virtual prop from a virtual prop set according to a length parameter of a palm print shape includes: obtaining a target value of the length parameter, wherein the target value is the sum of a tens-digit value of the length parameter and a ones-digit value of the length parameter; determining a target virtual prop corresponding to the target value from the virtual prop set according to the target value, wherein each virtual prop in the virtual prop set is pre-configured with a corresponding identification parameter, and the identification parameter of the target virtual prop is the same as the target value.
[0169] As an optional solution, when the target client identifies the target part, displaying the second interactive interface according to the identification information of the target part includes:
[0170] When the target virtual prop has been determined, a key frame set corresponding to the target virtual prop is obtained, and a second interactive interface including a first key frame is displayed, wherein the first key frame is a key frame preset in the key frame set;
[0171] When a second interactive operation is obtained on the target client, in response to the second interactive operation, the first key frame is replaced with a second key frame in the key frame set, and a second interactive interface including the second key frame is displayed, wherein the second interactive operation is used to adjust the display angle of the target virtual prop, and the second key frame is a key frame determined according to the operating parameters of the second interactive operation.
[0172] The present application is further explained below with reference to specific examples:
[0173] The interaction process on the client is as follows:
[0174] S1, the camera button is displayed when the user enters the page;
[0175] S2, click to pull up the camera to take a photo;
[0176] S3, after taking the photo, AI is used to identify whether it is a palm and determine the type of palm veins;
[0177] S4, after the recognition is completed, the exclusive building is matched for the user, and the user can use his fingers to drag the building left and right to view and interact, where the building is a combination of key frames.
[0178] S5. After the user confirms the building, he / she will arrive at the landing page to form a team and draw a lottery, and can return to the building that he / she has matched.
[0179] On the background technology side, the core of this application is the combination of multiple technologies to achieve a novel form of interaction, in which the recognition of palms and handprints are all operated on the user's local machine, without causing user privacy issues. After the above logic is completed, the user will be matched with an exclusive building, and can move freely left and right to view, bringing a brand new interactive experience.
[0180] This application will first identify whether the user's photo is a palm. Palm recognition uses an open source model: the model is trained with a data set that includes opening and closing palms, fingers, and portrait face pinching. The smallest artificial intelligence model is only 2M in size on the mobile phone and can be quickly loaded on the client to achieve a good experience.
[0181] Specific algorithm: After extracting the palm print, use the canvas to determine the total length of the palm print segment and divide it by 3 to obtain a unique value from 1 to 10 as the index value of the displayed house.
[0182] Specific implementation steps:
[0183] S1, loading AI models and databases;
[0184] Among them, S1, upload image: after the user logs in, a test button will appear, which allows the user to select an image in the camera or the album of the current terminal device;
[0185] Specific logic: Detect the interaction event of the button. After it is triggered, use the target algorithm corresponding to the interaction event to obtain the image resource uploaded by the user. If the uploaded resource is not an image, return it. If it is, enter S3.
[0186] S2, display the image selected by the user in the scanning box: create a layer object for the image uploaded by the user, call the drawing canvas method when an upload event occurs in the layer object, the drawing canvas method is used to create a canvas, and use the canvas's drawing layer method to draw the image uploaded by the user onto the canvas for display;
[0187] S3, scanning animation appears: Scanning animation reduces users’ waiting anxiety and is triggered after the image is displayed;
[0188] S4, optimize images: Directly uploading images will cause the browser to perform too much computation and occupy too much memory, so the image size and clarity will be optimized first to reduce the amount of computation. The specific logic is:
[0189] Set the maximum image size to: height 500 x width 500. First, determine the direction of the image uploaded by the user, whether it is horizontal or vertical. If the width is greater than the height, scale the entire image by the ratio of the height divided by 500, and call the image scaling method to scale the image. The main logic of image scaling is to use the canvas's drawing layer method to draw an image of a new size and return the base64 encoding of the current image.
[0190] S5, call the artificial intelligence algorithm to determine whether the current user uploads a palm. The specific logic is:
[0191] Call the recognition algorithm in the previously loaded artificial intelligence model; make a judgment based on the object returned by the recognition algorithm. For example, if the object is recognized and the evaluation parameter of the object is greater than 0.15, it means that the palm is recognized and you can proceed to the next step;
[0192] S6, matching the user's exclusive building based on the palm print: If the user successfully uploads the palm, the length of the user's three palm prints is calculated. The specific logic is:
[0193] 1. Use recognition algorithm to binarize the image;
[0194] 2. Thin the edge of the palm image;
[0195] 3. Locate the starting and ending points of the three palm lines;
[0196] 4. Calculate the average length of palm lines;
[0197] Finally, the length of the user's palm print is returned, ranging from 1 to 10. The specific algorithm example is:
[0198] Calculate the length of the line segment formed by the first and last key points of the three key palmprints, and only keep the tens digit and the ones digit, and add the two digits. For example, if the length of the three line segments is 313 pixels, only keep the tens digit value "1" and the ones digit value "3", and add the two digits to get 4, and finally match building 4;
[0199] S7, display and move the currently matched building:
[0200] Because mobile video compatibility is poor, canvas is used to draw animation keyframes, and image materials are preloaded immediately after recognition to save users loading time. The specific logic is: first load the material image of the current building, and then switch the image address of the current keyframe according to the movement of the user's finger. After the building appears, dragging the finger left and right will rotate the current building. Each keyframe set contains transparent images of various angles within 180 degrees of the building;
[0201] S8. After the user clicks to confirm the building, he / she will reach the landing page interface to continue the subsequent process.
[0202] Through the embodiments of the present application, since most of the current artificial intelligence recognition mini-programs / web interactive forms are implemented using online interfaces, an extra http request is required, which will increase the interaction time. In addition, the user's photos are transmitted to the server for synthesis, which will lead to the risk of user information leakage. Moreover, because of the need to deploy a back-end server, the product cost will also increase. The present application will directly utilize the recognition capabilities of the computing power of the terminal device used by the user, which will provide a good interactive experience and will not cause information leakage and cost issues.
[0203] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0204] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0205] According to another aspect of the embodiment of the present application, a virtual prop display device for implementing the above virtual prop display method is also provided. Fig.12 As shown, the device comprises:
[0206] A first display module 1202 is used to display a first interactive interface on a target client, wherein the first interactive interface is used to display an image to be identified, and the target client is a client that allows a target account to log in;
[0207] A second display module 1204 is configured to display a target image in response to a first interactive operation performed on the target client, wherein the first interactive operation is used to trigger acquisition of the target image, and the target image includes a target part that the target client allows to be identified;
[0208] The third display module 1206 is used to display a second interactive interface according to the identification information of the target part when the target client identifies the target part, wherein the second interactive interface displays the target virtual props, the target virtual props are virtual props in a pre-configured virtual prop set corresponding to the identification information of the target part, and the target virtual props are virtual props allowed to be used by the target account.
[0209] As an optional solution, the device is used to display a second interactive interface based on identification information of the target part when the target client identifies the target part in the following manner: when the target part is identified in the target image and a target shape is identified from the target part, obtaining size information of the target shape, wherein the identification information includes the size information, and the value of the size information is used to associate with a virtual prop in the virtual prop set; and determining the target virtual prop from the virtual prop set based on the size information.
[0210] As an optional scheme, the device is used to obtain size information of the target shape when the target part is identified in the target image and the target shape is identified from the target part in the following manner: when the palm part is identified in the target image and the palm print lines are identified from the palm part, the size information of the palm print lines is obtained; or when the palm part is identified in the target image and the hand contour lines are identified from the palm part, the size information of the hand contour lines is obtained; or when the head part is identified in the target image and the head contour lines are identified from the head part, the size information of the head contour lines is obtained; or when the eyeball part is identified in the target image and the eye contour lines are identified from the eyeball part, the size information of the eye contour lines is obtained.
[0211] As an optional solution, the device is also used to: when the first client identifies the first part, display the second interaction interface according to the identification information of the first part, wherein the second interaction interface displays the first virtual prop, and the first virtual prop is a virtual prop in a pre-configured virtual prop set corresponding to the identification information of the first part; when the first client identifies the second part, display the second interaction interface according to the identification information of the second part, wherein the second interaction interface displays the second virtual prop, and the second virtual prop is a virtual prop in a pre-configured virtual prop set corresponding to the identification information of the second part, the first part is different from the second part, and the first virtual prop is the same as or different from the second virtual prop.
[0212] As an optional solution, the device is also used for: when a palm part is recognized in the target image, displaying the second interaction interface according to the identification information of the palm part, wherein the second interaction interface displays the first virtual prop corresponding to the palm part; when a head part is recognized in the target image, displaying the second interaction interface according to the identification information of the head part, wherein the second interaction interface displays the second virtual prop corresponding to the head part; when an arm part is recognized in the target image, displaying the second interaction interface according to the identification information of the arm part, wherein the second interaction interface displays a third virtual prop corresponding to the arm part, wherein the third virtual prop is different from both the first virtual prop and the second virtual prop, or the third virtual prop is the same as the first virtual prop and different from the second virtual prop, or the third virtual prop is different from the first virtual prop and the same as the second virtual prop, or the third virtual prop is the same as both the first virtual prop and the second virtual prop.
[0213] As an optional scheme, the device is used to display a target image in response to a first interactive operation performed on the target client in the following manner: in response to a first sub-interactive operation performed on the target client, a target image acquisition frame is displayed, wherein the target image acquisition frame displays an image to be acquired, the first sub-interactive operation is used to control the target client to start acquiring images, and the first interactive operation includes the first sub-interactive operation; in response to a third sub-interactive operation performed on the target client, the image displayed in the target image acquisition frame is locked as the target image; or in response to a second sub-interactive operation performed on the target client, a target image set is displayed, wherein the target image set displays an image to be selected, the second sub-interactive operation is used to control the target client to display the target image set, and the first interactive operation includes the second sub-interactive operation; in response to a fourth sub-interactive operation performed on the target client, the target image is selected from the target image set, and the first interactive operation includes the fourth sub-interactive operation.
[0214] As an optional solution, the device is used to display a second interactive interface based on the identification information of the target part when the target client identifies the target part in the following manner: playing a first animation on the target image displayed on the first interactive interface, wherein the first animation is used to indicate that the target image is currently being scanned; during the playing of the first animation, determining the target virtual prop from the pre-configured virtual prop set based on the target image, wherein the first animation is configured to be played in a loop when the target virtual prop is not determined; when the target virtual prop has been determined, stopping playing the first animation and displaying the second interactive interface including the target virtual prop.
[0215] As an optional scheme, the device is also used for: when the target client identifies the target part, after displaying a second interactive interface according to the identification information of the target part, when the target virtual prop displayed in the second interactive interface is a first image, obtaining a second interactive operation on the target client, wherein the second interactive operation is used to adjust the display angle of the target virtual prop, and the display angle of the target virtual prop in the first image is a first angle; in response to the second interactive operation, replacing the first image with a second image, wherein the display angle of the target virtual prop in the second image is a second angle, and the first angle is different from the second angle.
[0216] As an optional solution, the device is used to replace the first image with the second image in response to the second interactive operation in the following manner: when the second interactive operation represents a drag operation on the target virtual prop, in response to the drag operation, the first image is rotated to the second image, wherein the second angle is an angle determined by adding or subtracting the first rotation angle to the first angle according to the direction of the drag operation, and the value of the first rotation angle is positively correlated with the value of the drag distance of the drag operation; or when the second interactive operation is a pressing operation performed on the target virtual prop, in response to the pressing operation, the first image is rotated to the second image. The first image is rotated clockwise or counterclockwise to the second image, wherein the second angle is the angle determined by adding the second rotation angle to the first angle according to the duration of the pressing operation, and the value of the second rotation angle is positively correlated with the duration of the pressing operation; or in the case where the second interactive operation is a click operation performed on the target virtual prop, in response to the click operation, the first image is switched to the second image, wherein the second angle is the angle determined by adding the third rotation angle to the first angle according to the number of clicks of the click operation, and the value of the third rotation angle is positively correlated with the number of clicks of the click operation.
[0217] As an optional solution, the device is used to display a target image in response to a first interactive operation performed on the target client in the following manner: detecting a target event corresponding to a target interactive object, wherein the target event is used to obtain the target image after being triggered, and the target interactive object is used to trigger the target event; when the target event is triggered, obtaining the target image and uploading the target image to the target client; receiving and displaying a target canvas object returned by the target client, wherein the target canvas object is a canvas object generated by the target client based on the target image, and the target canvas object allows association with a user interface element displayed on the target client.
[0218] As an optional solution, the device is used to obtain the target image and upload the target image to the target client when the trigger event is triggered in the following manner: obtain and upload the target image and the direction parameter and size parameter of the target image to the target client; the device is used to receive and display the target canvas object returned by the target client in the following manner: receive the target canvas object returned by the target client, wherein the target canvas object is a canvas object synthesized according to the pixel value of the target image and an initial canvas object, the size of the initial canvas object is the canvas object obtained by adjusting the direction parameter and the size parameter according to a preset standard size parameter, and the value of the size parameter of the initial canvas object is smaller than the value of the size parameter of the target image.
[0219] As an optional scheme, the device is used to obtain the target image and upload the target image to the target client when the target event is triggered in the following manner: when the target event is triggered, the target image is obtained, and the first recognition model on the target client is called to recognize the target image to obtain a target evaluation parameter, wherein the target evaluation parameter is used to represent the probability that the target part exists in the target image, and the first recognition model is used to identify the target part in the target image; when the target evaluation parameter meets a preset condition, the target image is uploaded to the target client.
[0220] As an optional solution, the device is used to display a second interactive interface based on the identification information of the target part when the target client identifies the target part in the following manner: when the target client identifies the target part, calling a second recognition model on the target client to identify the target shape in the target part and determine the size parameters of the target shape; determining the target virtual prop from the virtual prop set based on the size parameters of the target shape.
[0221] As an optional solution, the device is used to call the second recognition model on the target client to identify the target shape in the target part and determine the size parameter of the target shape in the following manner when the target client recognizes the target part: when the target client recognizes that the target part is a palm part, call the second recognition model to identify the palm print shape in the palm part and determine the length parameter of the palm print shape, wherein when the palm part includes multiple palm print shapes, the length parameter of the palm print shape is jointly determined according to the length parameters of the multiple palm print shapes; the device is used to determine the target virtual prop from the virtual prop set according to the length parameter of the palm print shape in the following manner: obtain a target value of the length parameter, wherein the target value is the sum of the tens digit value of the length parameter and the ones digit value of the length parameter; determine the target virtual prop corresponding to the target value from the virtual prop set according to the target value, wherein each virtual prop in the virtual prop set is pre-configured with a corresponding identification parameter, and the identification parameter of the target virtual prop is the same as the target value.
[0222] As an optional solution, the device is used to display a second interactive interface based on the identification information of the target part when the target client identifies the target part in the following manner: when the target virtual prop has been determined, a key frame set corresponding to the target virtual prop is obtained, and the second interactive interface including a first key frame is displayed, wherein the first key frame is a key frame pre-set in the key frame set; when a second interactive operation is obtained on the target client, in response to the second interactive operation, the first key frame is replaced with a second key frame in the key frame set, and the second interactive interface including the second key frame is displayed, wherein the second interactive operation is used to adjust the display angle of the target virtual prop, and the second key frame is a key frame determined according to the operation parameters of the second interactive operation.
[0223] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 1309, and / or installed from a removable medium 1311. When the computer program is executed by the central processor 1301, various functions provided in the embodiments of the present application are executed.
[0224] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0225] Fig.13The structure block diagram of a computer system for implementing an electronic device according to an embodiment of the present application is schematically shown.
[0226] It should be noted that Fig.13 The computer system 1300 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0227] like Fig.13 As shown, the computer system 1300 includes a central processing unit 1301 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 1302 (ROM) or the program loaded from the storage part 1308 to the random access memory 1303 (RAM). Various programs and data required for system operation are also stored in the random access memory 1303. The central processing unit 1301, the read-only memory 1302 and the random access memory 1303 are connected to each other through a bus 1304. The input / output interface 1305 (Input / Output interface, i.e., I / O interface) is also connected to the bus 1304.
[0228] The following components are connected to the input / output interface 1305: an input section 1306 including a keyboard, a mouse, etc.; an output section 1307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1308 including a hard disk, etc.; and a communication section 1309 including a network interface card such as a LAN card, a modem, etc. The communication section 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to the input / output interface 1305 as needed. A removable medium 1311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1310 as needed so that a computer program read therefrom is installed into the storage section 1308 as needed.
[0229] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1309, and / or installed from the removable medium 1311. When the computer program is executed by the central processor 1301, various functions defined in the system of the present application are executed.
[0230] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned virtual prop display method is also provided. The electronic device may be Figure 1 The terminal device or server shown in the figure. This embodiment is described by taking the electronic device as a terminal device as an example. Fig.14 As shown, the electronic device includes a memory 1402 and a processor 1404. The memory 1402 stores a computer program, and the processor 1404 is configured to execute the steps in any of the above method embodiments through the computer program.
[0231] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0232] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0233] S1, displaying a first interactive interface on a target client, wherein the first interactive interface is used to display an image to be identified, and the target client is a client that allows a target account to log in;
[0234] S2, in response to a first interactive operation performed on the target client, displaying a target image, wherein the first interactive operation is used to trigger acquisition of the target image, and the target image includes a target part that the target client allows to be identified;
[0235] S3, when the target client identifies the target part, a second interactive interface is displayed according to the identification information of the target part, wherein the second interactive interface displays a target virtual prop, which is a virtual prop in a pre-configured virtual prop set corresponding to the identification information of the target part, and the target virtual prop is a virtual prop allowed to be used by the target account.
[0236] Alternatively, a person skilled in the art may understand that: Fig.14The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, and other terminal devices. Fig.14 The electronic device and the electronic equipment described above are not limited in structure. Fig.14 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.14 Different configurations are shown.
[0237] Among them, the memory 1402 can be used to store software programs and modules, such as the program instructions / modules corresponding to the display method and device of virtual props in the embodiments of the present application. The processor 1404 executes various functional applications and data processing by running the software programs and modules stored in the memory 1402, that is, realizing the above-mentioned display method of virtual props. The memory 1402 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1402 may further include a memory remotely arranged relative to the processor 1404, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1402 can be specifically, but not limited to, used to store information such as image resources. As an example, such as Fig.14 As shown, the memory 1402 may include, but is not limited to, the first display module 1202, the second display module 1204, and the third display module 1206 in the display device of the virtual props. In addition, other module units in the display device of the virtual props may also be included but are not limited to, which will not be repeated in this example.
[0238] Optionally, the transmission device 1406 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 1406 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1406 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0239] In addition, the electronic device further includes: a display 1408 for displaying the first interaction interface and the second interaction interface; and a connection bus 1410 for connecting various module components in the electronic device.
[0240] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. Among them, the nodes may form a peer-to-peer (P2P, Peer To Peer) network, and any form of computing device, such as a server, terminal and other electronic devices, may become a node in the blockchain system by joining the peer-to-peer network.
[0241] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the virtual prop display method provided in various optional implementations of the above-mentioned virtual prop display aspects.
[0242] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0243] S1, displaying a first interactive interface on a target client, wherein the first interactive interface is used to display an image to be identified, and the target client is a client that allows a target account to log in;
[0244] S2, in response to a first interactive operation performed on the target client, displaying a target image, wherein the first interactive operation is used to trigger acquisition of the target image, and the target image includes a target part that the target client allows to be identified;
[0245] S3, when the target client identifies the target part, a second interactive interface is displayed according to the identification information of the target part, wherein the second interactive interface displays a target virtual prop, which is a virtual prop in a pre-configured virtual prop set corresponding to the identification information of the target part, and the target virtual prop is a virtual prop allowed to be used by the target account.
[0246] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0247] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0248] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0249] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0250] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0251] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0252] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0253] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for displaying a virtual prop, characterized in that: include: Displaying a first interactive interface on a target client, wherein the first interactive interface is used to display an image to be identified, and the target client is a client logged in by a target account; In response to a first interactive operation performed on the target client, displaying a target image, wherein the first interactive operation is used to trigger acquisition of the target image, and the target image includes a target part that the target client allows to be identified; When the target client identifies the target part, a second interactive interface is displayed according to the identification information of the target part, wherein the second interactive interface displays a target virtual prop, the target virtual prop is a virtual prop in a pre-configured virtual prop set corresponding to the identification information of the target part, and the target virtual prop is a virtual prop allowed to be used by the target account; The method further includes: identifying a target shape from the target part; obtaining a target value of a length parameter of the target shape, wherein the target value is the sum of a tens-digit value of the length parameter and a ones-digit value of the length parameter; and determining, from the virtual prop set according to the target value, the target virtual prop corresponding to the target value, wherein each virtual prop in the virtual prop set is pre-configured with a corresponding identification parameter, and the identification parameter of the target virtual prop is the same as the target value.
2. The method according to claim 1, characterized in that When the target client identifies the target part, displaying a second interactive interface according to the identification information of the target part includes: When the target part is identified in the target image and the target shape is identified from the target part, size information of the target shape is acquired, wherein the identification information includes the size information, and a value of the size information is used to associate with a virtual prop in the virtual prop set; The target virtual prop is determined from the virtual prop set according to the size information.
3. The method according to claim 2, characterized in that When the target part is identified in the target image and the target shape is identified from the target part, obtaining size information of the target shape includes: When a palm part is identified in the target image and a palm print line is identified from the palm part, size information of the palm print line is obtained, or When the palm part is identified in the target image and the hand outline is identified from the palm part, the size information of the hand outline is obtained, or When a head part is identified in the target image and a head outline is identified from the head part, size information of the head outline is obtained, or When an eyeball part is recognized in the target image and an eye contour line is recognized from the eyeball part, size information of the eye contour line is acquired.
4. The method according to claim 1, characterized in that: The method further comprises: When the first client identifies the first part, the second interactive interface is displayed according to the identification information of the first part, wherein the second interactive interface displays a first virtual prop, and the first virtual prop is a virtual prop in a pre-configured virtual prop set corresponding to the identification information of the first part; When the first client recognizes the second part, the second interaction interface is displayed according to the identification information of the second part, wherein the second interaction interface displays a second virtual prop, the second virtual prop is a virtual prop in a pre-configured virtual prop set corresponding to the identification information of the second part, the first part is different from the second part, and the first virtual prop is the same as or different from the second virtual prop.
5. The method according to claim 4, characterized in that The method further comprises: When a palm part is identified in the target image, displaying the second interaction interface according to the identification information of the palm part, wherein the second interaction interface displays the first virtual prop corresponding to the palm part; When a head part is identified in the target image, displaying the second interaction interface according to the identification information of the head part, wherein the second interaction interface displays the second virtual prop corresponding to the head part; In the case where an arm part is recognized in the target image, the second interaction interface is displayed according to the recognition information of the arm part, wherein the second interaction interface displays a third virtual prop corresponding to the arm part, wherein the third virtual prop is different from both the first virtual prop and the second virtual prop, or the third virtual prop is the same as the first virtual prop and different from the second virtual prop, or the third virtual prop is different from the first virtual prop and the same as the second virtual prop, or the third virtual prop is the same as both the first virtual prop and the second virtual prop.
6. The method according to claim 1, characterized in that The step of displaying a target image in response to a first interactive operation performed on the target client comprises: In response to a first sub-interaction operation performed on the target client, a target image acquisition frame is displayed, wherein the target image acquisition frame displays an image to be acquired, the first sub-interaction operation is used to control the target client to start acquiring images, and the first interaction operation includes the first sub-interaction operation; in response to a third sub-interaction operation performed on the target client, the image displayed in the target image acquisition frame is locked as the target image; or In response to a second sub-interaction operation performed on the target client, a target image set is displayed, wherein the target image set displays an image to be selected, the second sub-interaction operation is used to control the target client to display the target image set, and the first interaction operation includes the second sub-interaction operation; in response to a fourth sub-interaction operation performed on the target client, the target image is selected from the target image set, and the first interaction operation includes the fourth sub-interaction operation.
7. The method according to claim 1, characterized in that When the target client identifies the target part, displaying a second interactive interface according to the identification information of the target part includes: Playing a first animation on the target image displayed on the first interactive interface, wherein the first animation is used to indicate that the target image is currently being scanned; During the playing of the first animation, determining the target virtual prop from the pre-configured virtual prop set according to the target image, wherein the first animation is configured to be played in a loop when the target virtual prop is not determined; When the target virtual prop has been determined, the first animation is stopped from being played, and the second interactive interface including the target virtual prop is displayed.
8. The method according to claim 1, characterized in that In the case where the target client identifies the target part, after displaying the second interaction interface according to the identification information of the target part, the method further includes: When the target virtual prop displayed in the second interaction interface is a first image, obtaining a second interaction operation on the target client, wherein the second interaction operation is used to adjust a display angle of the target virtual prop, and the display angle of the target virtual prop in the first image is a first angle; In response to the second interaction operation, the first image is replaced with a second image, wherein a display angle of the target virtual prop in the second image is a second angle, and the first angle is different from the second angle.
9. The method according to claim 8, characterized in that Replacing the first image with a second image in response to the second interaction operation includes: In a case where the second interactive operation represents a drag operation on the target virtual item, in response to the drag operation, the first image is rotated to the second image, wherein the second angle is an angle determined by adding or subtracting the first rotation angle from the first angle according to the direction of the drag operation, and the value of the first rotation angle is positively correlated with the value of the drag distance of the drag operation; or In a case where the second interactive operation is a pressing operation performed on the target virtual item, in response to the pressing operation, the first image is rotated clockwise or counterclockwise to the second image, wherein the second angle is an angle determined by adding the second rotation angle to the first angle according to the duration of the pressing operation, and the value of the second rotation angle is positively correlated with the duration of the pressing operation; or In a case where the second interactive operation is a click operation performed on the target virtual prop, the first image is switched to the second image in response to the click operation, wherein the second angle is an angle determined by adding a third rotation angle to the first angle based on the number of clicks of the click operation, and the value of the third rotation angle is positively correlated with the number of clicks of the click operation.
10. The method according to any one of claims 1 to 9, characterized in that The step of displaying a target image in response to a first interactive operation performed on the target client comprises: Detecting a target event corresponding to a target interactive object, wherein the target event is used to obtain the target image after being triggered, and the target interactive object is used to trigger the target event; When the target event is triggered, acquiring the target image, and uploading the target image to the target client; A target canvas object returned by the target client is received and displayed, wherein the target canvas object is a canvas object generated by the target client according to the target image, and the target canvas object allows association with a user interface element displayed on the target client.
11. The method according to claim 10, characterized in that When the target event is triggered, acquiring the target image and uploading the target image to the target client includes: acquiring and uploading the target image and the direction parameter and size parameter of the target image to the target client; The receiving and displaying the target canvas object returned by the target client includes: receiving the target canvas object returned by the target client, wherein the target canvas object is a canvas object synthesized according to the pixel value of the target image and the initial canvas object, the size of the initial canvas object is obtained by adjusting the direction parameter and the size parameter according to a preset standard size parameter, and the value of the size parameter of the initial canvas object is smaller than the value of the size parameter of the target image.
12. The method according to claim 10, characterized in that When the target event is triggered, acquiring the target image and uploading the target image to the target client includes: When the target event is triggered, the target image is acquired, and a first recognition model on the target client is called to recognize the target image to obtain a target evaluation parameter, wherein the target evaluation parameter is used to represent the probability that the target part exists in the target image, and the first recognition model is used to recognize the target part in the target image; When the target evaluation parameter meets a preset condition, the target image is uploaded to the target client.
13. The method according to any one of claims 1 to 9, characterized in that When the target client identifies the target part, displaying a second interactive interface according to the identification information of the target part includes: In the case where the target client recognizes the target part, calling a second recognition model on the target client to recognize the target shape in the target part, and determining size parameters of the target shape; The target virtual prop is determined from the virtual prop set according to the size parameter of the target shape.
14. The method according to claim 13, characterized in that In the case where the target client recognizes the target part, calling the second recognition model on the target client to recognize the target shape in the target part and determining the size parameter of the target shape, including: in the case where the target client recognizes that the target part is a palm part, calling the second recognition model to recognize the palm print shape in the palm part and determining the length parameter of the palm print shape, wherein when the palm part includes a plurality of palm print shapes, the length parameter of the palm print shape is determined jointly according to the length parameters of the plurality of palm print shapes; The step of determining the target virtual prop from the virtual prop set according to the length parameter of the palm print shape comprises: obtaining a target value of the length parameter, wherein the target value is the sum of a tens digit value of the length parameter and a ones digit value of the length parameter; and determining the target virtual prop corresponding to the target value from the virtual prop set according to the target value, wherein each virtual prop in the virtual prop set is pre-configured with a corresponding identification parameter, and the identification parameter of the target virtual prop is the same as the target value.
15. The method according to any one of claims 1 to 9, characterized in that When the target client identifies the target part, displaying a second interactive interface according to the identification information of the target part includes: When the target virtual prop has been determined, a key frame set corresponding to the target virtual prop is obtained, and the second interactive interface including a first key frame is displayed, wherein the first key frame is a key frame preset in the key frame set; In the case where a second interactive operation is obtained on the target client, in response to the second interactive operation, the first key frame is replaced with a second key frame in the key frame set, and the second interactive interface including the second key frame is displayed, wherein the second interactive operation is used to adjust the display angle of the target virtual prop, and the second key frame is a key frame determined according to the operating parameters of the second interactive operation.
16. A display device for virtual props, characterized in that: include: A first display module, used to display a first interactive interface on a target client, wherein the first interactive interface is used to display an image to be identified, and the target client is a client that allows a target account to log in; A second display module, configured to display a target image in response to a first interactive operation performed on the target client, wherein the first interactive operation is used to trigger acquisition of the target image, and the target image includes a target part that the target client allows to be identified; A third display module is used to display a second interactive interface according to the identification information of the target part when the target client identifies the target part, wherein the second interactive interface displays a target virtual prop, the target virtual prop is a virtual prop in a pre-configured virtual prop set corresponding to the identification information of the target part, and the target virtual prop is a virtual prop allowed to be used by the target account; The device is also used to: identify a target shape from the target part; obtain a target value of a length parameter of the target shape, wherein the target value is the sum of a tens-digit value of the length parameter and a ones-digit value of the length parameter; and determine the target virtual prop corresponding to the target value from the virtual prop set according to the target value, wherein each virtual prop in the virtual prop set is pre-configured with a corresponding identification parameter, and the identification parameter of the target virtual prop is the same as the target value.
17. The device according to claim 16, characterized in that The device is used to display a second interactive interface according to the identification information of the target part when the target client identifies the target part in the following manner: When the target part is identified in the target image and the target shape is identified from the target part, size information of the target shape is acquired, wherein the identification information includes the size information, and a value of the size information is used to associate with a virtual prop in the virtual prop set; The target virtual prop is determined from the virtual prop set according to the size information.
18. The device according to claim 17, characterized in that The device is used to obtain the size information of the target shape when the target part is identified in the target image and the target shape is identified from the target part in the following manner: When a palm part is identified in the target image and a palm print line is identified from the palm part, size information of the palm print line is obtained, or When the palm part is identified in the target image and the hand outline is identified from the palm part, the size information of the hand outline is obtained, or When a head part is identified in the target image and a head outline is identified from the head part, size information of the head outline is obtained, or When an eyeball part is recognized in the target image and an eye contour line is recognized from the eyeball part, size information of the eye contour line is acquired.
19. The device according to claim 16, characterized in that The device is also used for: When the first client identifies the first part, the second interactive interface is displayed according to the identification information of the first part, wherein the second interactive interface displays a first virtual prop, and the first virtual prop is a virtual prop in a pre-configured virtual prop set corresponding to the identification information of the first part; When the first client recognizes the second part, the second interaction interface is displayed according to the identification information of the second part, wherein the second interaction interface displays a second virtual prop, the second virtual prop is a virtual prop in a pre-configured virtual prop set corresponding to the identification information of the second part, the first part is different from the second part, and the first virtual prop is the same as or different from the second virtual prop.
20. The device according to claim 19, characterized in that The device is also used for: When a palm part is identified in the target image, displaying the second interaction interface according to the identification information of the palm part, wherein the second interaction interface displays the first virtual prop corresponding to the palm part; When a head part is identified in the target image, displaying the second interaction interface according to the identification information of the head part, wherein the second interaction interface displays the second virtual prop corresponding to the head part; In the case where an arm part is recognized in the target image, the second interaction interface is displayed according to the recognition information of the arm part, wherein the second interaction interface displays a third virtual prop corresponding to the arm part, wherein the third virtual prop is different from both the first virtual prop and the second virtual prop, or the third virtual prop is the same as the first virtual prop and different from the second virtual prop, or the third virtual prop is different from the first virtual prop and the same as the second virtual prop, or the third virtual prop is the same as both the first virtual prop and the second virtual prop.
21. The device according to claim 16, characterized in that The device is used to display a target image in response to a first interactive operation performed on the target client in the following manner: In response to a first sub-interaction operation performed on the target client, a target image acquisition frame is displayed, wherein the target image acquisition frame displays an image to be acquired, the first sub-interaction operation is used to control the target client to start acquiring images, and the first interaction operation includes the first sub-interaction operation; in response to a third sub-interaction operation performed on the target client, the image displayed in the target image acquisition frame is locked as the target image; or In response to a second sub-interaction operation performed on the target client, a target image set is displayed, wherein the target image set displays an image to be selected, the second sub-interaction operation is used to control the target client to display the target image set, and the first interaction operation includes the second sub-interaction operation; in response to a fourth sub-interaction operation performed on the target client, the target image is selected from the target image set, and the first interaction operation includes the fourth sub-interaction operation.
22. The device according to claim 16, characterized in that The device is used to display a second interactive interface according to the identification information of the target part when the target client identifies the target part in the following manner: Playing a first animation on the target image displayed on the first interactive interface, wherein the first animation is used to indicate that the target image is currently being scanned; During the playing of the first animation, determining the target virtual prop from the pre-configured virtual prop set according to the target image, wherein the first animation is configured to be played in a loop when the target virtual prop is not determined; When the target virtual prop has been determined, the first animation is stopped from being played, and the second interactive interface including the target virtual prop is displayed.
23. The device according to claim 16, characterized in that The device is further configured to: after the target client identifies the target part, display the second interactive interface according to the identification information of the target part, When the target virtual prop displayed in the second interaction interface is a first image, obtaining a second interaction operation on the target client, wherein the second interaction operation is used to adjust a display angle of the target virtual prop, and the display angle of the target virtual prop in the first image is a first angle; In response to the second interaction operation, the first image is replaced with a second image, wherein a display angle of the target virtual prop in the second image is a second angle, and the first angle is different from the second angle.
24. The device according to claim 23, characterized in that The device is used to replace the first image with the second image in response to the second interaction operation in the following manner: In a case where the second interactive operation represents a drag operation on the target virtual item, in response to the drag operation, the first image is rotated to the second image, wherein the second angle is an angle determined by adding or subtracting the first rotation angle from the first angle according to the direction of the drag operation, and the value of the first rotation angle is positively correlated with the value of the drag distance of the drag operation; or In a case where the second interactive operation is a pressing operation performed on the target virtual item, in response to the pressing operation, the first image is rotated clockwise or counterclockwise to the second image, wherein the second angle is an angle determined by adding the second rotation angle to the first angle according to the duration of the pressing operation, and the value of the second rotation angle is positively correlated with the duration of the pressing operation; or In a case where the second interactive operation is a click operation performed on the target virtual prop, the first image is switched to the second image in response to the click operation, wherein the second angle is an angle determined by adding a third rotation angle to the first angle based on the number of clicks of the click operation, and the value of the third rotation angle is positively correlated with the number of clicks of the click operation.
25. The device according to any one of claims 16 to 24, characterized in that The device is used to display a target image in response to a first interactive operation performed on the target client in the following manner: Detecting a target event corresponding to a target interactive object, wherein the target event is used to obtain the target image after being triggered, and the target interactive object is used to trigger the target event; When the target event is triggered, acquiring the target image, and uploading the target image to the target client; A target canvas object returned by the target client is received and displayed, wherein the target canvas object is a canvas object generated by the target client according to the target image, and the target canvas object allows association with a user interface element displayed on the target client.
26. The device according to claim 25, characterized in that The device is used to obtain the target image and upload the target image to the target client in the following manner when the target event is triggered: obtain and upload the target image and the direction parameter and size parameter of the target image to the target client; The device is used to receive and display the target canvas object returned by the target client in the following manner: receiving the target canvas object returned by the target client, wherein the target canvas object is a canvas object synthesized according to the pixel value of the target image and the initial canvas object, the size of the initial canvas object is the canvas object obtained by adjusting the direction parameter and the size parameter according to a preset standard size parameter, and the value of the size parameter of the initial canvas object is smaller than the value of the size parameter of the target image.
27. The device according to claim 25, characterized in that The device is used to obtain the target image and upload the target image to the target client in the following manner when the target event is triggered: When the target event is triggered, the target image is acquired, and a first recognition model on the target client is called to recognize the target image to obtain a target evaluation parameter, wherein the target evaluation parameter is used to represent the probability that the target part exists in the target image, and the first recognition model is used to recognize the target part in the target image; When the target evaluation parameter meets a preset condition, the target image is uploaded to the target client.
28. The device according to any one of claims 16 to 24, characterized in that The device is used to display a second interactive interface according to the identification information of the target part when the target client identifies the target part in the following manner: In the case where the target client recognizes the target part, calling a second recognition model on the target client to recognize the target shape in the target part, and determining size parameters of the target shape; The target virtual prop is determined from the virtual prop set according to the size parameter of the target shape.
29. The device according to claim 28, characterized in that The device is used to call the second recognition model on the target client to identify the target shape in the target part and determine the size parameter of the target shape in the following manner: when the target client recognizes that the target part is a palm part, call the second recognition model to identify the palm print shape in the palm part and determine the length parameter of the palm print shape, wherein when the palm part includes multiple palm print shapes, the length parameter of the palm print shape is determined jointly according to the length parameters of the multiple palm print shapes; The device is used to determine the target virtual prop from the virtual prop set according to the length parameter of the palm print shape in the following manner: obtaining a target value of the length parameter, wherein the target value is the sum of the tens digit value of the length parameter and the ones digit value of the length parameter; determining the target virtual prop corresponding to the target value from the virtual prop set according to the target value, wherein each virtual prop in the virtual prop set is pre-configured with a corresponding identification parameter, and the identification parameter of the target virtual prop is the same as the target value.
30. The device according to any one of claims 16 to 24, characterized in that The device is used to display a second interactive interface according to the identification information of the target part when the target client identifies the target part in the following manner: When the target virtual prop has been determined, a key frame set corresponding to the target virtual prop is obtained, and the second interactive interface including a first key frame is displayed, wherein the first key frame is a key frame preset in the key frame set; In the case where a second interactive operation is obtained on the target client, in response to the second interactive operation, the first key frame is replaced with a second key frame in the key frame set, and the second interactive interface including the second key frame is displayed, wherein the second interactive operation is used to adjust the display angle of the target virtual prop, and the second key frame is a key frame determined according to the operating parameters of the second interactive operation.
31. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program can be executed by a terminal device or a computer to execute the method described in any one of claims 1 to 15.
32. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 15 are implemented.
33. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 15 through the computer program.
Citation Information
Patent Citations
Virtual image generation method and device, terminal and storage medium
CN110827378A