Cache data sending method and device, electronic equipment and computer readable medium

By receiving and managing the cache configuration information of producer users and determining the maximum available memory and the actual memory occupied, the problem of remote dictionary services being unable to limit memory is solved, more efficient data caching and accurate data feedback are achieved, and the performance of cached data and the success rate of data acquisition are improved.

CN116107930BActive Publication Date: 2025-10-17DMALL LIFE (CHINA) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211700439.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-28
Publication Date
2025-10-17
Estimated Expiration
2042-12-28

AI Technical Summary

Technical Problem

In the existing technology, the remote dictionary service cannot limit the maximum available memory of the data provider when caching data, resulting in memory fullness, frequent data caching failures, poor performance, and inability to cope with data acquisition failures caused by changes in the data provider's identity, resulting in low data integrity and success rate.

Method used

By receiving the cache configuration information of the producer user, determining the maximum available memory usage information and the actual memory usage, limiting the data cache range, and updating the memory space when data is requested, it ensures that the data provider operates within the available memory range and achieves accurate data feedback.

Benefits of technology

It reduces the number of times that data providers fail to cache data, improves the performance and integrity of cached data, and increases the query success rate of data retrieval users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116107930B_ABST
    Figure CN116107930B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a cache data sending method and device, electronic equipment and computer readable medium. A specific embodiment of the method comprises: receiving each cache configuration information; determining maximum available memory occupation information based on each cache configuration information; in response to the received data to be cached, determining actual occupied memory; determining the maximum available memory based on the maximum available memory occupation information; determining whether to cache the data to be cached based on the maximum available memory and the actual occupied memory; in response to determining to cache the data to be cached, caching the data to be cached to the occupied memory space; in response to receiving a request sent by a consumer user, determining a target producer user; deleting the target actual occupied memory according to the target producer user and the target cache data; and sending the target cache data to a terminal device of the consumer user. The embodiment reduces the number of times of failure of the data providing user to cache data, and improves the performance of caching data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present disclosure relate to the technical field of computer, and specifically to a cache data sending method and device, electronic equipment and computer readable medium. BACKGROUND

[0002] The data is cached to the memory, so that the user can quickly obtain the required data from the memory. At present, when the data is cached, the commonly used way is to cache the data provided by the data providing user through the remote dictionary service, and when the data obtaining user obtains the data, the cached data of the data providing user is fed back to the data obtaining user.

[0003] However, the inventors have found that when the above-mentioned way is used to cache data, the following technical problems often exist:

[0004] First, when the data providing user continuously caches data and the data is not used by other users, the remote dictionary service cannot limit the maximum available memory of the data providing user, resulting in that the data continuously cached by the data providing user occupies the memory, thereby causing the data providing user to fail to cache data more frequently and the performance of caching data is poor; and the remote dictionary service will clear the expired data when caching the data, resulting in poor data integrity and poor success rate of the data obtaining user querying the data.

[0005] Second, when the data obtaining user obtains the data, the data providing user can only be found through the direct correspondence between the data obtaining user and the data providing user, and when the user identity of the data obtaining user or the data providing user is changed, the corresponding data providing user of the data obtaining user cannot be determined, so that the data cannot be fed back to the data obtaining user. SUMMARY

[0006] The summary of the present disclosure is used to introduce the concepts in a brief form, which will be described in detail in the specific embodiments part. The summary of the present disclosure is not intended to identify the key features or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.

[0007] Some embodiments of the present disclosure propose a cache data sending method and device, electronic equipment and computer readable medium to solve one or more of the technical problems mentioned in the background part.

[0008] In a first aspect, some embodiments of the present disclosure provide a method for sending cached data, the method comprising: receiving cache configuration information submitted by each producer user; determining maximum available memory occupation information corresponding to each producer user based on the cache configuration information; in response to receiving to-be-cached data submitted by any producer user among the producer users, determining actual occupation memory of the to-be-cached data; determining maximum available memory of the any producer user based on the maximum available memory occupation information of each producer user; determining whether to cache the to-be-cached data based on the maximum available memory of the any producer user and the actual occupation memory; in response to determining to cache the to-be-cached data, caching the to-be-cached data to the occupation memory space of the any producer user; in response to receiving a target data acquisition request sent by a consumer user, determining a target producer user corresponding to the consumer user among the producer users as a target producer user; deleting target actual occupation memory corresponding to target cached data from the occupation memory space of the target producer user according to the target producer user and the target cached data corresponding to the target data acquisition request; and sending the target cached data to a terminal device corresponding to the consumer user.

