Live broadcast room gift update method, device, terminal equipment and readable storage medium
By receiving the comparison instructions and the latest gift resources from the server in the live broadcast room, the client compares the resources and downloads the differential resources step by step, solving the problem of inconsistent resource updates in the existing technology and realizing fast and low-cost gift updates. Meets the needs of all users to update at the same time.
Patent Information
- Application Number
- CN202110854750.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-28
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2041-07-28
AI Technical Summary
The existing live broadcast room gift update method cannot allow all users to update the same resources at the same time, resulting in inconsistent resource acquisition and different download times, which cannot meet the time requirements.
By receiving the comparison instructions and the latest gift resources sent by the server, the client compares resources with the server to obtain differentiated gift resources, and downloads small icons, large icons and animation resources step by step to complete the gift update process.
It enables all users to update the same resources at the same time, reduces the number of downloaded resources, shortens the update time, reduces network environment requirements, and has the advantages of low cost and strong applicability.
Smart Images

Figure CN113691820B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network technology, and in particular to a method, device, terminal equipment and readable storage medium for updating gifts in a live broadcast room. Background Art
[0002] At present, the gift-related information displayed in the live broadcast room of each client is mainly displayed based on the local gift information of the client, rather than being sent to the client in real time by the server. Usually, the relevant data of the gift resource is stored in the resource package, and when the client opens the APP, it requests to configure and update the resource to finally display the gift information.
[0003] In the live broadcast room, gifts need to be frequently put on the shelves, and the act of putting gifts on the shelves has strict time requirements. It is required that when the APP is open, all online users can easily update to the same resources at the same time and use them without distinction. However, in the above gift update method, since gift resources are generally large, the time required for download varies, and the acquisition of resources is generally based on client pull, which cannot be combined with server push and download, so it is difficult for all users to update the same resources at the same time. Summary of the invention
[0004] The purpose of the present invention is to provide a live broadcast room gift update method, device, terminal equipment and readable storage medium to solve the problem that the existing gift update method cannot enable all users to update the same resources at the same time for indiscriminate use.
[0005] To achieve the above object, the present invention provides a live broadcast room gift update method, which is applied to a client and includes:
[0006] Receiving a comparison instruction and a latest gift resource sent by a server, and comparing the latest gift resource with a local gift resource according to the comparison instruction to obtain a differential gift resource;
[0007] Download the differential gift resources step by step to complete the gift update process.
[0008] Furthermore, the step-by-step downloading of the differential gift resources includes: downloading small icons, large icons and animation resources in sequence.
[0009] The present invention also provides a live broadcast room gift update method, which is applied to a server and includes:
[0010] Sending a comparison instruction and the latest gift resource to the client, so that the client compares the latest gift resource with the local gift resource according to the comparison instruction to obtain the difference gift resource;
[0011] Respond to the request sent by the client to download the differential gift resources in steps to complete the gift update process.
[0012] Furthermore, the downloading requests of small icons, large icons and animation resources sent by the client are responded to in sequence.
[0013] Furthermore, before sending the comparison instruction and the latest gift resource to the client, it also includes:
[0014] Receive the data generated after the gift resources are split and configured uploaded by the background, and confirm whether the data is correct;
[0015] When the data is correct, the data is cached locally as the latest gift resource.
[0016] Furthermore, the resource server is used to confirm whether the data is correct, and the business server is used to cache the data locally as the latest gift resource.
[0017] The present invention also provides a live broadcast room gift updating device, which is applied to a client and includes:
[0018] An instruction receiving unit, used for receiving a comparison instruction and a latest gift resource sent by a server, and comparing the latest gift resource with a local gift resource according to the comparison instruction to obtain a differential gift resource;
[0019] The step-by-step downloading unit is used to download the differential gift resources step by step to complete the gift updating process.
[0020] The present invention also provides a live broadcast room gift updating device, which is applied to a server and includes:
[0021] A sending instruction unit, used for sending a comparison instruction and the latest gift resource to the client, so that the client compares the latest gift resource with the local gift resource according to the comparison instruction to obtain the differential gift resource;
[0022] The request response unit is used to respond to the request sent by the client to download the differential gift resources in steps to complete the gift update process.
[0023] The present invention also provides a terminal device, comprising:
[0024] one or more processors;
[0025] A memory, coupled to the processor, for storing one or more programs;
[0026] When the one or more programs are executed by the one or more processors, the one or more processors implement the live broadcast room gift update method as described in any of the above items.
[0027] The present invention also provides a readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the live broadcast room gift updating method as described in any one of the above items is implemented.
[0028] Compared with the prior art, the beneficial effects of the present invention are:
[0029] The present invention discloses a method for updating gifts in a live broadcast room, which is applied to a client, and includes: receiving a comparison instruction and the latest gift resource sent by a server, comparing the latest gift resource with the local gift resource according to the comparison instruction to obtain a differential gift resource; and downloading the differential gift resource in steps to complete the gift update process. The method for updating gifts in a live broadcast room provided by the present invention enables the client to complete the gift update while downloading fewer resources, which not only takes less time, but also achieves the purpose of all users updating the same resources at the same time for indiscriminate use. The method provided by the present invention not only has lower requirements on the network environment, but also has the advantages of low cost and strong applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the implementation mode will be briefly introduced below. Obviously, the drawings described below are only some implementation modes of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 It is a flowchart of a live broadcast room gift update method applied to a client provided by a certain embodiment of the present invention;
[0032] Figure 2 It is a flowchart of a live broadcast room gift updating method applied to a server provided by a certain embodiment of the present invention;
[0033] Figure 3 It is a schematic diagram of the entire process of a live broadcast room gift update method provided by a certain embodiment of the present invention;
[0034] Figure 4 It is a structural diagram of a live broadcast room gift updating device applied to a client provided by a certain embodiment of the present invention;
[0035] Figure 5 It is a structural diagram of a live broadcast room gift updating device applied to a server provided by a certain embodiment of the present invention;
[0036] Figure 6 It is a schematic diagram of the structure of a terminal device provided by a certain embodiment of the present invention. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] It should be understood that the step numbers used in this document are only for convenience of description and are not intended to limit the order in which the steps are executed.
[0039] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0040] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0041] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.
[0042] The first embodiment of the present invention:
[0043] See also Figure 1 The first embodiment of the present invention provides a live broadcast room gift update method, which is applied to a client and includes the following steps:
[0044] S10, receiving a comparison instruction and the latest gift resource sent by the server, and comparing the latest gift resource with the local gift resource according to the comparison instruction to obtain a differential gift resource;
[0045] S20, downloading the differential gift resources step by step to complete the gift update process.
[0046] It should be noted that, in this embodiment, the gift update method is described with the client as the execution subject. Specifically, step S10 mainly accepts the comparison instruction and the latest gift resource sent by the server. The comparison and analysis instruction means that when the gift resource configuration changes, the server will notify the client that the gift resource has changed and issue a comparison instruction. Then the client compares the latest gift resource with the historical gift resource stored locally according to the comparison and analysis instruction, and obtains the differential gift resource after comparison. Then in step S20, you only need to download the differential gift resource to complete the gift update process. It can be understood that this embodiment can save update time, speed up the update speed, occupy less memory, and have lower requirements on network bandwidth because there is no need to re-download all gift resources.
[0047] In a specific implementation manner, the step-by-step downloading of the differential gift resources includes: downloading small icons, large icons and animation resources in sequence.
[0048] It should be noted that because the small icon is visible to users on the gift panel of the APP, the time from receiving the instruction from the business server to downloading the small icon is less than or equal to 200ms, so the user of the APP can see the gift displayed on the gift panel within 200ms, and after clicking the small gift icon, the large gift icon can be seen. The download completion time of the large icon is less than or equal to 500ms. It takes more than 500ms for the user to operate the gift. During this process, the animation resources are also downloaded at the same time, ensuring that the animation resources have been downloaded almost completely during the operation and can be used at any time. This download order can ensure that when the APP is opened, all online people can easily update to the same resources at the same time and use them without distinction.
[0049] The second embodiment of the present invention:
[0050] See also Figure 2 The second embodiment of the present invention further provides a live broadcast room gift update method, which is applied to a server and includes:
[0051] S30, sending a comparison instruction and the latest gift resource to the client, so that the client compares the latest gift resource with the local gift resource according to the comparison instruction to obtain the differential gift resource;
[0052] S40, responding to the request sent by the client to download the differential gift resources in steps to complete the gift update process.
[0053] In a specific implementation manner, in this embodiment, responding to a request sent by a client to download the differential gift resources in steps includes responding in sequence to requests to download small icons, download large icons, and download animation resources sent by the client.
[0054] It is understandable that this embodiment is described with the server as the execution subject, so steps S30 and S40 correspond to S10 and S20 respectively. First, in step S30, the server sends a comparison instruction and the latest gift resource to the client, and then the client compares the latest gift resource with the local gift resource according to the comparison instruction to obtain the differential gift resource; then, the client sends a request to download the differential gift resource step by step, and finally in step S40, the server responds to the request to complete the gift update process.
[0055] In an optional implementation manner, before the server sends the comparison instruction and the latest gift resource to the client, the server further includes:
[0056] Receive the data generated after the gift resources are split and configured uploaded by the background, and confirm whether the data is correct;
[0057] When the data is correct, the data is cached locally as the latest gift resource.
[0058] In an optional implementation, a resource server is used to confirm whether the data is correct, and a business server is used to cache the data locally as the latest gift resource.
[0059] The live broadcast room gift updating method provided by the first and second embodiments of the present invention enables the client to complete the gift update while downloading fewer resources. It not only takes less time, but also achieves the purpose of all users updating the same resources at the same time for indiscriminate use. This method not only has lower requirements for the network environment, but also has the advantages of low cost and strong applicability.
[0060] The third embodiment of the present invention:
[0061] In order to help better understand the solution provided by the present invention, in this embodiment, a data interaction process between the server and the client is provided to implement the gift update process, such as Figure 3 shown.
[0062] Specifically, this embodiment mainly includes the following steps:
[0063] 1) The developer first splits the gift resources into small icons, large icons, animation resources, etc. Due to their different sizes, the download speeds are also different, that is, the time spent downloading small icons, large icons and animation resources increases successively.
[0064] 2) The developer establishes a resource management background, uploads the split gift resources to the resource server (a server for storing resources) through the resource management background, and fills in and configures some other attributes of the gift, and classifies them; including filling in the gift ID, gift name, gift price, sorting weight, gift statement, gift restriction, animation version number, etc.
[0065] 3) After step 2), the developer confirms the accuracy of the data by previewing the gift effect and the modified ID in the resource server.
[0066] 4) After the developer confirms the accuracy of the data, the data is pushed to the APP's business server (a server used to process various business data of the APP), and the business server generates the resources uploaded in step 2) and the filled-in configuration information as cache data, that is, the latest gift resources.
[0067] 5) After the business server generates the above cache data, it sends a comparison instruction to notify the APP client, allowing the client to obtain the latest gift resources from the business server.
[0068] 6) After receiving the comparison instruction from the business server, the client analyzes the instruction information, takes out the local data of the APP and compares it with the instruction information of the business server, obtains the difference information after comparison, and then uses the difference information to refresh the local data.
[0069] 7) The client needs to download the difference information generated in step 6), that is, the difference gift resources. It can be understood that after comparing the differences, the resources to be downloaded will be far less than downloading all the gift resources again.
[0070] 8) The client uses the differentiated gift resources generated in step 7) to download the gifts in steps, first downloading the small icon, then the large icon, and finally the animation resource. Because the small icon can be seen by the user on the gift panel of the APP in a timely manner. The time from the client receiving the instruction from the business server to the completion of downloading the small icon is less than or equal to 200ms, so the user of the APP can see the gift displayed on the gift panel within 200ms, and the large gift icon can be seen after clicking the small gift icon. The download completion time of the large icon is less than or equal to 500ms. It takes more than 500ms for the user to operate the gift. In this process, the animation resource is also downloaded at the same time to ensure that the animation resource has been downloaded almost completely during the operation and can be used at any time. In this way, it can be ensured that when the APP is opened, all online people can easily update to the same resources at the same time and use them without distinction.
[0071] Therefore, in this embodiment, refreshing local data and downloading differential gift resources can enable users to obtain the same data and resources in the same second, update to the same gift, or remove the target gift. At the same time, this method can enable the client to complete the gift update while downloading fewer resources, which not only takes less time, but also has lower requirements on the network environment, and has the advantages of low cost and strong applicability.
[0072] The fourth embodiment of the present invention:
[0073] See also Figure 4 The fourth embodiment of the present invention further provides a live broadcast room gift updating device, which is applied to a client and includes:
[0074] The instruction receiving unit 01 is used to receive a comparison instruction and the latest gift resource sent by the server, and compare the latest gift resource with the local gift resource according to the comparison instruction to obtain a differential gift resource;
[0075] The step-by-step downloading unit 02 is used to download the differential gift resources step by step to complete the gift update process.
[0076] It should be noted that the instruction receiving unit 01 and the step-by-step downloading unit 02 of this embodiment are respectively used to execute steps S10 and S20 provided in the first embodiment of the present invention.
[0077] The fifth embodiment of the present invention:
[0078] See also Figure 5 The fifth embodiment of the present invention further provides a live broadcast room gift updating device, which is applied to a server and includes:
[0079] The sending instruction unit 03 is used to send a comparison instruction and the latest gift resource to the client, so that the client compares the latest gift resource with the local gift resource according to the comparison instruction to obtain the difference gift resource;
[0080] The request response unit 04 is used to respond to the request sent by the client to download the differential gift resources in steps to complete the gift update process.
[0081] It should be noted that the sending instruction unit 03 and the response request unit 04 of this embodiment are respectively used to execute steps S30 and S40 provided in the second embodiment of the present invention.
[0082] The live broadcast room gift updating device provided by the fourth and fifth embodiments of the present invention can enable the client to complete the gift update while downloading fewer resources. It not only takes less time, but also achieves the purpose of all users updating the same resources at the same time for indiscriminate use. It not only has lower requirements on the network environment, but also has the advantages of low cost and strong applicability.
[0083] The sixth embodiment of the present invention:
[0084] See also Figure 6 , a sixth embodiment of the present invention further provides a terminal device, comprising one or more processors; a memory, coupled to the processor, for storing one or more programs;
[0085] When the one or more programs are executed by the one or more processors, the one or more processors implement the live broadcast room gift update method as described above.
[0086] The processor is used to control the overall operation of the terminal device to complete all or part of the steps of the above-mentioned live broadcast room gift update method. The memory is used to store various types of data to support the operation of the terminal device, and these data may include, for example, instructions for any application or method used to operate on the terminal device, as well as application-related data. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, disk or optical disk.
[0087] In an exemplary embodiment, the terminal device can be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, ASC), digital signal processors (Digital Signal Processor, DSP), digital signal processing devices (Digital Signal Processing Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field Programmable Gate Array, FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the live broadcast room gift update method as described in any of the above embodiments and achieve the same technical effect as the above method.
[0088] In another exemplary embodiment, a readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the live broadcast room gift update method as described in any of the above embodiments are implemented. For example, the readable storage medium can be the above-mentioned memory including program instructions, and the above-mentioned program instructions can be executed by the processor of the terminal device to complete the live broadcast room gift update method as described in any of the above embodiments, and achieve the same technical effect as the above method.
[0089] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A live broadcast room gift update method, applied to the client, It is characterized in that include: Receive the comparison instruction and the latest gift resource sent by the server, compare the latest gift resource with the local gift resource according to the comparison instruction, and obtain the differential gift resource; wherein, the comparison instruction sent by the server is received, specifically: when the gift resource configuration changes, the server will notify the client that the gift resource has changed and issue a comparison instruction; wherein, the process of the client obtaining the latest gift resource is: split the gift resource into small icons, large icons, and animation resources, and fill in the attributes of the split gift resources to obtain the data generated after the gift resource is split and configured; according to the data generated after the gift resource is split and configured, the server obtains the latest gift resource, and sends the comparison instruction to notify the client to obtain the latest gift resource; The differential gift resources are downloaded step by step to complete the gift update process; wherein, the step by step downloading of the differential gift resources includes: downloading small icons, large icons and animation resources in sequence.
2. A live broadcast room gift update method, applied to the server, It is characterized in that include: Send a comparison instruction and the latest gift resource to the client, so that the client compares the latest gift resource with the local gift resource according to the comparison instruction to obtain the differential gift resource; wherein the process of the server obtaining the latest gift resource is: receiving the data generated after the gift resource is split and configured uploaded by the background, and confirming whether the data is correct; when the data is correct, caching the data locally as the latest gift resource; the data generated after the gift resource is split and configured, the acquisition process is: split the gift resource into small icons, large icons, animation resources, and fill in the attributes of the split gift resources; Respond to the request sent by the client to download the differential gift resources in steps to complete the gift update process; wherein, responding to the request sent by the client to download the differential gift resources in steps includes: responding to the requests sent by the client to download small icons, download large icons and download animation resources in sequence.
3. The live broadcast room gift updating method according to claim 2, It is characterized in that The resource server is used to confirm whether the data is correct, and the business server is used to cache the data locally as the latest gift resource.
4. A live broadcast room gift updating device, applied to the client, It is characterized in that include: A receiving instruction unit is used to receive a comparison instruction and the latest gift resource sent by a server, and compare the latest gift resource with the local gift resource according to the comparison instruction to obtain differential gift resources; wherein, the receiving comparison instruction sent by the server is specifically: when the gift resource configuration changes, the server will notify the client of the change in gift resources and issue a comparison instruction; wherein, the process of the client obtaining the latest gift resource is: splitting the gift resource into small icons, large icons, and animation resources, and filling in and configuring the attributes of the split gift resources to obtain the data generated after the gift resources are split and configured; according to the data generated after the gift resources are split and configured, the server obtains the latest gift resource, and sends the comparison instruction to notify the client to obtain the latest gift resource; The step-by-step downloading unit is used to download the differential gift resources step by step to complete the gift update process; wherein, the step-by-step downloading of the differential gift resources includes: downloading small icons, large icons and animation resources in sequence.
5. A live broadcast room gift updating device, applied to a server, It is characterized in that include: A sending instruction unit is used to send a comparison instruction and the latest gift resource to the client, so that the client compares the latest gift resource with the local gift resource according to the comparison instruction to obtain the differential gift resource; wherein the acquisition process of the latest gift resource is: receiving the data generated after the gift resource is split and configured uploaded by the background, and confirming whether the data is correct; when the data is correct, caching the data locally as the latest gift resource; the acquisition process of the data generated after the gift resource is split and configured is: splitting the gift resource into small icons, large icons, and animation resources, and filling in the attributes of the split gift resources. A response request unit is used to respond to the request sent by the client to download the differential gift resources in steps to complete the gift update process; wherein, the response to the request sent by the client to download the differential gift resources in steps includes: responding in turn to the requests for downloading small icons, downloading large icons and downloading animation resources sent by the client.
6. A terminal device, It is characterized in that include: one or more processors; A memory, coupled to the processor, for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the live broadcast room gift update method as described in any one of claims 1-3.
7. A readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by the processor, the live broadcast room gift updating method as described in any one of claims 1-3 is implemented.
