WO2018223976A1 - Method and apparatus for configuring live streaming application, storage medium and electronic apparatus - Google Patents

Method and apparatus for configuring live streaming application, storage medium and electronic apparatus Download PDF

Info

Publication number
WO2018223976A1
WO2018223976A1 PCT/CN2018/090033 CN2018090033W WO2018223976A1 WO 2018223976 A1 WO2018223976 A1 WO 2018223976A1 CN 2018090033 W CN2018090033 W CN 2018090033W WO 2018223976 A1 WO2018223976 A1 WO 2018223976A1
Authority
WO
WIPO (PCT)
Prior art keywords
account
network side
side device
exchange request
item
Prior art date
Application number
PCT/CN2018/090033
Other languages
French (fr)
Chinese (zh)
Inventor
淮小龙
吴广原
武飞
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2018223976A1 publication Critical patent/WO2018223976A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/47815Electronic shopping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting

Definitions

  • the present application relates to the field of live broadcast applications, and in particular, to a method and device for configuring a live broadcast application, a storage medium, and an electronic device.
  • FIG. 1 is a flowchart of a live broadcast process configuration method according to the related art, as shown in FIG. The process is as follows: First, the live app receives the user-initiated item purchase request. At this time, the live app needs to call the token service to purchase the item, and the token service includes the price inquiry interface and the item delivery interface for calling the item service.
  • the token deduction operation is performed, and after the token is successfully deducted, the delivery interface of the item is called for delivery, and then the result is returned to the video unified access layer, and then the video unified access layer
  • the live app After the live app receives the logo that returns the purchase success, it displays the special effects of the item, and the user and the anchor can see the special effects of the item on the app.
  • There are some other service calls in the whole process including the use of tokens, which need to be divided and settled, and returned to the relevant order information, and the reconciliation between the business side and the settlement side.
  • the prop service the popularity of a live broadcast is recorded through the transit system, and the related props are recorded.
  • the token service and the prop service need to be continuously called, and the process is cumbersome. If the user is watching the live broadcast of the anchor in a weak network environment, the live app launches a request for the purchase of the item due to network jitter and the like. After the token service and the prop service complete the logic of item purchase and item delivery, the package is returned to the video unified access layer. At this time, because the whole process takes too much time, the live app thinks that the request has timed out, so the live app The user is shown that the purchase of the item fails, but at this time the entire background logic has been executed and is considered to be a normal request, so the user side will see that his token is deducted, but the item fails to purchase.
  • the live broadcast platform While continuously optimizing the product, the live broadcast platform also received a lot of related complaints, which is reflected in the user's purchase of props to the host broadcast gift, the result is successful, but the app shows the purchase failure, which greatly affects the user experience and the reputation of the live product.
  • the embodiment of the present application provides a method and a device for configuring a live broadcast application, a storage medium, and an electronic device, so as to at least solve the problem that an account of a live broadcast application in a weak network environment often has a timeout requiring multiple operations due to multiple operations. technical problem.
  • a method for configuring a live broadcast application includes: receiving, by the network side device of the live broadcast application, a first exchange request sent by a client of a live application, where the first exchange request And a method for requesting to configure a preset prop in the live application to the first account of the live application; if the network side device fails to configure the preset prop to the first account, where The network side device acquires a second exchange request, where the second exchange request is used to request to configure the preset item to the first account, and the network side device determines that the device has responded to the first In the case that an exchange request deducts the target virtual resource from the total virtual resource of the first account, the network side device configures the preset item to the first account in response to the second exchange request. And sending an exchange response to the client, where the exchange response is used to indicate that the preset item has been successfully configured to the first account.
  • the method further includes: the network side device acquiring, by using the first service of the live application, the target virtual resource corresponding to the preset item, where the first service is used to configure the preset item.
  • the network side device deducts the target virtual resource from the total virtual resource of the first account by using the first service to the second service, where the second service is used to deduct the target virtual resource.
  • the network side device performs a configuration operation by using the first service, where the configuration operation is configured to configure the preset prop to the first An account, the deduction success information is used to indicate that the target virtual resource has been successfully deducted from the total virtual resource; and the deduction success information is not returned in the second service
  • the network side device determines that the network side device does not successfully configure the preset prop to the first account in the case that the configuration operation is unsuccessful.
  • the acquiring, by the network side device, the second exchange request includes: receiving, by the client, the second exchange request sent by the client to the network side device, where the client is not within the first predetermined time period And receiving the second exchange request to the network side device if the exchange response is received.
  • the acquiring, by the network side device, the second exchange request includes: acquiring, by the first service, the first service, if the second service does not return the deduction success information within a second predetermined time period And exchanging the request, and deducting the target virtual resource from the total virtual resource by using the first service to the second service request.
  • the method further includes: the network side device acquiring, by using the first service of the live application, the target virtual resource corresponding to the preset item, where the first service is used to configure the preset item.
  • the network side device performs a configuration operation by using the first service, where the total virtual resource of the first account is greater than or equal to the sum of the target virtual resource and the undepleted virtual resource of the first account.
  • the configuration operation is configured to configure the preset prop to the first account; the network side device deducts the total virtual resource from the total virtual resource by using the first service by the first service. a target virtual resource, where the second service is used to deduct the target virtual resource; if the configuration operation is not successful, the network side device determines that The preset item is successfully configured to the first account.
  • the method further includes: the network side device, the preset prop Transferring from the first account to the second account of the live application; or the network-side device storing the preset item in the item library of the first account, where the item library is used The item allocated to the first account is stored.
  • the acquiring, by the network side device, the second exchange request includes: when the network side device fails to configure the preset prop to the first account, and the number of unsuccessful times is less than a preset number of times And obtaining the second exchange request.
  • a method for configuring a live broadcast application including: sending a first exchange request from a client of a live broadcast application to a network side device of the live broadcast application, where the first The exchange request is used to request to configure a preset prop in the live application to the first account of the live application; and the client does not receive the exchange response sent by the network device in response to the exchange request
  • the second exchange request is sent from the client to the network side device, where the second exchange request is used to request the configuration of the preset item to the first account again, the exchange response Used to indicate that the preset props have been successfully configured to the first account; the network side device has deducted the target virtual resource from the total virtual resources of the first account in response to the first exchange request
  • the preset item configured to the first account is configured in response to the second exchange request on the client.
  • the sending, by the client, the second exchange request to the network side device includes: if the client does not receive the exchange response within a first predetermined time period, to the network The side device issues the second exchange request.
  • the sending the second exchange request to the network side device includes: sending the second exchange request to the network side device if the number of times the second exchange request is sent is less than a preset number of times .
  • the method further includes: displaying the first information on the client
  • the first information is used to indicate that the preset item has been transferred from the first account to the second account of the live application; or the second information is displayed on the client, where The second information is used to indicate that the preset item has been stored in a item library of the first account, and the item library is used to store an item configured for the first account.
  • a configuration apparatus for a live broadcast application comprising one or more processors, and one or more memories storing program units, wherein the program units are executed by a processor, the program The unit includes: a receiving unit, configured to receive a first exchange request sent by a client of the live application to the network side device of the live application, where the first exchange request is used to request a pre- Setting a prop to the first account of the live application; the first obtaining unit is configured to acquire the second exchange if the network side device fails to configure the preset prop to the first account a request, wherein the second exchange request is for requesting to configure the preset item to the first account; the first configuration unit is configured to determine that the device has responded to the first exchange request In the case that the target virtual resource is deducted from the total virtual resource of the first account, the preset item is configured to the first account in response to the second exchange request. And sends a response to the client exchange from the network side device, wherein, in response to the
  • the device further includes: a second obtaining unit, configured to: after receiving the first exchange request sent by the client of the live application to the network side device of the live application, and before acquiring the second exchange request Obtaining, by the first service of the live application, the target virtual resource corresponding to the preset item, where the first service is used to configure the preset item; and the first deduction unit is configured to pass The first service requests the second service to deduct the target virtual resource from the total virtual resource of the first account, where the second service is used to deduct the target virtual resource; the second configuration unit is And configured to perform a configuration operation by using the first service, where the configuration operation is configured to configure the preset prop to the first account, where the second service returns deduction success information, Deducting success information is used to indicate that the target virtual resource has been successfully deducted from the total virtual resource; the first determining unit is configured to not return the deduction in the second service In the case of the success information, or in the case that the configuration operation is not successful, it is determined that the network side device has not successfully configured the preset item
  • the first obtaining unit is configured to: receive the second exchange request sent by the client to the network side device, where the client does not receive the first predetermined time period.
  • the second exchange request is sent to the network side device.
  • the first obtaining unit is further configured to: acquire, by the first service, the second service, if the second service does not return the deduction success information within a second predetermined time period Exchanging the request, and deducting the target virtual resource from the total virtual resource by the first service to the second service request.
  • the apparatus further includes: a third obtaining unit, configured to: after receiving the first exchange request sent by the client of the live application to the network side device of the live application, and before acquiring the second exchange request Obtaining, by the first service of the live broadcast application, the target virtual resource corresponding to the preset prop, to the second service of the live application, where the first service is used to configure the preset prop; a third configuration unit, configured to perform configuration by using the first service if a total virtual resource of the first account is greater than or equal to a sum of the target virtual resource and the undepleted virtual resource of the first account The operation, wherein the configuring operation is configured to configure the preset prop to the first account; the second deducting unit is configured to request, by the first service, the second virtual service from the total virtual The target virtual resource is deducted from the resource, wherein the second service is used to deduct the target virtual resource; and the second determining unit is configured to perform the configuration operation unsuccessfully Case, the network side device determines that the preset prop unsuccessfully assigned to the first
  • the device further includes: a transfer unit, configured to: after the preset item is configured to the first account in response to the second exchange request, the preset item is from the first Transferring an account to the second account of the live application; or storing, by the storage unit, the preset item in the item library of the first account, wherein the item library is used to store the configuration The item of the first account.
  • a transfer unit configured to: after the preset item is configured to the first account in response to the second exchange request, the preset item is from the first Transferring an account to the second account of the live application; or storing, by the storage unit, the preset item in the item library of the first account, wherein the item library is used to store the configuration The item of the first account.
  • the first acquiring unit is configured to: when the network side device fails to configure the preset prop to the first account, and the number of unsuccessful times is less than a preset number of times, acquiring the location Said second exchange request.
  • a configuration apparatus for a live application comprising one or more processors, and one or more memories storing program units, wherein the program units are processed by the Executing, the program unit includes: a first sending unit, configured to send a first exchange request from a client of the live application to a network side device of the live application, wherein the first exchange request is used to request The preset props in the live application are configured to the first account of the live application; the second sending unit is configured to receive, at the client, the exchange that the network side device sends in response to the exchange request In response, the second exchange request is sent from the client to the network side device, where the second exchange request is used to request the configuration of the preset item to the first account again.
  • the exchange response is used to indicate that the preset item has been successfully configured to the first account; the acquiring unit is configured to have responded to the network side device If the exchange request deducts the target virtual resource from the total virtual resource of the first account, acquiring, by the client, the preset item configured to the first account in response to the second exchange request .
  • the second sending unit is configured to: if the client does not receive the exchange response within a first predetermined time period, send the second exchange request to the network side device.
  • the second sending unit is further configured to: send the second exchange request to the network side device if the number of times of sending the second exchange request is less than a preset number of times.
  • the device further includes: a first display unit, configured to: after acquiring, on the client, the preset item configured to the first account in response to the second exchange request, The first information is displayed on the client, where the first information is used to indicate that the preset item has been transferred from the first account to the second account of the live application; or the second display unit is And being configured to display the second information on the client, where the second information is used to indicate that the preset item has been stored in an item library of the first account, and the item library is used for storing An item configured for the first account.
  • a first display unit configured to: after acquiring, on the client, the preset item configured to the first account in response to the second exchange request, The first information is displayed on the client, where the first information is used to indicate that the preset item has been transferred from the first account to the second account of the live application; or the second display unit is And being configured to display the second information on the client, where the second information is used to indicate that the preset item has been stored in an item library of the first account, and
  • a storage medium having stored therein a computer program configured to execute a configuration method of a live application of the present application at runtime.
  • the network side device of the live broadcast application receives the first exchange request sent by the client of the live application; and when the network device fails to configure the preset item to the first account, the network side device acquires a second exchange request; if the network side device determines that the target virtual resource has been deducted from the total virtual resource of the first account in response to the first exchange request, the network side device configures the preset item in response to the second exchange request Giving the first account and sending an exchange response to the client, automatically retrying the item configuration and not deducting the virtual resource again if the virtual resource has been paid, thereby reducing the number of manual operations of the user, thereby achieving The technical effect of improving the efficiency of item configuration in a weak network environment, and solving the technical problem that the account of the live application in the weak network environment often has a timeout requiring multiple operations when the item is configured.
  • FIG. 1 is a flowchart of a method for configuring a live broadcast process according to the related art
  • FIG. 2 is a schematic diagram of a hardware environment of a configuration method of a live broadcast application according to an embodiment of the present application
  • FIG. 3 is a flowchart of a method for configuring an optional live application according to an embodiment of the present application
  • FIG. 4 is a flowchart of another optional live application configuration method according to an embodiment of the present application.
  • FIG. 5 is a flowchart of still another optional method for configuring a live broadcast application according to an embodiment of the present application
  • FIG. 6 is a schematic diagram of a prop purchase list of a live application page according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a special effect of prop purchase success according to an embodiment of the present application.
  • FIG. 8 is a flowchart of a step of executing an item service according to an embodiment of the present application.
  • FIG. 9 is a flowchart of still another optional method for configuring a live broadcast application according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of still another optional configuration apparatus of a live broadcast application according to an embodiment of the present application.
  • FIG. 11 is a schematic diagram of still another optional configuration apparatus of a live broadcast application according to an embodiment of the present application.
  • FIG. 12 is a structural block diagram of an electronic device according to an embodiment of the present application.
  • a method embodiment of a configuration of a live broadcast application is provided.
  • the configuration method of the live broadcast application may be applied to a hardware environment formed by the server 102 and the terminal 104 as shown in FIG. 2 .
  • the server 102 is connected to the terminal 104 through a network.
  • the network includes but is not limited to a wide area network, a metropolitan area network, or a local area network.
  • the terminal 104 is not limited to a PC, a mobile phone, a tablet, or the like.
  • the configuration method of the live application of the embodiment of the present application may be performed by the server 102, may be performed by the terminal 104, or may be performed by the server 102 and the terminal 104 in common.
  • the method for configuring the live application of the terminal 104 in the embodiment of the present application may also be performed by a client installed on the terminal.
  • the client of the first application of the live broadcast application sends an exchange request to the network side device of the live application, requesting to exchange the preset props through the virtual resource of the first account, if the network side does not exist within a certain period of time If the default prop is successfully configured to the first account, the live application client will send the exchange request again.
  • the network device determines that the virtual resource of the first account has been deducted, and will not be deducted again. An account and then send an exchange response to the client. Since the client will initiate a retry without successfully configuring the item to the first account, the item configuration can be retried automatically, and the virtual resource is not deducted again when the virtual resource has been paid.
  • the purpose of reducing the number of manual operations of the user is reduced, thereby realizing the technical effect of improving the efficiency of item configuration in a weak network environment.
  • FIG. 3 is a flowchart of a method for configuring an optional live application according to an embodiment of the present application. As shown in FIG. 3, the method may include the following steps:
  • Step S302 The network side device of the live application receives the first exchange request sent by the client of the live application, where the first exchange request is used to request to configure the preset item in the live application to the first account of the live application.
  • Step S304 The network side device acquires a second exchange request, where the second exchange request is used to configure the preset item to the first account again. .
  • Step S306 in the case that the network side device determines that the target virtual resource has been deducted from the total virtual resource of the first account in response to the first exchange request, the network side device configures the preset prop to the second in response to the second exchange request.
  • the network side device of the live broadcast application receives the first exchange request sent by the client of the live application through the foregoing steps S302 to S306; and the network side device if the network device fails to configure the preset item to the first account.
  • the live broadcast application may be an application in which a plurality of viewer users watch the live broadcast of the anchor user through the network online.
  • the user may watch the live broadcast of the food, the singer, and the like through the live broadcast application installed on the mobile terminal.
  • various types of props can be presented, and the presented props can display special effects on the presented user's page and the anchor page, thereby improving the fun of the live broadcast process.
  • the gift items can also be displayed on the display screen of all users who watch the live screen of the anchor.
  • the embodiment is a method for configuring a live application from a network side device side of a live application.
  • the client that receives the live application on the network side device sends a first exchange request to the network side device, and the first exchange request is used to request the first account.
  • the preset props are props to be exchanged with virtual resources.
  • the price is 1 diamond, or 1 token, 1 diamond or 1 token is the virtual resource in the first account. It should be noted that for virtual resources, there can be only one unit of virtual resources.
  • the first account can be exchanged for the sugar hoist props by paying a token, and the first account client needs to send the first exchange request, and the first exchange request can be an exchange request generated by the client based on the user's click operation, and the first exchange request carries There is identification information, and the identification information may include an id and a quantity of the preset item.
  • the network side device does not successfully configure the preset prop to the first account, including multiple cases.
  • the network side device does not receive the exchange request sent by the client; the network side device receives the client.
  • the exchange request is sent but the virtual resource is not successfully deducted; the network side device successfully deducts the virtual resource but does not configure the preset prop to the first account; and the configuration that is sent when the network side device fails to configure the preset prop to the first account.
  • the failed response after the above several situations occur, the client sends a second exchange request (that is, a retry request) to the network side device again, the network side device receives the second exchange request, and the second exchange request is used to request the second exchange request again.
  • a second exchange request that is, a retry request
  • the preset item is configured to the first account.
  • the identifier information carried in the second exchange request may be the same as the identifier information carried in the first exchange request, and the second exchange request may further carry a retry mark in the first exchange request, and the retry flag may be used to mark the current
  • the exchange request is the first few retry requests.
  • the total virtual resource of the first account may be the sum of all the virtual resources of the first account, for example, all the tokens of the first account.
  • the target virtual resource is a virtual resource for exchanging preset props.
  • the network side device After receiving the second exchange request, the network side device first determines whether the target virtual resource of the first account has been deducted, if it has been from the total virtual resource of the first account. After deducting the target virtual resource, the preset prop is configured to the first account, and the target virtual resource is not deducted again. After the preset prop is configured to the first account, the network side device sends an exchange response to the client to indicate Successfully configured the preset item to the first account.
  • the network side device of the live broadcast application after the network side device of the live broadcast application receives the first exchange request sent by the client of the live broadcast application, and before the network side device acquires the second exchange request, the network side device passes the live broadcast application.
  • a service obtains a target virtual resource corresponding to the preset item, wherein the first service is used to configure the preset item; the first service may be an item service, and after receiving the first exchange request, the first service may be based on the first exchange
  • the id query of the preset props carried in the request obtains the corresponding target virtual resource.
  • the network side device After obtaining the target virtual resource corresponding to the preset item, the network side device requests the second service to deduct the target virtual resource from the total virtual resource of the first account by using the first service, where the second service may be a token service, and the second service is After deducting the target virtual resource, the second service deducts the second virtual resource from the total virtual resource of the first account after receiving the deduction request sent by the first service, and the second service returns the successful deduction after the deduction is successful. Information, if the second service is not deducted successfully, the information indicating the success is not returned.
  • the network side device performs a configuration operation by using the first service, where the configuration operation is used to configure the preset prop to the first account, and the deduction success information is used to indicate that the total virtuality has been successfully
  • the target virtual resource is deducted from the resource; if the second service returns the deduction success information, indicating that the target virtual resource of the first account has been deducted successfully, the preset prop is configured to the first account by the first service.
  • the network side device determines that the preset prop is not successfully configured to the first account. If the second service does not return the deduction success, the target virtual resource may not be deducted successfully, or the target virtual resource deduction may be successful, but the packet loss when returning the deducted successful information causes no deduction of the success information. In the above two cases or the second service, although the information of the successful deduction is returned, but the process of configuring the preset item to the first account is not successful, it is determined that the network side device has not successfully configured the preset item to the first account.
  • the client initiates a second exchange request, and the network device side obtains a second exchange request initiated by the client.
  • the item service may also initiate a retry to the token service. .
  • the exchange request sent by the client is firstly requested by the prop service to query the virtual resource (prop price) of the prop,
  • the request for the token service to deduct the virtual resource carries the item price, and the token service returns the token and returns the result.
  • the token service needs to call the item service to query the item price and the delivery step multiple times, saving The process reduces the number of service timeouts and improves the user experience.
  • the second exchange request may be a second exchange request sent by the client to the network side device, where the client does not receive the exchange response within the first predetermined time period, to the network.
  • the side device issues a second exchange request.
  • the first predetermined time period is a preset timeout period. If the client does not receive the exchange response sent by the network side device in the first predetermined time period, the client performs a retry, that is, the client sends the network side to the network side.
  • the device issues a second exchange request.
  • the network side device acquires the second exchange request by using the first service, and sends the second exchange request to the second service.
  • the service request deducts the target virtual resource from the total virtual resource.
  • the second predetermined time period is less than the first predetermined time period, for example, the first predetermined time period may be 3 seconds, and the second predetermined time period may be 2 seconds.
  • the number of the second exchange request received by the network side device is limited. For example, when acquiring the second exchange request, the network side device determines that the preset prop is not successfully configured to the first account, and is unsuccessful. If the number of times is less than the preset number of times, the second exchange request is obtained.
  • the number of unsuccessful times is equal to the preset number
  • the number of retry attempts has reached the preset number of times, and the second exchange request is no longer obtained.
  • the number of times the second exchange request can stop the retry and find the problem in time when the network fails.
  • the network side device of the live broadcast application after the network side device of the live broadcast application receives the first exchange request sent by the client of the live broadcast application, and before the network side device acquires the second exchange request, the network side device passes the live broadcast application.
  • a service obtains a target virtual resource corresponding to the preset item, where the first service is used to configure the preset item, and the second service is used to deduct the target virtual resource.
  • the network side device performs a configuration operation by using the first service, where the total virtual resource of the first account is greater than or equal to the sum of the target virtual resource and the undepleted virtual resource of the first account, where the configuration operation is used to configure the preset item
  • the first account is used to deduct the target virtual resource from the total virtual resource by using the first service; if the configuration operation is unsuccessful, the network device determines that the preset item is not successfully configured to the first account. .
  • the first service may be an item service
  • the item service may obtain a price corresponding to the preset item (target virtual resource)
  • the second service is a token service
  • the token balance in the first account is greater than the price and history of the currently requested item.
  • the preset item can be configured to the first account through the item service, and the item service requests the token service to deduct the preset item.
  • the corresponding token if the prop service does not successfully complete the configuration operation, it may be determined that the network side device has not successfully configured the preset prop to the first account, and may initiate a retry request.
  • the order of the item service configuration item and the token service deducting the token may be at the same time, or the item may be configured before the token deduction, and by adjusting the order,
  • the user can get the props to the anchor as soon as they are used, improve the configuration speed of the props, and improve the user experience.
  • the retry in the process of deducting the token may not affect the user's live experience, and improving the prop configuration speed can improve the user experience.
  • the preset item is transferred from the first account to the second account of the live application; or the preset item is stored.
  • the item library of the first account the item library is used to store the item configured for the first account.
  • the first account may send the item to the account of the anchor currently being broadcasted, or may store the item in its own item library, and the network side device may receive the pair.
  • the item is transferred or stored.
  • the item is transferred or stored. For example, after receiving the transfer instruction to the item, the item is transferred to the second account of the live application (which may be the anchor account), and the item is sent to the anchor.
  • the item can be displayed on the client of the first account and the client of the anchor, for example, displaying an animation effect, etc., and the item can also be stored and stored in the item inventory of the first account.
  • the item in the case of transferring the preset item from the first account to the second account, corresponding to the case where the item is bought or sent, the item is stored in the item inventory corresponding to the purchase only, and stored in the item inventory.
  • the items in the item can also be transferred to the second account, corresponding to the case of only giving.
  • the item can be obtained for free, that is, there is no need to deduct the virtual resource, or the virtual resource to be deducted is zero, and the corresponding item configuration and token deduction logic are consistent with the foregoing.
  • FIG. 4 is a flowchart of a method for configuring an optional live application according to an embodiment of the present application. As shown in FIG. 4, the method may include the following steps:
  • Step S402 Send a first exchange request from the client of the live application to the network side device of the live application, where the first exchange request is used to request to configure the preset item in the live application to the first account of the live application.
  • Step S404 if the client does not receive the exchange response sent by the network side device in response to the exchange request, the second exchange request is sent from the client to the network side device, where the second exchange request is used to request the preset again.
  • the item is configured to the first account, and the exchange response is used to indicate that the preset item has been successfully configured to the first account.
  • Step S406 in the case that the network side device has deducted the target virtual resource from the total virtual resource of the first account in response to the first exchange request, acquire, on the client, a pre-configured to the first account in response to the second exchange request. Set props.
  • the client of the live application sends a first exchange request to the network side device of the live application, and if the client does not receive the exchange response sent by the network device in response to the exchange request, the client receives the exchange response.
  • the configuration of the preset item to be configured for the first account solves the technical problem that the account of the live application in the weak network environment often has a low time and requires multiple operations when the item is configured, thereby reducing the number of manual operations of the user. Improve the technical effect of props allocation efficiency in a weak network environment.
  • the optional implementation manner is a configuration method of a live application from the client side, and the first exchange request is sent from the client of the live application to the network side device of the live application, which may be a client.
  • the terminal generates a first exchange request according to the user's click, and then sends the first exchange request to the network side device of the live application.
  • the first exchange request is the same as the first exchange request in step S302.
  • step S404 after the network side device has successfully configured the preset prop to the first account, the network side device sends an exchange response to the client, and if the client does not receive the exchange response, the client The terminal sends an exchange request to the network side device again, that is, the second exchange request, requesting to configure the preset item to the first account.
  • step S406 if the first exchange request does not receive the exchange response, the client issues a second exchange request, and the network side device deducts the target virtuality from the total virtual resource of the first account based on the second exchange request. After the resource is configured, the network side device configures the preset prop to the client of the first account, and obtains, on the client, the preset prop that is configured to be sent to the first account in response to the second exchange request.
  • sending the second exchange request from the client to the network side device includes: when the client does not receive the exchange response within the first predetermined time period, sending the second exchange request to the network side device. .
  • the client initiates the retry request by issuing a timeout.
  • the first predetermined time is a preset time for the client to initiate a retry, and the client has not received the exchange response after exceeding the first predetermined event. In this case, it can be determined that the current exchange request times out, and then the client initiates a retry to initiate a second exchange request to the network measurement device.
  • the client does not perform the retry indefinitely every time the client is timed out, and the client can only perform the retry of the preset number of times, and determines the sending of the second exchange request before the client sends the second exchange request to the network side device. If the number of times the second exchange request is sent is less than the preset number of times, the second exchange request is sent to the network side device. If the number of times the client initiates the retry has reached the preset number of times, The client will not initiate a retry again.
  • the first information is displayed on the client, where the first information is used to indicate that the The preset item is transferred from the first account to the second account of the live application; or the second information is displayed on the client, wherein the second information is used to indicate that the preset item has been stored in the item library of the first account, the item The library is used to store the items configured for the first account.
  • the preset item can be transferred to the second account, or the preset item can be stored in the item library of the first account, and the user can click the preset on the client.
  • the gift mark gives the item to the anchor.
  • the preset item is transferred to the second account, and the first information can be displayed on the client.
  • the first message can prompt the user of the first account to preset the item has been successfully presented to the anchor.
  • the preset item can also be stored in the item library of the first account.
  • the second information is displayed on the client, prompting the user that the preset item has been stored in the item library.
  • the first information and the second information may be text or information such as symbols or animations.
  • FIG. 5 is a flowchart of a method for configuring an optional live application according to an embodiment of the present application. As shown in FIG. 5, the method includes the following steps:
  • step S501 the client sends a request to the item service through the unified access layer.
  • the client issues a use or purchase request for the item. For example, when using the item through the app, it is necessary to purchase the item, trigger the purchase and use logic, and when using the free item or inventory through the app, the item needs to be used to trigger the use logic.
  • the unified access layer can send the client's request to the prop service.
  • the request may be the first exchange request or the second exchange request.
  • Step S502 after receiving the exchange request, the item service sends a request to the token service, requesting the token service to deduct the token of the first account.
  • the item service is a new part of the application relative to the related technical solution, and the original item service part is deleted, and the item service is separately separated to form a unified service, and the order of calling the item service is placed before the token service.
  • the token service deducts the token of the first account
  • the deduction information is sent back to the item service, and after the item service receives the deduction information, the item can be configured to the first account.
  • Step S503 the token service receives the purchase request of the item service, and deducts the token of the first account.
  • the token service is modified, and the modified token service only performs the corresponding token deduction operation, the price query of the prop and the delivery logic are all implemented internally by the prop service, avoiding the prop service and generation.
  • the process of coin service mutual calling makes the item purchase and use the entire call chain a line.
  • the successful deduction message is returned to the item service, and the item service configures the preset item to the first account after receiving the message of successful deduction.
  • step S504 the token service notification is calculated.
  • step S505 the token service notification is divided into a settlement service.
  • the token service notification of several bottles and the content divided into computing services may include: 1. Which anchor is sent to the token, and 2. How many tokens are sent (which can be used to divide the anchor into the post).
  • step S506 the item service transits.
  • the item service can transfer the item from the first account to the second account, for example, to the anchor.
  • Step S507 an item comment service.
  • the code that can be used is: gift_send_danmu.
  • Step S508 commenting on the system and the barrage system.
  • the interface is currently an interface that can call the commenting system, and then the interface of the commenting system to tune the curtain system, which can be optimized later, and can directly call the interface of the barrage system.
  • Step S509 the popularity leaderboard service.
  • the popularity of the items received by each anchor can be ranked by the popularity leaderboard service.
  • step S510 the app can pull the barrage or popularity.
  • the app can also pull the barrage and popularity to view the props or leaderboards.
  • the prop service is separated separately to form a unified service.
  • the original token service only performs the corresponding token deduction operation, the price query of the props and the delivery logic are all props.
  • the internal implementation of the service avoids the process of calling the prop service and the token service, making the purchase and use of the entire call chain a line.
  • the retry logic is also added to the front end. If the front end has a timeout, a uniquely identified key, for example, unique identification information (userid_seq_productid_productnum) may be used for the retry operation, and the background token is executed.
  • the service will use userid_seq_productid_productnum as the key to check whether the debit has been stored.
  • Userid is the user id
  • seq indicates the timestamp of the first request, and remains unchanged during retry.
  • Productid indicates the live id
  • productnum indicates the number of live apis purchased. . Assume that in a weak network environment, there are several situations:
  • the app calls the item service timeout.
  • the item service calls the token service timeout.
  • the app requests the item service to time out.
  • the app front end does not directly display the purchase failure, but uses the userid_seq_productid_productnum to initiate the retry request.
  • the app can support 3 retry attempts, if the three requests fail. , that the request times out, the app shows that the purchase failed.
  • the token service will save the user's debit information.
  • the token service will first check whether the request has been deducted from the token, and if the token is deducted, Then directly return to success, if the token has not been deducted, the deduction operation is performed, and then returned to the prop service.
  • This processing mode can improve the success rate of props purchase and use, reduce the probability that only deductions do not configure props, and greatly reduce the complaints generated by users when purchasing props.
  • FIG. 6 is a schematic diagram of a prop purchase list of a live application page according to an embodiment of the present application.
  • the user can click the gift button in the lower right corner to give a gift to the anchor, and click the gift button.
  • Each item has a price tag and a popularity value that can be added to the main game.
  • the gift can have a free gift.
  • the total amount of tokens currently owned by the current user can also be displayed at the bottom left of the page for the user's reference.
  • the user can select a certain item to perform a purchase operation, and the corresponding app side initiates a prop purchase request.
  • FIG. 7 is a schematic diagram of the item purchase success special effect according to the embodiment of the present application.
  • the item effects can be displayed on the current user's client, and the prompt message “I sent a bunch of candied haws” can be displayed.
  • the anchor is displayed.
  • the popularity value increased from 1005 to 1006.
  • the client in this embodiment may be a video client or a live client.
  • FIG. 8 is a flowchart of a step of executing an item service according to an embodiment of the present application.
  • the request of the front end (which may be a client) is divided into three categories, only purchasing items, using free items or inventory items, and That is, buy and send, the solution of this embodiment is mainly used to process the purchase logic of the item that is bought and sent. Includes the following steps:
  • step S801 it is determined that the current request belongs to purchase or use.
  • the prop service After the front end initiates a prop purchase request, the prop service will initiate a request to the token service, and the request carries the unique identification information (userid_seq_productid_productnum) transparently transmitted through the front end.
  • step S802 it is determined whether the item has been purchased. If the item has been purchased, the process ends, and if the item is not already purchased, step S803 is performed. You can use the identification information (userid+seq+props id+quantity to check if the purchase has been successful).
  • step S803 if it is determined that the purchase is not successful, the price is inquired and the item is purchased, and the inquiry price is completed by the item service itself, and the item service sends the price to the token service, requesting the token service to deduct the corresponding token.
  • step S804 it is determined whether the purchase is successful.
  • the preset number can be 3 times.
  • the preset number can be configured as needed. If the retry is 3 times or the purchase is unsuccessful, the front end is sent to the front end. The purchase failure information is returned, and if the purchase is successful, step S805 is performed.
  • step S805 it is judged whether or not to buy or send.
  • the item service configures the item to the current user account. At this time, it is necessary to determine whether the current user wants to buy or pay only, and in the judgment, the first exchange request originally issued by the client can be judged.
  • Step S806 the user item inventory redis.
  • the item is configured into the user's inventory, and the purchase success information is returned to the front end.
  • step S807 the props are used.
  • step S808 it is determined whether the use is successful.
  • step S810 is performed, and if the use fails, step S809 is performed.
  • step S809 if the usage fails, the failed information can be reported to the boss and written to the CDB for use as a log record for later query.
  • step S810 if the item is successfully used, the transfer is forwarded, the boss is reported, the CDB is written, and then the front end is successfully used.
  • the prop service will initiate a request to the token service, and through the front end transparently transmitted unique identifier userid_seq_productid_productnum, the key is used to query whether the current request has been deducted from the token, if it has been deducted After the token, the token service directly returns to the item service and the purchase is successful. Otherwise, the token deduction operation is performed. The specific deduction amount is transferred from the item service to the token service, and then the result of deducting the token is returned. The prop service will operate the user's item inventory and return the corresponding data to the front end.
  • FIG. 9 is a flowchart of a method for configuring an optional live application according to an embodiment of the present application.
  • the entire framework is divided into three parts, an app, an item service, and a token service.
  • the app initiates a purchase item request to invoke the item service
  • the item service directly calls the token service to query the user account balance and the historical unpaid bill. If the user balance is sufficient to pay the purchase, the item service can be directly shipped and returned to the app.
  • the debit logic of the token service can be delayed, and the cache can be cached first, so that the light logic service can be called immediately, and the heavy logical service is deducted from the token (calling the balance) and writing the token consumption. Running water, etc. are delayed.
  • the technical solution of the embodiment of the present application reorganizes the background logic of the live props, adjusts the purchase and delivery process of the live props, and allows the front end to increase the timestamp (seq) and retry of the first request when purchasing the request. Marks the retry logic if a failure occurs due to a network timeout.
  • the query is stored first.
  • the background is based on userid_seq_productid_productnum (userid is the user id, seq is the current request timestamp, and remains unchanged when retrying, productid indicates the live id, productnum indicates the number of live props purchased) Record whether the current purchase is successful. If successful, return the package directly to the front end. If not, initiate a purchase request.
  • the technical solution of the embodiment of the present application has good feedback in the test, and the foregoing optional implementation has the following advantages: 1. For the user, when purchasing the paid item in the live broadcast, the purchase of the item due to the network problem fails. The reduction in the number of complaints has reduced the related complaints and improved the experience of users watching live gifts, and the products have been well received. 2. For the developer, after the framework is changed, the whole item purchase process is clearer, the positioning and processing problems can be more accurate and fast, and the subsequent functions are more convenient to expand.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present application which is essential or contributes to the related art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, CD-ROM).
  • the instructions include a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present application.
  • a configuration apparatus for a live application for implementing the configuration method of the live application described above is further provided.
  • 10 is a schematic diagram of an apparatus for configuring an optional live application according to an embodiment of the present application.
  • the apparatus may include one or more processors, and one or more memories of the stored program units.
  • the program unit is executed by a processor, and the program unit comprises:
  • the receiving unit 10 is configured to receive a first exchange request sent by the client of the live application to the network side device of the live application, where the first exchange request is used to request to configure the preset item in the live application to the live application.
  • the first obtaining unit 20 is configured to acquire a second exchange request if the network side device fails to configure the preset prop to the first account, where the second exchange request is used to request the preset prop to be configured again.
  • the first configuration unit 30 is configured to, when it is determined that the target virtual resource has been deducted from the total virtual resource of the first account in response to the first exchange request, configure the preset item to the first in response to the second exchange request An account, and sending an exchange response from the network side device to the client, wherein the exchange response is used to indicate that the preset item has been successfully configured to the first account.
  • the receiving unit 10 in this embodiment may be configured to perform step S302 in the foregoing embodiment of the present application.
  • the first obtaining unit 20 in this embodiment may be configured to perform the foregoing embodiment in the present application.
  • the first configuration unit 30 in this embodiment may be configured to perform step S306 in the above embodiment of the present application.
  • the foregoing modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the foregoing embodiments. It should be noted that the foregoing module may be implemented in a hardware environment as shown in FIG. 2 as part of the device, and may be implemented by software or by hardware.
  • the apparatus further includes: a second obtaining unit, configured to: after receiving the first exchange request sent by the client of the live application to the network side device of the live application, and acquiring the second exchange Before the request, the first virtual service is used to obtain the target virtual resource corresponding to the preset prop, wherein the first service is used to configure the preset prop; the first deducting unit is configured to request the second service through the first service. And deducting the target virtual resource from the total virtual resource of the first account, where the second service is used to deduct the target virtual resource; and the second configuration unit is configured to pass the first service if the second service returns the deduction success information.
  • a second obtaining unit configured to: after receiving the first exchange request sent by the client of the live application to the network side device of the live application, and acquiring the second exchange Before the request, the first virtual service is used to obtain the target virtual resource corresponding to the preset prop, wherein the first service is used to configure the preset prop; the first deducting unit is configured to request the second service through the first service. And
  • the first determining unit is set to be in the second service. If the deduction of the success information is not returned, or if the configuration operation is not successful, it is determined that the network side device is not The work items assigned to the first predetermined account.
  • the first obtaining unit 20 is configured to: receive a second exchange request sent by the client to the network side device, where the client does not receive the exchange response within the first predetermined time period Next, a second exchange request is sent to the network side device.
  • the first obtaining unit 20 is further configured to: acquire, by the first service, the second exchange request, if the second service does not return the deduction success information within the second predetermined time period, and The target virtual resource is deducted from the total virtual resource by the first service to the second service request.
  • the apparatus further includes: a third obtaining unit, configured to: after receiving the first exchange request sent by the client of the live application to the network side device of the live application, and acquiring the second exchange Before the request, the first service of the live application is used to obtain the target virtual resource corresponding to the preset item, where the first service is used to configure the preset item, and the third configuration unit is set to be in the first If the total virtual resource of the account is greater than or equal to the sum of the target virtual resource and the undepleted virtual resource of the first account, the configuration operation is performed by the first service, where the configuration operation is used to configure the preset item to the first account; a second deduction unit, configured to deduct a target virtual resource from the total virtual resource by using the first service to the second service, wherein the second service is used to deduct the target virtual resource; and the second determining unit is configured to perform the configuration If the operation is unsuccessful, it is determined that the network side device has not successfully configured the preset prop to the first account.
  • a third obtaining unit configured to: after receiving
  • the apparatus further includes: a transfer unit configured to transfer the preset item from the first account to the live application after configuring the preset item to the first account in response to the second exchange request The second account; or the storage unit is configured to store the preset item in the item library of the first account, wherein the item library is used to store the item configured for the first account.
  • the first obtaining unit 20 is configured to: acquire the second exchange if the network side device fails to configure the preset prop to the first account and the number of unsuccessful times is less than the preset number of times request.
  • a configuration apparatus for a live application for implementing the configuration method of the live application described above is further provided.
  • 11 is a schematic diagram of an apparatus for configuring an optional live application according to an embodiment of the present application.
  • the apparatus may include one or more processors, and one or more memories of the stored program units.
  • the program unit is executed by a processor, and the program unit comprises:
  • the first sending unit 40 is configured to send a first exchange request from the client of the live application to the network side device of the live application, where the first exchange request is used to request to configure the preset item in the live application to the live application.
  • First account number
  • the second sending unit 50 is configured to send a second exchange request from the client to the network side device, when the client does not receive the exchange response sent by the network side device in response to the exchange request, where the second exchange request is used by the second exchange request Re-requesting to configure the preset prop to the first account, and the exchange response is used to indicate that the preset prop has been successfully configured to the first account;
  • the obtaining unit 60 is configured to: when the network side device has deducted the target virtual resource from the total virtual resource of the first account in response to the first exchange request, acquire the configuration on the client in response to the second exchange request A preset item for an account.
  • first sending unit 40 in this embodiment may be configured to perform step S402 in the foregoing embodiment of the present application
  • second sending unit 50 in this embodiment may be configured to perform the foregoing embodiment of the present application
  • step S404 the obtaining unit 60 in this embodiment may be configured to perform step S406 in the above embodiment of the present application.
  • the foregoing modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the foregoing embodiments. It should be noted that the foregoing module may be implemented in a hardware environment as shown in FIG. 2 as part of the device, and may be implemented by software or by hardware.
  • the second sending unit 50 is configured to: when the client does not receive the exchange response within the first predetermined time period, issue a second exchange request to the network side device.
  • the second sending unit 50 is further configured to: send a second exchange request to the network side device if the number of times of sending the second exchange request is less than the preset number of times.
  • the device further includes: a first display unit configured to: after acquiring, on the client, the preset item configured to the first account in response to the second exchange request, displaying the first on the client a message, wherein the first information is used to indicate that the preset item has been transferred from the first account to the second account of the live application; or the second display unit is configured to display the second information on the client, wherein, The second information is used to indicate that the preset item has been stored in the item library of the first account, and the item library is used to store the item configured for the first account.
  • the foregoing modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the foregoing embodiments. It should be noted that the foregoing module may be implemented in a hardware environment as shown in FIG. 2 as part of the device, and may be implemented by software or by hardware, where the hardware environment includes a network environment.
  • a server or a terminal for implementing the configuration method of the live broadcast application described above is further provided.
  • FIG. 12 is a structural block diagram of an electronic device according to an embodiment of the present application.
  • the electronic device may include: one or more (only one shown) processor 201, memory 203, and transmission
  • the device 205 as shown in FIG. 12, may further include an input and output device 207.
  • the memory 203 can be configured to store a computer program and a module, such as a configuration method of the live application in the embodiment of the present application and a program instruction/module corresponding to the device, and the processor 201 is configured to run the computer stored in the memory 203. Programs and modules to perform various functional applications and data processing, that is, to implement the above-described configuration method of the live application.
  • Memory 203 can include high speed random access memory, and can also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 203 can further include memory remotely located relative to processor 201, which can be connected to the terminal over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the transmission device 205 described above is arranged to receive or transmit data via a network, and can also be used for data transmission between the processor and the memory. Specific examples of the above network may include a wired network and a wireless network.
  • the transmission device 205 includes a Network Interface Controller (NIC) that can be connected to other network devices and routers via a network cable to communicate with the Internet or a local area network.
  • the transmission device 205 is a Radio Frequency (RF) module that is configured to communicate with the Internet wirelessly.
  • NIC Network Interface Controller
  • RF Radio Frequency
  • the memory 203 is configured to store an application.
  • the processor 201 may invoke the application stored in the memory 203 through the transmission device 205 to perform the following steps: receiving a first exchange request sent by the client of the live application to the network side device of the live application, where the first exchange request is used for Requesting to configure the preset item in the live application to the first account of the live application; and if the network side device fails to configure the preset item to the first account, obtaining a second exchange request, where the second exchange request is used Re-requesting to allocate the preset prop to the first account; and determining that the target virtual resource has been deducted from the total virtual resource of the first account in response to the first exchange request, the preset is requested in response to the second exchange request
  • the item is configured to be sent to the first account, and the exchange response is sent from the network side device to the client, where the exchange response is used to indicate that the preset item has been successfully configured to the first account.
  • the processor 201 is further configured to: obtain the target virtual resource corresponding to the preset item by using the first service of the live application, where the first service is used to configure the preset item; and the first service is used to serve the second service. Requesting to deduct the target virtual resource from the total virtual resource of the first account, where the second service is used to deduct the target virtual resource; and in the case that the second service returns the deduction success information, the configuration operation is performed by the first service, where the configuration is performed.
  • the operation is used to configure the preset item to the first account, and the deduction success information is used to indicate that the target virtual resource has been successfully deducted from the total virtual resource; in the case that the second service does not return the deduction success information, or the configuration operation is performed If the device is unsuccessful, it is determined that the network device does not successfully configure the preset item to the first account.
  • the processor 201 is further configured to perform the step of: receiving a second exchange request sent by the client to the network side device, wherein the client does not receive the exchange response within the first predetermined time period, and the network side device Issue a second exchange request.
  • the processor 201 is further configured to perform the steps of: acquiring the second exchange request by the first service and the second service by the first service if the second service does not return the deduction success information within the second predetermined time period
  • the service request deducts the target virtual resource from the total virtual resource.
  • the processor 201 is further configured to perform the following steps: after receiving the first exchange request sent by the client of the live application to the network side device of the live application, and before acquiring the second exchange request, passing the first service of the live application Obtaining a target virtual resource corresponding to the preset item, where the first service is used to configure the preset item; and the total virtual resource of the first account is greater than or equal to the sum of the target virtual resource and the undepleted virtual resource of the first account.
  • the configuration operation is configured to configure the preset prop to the first account; and the second service requests the second virtual service to deduct the target virtual resource from the total virtual resource, where the second service is used After the target virtual resource is deducted, if the configuration operation is unsuccessful, it is determined that the network side device fails to configure the preset prop to the first account.
  • the processor 201 is further configured to perform the following steps: after configuring the preset item to the first account in response to the second exchange request, transferring the preset item from the first account to the second account of the live application; or
  • the props are stored in the item library of the first account, wherein the item library is used to store the items allocated to the first account.
  • the processor 201 is further configured to perform the step of acquiring a second exchange request if the network side device fails to configure the preset item to the first account and the number of unsuccessful times is less than the preset number of times.
  • the first exchange request sent by the client of the live application to the network side device of the live application is received; and when the network device fails to configure the preset item to the first account, the second exchange is obtained.
  • Requesting in the case that it is determined that the target virtual resource has been deducted from the total virtual resource of the first account in response to the first exchange request, configuring the preset item to the first account in response to the second exchange request, and from the network side
  • the device sends an exchange response to the client, which reduces the number of manual operations of the user, thereby achieving the technical effect of improving the efficiency of the item configuration in a weak network environment, thereby solving the problem of the live application of the account in the weak network environment.
  • the processor 201 may invoke the application stored in the memory 203 through the transmission device 205 to perform the steps of: transmitting a first exchange request from the client of the live application to the network side device of the live application, wherein the first exchange request is for the request
  • the preset item in the live application is configured to the first account of the live application; if the client does not receive the exchange response sent by the network device in response to the exchange request, the second exchange request is sent from the client to the network side device.
  • the second exchange request is for requesting to configure the preset item to the first account again, and the exchange response is used to indicate that the preset item has been successfully configured to the first account; the network side device has responded to the first exchange request In the case that the target virtual resource is deducted from the total virtual resource of the first account, the preset item configured to the first account in response to the second exchange request is obtained on the client.
  • the processor 201 is further arranged to perform the step of the client issuing a second exchange request to the network side device if the exchange response is not received within the first predetermined time period.
  • the processor 201 is further configured to perform the step of issuing a second exchange request to the network side device if the number of transmissions of the second exchange request is less than the preset number of times.
  • the processor 201 is further configured to perform the following steps: after acquiring, on the client, the first item configured to the first account in response to the second exchange request, displaying the first information on the client, where the first information is used Instructing that the preset item has been transferred from the first account to the second account of the live application; or displaying the second information on the client, wherein the second information is used to indicate that the preset item has been stored in the item library of the first account In the item library, the item stored in the item library is stored.
  • the client of the live application sends a first exchange request to the network side device of the live application, and the client does not receive the exchange response sent by the network device in response to the exchange request, from the client to the client.
  • the network side device sends a second exchange request, where the network side device has deducted the target virtual resource from the total virtual resource of the first account in response to the first exchange request, and obtains the configuration on the client in response to the second exchange request.
  • the preset props of the first account are implemented, thereby realizing the technical effect of improving the efficiency of props configuration in a weak network environment, thereby solving the problem that the account of the live application in the weak network environment often times out during the configuration of the props and requires multiple operations. Inefficient technical problems.
  • FIG. 12 is merely illustrative, and the electronic device can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a mobile Internet device (MID). Terminal equipment such as PAD.
  • FIG. 12 does not limit the structure of the above electronic device.
  • the electronic device may also include more or fewer components (such as a network interface, display device, etc.) than shown in FIG. 12, or have a different configuration than that shown in FIG.
  • Embodiments of the present application also provide a storage medium.
  • the foregoing storage medium stores a computer program, where the computer program is configured to execute a configuration method of the live broadcast application at runtime.
  • the foregoing storage medium may be located on at least one of the plurality of network devices in the network shown in the foregoing embodiment.
  • the storage medium is arranged to store program code set to perform the following steps:
  • the first exchange request sent by the client of the live application to the network side device of the live application, where the first exchange request is used to request to configure the preset item in the live application to the first account of the live application;
  • the second exchange request is used to request the configuration of the preset props to the first account again.
  • the preset item is configured to the first account in response to the second exchange request, and is configured from the network side.
  • the device sends an exchange response to the client, where the exchange response is used to indicate that the preset item has been successfully configured to the first account.
  • the storage medium is further configured to store the program code for performing the following steps: acquiring, by the first service of the live application, the target virtual resource corresponding to the preset item, where the first service is used to configure the preset item; Retrieving the target virtual resource from the total virtual resource of the first account by the first service, where the second service is used to deduct the target virtual resource; and in the case that the second service returns the deduction success information, the first The service performs a configuration operation, where the configuration operation is used to configure the preset item to the first account, and the deduction success information is used to indicate that the target virtual resource has been successfully deducted from the total virtual resource; and the second service does not return the deduction of the success information. If the configuration operation is unsuccessful, the network side device is not successfully configured to allocate the preset item to the first account.
  • the storage medium is further configured to store program code for performing the following steps: receiving a second exchange request sent by the client to the network side device, wherein the client does not receive the exchange response within the first predetermined time period In case, the second exchange request is sent to the network side device.
  • the storage medium is further configured to store program code for performing the following steps: acquiring the second exchange request by the first service if the second service does not return the deduction success information within the second predetermined time period, And deducting the target virtual resource from the total virtual resource by the first service to the second service request.
  • the storage medium is further configured to store program code for performing the following steps: after receiving the first exchange request sent by the client of the live application to the network side device of the live application, and before acquiring the second exchange request
  • the first virtual service is used to obtain the target virtual resource corresponding to the preset prop, wherein the first service is used to configure the preset prop; the total virtual resource in the first account is greater than or equal to the target virtual resource and the first account yet.
  • the configuration operation is performed by the first service, wherein the configuration operation is used to configure the preset props to the first account; and the target service is deducted from the total virtual resources by the first service to the second service request The resource, where the second service is used to deduct the target virtual resource; if the configuration operation is unsuccessful, it is determined that the network side device fails to configure the preset prop to the first account.
  • the storage medium is further configured to store program code for performing the following steps: after configuring the preset item to the first account in response to the second exchange request, transferring the preset item from the first account to the live application The second account; or the preset item is stored in the item library of the first account, wherein the item library is used to store the item configured for the first account.
  • the storage medium is further configured to store program code for performing the following steps: in the case that the network side device fails to configure the preset prop to the first account and the number of unsuccessful times is less than the preset number of times, obtain the first Second exchange request.
  • Embodiments of the present application also provide a storage medium.
  • a computer program is stored in the foregoing storage medium, wherein the computer program is configured to execute a configuration method of the live broadcast application at runtime.
  • the foregoing storage medium may be located on at least one of the plurality of network devices in the network shown in the foregoing embodiment.
  • the storage medium is arranged to store program code for performing the following steps:
  • the first exchange request is sent from the client of the live application to the network side device of the live application, where the first exchange request is used to request to configure the preset item in the live application to the first account of the live application;
  • the second exchange request is sent from the client to the network side device when the client does not receive the exchange response sent by the network side device in response to the exchange request, where the second exchange request is used to request the preset item again. Configured to the first account, the exchange response is used to indicate that the preset item has been successfully configured to the first account;
  • the network side device has deducted the target virtual resource from the total virtual resource of the first account in response to the first exchange request, acquire, on the client, a preset configured to the first account in response to the second exchange request. Props.
  • the storage medium is further arranged to store program code for performing the step of: the client issuing a second exchange request to the network side device if the exchange response is not received within the first predetermined time period.
  • the storage medium is further configured to store program code for performing the step of: issuing a second exchange request to the network side device if the number of transmissions of the second exchange request is less than a preset number of times.
  • the storage medium is further configured to store program code for performing the following steps: after obtaining the preset item configured to the first account in response to the second exchange request on the client, displaying the first information on the client
  • the first information is used to indicate that the preset item has been transferred from the first account to the second account of the live application; or the second information is displayed on the client, wherein the second information is used to indicate that the preset item has been It is stored in the item library of the first account, and the item library is used to store the items allocated to the first account.
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the integrated unit in the above embodiment if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in the above-described computer readable storage medium.
  • the technical solution of the present application may be embodied in the form of a software product, or the whole or part of the technical solution, which is stored in the storage medium, including
  • the instructions are used to cause one or more computer devices (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.
  • the disclosed client may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, unit or module, and may be electrical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • 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 integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Multimedia (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Primary Health Care (AREA)
  • Tourism & Hospitality (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computing Systems (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Disclosed are a method and apparatus for configuring a live streaming application, a storage medium and an electronic apparatus. The method comprises: a network side device of a live streaming application receiving a first exchange request sent by a client of the live streaming application, wherein the first exchange request is used for requesting the configuration of a pre-set prop in the live streaming application to a first account of the live streaming application; if the network side device does not successfully configure the pre-set prop to the first account, the network side device acquiring a second exchange request; and if the network side device determines that a target virtual resource is deducted from the total virtual resources of the first account in response to the first exchange request, the network side device configuring the pre-set prop to the first account in response to the second exchange request, and sending an exchange response to the client, wherein the exchange response is used for indicating that the pre-set prop has been successfully configured to the first account. The present application solves the problem of low efficiency caused by multiple instances of an operation being needed when timeout occurs frequently during an account of a live streaming application being configured with a prop in a weak network environment.

Description

直播应用的配置方法及装置、存储介质以及电子装置Configuration method and device for live application, storage medium and electronic device
本申请要求于2017年06月08日提交中国专利局、申请号为201710429055.8、发明名称“直播应用的配置方法和装置及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application, filed on Jun. 08, 2017, the number of which is hereby incorporated by reference. In the application.
技术领域Technical field
本申请涉及直播应用领域,具体而言,涉及一种直播应用的配置方法及装置、存储介质以及电子装置。The present application relates to the field of live broadcast applications, and in particular, to a method and device for configuring a live broadcast application, a storage medium, and an electronic device.
背景技术Background technique
随着网络直播的兴起,各个直播平台也如雨后春笋般纷纷推出了自己的直播产品。相关的技术方案,用户在直播app中观看某一场直播时,对主播使用付费道具进行送礼,图1是根据相关技术的一种直播过程的配置方法的流程图,如图1所示,整个流程是:首先,直播app收到用户发起的道具购买请求,这时直播app需要调用代币服务进行道具的购买,在代币服务中又包含了调用道具服务的价格查询接口和道具发货接口,在查询完用户要购买的道具价格后,进行扣除代币操作,扣除代币成功后调用道具的发货接口进行发货,然后返回结果给视频统一接入层,然后由视频统一接入层返回结果给直播app,直播app收到返回购买成功的标识后,便进行道具特效的展示,用户和主播可以在app上看到该道具的特效。在整个流程中还有一些其他的服务调用,包括代币的使用需要进行分成结算以及返回给计平相关订单信息,做业务侧和结算侧的对账。道具服务中通过中转系统统计某场直播的人气,记录相关道具流水等。With the rise of webcasting, various live broadcast platforms have also launched their own live broadcast products. Related technical solutions, when the user watches a certain live broadcast in the live app, the user uses the paying props to give gifts. FIG. 1 is a flowchart of a live broadcast process configuration method according to the related art, as shown in FIG. The process is as follows: First, the live app receives the user-initiated item purchase request. At this time, the live app needs to call the token service to purchase the item, and the token service includes the price inquiry interface and the item delivery interface for calling the item service. After querying the price of the item to be purchased by the user, the token deduction operation is performed, and after the token is successfully deducted, the delivery interface of the item is called for delivery, and then the result is returned to the video unified access layer, and then the video unified access layer Returning the result to the live app, after the live app receives the logo that returns the purchase success, it displays the special effects of the item, and the user and the anchor can see the special effects of the item on the app. There are some other service calls in the whole process, including the use of tokens, which need to be divided and settled, and returned to the relevant order information, and the reconciliation between the business side and the settlement side. In the prop service, the popularity of a live broadcast is recorded through the transit system, and the related props are recorded.
从图中可以看出,代币服务和道具服务需要不断调用,流程繁琐,用户如果是在弱网络环境下观看主播的直播时,由于网络抖动等原因,直播app发起一笔道具购买的请求后,代币服务及道具服务完成道具购买和道 具发货的逻辑后,回包给视频统一接入层,这个时候由于整个过程耗时过大,导致直播app认为该次请求已经超时,于是直播app向用户显示该次道具购买失败,但是此时整个后台逻辑已经执行完成,并且认为是一次正常的请求,所以在用户侧会看到自己的代币被扣除,但是道具却购买失败的情况。As can be seen from the figure, the token service and the prop service need to be continuously called, and the process is cumbersome. If the user is watching the live broadcast of the anchor in a weak network environment, the live app launches a request for the purchase of the item due to network jitter and the like. After the token service and the prop service complete the logic of item purchase and item delivery, the package is returned to the video unified access layer. At this time, because the whole process takes too much time, the live app thinks that the request has timed out, so the live app The user is shown that the purchase of the item fails, but at this time the entire background logic has been executed and is considered to be a normal request, so the user side will see that his token is deducted, but the item fails to purchase.
在不断优化产品的同时,直播平台也收到了很多相关的投诉,具体体现在用户购买道具给主播送礼,结果支付成功,app却显示购买失败,这种情况非常影响用户体验和直播产品的口碑。While continuously optimizing the product, the live broadcast platform also received a lot of related complaints, which is reflected in the user's purchase of props to the host broadcast gift, the result is successful, but the app shows the purchase failure, which greatly affects the user experience and the reputation of the live product.
针对上述的问题,目前尚未提出有效的解决方案。In response to the above problems, no effective solution has been proposed yet.
发明内容Summary of the invention
本申请实施例提供了一种直播应用的配置方法及装置、存储介质以及电子装置,以至少解决在弱网络环境下直播应用的帐号在道具配置时经常出现超时需要多次操作导致的效率低的技术问题。The embodiment of the present application provides a method and a device for configuring a live broadcast application, a storage medium, and an electronic device, so as to at least solve the problem that an account of a live broadcast application in a weak network environment often has a timeout requiring multiple operations due to multiple operations. technical problem.
根据本申请实施例的一个方面,提供了一种直播应用的配置方法,包括:所述直播应用的网络侧设备接收直播应用的客户端发送的第一交换请求,其中,所述第一交换请求用于请求将所述直播应用中的预设道具配置给所述直播应用的第一帐号;在所述网络侧设备未成功将所述预设道具配置给所述第一帐号的情况下,所述网络侧设备获取第二交换请求,其中,所述第二交换请求用于再次请求将所述预设道具配置给所述第一帐号;在所述网络侧设备判断出已经响应于所述第一交换请求从所述第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,所述网络侧设备响应于所述第二交换请求将所述预设道具配置给所述第一帐号,并向所述客户端发送交换响应,其中,所述交换响应用于指示已成功将所述预设道具配置给所述第一帐号。According to an aspect of the embodiments of the present application, a method for configuring a live broadcast application includes: receiving, by the network side device of the live broadcast application, a first exchange request sent by a client of a live application, where the first exchange request And a method for requesting to configure a preset prop in the live application to the first account of the live application; if the network side device fails to configure the preset prop to the first account, where The network side device acquires a second exchange request, where the second exchange request is used to request to configure the preset item to the first account, and the network side device determines that the device has responded to the first In the case that an exchange request deducts the target virtual resource from the total virtual resource of the first account, the network side device configures the preset item to the first account in response to the second exchange request. And sending an exchange response to the client, where the exchange response is used to indicate that the preset item has been successfully configured to the first account.
可选地,在所述直播应用的网络侧设备接收直播应用的客户端向所述直播应用的网络侧设备发送的第一交换请求之后、且在所述网络侧设备获 取第二交换请求之前,所述方法还包括:所述网络侧设备通过所述直播应用的第一服务获取所述预设道具所对应的所述目标虚拟资源,其中,所述第一服务用于配置所述预设道具;所述网络侧设备通过所述第一服务向第二服务请求从所述第一帐号的总虚拟资源中扣除所述目标虚拟资源,其中,所述第二服务用于扣除所述目标虚拟资源;在所述第二服务返回扣除成功信息的情况下,所述网络侧设备通过所述第一服务执行配置操作,其中,所述配置操作用于将所述预设道具配置给所述第一帐号,所述扣除成功信息用于指示已成功从所述总虚拟资源中扣除所述目标虚拟资源;在所述第二服务未返回所述扣除成功信息的情况下、或者、在执行所述配置操作未成功的情况下,所述网络侧设备确定出所述网络侧设备未成功将所述预设道具配置给所述第一帐号。Optionally, after the network side device of the live broadcast application receives the first exchange request sent by the client of the live application to the network side device of the live application, and before the network side device acquires the second exchange request, The method further includes: the network side device acquiring, by using the first service of the live application, the target virtual resource corresponding to the preset item, where the first service is used to configure the preset item The network side device deducts the target virtual resource from the total virtual resource of the first account by using the first service to the second service, where the second service is used to deduct the target virtual resource. And the network side device performs a configuration operation by using the first service, where the configuration operation is configured to configure the preset prop to the first An account, the deduction success information is used to indicate that the target virtual resource has been successfully deducted from the total virtual resource; and the deduction success information is not returned in the second service The network side device determines that the network side device does not successfully configure the preset prop to the first account in the case that the configuration operation is unsuccessful.
可选地,所述网络侧设备获取第二交换请求包括:接收所述客户端向所述网络侧设备发送的所述第二交换请求,其中,所述客户端在第一预定时间段内未接收到所述交换响应的情况下,向所述网络侧设备发出所述第二交换请求。Optionally, the acquiring, by the network side device, the second exchange request includes: receiving, by the client, the second exchange request sent by the client to the network side device, where the client is not within the first predetermined time period And receiving the second exchange request to the network side device if the exchange response is received.
可选地,所述网络侧设备获取第二交换请求包括:在所述第二服务在第二预定时间段内未返回所述扣除成功信息的情况下,通过所述第一服务获取所述第二交换请求,并通过所述第一服务向所述第二服务请求从所述总虚拟资源中扣除所述目标虚拟资源。Optionally, the acquiring, by the network side device, the second exchange request includes: acquiring, by the first service, the first service, if the second service does not return the deduction success information within a second predetermined time period And exchanging the request, and deducting the target virtual resource from the total virtual resource by using the first service to the second service request.
可选地,在所述直播应用的网络侧设备接收直播应用的客户端向所述直播应用的网络侧设备发送的第一交换请求之后、且在所述网络侧设备获取第二交换请求之前,所述方法还包括:所述网络侧设备通过所述直播应用的第一服务获取所述预设道具所对应的所述目标虚拟资源,其中,所述第一服务用于配置所述预设道具;在所述第一帐号的总虚拟资源大于等于所述目标虚拟资源与所述第一帐号的尚未扣除的虚拟资源之和情况下,所述网络侧设备通过所述第一服务执行配置操作,其中,所述配置操作用于将所述预设道具配置给所述第一帐号;所述网络侧设备通过所述第一服务 向所述第二服务请求从所述总虚拟资源中扣除所述目标虚拟资源,其中,所述第二服务用于扣除所述目标虚拟资源;在执行所述配置操作未成功的情况下,所述网络侧设备确定出未成功将所述预设道具配置给所述第一帐号。Optionally, after the network side device of the live broadcast application receives the first exchange request sent by the client of the live application to the network side device of the live application, and before the network side device acquires the second exchange request, The method further includes: the network side device acquiring, by using the first service of the live application, the target virtual resource corresponding to the preset item, where the first service is used to configure the preset item The network side device performs a configuration operation by using the first service, where the total virtual resource of the first account is greater than or equal to the sum of the target virtual resource and the undepleted virtual resource of the first account. The configuration operation is configured to configure the preset prop to the first account; the network side device deducts the total virtual resource from the total virtual resource by using the first service by the first service. a target virtual resource, where the second service is used to deduct the target virtual resource; if the configuration operation is not successful, the network side device determines that The preset item is successfully configured to the first account.
可选地,在所述网络侧设备响应于所述第二交换请求将所述预设道具配置给所述第一帐号之后,所述方法还包括:所述网络侧设备将所述预设道具从所述第一帐号转移给所述直播应用的第二帐号;或者所述网络侧设备将所述预设道具存储在所述第一帐号的道具库中,其中,所述道具库中用于存储配置给所述第一帐号的道具。Optionally, after the network side device configures the preset prop to the first account in response to the second exchange request, the method further includes: the network side device, the preset prop Transferring from the first account to the second account of the live application; or the network-side device storing the preset item in the item library of the first account, where the item library is used The item allocated to the first account is stored.
可选地,所述网络侧设备获取所述第二交换请求包括:在所述网络侧设备未成功将所述预设道具配置给所述第一帐号且未成功的次数小于预设次数的情况下,获取所述第二交换请求。Optionally, the acquiring, by the network side device, the second exchange request includes: when the network side device fails to configure the preset prop to the first account, and the number of unsuccessful times is less than a preset number of times And obtaining the second exchange request.
根据本申请实施例的另一方面,还提供了一种直播应用的配置方法,包括:从直播应用的客户端向所述直播应用的网络侧设备发送第一交换请求,其中,所述第一交换请求用于请求将所述直播应用中的预设道具配置给所述直播应用的第一帐号;在所述客户端没有接收到所述网络侧设备响应于所述交换请求发送的交换响应的情况下,从所述客户端向所述网络侧设备发送第二交换请求,其中,所述第二交换请求用于再次请求将所述预设道具配置给所述第一帐号,所述交换响应用于指示已成功将所述预设道具配置给所述第一帐号;在所述网络侧设备已经响应于所述第一交换请求从所述第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,在所述客户端上获取响应于所述第二交换请求配置给所述第一帐号的所述预设道具。According to another aspect of the embodiments of the present application, a method for configuring a live broadcast application is provided, including: sending a first exchange request from a client of a live broadcast application to a network side device of the live broadcast application, where the first The exchange request is used to request to configure a preset prop in the live application to the first account of the live application; and the client does not receive the exchange response sent by the network device in response to the exchange request In the case that the second exchange request is sent from the client to the network side device, where the second exchange request is used to request the configuration of the preset item to the first account again, the exchange response Used to indicate that the preset props have been successfully configured to the first account; the network side device has deducted the target virtual resource from the total virtual resources of the first account in response to the first exchange request In the case that the preset item configured to the first account is configured in response to the second exchange request on the client.
可选地,从所述客户端向所述网络侧设备发送所述第二交换请求包括:所述客户端在第一预定时间段内未接收到所述交换响应的情况下,向所述网络侧设备发出所述第二交换请求。Optionally, the sending, by the client, the second exchange request to the network side device includes: if the client does not receive the exchange response within a first predetermined time period, to the network The side device issues the second exchange request.
可选地,向所述网络侧设备发出所述第二交换请求包括:在所述第二 交换请求的发送次数小于预设次数的情况下,向所述网络侧设备发出所述第二交换请求。Optionally, the sending the second exchange request to the network side device includes: sending the second exchange request to the network side device if the number of times the second exchange request is sent is less than a preset number of times .
可选地,在所述客户端上获取响应于所述第二交换请求配置给所述第一帐号的所述预设道具之后,所述方法还包括:在所述客户端上显示第一信息,其中,所述第一信息用于指示已将所述预设道具从所述第一帐号转移给所述直播应用的第二帐号;或者在所述客户端上显示第二信息,其中,所述第二信息用于指示已将所述预设道具存储在所述第一帐号的道具库中,所述道具库中用于存储配置给所述第一帐号的道具。Optionally, after the acquiring, by the client, the preset item configured to the first account in response to the second exchange request, the method further includes: displaying the first information on the client The first information is used to indicate that the preset item has been transferred from the first account to the second account of the live application; or the second information is displayed on the client, where The second information is used to indicate that the preset item has been stored in a item library of the first account, and the item library is used to store an item configured for the first account.
根据本申请实施例的另一方面,还提供了一种直播应用的配置装置,包括一个或多个处理器,以及一个或多个存储程序单元的存储器,其中,程序单元由处理器执行,程序单元包括:接收单元,被设置为接收直播应用的客户端向所述直播应用的网络侧设备发送的第一交换请求,其中,所述第一交换请求用于请求将所述直播应用中的预设道具配置给所述直播应用的第一帐号;第一获取单元,被设置为在所述网络侧设备未成功将所述预设道具配置给所述第一帐号的情况下,获取第二交换请求,其中,所述第二交换请求用于再次请求将所述预设道具配置给所述第一帐号;第一配置单元,被设置为在判断出已经响应于所述第一交换请求从所述第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,响应于所述第二交换请求将所述预设道具配置给所述第一帐号,并从所述网络侧设备向所述客户端发送交换响应,其中,所述交换响应用于指示已成功将所述预设道具配置给所述第一帐号。According to another aspect of an embodiment of the present application, there is also provided a configuration apparatus for a live broadcast application, comprising one or more processors, and one or more memories storing program units, wherein the program units are executed by a processor, the program The unit includes: a receiving unit, configured to receive a first exchange request sent by a client of the live application to the network side device of the live application, where the first exchange request is used to request a pre- Setting a prop to the first account of the live application; the first obtaining unit is configured to acquire the second exchange if the network side device fails to configure the preset prop to the first account a request, wherein the second exchange request is for requesting to configure the preset item to the first account; the first configuration unit is configured to determine that the device has responded to the first exchange request In the case that the target virtual resource is deducted from the total virtual resource of the first account, the preset item is configured to the first account in response to the second exchange request. And sends a response to the client exchange from the network side device, wherein, in response to the exchange has been successfully used to indicate the preset items assigned to the first account.
可选地,所述装置还包括:第二获取单元,被设置为在接收直播应用的客户端向所述直播应用的网络侧设备发送的第一交换请求之后、且在获取第二交换请求之前,通过所述直播应用的第一服务获取所述预设道具所对应的所述目标虚拟资源,其中,所述第一服务用于配置所述预设道具;第一扣除单元,被设置为通过所述第一服务向第二服务请求从所述第一帐号的总虚拟资源中扣除所述目标虚拟资源,其中,所述第二服务用于扣除 所述目标虚拟资源;第二配置单元,被设置为在所述第二服务返回扣除成功信息的情况下,通过所述第一服务执行配置操作,其中,所述配置操作用于将所述预设道具配置给所述第一帐号,所述扣除成功信息用于指示已成功从所述总虚拟资源中扣除所述目标虚拟资源;第一确定单元,被设置为在所述第二服务未返回所述扣除成功信息的情况下、或者、在执行所述配置操作未成功的情况下,确定出所述网络侧设备未成功将所述预设道具配置给所述第一帐号。Optionally, the device further includes: a second obtaining unit, configured to: after receiving the first exchange request sent by the client of the live application to the network side device of the live application, and before acquiring the second exchange request Obtaining, by the first service of the live application, the target virtual resource corresponding to the preset item, where the first service is used to configure the preset item; and the first deduction unit is configured to pass The first service requests the second service to deduct the target virtual resource from the total virtual resource of the first account, where the second service is used to deduct the target virtual resource; the second configuration unit is And configured to perform a configuration operation by using the first service, where the configuration operation is configured to configure the preset prop to the first account, where the second service returns deduction success information, Deducting success information is used to indicate that the target virtual resource has been successfully deducted from the total virtual resource; the first determining unit is configured to not return the deduction in the second service In the case of the success information, or in the case that the configuration operation is not successful, it is determined that the network side device has not successfully configured the preset prop to the first account.
可选地,所述第一获取单元被设置为:接收所述客户端向所述网络侧设备发送的所述第二交换请求,其中,所述客户端在第一预定时间段内未接收到所述交换响应的情况下,向所述网络侧设备发出所述第二交换请求。Optionally, the first obtaining unit is configured to: receive the second exchange request sent by the client to the network side device, where the client does not receive the first predetermined time period. In the case of the exchange response, the second exchange request is sent to the network side device.
可选地,所述第一获取单元还被设置为:在所述第二服务在第二预定时间段内未返回所述扣除成功信息的情况下,通过所述第一服务获取所述第二交换请求,并通过所述第一服务向所述第二服务请求从所述总虚拟资源中扣除所述目标虚拟资源。Optionally, the first obtaining unit is further configured to: acquire, by the first service, the second service, if the second service does not return the deduction success information within a second predetermined time period Exchanging the request, and deducting the target virtual resource from the total virtual resource by the first service to the second service request.
可选地,所述装置还包括:第三获取单元,被设置为在接收直播应用的客户端向所述直播应用的网络侧设备发送的第一交换请求之后、且在获取第二交换请求之前,通过所述直播应用的第一服务向所述直播应用的第二服务获取所述预设道具所对应的所述目标虚拟资源,其中,所述第一服务用于配置所述预设道具;第三配置单元,被设置为在所述第一帐号的总虚拟资源大于等于所述目标虚拟资源与所述第一帐号的尚未扣除的虚拟资源之和情况下,通过所述第一服务执行配置操作,其中,所述配置操作用于将所述预设道具配置给所述第一帐号;第二扣除单元,被设置为通过所述第一服务向所述第二服务请求从所述总虚拟资源中扣除所述目标虚拟资源,其中,所述第二服务用于扣除所述目标虚拟资源;第二确定单元,被设置为在执行所述配置操作未成功的情况下,确定出所述网络侧设备未成功将所述预设道具配置给所述第一帐号。Optionally, the apparatus further includes: a third obtaining unit, configured to: after receiving the first exchange request sent by the client of the live application to the network side device of the live application, and before acquiring the second exchange request Obtaining, by the first service of the live broadcast application, the target virtual resource corresponding to the preset prop, to the second service of the live application, where the first service is used to configure the preset prop; a third configuration unit, configured to perform configuration by using the first service if a total virtual resource of the first account is greater than or equal to a sum of the target virtual resource and the undepleted virtual resource of the first account The operation, wherein the configuring operation is configured to configure the preset prop to the first account; the second deducting unit is configured to request, by the first service, the second virtual service from the total virtual The target virtual resource is deducted from the resource, wherein the second service is used to deduct the target virtual resource; and the second determining unit is configured to perform the configuration operation unsuccessfully Case, the network side device determines that the preset prop unsuccessfully assigned to the first account.
可选地,所述装置还包括:转移单元,被设置为在响应于所述第二交 换请求将所述预设道具配置给所述第一帐号之后,将所述预设道具从所述第一帐号转移给所述直播应用的第二帐号;或者存储单元,被设置为将所述预设道具存储在所述第一帐号的道具库中,其中,所述道具库中用于存储配置给所述第一帐号的道具。Optionally, the device further includes: a transfer unit, configured to: after the preset item is configured to the first account in response to the second exchange request, the preset item is from the first Transferring an account to the second account of the live application; or storing, by the storage unit, the preset item in the item library of the first account, wherein the item library is used to store the configuration The item of the first account.
可选地,所述第一获取单元被设置为:在所述网络侧设备未成功将所述预设道具配置给所述第一帐号且未成功的次数小于预设次数的情况下,获取所述第二交换请求。Optionally, the first acquiring unit is configured to: when the network side device fails to configure the preset prop to the first account, and the number of unsuccessful times is less than a preset number of times, acquiring the location Said second exchange request.
根据本申请实施例的另一方面,还提供了一种直播应用的配置装置,包括一个或多个处理器,以及一个或多个存储程序单元的存储器,其中,所述程序单元由所述处理器执行,所述程序单元包括:第一发送单元,被设置为从直播应用的客户端向所述直播应用的网络侧设备发送第一交换请求,其中,所述第一交换请求用于请求将所述直播应用中的预设道具配置给所述直播应用的第一帐号;第二发送单元,被设置为在所述客户端没有接收到所述网络侧设备响应于所述交换请求发送的交换响应的情况下,从所述客户端向所述网络侧设备发送第二交换请求,其中,所述第二交换请求用于再次请求将所述预设道具配置给所述第一帐号,所述交换响应用于指示已成功将所述预设道具配置给所述第一帐号;获取单元,被设置为在所述网络侧设备已经响应于所述第一交换请求从所述第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,在所述客户端上获取响应于所述第二交换请求配置给所述第一帐号的所述预设道具。According to another aspect of an embodiment of the present application, there is also provided a configuration apparatus for a live application, comprising one or more processors, and one or more memories storing program units, wherein the program units are processed by the Executing, the program unit includes: a first sending unit, configured to send a first exchange request from a client of the live application to a network side device of the live application, wherein the first exchange request is used to request The preset props in the live application are configured to the first account of the live application; the second sending unit is configured to receive, at the client, the exchange that the network side device sends in response to the exchange request In response, the second exchange request is sent from the client to the network side device, where the second exchange request is used to request the configuration of the preset item to the first account again. The exchange response is used to indicate that the preset item has been successfully configured to the first account; the acquiring unit is configured to have responded to the network side device If the exchange request deducts the target virtual resource from the total virtual resource of the first account, acquiring, by the client, the preset item configured to the first account in response to the second exchange request .
可选地,所述第二发送单元被设置为:所述客户端在第一预定时间段内未接收到所述交换响应的情况下,向所述网络侧设备发出所述第二交换请求。Optionally, the second sending unit is configured to: if the client does not receive the exchange response within a first predetermined time period, send the second exchange request to the network side device.
可选地,所述第二发送单元还被设置为:在所述第二交换请求的发送次数小于预设次数的情况下,向所述网络侧设备发出所述第二交换请求。Optionally, the second sending unit is further configured to: send the second exchange request to the network side device if the number of times of sending the second exchange request is less than a preset number of times.
可选地,所述装置还包括:第一显示单元,被设置为在所述客户端上获取响应于所述第二交换请求配置给所述第一帐号的所述预设道具之后, 在所述客户端上显示第一信息,其中,所述第一信息用于指示已将所述预设道具从所述第一帐号转移给所述直播应用的第二帐号;或者第二显示单元,被设置为在所述客户端上显示第二信息,其中,所述第二信息用于指示已将所述预设道具存储在所述第一帐号的道具库中,所述道具库中用于存储配置给所述第一帐号的道具。Optionally, the device further includes: a first display unit, configured to: after acquiring, on the client, the preset item configured to the first account in response to the second exchange request, The first information is displayed on the client, where the first information is used to indicate that the preset item has been transferred from the first account to the second account of the live application; or the second display unit is And being configured to display the second information on the client, where the second information is used to indicate that the preset item has been stored in an item library of the first account, and the item library is used for storing An item configured for the first account.
根据本申请实施例的另一方面,还提供了一种存储介质,该存储介质中存储有计算机程序,该计算机程序被设置为运行时执行本申请的直播应用的配置方法。According to another aspect of an embodiment of the present application, there is also provided a storage medium having stored therein a computer program configured to execute a configuration method of a live application of the present application at runtime.
在本申请实施例中,通过直播应用的网络侧设备接收直播应用的客户端发送的第一交换请求;在网络侧设备未成功将预设道具配置给第一帐号的情况下,网络侧设备获取第二交换请求;在网络侧设备判断出已经响应于第一交换请求从第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,网络侧设备响应于第二交换请求将预设道具配置给第一帐号,并向客户端发送交换响应,自动对道具配置进行重试并在已经支付虚拟资源的情况下不会再次扣除虚拟资源,达到了减少了用户的手动操作次数的目的,从而实现了在弱网络环境下提高道具配置效率的技术效果,进而解决了在弱网络环境下直播应用的帐号在道具配置时经常出现超时需要多次操作导致的效率低的技术问题。In the embodiment of the present application, the network side device of the live broadcast application receives the first exchange request sent by the client of the live application; and when the network device fails to configure the preset item to the first account, the network side device acquires a second exchange request; if the network side device determines that the target virtual resource has been deducted from the total virtual resource of the first account in response to the first exchange request, the network side device configures the preset item in response to the second exchange request Giving the first account and sending an exchange response to the client, automatically retrying the item configuration and not deducting the virtual resource again if the virtual resource has been paid, thereby reducing the number of manual operations of the user, thereby achieving The technical effect of improving the efficiency of item configuration in a weak network environment, and solving the technical problem that the account of the live application in the weak network environment often has a timeout requiring multiple operations when the item is configured.
附图说明DRAWINGS
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the present application, and are intended to be a part of this application. In the drawing:
图1是根据相关技术的一种直播过程的配置方法的流程图;1 is a flowchart of a method for configuring a live broadcast process according to the related art;
图2是根据本申请实施例的直播应用的配置方法的硬件环境的示意图;2 is a schematic diagram of a hardware environment of a configuration method of a live broadcast application according to an embodiment of the present application;
图3是根据本申请实施例的一种可选的直播应用的配置方法的流程图;FIG. 3 is a flowchart of a method for configuring an optional live application according to an embodiment of the present application; FIG.
图4是根据本申请实施例的另一种可选的直播应用的配置方法的流程图;4 is a flowchart of another optional live application configuration method according to an embodiment of the present application;
图5是根据本申请实施例的又一种可选的直播应用的配置方法的流程图;FIG. 5 is a flowchart of still another optional method for configuring a live broadcast application according to an embodiment of the present application;
图6是根据本申请实施例的直播应用页面的道具购买列表的示意图;6 is a schematic diagram of a prop purchase list of a live application page according to an embodiment of the present application;
图7是根据本申请实施例的道具购买成功特效的示意图;7 is a schematic diagram of a special effect of prop purchase success according to an embodiment of the present application;
图8是根据本申请实施例的一种道具服务执行步骤的流程图;FIG. 8 is a flowchart of a step of executing an item service according to an embodiment of the present application; FIG.
图9是根据本申请实施例的又一种可选的直播应用的配置方法的流程图;FIG. 9 is a flowchart of still another optional method for configuring a live broadcast application according to an embodiment of the present application;
图10是根据本申请实施例的又一种可选的直播应用的配置装置的示意图;FIG. 10 is a schematic diagram of still another optional configuration apparatus of a live broadcast application according to an embodiment of the present application; FIG.
图11是根据本申请实施例的又一种可选的直播应用的配置装置的示意图;以及11 is a schematic diagram of still another optional configuration apparatus of a live broadcast application according to an embodiment of the present application;
图12是根据本申请实施例的一种电子装置的结构框图。FIG. 12 is a structural block diagram of an electronic device according to an embodiment of the present application.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present application. It is an embodiment of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope shall fall within the scope of the application.
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实 施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second" and the like 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 order. It is to be understood that the data so used may be interchanged where appropriate, such that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "comprises" and "comprises" and "the" and "the" are intended to cover a non-exclusive inclusion, for example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to Those steps or units may include other steps or units not explicitly listed or inherent to such processes, methods, products or devices.
根据本申请实施例,提供了一种直播应用的配置的方法实施例。According to an embodiment of the present application, a method embodiment of a configuration of a live broadcast application is provided.
可选地,在本实施例中,上述直播应用的配置方法可以应用于如图2所示的由服务器102和终端104所构成的硬件环境中。如图2所示,服务器102通过网络与终端104进行连接,上述网络包括但不限于:广域网、城域网或局域网,终端104并不限定于PC、手机、平板电脑等。本申请实施例的直播应用的配置方法可以由服务器102来执行,也可以由终端104来执行,还可以是由服务器102和终端104共同执行。其中,终端104执行本申请实施例的直播应用的配置方法也可以是由安装在其上的客户端来执行。Optionally, in this embodiment, the configuration method of the live broadcast application may be applied to a hardware environment formed by the server 102 and the terminal 104 as shown in FIG. 2 . As shown in FIG. 2, the server 102 is connected to the terminal 104 through a network. The network includes but is not limited to a wide area network, a metropolitan area network, or a local area network. The terminal 104 is not limited to a PC, a mobile phone, a tablet, or the like. The configuration method of the live application of the embodiment of the present application may be performed by the server 102, may be performed by the terminal 104, or may be performed by the server 102 and the terminal 104 in common. The method for configuring the live application of the terminal 104 in the embodiment of the present application may also be performed by a client installed on the terminal.
在一种可选的应用场景中,直播应用第一帐号的客户端向直播应用的网络侧设备发送交换请求,请求通过第一帐号的虚拟资源交换预设道具,如果在一定时间内网络侧没有成功将预设道具配置给第一帐号,则直播应用客户端会再次发送交换请求,网络侧设备判断如果已经扣除过第一帐号的虚拟资源则不会再次扣除,而是直接将道具配置给第一帐号,然后向客户端发送交换响应。由于在没有成功配置道具给第一帐号的情况下,客户端会发起重试,因此,可以自动对道具配置进行重试,而且在已经支付虚拟资源的情况下不会再次扣除虚拟资源,达到了减少了用户的手动操作次数的目的,从而实现了在弱网络环境下提高道具配置效率的技术效果。In an optional application scenario, the client of the first application of the live broadcast application sends an exchange request to the network side device of the live application, requesting to exchange the preset props through the virtual resource of the first account, if the network side does not exist within a certain period of time If the default prop is successfully configured to the first account, the live application client will send the exchange request again. The network device determines that the virtual resource of the first account has been deducted, and will not be deducted again. An account and then send an exchange response to the client. Since the client will initiate a retry without successfully configuring the item to the first account, the item configuration can be retried automatically, and the virtual resource is not deducted again when the virtual resource has been paid. The purpose of reducing the number of manual operations of the user is reduced, thereby realizing the technical effect of improving the efficiency of item configuration in a weak network environment.
图3是根据本申请实施例的一种可选的直播应用的配置方法的流程图,如图3所示,该方法可以包括以下步骤:FIG. 3 is a flowchart of a method for configuring an optional live application according to an embodiment of the present application. As shown in FIG. 3, the method may include the following steps:
步骤S302,直播应用的网络侧设备接收直播应用的客户端发送的第一交换请求,其中,第一交换请求用于请求将直播应用中的预设道具配置给直播应用的第一帐号。Step S302: The network side device of the live application receives the first exchange request sent by the client of the live application, where the first exchange request is used to request to configure the preset item in the live application to the first account of the live application.
步骤S304,在网络侧设备未成功将预设道具配置给第一帐号的情况下,网络侧设备获取第二交换请求,其中,第二交换请求用于再次请求将预设道具配置给第一帐号。Step S304: The network side device acquires a second exchange request, where the second exchange request is used to configure the preset item to the first account again. .
步骤S306,在网络侧设备判断出已经响应于第一交换请求从第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,网络侧设备响应于第二交换请求将预设道具配置给第一帐号,并向客户端发送交换响应,其中,交换响应用于指示已成功将预设道具配置给第一帐号。Step S306, in the case that the network side device determines that the target virtual resource has been deducted from the total virtual resource of the first account in response to the first exchange request, the network side device configures the preset prop to the second in response to the second exchange request. An account and sending an exchange response to the client, wherein the exchange response is used to indicate that the preset item has been successfully configured to the first account.
通过上述步骤S302至步骤S306,通过直播应用的网络侧设备接收直播应用的客户端发送的第一交换请求;在网络侧设备未成功将预设道具配置给第一帐号的情况下,网络侧设备获取第二交换请求;在网络侧设备判断出已经响应于第一交换请求从第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,网络侧设备响应于第二交换请求将预设道具配置给第一帐号,并向客户端发送交换响应,自动对道具配置进行重试并在已经支付虚拟资源的情况下不会再次扣除虚拟资源,解决了在弱网络环境下直播应用的帐号在道具配置时经常出现超时需要多次操作导致的效率低的技术问题,进而达到减少了用户的手动操作次数,提高在弱网络环境下道具配置效率的技术效果。The network side device of the live broadcast application receives the first exchange request sent by the client of the live application through the foregoing steps S302 to S306; and the network side device if the network device fails to configure the preset item to the first account. Obtaining a second exchange request; if the network side device determines that the target virtual resource has been deducted from the total virtual resource of the first account in response to the first exchange request, the network side device presets the item in response to the second exchange request Configure the first account, and send an exchange response to the client, automatically retry the item configuration and not deduct the virtual resource again if the virtual resource has been paid, and solve the problem of the live application in the weak network environment. When configuring, there are often technical problems that cause inefficiency caused by multiple operations, which reduces the number of manual operations of the user and improves the technical efficiency of prop placement efficiency in a weak network environment.
在步骤S302提供的技术方案中,直播应用可以是多个观众用户在线观看主播用户通过网络进行的直播的应用,例如,用户可以通过安装在移动终端上的直播应用观看美食、唱歌等类型的直播,在直播过程中,为了表达用户对主播的喜爱或者为主播增加人气,可以赠送多种类型的道具,赠送的道具可以在赠送的用户的页面和主播的页面上展示特效,提高直播过程的趣味性,赠送的道具还可以显示在观看主播的直播画面的所有用户的显示屏上。In the technical solution provided in step S302, the live broadcast application may be an application in which a plurality of viewer users watch the live broadcast of the anchor user through the network online. For example, the user may watch the live broadcast of the food, the singer, and the like through the live broadcast application installed on the mobile terminal. In the live broadcast process, in order to express the user's favorite of the anchor or increase the popularity of the main broadcast, various types of props can be presented, and the presented props can display special effects on the presented user's page and the anchor page, thereby improving the fun of the live broadcast process. Sex, the gift items can also be displayed on the display screen of all users who watch the live screen of the anchor.
该实施例是从直播应用的网络侧设备一侧的直播应用的配置方法,网络侧设备接收直播应用的客户端向网络侧设备发送第一交换请求,第一交换请求用于请求用第一帐号中的虚拟资源交换预设道具,预设道具是要用 虚拟资源交换的道具,预设道具可以有多个,多个道具每个道具都有标价,可以通过帐号中的虚拟资源换取道具,例如,对于糖葫芦道具,标价为1钻石,或者1代币,1钻石或者1代币都是第一帐号中的虚拟资源,需要说明的是,对于虚拟资源,可以只有一种单位的虚拟资源,也可以有多种单位的虚拟资源,多个单位的虚拟资源之间具有明确的换算关系,可以换算成统一单位。第一帐号可以通过支付一个代币来换取糖葫芦道具,需要第一帐号客户端发送第一交换请求,第一交换请求可以是客户端基于用户的点击操作生成的交换请求,第一交换请求中携带有标识信息,标识信息可以包括预设道具的id和数量。The embodiment is a method for configuring a live application from a network side device side of a live application. The client that receives the live application on the network side device sends a first exchange request to the network side device, and the first exchange request is used to request the first account. In the virtual resource exchange preset props, the preset props are props to be exchanged with virtual resources. There may be multiple preset props, and each prop has a price tag, and the virtual resources in the account may be exchanged for props, for example For the sugar gourd props, the price is 1 diamond, or 1 token, 1 diamond or 1 token is the virtual resource in the first account. It should be noted that for virtual resources, there can be only one unit of virtual resources. There may be multiple units of virtual resources, and multiple units of virtual resources have a clear conversion relationship, which can be converted into a unified unit. The first account can be exchanged for the sugar hoist props by paying a token, and the first account client needs to send the first exchange request, and the first exchange request can be an exchange request generated by the client based on the user's click operation, and the first exchange request carries There is identification information, and the identification information may include an id and a quantity of the preset item.
在步骤S304提供的技术方案中,网络侧设备未成功将预设道具配置给第一帐号包括多种情况,例如,网络侧设备没有接收到客户端发送的交换请求;网络侧设备接收到客户端发送的交换请求但是没有成功扣除虚拟资源;网络侧设备成功扣除虚拟资源但是没有配置预设道具给第一帐号;还包括网络侧设备在没有成功将预设道具配置给第一帐号时发出的配置失败的回应,在上述几种情况出现之后,客户端再次向网络侧设备发送第二交换请求(也即重试请求),网络侧设备接收第二交换请求,第二交换请求用于请求再次将预设道具配置给第一帐号。第二交换请求中携带的标识信息可以与第一交换请求中携带的标识信息相同,第二交换请求中还可以比第一交换请求中多携带一个重试标记,重试标记可以用于标记当前的交换请求是第几次重试请求。In the technical solution provided in step S304, the network side device does not successfully configure the preset prop to the first account, including multiple cases. For example, the network side device does not receive the exchange request sent by the client; the network side device receives the client. The exchange request is sent but the virtual resource is not successfully deducted; the network side device successfully deducts the virtual resource but does not configure the preset prop to the first account; and the configuration that is sent when the network side device fails to configure the preset prop to the first account. The failed response, after the above several situations occur, the client sends a second exchange request (that is, a retry request) to the network side device again, the network side device receives the second exchange request, and the second exchange request is used to request the second exchange request again. The preset item is configured to the first account. The identifier information carried in the second exchange request may be the same as the identifier information carried in the first exchange request, and the second exchange request may further carry a retry mark in the first exchange request, and the retry flag may be used to mark the current The exchange request is the first few retry requests.
在步骤S306提供的技术方案中,第一帐号的总虚拟资源可以是第一帐号的所有虚拟资源的总和,例如第一帐号的所有代币。目标虚拟资源是用于交换预设道具的虚拟资源,网络侧设备在接收到第二交换请求之后,首先判断第一帐号的目标虚拟资源是否已经扣除,如果已经从第一帐号的总虚拟资源中扣除了目标虚拟资源,则将预设道具配置给第一帐号,而不会再次扣除目标虚拟资源,在将预设道具配置给第一帐号之后,网络侧设备向客户端发送交换响应,以指示成功将预设道具配置给第一帐号。In the technical solution provided in step S306, the total virtual resource of the first account may be the sum of all the virtual resources of the first account, for example, all the tokens of the first account. The target virtual resource is a virtual resource for exchanging preset props. After receiving the second exchange request, the network side device first determines whether the target virtual resource of the first account has been deducted, if it has been from the total virtual resource of the first account. After deducting the target virtual resource, the preset prop is configured to the first account, and the target virtual resource is not deducted again. After the preset prop is configured to the first account, the network side device sends an exchange response to the client to indicate Successfully configured the preset item to the first account.
作为一种可选的实施例,在直播应用的网络侧设备接收直播应用的客户端发送的第一交换请求之后、且在网络侧设备获取第二交换请求之前,网络侧设备通过直播应用的第一服务获取预设道具所对应的目标虚拟资源,其中,第一服务用于配置预设道具;第一服务可以是道具服务,在接收到第一交换请求之后,第一服务可以根据第一交换请求中携带的预设道具的id查询得到对应的目标虚拟资源。As an optional embodiment, after the network side device of the live broadcast application receives the first exchange request sent by the client of the live broadcast application, and before the network side device acquires the second exchange request, the network side device passes the live broadcast application. A service obtains a target virtual resource corresponding to the preset item, wherein the first service is used to configure the preset item; the first service may be an item service, and after receiving the first exchange request, the first service may be based on the first exchange The id query of the preset props carried in the request obtains the corresponding target virtual resource.
在得到预设道具对应的目标虚拟资源之后,网络侧设备通过第一服务向第二服务请求从第一帐号的总虚拟资源中扣除目标虚拟资源,第二服务可以是代币服务,第二服务用于扣除目标虚拟资源,第二服务在接收到第一服务发送的扣除请求之后,从第一帐号的总虚拟资源中扣除第二虚拟资源,第二服务在扣除成功之后,会返回扣除成功的信息,如果第二服务没有扣除成功,则不返回扣除成功的信息。After obtaining the target virtual resource corresponding to the preset item, the network side device requests the second service to deduct the target virtual resource from the total virtual resource of the first account by using the first service, where the second service may be a token service, and the second service is After deducting the target virtual resource, the second service deducts the second virtual resource from the total virtual resource of the first account after receiving the deduction request sent by the first service, and the second service returns the successful deduction after the deduction is successful. Information, if the second service is not deducted successfully, the information indicating the success is not returned.
在第二服务返回扣除成功信息的情况下,网络侧设备通过第一服务执行配置操作,其中,配置操作用于将预设道具配置给第一帐号,扣除成功信息用于指示已成功从总虚拟资源中扣除目标虚拟资源;如果第二服务返回扣除成功信息,表示第一帐号的目标虚拟资源已经扣除成功,则通过第一服务将预设道具配置给第一帐号。In the case that the second service returns the deduction of the success information, the network side device performs a configuration operation by using the first service, where the configuration operation is used to configure the preset prop to the first account, and the deduction success information is used to indicate that the total virtuality has been successfully The target virtual resource is deducted from the resource; if the second service returns the deduction success information, indicating that the target virtual resource of the first account has been deducted successfully, the preset prop is configured to the first account by the first service.
在第二服务未返回扣除成功信息的情况下、或者、在执行配置操作未成功的情况下,网络侧设备确定出未成功将预设道具配置给第一帐号。如果第二服务未返回扣除成功,则可能是目标虚拟资源未扣除成功,也可能是目标虚拟资源扣除成功,但是在返回扣除成功的信息的时候丢包导致没有返回扣除成功信息。在以上两种情况或者第二服务虽然返回扣除成功的信息,但是将预设道具配置给第一帐号的过程没有成功,则确定出网络侧设备未成功将预设道具配置给第一帐号,此时,需要对第一交换请求进行重试,客户端发起第二交换请求,网络设备侧获取客户端发起的第二交换请求,在一些情况下,也可以是道具服务向代币服务发起重试。In the case that the second service does not return the deduction of the success information, or if the configuration operation is unsuccessful, the network side device determines that the preset prop is not successfully configured to the first account. If the second service does not return the deduction success, the target virtual resource may not be deducted successfully, or the target virtual resource deduction may be successful, but the packet loss when returning the deducted successful information causes no deduction of the success information. In the above two cases or the second service, although the information of the successful deduction is returned, but the process of configuring the preset item to the first account is not successful, it is determined that the network side device has not successfully configured the preset item to the first account. When the first exchange request is retried, the client initiates a second exchange request, and the network device side obtains a second exchange request initiated by the client. In some cases, the item service may also initiate a retry to the token service. .
在该可选的实施例中,由于改进了相关技术的道具服务和代币服务的 调用过程,将客户端发来的交换请求首先由道具服务查询道具所需要的虚拟资源(道具价格),在请求代币服务扣除虚拟资源的请求中携带道具价格,代币服务扣除代币之后将结果返回,相比于相关技术的代币服务需要多次调用道具服务查询道具价格和发货的步骤,节省了流程,减少了服务超时的次数,提高了用户体验。In the optional embodiment, since the related art props service and the token service calling process are improved, the exchange request sent by the client is firstly requested by the prop service to query the virtual resource (prop price) of the prop, The request for the token service to deduct the virtual resource carries the item price, and the token service returns the token and returns the result. Compared with the related technology, the token service needs to call the item service to query the item price and the delivery step multiple times, saving The process reduces the number of service timeouts and improves the user experience.
作为一种可选的实施例,第二交换请求可以是客户端向网络侧设备发送的第二交换请求,其中,客户端在第一预定时间段内未接收到交换响应的情况下,向网络侧设备发出第二交换请求。第一预定时间段是预先设定的超时时间段,如果客户端在第一预定时间段没有接收到网络侧设备发送的交换响应,则客户端会进行重试,也即,客户端向网络侧设备发出第二交换请求。As an optional embodiment, the second exchange request may be a second exchange request sent by the client to the network side device, where the client does not receive the exchange response within the first predetermined time period, to the network. The side device issues a second exchange request. The first predetermined time period is a preset timeout period. If the client does not receive the exchange response sent by the network side device in the first predetermined time period, the client performs a retry, that is, the client sends the network side to the network side. The device issues a second exchange request.
作为一种可选的实施例,在第二服务在第二预定时间段内未返回扣除成功信息的情况下,网络侧设备通过第一服务获取第二交换请求,并通过第一服务向第二服务请求从总虚拟资源中扣除目标虚拟资源。第二预定时间段小于第一预定时间段,例如,第一预定时间段可以是3秒,第二预定时间段可以是2秒。可选地,网络侧设备接收第二交换请求的数量是有限制的,例如,在获取第二交换请求时,网络侧设备先确定未成功将预设道具配置给第一帐号,并且,未成功的次数少于预设次数,才会获取第二交换请求,当未成功次数等于预设次数时,说明重试的次数已经达到预设次数,就不再获取第二交换请求了,通过限定获取第二交换请求的次数,可以在网络出现故障时及时停止多次重试发现问题。As an optional embodiment, in a case that the second service does not return the deduction success information within the second predetermined time period, the network side device acquires the second exchange request by using the first service, and sends the second exchange request to the second service. The service request deducts the target virtual resource from the total virtual resource. The second predetermined time period is less than the first predetermined time period, for example, the first predetermined time period may be 3 seconds, and the second predetermined time period may be 2 seconds. Optionally, the number of the second exchange request received by the network side device is limited. For example, when acquiring the second exchange request, the network side device determines that the preset prop is not successfully configured to the first account, and is unsuccessful. If the number of times is less than the preset number of times, the second exchange request is obtained. When the number of unsuccessful times is equal to the preset number, the number of retry attempts has reached the preset number of times, and the second exchange request is no longer obtained. The number of times the second exchange request can stop the retry and find the problem in time when the network fails.
作为一种可选的实施例,在直播应用的网络侧设备接收直播应用的客户端发送的第一交换请求之后、且在网络侧设备获取第二交换请求之前,网络侧设备通过直播应用的第一服务获取预设道具所对应的目标虚拟资源,其中,第一服务用于配置预设道具,第二服务用于扣除目标虚拟资源。在第一帐号的总虚拟资源大于等于目标虚拟资源与第一帐号的尚未扣除的虚拟资源之和情况下,网络侧设备通过第一服务执行配置操作,其中, 配置操作用于将预设道具配置给第一帐号,通过第一服务向第二服务请求从总虚拟资源中扣除目标虚拟资源;在执行配置操作未成功的情况下,网络侧设备确定出未成功将预设道具配置给第一帐号。As an optional embodiment, after the network side device of the live broadcast application receives the first exchange request sent by the client of the live broadcast application, and before the network side device acquires the second exchange request, the network side device passes the live broadcast application. A service obtains a target virtual resource corresponding to the preset item, where the first service is used to configure the preset item, and the second service is used to deduct the target virtual resource. The network side device performs a configuration operation by using the first service, where the total virtual resource of the first account is greater than or equal to the sum of the target virtual resource and the undepleted virtual resource of the first account, where the configuration operation is used to configure the preset item The first account is used to deduct the target virtual resource from the total virtual resource by using the first service; if the configuration operation is unsuccessful, the network device determines that the preset item is not successfully configured to the first account. .
第一服务可以是道具服务,道具服务可以获取预设道具对应的标价(目标虚拟资源),第二服务是代币服务,在第一帐号的代币余额大于当前请求的道具的价格和历史未支付的金额之和的情况下,说明用户当前的代币余量可以购买当前的道具,因此,可以通过道具服务将预设道具配置给第一帐号,道具服务向代币服务请求扣除预设道具对应的代币,如果道具服务没有成功完成配置操作,则可以确定网络侧设备没有成功将预设道具配置给第一帐号,可以发起重试请求。需要说明的是,在该可选的实施例中,道具服务配置道具和代币服务扣除代币的顺序可以是同时,也可以是先配置道具再进行代币扣除,通过调整这一顺序,可以使用户在使用时最快得到道具送给主播,提高道具配置速度,提高用户体验,扣除代币的过程中的重试可能不太影响用户的直播感受,而提高道具配置速度能够提高用户体验。The first service may be an item service, the item service may obtain a price corresponding to the preset item (target virtual resource), and the second service is a token service, and the token balance in the first account is greater than the price and history of the currently requested item. In the case of the sum of the amount of payment, the current token amount of the user can purchase the current item. Therefore, the preset item can be configured to the first account through the item service, and the item service requests the token service to deduct the preset item. The corresponding token, if the prop service does not successfully complete the configuration operation, it may be determined that the network side device has not successfully configured the preset prop to the first account, and may initiate a retry request. It should be noted that, in the optional embodiment, the order of the item service configuration item and the token service deducting the token may be at the same time, or the item may be configured before the token deduction, and by adjusting the order, The user can get the props to the anchor as soon as they are used, improve the configuration speed of the props, and improve the user experience. The retry in the process of deducting the token may not affect the user's live experience, and improving the prop configuration speed can improve the user experience.
作为一种可选的实施例,在响应于第二交换请求将预设道具配置给第一帐号之后,将预设道具从第一帐号转移给直播应用的第二帐号;或者将预设道具存储在第一帐号的道具库中,其中,道具库中用于存储配置给第一帐号的道具。在第一帐号用虚拟资源交换得到预设道具之后,第一帐号可以将道具送给当前正在直播的主播的帐号,也可以将道具存储在自己的道具库中,网络侧设备可以在接收到对道具的转移或存储指令之后,对道具进行转移或存储,例如,在接收到对道具的转移指令之后,将道具转移给直播应用的第二帐号(可以是主播帐号),在将道具送给主播之后,可以在第一帐号的客户端和主播的客户端对道具进行显示,例如,显示动画效果等,也可以对道具进行存储,存储在第一帐号的道具库存中。需要说明的是,对于将预设道具从第一帐号转移给第二帐号的情况,对应于道具即买即送的情况,将道具存储在道具库存中对应于仅购买的情况,存储在道具库存中的道具也可以转移给第二帐号,对应于仅赠送的情况。在一些 情况下,道具可以免费获取,即不需要扣除虚拟资源,或者需要扣除的虚拟资源为零,对应的道具配置和代币扣除逻辑与前文一致。As an optional embodiment, after the preset item is configured to the first account in response to the second exchange request, the preset item is transferred from the first account to the second account of the live application; or the preset item is stored. In the item library of the first account, the item library is used to store the item configured for the first account. After the first account is exchanged with the virtual resource to obtain the preset item, the first account may send the item to the account of the anchor currently being broadcasted, or may store the item in its own item library, and the network side device may receive the pair. After the item is transferred or stored, the item is transferred or stored. For example, after receiving the transfer instruction to the item, the item is transferred to the second account of the live application (which may be the anchor account), and the item is sent to the anchor. After that, the item can be displayed on the client of the first account and the client of the anchor, for example, displaying an animation effect, etc., and the item can also be stored and stored in the item inventory of the first account. It should be noted that, in the case of transferring the preset item from the first account to the second account, corresponding to the case where the item is bought or sent, the item is stored in the item inventory corresponding to the purchase only, and stored in the item inventory. The items in the item can also be transferred to the second account, corresponding to the case of only giving. In some cases, the item can be obtained for free, that is, there is no need to deduct the virtual resource, or the virtual resource to be deducted is zero, and the corresponding item configuration and token deduction logic are consistent with the foregoing.
图4是根据本申请实施例的一种可选的直播应用的配置方法的流程图,如图4所示,该方法可以包括以下步骤:FIG. 4 is a flowchart of a method for configuring an optional live application according to an embodiment of the present application. As shown in FIG. 4, the method may include the following steps:
步骤S402,从直播应用的客户端向直播应用的网络侧设备发送第一交换请求,其中,第一交换请求用于请求将直播应用中的预设道具配置给直播应用的第一帐号。Step S402: Send a first exchange request from the client of the live application to the network side device of the live application, where the first exchange request is used to request to configure the preset item in the live application to the first account of the live application.
步骤S404,在客户端没有接收到网络侧设备响应于交换请求发送的交换响应的情况下,从客户端向网络侧设备发送第二交换请求,其中,第二交换请求用于再次请求将预设道具配置给第一帐号,交换响应用于指示已成功将预设道具配置给第一帐号。Step S404, if the client does not receive the exchange response sent by the network side device in response to the exchange request, the second exchange request is sent from the client to the network side device, where the second exchange request is used to request the preset again. The item is configured to the first account, and the exchange response is used to indicate that the preset item has been successfully configured to the first account.
步骤S406,在网络侧设备已经响应于第一交换请求从第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,在客户端上获取响应于第二交换请求配置给第一帐号的预设道具。Step S406, in the case that the network side device has deducted the target virtual resource from the total virtual resource of the first account in response to the first exchange request, acquire, on the client, a pre-configured to the first account in response to the second exchange request. Set props.
通过上述步骤S402至步骤S406,通过直播应用的客户端向直播应用的网络侧设备发送第一交换请求,在客户端没有接收到网络侧设备响应于交换请求发送的交换响应的情况下,从客户端向网络侧设备发送第二交换请求,在网络侧设备已经响应于第一交换请求从第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,在客户端上获取响应于第二交换请求配置给第一帐号的预设道具,解决了在弱网络环境下直播应用的帐号在道具配置时经常出现超时需要多次操作导致的效率低的技术问题,进而达到减少了用户的手动操作次数,提高在弱网络环境下道具配置效率的技术效果。Through the above steps S402 to S406, the client of the live application sends a first exchange request to the network side device of the live application, and if the client does not receive the exchange response sent by the network device in response to the exchange request, the client receives the exchange response. Sending, by the network side device, a second exchange request, where the network side device has deducted the target virtual resource from the total virtual resource of the first account in response to the first exchange request, acquiring, on the client, the second exchange The configuration of the preset item to be configured for the first account solves the technical problem that the account of the live application in the weak network environment often has a low time and requires multiple operations when the item is configured, thereby reducing the number of manual operations of the user. Improve the technical effect of props allocation efficiency in a weak network environment.
在步骤S402提供的技术方案中,该可选的实施方式是从客户端一侧的直播应用的配置方法,从直播应用的客户端向直播应用的网络侧设备发送第一交换请求,可以是客户端根据用户的点击生成第一交换请求,然后将第一交换请求向直播应用的网络侧设备发送。第一交换请求与步骤S302 中的第一交换请求相同。In the technical solution provided in step S402, the optional implementation manner is a configuration method of a live application from the client side, and the first exchange request is sent from the client of the live application to the network side device of the live application, which may be a client. The terminal generates a first exchange request according to the user's click, and then sends the first exchange request to the network side device of the live application. The first exchange request is the same as the first exchange request in step S302.
在步骤S404提供的技术方案中,在网络侧设备已成功将预设道具配置给第一帐号之后,网络侧设备会向客户端发送交换响应,在客户端没有接收到交换响应的情况下,客户端会再次向网络侧设备发送交换请求,也即第二交换请求,请求将预设道具配置给第一帐号。In the technical solution provided in step S404, after the network side device has successfully configured the preset prop to the first account, the network side device sends an exchange response to the client, and if the client does not receive the exchange response, the client The terminal sends an exchange request to the network side device again, that is, the second exchange request, requesting to configure the preset item to the first account.
在步骤S406提供的技术方案中,如果第一交换请求没有收到交换响应,客户端发出第二交换请求,在网络侧设备基于第二交换请求从第一帐号的总虚拟资源中扣除了目标虚拟资源之后,网络侧设备会将预设道具配置给第一帐号的客户端,在客户端上获取响应于第二交换请求配置给第一帐号的预设道具。In the technical solution provided in step S406, if the first exchange request does not receive the exchange response, the client issues a second exchange request, and the network side device deducts the target virtuality from the total virtual resource of the first account based on the second exchange request. After the resource is configured, the network side device configures the preset prop to the client of the first account, and obtains, on the client, the preset prop that is configured to be sent to the first account in response to the second exchange request.
作为一种可选的实施例,从客户端向网络侧设备发送第二交换请求包括:客户端在第一预定时间段内未接收到交换响应的情况下,向网络侧设备发出第二交换请求。客户端发起重试请求是在判断出超时的情况下发出的,第一预定时间是预先设定的客户端发起重试的定时时间,在超过第一预定事件客户端还没有收到交换响应的情况下,可以判断出当前的交换请求超时,然后客户端发起重试,向网络测设备发起第二交换请求。可选地,并不是每次超时客户端都会无限发起重试,客户端只能够进行预设次数的重试,在客户端向网络侧设备发出第二交换请求之前,判断第二交换请求的发送次数是不是小于预设次数,在第二交换请求的发送次数小于预设次数的情况下才会向网络侧设备发出第二交换请求,如果客户端发起重试的次数已经到达预设次数,则客户端不会再次发起重试。As an optional embodiment, sending the second exchange request from the client to the network side device includes: when the client does not receive the exchange response within the first predetermined time period, sending the second exchange request to the network side device. . The client initiates the retry request by issuing a timeout. The first predetermined time is a preset time for the client to initiate a retry, and the client has not received the exchange response after exceeding the first predetermined event. In this case, it can be determined that the current exchange request times out, and then the client initiates a retry to initiate a second exchange request to the network measurement device. Optionally, the client does not perform the retry indefinitely every time the client is timed out, and the client can only perform the retry of the preset number of times, and determines the sending of the second exchange request before the client sends the second exchange request to the network side device. If the number of times the second exchange request is sent is less than the preset number of times, the second exchange request is sent to the network side device. If the number of times the client initiates the retry has reached the preset number of times, The client will not initiate a retry again.
作为一种可选的实施例,在客户端上获取响应于第二交换请求配置给第一帐号的预设道具之后,在客户端上显示第一信息,其中,第一信息用于指示已将预设道具从第一帐号转移给直播应用的第二帐号;或者在客户端上显示第二信息,其中,第二信息用于指示已将预设道具存储在第一帐号的道具库中,道具库中用于存储配置给第一帐号的道具。在第一帐号的客户端获取到预设道具之后,可以将预设道具转移给第二帐号,也可以将 预设道具存储到第一帐号的道具库中,用户可以在客户端上点击预设的赠送标识将道具赠送给主播,此时,预设道具转移给了第二帐号,在客户端上可以显示第一信息,第一信息可以提示第一帐号的用户预设道具已经成功赠送给主播;预设道具还可以存储在第一帐号的道具库中,在存储在第一帐号的道具库之后,在客户端上会显示第二信息,提示用户预设道具已经存储在道具库中。第一信息和第二信息可以是文字,也可以是符号或者动画等信息。通过在客户端上显示第一信息和第二信息,可以及时告知用户预设道具的去向,提高了用户体验。As an optional embodiment, after acquiring a preset item configured to the first account in response to the second exchange request on the client, the first information is displayed on the client, where the first information is used to indicate that the The preset item is transferred from the first account to the second account of the live application; or the second information is displayed on the client, wherein the second information is used to indicate that the preset item has been stored in the item library of the first account, the item The library is used to store the items configured for the first account. After the client of the first account obtains the preset item, the preset item can be transferred to the second account, or the preset item can be stored in the item library of the first account, and the user can click the preset on the client. The gift mark gives the item to the anchor. At this time, the preset item is transferred to the second account, and the first information can be displayed on the client. The first message can prompt the user of the first account to preset the item has been successfully presented to the anchor. The preset item can also be stored in the item library of the first account. After being stored in the item library of the first account, the second information is displayed on the client, prompting the user that the preset item has been stored in the item library. The first information and the second information may be text or information such as symbols or animations. By displaying the first information and the second information on the client, the user can be informed of the destination of the preset props in time, thereby improving the user experience.
本申请还提供了一种优选实施例,图5是根据本申请实施例的一种可选的直播应用的配置方法的流程图,如图5所示,该方法包括以下步骤:The present application further provides a preferred embodiment. FIG. 5 is a flowchart of a method for configuring an optional live application according to an embodiment of the present application. As shown in FIG. 5, the method includes the following steps:
步骤S501,客户端通过统一接入层向道具服务发送请求。In step S501, the client sends a request to the item service through the unified access layer.
客户端发出对于道具的使用或者购买请求,例如,通过app使用道具时,需要购买道具,触发购买和使用逻辑,通过app使用免费道具或库存时,需要使用道具,触发使用逻辑。统一接入层可以将客户端的请求发送到道具服务。请求可以是第一交换请求,也可以是第二交换请求。The client issues a use or purchase request for the item. For example, when using the item through the app, it is necessary to purchase the item, trigger the purchase and use logic, and when using the free item or inventory through the app, the item needs to be used to trigger the use logic. The unified access layer can send the client's request to the prop service. The request may be the first exchange request or the second exchange request.
步骤S502,道具服务接收到交换请求之后,向代币服务发送请求,请求代币服务对第一帐号的代币进行扣除。Step S502, after receiving the exchange request, the item service sends a request to the token service, requesting the token service to deduct the token of the first account.
道具服务是本申请相对于相关技术方案的新增部分,将原有的道具服务部分删除,将道具服务单独分离出来,形成一个统一的服务,道具服务的调用顺序放到代币服务之前。在代币服务扣除第一帐号的代币之后,将扣除信息发回到道具服务,道具服务接收到扣除信息之后,可以将道具配置给第一帐号。The item service is a new part of the application relative to the related technical solution, and the original item service part is deleted, and the item service is separately separated to form a unified service, and the order of calling the item service is placed before the token service. After the token service deducts the token of the first account, the deduction information is sent back to the item service, and after the item service receives the deduction information, the item can be configured to the first account.
步骤S503,代币服务接收道具服务的购买请求,对第一帐号的代币进行扣除。Step S503, the token service receives the purchase request of the item service, and deducts the token of the first account.
本申请的技术方案中对代币服务进行了修改,修改后的代币服务只进行相应的代币扣除操作,道具的价格查询以及发货逻辑全部由道具服务内 部实现,避免了道具服务和代币服务相互调用的过程,使得道具购买和使用整个调用链成为一条线。In the technical solution of the present application, the token service is modified, and the modified token service only performs the corresponding token deduction operation, the price query of the prop and the delivery logic are all implemented internally by the prop service, avoiding the prop service and generation. The process of coin service mutual calling makes the item purchase and use the entire call chain a line.
在代币服务扣除代币之后,将扣除成功的消息返回到道具服务,道具服务在接收到扣除成功的消息之后将预设道具配置给第一帐号。After the token service deducts the token, the successful deduction message is returned to the item service, and the item service configures the preset item to the first account after receiving the message of successful deduction.
步骤S504,代币服务通知计平服务。In step S504, the token service notification is calculated.
步骤S505,代币服务通知分成结算服务。In step S505, the token service notification is divided into a settlement service.
代币服务通知几瓶和分成计算服务的内容可以包括:1、代币送给哪位主播,2、送了价值多少代币的道具(可以用于后期给主播分成)。The token service notification of several bottles and the content divided into computing services may include: 1. Which anchor is sent to the token, and 2. How many tokens are sent (which can be used to divide the anchor into the post).
步骤S506,道具服务中转。In step S506, the item service transits.
道具服务可以将道具从第一帐号中转到第二帐号,例如,可以赠送给主播。The item service can transfer the item from the first account to the second account, for example, to the anchor.
步骤S507,道具评论服务。Step S507, an item comment service.
在道具转移之后,用户可以通过道具评论服务对道具发表评论。可以采用的代码为:gift_send_danmu。After the item is transferred, the user can comment on the item through the item review service. The code that can be used is: gift_send_danmu.
步骤S508,评论系统和弹幕系统。Step S508, commenting on the system and the barrage system.
该接口目前是可以调用评论系统的接口,再由评论系统调弹幕系统的接口,后期可进行优化,可以直接调用弹幕系统的接口。The interface is currently an interface that can call the commenting system, and then the interface of the commenting system to tune the curtain system, which can be optimized later, and can directly call the interface of the barrage system.
步骤S509,人气排行榜服务。Step S509, the popularity leaderboard service.
可以通过人气排行榜服务统计每个主播接收到的道具的量进行排行。The popularity of the items received by each anchor can be ranked by the popularity leaderboard service.
步骤S510,app可以拉取弹幕或者人气。In step S510, the app can pull the barrage or popularity.
app还可以拉取弹幕和人气,对道具或者排行榜进行查看。The app can also pull the barrage and popularity to view the props or leaderboards.
在对原有的技术方案进行梳理后,将道具服务单独分离出来,形成一个统一的服务,原有的代币服务只做相应的代币扣除操作,道具的价格查 询以及发货逻辑全部由道具服务内部实现,避免了道具服务和代币服务相互调用的过程,使得道具购买和使用整个调用链成为一条线。After sorting out the original technical scheme, the prop service is separated separately to form a unified service. The original token service only performs the corresponding token deduction operation, the price query of the props and the delivery logic are all props. The internal implementation of the service avoids the process of calling the prop service and the token service, making the purchase and use of the entire call chain a line.
在该实施例的技术方案中,还在前端加入了重试的逻辑,如果前端发生超时,则可以使用一个唯一标识的key,例如,唯一标识信息(userid_seq_productid_productnum)进行重试操作,后台的代币服务会以userid_seq_productid_productnum为key做是否已经完成扣款的存储,其中,userid即用户id,seq表示首次请求时的时间戳,重试时保持不变,productid表示直播道具id,productnum表示购买直播道具数量。假设在弱网络环境下,有以下几种情况:In the technical solution of this embodiment, the retry logic is also added to the front end. If the front end has a timeout, a uniquely identified key, for example, unique identification information (userid_seq_productid_productnum) may be used for the retry operation, and the background token is executed. The service will use userid_seq_productid_productnum as the key to check whether the debit has been stored. Userid is the user id, seq indicates the timestamp of the first request, and remains unchanged during retry. Productid indicates the live id, and productnum indicates the number of live apis purchased. . Assume that in a weak network environment, there are several situations:
1、app调用道具服务超时。2、道具服务调用代币服务超时。1. The app calls the item service timeout. 2. The item service calls the token service timeout.
针对于情况1,用户发起购买请求后,app请求道具服务超时,这个时候app前端不直接显示购买失败,而是使用userid_seq_productid_productnum发起重试请求,现在app可以支持3次重试,如果三次请求都失败,则认为该次请求超时,app显示购买失败。针对于情况2,代币服务会对用户的扣款信息进行保存,当道具服务发起第二次请求后,代币服务会先检查该次请求是否已经扣除过代币,如果扣除过代币,则直接返回成功,如果没有扣除过代币,则进行扣除操作,然后返回给道具服务。这种处理模式可以提高道具购买和使用的成功率,减少仅扣款不配置道具的概率,极大的减少用户因为购买道具而产生的投诉。For case 1, after the user initiates the purchase request, the app requests the item service to time out. At this time, the app front end does not directly display the purchase failure, but uses the userid_seq_productid_productnum to initiate the retry request. Now the app can support 3 retry attempts, if the three requests fail. , that the request times out, the app shows that the purchase failed. For case 2, the token service will save the user's debit information. When the prop service initiates the second request, the token service will first check whether the request has been deducted from the token, and if the token is deducted, Then directly return to success, if the token has not been deducted, the deduction operation is performed, and then returned to the prop service. This processing mode can improve the success rate of props purchase and use, reduce the probability that only deductions do not configure props, and greatly reduce the complaints generated by users when purchasing props.
图6是根据本申请实施例的直播应用页面的道具购买列表的示意图,如图6所示,用户通过直播app进入某一场直播后,可以点击右下角送礼按钮对主播进行送礼,点击送礼按钮后会出现道具列表以及每个道具的单价,每个道具上都有标价和可以为主播增加的人气值,礼物可以有免费礼物。页面左下方还可以显示当前用户所具有的代币的总额,可供用户参考。用户可以选择某个道具进行购买操作,对应app侧发起道具购买请求,该请求处理完成后,app侧会显示购买道具对应的特效,图7是根据本申请实施例的道具购买成功特效的示意图,如图7所示,在用户购买糖葫芦道 具并赠送给主播之后,可以在当前用户的客户端上显示道具特效,并且可以显示提示信息“我送了一串糖葫芦”,在道具赠送成功之后,主播的人气值由1005增加到1006。FIG. 6 is a schematic diagram of a prop purchase list of a live application page according to an embodiment of the present application. As shown in FIG. 6 , after a user enters a live broadcast through a live broadcast app, the user can click the gift button in the lower right corner to give a gift to the anchor, and click the gift button. After that, there will be a list of items and the unit price of each item. Each item has a price tag and a popularity value that can be added to the main game. The gift can have a free gift. The total amount of tokens currently owned by the current user can also be displayed at the bottom left of the page for the user's reference. The user can select a certain item to perform a purchase operation, and the corresponding app side initiates a prop purchase request. After the request processing is completed, the app side displays the special effect corresponding to the purchase item, and FIG. 7 is a schematic diagram of the item purchase success special effect according to the embodiment of the present application. As shown in FIG. 7 , after the user purchases the candied fruit props and presents them to the anchor, the item effects can be displayed on the current user's client, and the prompt message “I sent a bunch of candied haws” can be displayed. After the item is successfully presented, the anchor is displayed. The popularity value increased from 1005 to 1006.
本实施例的客户端可以是视频客户端,也可以是直播客户端。The client in this embodiment may be a video client or a live client.
图8是根据本申请实施例的一种道具服务执行步骤的流程图,如图8所示,前端(可以是客户端)的请求分为三类,仅购买道具、使用免费道具或库存道具和即买即送,本实施例的方案主要用于处理即买即送的道具购买逻辑。包括以下步骤:FIG. 8 is a flowchart of a step of executing an item service according to an embodiment of the present application. As shown in FIG. 8 , the request of the front end (which may be a client) is divided into three categories, only purchasing items, using free items or inventory items, and That is, buy and send, the solution of this embodiment is mainly used to process the purchase logic of the item that is bought and sent. Includes the following steps:
步骤S801,判断当前请求属于购买或者使用。In step S801, it is determined that the current request belongs to purchase or use.
前端发起一个道具购买请求后,道具服务会向代币服务发起一个请求,请求中携带有通过前端透传的唯一标识信息(userid_seq_productid_productnum)。After the front end initiates a prop purchase request, the prop service will initiate a request to the token service, and the request carries the unique identification information (userid_seq_productid_productnum) transparently transmitted through the front end.
步骤S802,判断道具是否已购买。如果道具已购买,则流程结束,如果道具不是已购买,则执行步骤S803。可以通过标识信息(userid+seq+道具id+数量查询是否已购买成功)。In step S802, it is determined whether the item has been purchased. If the item has been purchased, the process ends, and if the item is not already purchased, step S803 is performed. You can use the identification information (userid+seq+props id+quantity to check if the purchase has been successful).
步骤S803,如果判断出没有购买成功,则查询价格并购买道具,查询价格由道具服务自身完成,道具服务将价格发送到代币服务,请求代币服务扣除相应的代币。In step S803, if it is determined that the purchase is not successful, the price is inquired and the item is purchased, and the inquiry price is completed by the item service itself, and the item service sends the price to the token service, requesting the token service to deduct the corresponding token.
步骤S804,判断是否购买成功。In step S804, it is determined whether the purchase is successful.
在请求代币购买失败时可以进行重试,重试预设的次数,例如预设次数可以是3次,预设次数可以根据需要进行配置,如果重试3次之后还是购买不成功则向前端返回购买失败信息,如果购买成功,则执行步骤S805。When the request for token purchase fails, you can retry and retry the preset number of times. For example, the preset number can be 3 times. The preset number can be configured as needed. If the retry is 3 times or the purchase is unsuccessful, the front end is sent to the front end. The purchase failure information is returned, and if the purchase is successful, step S805 is performed.
步骤S805,判断是否即买即送。In step S805, it is judged whether or not to buy or send.
如果购买成功,则道具服务将道具配置给当前用户帐号,此时需要判断当前用户是要即买即送还是仅购买,在判断时,可以根据客户端最初发 出的第一交换请求进行判断。If the purchase is successful, the item service configures the item to the current user account. At this time, it is necessary to determine whether the current user wants to buy or pay only, and in the judgment, the first exchange request originally issued by the client can be judged.
步骤S806,用户道具库存redis。Step S806, the user item inventory redis.
如果用户仅购买道具,则将道具配置给用户的库存中,并向前端返回购买成功信息。If the user only purchases the item, the item is configured into the user's inventory, and the purchase success information is returned to the front end.
步骤S807,使用道具。In step S807, the props are used.
如果判断出是即买即送请求,或者仅使用道具,则可以立即使用道具。If you decide that you want to buy or send a request, or just use an item, you can use the item immediately.
步骤S808,判断是否使用成功。In step S808, it is determined whether the use is successful.
可以使用道具命名查询库存中的道具,对于即买即送命令可以直接返回前端购买成功,如果使用成功,则执行步骤S810,如果使用失败执行步骤S809。The item in the inventory can be queried by using the item naming. For the buy-and-send command, the front-end purchase can be directly returned. If the use is successful, step S810 is performed, and if the use fails, step S809 is performed.
步骤S809,如果使用失败,则可以将失败的信息上报至boss,写入CDB,以作为日志记录备后期查询使用。In step S809, if the usage fails, the failed information can be reported to the boss and written to the CDB for use as a log record for later query.
步骤S810,如果道具使用成功,则发中转、上报boss,写CDB,然后返回前端使用成功。In step S810, if the item is successfully used, the transfer is forwarded, the boss is reported, the CDB is written, and then the front end is successfully used.
该实施例在前端发起一个道具购买请求后,道具服务会向代币服务发起一个请求,通过前端透传的唯一标识userid_seq_productid_productnum,通过该key来查询当前的请求是否已经扣除过代币,如果已经扣除过代币,则代币服务直接向道具服务返回购买成功,否则进行扣除代币操作,具体的扣除金额由道具服务传给代币服务,然后再返回扣除代币的结果。道具服务会操作用户道具库存,返回前端相应的数据。In this embodiment, after the front end initiates a prop purchase request, the prop service will initiate a request to the token service, and through the front end transparently transmitted unique identifier userid_seq_productid_productnum, the key is used to query whether the current request has been deducted from the token, if it has been deducted After the token, the token service directly returns to the item service and the purchase is successful. Otherwise, the token deduction operation is performed. The specific deduction amount is transferred from the item service to the token service, and then the result of deducting the token is returned. The prop service will operate the user's item inventory and return the corresponding data to the front end.
图9是根据本申请实施例的一种可选的直播应用的配置方法的流程图,如图9所示,将整个框架划分为三个部分,app,道具服务,代币服务。在app发起购买道具请求调用道具服务的时候,道具服务直接调用代币服务来查询用户账户余额以及历史未付款账单,如果用户余额足够支付该次消费,那么道具服务可以直接发货,返回给app购买成功,代币服务的扣 款逻辑可以延迟执行,先进行缓存到cache即可,这样可以让轻逻辑服务立即调用,而重的逻辑服务即扣除代币(调用计平)以及写代币消费流水等延迟执行。FIG. 9 is a flowchart of a method for configuring an optional live application according to an embodiment of the present application. As shown in FIG. 9, the entire framework is divided into three parts, an app, an item service, and a token service. When the app initiates a purchase item request to invoke the item service, the item service directly calls the token service to query the user account balance and the historical unpaid bill. If the user balance is sufficient to pay the purchase, the item service can be directly shipped and returned to the app. If the purchase is successful, the debit logic of the token service can be delayed, and the cache can be cached first, so that the light logic service can be called immediately, and the heavy logical service is deducted from the token (calling the balance) and writing the token consumption. Running water, etc. are delayed.
本申请实施例的技术方案对直播道具后台逻辑进行了重新梳理,对直播道具购买和发货流程进行了调整,同时让前端在购买请求时,增加首次请求时的时间戳(seq)和重试标记,如果因网络超时导致失败时发起重试逻辑。对于有重试标记的请求,优先查询存储,后台根据userid_seq_productid_productnum(userid即用户id,seq表示当前请求时间戳,重试时保持不变,productid表示直播道具id,productnum表示购买直播道具数量)的方式记录当前购买是否成功,如果成功则直接回包给前端,如果没有则发起购买请求。The technical solution of the embodiment of the present application reorganizes the background logic of the live props, adjusts the purchase and delivery process of the live props, and allows the front end to increase the timestamp (seq) and retry of the first request when purchasing the request. Marks the retry logic if a failure occurs due to a network timeout. For requests with retry flags, the query is stored first. The background is based on userid_seq_productid_productnum (userid is the user id, seq is the current request timestamp, and remains unchanged when retrying, productid indicates the live id, productnum indicates the number of live props purchased) Record whether the current purchase is successful. If successful, return the package directly to the front end. If not, initiate a purchase request.
本申请实施例的技术方案在测试中反馈良好,上述可选的实施方式具有以下优点,1、对于用户而言,在直播中购买付费道具的时候,由于网络问题产生的道具购买失败的情况大幅度减少,减少了相关的投诉,提高用户观看直播送礼的体验,也使得产品得到好评。2、对于开发者而言,框架进行改动之后,整个道具购买流程更加清晰,定位和处理问题可以更加准确和快速,并且后续的功能的扩展也更加便利。The technical solution of the embodiment of the present application has good feedback in the test, and the foregoing optional implementation has the following advantages: 1. For the user, when purchasing the paid item in the live broadcast, the purchase of the item due to the network problem fails. The reduction in the number of complaints has reduced the related complaints and improved the experience of users watching live gifts, and the products have been well received. 2. For the developer, after the framework is changed, the whole item purchase process is clearer, the positioning and processing problems can be more accurate and fast, and the subsequent functions are more convenient to expand.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should understand that the present application is not limited by the described action sequence. Because certain steps may be performed in other sequences or concurrently in accordance with the present application. In the following, those skilled in the art should also understand 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.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如 ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation. Based on such understanding, the technical solution of the present application, which is essential or contributes to the related art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, CD-ROM). The instructions include a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present application.
根据本申请实施例,还提供了一种用于实施上述直播应用的配置方法的直播应用的配置装置。图10是根据本申请实施例的一种可选的直播应用的配置装置的示意图,如图10所示,该装置可以包括一个或多个处理器,以及一个或多个存储程序单元的存储器,其中,程序单元由处理器执行,程序单元包括:According to an embodiment of the present application, a configuration apparatus for a live application for implementing the configuration method of the live application described above is further provided. 10 is a schematic diagram of an apparatus for configuring an optional live application according to an embodiment of the present application. As shown in FIG. 10, the apparatus may include one or more processors, and one or more memories of the stored program units. Wherein, the program unit is executed by a processor, and the program unit comprises:
接收单元10,被设置为接收直播应用的客户端向直播应用的网络侧设备发送的第一交换请求,其中,第一交换请求用于请求将直播应用中的预设道具配置给直播应用的第一帐号;The receiving unit 10 is configured to receive a first exchange request sent by the client of the live application to the network side device of the live application, where the first exchange request is used to request to configure the preset item in the live application to the live application. An account number;
第一获取单元20,被设置为在网络侧设备未成功将预设道具配置给第一帐号的情况下,获取第二交换请求,其中,第二交换请求用于再次请求将预设道具配置给第一帐号;The first obtaining unit 20 is configured to acquire a second exchange request if the network side device fails to configure the preset prop to the first account, where the second exchange request is used to request the preset prop to be configured again. First account number;
第一配置单元30,被设置为在判断出已经响应于第一交换请求从第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,响应于第二交换请求将预设道具配置给第一帐号,并从网络侧设备向客户端发送交换响应,其中,交换响应用于指示已成功将预设道具配置给第一帐号。The first configuration unit 30 is configured to, when it is determined that the target virtual resource has been deducted from the total virtual resource of the first account in response to the first exchange request, configure the preset item to the first in response to the second exchange request An account, and sending an exchange response from the network side device to the client, wherein the exchange response is used to indicate that the preset item has been successfully configured to the first account.
需要说明的是,该实施例中的接收单元10可以被设置为执行本申请上述实施例中的步骤S302,该实施例中的第一获取单元20可以被设置为执行本申请上述实施例中的步骤S304,该实施例中的第一配置单元30可以被设置为执行本申请上述实施例中的步骤S306。It should be noted that the receiving unit 10 in this embodiment may be configured to perform step S302 in the foregoing embodiment of the present application. The first obtaining unit 20 in this embodiment may be configured to perform the foregoing embodiment in the present application. In step S304, the first configuration unit 30 in this embodiment may be configured to perform step S306 in the above embodiment of the present application.
此处需要说明的是,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例所公开的内容。需要说明的是,上述模块作为装置的一部分可以运行在如图2所示的硬件环境中,可以通过软件实现,也可以通过硬件实现。It should be noted that the foregoing modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the foregoing embodiments. It should be noted that the foregoing module may be implemented in a hardware environment as shown in FIG. 2 as part of the device, and may be implemented by software or by hardware.
通过上述模块,可以解决了在弱网络环境下直播应用的帐号在道具配置时经常出现超时需要多次操作导致的效率低的技术问题,进而达到在弱网络环境下提高道具配置效率的技术效果。Through the above modules, it is possible to solve the technical problem that the account of the live application in the weak network environment often has a low time-out requiring multiple operations when the item is configured, thereby achieving the technical effect of improving the efficiency of item configuration in a weak network environment.
作为一种可选的实施例,该装置还包括:第二获取单元,被设置为在接收直播应用的客户端向直播应用的网络侧设备发送的第一交换请求之后、且在获取第二交换请求之前,通过直播应用的第一服务获取预设道具所对应的目标虚拟资源,其中,第一服务用于配置预设道具;第一扣除单元,被设置为通过第一服务向第二服务请求从第一帐号的总虚拟资源中扣除目标虚拟资源,其中,第二服务用于扣除目标虚拟资源;第二配置单元,被设置为在第二服务返回扣除成功信息的情况下,通过第一服务执行配置操作,其中,配置操作用于将预设道具配置给第一帐号,扣除成功信息用于指示已成功从总虚拟资源中扣除目标虚拟资源;第一确定单元,被设置为在第二服务未返回扣除成功信息的情况下、或者、在执行配置操作未成功的情况下,确定出网络侧设备未成功将预设道具配置给第一帐号。As an optional embodiment, the apparatus further includes: a second obtaining unit, configured to: after receiving the first exchange request sent by the client of the live application to the network side device of the live application, and acquiring the second exchange Before the request, the first virtual service is used to obtain the target virtual resource corresponding to the preset prop, wherein the first service is used to configure the preset prop; the first deducting unit is configured to request the second service through the first service. And deducting the target virtual resource from the total virtual resource of the first account, where the second service is used to deduct the target virtual resource; and the second configuration unit is configured to pass the first service if the second service returns the deduction success information. Performing a configuration operation, where the configuration operation is used to configure the preset item to the first account, and the deduction success information is used to indicate that the target virtual resource has been successfully deducted from the total virtual resource; the first determining unit is set to be in the second service. If the deduction of the success information is not returned, or if the configuration operation is not successful, it is determined that the network side device is not The work items assigned to the first predetermined account.
作为一种可选的实施例,第一获取单元20被设置为:接收客户端向网络侧设备发送的第二交换请求,其中,客户端在第一预定时间段内未接收到交换响应的情况下,向网络侧设备发出第二交换请求。As an optional embodiment, the first obtaining unit 20 is configured to: receive a second exchange request sent by the client to the network side device, where the client does not receive the exchange response within the first predetermined time period Next, a second exchange request is sent to the network side device.
作为一种可选的实施例,第一获取单元20还被设置为:在第二服务在第二预定时间段内未返回扣除成功信息的情况下,通过第一服务获取第二交换请求,并通过第一服务向第二服务请求从总虚拟资源中扣除目标虚拟资源。As an optional embodiment, the first obtaining unit 20 is further configured to: acquire, by the first service, the second exchange request, if the second service does not return the deduction success information within the second predetermined time period, and The target virtual resource is deducted from the total virtual resource by the first service to the second service request.
作为一种可选的实施例,该装置还包括:第三获取单元,被设置为在接收直播应用的客户端向直播应用的网络侧设备发送的第一交换请求之后、且在获取第二交换请求之前,通过直播应用的第一服务向直播应用的第二服务获取预设道具所对应的目标虚拟资源,其中,第一服务用于配置预设道具;第三配置单元,被设置为在第一帐号的总虚拟资源大于等于目标虚拟资源与第一帐号的尚未扣除的虚拟资源之和情况下,通过第一服务 执行配置操作,其中,配置操作用于将预设道具配置给第一帐号;第二扣除单元,被设置为通过第一服务向第二服务请求从总虚拟资源中扣除目标虚拟资源,其中,第二服务用于扣除目标虚拟资源;第二确定单元,被设置为在执行配置操作未成功的情况下,确定出网络侧设备未成功将预设道具配置给第一帐号。As an optional embodiment, the apparatus further includes: a third obtaining unit, configured to: after receiving the first exchange request sent by the client of the live application to the network side device of the live application, and acquiring the second exchange Before the request, the first service of the live application is used to obtain the target virtual resource corresponding to the preset item, where the first service is used to configure the preset item, and the third configuration unit is set to be in the first If the total virtual resource of the account is greater than or equal to the sum of the target virtual resource and the undepleted virtual resource of the first account, the configuration operation is performed by the first service, where the configuration operation is used to configure the preset item to the first account; a second deduction unit, configured to deduct a target virtual resource from the total virtual resource by using the first service to the second service, wherein the second service is used to deduct the target virtual resource; and the second determining unit is configured to perform the configuration If the operation is unsuccessful, it is determined that the network side device has not successfully configured the preset prop to the first account.
作为一种可选的实施例,该装置还包括:转移单元,被设置为在响应于第二交换请求将预设道具配置给第一帐号之后,将预设道具从第一帐号转移给直播应用的第二帐号;或者存储单元,被设置为将预设道具存储在第一帐号的道具库中,其中,道具库中用于存储配置给第一帐号的道具。In an optional embodiment, the apparatus further includes: a transfer unit configured to transfer the preset item from the first account to the live application after configuring the preset item to the first account in response to the second exchange request The second account; or the storage unit is configured to store the preset item in the item library of the first account, wherein the item library is used to store the item configured for the first account.
作为一种可选的实施例,第一获取单元20被设置为:在网络侧设备未成功将预设道具配置给第一帐号且未成功的次数小于预设次数的情况下,获取第二交换请求。As an optional embodiment, the first obtaining unit 20 is configured to: acquire the second exchange if the network side device fails to configure the preset prop to the first account and the number of unsuccessful times is less than the preset number of times request.
根据本申请实施例,还提供了一种用于实施上述直播应用的配置方法的直播应用的配置装置。图11是根据本申请实施例的一种可选的直播应用的配置装置的示意图,如图11所示,该装置可以包括一个或多个处理器,以及一个或多个存储程序单元的存储器,其中,程序单元由处理器执行,程序单元包括:According to an embodiment of the present application, a configuration apparatus for a live application for implementing the configuration method of the live application described above is further provided. 11 is a schematic diagram of an apparatus for configuring an optional live application according to an embodiment of the present application. As shown in FIG. 11, the apparatus may include one or more processors, and one or more memories of the stored program units. Wherein, the program unit is executed by a processor, and the program unit comprises:
第一发送单元40,被设置为从直播应用的客户端向直播应用的网络侧设备发送第一交换请求,其中,第一交换请求用于请求将直播应用中的预设道具配置给直播应用的第一帐号;The first sending unit 40 is configured to send a first exchange request from the client of the live application to the network side device of the live application, where the first exchange request is used to request to configure the preset item in the live application to the live application. First account number;
第二发送单元50,被设置为在客户端没有接收到网络侧设备响应于交换请求发送的交换响应的情况下,从客户端向网络侧设备发送第二交换请求,其中,第二交换请求用于再次请求将预设道具配置给第一帐号,交换响应用于指示已成功将预设道具配置给第一帐号;The second sending unit 50 is configured to send a second exchange request from the client to the network side device, when the client does not receive the exchange response sent by the network side device in response to the exchange request, where the second exchange request is used by the second exchange request Re-requesting to configure the preset prop to the first account, and the exchange response is used to indicate that the preset prop has been successfully configured to the first account;
获取单元60,被设置为在网络侧设备已经响应于第一交换请求从第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,在客户端上获取响应 于第二交换请求配置给第一帐号的预设道具。The obtaining unit 60 is configured to: when the network side device has deducted the target virtual resource from the total virtual resource of the first account in response to the first exchange request, acquire the configuration on the client in response to the second exchange request A preset item for an account.
需要说明的是,该实施例中的第一发送单元40可以被设置为执行本申请上述实施例中的步骤S402,该实施例中的第二发送单元50可以被设置为执行本申请上述实施例中的步骤S404,该实施例中的获取单元60可以被设置为执行本申请上述实施例中的步骤S406。It should be noted that the first sending unit 40 in this embodiment may be configured to perform step S402 in the foregoing embodiment of the present application, and the second sending unit 50 in this embodiment may be configured to perform the foregoing embodiment of the present application. In step S404, the obtaining unit 60 in this embodiment may be configured to perform step S406 in the above embodiment of the present application.
此处需要说明的是,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例所公开的内容。需要说明的是,上述模块作为装置的一部分可以运行在如图2所示的硬件环境中,可以通过软件实现,也可以通过硬件实现。It should be noted that the foregoing modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the foregoing embodiments. It should be noted that the foregoing module may be implemented in a hardware environment as shown in FIG. 2 as part of the device, and may be implemented by software or by hardware.
通过上述模块,可以解决了在弱网络环境下直播应用的帐号在道具配置时经常出现超时需要多次操作导致的效率低的技术问题,进而达到在弱网络环境下提高道具配置效率的技术效果。Through the above modules, it is possible to solve the technical problem that the account of the live application in the weak network environment often has a low time-out requiring multiple operations when the item is configured, thereby achieving the technical effect of improving the efficiency of item configuration in a weak network environment.
作为一种可选的实施例,第二发送单元50被设置为:客户端在第一预定时间段内未接收到交换响应的情况下,向网络侧设备发出第二交换请求。As an optional embodiment, the second sending unit 50 is configured to: when the client does not receive the exchange response within the first predetermined time period, issue a second exchange request to the network side device.
作为一种可选的实施例,第二发送单元50还被设置为:在第二交换请求的发送次数小于预设次数的情况下,向网络侧设备发出第二交换请求。As an optional embodiment, the second sending unit 50 is further configured to: send a second exchange request to the network side device if the number of times of sending the second exchange request is less than the preset number of times.
作为一种可选的实施例,该装置还包括:第一显示单元,被设置为在客户端上获取响应于第二交换请求配置给第一帐号的预设道具之后,在客户端上显示第一信息,其中,第一信息用于指示已将预设道具从第一帐号转移给直播应用的第二帐号;或者第二显示单元,被设置为在客户端上显示第二信息,其中,第二信息用于指示已将预设道具存储在第一帐号的道具库中,道具库中用于存储配置给第一帐号的道具。As an optional embodiment, the device further includes: a first display unit configured to: after acquiring, on the client, the preset item configured to the first account in response to the second exchange request, displaying the first on the client a message, wherein the first information is used to indicate that the preset item has been transferred from the first account to the second account of the live application; or the second display unit is configured to display the second information on the client, wherein, The second information is used to indicate that the preset item has been stored in the item library of the first account, and the item library is used to store the item configured for the first account.
此处需要说明的是,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例所公开的内容。需要说明的是,上述模块作为装置的一部分可以运行在如图2所示的硬件环境中,可以通过软件实现, 也可以通过硬件实现,其中,硬件环境包括网络环境。It should be noted that the foregoing modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the foregoing embodiments. It should be noted that the foregoing module may be implemented in a hardware environment as shown in FIG. 2 as part of the device, and may be implemented by software or by hardware, where the hardware environment includes a network environment.
根据本申请实施例,还提供了一种用于实施上述直播应用的配置方法的服务器或终端。According to an embodiment of the present application, a server or a terminal for implementing the configuration method of the live broadcast application described above is further provided.
图12是根据本申请实施例的一种电子装置的结构框图,如图12所示,该电子装置可以包括:一个或多个(图中仅示出一个)处理器201、存储器203、以及传输装置205,如图12所示,该电子装置还可以包括输入输出设备207。FIG. 12 is a structural block diagram of an electronic device according to an embodiment of the present application. As shown in FIG. 12, the electronic device may include: one or more (only one shown) processor 201, memory 203, and transmission The device 205, as shown in FIG. 12, may further include an input and output device 207.
其中,存储器203可被设置为存储计算机程序以及模块,如本申请实施例中的直播应用的配置方法和装置对应的程序指令/模块,处理器201被设置为通过运行存储在存储器203内的计算机程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的直播应用的配置方法。存储器203可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器203可进一步包括相对于处理器201远程设置的存储器,这些远程存储器可以通过网络连接至终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 203 can be configured to store a computer program and a module, such as a configuration method of the live application in the embodiment of the present application and a program instruction/module corresponding to the device, and the processor 201 is configured to run the computer stored in the memory 203. Programs and modules to perform various functional applications and data processing, that is, to implement the above-described configuration method of the live application. Memory 203 can include high speed random access memory, and can also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, memory 203 can further include memory remotely located relative to processor 201, which can be connected to the terminal over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
上述的传输装置205被设置为经由一个网络接收或者发送数据,还可以用于处理器与存储器之间的数据传输。上述的网络具体实例可包括有线网络及无线网络。在一个实例中,传输装置205包括一个网络适配器(Network Interface Controller,NIC),其可通过网线与其他网络设备与路由器相连从而可与互联网或局域网进行通讯。在一个实例中,传输装置205为射频(Radio Frequency,RF)模块,其被设置为通过无线方式与互联网进行通讯。The transmission device 205 described above is arranged to receive or transmit data via a network, and can also be used for data transmission between the processor and the memory. Specific examples of the above network may include a wired network and a wireless network. In one example, the transmission device 205 includes a Network Interface Controller (NIC) that can be connected to other network devices and routers via a network cable to communicate with the Internet or a local area network. In one example, the transmission device 205 is a Radio Frequency (RF) module that is configured to communicate with the Internet wirelessly.
其中,可选地,存储器203被设置为存储应用程序。Optionally, the memory 203 is configured to store an application.
处理器201可以通过传输装置205调用存储器203存储的应用程序,以执行下述步骤:接收直播应用的客户端向直播应用的网络侧设备发送的 第一交换请求,其中,第一交换请求用于请求将直播应用中的预设道具配置给直播应用的第一帐号;在网络侧设备未成功将预设道具配置给第一帐号的情况下,获取第二交换请求,其中,第二交换请求用于再次请求将预设道具配置给第一帐号;在判断出已经响应于第一交换请求从第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,响应于第二交换请求将预设道具配置给第一帐号,并从网络侧设备向客户端发送交换响应,其中,交换响应用于指示已成功将预设道具配置给第一帐号。The processor 201 may invoke the application stored in the memory 203 through the transmission device 205 to perform the following steps: receiving a first exchange request sent by the client of the live application to the network side device of the live application, where the first exchange request is used for Requesting to configure the preset item in the live application to the first account of the live application; and if the network side device fails to configure the preset item to the first account, obtaining a second exchange request, where the second exchange request is used Re-requesting to allocate the preset prop to the first account; and determining that the target virtual resource has been deducted from the total virtual resource of the first account in response to the first exchange request, the preset is requested in response to the second exchange request The item is configured to be sent to the first account, and the exchange response is sent from the network side device to the client, where the exchange response is used to indicate that the preset item has been successfully configured to the first account.
处理器201还被设置为执行下述步骤:通过直播应用的第一服务获取预设道具所对应的目标虚拟资源,其中,第一服务用于配置预设道具;通过第一服务向第二服务请求从第一帐号的总虚拟资源中扣除目标虚拟资源,其中,第二服务用于扣除目标虚拟资源;在第二服务返回扣除成功信息的情况下,通过第一服务执行配置操作,其中,配置操作用于将预设道具配置给第一帐号,扣除成功信息用于指示已成功从总虚拟资源中扣除目标虚拟资源;在第二服务未返回扣除成功信息的情况下、或者、在执行配置操作未成功的情况下,确定出网络侧设备未成功将预设道具配置给第一帐号。The processor 201 is further configured to: obtain the target virtual resource corresponding to the preset item by using the first service of the live application, where the first service is used to configure the preset item; and the first service is used to serve the second service. Requesting to deduct the target virtual resource from the total virtual resource of the first account, where the second service is used to deduct the target virtual resource; and in the case that the second service returns the deduction success information, the configuration operation is performed by the first service, where the configuration is performed. The operation is used to configure the preset item to the first account, and the deduction success information is used to indicate that the target virtual resource has been successfully deducted from the total virtual resource; in the case that the second service does not return the deduction success information, or the configuration operation is performed If the device is unsuccessful, it is determined that the network device does not successfully configure the preset item to the first account.
处理器201还被设置为执行下述步骤:接收客户端向网络侧设备发送的第二交换请求,其中,客户端在第一预定时间段内未接收到交换响应的情况下,向网络侧设备发出第二交换请求。The processor 201 is further configured to perform the step of: receiving a second exchange request sent by the client to the network side device, wherein the client does not receive the exchange response within the first predetermined time period, and the network side device Issue a second exchange request.
处理器201还被设置为执行下述步骤:在第二服务在第二预定时间段内未返回扣除成功信息的情况下,通过第一服务获取第二交换请求,并通过第一服务向第二服务请求从总虚拟资源中扣除目标虚拟资源。The processor 201 is further configured to perform the steps of: acquiring the second exchange request by the first service and the second service by the first service if the second service does not return the deduction success information within the second predetermined time period The service request deducts the target virtual resource from the total virtual resource.
处理器201还被设置为执行下述步骤:在接收直播应用的客户端向直播应用的网络侧设备发送的第一交换请求之后、且在获取第二交换请求之前,通过直播应用的第一服务获取预设道具所对应的目标虚拟资源,其中,第一服务用于配置预设道具;在第一帐号的总虚拟资源大于等于目标虚拟资源与第一帐号的尚未扣除的虚拟资源之和情况下,通过第一服务执行配 置操作,其中,配置操作用于将预设道具配置给第一帐号;通过第一服务向第二服务请求从总虚拟资源中扣除目标虚拟资源,其中,第二服务用于扣除目标虚拟资源;在执行配置操作未成功的情况下,确定出网络侧设备未成功将预设道具配置给第一帐号。The processor 201 is further configured to perform the following steps: after receiving the first exchange request sent by the client of the live application to the network side device of the live application, and before acquiring the second exchange request, passing the first service of the live application Obtaining a target virtual resource corresponding to the preset item, where the first service is used to configure the preset item; and the total virtual resource of the first account is greater than or equal to the sum of the target virtual resource and the undepleted virtual resource of the first account. Performing a configuration operation by using the first service, where the configuration operation is configured to configure the preset prop to the first account; and the second service requests the second virtual service to deduct the target virtual resource from the total virtual resource, where the second service is used After the target virtual resource is deducted, if the configuration operation is unsuccessful, it is determined that the network side device fails to configure the preset prop to the first account.
处理器201还被设置为执行下述步骤:在响应于第二交换请求将预设道具配置给第一帐号之后,将预设道具从第一帐号转移给直播应用的第二帐号;或者将预设道具存储在第一帐号的道具库中,其中,道具库中用于存储配置给第一帐号的道具。The processor 201 is further configured to perform the following steps: after configuring the preset item to the first account in response to the second exchange request, transferring the preset item from the first account to the second account of the live application; or The props are stored in the item library of the first account, wherein the item library is used to store the items allocated to the first account.
处理器201还被设置为执行下述步骤:在网络侧设备未成功将预设道具配置给第一帐号且未成功的次数小于预设次数的情况下,获取第二交换请求。The processor 201 is further configured to perform the step of acquiring a second exchange request if the network side device fails to configure the preset item to the first account and the number of unsuccessful times is less than the preset number of times.
采用本申请实施例,通过接收直播应用的客户端向直播应用的网络侧设备发送的第一交换请求;在网络侧设备未成功将预设道具配置给第一帐号的情况下,获取第二交换请求;在判断出已经响应于第一交换请求从第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,响应于第二交换请求将预设道具配置给第一帐号,并从网络侧设备向客户端发送交换响应,达到了减少了用户的手动操作次数的目的,从而实现了在弱网络环境下提高道具配置效率的技术效果,进而解决了在弱网络环境下直播应用的帐号在道具配置时经常出现超时需要多次操作导致的效率低的技术问题。In the embodiment of the present application, the first exchange request sent by the client of the live application to the network side device of the live application is received; and when the network device fails to configure the preset item to the first account, the second exchange is obtained. Requesting; in the case that it is determined that the target virtual resource has been deducted from the total virtual resource of the first account in response to the first exchange request, configuring the preset item to the first account in response to the second exchange request, and from the network side The device sends an exchange response to the client, which reduces the number of manual operations of the user, thereby achieving the technical effect of improving the efficiency of the item configuration in a weak network environment, thereby solving the problem of the live application of the account in the weak network environment. When configuring, there are often technical problems that cause inefficiencies caused by multiple operations.
处理器201可以通过传输装置205调用存储器203存储的应用程序,以执行下述步骤:从直播应用的客户端向直播应用的网络侧设备发送第一交换请求,其中,第一交换请求用于请求将直播应用中的预设道具配置给直播应用的第一帐号;在客户端没有接收到网络侧设备响应于交换请求发送的交换响应的情况下,从客户端向网络侧设备发送第二交换请求,其中,第二交换请求用于再次请求将预设道具配置给第一帐号,交换响应用于指示已成功将预设道具配置给第一帐号;在网络侧设备已经响应于第一交换请求从第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,在客户端 上获取响应于第二交换请求配置给第一帐号的预设道具。The processor 201 may invoke the application stored in the memory 203 through the transmission device 205 to perform the steps of: transmitting a first exchange request from the client of the live application to the network side device of the live application, wherein the first exchange request is for the request The preset item in the live application is configured to the first account of the live application; if the client does not receive the exchange response sent by the network device in response to the exchange request, the second exchange request is sent from the client to the network side device. The second exchange request is for requesting to configure the preset item to the first account again, and the exchange response is used to indicate that the preset item has been successfully configured to the first account; the network side device has responded to the first exchange request In the case that the target virtual resource is deducted from the total virtual resource of the first account, the preset item configured to the first account in response to the second exchange request is obtained on the client.
处理器201还被设置为执行下述步骤:客户端在第一预定时间段内未接收到交换响应的情况下,向网络侧设备发出第二交换请求。The processor 201 is further arranged to perform the step of the client issuing a second exchange request to the network side device if the exchange response is not received within the first predetermined time period.
处理器201还被设置为执行下述步骤:在第二交换请求的发送次数小于预设次数的情况下,向网络侧设备发出第二交换请求。The processor 201 is further configured to perform the step of issuing a second exchange request to the network side device if the number of transmissions of the second exchange request is less than the preset number of times.
处理器201还被设置为执行下述步骤:在客户端上获取响应于第二交换请求配置给第一帐号的预设道具之后,在客户端上显示第一信息,其中,第一信息用于指示已将预设道具从第一帐号转移给直播应用的第二帐号;或者在客户端上显示第二信息,其中,第二信息用于指示已将预设道具存储在第一帐号的道具库中,道具库中用于存储配置给第一帐号的道具。The processor 201 is further configured to perform the following steps: after acquiring, on the client, the first item configured to the first account in response to the second exchange request, displaying the first information on the client, where the first information is used Instructing that the preset item has been transferred from the first account to the second account of the live application; or displaying the second information on the client, wherein the second information is used to indicate that the preset item has been stored in the item library of the first account In the item library, the item stored in the item library is stored.
采用本申请实施例,通过直播应用的客户端向直播应用的网络侧设备发送第一交换请求,在客户端没有接收到网络侧设备响应于交换请求发送的交换响应的情况下,从客户端向网络侧设备发送第二交换请求,在网络侧设备已经响应于第一交换请求从第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,在客户端上获取响应于第二交换请求配置给第一帐号的预设道具,从而实现了在弱网络环境下提高道具配置效率的技术效果,进而解决了在弱网络环境下直播应用的帐号在道具配置时经常出现超时需要多次操作导致的效率低的技术问题。In the embodiment of the present application, the client of the live application sends a first exchange request to the network side device of the live application, and the client does not receive the exchange response sent by the network device in response to the exchange request, from the client to the client. The network side device sends a second exchange request, where the network side device has deducted the target virtual resource from the total virtual resource of the first account in response to the first exchange request, and obtains the configuration on the client in response to the second exchange request. The preset props of the first account are implemented, thereby realizing the technical effect of improving the efficiency of props configuration in a weak network environment, thereby solving the problem that the account of the live application in the weak network environment often times out during the configuration of the props and requires multiple operations. Inefficient technical problems.
可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。For example, the specific examples in this embodiment may refer to the examples described in the foregoing embodiments, and details are not described herein again.
本领域普通技术人员可以理解,图12所示的结构仅为示意,电子装置可以是智能手机(如Android手机、iOS手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile Internet Devices,MID)、PAD等终端设备。图12其并不对上述电子装置的结构造成限定。例如,电子装置还可包括比图12中所示更多或者更少的组件(如网络接口、显示装置等),或者具有与图12所示不同的配置。A person skilled in the art can understand that the structure shown in FIG. 12 is merely illustrative, and the electronic device can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a mobile Internet device (MID). Terminal equipment such as PAD. FIG. 12 does not limit the structure of the above electronic device. For example, the electronic device may also include more or fewer components (such as a network interface, display device, etc.) than shown in FIG. 12, or have a different configuration than that shown in FIG.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令终端设备相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(Random Access Memory,RAM)、磁盘或光盘等。A person of ordinary skill in the art may understand that all or part of the steps of the foregoing embodiments may be completed by a program to instruct terminal device related hardware, and the program may be stored in a computer readable storage medium, and the storage medium may be Including: flash disk, read-only memory (ROM), random access memory (RAM), disk or optical disk.
本申请的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行直播应用的配置方法。Embodiments of the present application also provide a storage medium. Optionally, in this embodiment, the foregoing storage medium stores a computer program, where the computer program is configured to execute a configuration method of the live broadcast application at runtime.
可选地,在本实施例中,上述存储介质可以位于上述实施例所示的网络中的多个网络设备中的至少一个网络设备上。Optionally, in this embodiment, the foregoing storage medium may be located on at least one of the plurality of network devices in the network shown in the foregoing embodiment.
可选地,在本实施例中,存储介质被设置为存储被设置为执行以下步骤的程序代码:Alternatively, in the present embodiment, the storage medium is arranged to store program code set to perform the following steps:
S1,接收直播应用的客户端向直播应用的网络侧设备发送的第一交换请求,其中,第一交换请求用于请求将直播应用中的预设道具配置给直播应用的第一帐号;S1, the first exchange request sent by the client of the live application to the network side device of the live application, where the first exchange request is used to request to configure the preset item in the live application to the first account of the live application;
S2,在网络侧设备未成功将预设道具配置给第一帐号的情况下,获取第二交换请求,其中,第二交换请求用于再次请求将预设道具配置给第一帐号;In the case that the network side device fails to configure the preset props to the first account, the second exchange request is used to request the configuration of the preset props to the first account again.
S3,在判断出已经响应于第一交换请求从第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,响应于第二交换请求将预设道具配置给第一帐号,并从网络侧设备向客户端发送交换响应,其中,交换响应用于指示已成功将预设道具配置给第一帐号。S3. If it is determined that the target virtual resource has been deducted from the total virtual resource of the first account in response to the first exchange request, the preset item is configured to the first account in response to the second exchange request, and is configured from the network side. The device sends an exchange response to the client, where the exchange response is used to indicate that the preset item has been successfully configured to the first account.
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:通过直播应用的第一服务获取预设道具所对应的目标虚拟资源,其中,第一服务用于配置预设道具;通过第一服务向第二服务请求从第一帐号的总虚拟资源中扣除目标虚拟资源,其中,第二服务用于扣除目标虚拟资源;在 第二服务返回扣除成功信息的情况下,通过第一服务执行配置操作,其中,配置操作用于将预设道具配置给第一帐号,扣除成功信息用于指示已成功从总虚拟资源中扣除目标虚拟资源;在第二服务未返回扣除成功信息的情况下、或者、在执行配置操作未成功的情况下,确定出网络侧设备未成功将预设道具配置给第一帐号。Optionally, the storage medium is further configured to store the program code for performing the following steps: acquiring, by the first service of the live application, the target virtual resource corresponding to the preset item, where the first service is used to configure the preset item; Retrieving the target virtual resource from the total virtual resource of the first account by the first service, where the second service is used to deduct the target virtual resource; and in the case that the second service returns the deduction success information, the first The service performs a configuration operation, where the configuration operation is used to configure the preset item to the first account, and the deduction success information is used to indicate that the target virtual resource has been successfully deducted from the total virtual resource; and the second service does not return the deduction of the success information. If the configuration operation is unsuccessful, the network side device is not successfully configured to allocate the preset item to the first account.
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:接收客户端向网络侧设备发送的第二交换请求,其中,客户端在第一预定时间段内未接收到交换响应的情况下,向网络侧设备发出第二交换请求。Optionally, the storage medium is further configured to store program code for performing the following steps: receiving a second exchange request sent by the client to the network side device, wherein the client does not receive the exchange response within the first predetermined time period In case, the second exchange request is sent to the network side device.
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:在第二服务在第二预定时间段内未返回扣除成功信息的情况下,通过第一服务获取第二交换请求,并通过第一服务向第二服务请求从总虚拟资源中扣除目标虚拟资源。Optionally, the storage medium is further configured to store program code for performing the following steps: acquiring the second exchange request by the first service if the second service does not return the deduction success information within the second predetermined time period, And deducting the target virtual resource from the total virtual resource by the first service to the second service request.
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:在接收直播应用的客户端向直播应用的网络侧设备发送的第一交换请求之后、且在获取第二交换请求之前,通过直播应用的第一服务获取预设道具所对应的目标虚拟资源,其中,第一服务用于配置预设道具;在第一帐号的总虚拟资源大于等于目标虚拟资源与第一帐号的尚未扣除的虚拟资源之和情况下,通过第一服务执行配置操作,其中,配置操作用于将预设道具配置给第一帐号;通过第一服务向第二服务请求从总虚拟资源中扣除目标虚拟资源,其中,第二服务用于扣除目标虚拟资源;在执行配置操作未成功的情况下,确定出网络侧设备未成功将预设道具配置给第一帐号。Optionally, the storage medium is further configured to store program code for performing the following steps: after receiving the first exchange request sent by the client of the live application to the network side device of the live application, and before acquiring the second exchange request The first virtual service is used to obtain the target virtual resource corresponding to the preset prop, wherein the first service is used to configure the preset prop; the total virtual resource in the first account is greater than or equal to the target virtual resource and the first account yet. In the case of the sum of the deducted virtual resources, the configuration operation is performed by the first service, wherein the configuration operation is used to configure the preset props to the first account; and the target service is deducted from the total virtual resources by the first service to the second service request The resource, where the second service is used to deduct the target virtual resource; if the configuration operation is unsuccessful, it is determined that the network side device fails to configure the preset prop to the first account.
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:在响应于第二交换请求将预设道具配置给第一帐号之后,将预设道具从第一帐号转移给直播应用的第二帐号;或者将预设道具存储在第一帐号的道具库中,其中,道具库中用于存储配置给第一帐号的道具。Optionally, the storage medium is further configured to store program code for performing the following steps: after configuring the preset item to the first account in response to the second exchange request, transferring the preset item from the first account to the live application The second account; or the preset item is stored in the item library of the first account, wherein the item library is used to store the item configured for the first account.
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:在网络侧设备未成功将预设道具配置给第一帐号且未成功的次数小于预设 次数的情况下,获取第二交换请求。Optionally, the storage medium is further configured to store program code for performing the following steps: in the case that the network side device fails to configure the preset prop to the first account and the number of unsuccessful times is less than the preset number of times, obtain the first Second exchange request.
本申请的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质中存储有计算机程序,其中,计算机程序被设置为运行时执行直播应用的配置方法。Embodiments of the present application also provide a storage medium. Optionally, in this embodiment, a computer program is stored in the foregoing storage medium, wherein the computer program is configured to execute a configuration method of the live broadcast application at runtime.
可选地,在本实施例中,上述存储介质可以位于上述实施例所示的网络中的多个网络设备中的至少一个网络设备上。Optionally, in this embodiment, the foregoing storage medium may be located on at least one of the plurality of network devices in the network shown in the foregoing embodiment.
可选地,在本实施例中,存储介质被设置为存储用于执行以下步骤的程序代码:Optionally, in the present embodiment, the storage medium is arranged to store program code for performing the following steps:
S1,从直播应用的客户端向直播应用的网络侧设备发送第一交换请求,其中,第一交换请求用于请求将直播应用中的预设道具配置给直播应用的第一帐号;S1, the first exchange request is sent from the client of the live application to the network side device of the live application, where the first exchange request is used to request to configure the preset item in the live application to the first account of the live application;
S2,在客户端没有接收到网络侧设备响应于交换请求发送的交换响应的情况下,从客户端向网络侧设备发送第二交换请求,其中,第二交换请求用于再次请求将预设道具配置给第一帐号,交换响应用于指示已成功将预设道具配置给第一帐号;S2. The second exchange request is sent from the client to the network side device when the client does not receive the exchange response sent by the network side device in response to the exchange request, where the second exchange request is used to request the preset item again. Configured to the first account, the exchange response is used to indicate that the preset item has been successfully configured to the first account;
S3,在网络侧设备已经响应于第一交换请求从第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,在客户端上获取响应于第二交换请求配置给第一帐号的预设道具。S3. In the case that the network side device has deducted the target virtual resource from the total virtual resource of the first account in response to the first exchange request, acquire, on the client, a preset configured to the first account in response to the second exchange request. Props.
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:客户端在第一预定时间段内未接收到交换响应的情况下,向网络侧设备发出第二交换请求。Optionally, the storage medium is further arranged to store program code for performing the step of: the client issuing a second exchange request to the network side device if the exchange response is not received within the first predetermined time period.
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:在第二交换请求的发送次数小于预设次数的情况下,向网络侧设备发出第二交换请求。Optionally, the storage medium is further configured to store program code for performing the step of: issuing a second exchange request to the network side device if the number of transmissions of the second exchange request is less than a preset number of times.
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:在 客户端上获取响应于第二交换请求配置给第一帐号的预设道具之后,在客户端上显示第一信息,其中,第一信息用于指示已将预设道具从第一帐号转移给直播应用的第二帐号;或者在客户端上显示第二信息,其中,第二信息用于指示已将预设道具存储在第一帐号的道具库中,道具库中用于存储配置给第一帐号的道具。Optionally, the storage medium is further configured to store program code for performing the following steps: after obtaining the preset item configured to the first account in response to the second exchange request on the client, displaying the first information on the client The first information is used to indicate that the preset item has been transferred from the first account to the second account of the live application; or the second information is displayed on the client, wherein the second information is used to indicate that the preset item has been It is stored in the item library of the first account, and the item library is used to store the items allocated to the first account.
可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。For example, the specific examples in this embodiment may refer to the examples described in the foregoing embodiments, and details are not described herein again.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory. A variety of media that can store program code, such as a disc or a disc.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present application are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
上述实施例中的集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在上述计算机可读取的存储介质中。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在存储介质中,包括若干指令用以使得一台或多台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。The integrated unit in the above embodiment, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in the above-described computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, or the whole or part of the technical solution, which is stored in the storage medium, including The instructions are used to cause one or more computer devices (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.
在本申请的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments of the present application, the descriptions of the various embodiments are different, and the parts that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的客户端,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦 合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed client may be implemented in other manners. The device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, unit or module, and may be electrical or otherwise.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。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 integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
以上所述仅是本申请的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above description is only a preferred embodiment of the present application, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present application. It should be considered as the scope of protection of this application.

Claims (15)

  1. 一种直播应用的配置方法,包括:A method for configuring a live application includes:
    所述直播应用的网络侧设备接收直播应用的客户端发送的第一交换请求,其中,所述第一交换请求用于请求将所述直播应用中的预设道具配置给所述直播应用的第一帐号;The network side device of the live application receives the first exchange request sent by the client of the live application, where the first exchange request is used to request to configure the preset item in the live application to the live application. An account number;
    在所述网络侧设备未成功将所述预设道具配置给所述第一帐号的情况下,所述网络侧设备获取第二交换请求,其中,所述第二交换请求用于再次请求将所述预设道具配置给所述第一帐号;If the network side device fails to configure the preset prop to the first account, the network side device acquires a second exchange request, where the second exchange request is used to request the second exchange again. Presetting the props to the first account;
    在所述网络侧设备判断出已经响应于所述第一交换请求从所述第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,所述网络侧设备响应于所述第二交换请求将所述预设道具配置给所述第一帐号,并向所述客户端发送交换响应,其中,所述交换响应用于指示已成功将所述预设道具配置给所述第一帐号。And the network side device responds to the second exchange request, if the network side device determines that the target virtual resource has been deducted from the total virtual resource of the first account in response to the first exchange request. And configuring the preset item to the first account, and sending an exchange response to the client, where the exchange response is used to indicate that the preset item has been successfully configured to the first account.
  2. 根据权利要求1所述的方法,其中,在所述直播应用的网络侧设备接收直播应用的客户端向所述直播应用的网络侧设备发送的第一交换请求之后、且在所述网络侧设备获取第二交换请求之前,所述方法还包括:The method according to claim 1, wherein after the network side device of the live broadcast application receives the first exchange request sent by the client of the live broadcast application to the network side device of the live broadcast application, and at the network side device Before obtaining the second exchange request, the method further includes:
    所述网络侧设备通过所述直播应用的第一服务获取所述预设道具所对应的所述目标虚拟资源,其中,所述第一服务用于配置所述预设道具;The network side device acquires the target virtual resource corresponding to the preset item by using a first service of the live broadcast application, where the first service is used to configure the preset item;
    所述网络侧设备通过所述第一服务向第二服务请求从所述第一帐号的总虚拟资源中扣除所述目标虚拟资源,其中,所述第二服务用于扣除所述目标虚拟资源;The network side device deducts the target virtual resource from the total virtual resource of the first account by using the first service to the second service, where the second service is used to deduct the target virtual resource;
    在所述第二服务返回扣除成功信息的情况下,所述网络侧设备通过所述第一服务执行配置操作,其中,所述配置操作用于将所述预设道具配置给所述第一帐号,所述扣除成功信息用于指示已成功从所述总虚拟资源中扣除所述目标虚拟资源;And the network side device performs a configuration operation by using the first service, where the configuration operation is used to configure the preset item to the first account. The debiting success information is used to indicate that the target virtual resource has been successfully deducted from the total virtual resource;
    在所述第二服务未返回所述扣除成功信息的情况下、或者、在执行所述配置操作未成功的情况下,所述网络侧设备确定出未成功将所述预设道具配置给所述第一帐号。If the second service does not return the deduction success information, or if the configuration operation is unsuccessful, the network side device determines that the preset prop is not successfully configured to the First account number.
  3. 根据权利要求2所述的方法,其中,所述网络侧设备获取第二交换请求包括:The method of claim 2, wherein the acquiring, by the network side device, the second exchange request comprises:
    接收所述客户端向所述网络侧设备发送的所述第二交换请求,其中,所述客户端在第一预定时间段内未接收到所述交换响应的情况下,向所述网络侧设备发出所述第二交换请求。Receiving, by the client, the second exchange request sent by the client to the network side device, where the client does not receive the exchange response within a first predetermined time period, to the network side device The second exchange request is issued.
  4. 根据权利要求2所述的方法,其中,所述网络侧设备获取第二交换请求包括:The method of claim 2, wherein the acquiring, by the network side device, the second exchange request comprises:
    在所述第二服务在第二预定时间段内未返回所述扣除成功信息的情况下,通过所述第一服务获取所述第二交换请求,并通过所述第一服务向所述第二服务请求从所述总虚拟资源中扣除所述目标虚拟资源。And acquiring, by the first service, the second exchange request, and by using the first service to the second, if the second service does not return the deduction success information within a second predetermined time period The service request deducts the target virtual resource from the total virtual resource.
  5. 根据权利要求2所述的方法,其中,在所述直播应用的网络侧设备接收直播应用的客户端向所述直播应用的网络侧设备发送的第一交换请求之后、且在所述网络侧设备获取第二交换请求之前,所述方法还包括:The method according to claim 2, wherein after the network side device of the live broadcast application receives the first exchange request sent by the client of the live broadcast application to the network side device of the live broadcast application, and at the network side device Before obtaining the second exchange request, the method further includes:
    所述网络侧设备通过所述直播应用的第一服务获取所述预设道具所对应的所述目标虚拟资源,其中,所述第一服务用于配置所述预设道具;The network side device acquires the target virtual resource corresponding to the preset item by using a first service of the live broadcast application, where the first service is used to configure the preset item;
    在所述第一帐号的总虚拟资源大于等于所述目标虚拟资源与所述第一帐号的尚未扣除的虚拟资源之和情况下,所述网络侧设备通过所述第一服务执行配置操作,其中,所述配置操作用于将所述预设道具配置给所述第一帐号;And the network side device performs a configuration operation by using the first service, where the total virtual resource of the first account is greater than or equal to the sum of the target virtual resource and the undepleted virtual resource of the first account, where The configuration operation is configured to configure the preset prop to the first account;
    所述网络侧设备通过所述第一服务向所述第二服务请求从所述总虚拟资源中扣除所述目标虚拟资源,其中,所述第二服务用于扣除 所述目标虚拟资源;The network side device deducts the target virtual resource from the total virtual resource by using the first service to the second service, where the second service is used to deduct the target virtual resource;
    在执行所述配置操作未成功的情况下,所述网络侧设备确定出未成功将所述预设道具配置给所述第一帐号。If the configuration operation is unsuccessful, the network side device determines that the preset prop is not successfully configured to the first account.
  6. 根据权利要求2所述的方法,其中,在所述网络侧设备响应于所述第二交换请求将所述预设道具配置给所述第一帐号之后,所述方法还包括:The method of claim 2, wherein after the network side device configures the preset item to the first account in response to the second exchange request, the method further comprises:
    所述网络侧设备将所述预设道具从所述第一帐号转移给所述直播应用的第二帐号;或者Transferting, by the network side device, the preset item from the first account to a second account of the live application; or
    所述网络侧设备将所述预设道具存储在所述第一帐号的道具库中,其中,所述道具库中用于存储配置给所述第一帐号的道具。The network side device stores the preset item in the item library of the first account, wherein the item library is used to store an item configured for the first account.
  7. 根据权利要求2所述的方法,其中,所述网络侧设备获取所述第二交换请求包括:The method of claim 2, wherein the acquiring, by the network side device, the second exchange request comprises:
    在所述网络侧设备未成功将所述预设道具配置给所述第一帐号且未成功的次数小于预设次数的情况下,获取所述第二交换请求。And acquiring, in the case that the network side device fails to configure the preset prop to the first account, and the number of unsuccessful times is less than a preset number of times, acquiring the second exchange request.
  8. 一种直播应用的配置方法,包括:A method for configuring a live application includes:
    从直播应用的客户端向所述直播应用的网络侧设备发送第一交换请求,其中,所述第一交换请求用于请求将所述直播应用中的预设道具配置给所述直播应用的第一帐号;Transmitting, by the client of the live application, a first exchange request to the network side device of the live application, where the first exchange request is used to request to configure a preset prop in the live application to the live application An account number;
    在所述客户端没有接收到所述网络侧设备响应于所述交换请求发送的交换响应的情况下,从所述客户端向所述网络侧设备发送第二交换请求,其中,所述第二交换请求用于再次请求将所述预设道具配置给所述第一帐号,所述交换响应用于指示已成功将所述预设道具配置给所述第一帐号;Sending, by the client, a second exchange request from the client to the network side device, where the client does not receive the exchange response sent by the network side device in response to the exchange request, where the second The exchange request is used to request the configuration of the preset item to the first account, and the exchange response is used to indicate that the preset item has been successfully configured to the first account.
    在所述网络侧设备已经响应于所述第一交换请求从所述第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,在所述客户端上获取响应于所述第二交换请求配置给所述第一帐号的所述预设道具。And acquiring, in the client, the response to the second exchange request, if the network side device has deducted the target virtual resource from the total virtual resource of the first account in response to the first exchange request Configuring the preset item to the first account.
  9. 根据权利要求8所述的方法,其中,从所述客户端向所述网络侧设备 发送所述第二交换请求包括:The method of claim 8, wherein the transmitting the second exchange request from the client to the network side device comprises:
    所述客户端在第一预定时间段内未接收到所述交换响应的情况下,向所述网络侧设备发出所述第二交换请求。And the client sends the second exchange request to the network side device if the exchange response is not received within a first predetermined time period.
  10. 根据权利要求9所述的方法,其中,向所述网络侧设备发出所述第二交换请求包括:The method of claim 9, wherein the issuing the second exchange request to the network side device comprises:
    在所述第二交换请求的发送次数小于预设次数的情况下,向所述网络侧设备发出所述第二交换请求。And if the number of times of sending the second exchange request is less than a preset number of times, sending the second exchange request to the network side device.
  11. 根据权利要求8所述的方法,其中,在所述客户端上获取响应于所述第二交换请求配置给所述第一帐号的所述预设道具之后,所述方法还包括:The method of claim 8, wherein after the obtaining, on the client, the preset item configured to the first account in response to the second exchange request, the method further comprises:
    在所述客户端上显示第一信息,其中,所述第一信息用于指示已将所述预设道具从所述第一帐号转移给所述直播应用的第二帐号;或者Displaying the first information on the client, where the first information is used to indicate that the preset item has been transferred from the first account to a second account of the live application; or
    在所述客户端上显示第二信息,其中,所述第二信息用于指示已将所述预设道具存储在所述第一帐号的道具库中,所述道具库中用于存储配置给所述第一帐号的道具。Displaying the second information on the client, where the second information is used to indicate that the preset item has been stored in a item library of the first account, where the item library is used to store the configuration The item of the first account.
  12. 一种直播应用的配置装置,包括一个或多个处理器,以及一个或多个存储程序单元的存储器,其中,所述程序单元由所述处理器执行,所述程序单元包括:A configuration device for a live application, comprising one or more processors, and one or more memories storing program units, wherein the program units are executed by the processor, the program units comprising:
    接收单元,被设置为接收直播应用的客户端向所述直播应用的网络侧设备发送的第一交换请求,其中,所述第一交换请求用于请求将所述直播应用中的预设道具配置给所述直播应用的第一帐号;a receiving unit, configured to receive a first exchange request sent by a client of the live application to the network side device of the live application, where the first exchange request is used to request to configure a preset item in the live application Giving the first account of the live application;
    第一获取单元,被设置为在所述网络侧设备未成功将所述预设道具配置给所述第一帐号的情况下,获取第二交换请求,其中,所述第二交换请求用于再次请求将所述预设道具配置给所述第一帐号;a first acquiring unit, configured to acquire a second exchange request, where the network side device fails to configure the preset prop to the first account, where the second exchange request is used again Requesting to configure the preset prop to the first account;
    第一配置单元,被设置为在判断出已经响应于所述第一交换请求从所述第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,响应 于所述第二交换请求将所述预设道具配置给所述第一帐号,并从所述网络侧设备向所述客户端发送交换响应,其中,所述交换响应用于指示已成功将所述预设道具配置给所述第一帐号。a first configuration unit, configured to, in response to the second exchange request, determine that the target virtual resource has been deducted from the total virtual resource of the first account in response to the first exchange request The preset props are configured to be sent to the first account, and an exchange response is sent from the network side device to the client, where the exchange response is used to indicate that the preset prop has been successfully configured to the first An account number.
  13. 一种直播应用的配置装置,包括一个或多个处理器,以及一个或多个存储程序单元的存储器,其中,所述程序单元由所述处理器执行,所述程序单元包括:A configuration device for a live application, comprising one or more processors, and one or more memories storing program units, wherein the program units are executed by the processor, the program units comprising:
    第一发送单元,被设置为从直播应用的客户端向所述直播应用的网络侧设备发送第一交换请求,其中,所述第一交换请求用于请求将所述直播应用中的预设道具配置给所述直播应用的第一帐号;a first sending unit, configured to send a first exchange request from a client of the live application to a network side device of the live application, where the first exchange request is used to request a preset item in the live application The first account configured to the live application;
    第二发送单元,被设置为在所述客户端没有接收到所述网络侧设备响应于所述交换请求发送的交换响应的情况下,从所述客户端向所述网络侧设备发送第二交换请求,其中,所述第二交换请求用于再次请求将所述预设道具配置给所述第一帐号,所述交换响应用于指示已成功将所述预设道具配置给所述第一帐号;a second sending unit, configured to send a second exchange from the client to the network side device if the client does not receive the exchange response sent by the network side device in response to the exchange request a request, wherein the second exchange request is used to request to configure the preset item to the first account, and the exchange response is used to indicate that the preset item has been successfully configured to the first account ;
    获取单元,被设置为在所述网络侧设备已经响应于所述第一交换请求从所述第一帐号的总虚拟资源中扣除了目标虚拟资源的情况下,在所述客户端上获取响应于所述第二交换请求配置给所述第一帐号的所述预设道具。An obtaining unit, configured to: when the network side device has deducted the target virtual resource from the total virtual resource of the first account in response to the first exchange request, acquire the response on the client The second exchange request is configured to the preset item of the first account.
  14. 一种存储介质,其中,所述存储介质中存储有计算机程序,所述计算机程序被设置为运行时执行所述权利要求1至7或8至11中任一项所述的方法。A storage medium, wherein the storage medium stores a computer program, the computer program being arranged to perform the method of any one of claims 1 to 7 or 8 to 11 when executed.
  15. 一种电子装置,包括存储器和处理器,其中,所述存储器中存储有计算机程序,所述处理器被设置为通过所述计算机程序执行所述权利要求1至7或8至11中任一项所述的方法。An electronic device comprising a memory and a processor, wherein the memory stores a computer program, the processor being arranged to perform any one of claims 1 to 7 or 8 to 11 by the computer program Said method.
PCT/CN2018/090033 2017-06-08 2018-06-06 Method and apparatus for configuring live streaming application, storage medium and electronic apparatus WO2018223976A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710429055.8A CN109039993B (en) 2017-06-08 2017-06-08 Live broadcast application configuration method and device and storage medium
CN201710429055.8 2017-06-08

Publications (1)

Publication Number Publication Date
WO2018223976A1 true WO2018223976A1 (en) 2018-12-13

Family

ID=64566476

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/090033 WO2018223976A1 (en) 2017-06-08 2018-06-06 Method and apparatus for configuring live streaming application, storage medium and electronic apparatus

Country Status (2)

Country Link
CN (1) CN109039993B (en)
WO (1) WO2018223976A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112546636A (en) * 2020-12-15 2021-03-26 百果园技术(新加坡)有限公司 Live broadcast fight matching method, device, equipment and storage medium
CN113515336A (en) * 2021-05-24 2021-10-19 腾讯科技(深圳)有限公司 Live broadcast room joining method, live broadcast room creating method, live broadcast room joining device, live broadcast room creating device, live broadcast room equipment and storage medium
CN114756779A (en) * 2022-04-26 2022-07-15 北京达佳互联信息技术有限公司 Resource interaction method, resource interaction device, electronic equipment and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109729374B (en) * 2018-12-27 2022-02-18 广州方硅信息技术有限公司 Gift rewarding method, mobile terminal and computer storage medium
CN112561506B (en) * 2020-12-15 2024-03-29 深圳市彬讯科技有限公司 Live broadcast data processing method, system, equipment and medium based on virtual currency
CN113596596A (en) * 2021-07-27 2021-11-02 百果园技术(新加坡)有限公司 Gift rewarding system, method, device and medium for live broadcast application

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104469423A (en) * 2014-11-05 2015-03-25 广州华多网络科技有限公司 Virtual item issuing method and related equipment and system
WO2016078189A1 (en) * 2014-11-21 2016-05-26 广州华多网络科技有限公司 Interaction method and related device, system based on video living broadcast
CN105791093A (en) * 2016-04-15 2016-07-20 广州酷狗计算机科技有限公司 Virtual goods presenting method and device
CN105976197A (en) * 2016-04-13 2016-09-28 广州酷狗计算机科技有限公司 Method and device for presenting virtual goods
CN106488327A (en) * 2016-09-21 2017-03-08 广州华多网络科技有限公司 Electronics present sends control method, device and its mobile terminal with charge free
CN106559306A (en) * 2015-09-24 2017-04-05 腾讯科技(深圳)有限公司 Information processing method and device based on group's video

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170061315A1 (en) * 2015-08-27 2017-03-02 Sas Institute Inc. Dynamic prediction aggregation
CN106487781B (en) * 2016-09-13 2020-12-22 腾讯科技(深圳)有限公司 Resource data processing method, device and system based on live broadcast

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104469423A (en) * 2014-11-05 2015-03-25 广州华多网络科技有限公司 Virtual item issuing method and related equipment and system
WO2016078189A1 (en) * 2014-11-21 2016-05-26 广州华多网络科技有限公司 Interaction method and related device, system based on video living broadcast
CN106559306A (en) * 2015-09-24 2017-04-05 腾讯科技(深圳)有限公司 Information processing method and device based on group's video
CN105976197A (en) * 2016-04-13 2016-09-28 广州酷狗计算机科技有限公司 Method and device for presenting virtual goods
CN105791093A (en) * 2016-04-15 2016-07-20 广州酷狗计算机科技有限公司 Virtual goods presenting method and device
CN106488327A (en) * 2016-09-21 2017-03-08 广州华多网络科技有限公司 Electronics present sends control method, device and its mobile terminal with charge free

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112546636A (en) * 2020-12-15 2021-03-26 百果园技术(新加坡)有限公司 Live broadcast fight matching method, device, equipment and storage medium
CN113515336A (en) * 2021-05-24 2021-10-19 腾讯科技(深圳)有限公司 Live broadcast room joining method, live broadcast room creating method, live broadcast room joining device, live broadcast room creating device, live broadcast room equipment and storage medium
CN113515336B (en) * 2021-05-24 2023-08-15 腾讯科技(深圳)有限公司 Live room joining method, creation method, device, equipment and storage medium
CN114756779A (en) * 2022-04-26 2022-07-15 北京达佳互联信息技术有限公司 Resource interaction method, resource interaction device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN109039993B (en) 2021-05-14
CN109039993A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
WO2018223976A1 (en) Method and apparatus for configuring live streaming application, storage medium and electronic apparatus
US10621582B2 (en) System and method for simplified checkout
US9794334B2 (en) Systems and methods to process a request received at an application program interface
CN110443695A (en) Data processing method and its device, electronic equipment and medium
CN113015993A (en) System and method for optimizing data writes to a blockchain
CN111352705B (en) Transaction processing method, device, equipment and medium of block chain
EP3878161B1 (en) Intelligent, decentralized and autonomous marketplace for distributed computing and storage
WO2017133329A1 (en) Information processing method, server, first terminal and computer storage medium
WO2019094081A1 (en) Individualized connectivity based request handling
TW201915894A (en) Method for realizing an installment business based on credit
WO2020238828A1 (en) Method and device for providing target information
US20140067582A1 (en) Auction bid incentives based on time as highest bidder
CN114245149A (en) Virtual resource allocation method, device and system, electronic equipment and storage medium
JP6097984B2 (en) Real-time mobile payment processing system
JP2020030624A (en) Proposal device, proposal method, and program
US20240087391A1 (en) System and method using fractional voting
CN108170545A (en) A kind of method for message transmission and device based on message-oriented middleware
US10949892B2 (en) Cross platform reward exchange marketplace providing an auction operation
US11263669B2 (en) System and methods for increasing website advertising revenue while maintaining low latency
CN111861436A (en) Data processing method, device, system, medium executed by server
CN110378785B (en) Transaction processing method, apparatus, computing device and medium executed by server
TWI498839B (en) Device and method for receiving the buying/selling signals of the finance software on a mobile apparatus
US20190172087A1 (en) Cross Platform Reward Exchange Marketplace
US20170053322A1 (en) Making and adjusting advertiser bids based on call center occupancy
US20240089548A1 (en) System and method for group consensus telemetry

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18814050

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18814050

Country of ref document: EP

Kind code of ref document: A1