[0009] In a second aspect, some embodiments of the present disclosure provide a device for sending cached data, the device comprising: a receiving unit configured to receive cache configuration information submitted by each producer user; a first determining unit configured to determine maximum available memory occupation information corresponding to each producer user based on the cache configuration information; a second determining unit configured to, in response to receiving to-be-cached data submitted by any producer user among the producer users, determine actual occupation memory of the to-be-cached data; a third determining unit configured to determine maximum available memory of the any producer user based on the maximum available memory occupation information of each producer user; a fourth determining unit configured to determine whether to cache the to-be-cached data based on the maximum available memory of the any producer user and the actual occupation memory; a caching unit configured to, in response to determining to cache the to-be-cached data, cache the to-be-cached data to the occupation memory space of the any producer user; a fifth determining unit configured to, in response to receiving a target data acquisition request sent by a consumer user, determine a target producer user corresponding to the consumer user among the producer users as a target producer user; a deleting unit configured to delete target actual occupation memory corresponding to target cached data from the occupation memory space of the target producer user according to the target producer user and the target cached data corresponding to the target data acquisition request; and a sending unit configured to send the target cached data to a terminal device corresponding to the consumer user.

[0010] In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having stored thereon one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the method described in any implementation manner of the first aspect.

[0011] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the method described in any implementation manner of the first aspect.

[0012] The above various embodiments of the present disclosure have the following beneficial effects: through the cache data sending method of some embodiments of the present disclosure, the number of times of failure of the data providing user to cache data is reduced, and the performance of the cached data is improved. Specifically, the reason why the number of times of failure of other data providing users to cache data is large, the performance of the cached data is poor, and the data integrity is poor, and the success rate of the data acquisition user's query to data is poor is that when the data providing user continuously caches data and the data is not used by other users, the remote dictionary service cannot limit the maximum available memory of the data providing user, resulting in that the data continuously cached by the data providing user occupies the memory, thereby causing the number of times of failure of other data providing users to cache data to be large, and the performance of the cached data to be poor; and when the remote dictionary service caches data, it will clear the expired data, resulting in poor data integrity and poor success rate of the data acquisition user's query to data. Based on this, the cache data sending method of some embodiments of the present disclosure first receives each cache configuration information submitted by each producer user. Thus, each cache configuration information can represent parameter-related information configured by each producer user for the data to be cached. Then, based on the above-mentioned cache configuration information, the maximum available memory occupation information corresponding to the above-mentioned producer user is determined. Thus, the maximum memory occupation information can represent the maximum memory occupation ratio of each producer user. Then, in response to receiving the to-be-cached data submitted by any producer user in the above-mentioned producer user, the actual occupied memory of the above-mentioned to-be-cached data is determined. Thus, the actual occupied memory of the to-be-cached data can be obtained. Thus, it can be used to determine whether to cache the to-be-cached data. Secondly, based on the maximum available memory occupation information of the above-mentioned producer user, the maximum available memory of the above-mentioned any producer user is determined. Thus, the maximum available memory of any producer user can represent the maximum available memory range of any producer user, so as to limit the available memory range of any producer user. Then, based on the maximum available memory of the above-mentioned any producer user and the actual occupied memory, it is determined whether to cache the above-mentioned to-be-cached data. Thus, it can be determined whether the remaining memory of any producer user can cache the to-be-cached data. Then, in response to determining to cache the above-mentioned to-be-cached data, the above-mentioned to-be-cached data is cached to the occupied memory space of the above-mentioned any producer user. Thus, the to-be-cached data can be cached to the occupied memory space of the producer user, so that the producer user corresponding to the consumer user can obtain the to-be-cached data. Secondly, in response to receiving a target data acquisition request sent by a consumer user, the producer user corresponding to the above-mentioned consumer user in the above-mentioned producer user is determined as a target producer user. Thus, according to the target data acquisition request of the consumer user, the producer user corresponding to the consumer user can be automatically determined.Then, according to the target producer user and the target cache data corresponding to the target data acquisition request, a target actual occupied memory corresponding to the target cache data is deleted from the occupied memory space of the target producer user. Thus, the occupied memory space of the target producer user can be updated. Finally, the target cache data is sent to the terminal device corresponding to the target consumer user. Thus, the target cache data can be fed back to the consumer user. Because the maximum available memory of the data providing user is determined, and the available memory of the data providing user is within the available memory range, the data providing user cannot occupy the available memory of other data providing users, thereby reducing the number of times of cache data failure of other data providing users and improving the performance of cache data. Because the actual occupied memory of the cache data sent to the data acquisition user can be deleted, the remaining memory of the data providing user is further updated, thereby reducing the number of times of cache data failure of the data providing user without clearing expired data, improving the integrity of data, and improving the success rate of data query of the data acquisition user. Thus, the memory usage range of the data providing user is limited by the maximum available memory, and the remaining memory of the data providing user is updated, thereby reducing the number of times of cache data failure of other data providing users and improving the performance of cache data. BRIEF DESCRIPTION OF DRAWINGS

[0013] The above and other features, advantages and aspects of embodiments of the present disclosure will become more apparent by describing in detail some embodiments thereof with reference to the attached drawings in which:

[0014] Figure 1 is a flowchart of some embodiments of a cache data sending method according to the present disclosure;

[0015] Figure 2 is a structural schematic diagram of some embodiments of a cache data sending apparatus according to the present disclosure;

[0016] Figure 3 is a structural schematic diagram of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0017] Embodiments of the present disclosure will be described in detail below with reference to the drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms, and should not be interpreted as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete. 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.

