Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Live refers to video live over the internet. In the live broadcast process, the effective interaction between the audience and the main broadcast can enhance the atmosphere of the live broadcast room, wherein the giving of the virtual gift is a typical interaction mode. In the event that the viewer's account balance is sufficient, the viewer may gift the virtual gift to the anchor.
The virtual gift refers to a gift transmitted through the internet with data as a carrier, and in order to make the reader easily understand the concept of the virtual gift, the following embodiment of the present application will briefly describe a typical virtual gift giving process:
when a viewer watches the live broadcast of a certain anchor through a terminal, the terminal displays the live broadcast interface of the anchor, and the live broadcast interface plays the live broadcast video of the anchor. The live broadcast interface can be provided with a virtual gift giving entrance, the virtual gift giving entrance can be accessed to the virtual gift giving interface through the virtual gift giving entrance, the virtual gift giving interface can comprise a plurality of virtual gift icons, a giving quantity option and a giving button, each virtual gift icon corresponds to one virtual gift, when a viewer wants to give a certain virtual gift to the main broadcast, the viewer can click on the virtual gift icon corresponding to the virtual gift in the virtual gift giving interface, select the giving quantity and click on the giving button to generate a giving instruction, the terminal can send the gift identification of the virtual gift, the giving quantity, the account identification of the viewer account and the account identification of the main broadcast account to the server, and when the account balance of the viewer account is sufficient, the server can transfer the virtual gift of the giving quantity to the main broadcast account, the virtual gift is presented to the main broadcast by the audience.
However, the audience can give the virtual gift only by clicking the giving button, and if the terminal of the audience is used by others or the account of the audience is stolen, the account balance of the audience is possibly abused, and the security of the account of the audience is low.
In view of the above, an embodiment of the present application provides a method for giving a virtual gift, in which if a giving instruction for a target virtual gift is detected based on a target account, target face information of a current user is obtained, where the target account may be an account that needs to give the virtual gift, for example, an account of an audience, and then the target face information is verified according to standard face information corresponding to the target account, and if the target face information passes the verification, the identity verification of the current user passes, and then a giving request for the target virtual gift is sent to a server, where the giving request is used to instruct the server to transfer the target virtual gift to a given account, and after the target virtual gift is transferred to the given account, successful giving information is returned. Therefore, the problems that when the audience watches the direct broadcast in the traditional technology, if the audience needs to present the virtual gifts to the main broadcast, the audience can present the target virtual gifts selected by the audience to the account of the main broadcast by directly clicking the 'presentation' button, and if the terminal of the audience is used by other people or the account of the audience is stolen, the account balance is abused, and the safety of the account of the audience is low are solved. The account security of the target account can be improved.
In the following, a brief description will be given of an implementation environment related to a virtual gift giving method provided in an embodiment of the present application.
As shown in fig. 1, the enforcement environment may include a cast terminal 101, a server 102, and at least one viewer terminal 103 (only one viewer terminal 103 is shown in fig. 1 by way of example). Wherein, the anchor terminal 101 may communicate with the server 102 through a wired or wireless network, and the viewer terminal 103 may also communicate with the server 102 through a wired or wireless network.
The server 102 may be one server or a server cluster composed of a plurality of servers, and the server 102 may be a tower server, a rack server, a blade server, a high-density server, a single-path server, a dual-path server, or a multi-path server, and the type of the server 102 is not specifically limited in this embodiment of the present application. The anchor terminal 101 and the audience terminal 103 may be personal computers, notebook computers, media players, smart televisions, smart phones, tablet computers, portable wearable devices, and the like, and the types of the anchor terminal 101 and the audience terminal 103 are not particularly limited in this embodiment of the application
In one embodiment, as shown in fig. 2, a method for giving a virtual gift is provided, which is described by taking as an example that the method is applied to a target terminal of at least one audience terminal 103 shown in fig. 1, where the target terminal may be any audience terminal, and the method includes steps S100, S200, and S300:
in step S100, if the target terminal detects a presentation instruction for the target virtual gift based on the target account, the target terminal obtains target face information of the current user.
In an embodiment of the present application, the target account may be an audience account registered by the audience. As an implementation manner, when a target terminal logs in a target account to watch live broadcast of a certain anchor, if the audience needs to present a certain virtual gift to the anchor, that is, a target virtual gift, the audience enters a virtual gift presenting interface through a virtual gift presenting entry set in a live broadcast interface of the target terminal, selects a virtual gift icon corresponding to the target virtual gift in the virtual gift presenting interface, and clicks a presenting button, so as to generate a presenting instruction in the target terminal.
After the audience clicks the give button, the target terminal detects a give instruction for the target virtual gift based on the target account. As an embodiment, the gifting instruction may include an account identification of the target account and an account identification of the gifted account, and the gifting instruction may further include a gift identification of the target virtual gift, a gifting amount of the target virtual gift, and the like.
In a possible implementation manner, after the audience selects the virtual gift icon corresponding to the target virtual gift in the virtual gift giving interface, the audience can also input the giving number of the target virtual gift; in another possible embodiment, after the viewer selects the virtual gift icon corresponding to the target virtual gift, the viewer may directly click the gift button without inputting the gift number of the target virtual gift, and the gift number of the target virtual gift included in the gift instruction is a default number, for example, 1.
In the embodiment of the application, the target terminal detects a presentation instruction for the target virtual gift based on the target account, then determines that the current user needs to present the virtual gift, and the target terminal acquires the target face information of the current user and verifies the identity of the current user. As an implementation manner, the target face information may be a target face image, and the target terminal may start a camera of the target terminal, acquire a face image of the current user, and perform identity authentication on the current user by using the face image as the target face image of the current user.
In one possible implementation manner of step S100, referring to fig. 3, after the target terminal detects a gifting instruction for the target virtual gift based on the target account, step S100 further includes step S101 and step S102:
and step S101, if the presentation instruction is the presentation instruction detected for the first time in the preset time period, the target terminal displays an inquiry interface.
The preset time period can be the time period from the time when the audience registers the target account to the current time, namely after the target account is registered, the target terminal displays an inquiry interface when a presentation instruction is detected based on the target account for the first time; the preset time period can also be one month, one week or one day, and the like, when the target terminal detects the presentation instruction for the first time in the preset time period, a query interface is displayed, and the query interface is used for querying whether the user agrees to start the gift giving mode based on the face information identification.
And step S102, if the target terminal detects a confirmation instruction aiming at the inquiry interface, acquiring target face information of the current user.
For example, the target terminal may show "whether to start a face recognition gift-offering mode" in the inquiry page, and show an agreement option and a disagreement option, and if the current user clicks the agreement option, the target terminal detects a confirmation instruction for the inquiry interface. It is understood that, in other embodiments, the query interface is not limited to the examples of the above embodiments of the present application, and may be in other forms, which are not limited herein.
And step S200, the target terminal verifies the target face information according to the standard face information corresponding to the target account.
In the embodiment of the application, the standard face information corresponding to the target account may be a standard face image of the audience corresponding to the target account. The standard face image may be a face image of the audience acquired by the target terminal when the target account is registered, or may also be a face image of the audience acquired by the target terminal after the target account is registered, or may also be a face image queried by the target terminal in a preset address, where the preset address may be, for example, an address used by a face recognition system of the target terminal to store the image of the audience for face recognition, and so on.
The target terminal verifies the target face information according to the standard face information corresponding to the target account, the face features can be extracted from the target face image, the face features are extracted from the standard face image, the similarity between the face features of the target face image and the face features of the standard face image is calculated, if the similarity between the face features of the target face image and the face features of the standard face image is higher, namely the similarity between the face features of the target face image and the face features of the standard face image is larger than a preset threshold value, the target terminal determines that the similarity between the target face image and the standard face image is higher, and the target face information is verified, namely the identity of the current user passes verification.
In a possible implementation manner, for a target face image, the target terminal may perform feature extraction on the whole target face image to obtain face features corresponding to the target face image, and for a standard face image, the target terminal may also perform feature extraction on the whole standard face image to obtain face features corresponding to the standard face image; and the target terminal calculates the distance between the face features of the target face image and the face features of the standard face image, and if the distance between the face features of the target face image and the face features of the standard face image is smaller, the similarity between the face features representing the target face image and the face features of the standard face image is larger.
In another possible implementation manner, for the target image, the target terminal may intercept, from the target image, an area image corresponding to an eye area, an area image corresponding to a nose area, an area image corresponding to a mouth area, and the like, and then perform feature extraction on each area image to obtain a facial part feature corresponding to each area image; for the standard face image, similarly, the target terminal may intercept, from the standard face image, a region image corresponding to an eye region, a region image corresponding to a nose region, a region image corresponding to a mouth region, and the like, and then perform feature extraction on each region image to obtain a facial feature corresponding to each region image. Then, for the target image and the standard face image, the target terminal calculates the distance between the facial part features of the area images of the corresponding parts of the two images, determines the similarity of the corresponding parts of the two images, and if the similarity of the corresponding parts of the two images is higher, the target face information is determined to pass the verification, namely the current user identity verification passes.
Therefore, the target terminal completes the verification of the target face information according to the standard face information corresponding to the target account.
In a possible implementation manner, after the target terminal detects a presentation instruction for the target virtual gift based on the target account, the target terminal further detects whether the target account is associated with standard face information, for example, the target terminal detects whether a face image with an account identifier of the target account is stored in the target terminal, or the target terminal inquires whether the face image is stored in a preset address of the target terminal; if the target account is associated with standard face information, the target terminal executes the step of acquiring the target face information of the current user; and if the target account is not associated with the standard face information, the target terminal displays a prompt interface, and the prompt interface is used for prompting the user to input the standard face information.
After the user enters the standard face information, the target terminal can execute the step of obtaining the target face information of the current user so as to verify the user identity of the current user. After the user enters the standard face information, the target terminal may exit the current process, and if the target terminal detects a presentation instruction for the target virtual gift based on the target account again, the target face information of the current user is obtained to verify the user identity of the current user.
In step S300, if the target face information passes the verification, the target terminal sends a presentation request for the target virtual gift to the server.
And if the target face information passes the verification, the target terminal determines that the current user identity verification passes, and the target terminal sends a presentation request aiming at the target virtual gift to the server, wherein the presentation request is used for indicating the server to transfer the target virtual gift to the presented account, and returns the successful presentation information after the target virtual gift is transferred to the presented account.
As an implementation manner, after receiving the presentation request, the server detects whether the account balance of the target account is greater than or equal to the presentation amount corresponding to the target virtual gift according to the account identifier of the target account carried by the presentation request; and if the account balance is larger than or equal to the donation amount, the server transfers the target virtual gift to the donated account according to the account identifier of the donated account carried by the donation request, and sends the donation success information to the target terminal after the target virtual gift is transferred to the donated account.
According to the method and the device for giving the virtual gift, the target face information of the current user is obtained if a giving instruction for the target virtual gift is detected based on the target account, the target account can be an account needing giving the virtual gift, such as an account of an audience, then the target face information is verified according to standard face information corresponding to the target account, if the target face information passes verification, the identity verification of the current user is passed, then a giving request for the target virtual gift is sent to a server, the giving request is used for indicating the server to transfer the target virtual gift to an account to be given, and after the target virtual gift is transferred to the account to be given, giving success information is returned. Therefore, the problems that when the audience watches the direct broadcast in the traditional technology, if the audience needs to present the virtual gifts to the main broadcast, the audience can present the target virtual gifts selected by the audience to the account of the main broadcast by directly clicking the 'presentation' button, and if the terminal of the audience is used by other people or the account of the audience is stolen, the account balance is abused, and the safety of the account of the audience is low are solved. The account security of the target account can be improved.
In one embodiment, based on the embodiment shown in fig. 2, the present implementation relates to a process of how to verify the identity of the current user again through the server. As shown in fig. 4, the gifting method of the virtual gift of the present embodiment further includes step S401, step S402, and step S403:
step S401, the target terminal extracts the features of the target face information to obtain each face feature corresponding to the target face information.
In the embodiment of the application, the target terminal acquires target face information of a current user, the target face information can be a target face image, and the target terminal can perform feature extraction on the target face information, namely, the target face image is subjected to feature extraction to obtain each face feature corresponding to the target face information.
In this embodiment of the application, each face feature may be each face feature, the target terminal may intercept, from the target image, an area image corresponding to an eye area, an area image corresponding to a nose area, an area image corresponding to a mouth area, and the like, and then, the target terminal performs feature extraction on each area image to obtain a face feature corresponding to each area image, so as to obtain each face feature corresponding to the target face information.
As an embodiment, in a convolutional neural network, different convolution kernels may extract different features. In this embodiment, the target terminal may set different convolution kernels to the convolution neural network, and extract facial feature, such as features of eye regions, nose regions, mouth regions, and the like, from each region image through the convolution neural network with different convolution kernels. Therefore, the target terminal can obtain each facial part characteristic corresponding to the target face information, namely each face characteristic.
Step S402, for each face feature, the target terminal generates a target feature identifier corresponding to the face feature according to a preset identifier generation strategy.
And the target terminal performs feature extraction on the target face information to obtain each face feature corresponding to the target face information, and generates a target feature identifier corresponding to the face feature for each face feature according to a preset identifier generation strategy.
In a possible implementation manner of step S402, for each face feature, the target terminal performs irreversible encryption on the face feature to obtain a feature encryption value corresponding to the face feature, and uses the feature encryption value corresponding to the face feature as a target feature identifier corresponding to the face feature.
As an implementation manner, the target terminal may perform irreversible encryption on the face feature by using an irreversible encryption algorithm to obtain a feature encryption value corresponding to the face feature, where the feature encryption value may be in the form of a character string, and the irreversible encryption algorithm may be, for example, a Hash algorithm.
Step S403, the target terminal sends a presentation request to the server with each target feature identifier corresponding to the target face information, so that the server matches each target feature identifier according to the standard feature identifier corresponding to the target account.
The target terminal verifies the target face information according to standard face information corresponding to the target account, if the target face information passes the verification, the target terminal sends a presentation request carried with each target feature identifier corresponding to the target face information to the server so that the server matches each target feature identifier according to the standard feature identifier corresponding to the target account, wherein the standard feature identifier is generated according to an identifier generation strategy for each face feature of preset face information corresponding to the target account.
In a possible implementation manner, the preset face information may be standard face information corresponding to a target account, and the target terminal generates a standard feature identifier corresponding to each face feature for each face feature of the standard face information according to the identifier generation policy in the above embodiment; in another possible implementation manner, the preset face information may also be target face information corresponding to a target account that is verified by the target terminal for the first time, and each face feature of the target face information that is verified by the target terminal for the first time generates a standard feature identifier corresponding to each face feature according to the identifier generation policy in the above embodiment. And the target terminal sends the generated standard feature identifier corresponding to the target account to the server, and the server stores the standard feature identifier corresponding to the target account.
The server matches each target feature identifier according to the standard feature identifier corresponding to the target account, which may be to match each standard feature identifier corresponding to the target account with each target feature identifier, for example, the server matches the standard feature identifier corresponding to the eye portion with the target feature identifier, matches the standard feature identifier corresponding to the nose portion with the target feature identifier, matches the standard feature identifier corresponding to the mouth portion with the target feature identifier, and so on. If the standard characteristic marks corresponding to the target account are matched with all the target characteristic marks in a consistent mode, the server determines that the identity verification of the current user is passed, and therefore the situation that the identity verification of the current user is inaccurate due to the fact that the target terminal is simulated or stolen can be avoided.
In the embodiment of the application, the target terminal sends the feature encryption value obtained by irreversibly encrypting each face feature to the server, so that even if data leakage occurs in the server, other people cannot reversely deduce the face feature of the user according to the feature encryption value, and privacy safety of the user is guaranteed.
In one embodiment, based on the embodiment shown in fig. 2, the present embodiment relates to a process of how the target terminal renders a special effect after the target virtual gift is successfully given. As shown in fig. 5, the present embodiment successful presentation information includes a gift identifier of the target virtual gift, and the present embodiment virtual gift presentation method further includes step S500:
step S500, if the successful presentation information sent by the server is received, the target terminal executes an interface rendering special effect script corresponding to the gift identifier according to the gift identifier so as to display an interface rendering special effect corresponding to the gift identifier in a live broadcast interface corresponding to the presented account.
In the embodiment of the application, the interface rendering special effect scripts of the virtual gifts are stored in the target terminal, and the corresponding interface rendering special effects can be displayed in the live broadcast interface when the interface rendering special effect scripts run. If the target terminal receives the presentation success information sent by the server, the interface rendering special effect script corresponding to the gift identification is executed according to the gift identification, and the interface rendering special effect script corresponding to the gift identification displays the interface rendering special effect corresponding to the gift identification in the live broadcast interface corresponding to the presented account when the interface rendering special effect script corresponding to the gift identification is executed, so that the interaction interestingness between audiences and the anchor is improved.
In one embodiment, as shown in fig. 6, there is provided a method for gifting a virtual gift, which is described by way of example as the method applied to the server in fig. 1, and includes steps S10, S20, and S30:
in step S10, the server receives a gifting request for the target virtual gift transmitted by the target terminal.
The presentation request is that the target terminal verifies the target face information of the current user according to the standard face information corresponding to the target account and sends the target face information of the current user to the server after the target face information passes the verification.
In the embodiment of the application, if the target terminal detects a presentation instruction for the target virtual gift based on the target account, the target terminal acquires target face information of the current user, and the target terminal verifies the target face information according to standard face information corresponding to the target account. The target face information can be a target face image, the standard face information can be a standard face image, the target terminal can extract face features from the target face image and extract the face features from the standard face image, the similarity between the face features of the target face image and the face features of the standard face image is calculated, if the similarity between the face features of the target face image and the face features of the standard face image is higher, namely the similarity between the face features of the target face image and the face features of the standard face image is larger than a preset threshold value, the target terminal determines that the similarity between the target face image and the standard face image is higher, and the target face information is verified, namely the identity of the current user passes verification.
As an implementation manner, the target terminal sends a gifting request for the target virtual gift to the server, where the gifting request may carry an account identifier of the target account and an account identifier of the gifted account, and the gifting request may also carry a gift identifier of the target virtual gift, a gifting amount of the target virtual gift, and the like.
In step S20, the server detects whether the account balance of the target account is greater than or equal to the donation amount corresponding to the target virtual gift according to the account identifier of the target account.
The server can determine the unit price of the target virtual gift according to the gift identification of the target virtual gift, and the server multiplies the unit price of the target virtual gift by the presentation quantity of the target virtual gift to obtain the presentation amount corresponding to the target virtual gift.
The server determines the account balance of the target account according to the account identification of the target account, and the server detects whether the account balance of the target account is larger than or equal to the donation amount corresponding to the target virtual gift.
In step S30, if the account balance is greater than or equal to the gifting amount, the server transfers the target virtual gift to the gifted account according to the account identifier of the gifted account, and sends the gifting success information to the target terminal after the target virtual gift is transferred to the gifted account.
If the server detects that the account balance of the target account is larger than or equal to the donation amount of the target virtual gift, the server transfers the target virtual gift to the donated account logged in the anchor terminal according to the account identifier of the donated account, deducts the donation amount corresponding to the target virtual gift from the target account, and sends a donation success message to the target terminal after the target virtual gift is transferred to the donated account so as to prompt that the target virtual gift is successfully donated.
The method and the device for presenting the target face information of the current user have the advantages that the target terminal verifies the target face information of the current user according to the standard face information corresponding to the target account and sends the target face information to the server after the verification is passed, and therefore the problem that when the audience watches the live broadcast in the traditional technology, if the audience needs to present the virtual gifts to the anchor broadcast, the audience can directly click the 'presentation' button to present the target virtual gifts selected by the audience to the anchor account is solved, if the terminal of the audience is used by other people or the account of the audience is stolen, the possibility that the account balance is abused exists, and the safety of the account of the audience is low is solved. According to the embodiment of the application, only when the target face information of the current user passes the verification, the server carries out the presentation process of the target virtual gift according to the presentation request, and the account security of the target account is improved.
In one embodiment, on the basis of the embodiment shown in fig. 6, the present embodiment relates to a process of how the server verifies the identity of the current user again. In this embodiment, the presenting request further carries target feature identifiers generated by each face feature corresponding to the target face information according to a preset identifier generation policy, referring to fig. 7, the method for presenting a virtual gift in this embodiment further includes:
and step S40, the server matches each target characteristic mark carried by the presentation request with the standard characteristic mark corresponding to the target account.
The standard feature identification is generated according to an identification generation strategy for each face feature of preset face information corresponding to the target account. In a possible implementation manner, the preset face information may be standard face information corresponding to a target account, and the target terminal generates a standard feature identifier corresponding to each face feature for each face feature of the standard face information according to the identifier generation policy in the above embodiment; in another possible implementation manner, the preset face information may also be target face information corresponding to a target account that is verified by the target terminal for the first time, and each face feature of the target face information that is verified by the target terminal for the first time generates a standard feature identifier corresponding to each face feature according to the identifier generation policy in the above embodiment. And the target terminal sends the generated standard feature identifier corresponding to the target account to the server, and the server stores the standard feature identifier corresponding to the target account.
The server matches each target feature identifier carried in the presentation request according to the standard feature identifier corresponding to the target account, which may be matching each standard feature identifier corresponding to the target account with each target feature identifier, for example, the server matches the standard feature identifier corresponding to the eye portion with the target feature identifier, matches the standard feature identifier corresponding to the nose portion with the target feature identifier, matches the standard feature identifier corresponding to the mouth portion with the target feature identifier, and so on.
In this embodiment, step S30 includes step S31:
step S31, if the account balance is greater than or equal to the donation amount and the target feature identifiers carried in the donation request are successfully matched with the standard feature identifiers, the server transfers the target virtual gift to the donated account according to the account identifier of the donated account, and sends successful donation information to the target terminal after the target virtual gift is transferred to the donated account.
If the server detects that the account balance corresponding to the target account is greater than or equal to the presentation amount of the target virtual gift and the standard feature identification corresponding to the target account is matched with all the target feature identifications in a consistent manner, the server determines that the identity authentication of the current user is passed, and then transfers the target virtual gift to the presented account according to the account identification of the presented account, so that the situation that the identity authentication of the current user is inaccurate due to simulation or embezzlement of the target terminal can be avoided.
In one embodiment, please refer to fig. 8, which is a flowchart illustrating an exemplary method for giving a virtual gift provided by an embodiment of the present application, and the method may be applied to the implementation environment shown in fig. 1. As shown in fig. 8, the method may include the steps of:
in step S1001, if the target terminal detects a presentation instruction for the target virtual gift based on the target account, the target terminal acquires target face information of the current user.
Referring to fig. 9, fig. 9 is a diagram of an exemplary live interface.
The target account may be an audience account registered by the audience, and when the audience logs in the target account at the target terminal to watch live broadcast of a certain anchor, if the audience needs to present a certain virtual gift to the anchor, that is, a target virtual gift, the audience may enter the virtual gift presentation interface by clicking a gift icon at the lower right corner in the live broadcast interface shown in fig. 9 through a virtual gift presentation entry set in the live broadcast interface of the target terminal.
Referring to fig. 10, fig. 10 is a schematic view of an exemplary virtual gift-giving interface.
The audience can select a virtual gift icon corresponding to the target virtual gift in the virtual gift giving interface and click the giving button to generate a giving instruction in the target terminal.
After selecting the virtual gift icon corresponding to the target virtual gift in the virtual gift presenting interface, the audience can also input the presenting quantity of the target virtual gift; or, after selecting the virtual gift icon corresponding to the target virtual gift, the audience may directly click the present button without inputting the present number of the target virtual gift, and the present number of the target virtual gift included in the present instruction is a default number, for example, 1.
In one possible implementation manner of step S1001, after the target terminal detects a gifting instruction for the target virtual gift based on the target account, step S1001 further includes steps a and b:
step a, if the presentation instruction is the presentation instruction detected for the first time in the preset time period, the target terminal displays an inquiry interface.
The inquiry interface is used for inquiring whether the user agrees to start a gift sending mode based on the face information identification, the preset time period can be a time period from the time when the audience registers the target account to the current time, and the preset time period can be one month, one week or one day and the like.
And b, if the target terminal detects a confirmation instruction aiming at the inquiry interface, acquiring target face information of the current user.
The target terminal can show whether the face recognition gift sending mode is started or not in the inquiry page, and shows the agreement option and the disagreement option, and if the current user clicks the agreement option, the target terminal detects a confirmation instruction aiming at the inquiry interface.
In one embodiment, after the target terminal detects a give instruction for the target virtual gift based on the target account, the target terminal further detects whether the target account is associated with standard face information. If the target account is associated with standard face information, the target terminal executes the step of acquiring the target face information of the current user; and if the target account is not associated with the standard face information, the target terminal displays a prompt interface, and the prompt interface is used for prompting the user to input the standard face information.
After the user enters the standard face information, the target terminal can execute the step of obtaining the target face information of the current user so as to verify the user identity of the current user. After the user enters the standard face information, the target terminal may exit the current process, and if the target terminal detects a presentation instruction for the target virtual gift based on the target account again, the target face information of the current user is obtained to verify the user identity of the current user.
Step 1002, the target terminal verifies the target face information according to the standard face information corresponding to the target account.
And step S1003, the target terminal extracts the features of the target face information to obtain each face feature corresponding to the target face information.
Step S1004, for each face feature, the target terminal generates a target feature identifier corresponding to the face feature according to a preset identifier generation policy.
In a possible implementation manner of step S1004, for each face feature, the target terminal performs irreversible encryption on the face feature to obtain a feature encryption value corresponding to the face feature, and uses the feature encryption value corresponding to the face feature as a target feature identifier corresponding to the face feature.
Step S1005, if the target face information passes the verification, the target terminal sends the presentation request carried with each target feature identifier corresponding to the target face information to the server, so that the server matches each target feature identifier according to the standard feature identifier corresponding to the target account.
The standard feature identification is generated according to an identification generation strategy for each face feature of preset face information corresponding to the target account.
In step S1006, the server receives a gifting request for the target virtual gift transmitted by the target terminal.
Step S1007, the server detects whether the account balance of the target account is greater than or equal to the donation amount corresponding to the target virtual gift according to the account identifier of the target account.
Step S1008, the server matches each target feature identifier carried in the presentation request with a standard feature identifier corresponding to the target account.
Step S1009, if the account balance is greater than or equal to the donation amount and the target feature identifiers carried in the donation request are successfully matched with the standard feature identifiers, the server transfers the target virtual gift to the donated account according to the account identifier of the donated account, and sends the successful donation information to the target terminal after the target virtual gift is transferred to the donated account.
The gifted account may be a home account that the home terminal logs in to.
Step S1010, if the target terminal receives the successful presentation information sent by the server, the target terminal executes an interface rendering special effect script corresponding to the gift identifier according to the gift identifier so as to display an interface rendering special effect corresponding to the gift identifier in a live broadcast interface corresponding to the presented account.
It should be understood that although the various steps in the flow charts of fig. 2-8 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-8 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 11, there is provided a virtual gift giving apparatus including:
an obtaining module 100, configured to obtain target face information of a current user if a presentation instruction for a target virtual gift is detected based on a target account;
the verification module 200 is configured to verify the target face information according to standard face information corresponding to the target account;
a sending module 300, configured to send a gifting request for the target virtual gift to a server if the target face information passes verification, where the gifting request is used to instruct the server to transfer the target virtual gift to a gifted account, and return gifting success information after the target virtual gift is transferred to the gifted account.
Optionally, the apparatus further comprises:
the extraction module is used for extracting the characteristics of the target face information to obtain each face characteristic corresponding to the target face information;
the generating module is used for generating a target feature identifier corresponding to the face feature according to a preset identifier generating strategy for each face feature;
the sending module 300 is further configured to, if the target face information passes verification, carry each target feature identifier corresponding to the target face information in the presentation request and send the presentation request to the server, so that the server matches each target feature identifier according to a standard feature identifier corresponding to the target account, where the standard feature identifier is generated according to the identifier generation policy for each face feature of preset face information corresponding to the target account.
Optionally, the generating module is specifically configured to perform irreversible encryption on each face feature to obtain a feature encryption value corresponding to the face feature, and use the feature encryption value as a target feature identifier corresponding to the face feature.
Optionally, the presentation success information includes a gift identification of the target virtual gift, and the apparatus further includes:
and the rendering module is used for executing an interface rendering special effect script corresponding to the gift identifier according to the gift identifier if the presentation success information sent by the server is received, so that an interface rendering special effect corresponding to the gift identifier is displayed in a live interface corresponding to the presented account.
Optionally, the apparatus further comprises:
the detection module is used for detecting whether the target account is associated with the standard face information or not;
the execution module is used for executing the step of acquiring the target face information of the current user if the target account is associated with the standard face information;
the first display module is used for displaying a prompt interface if the target account is not associated with the standard face information, and the prompt interface is used for prompting a user to enter the standard face information.
Optionally, the apparatus further comprises:
the second display module is used for displaying an inquiry interface if the giving instruction is the giving instruction detected for the first time in a preset time period, wherein the inquiry interface is used for inquiring whether the user agrees to start a gift giving mode based on face information identification;
the obtaining module 100 is specifically configured to obtain the target face information of the current user if a confirmation instruction for the query interface is detected.
The specific definition of the virtual gift giving device can refer to the above definition of the virtual gift giving method applied to the target terminal, and will not be described herein again. The respective modules in the giving apparatus of the virtual gift described above may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, as shown in fig. 12, there is provided a virtual gift giving apparatus including:
the system comprises a receiving module 10, a server and a display module, wherein the receiving module is used for receiving a presentation request aiming at a target virtual gift sent by a target terminal, the presentation request carries an account identifier of a target account and an account identifier of a presented account, and the presentation request is that the target terminal verifies target face information of a current user according to standard face information corresponding to the target account and sends the target face information to the server after the verification is passed;
the detection module 20 is configured to detect whether the account balance of the target account is greater than or equal to the donation amount corresponding to the target virtual gift according to the account identifier of the target account;
a sending module 30, configured to transfer the target virtual gift to the gifted account according to the account identifier of the gifted account if the account balance is greater than or equal to the gifted amount, and send a gifting success message to the target terminal after the target virtual gift is transferred to the gifted account.
Optionally, the presentation request further carries target feature identifiers generated by the face features corresponding to the target face information according to a preset identifier generation policy, and the apparatus further includes:
the matching module is used for matching each target feature identifier carried by the presentation request with a standard feature identifier corresponding to the target account, wherein the standard feature identifier is generated according to the identifier generation strategy for each face feature of preset face information corresponding to the target account;
the sending module 30 is specifically configured to, if the account balance is greater than or equal to the donation amount and the target feature identifiers carried in the donation request are successfully matched with the standard feature identifiers, transfer the target virtual gift to the donated account according to the account identifier of the donated account, and send successful donation information to the target terminal after the target virtual gift is transferred to the donated account.
Specific limitations regarding the presentation apparatus of the virtual gift can be found in the above limitations regarding the presentation method of the virtual gift applied to the server, and will not be described herein again. The respective modules in the giving apparatus of the virtual gift described above may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 13. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a method of gifting a virtual gift. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 13 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
if a presentation instruction for the target virtual gift is detected based on the target account, target face information of the current user is acquired;
verifying the target face information according to the standard face information corresponding to the target account;
and if the target face information passes the verification, sending a presentation request aiming at the target virtual gift to a server, wherein the presentation request is used for indicating the server to transfer the target virtual gift to a presented account, and returning presentation success information after the target virtual gift is transferred to the presented account.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
extracting the features of the target face information to obtain each face feature corresponding to the target face information;
for each face feature, generating a target feature identifier corresponding to the face feature according to a preset identifier generation strategy;
and carrying the target feature identifications corresponding to the target face information on the presentation request and sending the presentation request to the server, so that the server matches the target feature identifications according to standard feature identifications corresponding to the target account, wherein the standard feature identifications are generated according to the identification generation strategy for the face features of the preset face information corresponding to the target account.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and for each face feature, carrying out irreversible encryption on the face feature to obtain a feature encryption value corresponding to the face feature, and using the feature encryption value as a target feature identifier corresponding to the face feature.
In one embodiment, the presentation success information includes a gift identification of the target virtual gift, and the processor when executing the computer program further performs the steps of:
and if the presentation success information sent by the server is received, executing an interface rendering special effect script corresponding to the gift identification according to the gift identification so as to display an interface rendering special effect corresponding to the gift identification in a live broadcast interface corresponding to the presented account.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
detecting whether the target account is associated with the standard face information or not;
if the target account is associated with the standard face information, executing the step of acquiring the target face information of the current user;
and if the target account is not associated with the standard face information, displaying a prompt interface, wherein the prompt interface is used for prompting a user to input the standard face information.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
if the giving instruction is the giving instruction detected for the first time in the preset time period, displaying an inquiry interface, wherein the inquiry interface is used for inquiring whether the user agrees to start a gift giving mode based on face information identification;
correspondingly, the acquiring target face information of the current user includes:
and if a confirmation instruction aiming at the inquiry interface is detected, acquiring the target face information of the current user.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 14. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is for storing gifting data for the virtual gift. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of gifting a virtual gift.
Those skilled in the art will appreciate that the architecture shown in fig. 14 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
receiving a presentation request aiming at a target virtual gift sent by a target terminal, wherein the presentation request carries an account identifier of a target account and an account identifier of a presented account, and the presentation request is that the target terminal verifies target face information of a current user according to standard face information corresponding to the target account and sends the target face information to a server after the target face information passes the verification;
detecting whether the account balance of the target account is larger than or equal to the donation amount corresponding to the target virtual gift or not according to the account identification of the target account;
and if the account balance is larger than or equal to the donation amount, transferring the target virtual gift to the donated account according to the account identification of the donated account, and sending donation success information to the target terminal after the target virtual gift is transferred to the donated account.
In one embodiment, the presentation request further carries target feature identifiers generated by the face features corresponding to the target face information according to a preset identifier generation policy, and the processor further implements the following steps when executing the computer program:
matching each target feature identifier carried by the presentation request with a standard feature identifier corresponding to the target account, wherein the standard feature identifier is generated according to the identifier generation strategy for each face feature of preset face information corresponding to the target account;
correspondingly, the transferring the target virtual gift to the gifted account according to the account identifier of the gifted account includes:
and if the target characteristic identifications carried by the presentation request are successfully matched with the standard characteristic identifications, transferring the target virtual gift to the presented account according to the account identification of the presented account.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
if a presentation instruction for the target virtual gift is detected based on the target account, target face information of the current user is acquired;
verifying the target face information according to the standard face information corresponding to the target account;
and if the target face information passes the verification, sending a presentation request aiming at the target virtual gift to a server, wherein the presentation request is used for indicating the server to transfer the target virtual gift to a presented account, and returning presentation success information after the target virtual gift is transferred to the presented account.
In one embodiment, the computer program when executed by the processor further performs the steps of:
extracting the features of the target face information to obtain each face feature corresponding to the target face information;
for each face feature, generating a target feature identifier corresponding to the face feature according to a preset identifier generation strategy;
and carrying the target feature identifications corresponding to the target face information on the presentation request and sending the presentation request to the server, so that the server matches the target feature identifications according to standard feature identifications corresponding to the target account, wherein the standard feature identifications are generated according to the identification generation strategy for the face features of the preset face information corresponding to the target account.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and for each face feature, carrying out irreversible encryption on the face feature to obtain a feature encryption value corresponding to the face feature, and using the feature encryption value as a target feature identifier corresponding to the face feature.
In one embodiment, the gifting success information includes a gift identification of the target virtual gift, the computer program when executed by the processor further performs the steps of:
and if the presentation success information sent by the server is received, executing an interface rendering special effect script corresponding to the gift identification according to the gift identification so as to display an interface rendering special effect corresponding to the gift identification in a live broadcast interface corresponding to the presented account.
In one embodiment, the computer program when executed by the processor further performs the steps of:
detecting whether the target account is associated with the standard face information or not;
if the target account is associated with the standard face information, executing the step of acquiring the target face information of the current user;
and if the target account is not associated with the standard face information, displaying a prompt interface, wherein the prompt interface is used for prompting a user to input the standard face information.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the giving instruction is the giving instruction detected for the first time in the preset time period, displaying an inquiry interface, wherein the inquiry interface is used for inquiring whether the user agrees to start a gift giving mode based on face information identification;
correspondingly, the acquiring target face information of the current user includes:
and if a confirmation instruction aiming at the inquiry interface is detected, acquiring the target face information of the current user.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving a presentation request aiming at a target virtual gift sent by a target terminal, wherein the presentation request carries an account identifier of a target account and an account identifier of a presented account, and the presentation request is that the target terminal verifies target face information of a current user according to standard face information corresponding to the target account and sends the target face information to a server after the target face information passes the verification;
detecting whether the account balance of the target account is larger than or equal to the donation amount corresponding to the target virtual gift or not according to the account identification of the target account;
and if the account balance is larger than or equal to the donation amount, transferring the target virtual gift to the donated account according to the account identification of the donated account, and sending donation success information to the target terminal after the target virtual gift is transferred to the donated account.
In one embodiment, the presentation request further carries target feature identifiers generated by each face feature corresponding to the target face information according to a preset identifier generation policy, and the computer program, when executed by the processor, further implements the following steps:
matching each target feature identifier carried by the presentation request with a standard feature identifier corresponding to the target account, wherein the standard feature identifier is generated according to the identifier generation strategy for each face feature of preset face information corresponding to the target account;
correspondingly, the transferring the target virtual gift to the gifted account according to the account identifier of the gifted account includes:
and if the target characteristic identifications carried by the presentation request are successfully matched with the standard characteristic identifications, transferring the target virtual gift to the presented account according to the account identification of the presented account.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.