Resource distribution method, electronic device and storage medium
By pre-cacheting the book resources of the application applet in electronic devices and detecting resource requests, and directly sending pre-cache resources, the problem of resource server paralysis during live broadcast promotion is solved, and the response speed and system stability are improved.
Patent Information
- Application Number
- CN202210141214.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-16
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2042-02-16
AI Technical Summary
During the live broadcast promotion process, a large number of users enter the application applet through links, causing the resource server to receive a large number of resource requests in a short period of time, which easily leads to the resource server being paralyzed.
By pre-cache some book resources in the electronic device and detect whether there are pre-cache resources when receiving the resource request, if there are pre-cache resources, directly send the pre-cache resources to avoid downloading from the book resource library.
It improves resource response speed, reduces the heavy download tasks of electronic devices when facing a large number of resource requests, and avoids the risk of resource server paralysis.
Smart Images

Figure CN114528105B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a resource distribution method, an electronic device, and a storage medium. Background Art
[0002] With the improvement of mobile terminal device performance and the development of network technology, the promotion of food, clothing, beauty products, third-party applications, and applets through live broadcasting has become more and more common. Among them, for the promotion of applets, a link to the applet can be placed in the live broadcast room, so that users can watch the introduction of the applet or the product in the applet in the live broadcast room and then enter the applet through the link.
[0003] However, there are usually a large number of users watching live broadcasts. When a large number of users enter the application mini-program through a link and want to obtain information about the products in the application mini-program, the resource server will receive a large number of resource requests in a short period of time. The resource server needs to download the resources corresponding to each resource request in response to the large number of resource requests, which can easily cause the resource server to be paralyzed. Summary of the invention
[0004] In order to solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides a resource distribution method, an electronic device and a storage medium.
[0005] In a first aspect, the present disclosure provides a resource distribution method, comprising:
[0006] Receiving a resource request sent by an application applet client, wherein the application applet runs on the application applet client;
[0007] In response to the resource request, detecting whether a book resource corresponding to the resource request is pre-cached;
[0008] When it is detected that a book resource corresponding to the resource request is pre-cached, the pre-cached book resource is sent to the application applet client.
[0009] In a second aspect, the present disclosure provides an electronic device, including a processor and a memory, wherein the memory is used to store executable instructions, and the executable instructions enable the processor to perform the following operations:
[0010] Receiving a resource request sent by an application applet client, wherein the application applet runs on the application applet client;
[0011] In response to the resource request, detecting whether a book resource corresponding to the resource request is pre-cached;
[0012] When it is detected that a book resource corresponding to the resource request is pre-cached, the pre-cached book resource is sent to the application applet client.
[0013] In a third aspect, the present disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor implements the resource distribution method of the first aspect.
[0014] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0015] The advertisement insertion method, electronic device, and storage medium of the disclosed embodiment can receive a resource request sent by an application applet client, and in response to the resource request, detect whether a book resource corresponding to the resource request is pre-cached; when it is detected that a book resource corresponding to the resource request is pre-cached, the pre-cached book resource is sent to the application applet client. It can be seen that according to the disclosed embodiment, when a book resource corresponding to a resource request is pre-cached, the electronic device can send the pre-cached book resource to the application applet client, so that the book resource can be sent to the application applet client quickly to improve the response speed, and when the electronic device faces a large number of resource requests, it can avoid the problem of heavy download tasks caused by downloading book resources from the book resource library for each resource request, thereby causing paralysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0017] Figure 1 A schematic diagram of a process of distributing resources provided by an embodiment of the present disclosure is shown;
[0018] Figure 2 A schematic diagram showing a flow chart of another resource distribution method provided by an embodiment of the present disclosure;
[0019] Figure 3 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0020] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0021] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0022] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0023] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0024] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0025] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0026] The embodiments of the present disclosure provide a resource distribution method, an electronic device, and a storage medium that can improve the response speed and avoid paralysis caused by excessive resource requests.
[0027] Let's first combine Figure 1-2 The resource distribution method provided by the embodiment of the present disclosure is described.
[0028] The resource distribution method provided in the embodiment of the present disclosure can be executed by an electronic device that can provide services to the application applet client, wherein the electronic device can be a cloud server or a server cluster or other device with storage and computing functions.
[0029] Figure 1 A flow chart of a resource distribution method provided by an embodiment of the present disclosure is shown.
[0030] like Figure 1 As shown, the resource distribution method may include the following steps.
[0031] S110: Receive a resource request sent by the application applet client.
[0032] Among them, an application applet is running on the application applet client.
[0033] In an embodiment of the present disclosure, when a user wants to read a book in an application applet client, the application applet client can send a resource request to the electronic device, the electronic device can receive the resource request sent by the application applet client, and in response, send the book resource corresponding to the resource request to the application applet client, so that the application applet client presents the book resource to the user.
[0034] Specifically, a mini program is an application that can be used without the need for users to download and install. Users can directly find the mini program and open it for use. The mini program provides the functions of third-party applications, which is convenient for users to quickly experience the use of the application. Among them, the application mini program can be any mini program that can provide reading functions.
[0035] Specifically, the application applet client can be any client electronic device that includes an application applet and hardware that supports the operation of the application applet. The client electronic device may include but is not limited to mobile terminals such as smart phones, laptops, personal digital assistants (PDAs), tablet computers (PADs), portable multimedia players (PMPs), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable devices, etc., as well as fixed terminals such as digital TVs, desktop computers, smart home devices, etc.
[0036] Specifically, the resource request may be a resource request corresponding to any book in the application applet client.
[0037] Specifically, the electronic device may receive the resource request sent by the application applet client through wired communication, wireless communication, etc., but is not limited thereto.
[0038] In an application scenario example, when a link to an application applet is placed in the target live broadcast room, the user can enter the application applet through the link, that is, the application applet client starts running the application applet, and when the user wants to read a book in the application applet client, the application applet client can send a corresponding resource request to the electronic device. It should be understood by those skilled in the art that the number of users watching the target live broadcast room at the same time is usually large, so a large number of users may use the application applet at the same time, causing the electronic device to receive a large number of concurrent resource requests in a short period of time (e.g., within 1 second).
[0039] It should be noted that the above application scenario examples only illustrate entering the application applet through a link in the target live broadcast room, but are not limited to this.
[0040] S120 . In response to the resource request, detecting whether a book resource corresponding to the resource request is pre-cached.
[0041] In the embodiment of the present disclosure, after receiving a resource request, the electronic device may first detect whether a book resource corresponding to the resource request is pre-cached in response to the resource request.
[0042] Specifically, the electronic device can pre-cache book resources of some books locally, wherein the local caching method can include memory hot storage, etc., which effectively reduces the consumption of the system when repeatedly reading book resources from the disk and improves the response efficiency of access requests.
[0043] In some embodiments, detecting whether a book resource corresponding to the resource request is pre-cached may include: based on the book information included in the resource request, searching the pre-cached book resources for a book resource that matches the book information.
[0044] Specifically, the book information may include the book title, the book chapter to be requested, etc., but is not limited thereto.
[0045] S130: When it is detected that a book resource corresponding to the resource request is pre-cached, the pre-cached book resource is sent to the application applet client.
[0046] In an embodiment of the present disclosure, if the electronic device detects that a book resource corresponding to the resource request is pre-cached, the pre-cached book resource may be sent to the application applet client.
[0047] Specifically, when the electronic device detects that a book resource corresponding to a resource request is pre-cached, the electronic device does not need to download the book resource corresponding to the resource request from the book resource library, and only needs to send the pre-cached book resource corresponding to the resource request to the application applet client.
[0048] Specifically, the electronic device may send the pre-cached book resource to the application applet client via wired communication, wireless communication, etc., but is not limited thereto.
[0049] It can be understood that by setting the electronic device to send the pre-cached book resources to the application applet client when it detects that the book resources corresponding to the resource request are pre-cached, the time required for the electronic device to download the book resources from the book resource library can be saved, thereby reducing the time it takes for the electronic device to respond to the resource request, effectively improving the response speed.
[0050] It can also be understood that in the prior art, when the application applet client sends a resource request to the electronic device, the electronic device needs to download the book resource corresponding to the resource request from the book resource library, and then send the book resource to the application applet client. In this way, when a large number of users log in to the application applet and read books at the same time, the electronic device will receive a large number of resource requests in a short period of time, and the electronic device needs to download the book resource corresponding to each resource request, which may cause the electronic device to crash. However, in the disclosed embodiment, even if the electronic device receives a large number of resource requests in a short period of time, since the electronic device has pre-cached book resources of some books locally, so that at least a part of the resource requests hit the pre-cached book resources, then the book resources corresponding to this type of resource request do not need to be downloaded from the book resource library, so that the task of the electronic device to download book resources from the book resource library can be reduced, thereby improving the problem of electronic devices being paralyzed when facing a large number of resource requests received in a short period of time.
[0051] The advertisement insertion method of the disclosed embodiment can receive a resource request sent by an application applet client, and in response to the resource request, detect whether a book resource corresponding to the resource request is pre-cached; when it is detected that a book resource corresponding to the resource request is pre-cached, the pre-cached book resource is sent to the application applet client. It can be seen that according to the disclosed embodiment, when a book resource corresponding to the resource request is pre-cached, the electronic device can send the pre-cached book resource to the application applet client, so that the book resource can be sent to the application applet client quickly to improve the response speed, and when the electronic device faces a large number of resource requests, it can avoid the problem of heavy download tasks caused by downloading book resources from the book resource library for each resource request, thereby causing paralysis.
[0052] In another implementation of the present disclosure, before S120, the method further includes: downloading book resources of some books from a book resource library; and caching book resources of some books.
[0053] Specifically, the book resource library includes at least the book resources of any book in the application applet client.
[0054] Specifically, the cached part of books includes at least one book in the application applet client.
[0055] Optionally, some of the cached books include books promoted in the target live broadcast room, books ranked higher than a preset ranking threshold, or books read higher than a preset reading threshold.
[0056] Specifically, the books promoted in the target live broadcast room may include at least one of books that have been promoted in the target live broadcast room, books that are currently being promoted, and books to be promoted, but is not limited thereto.
[0057] It is understandable that, usually, users enter the application applet through the link in the target live broadcast room because the users are interested in the books promoted in the target live broadcast room. Therefore, after the users log in to the application applet, the probability that they want to read the books promoted in the target live broadcast room is high. By pre-caching the book resources of the books promoted in the target live broadcast room, the probability that the resource request hits the pre-cached book resources can be higher. In this way, when the electronic device receives a large number of resource requests in a short period of time, the number of resource requests that hit the pre-cached book resources is relatively large, which can effectively reduce the proportion of resource requests that need to download book resources from the book resource library, thereby further improving the problem of electronic devices being paralyzed when facing a large number of resource requests received in a short period of time.
[0058] Specifically, at least one ranking list may be set in the application applet, wherein the books ranked higher than a preset ranking threshold may include books ranked higher than the preset ranking threshold in at least one ranking list.
[0059] For example, books ranked higher than a preset ranking threshold may include at least one of books ranked higher than a preset ranking threshold in a weekly best-selling list, books ranked higher than a preset ranking threshold in a site-wide hot list, books ranked higher than a preset ranking threshold in a well-received list, books ranked higher than a preset ranking threshold in a special price list, and books ranked higher than a preset ranking threshold in a romance film and television list, etc., but is not limited thereto.
[0060] It should be noted that the specific value of the preset ranking threshold can be set by those skilled in the art according to actual conditions and is not limited here.
[0061] It is understandable that after logging into the application Xiaocheng, if the user does not have a clear book he wants to read, he will usually select the books he is interested in from various rankings. Therefore, by pre-caching the book resources of books ranked higher than the preset ranking threshold, the probability of resource requests hitting the pre-cached book resources can be higher. In this way, when the electronic device receives a large number of resource requests in a short period of time, the number of resource requests that hit the pre-cached book resources is relatively large, which can effectively reduce the proportion of resource requests that need to download book resources from the book resource library, thereby further improving the problem of electronic devices being paralyzed when facing a large number of resource requests received in a short period of time.
[0062] Specifically, the application applet client can count the reading volume of each book in at least one period dimension. Among them, the books with reading volume higher than the preset reading volume threshold may include books with reading volume higher than the preset ranking threshold corresponding to the period dimension in at least one period dimension.
[0063] For example, the preset reading volume threshold may include a daily preset reading volume threshold, a weekly preset reading volume threshold, and / or a monthly preset reading volume threshold; accordingly, books with a reading volume higher than the preset reading volume threshold may include at least one of books with a daily reading volume higher than the daily preset reading volume threshold, books with a weekly reading volume higher than the weekly preset reading volume threshold, books with a monthly reading volume higher than the monthly preset reading volume threshold, etc., but is not limited to this.
[0064] It should be noted that the period duration corresponding to each period dimension can be set by those skilled in the art according to actual conditions, and is not limited to the day, week, and month in the above examples. In addition, the specific value of the preset reading volume threshold can be set by those skilled in the art according to actual conditions, and is not limited here.
[0065] It is understandable that after logging into the application, if the user does not have a clear book he wants to read, he will usually choose the books of interest from the books with higher reading volume. Therefore, by pre-caching book resources with a reading volume higher than the preset reading volume threshold, the probability of resource requests hitting the pre-cached book resources can be higher. In this way, when the electronic device receives a large number of resource requests in a short period of time, the number of resource requests that hit the pre-cached book resources is relatively large, which can effectively reduce the proportion of resource requests that need to download book resources from the book resource library, thereby further improving the problem of electronic devices being paralyzed when facing a large number of resource requests received in a short period of time.
[0066] In some embodiments, downloading book resources of a portion of a book from a book resource library may include: downloading book resources of all chapters of the portion of the book.
[0067] Specifically, for each book in the partial books, book resources of all chapters thereof are downloaded in advance.
[0068] It can be understood that by setting up the download of book resources for all chapters of some books, when a user wants to read any chapter of any book in some books, the electronic device can detect the pre-cached book resources corresponding to the chapter the user wants to read, and send it to the application applet client (that is, the electronic device can directly retrieve resources from the cache), which can not only improve the response speed, but also effectively reduce the proportion of resource requests that need to download book resources from the book resource library when the electronic device receives a large number of resource requests in a short period of time, thereby reducing the risk of paralysis of the electronic device.
[0069] It should be noted that according to the characteristics of live streaming sales, assuming that user behavior is concentrated in a short period of time, the books read by users are generally some of the books promoted by the live broadcast, which is unlikely to be too scattered. They should be concentrated on some books. Therefore, these books should be cached in advance, and the promoted books on the homepage of the mini program should be preheated in advance (preheat the first three chapters of each book) to increase the user's cache hit rate, thereby reducing disk IO pressure, and can also be more conducive to improving the response performance of electronic devices.
[0070] In some other embodiments, downloading book resources of a portion of a book from a book resource library includes: downloading book resources of a first preset number of chapters of the portion of the book.
[0071] Specifically, usually, a chapter in a book corresponds to a book resource. For example, the first chapter in a book corresponds to a book resource, the second chapter in a book corresponds to another book resource, the third chapter in a book corresponds to another book resource, and so on. Different chapters in a book correspond to different book resources.
[0072] Specifically, for each book in the partial books, book resources of a preset number of chapters are pre-downloaded, that is, book resources of a partial chapter of the book are pre-downloaded.
[0073] It should be noted that the specific value of the preset number can be set by those skilled in the art according to actual conditions and is not limited here. For example, if the preset number is 3, then for each book in the part of books, the book resources of the first chapter, the second chapter, and the third chapter are pre-downloaded.
[0074] It is understandable that when a user wants to start reading a book, he or she usually starts reading from the beginning (such as the introduction or the first chapter). Therefore, by downloading the book resources of the first preset number of chapters of some books, the probability of resource requests hitting the pre-cached book resources can be increased. In this way, when the electronic device faces a large number of resource requests in a short period of time, the proportion of resource requests that need to download book resources from the book resource library can be effectively reduced, thereby reducing the risk of electronic equipment paralysis. In addition, it can also reduce the occupation of the local memory of the electronic device, which is conducive to pre-caching the book resources of a larger number of books, and further improve the probability of resource requests hitting the pre-cached book resources.
[0075] Figure 2 The flowchart of another resource distribution method provided by the embodiment of the present disclosure is shown. The embodiment of the present disclosure is optimized on the basis of the above embodiment, and the embodiment of the present disclosure can be combined with various optional solutions in one or more of the above embodiments.
[0076] like Figure 2 As shown, the resource distribution method may include the following steps.
[0077] S210: Obtain predicted live broadcast room access parameters.
[0078] Among them, the live broadcast room access parameters include the peak number of people in the live broadcast room, conversion rate and miss cache coefficient.
[0079] In an embodiment of the present disclosure, before providing services to an application mini-program client, the electronic device may first obtain predicted live room access parameters in order to determine the predicted visit volume corresponding to the predicted live room access parameters.
[0080] Specifically, the peak number of people in the live broadcast room is the peak number of people who are online at the same time in the live broadcast room.
[0081] Accordingly, the predicted live broadcast room access parameters include the predicted peak number of people in the live broadcast room for the target live broadcast room.
[0082] In some embodiments, for any live broadcast room, the peak number of people in the historical live broadcast room can be determined as the predicted peak number of people in the live broadcast room; or, a certain margin can be set, that is, the sum of the peak number of people in the historical live broadcast room and the preset margin is determined as the predicted peak number of people in the live broadcast room. It should be noted that the specific value of the preset margin can be set by those skilled in the art according to actual conditions and is not limited here.
[0083] Specifically, the conversion rate can be the product of the first conversion rate and the second conversion rate. Among them, the first conversion rate is the conversion rate of clicking into the application applet, which generally refers to the proportion of users who open the application applet link after entering the live broadcast room. For example, 1 out of 10 users who watched the live broadcast clicked on the application applet link and entered the application applet homepage, then the first conversion rate is 10%. The second conversion rate is the conversion rate from the application applet homepage to the reading page, which generally refers to the proportion of users who clicked on the book content after entering the application applet homepage. For example, 1 out of 10 users who visited the homepage clicked on the book content, then the second conversion rate is 10%.
[0084] Accordingly, the predicted live broadcast room access parameters include a predicted conversion rate for the target live broadcast room.
[0085] In some embodiments, for any live broadcast room, the conversion rate of the third-party application associated with the application applet can be determined as the predicted conversion rate. Specifically, the application applet can be associated with a third-party application, and the conversion rate from the user opening the third-party application to the user clicking on the book is determined as the predicted conversion rate.
[0086] It is understandable that users download market versions of third-party applications usually because they want to read a book in the third-party application, and the user may enter the application mini-program by accidentally touching the link of the target live broadcast room. Therefore, in fact, the conversion rate of the third-party application is greater than the conversion rate of the target live broadcast room. If the predicted access value determined by using the higher conversion rate of the third-party application as the predicted conversion rate does not exceed the access value threshold, it further indicates that the electronic device can withstand the access pressure of a large number of resource requests in a short period of time due to the placement of the link of the application mini-program in the target live broadcast room.
[0087] Specifically, the miss cache coefficient can be used to characterize the coefficient of missing pre-cached book resources. Because, when the same book in the cache is viewed by users, the increase in the number of users will not put pressure on the disk IO of the electronic device. For example, if 5 out of 10 users who clicked on the book content clicked on the book content of the book that was not pre-cached, the miss cache coefficient is 0.5.
[0088] Accordingly, the predicted live room access parameters include a predicted miss cache coefficient for the target live room.
[0089] In some embodiments, the predicted miss cache coefficient can be determined based on the characteristics of the live broadcast room promotion application mini program.
[0090] Specifically, the live broadcast promotion application has the following characteristics: 1) According to the characteristics of live broadcasting, the user's behavior is short-term and concentrated; 2) Users are unlikely to read books too dispersedly, and should focus on a few books, so some pre-cached book resources will be hit. Based on this, the predicted miss cache coefficient can be determined to be 0.5.
[0091] S220. Based on the first association relationship, determine the predicted number of visits corresponding to the predicted live room access parameters.
[0092] Among them, the first correlation relationship is the correlation relationship between the live broadcast room access parameters and the predicted visit volume.
[0093] In the disclosed embodiment, after obtaining the predicted live room access parameters, the electronic device can determine the predicted visit volume corresponding to the predicted live room access parameters based on the first association relationship.
[0094] Specifically, the predicted access volume is used to represent the predicted value of resource requests received by the electronic device and which do not hit the pre-cached book resources within a unit time.
[0095] Specifically, the specific form of the first association relationship may include a formula, a relationship curve, a mapping table, etc., but is not limited thereto.
[0096] In some embodiments, the first correlation relationship is: QPS=KOL×C×M; wherein KOL is the predicted peak number of people in the live broadcast room, C is the conversion rate, and M is the miss cache coefficient.
[0097] For example, the predicted peak number of people in the live broadcast room is 5,000, the predicted conversion rate is 1%, and the predicted miss cache coefficient is 0.5, then QPS = 5,000 × 1% × 0.5 = 25.
[0098] S230: When the predicted number of visits is less than a preset number of visits threshold, receiving a resource request sent by the application applet client.
[0099] In the disclosed embodiment, when the predicted access volume is less than the preset access volume threshold, it indicates that the electronic device can withstand the access pressure of a large number of resource requests in a short period of time caused by the link of the application applet being placed in the target live broadcast room, that is, the risk of the electronic device being paralyzed is relatively small. At this time, the link of the application applet can be placed in the target live broadcast room. In this way, when the user enters the application applet through the link and clicks on the book content, the electronic device can receive the resource request sent by the application applet client.
[0100] It should be noted that the preset access volume threshold can be determined by those skilled in the art according to the performance parameters of the electronic device and is not limited here.
[0101] In some embodiments, the electronic device only receives the resource request sent by the application applet client, that is, the electronic device only undertakes the service of the application applet. At this time, the preset access volume threshold can be any value less than the access volume limit value.
[0102] Specifically, the access volume limit value is a limit value of resource requests that the electronic device can withstand within a unit time and that do not hit the pre-cached book resources.
[0103] For example, the access limit value of the electronic device is 400, and the preset access threshold value may be 300. When the predicted access is 25, the predicted access is less than the preset access threshold value, and at this time, the link of the application applet may be placed in the target live broadcast room.
[0104] In other embodiments, the electronic device can receive resource requests sent by the application applet client and resource requests sent by the third-party application client associated with the application applet, that is, the electronic device can undertake the services of both the application applet client and the third-party application client associated with the application applet. At this time, the preset access volume threshold can be determined based on the access volume limit value and the access volume corresponding to the third-party application client.
[0105] Specifically, the access volume corresponding to the third-party application client is the number of resource requests sent by the third-party application client to the electronic device within a unit time.
[0106] In one example, the total number of resource requests sent by the third-party application client to the electronic device within a preset time period may be divided by the preset time period to determine the access volume corresponding to the third-party application client.
[0107] In another example, the maximum value of the number of resource requests sent by the third application client to the electronic device in each unit time is determined as the access volume corresponding to the third-party application client.
[0108] Specifically, the preset access volume threshold may be any value that is smaller than the difference between the access volume limit value and the access volume corresponding to the third-party application client.
[0109] For example, the access limit value of the electronic device is 400, the access corresponding to the third-party application client is 200, and the difference between the access limit value and the access corresponding to the third-party application client is 200. At this time, the preset access threshold value may be 100. When the predicted access is 25, the predicted access is less than the preset access threshold value. At this time, the link of the application applet may be placed in the target live broadcast room.
[0110] S240: In response to the resource request, detecting whether a book resource corresponding to the resource request is pre-cached.
[0111] Specifically, S240 is similar to S120 and will not be described in detail here.
[0112] S250: When it is detected that a book resource corresponding to the resource request is pre-cached, the pre-cached book resource is sent to the application applet client.
[0113] Specifically, S240 is similar to S130 and will not be described in detail here.
[0114] The resource distribution method provided by the embodiment of the present disclosure is arranged to place the link of the application mini-program in the target live broadcast room when the predicted number of visits is less than the preset number of visits threshold. This ensures that even if a large number of users log in to the application mini-program through the link in a short period of time, causing the electronic device to receive a large number of resource requests in a short period of time, paralysis will not occur.
[0115] In another embodiment of the present disclosure, S210 may include: S2110, obtaining the actual conversion rate and the actual miss cache coefficient of the test live broadcast room; S2130, using the actual conversion rate as the predicted conversion rate, and using the actual miss cache coefficient as the predicted miss cache coefficient.
[0116] Specifically, the test live broadcast room can be any live broadcast room in the testing phase.
[0117] Optionally, the test parameters of the test live broadcast room are smaller than the test parameters of the target live broadcast room, wherein the test parameters include the peak number of people in the live broadcast room or the advertising cost investment in the live broadcast room. In this way, after the link of the application applet is placed in the test live broadcast room, fewer users enter the application applet through the link, and accordingly, fewer users further click on the book content in the application applet client, so the electronic device receives fewer resource requests sent by the application applet client in a short period of time, which will not cause the electronic device to be paralyzed.
[0118] Specifically, after placing the link of the application mini-program in the test live broadcast room, the application mini-program client can count the number of users who enter the application mini-program through the link (referred to as the first user number), and can also count the number of users who enter the application mini-program through the link and further click on the book content (referred to as the second user number).
[0119] In some embodiments, the electronic device can receive the peak number of people in the test live broadcast room, the number of first users, and the number of second users of the test live broadcast room sent by the application mini-program client; the actual first conversion rate of the test live broadcast room can be determined based on the peak number of people in the test live broadcast room and the first number of users, and the actual second conversion rate of the test live broadcast room can be determined based on the first number of users and the second number of users; the product of the actual first conversion rate and the second conversion rate of the test live broadcast room is determined as the actual conversion rate of the test live broadcast room.
[0120] In other embodiments, the application applet client can determine the actual conversion rate of the test live broadcast room based on the peak number of people in the test live broadcast room, the number of first users, and the number of second users, and send the actual conversion rate of the test live broadcast room to the electronic device. It should be noted that the specific implementation method of the application applet client determining the actual conversion rate of the test live broadcast room is similar to the specific implementation method of the electronic device determining the actual conversion rate of the test live broadcast room, which will not be repeated here.
[0121] Specifically, the electronic device may count the number of resource requests sent by the application applet client (referred to as the first resource request number) and the number of resource requests that do not hit the pre-cached book resources (referred to as the second resource request number).
[0122] In some embodiments, the electronic device may divide the second resource request quantity by the first resource request quantity to obtain an actual miss cache coefficient of the test live broadcast room.
[0123] In other embodiments, the application mini-program client can receive a first resource request number and a second resource request number sent by an electronic device; divide the second resource request number by the first resource request number to obtain an actual miss cache coefficient of the test live broadcast room; and send the actual miss cache coefficient of the test live broadcast room to the electronic device.
[0124] Specifically, the electronic device can use the actual conversion rate of the test live room as the predicted conversion rate of the target live room, and use the actual miss cache coefficient of the test live room as the predicted miss cache coefficient of the target live room.
[0125] It can be understood that by setting the actual conversion rate as the predicted conversion rate and the actual miss cache coefficient as the predicted miss cache coefficient, the preset conversion rate and the predicted miss cache coefficient can be closer to the actual conversion rate and the actual miss cache coefficient, thereby making the predicted visits subsequently estimated through the first association relationship more accurate.
[0126] In another embodiment of the present disclosure, before S2130, the method also includes: S2123, detecting whether the test parameters of the test live broadcast room are greater than the preset test parameter threshold; S2124, when it is detected that the test parameters of the test live broadcast room are less than the preset test parameter threshold, replacing the live broadcast room with a larger test parameter as the test live broadcast room, and returning to execute the step of obtaining the actual conversion rate and the actual miss cache coefficient of the test live broadcast room until the test parameters of the test live broadcast room are equal to the preset test parameter threshold; wherein, S2130 includes: using the actual conversion rate of the live broadcast room finally replaced as the predicted conversion rate, and the actual miss cache coefficient as the predicted miss cache coefficient.
[0127] Specifically, the test parameters include the peak number of people in the live broadcast room or the advertising cost investment in the live broadcast room.
[0128] It should be noted that the specific value of the preset test parameter threshold can be set by those skilled in the art according to actual conditions and is not limited here. For example, when the test parameter includes the peak number of people in the live broadcast room, the preset test parameter threshold is close to or equal to the peak number of people in the live broadcast room of the target live broadcast room.
[0129] Optionally, the method also includes: S2121, obtaining the actual number of visits to the test live broadcast room; S2122, detecting whether the actual number of visits to the test live broadcast room is less than a preset number of visits threshold; wherein, S2124 may include: when it is detected that the test parameters of the test live broadcast room are less than the preset test parameter threshold and the actual number of visits to the test live broadcast room is less than the preset number of visits threshold, replacing a live broadcast room with a larger test parameter as the test live broadcast room, and returning to execute the step of obtaining the actual conversion rate and the actual miss cache coefficient of the test live broadcast room.
[0130] Specifically, the electronic device can also count the number of resource requests of the test live broadcast room that do not hit the pre-cached book resources within a unit time, that is, the actual number of visits to the test live broadcast room.
[0131] In one example, the actual number of visits to the test live broadcast room can be determined by dividing the number of resource requests that do not hit pre-cached book resources sent by the application applet client to the electronic device during the test by the test duration corresponding to the test process.
[0132] In another example, during the test, the maximum number of resource requests that the application applet client sends to the electronic device in each unit time and that do not hit the pre-cached book resources is determined as the actual number of visits to the test live broadcast room.
[0133] Specifically, when replacing a live broadcast room with a larger test parameter as a test live broadcast room, the test parameters of the live broadcast room to be replaced can be determined based on the actual number of visits to the test live broadcast room, but it is not limited to this.
[0134] It can be understood that when it is detected that the test parameters of the test live broadcast room are less than the preset test parameter threshold and the actual number of visits to the test live broadcast room is less than the preset number of visits threshold, then replacing it with a live broadcast room with a larger test parameter as the test live broadcast room can avoid replacing it with a live broadcast room with a larger test parameter as the test live broadcast room for the next test when the actual number of visits to the current test live broadcast room has exceeded the preset number of visits threshold, thereby preventing the problem of electronic equipment paralysis caused by replacing a live broadcast room with a larger test parameter.
[0135] In one example, in the first test, the actual conversion rate and the actual miss cache coefficient of the test live broadcast room are obtained; the actual visits to the test live broadcast room are obtained; it is detected whether the actual visits to the test live broadcast room are less than the preset visit volume threshold; it is detected whether the test parameters of the test live broadcast room are greater than the preset test parameter threshold; when it is detected that the test parameters of the test live broadcast room are less than the preset test parameter threshold and the actual visits to the test live broadcast room are less than the preset visit volume threshold, the live broadcast room with a larger test parameter is replaced as the test live broadcast room. In the second test, the actual conversion rate and the actual miss cache coefficient of the replaced test live broadcast room are obtained; the actual visits to the replaced test live broadcast room are obtained; it is detected whether the actual visits to the replaced test live broadcast room are less than the preset visit volume threshold; it is detected whether the test parameters of the replaced test live broadcast room are greater than the preset test parameter threshold; when it is detected that the test parameters of the replaced test live broadcast room are less than the preset test parameter threshold and the actual visits to the replaced test live broadcast room are less than the preset visit volume threshold, the live broadcast room with a larger test parameter is continued to be replaced as the test live broadcast room, and so on, until the test parameters of the replaced test live broadcast room are equal to the preset test parameter threshold. Then, the actual conversion rate of the live broadcast room that is finally replaced is used as the predicted conversion rate, and the actual miss cache coefficient is used as the predicted miss cache coefficient.
[0136] It is understandable that by gradually replacing the live broadcast room with a larger test parameter as the test live broadcast room, it is possible to avoid the problem that after the link of the application applet is directly placed in the test live broadcast room with a larger test parameter, the electronic device is paralyzed due to receiving a large number of resource requests sent by the application applet client in a short period of time. In addition, by setting the actual conversion rate of the live broadcast room that is finally replaced as the predicted conversion rate and the actual miss cache coefficient as the predicted miss cache coefficient, the preset conversion rate and the predicted miss cache coefficient can be further made closer to the actual conversion rate and the actual miss cache coefficient, thereby making the predicted visit volume estimate more accurate.
[0137] In another embodiment of the present disclosure, the method further includes: when it is detected that the book resource corresponding to the resource request is not cached, obtaining the current access volume; when the current access volume is greater than a preset access volume threshold, sending a prompt message to the application applet client; wherein the prompt message is used to guide the user to download a third-party application associated with the application applet; when the current access volume is less than or equal to the preset access volume threshold, downloading the book resource corresponding to the resource request from the book resource library, and sending the downloaded book resource to the application applet client.
[0138] Specifically, the current access volume is the number of resource requests that do not hit pre-cached book resources received by the electronic device within a unit time after the link of the application applet is put into the target live broadcast room.
[0139] It is understandable that when the current access volume is greater than the preset access volume threshold, it indicates that the disk IO pressure of the electronic device is relatively large and the risk of paralysis is relatively high. At this time, the electronic device may not download the book resource corresponding to the resource request from the book resource library, but send a prompt message to the application applet client to reduce the disk IO pressure of the electronic device and guide the user to download the third-party application.
[0140] It is also understandable that when the current access volume is less than or equal to the preset access volume threshold, it indicates that the disk IO pressure of the electronic device is relatively small and the risk of paralysis is relatively small. At this time, the electronic device can download the book resource corresponding to the resource request from the book resource library to meet the user's reading needs.
[0141] It should be noted that the electronic device can also obtain the current access volume in real time, and send a prompt message to the application applet client when the current access volume is greater than the preset access volume threshold; when the current access volume is less than or equal to the preset access volume threshold, download the book resource corresponding to the resource request from the book resource library, and send the downloaded book resource to the application applet client. In this way, when the disk IO pressure of the electronic device is large, the disk IO pressure of the electronic device can be relieved in time, reducing the risk of paralysis of the electronic device.
[0142] In another embodiment of the present disclosure, the electronic device includes a first resource server and a second resource server, the first resource server serves an application applet client, and the second resource server serves a third-party application client, and the third-party application client is used to run a third-party application associated with the application applet.
[0143] Specifically, the domain name corresponding to the application applet client is different from the domain name corresponding to the third-party application client. In this way, the service for obtaining book resources for the application applet client can be deployed on an independent first resource server, isolated from the second resource server serving the third-party application client.
[0144] It is understandable that by deploying the service for obtaining book resources for the application mini-program client on an independent first resource server, it can not only prevent the application mini-program client from grabbing the bandwidth of the third-party application, but also avoid affecting the business of the third-party application client when the first resource server is paralyzed.
[0145] Figure 3 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown.
[0146] The electronic device provided in the embodiments of the present disclosure can provide services for the application applet client, wherein the electronic device can be a cloud server or a server cluster or other device with storage and computing functions, etc., which is not limited to this.
[0147] It should be noted that Figure 3 The electronic device 300 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0148] The electronic device 300 conventionally includes a processor 310 and a computer program product or computer-readable medium in the form of a memory 320. The memory 320 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 320 has a storage space 321 for executable instructions (or program codes) 3211 for executing any method steps in the above-mentioned resource distribution method. For example, the storage space 321 for executable instructions may include individual executable instructions 3211 respectively used to implement various steps in the above-mentioned resource distribution method. These executable instructions may be read from or written to one or more computer program products. These computer program products include program code carriers such as a hard disk, a compact disk (CD), a memory card or a floppy disk. Such a computer program product is typically a portable or fixed storage unit. The storage unit may have a storage device 3211 having a storage device 3212 configured to store and store the executable instructions. Figure 3 The memory 320 in the electronic device 300 is similarly arranged as a storage segment or storage space. The executable instructions may be compressed, for example, in an appropriate form. Generally, the storage unit includes executable instructions for executing the steps of the resource distribution method according to the present disclosure, that is, codes that can be read by a processor such as the processor 310, and when these codes are executed by the electronic device 300, the electronic device 300 executes the various steps in the resource distribution method described above.
[0149] Of course, to simplify, Figure 3 Only some of the components related to the present disclosure in the electronic device 300 are shown, and components such as a bus, an input / output interface, an input device, an output device, etc. are omitted. In addition, according to specific application situations, the electronic device 300 may also include any other appropriate components.
[0150] The embodiments of the present disclosure further provide a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the resource distribution method provided by each embodiment of the present disclosure.
[0151] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0152] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0153] In the embodiments of the present disclosure, the program code for performing the operations of the present disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0154] This application discloses:
[0155] 1A. A resource distribution method, comprising:
[0156] Receiving a resource request sent by an application applet client; wherein the application applet is running on the application applet client;
[0157] In response to the resource request, detecting whether a book resource corresponding to the resource request is pre-cached;
[0158] When it is detected that the book resource corresponding to the resource request is pre-cached, the pre-cached book resource is sent to the application applet client.
[0159] 2A. The method according to 1A, wherein before detecting whether a book resource corresponding to the resource request is pre-cached in response to the resource request, the method further comprises:
[0160] Downloading book resources of some books from the book resource library; the some books include books promoted in the target live broadcast room, books ranked higher than a preset ranking threshold, or books with a reading volume higher than a preset reading volume threshold;
[0161] The book resources of the partial books are cached.
[0162] 3A. The method according to 2A, wherein downloading book resources of some books from a book resource library comprises:
[0163] Download the book resources of the first preset number of chapters of the partial book.
[0164] 4A. The method according to 1A, wherein before receiving the resource request sent by the application applet client, the method further includes:
[0165] Obtain predicted live broadcast room access parameters; wherein the live broadcast room access parameters include the peak number of people in the live broadcast room, the conversion rate, and the miss cache coefficient;
[0166] Based on the first association relationship, the predicted access volume corresponding to the predicted live room access parameter is determined; wherein the first association relationship is the association relationship between the live room access parameter and the predicted access volume; the predicted access volume is used to represent the predicted value of resource requests that do not hit the pre-cached book resources within a unit time;
[0167] The receiving of a resource request sent by the application applet client includes:
[0168] When the predicted access volume is less than a preset access volume threshold, a resource request sent by the application applet client is received.
[0169] 5A. The method according to 4A, wherein obtaining the predicted live room access parameters comprises:
[0170] Obtain the actual conversion rate and actual cache miss coefficient of the test live broadcast room;
[0171] The actual conversion rate is used as the predicted conversion rate, and the actual cache miss coefficient is used as the predicted cache miss coefficient.
[0172] 6A. The method according to 5A, wherein before using the actual conversion rate as the preset conversion rate and using the actual miss cache coefficient as the predicted miss cache coefficient, the method further comprises:
[0173] Detecting whether a test parameter of the test live broadcast room is greater than a preset test parameter threshold;
[0174] When it is detected that the test parameter of the test live broadcast room is less than the preset test parameter threshold, a live broadcast room with a larger test parameter is replaced as the test live broadcast room, and the step of obtaining the actual conversion rate and the actual miss cache coefficient of the test live broadcast room is returned to execute until the test parameter of the test live broadcast room is equal to the preset test parameter threshold;
[0175] The method of using the actual conversion rate as the preset conversion rate and using the actual miss cache coefficient as the predicted miss cache coefficient includes:
[0176] The actual conversion rate of the live broadcast room that is finally replaced is used as the predicted conversion rate, and the actual miss cache coefficient is used as the predicted miss cache coefficient.
[0177] 7A. The method according to 1A, wherein the method further comprises:
[0178] When it is detected that the book resource corresponding to the resource request is not cached, the current access volume is obtained;
[0179] When the current page views are greater than a preset page view threshold, a prompt message is sent to the application applet client; wherein the prompt message is used to guide the user to download a third-party application associated with the application applet;
[0180] When the current page views are less than or equal to the preset page view threshold, the book resource corresponding to the resource request is downloaded from a book resource library, and the downloaded book resource is sent to the application applet client.
[0181] 8A. The method according to 1A, wherein the first resource server serves the application applet client, and the second resource server serves a third-party application client, and the third-party application client is used to run a third-party application associated with the application applet.
[0182] 9B. An electronic device, comprising a processor and a memory, wherein the memory is used to store executable instructions, and the executable instructions enable the processor to perform the following operations:
[0183] Receiving a resource request sent by an application applet client; wherein the application applet is running on the application applet client;
[0184] In response to the resource request, detecting whether a book resource corresponding to the resource request is pre-cached;
[0185] When it is detected that the book resource corresponding to the resource request is pre-cached, the pre-cached book resource is sent to the application applet client.
[0186] 10B. The electronic device according to 9B, wherein before the processor executes the step of responding to the resource request and detecting whether a book resource corresponding to the resource request is pre-cached, the executable instructions further cause the processor to execute:
[0187] Downloading book resources of some books from the book resource library; the some books include books promoted in the target live broadcast room, books ranked higher than a preset ranking threshold, or books with a reading volume higher than a preset reading volume threshold;
[0188] The book resources of the partial books are cached.
[0189] in
[0190] 11B. The electronic device according to 10B, wherein when the processor executes the downloading of book resources of some books from the book resource library, the executable instruction specifically causes the processor to execute:
[0191] Download the book resources of the first preset number of chapters of the partial book.
[0192] 12B. The electronic device according to 9B, wherein before the processor executes the receiving of the resource request sent by the application applet client, the executable instructions further cause the processor to execute:
[0193] Obtain predicted live broadcast room access parameters; wherein the live broadcast room access parameters include the peak number of people in the live broadcast room, the conversion rate, and the miss cache coefficient;
[0194] Based on the first association relationship, the predicted access volume corresponding to the predicted live room access parameter is determined; wherein the first association relationship is the association relationship between the live room access parameter and the predicted access volume; the predicted access volume is used to represent the predicted value of resource requests that do not hit the pre-cached book resources within a unit time;
[0195] The receiving of a resource request sent by the application applet client includes:
[0196] When the predicted access volume is less than a preset access volume threshold, a resource request sent by the application applet client is received.
[0197] 13B. The electronic device according to 12B, wherein, when the processor executes the step of obtaining the predicted question parameter, the executable instruction specifically causes the processor to execute:
[0198] Obtain the actual conversion rate and actual cache miss coefficient of the test live broadcast room;
[0199] The actual conversion rate is used as the predicted conversion rate, and the actual cache miss coefficient is used as the predicted cache miss coefficient.
[0200] 14B. The electronic device according to 13B, wherein before the processor executes the steps of using the actual conversion rate as the preset conversion rate and using the actual miss cache coefficient as the predicted miss cache coefficient, the executable instructions further cause the processor to execute:
[0201] Detecting whether a test parameter of the test live broadcast room is greater than a preset test parameter threshold;
[0202] When it is detected that the test parameter of the test live broadcast room is less than the preset test parameter threshold, a live broadcast room with a larger test parameter is replaced as the test live broadcast room, and the step of obtaining the actual conversion rate and the actual miss cache coefficient of the test live broadcast room is returned to execute until the test parameter of the test live broadcast room is equal to the preset test parameter threshold;
[0203] The method of using the actual conversion rate as the preset conversion rate and using the actual miss cache coefficient as the predicted miss cache coefficient includes:
[0204] The actual conversion rate of the live broadcast room that is finally replaced is used as the predicted conversion rate, and the actual miss cache coefficient is used as the predicted miss cache coefficient.
[0205] 15B. The electronic device according to 9B, wherein the executable instructions further cause the processor to execute:
[0206] When it is detected that the book resource corresponding to the resource request is not cached, the current access volume is obtained;
[0207] When the current page views are greater than a preset page view threshold, a prompt message is sent to the application applet client; wherein the prompt message is used to guide the user to download a third-party application associated with the application applet;
[0208] When the current page views are less than or equal to the preset page view threshold, the book resource corresponding to the resource request is downloaded from a book resource library, and the downloaded book resource is sent to the application applet client.
[0209] 16B. The electronic device according to 9B, wherein the electronic device comprises a first resource server and a second resource server;
[0210] The first resource server serves the application applet client, and the second resource server serves a third-party application client, wherein the third-party application client is used to run a third-party application associated with the application applet.
[0211] 17C. A computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the resource distribution method described in any one of 1-8A above.
[0212] The various component embodiments of the present disclosure can be implemented in hardware in all or part of the steps, or implemented in software modules running on one or more processors, or implemented in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components in the electronic device according to the embodiments of the present disclosure. The present disclosure can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present disclosure can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0213] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0214] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0215] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A resource distribution method, characterized in that: include: Receiving a resource request sent by an application applet client; wherein the application applet is running on the application applet client; In response to the resource request, detecting whether a book resource corresponding to the resource request is pre-cached; When it is detected that the book resource corresponding to the resource request is pre-cached, sending the pre-cached book resource to the application applet client; Before receiving the resource request sent by the application applet client, the method further includes: Obtain predicted live broadcast room access parameters; wherein the live broadcast room access parameters include the peak number of people in the live broadcast room, the conversion rate, and the miss cache coefficient, the conversion rate is the product of a first conversion rate and a second conversion rate, the first conversion rate is the ratio of the number of users who open the application applet link after entering the live broadcast room to the number of users who enter the live broadcast room, the second conversion rate is the ratio of the number of users who click on the book content after entering the application applet homepage to the number of users who enter the application applet, or the conversion rate refers to the conversion rate from users opening a third-party application associated with the application applet to users clicking on the book; Based on the first association relationship, the predicted access volume corresponding to the predicted live room access parameter is determined; wherein the first association relationship is the association relationship between the live room access parameter and the predicted access volume, and the predicted access volume is the product of the peak number of people in the live room, the conversion rate, and the miss cache coefficient; the predicted access volume is used to represent the predicted value of resource requests that miss pre-cached book resources within a unit time; The receiving of a resource request sent by the application applet client includes: When the predicted access volume is less than a preset access volume threshold, a resource request sent by the application applet client is received.
2. The method according to claim 1, characterized in that Before detecting, in response to the resource request, whether a book resource corresponding to the resource request is pre-cached, the method further includes: Downloading book resources of some books from the book resource library; the some books include books promoted in the target live broadcast room, books ranked higher than a preset ranking threshold, or books with a reading volume higher than a preset reading volume threshold; The book resources of the partial books are cached.
3. The method according to claim 2, characterized in that The book resources of downloading some books from the book resource library include: Download the book resources of the first preset number of chapters of the partial book.
4. The method according to claim 1, characterized in that: in, The step of obtaining the predicted live broadcast room access parameters includes: Obtain the actual conversion rate and actual cache miss coefficient of the test live broadcast room; The actual conversion rate is used as the predicted conversion rate, and the actual cache miss coefficient is used as the predicted cache miss coefficient.
5. The method according to claim 4, characterized in that Before using the actual conversion rate as the preset conversion rate and using the actual miss cache coefficient as the predicted miss cache coefficient, the method further includes: Detecting whether a test parameter of the test live broadcast room is greater than a preset test parameter threshold; When it is detected that the test parameter of the test live broadcast room is less than the preset test parameter threshold, a live broadcast room with a larger test parameter is replaced as the test live broadcast room, and the step of obtaining the actual conversion rate and the actual miss cache coefficient of the test live broadcast room is returned to execute until the test parameter of the test live broadcast room is equal to the preset test parameter threshold; The method of using the actual conversion rate as the preset conversion rate and using the actual miss cache coefficient as the predicted miss cache coefficient includes: The actual conversion rate of the live broadcast room that is finally replaced is used as the predicted conversion rate, and the actual miss cache coefficient is used as the predicted miss cache coefficient.
6. The method according to claim 1, characterized in that The method further comprises: When it is detected that the book resource corresponding to the resource request is not cached, the current access volume is obtained; When the current page views are greater than a preset page view threshold, a prompt message is sent to the application applet client; wherein the prompt message is used to guide the user to download a third-party application associated with the application applet; When the current page views are less than or equal to the preset page view threshold, the book resource corresponding to the resource request is downloaded from a book resource library, and the downloaded book resource is sent to the application applet client.
7. The method according to claim 1, characterized in that The first resource server serves the application applet client, and the second resource server serves a third-party application client, wherein the third-party application client is used to run a third-party application associated with the application applet.
8. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory is used to store executable instructions, and the executable instructions enable the processor to perform the following operations: Receiving a resource request sent by an application applet client; wherein the application applet is running on the application applet client; In response to the resource request, detecting whether a book resource corresponding to the resource request is pre-cached; When it is detected that the book resource corresponding to the resource request is pre-cached, sending the pre-cached book resource to the application applet client; Before the processor executes the step of receiving the resource request sent by the application applet client, the executable instruction further causes the processor to execute: Obtain predicted live broadcast room access parameters; wherein the live broadcast room access parameters include the peak number of people in the live broadcast room, the conversion rate, and the miss cache coefficient, the conversion rate is the product of a first conversion rate and a second conversion rate, the first conversion rate is the ratio of the number of users who open the application applet link after entering the live broadcast room to the number of users who enter the live broadcast room, the second conversion rate is the ratio of the number of users who click on the book content after entering the application applet homepage to the number of users who enter the application applet, or the conversion rate refers to the conversion rate from users opening a third-party application associated with the application applet to users clicking on the book; Based on the first association relationship, the predicted access volume corresponding to the predicted live broadcast room access parameter is determined; wherein the first association relationship is the association relationship between the live broadcast room access parameter and the predicted access volume, and the predicted access volume is the product of the peak number of people in the live broadcast room, the conversion rate, and the miss cache coefficient; the predicted access volume is used to represent the predicted value of resource requests that miss pre-cached book resources within a unit time; The receiving of a resource request sent by the application applet client includes: When the predicted access volume is less than a preset access volume threshold, a resource request sent by the application applet client is received.
9. The electronic device according to claim 8, characterized in that: Before the processor executes the step of responding to the resource request and detecting whether a book resource corresponding to the resource request is pre-cached, the executable instruction further causes the processor to execute: Downloading book resources of some books from the book resource library; the some books include books promoted in the target live broadcast room, books ranked higher than a preset ranking threshold, or books with a reading volume higher than a preset reading volume threshold; The book resources of the partial books are cached.
10. The electronic device according to claim 9, characterized in that: When the processor executes the downloading of book resources of some books from the book resource library, the executable instruction specifically enables the processor to execute: Download the book resources of the first preset number of chapters of the partial book.
11. The electronic device according to claim 8, characterized in that: in, When the processor executes the step of obtaining the predicted question parameters, the executable instruction specifically causes the processor to execute: Obtain the actual conversion rate and actual cache miss coefficient of the test live broadcast room; The actual conversion rate is used as the predicted conversion rate, and the actual cache miss coefficient is used as the predicted cache miss coefficient.
12. The electronic device according to claim 11, characterized in that: Before the processor executes the steps of using the actual conversion rate as the preset conversion rate and using the actual cache miss coefficient as the predicted cache miss coefficient, the executable instructions further cause the processor to execute: Detecting whether a test parameter of the test live broadcast room is greater than a preset test parameter threshold; When it is detected that the test parameter of the test live broadcast room is less than the preset test parameter threshold, a live broadcast room with a larger test parameter is replaced as the test live broadcast room, and the step of obtaining the actual conversion rate and the actual miss cache coefficient of the test live broadcast room is returned to execute until the test parameter of the test live broadcast room is equal to the preset test parameter threshold; The method of using the actual conversion rate as the preset conversion rate and using the actual miss cache coefficient as the predicted miss cache coefficient includes: The actual conversion rate of the live broadcast room that is finally replaced is used as the predicted conversion rate, and the actual miss cache coefficient is used as the predicted miss cache coefficient.
13. The electronic device according to claim 8, characterized in that: The executable instructions further cause the processor to execute: When it is detected that the book resource corresponding to the resource request is not cached, the current access volume is obtained; When the current page views are greater than a preset page view threshold, a prompt message is sent to the application applet client; wherein the prompt message is used to guide the user to download a third-party application associated with the application applet; When the current page views are less than or equal to the preset page view threshold, the book resource corresponding to the resource request is downloaded from a book resource library, and the downloaded book resource is sent to the application applet client.
14. The electronic device according to claim 8, characterized in that: The electronic device comprises a first resource server and a second resource server; The first resource server serves the application applet client, and the second resource server serves a third-party application client, where the third-party application client is used to run a third-party application associated with the application applet.
15. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the resource distribution method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Network data loading method and device, storage medium and mobile terminal
CN107872523A
Traffic monitoring method and device for application data, computer equipment and medium
CN113986564A