[0018] In addition, it needs to be noted that only parts related to the present application are shown in the drawings for the convenience of description. The embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0019] It should be noted that the terms "first", "second" and the like mentioned in the present disclosure are only used to distinguish different devices, modules or units, and do not limit the order or interdependence of the functions performed by these devices, modules or units.

[0020] It should be noted that the terms "one", "multiple" mentioned in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that "one or more" should be understood unless otherwise explicitly indicated in the context.

[0021] The names of the messages or information exchanged between the plurality of devices in the embodiments of the present disclosure are only for illustrative purposes, and are not used to limit the scope of the messages or information.

[0022] The present disclosure will be described in detail below with reference to the drawings and in conjunction with embodiments.

[0023] Figure 1 Flow 100 of some embodiments of the cache data sending method according to the present disclosure is shown. The cache data sending method comprises the following steps:

[0024] Step 101, receiving each cache configuration information submitted by each producer user.

[0025] In some embodiments, the subject (such as a computing device) of the cache data sending method can receive each cache configuration information submitted by each producer user. The producer user can be a user who provides data. Each cache configuration information can represent the parameter-related information configured by each producer user for the data to be cached. The cache configuration information can include producer user identity, producer user weight and producer user memory ratio. The cache configuration information can be submitted by the producer user. The producer user identity can represent the producer user identification. The producer user identity can be a string. The producer user memory ratio can be the proportion of the memory of the producer user to the memory of each producer user. Thus, each cache configuration information submitted by each producer user can be obtained, and thus each identity information of each producer user can be obtained.

[0026] Step 102, determining the maximum available memory occupation information corresponding to each producer user based on each cache configuration information.

[0027] In some embodiments, the execution entity may determine the maximum available memory usage information corresponding to each producer user based on each cache configuration information.

[0028] In practice, the above execution entity can determine the maximum available memory usage information corresponding to each producer user based on each cache configuration information in various ways.

[0029] In some optional implementations of some embodiments, the execution entity may determine the maximum available memory usage information corresponding to each producer user based on each cache configuration information through the following steps:

[0030] In the first step, for each cache configuration information in the above cache configuration information, the product of the producer user weight and the producer user memory ratio included in the above cache configuration information is determined as the first maximum available memory occupancy ratio of the producer user corresponding to the above cache configuration information.

[0031] In the second step, the sum of the determined first maximum available memory usage ratios is determined as the second maximum available memory usage ratio corresponding to each of the producer users. In practice, the execution entity may add up the first maximum available memory usage ratios to obtain the sum of the first maximum available memory usage ratios, and determine the sum as the second maximum available memory usage ratio.

[0032] In a third step, the second maximum available memory usage ratio is determined as the maximum available memory usage information. The maximum available memory usage information may be the maximum available memory usage information corresponding to each producer user. Thus, the maximum available memory usage information corresponding to each producer user can be determined, and thus, can be used to determine the maximum available memory of any producer user among the producer users.

[0033] Step 103 : In response to receiving the data to be cached submitted by any producer user among the producer users, determine the actual memory occupied by the data to be cached.

[0034] In some embodiments, the execution entity may determine the actual memory occupied by the data to be cached in response to receiving the data to be cached submitted by any producer user among the various producer users. In practice, the execution entity may determine the memory occupied by the data to be cached in the current operating system as the actual memory occupied by the data to be cached. Thus, the actual memory occupied by the data to be cached can be obtained, which can be used to determine whether to cache the data to be cached.

[0035] Step 104: Determine the maximum available memory of any producer user based on the maximum available memory usage information of each producer user.

[0036] In some embodiments, the execution subject can determine the maximum available memory of any producer user based on the maximum available memory occupation information of each producer user.

[0037] In practice, the execution subject can determine the maximum available memory of any producer user based on the maximum available memory occupation information of each producer user in various ways.

[0038] In some optional implementations of some embodiments, the execution subject can determine the maximum available memory of any producer user based on the maximum available memory occupation information of each producer user by the following steps:

[0039] First, determine the cache configuration information corresponding to the any producer user in the cache configuration information of each producer user as the first cache configuration information. The first cache configuration information can include producer user weight and producer user memory occupation ratio.

[0040] Second, determine the product of the producer user weight and the producer user memory occupation ratio included in the first cache configuration information as the maximum available memory occupation ratio.

[0041] Third, determine the ratio of the maximum available memory occupation ratio to the maximum available memory occupation information as the memory occupation ratio.

[0042] Fourth, determine the product of the preset maximum available memory and the memory occupation ratio as the maximum available memory of the any producer user. The preset maximum available memory can be the maximum available memory of each producer user. Thus, the maximum available memory of the any producer user is determined, which can be used to determine whether to cache the to-be-cached data.

[0043] Step 105, determine whether to cache the to-be-cached data based on the maximum available memory and the actual occupied memory of the any producer user.

[0044] In some embodiments, the execution subject can determine whether to cache the to-be-cached data based on the maximum available memory and the actual occupied memory of the any producer user.

[0045] In practice, the execution subject can determine whether to cache the to-be-cached data based on the maximum available memory and the actual occupied memory of the any producer user in various ways.

[0046] In some optional implementations of some embodiments, the execution subject can determine whether to cache the to-be-cached data based on the maximum available memory and the actual occupied memory of the any producer user by the following steps:

[0047] In a first step, a difference between the maximum available memory of any producer user and the initial occupied memory of the any producer user is determined as a first residual memory of the any producer user.

[0048] In a second step, a difference between the first residual memory of the any producer user and the actual occupied memory is determined as a second residual memory of the any producer user.

[0049] In a third step, in response to determining that the second residual memory of the any producer user is greater than or equal to a first preset value, the any producer user is determined to cache the to-be-cached data. In practice, first, the execution subject can determine that the second residual memory is greater than or equal to the first preset value, and then cache the to-be-cached data. For example, the first preset value can be 0. In this way, the to-be-cached data can be determined to be cached.

[0050] In some optional implementations of some embodiments, the execution subject can further perform the following steps in response to determining that the second residual memory of the any producer user is less than the first preset value:

[0051] In a first sub-step, the to-be-cached data is determined to be uncacheable.

[0052] In a second sub-step, cache failure information corresponding to the to-be-cached data is sent to a terminal device corresponding to the any producer user. The terminal device can be a device logged in with a user account of the any producer user. The cache failure information can be cache result information fed back to the any producer user. For example, the cache failure information can be “exceeds available size, uncacheable”. The terminal device can be a computer. In this way, the to-be-cached data can be determined to be uncacheable, and the any producer user can view the cache failure information through the terminal device.

[0053] In step 106, in response to determining to cache the to-be-cached data, the to-be-cached data is cached to the occupied memory space of the any producer user.

[0054] In some embodiments, the execution subject can cache the to-be-cached data to the occupied memory space of the any producer user in response to determining to cache the to-be-cached data.

[0055] In practice, the execution subject can cache the to-be-cached data to the occupied memory space of the any producer user in various ways in response to determining to cache the to-be-cached data.

[0056] In some optional implementations of some embodiments, the execution subject can cache the to-be-cached data to the occupied memory space of the any producer user in response to determining to cache the to-be-cached data by performing the following steps:

[0057] The first step is to determine the memory occupied by the any producer user as the sum of the actual memory occupied and the initial memory occupied. The initial memory occupied can be the memory occupied by the any producer before the to-be-cached data is submitted.

[0058] The second step is to determine the memory space occupied by the any producer user according to the memory occupied by the any producer user. The memory space occupied by the any producer user can be divided in the maximum available memory space of the any producer user.

[0059] The third step is to cache the to-be-cached data to the memory space occupied by the any producer user. Thus, the cached to-be-cached data can be obtained, which can be used for the consumer user to obtain.

[0060] Step 107, in response to receiving the target data obtaining request sent by the consumer user, determining the producer user corresponding to the consumer user in each producer user as a target producer user.

[0061] In some embodiments, the execution subject can determine the producer user corresponding to the consumer user in each producer user as a target producer user in response to receiving the target data obtaining request sent by the consumer user. The consumer user can be a user who needs to obtain data. The target data obtaining request can be a request of the consumer user to obtain target data of the corresponding producer user. The target data obtaining request can include the consumer user identity of the consumer user. The consumer user identity can represent the consumer user identification.

[0062] In practice, the execution subject can determine the producer user corresponding to the consumer user in each producer user as a target producer user in response to receiving the target data obtaining request sent by the consumer user through various ways.

[0063] In some optional implementations of some embodiments, the execution subject can determine the producer user corresponding to the consumer user in each producer user as a target producer user in response to receiving the target data obtaining request sent by the consumer user through the following steps:

[0064] The first step is to determine whether there is a producer user identity that satisfies a preset identity condition of the corresponding consumer user identity in each producer user identity included in each cache configuration information. The preset identity condition can be that the producer user identity is the same as the consumer user identity.

[0065] The second step is to perform the following steps in response to determining that there is a producer user identity that satisfies the preset identity condition in each producer user identity included in each cache configuration information.

[0066] The first sub-step is to determine a producer user identity that meets the preset identity condition from the producer user identities included in each of the cache configuration information as a target producer user identity.

[0067] The second sub-step is to determine the cache configuration information corresponding to the target producer user identity from the cache configuration information as second cache configuration information.

[0068] The third sub-step is to determine the producer user corresponding to the second cache configuration information as a target producer user. In practice, first, the execution subject can determine the corresponding producer user through the producer user identity included in the second cache configuration information. Then, the determined producer user can be determined as the target producer user.

[0069] In some optional implementations of some embodiments, the execution subject can also determine the producer user corresponding to the consumer user from the producer users as the target producer user in response to receiving the target data acquisition request sent by the consumer user by the following steps:

[0070] The first step is to perform the following steps in response to determining that there is no producer user identity that meets the preset identity condition from the producer user identities included in each of the cache configuration information:

[0071] The first sub-step is to determine the target cache data information corresponding to the target data acquisition request. The target cache data information can represent the information of the storage address of the target cache data. In practice, the execution subject can determine the data storage address included in the target data acquisition request as the target cache data information.

[0072] The second sub-step is to determine the data storage address included in the target cache data information as the target data storage address. The data storage address can be the storage address of the data to be acquired by the consumer user in the maximum available memory space of the producer user. The maximum available memory of the producer user can be determined as the capacity of the maximum available memory space of the producer user.

[0073] A third sub-step is to determine the data storage address information corresponding to the target data storage address in the pre-stored data storage address information set as the target data storage address information, wherein the data storage address information in the data storage address information set comprises a data storage address and a producer user identity. The pre-stored data storage address information set can be a set of data storage address information of each producer user. In practice, the execution subject can determine the data storage address information including the same data storage address as the target data storage address in the data storage address information set as the target data storage address information.

[0074] A fourth sub-step is to determine the producer user corresponding to the producer user identity included in the target data storage address information as the target producer user. In this way, the target producer user corresponding to the consumer user sending the target data acquisition request can be determined.

[0075] The technical solution is an invention point of an embodiment of the present disclosure, which solves the second technical problem mentioned in the background. When the data acquisition user acquires data, the data acquisition user can only find the data provider through the direct correspondence between the pre-set data acquisition user and data provider, and when the user identity of the data acquisition user or the data provider is changed, the data provider corresponding to the data acquisition user cannot be determined, so the data cannot be fed back to the data acquisition user. The factors leading to the inability to determine the data provider corresponding to the data acquisition user are often as follows: the data acquisition user can only find the data provider through the direct correspondence between the pre-set data acquisition user and data provider. If the above factors are solved, the data provider corresponding to the data acquisition user can be determined, and the data can be fed back to the data acquisition user. In order to achieve this effect, when the user identity of the data acquisition user or the data provider is changed, the data storage address of the target cache data can be obtained according to the target cache data information of the data acquisition user, so that the corresponding data provider can be determined through the data storage address of the target cache data. In this way, the data provider corresponding to the data acquisition user is determined, and the effect of determining the data provider corresponding to the data acquisition user and feeding back the data to the data acquisition user is achieved.

[0076] Step 108 is to delete the target actual occupied memory corresponding to the target cache data from the occupied memory space of the target producer user according to the target producer user and the target cache data corresponding to the target data acquisition request.

[0077] In some embodiments, the execution subject can delete the target actual occupied memory of the target cache data corresponding to the target data acquisition request of the target producer user from the occupied memory space of the target producer user according to the target cache data of the target producer user and the target data acquisition request.

[0078] In practice, the execution subject can delete the target actual occupied memory of the target cache data corresponding to the target data acquisition request of the target producer user from the occupied memory space of the target producer user according to the target cache data of the target producer user and the target data acquisition request in various ways.

[0079] In some optional implementations of some embodiments, the execution subject can delete the target actual occupied memory of the target cache data corresponding to the target data acquisition request of the target producer user from the occupied memory space of the target producer user according to the target cache data of the target producer user and the target data acquisition request by the following steps:

[0080] Firstly, the actual occupied memory of the target cache data corresponding to the target data acquisition request is determined as the target actual occupied memory. In practice, firstly, the execution subject can determine the occupied memory of the target cache data in the current operating system as the actual occupied memory of the target cache data. Then, the actual occupied memory of the target cache data is determined as the target actual occupied memory.

[0081] Secondly, the target actual occupied memory corresponding to the target cache data is deleted from the occupied memory space of the target producer user. In practice, firstly, the execution subject can determine the maximum available memory of the target producer user as the maximum available memory space of the target producer user. Then, the maximum available memory space can be determined as the occupied memory space of the target producer user. Finally, the target actual occupied memory is deleted from the occupied memory space of the target producer user. Thus, the remaining memory of the target producer user can be updated.

[0082] Step 109, the target cache data is sent to the terminal device of the corresponding consumer user.

[0083] In some embodiments, the execution subject can send the target cache data to the terminal device of the corresponding consumer user. In practice, the execution subject can feed back the target cache data to the consumer user. Thus, the consumer user can view the target cache data from the terminal device.

[0084] The above various embodiments of the present disclosure have the following beneficial effects: through the cache data sending method of some embodiments of the present disclosure, the number of times of failure of the data providing user to cache data is reduced, and the performance of the cached data is improved. Specifically, the reason why the number of times of failure of other data providing users to cache data is large, the performance of the cached data is poor, and the data integrity is poor, and the success rate of the data acquisition user's query to data is poor is that when the data providing user continuously caches data and the data is not used by other users, the remote dictionary service cannot limit the maximum available memory of the data providing user, resulting in that the data continuously cached by the data providing user occupies the memory, thereby causing the number of times of failure of other data providing users to cache data to be large, and the performance of the cached data to be poor; and when the remote dictionary service caches data, it will clear the expired data, resulting in poor data integrity and poor success rate of the data acquisition user's query to data. Based on this, the cache data sending method of some embodiments of the present disclosure first receives each cache configuration information submitted by each producer user. Thus, each cache configuration information can represent parameter-related information configured by each producer user for the data to be cached. Then, based on the above-mentioned cache configuration information, the maximum available memory occupation information corresponding to the above-mentioned producer user is determined. Thus, the maximum memory occupation information can represent the maximum memory occupation ratio of each producer user. Then, in response to receiving the to-be-cached data submitted by any producer user in the above-mentioned producer user, the actual occupied memory of the above-mentioned to-be-cached data is determined. Thus, the actual occupied memory of the to-be-cached data can be obtained. Thus, it can be used to determine whether to cache the to-be-cached data. Secondly, based on the maximum available memory occupation information of the above-mentioned producer user, the maximum available memory of the above-mentioned any producer user is determined. Thus, the maximum available memory of any producer user can represent the maximum available memory range of any producer user, so as to limit the available memory range of any producer user. Then, based on the maximum available memory of the above-mentioned any producer user and the actual occupied memory, it is determined whether to cache the above-mentioned to-be-cached data. Thus, it can be determined whether the remaining memory of any producer user can cache the to-be-cached data. Then, in response to determining to cache the above-mentioned to-be-cached data, the above-mentioned to-be-cached data is cached to the occupied memory space of the above-mentioned any producer user. Thus, the to-be-cached data can be cached to the occupied memory space of the producer user, so that the producer user corresponding to the consumer user can obtain the to-be-cached data. Secondly, in response to receiving a target data acquisition request sent by a consumer user, the producer user corresponding to the above-mentioned consumer user in the above-mentioned producer user is determined as a target producer user. Thus, according to the target data acquisition request of the consumer user, the producer user corresponding to the consumer user can be automatically determined.Then, according to the target producer user and the target cache data corresponding to the target data acquisition request, a target actual occupied memory corresponding to the target cache data is deleted from the occupied memory space of the target producer user. Thus, the occupied memory space of the target producer user can be updated. Finally, the target cache data is sent to the terminal device corresponding to the consumer user. Thus, the target cache data can be fed back to the consumer user. Because the maximum available memory of the data providing user is determined, and the available memory of the data providing user is within the available memory range, the data providing user cannot occupy the available memory of other data providing users, thereby further reducing the number of cache data failures of other data providing users, and improving the performance of the cache data. Because the actual occupied memory of the cache data sent to the data acquisition user can be deleted, the remaining memory of the data providing user is further updated, thereby reducing the number of cache data failures of the data providing user and not clearing expired data, improving the integrity of the data, and improving the success rate of the data acquisition user querying the data. Thus, by limiting the memory usage range of the data providing user through the maximum available memory and updating the remaining memory of the data providing user, the number of cache data failures of other data providing users is reduced, and the performance of the cache data is improved.

[0085] Further reference Figure 2 , as an implementation of the method shown in the above figures, the present disclosure provides some embodiments of a cache data sending device, which device embodiments correspond to those method embodiments shown in Figure 2 , and the device can be applied in various electronic devices.

[0086] As Figure 2As shown, the cache data sending apparatus 200 of some embodiments comprises a receiving unit 201, a first determining unit 202, a second determining unit 203, a third determining unit 204, a fourth determining unit 205, a caching unit 206, a fifth determining unit 207, a deleting unit 208 and a sending unit 209. The receiving unit 201 is configured to receive each cache configuration information submitted by each producer user; the first determining unit 202 is configured to determine the maximum available memory occupation information of each producer user based on each cache configuration information; the second determining unit 203 is configured to determine the actual occupation memory of the to-be-cached data in response to receiving the to-be-cached data submitted by any producer user among each producer user; the third determining unit 204 is configured to determine the maximum available memory of any producer user based on the maximum available memory occupation information of each producer user; the fourth determining unit 205 is configured to determine whether to cache the to-be-cached data based on the maximum available memory and the actual occupation memory of any producer user; the caching unit 206 is configured to cache the to-be-cached data to the occupation memory space of any producer user in response to determining to cache the to-be-cached data; the fifth determining unit 207 is configured to determine the producer user corresponding to the consumer user as the target producer user among each producer user in response to receiving the target data acquisition request sent by the consumer user; the deleting unit 208 is configured to delete the target actual occupation memory corresponding to the target cache data from the occupation memory space of the target producer user according to the target producer user and the target cache data corresponding to the target data acquisition request; and the sending unit 209 is configured to send the target cache data to the terminal device of the corresponding consumer user.

[0087] It can be understood that the units described in the apparatus 200 correspond to the respective steps in the method described with reference to Figure 1 The operations, features and advantages described above for the method also apply to the apparatus 200 and the units included therein, which will not be described here again.

[0088] Reference is made below to Figure 3 which shows a structural schematic diagram of an electronic device 300 (e.g. a computing device) suitable for implementing some embodiments of the present disclosure. The electronic device in some embodiments of the present disclosure can include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Tablet Personal Computer), a PMP (Portable Multimedia Player), a vehicle terminal (e.g. a car navigation terminal), and the like, as well as a fixed terminal such as a digital TV, a desktop computer, and the like. Figure 3 The electronic device shown is merely an example and should not impose any limitation on the functions and use range of the embodiments of the present disclosure.

[0089] AsFigure 3 As shown, the electronic device 300 can include a processing device 301 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 302 or loaded into a random access memory (RAM) 303 from a storage device 308. Various programs and data required for the operation of the electronic device 300 are also stored in the RAM 303. The processing device 301, the ROM 302, and the RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0090] In general, the following devices can be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 can allow the electronic device 300 to communicate wirelessly or wired with other devices to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that all of the illustrated devices are not required, and more or fewer devices can alternatively be implemented. Figure 3 Each block shown in the flowcharts can represent a device, or multiple devices, as necessary.

[0091] In particular, processes described above with reference to the flowcharts can be implemented as a computer software program according to some embodiments of the present disclosure. For example, some embodiments of the present disclosure include a computer program product including a computer program carried on a computer readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In some such embodiments, the computer program can be downloaded and installed from a network through the communication devices 309, or installed from the storage devices 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-described functions defined in the methods of some embodiments of the present disclosure are performed.

[0092] Note that the computer readable medium in some embodiments of the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination thereof. The computer readable storage medium can be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the foregoing. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus or device. In some embodiments of the present disclosure, the computer readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave in a propagated data signal, in which the computer readable program code is contained. Such propagated data signal can take a variety of forms, including but not limited to electro-magnetic, optical or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate or transport program for use by or in connection with an instruction execution system, apparatus or device. Program code contained in the computer readable medium can be transmitted by any suitable medium, including but not limited to wire, cable, RF (radio frequency), etc., or any suitable combination of the foregoing.

[0093] In some embodiments, the client, server, or both can communicate using any current known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet, and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any current known or future developed networks.

[0094] The computer readable medium can be included in the electronic device; or can exist separately from the electronic device. The computer readable medium carries one or more programs, when the one or more programs are executed by the electronic device, the electronic device is caused to: receive each cache configuration information submitted by each producer user; determine maximum available memory occupation information corresponding to each producer user based on the each cache configuration information; in response to receiving to-be-cached data submitted by any producer user of the each producer user, determine actual occupation memory of the to-be-cached data; determine maximum available memory of the any producer user based on the maximum available memory occupation information of the each producer user; determine whether to cache the to-be-cached data based on the maximum available memory of the any producer user and the actual occupation memory; in response to determining to cache the to-be-cached data, cache the to-be-cached data to occupation memory space of the any producer user; in response to receiving a target data acquisition request sent by a consumer user, determine a producer user corresponding to the consumer user from the each producer user as a target producer user; delete target actual occupation memory corresponding to target cache data of the target producer user from the occupation memory space of the target producer user according to the target producer user and the target cache data corresponding to the target data acquisition request; and send the target cache data to a terminal device corresponding to the consumer user.

[0095] Computer program code for carrying out operations of some embodiments of the disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, 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 the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0096] The computer program product of the first aspect can include a computer readable storage medium. The computer readable storage medium can include instructions. The instructions can include one or both of: instructions that, when executed by a processor of a computer, cause the processor to perform operations corresponding to the example methods of this disclosure; and instructions that, when executed by a processor of a computer, cause the processor to generate a computer program including instructions that, when executed by a processor of a computer, cause the processor to perform operations corresponding to the example methods of this disclosure.

[0097] The units described in some embodiments of the present disclosure can be implemented by means of software, or by means of hardware. The described units can also be provided in a processor, for example, a processor can be described as including a receiving unit, a first determining unit, a second determining unit, a third determining unit, a fourth determining unit, a caching unit, a fifth determining unit, a deleting unit and a sending unit. In some cases, the names of these units do not constitute a limitation on the units themselves, for example, the receiving unit can also be described as a unit that receives each cache configuration information submitted by each producer user.

[0098] The functions described above can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, example types of hardware logic components that can be used include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip systems (SOCs), complex programmable logic devices (CPLDs), etc.

[0099] The above description is merely illustrative of the exemplary embodiments of this disclosure and the application principles of the technologies used. Those skilled in the art should understand that the scope of the application involved in the embodiments of this disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combinations of the above technical features or equivalent features, without departing from the above inventive concept. For example, the above features can be replaced with the technical features disclosed in the embodiments of this disclosure (but not limited to) having similar functions to form technical solutions.

Claims

1. A method for sending cached data, comprising: Receive cache configuration information submitted by each producer user; Determining maximum available memory usage information corresponding to each producer user based on each cache configuration information, wherein the cache configuration information in each cache configuration information includes a producer user weight and a producer user memory ratio, and determining the maximum available memory usage information corresponding to each producer user based on each cache configuration information includes: For each cache configuration information in the various cache configuration information, determine the product of the producer user weight and the producer user memory ratio included in the cache configuration information as the first maximum available memory occupancy ratio of the producer user corresponding to the cache configuration information; Determining the sum of the determined first maximum available memory occupation ratios as the second maximum available memory occupation ratio corresponding to each producer user; Determine the second maximum available memory occupation ratio as maximum available memory occupation information; In response to receiving the data to be cached submitted by any producer user among the producer users, determining the actual memory occupied by the data to be cached; Determining the maximum available memory of any producer user based on the maximum available memory occupancy information of each producer user, wherein determining the maximum available memory of any producer user based on the maximum available memory occupancy information of each producer user includes: Determine the cache configuration information corresponding to the arbitrary producer user among the various cache configuration information as the first cache configuration information; Determine the product of the producer user weight and the producer user memory ratio included in the first cache configuration information as the maximum available memory occupancy ratio; Determine a ratio of the maximum available memory occupancy ratio to the maximum available memory occupancy information as a memory occupancy ratio; Determine the product of the preset maximum available memory and the memory usage ratio as the maximum available memory of any producer user; Determining whether to cache the data to be cached based on the maximum available memory of any producer user and the actually occupied memory; In response to determining to cache the data to be cached, caching the data to be cached into an occupied memory space of the arbitrary producer user; In response to receiving a target data acquisition request sent by a consumer user, determining a producer user corresponding to the consumer user among the producer users as a target producer user; According to the target producer user and the target cache data corresponding to the target data acquisition request, deleting the target actual occupied memory corresponding to the target cache data from the occupied memory space of the target producer user; The target cache data is sent to a terminal device corresponding to the consumer user.

2. The method according to claim 1, wherein The determining whether to cache the data to be cached based on the maximum available memory of any producer user and the actually occupied memory includes: Determine the difference between the maximum available memory of the arbitrary producer user and the initial occupied memory of the arbitrary producer user as the first remaining memory of the arbitrary producer user; Determine the difference between the first remaining memory of the arbitrary producer user and the actually occupied memory as the second remaining memory of the arbitrary producer user; In response to determining that the second remaining memory of any producer user is greater than or equal to a first preset value, it is determined to cache the data to be cached, and the first preset value is 0.

3. The method according to claim 2, wherein: The determining whether to cache the data to be cached based on the maximum available memory and the actual occupied memory of any producer user further includes: In response to determining that the second remaining memory of the arbitrary producer user is less than the first preset value, performing the following steps: Determining that the data to be cached cannot be cached; The cache failure information corresponding to the data to be cached is sent to the terminal device corresponding to any producer user.

4. The method according to claim 2, wherein: In response to determining to cache the data to be cached, caching the data to be cached into the occupied memory space of the arbitrary producer user includes: Determine the sum of the actual occupied memory and the initial occupied memory as the occupied memory of the arbitrary producer user; Determine the occupied memory space of any producer user according to the occupied memory of any producer user; The data to be cached is cached into the memory space occupied by any producer user.

5. The method according to any one of claims 1 to 4, wherein: The step of deleting the target actually occupied memory corresponding to the target cache data from the occupied memory space of the target producer user according to the target producer user and the target cache data corresponding to the target data acquisition request includes: Determine the actual occupied memory of the target cache data corresponding to the target data acquisition request as the target actual occupied memory; The target actual occupied memory corresponding to the target cache data is deleted from the occupied memory space of the target producer user.

6. A buffered data sending device, comprising: A receiving unit, configured to receive cache configuration information submitted by each producer user; The first determining unit is configured to determine the maximum available memory usage information corresponding to each producer user based on each cache configuration information, wherein the cache configuration information in each cache configuration information includes a producer user weight and a producer user memory ratio, and determining the maximum available memory usage information corresponding to each producer user based on each cache configuration information includes: For each cache configuration information in the various cache configuration information, determine the product of the producer user weight and the producer user memory ratio included in the cache configuration information as the first maximum available memory occupancy ratio of the producer user corresponding to the cache configuration information; Determining the sum of the determined first maximum available memory occupation ratios as the second maximum available memory occupation ratio corresponding to each producer user; Determine the second maximum available memory occupation ratio as maximum available memory occupation information; a second determining unit configured to, in response to receiving the data to be cached submitted by any producer user among the producer users, determine the actual memory occupied by the data to be cached; The third determining unit is configured to determine the maximum available memory of any producer user based on the maximum available memory usage information of each producer user, wherein determining the maximum available memory of any producer user based on the maximum available memory usage information of each producer user includes: Determine the cache configuration information corresponding to the arbitrary producer user among the various cache configuration information as the first cache configuration information; Determine the product of the producer user weight and the producer user memory ratio included in the first cache configuration information as the maximum available memory occupancy ratio; Determine a ratio of the maximum available memory occupancy ratio to the maximum available memory occupancy information as a memory occupancy ratio; Determine the product of the preset maximum available memory and the memory usage ratio as the maximum available memory of any producer user; A fourth determining unit is configured to determine whether to cache the data to be cached based on the maximum available memory and the actual occupied memory of the any producer user; a cache unit configured to, in response to determining to cache the data to be cached, cache the data to be cached into an occupied memory space of the arbitrary producer user; a fifth determining unit configured to, in response to receiving a target data acquisition request sent by a consumer user, determine a producer user corresponding to the consumer user among the producer users as a target producer user; a deleting unit configured to delete a target actually occupied memory corresponding to the target cache data from an occupied memory space of the target producer user according to the target producer user and the target cache data corresponding to the target data acquisition request; The sending unit is configured to send the target cache data to a terminal device corresponding to the consumer user.

7. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

8. A computer-readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Method and device for outputting information

    CN109783236A

  • Caching method and device

    CN110493145A