A method, device, equipment and medium for adjusting a cache queue
By obtaining and training the impact indicator vector, calculating the cache priority, and dynamically adjusting the cache queue, the problem of slow interface response in the data table storage platform is solved, and the rapid response of the user interface and the orderliness of data table calls are achieved.
Patent Information
- Application Number
- CN202411078980.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2044-08-07
AI Technical Summary
In the data table storage platform, due to high concurrency and large amount of data, the user call interface responds slowly, and there is recursive query logic, resulting in long response times, and there is a lack of fast and orderly cache queue adjustment methods.
By obtaining the impact indicator vector corresponding to the target user's call request, input it into the machine learning model for training, calculate the cache priority, and dynamically adjust the cache queue to ensure fast interface response and normal and orderly execution of data table calls.
It improves the prediction accuracy of the response time of new call requests, prevents call request congestion, and achieves quick response of the user interface and normal and orderly progress of data table calls.
Smart Images

Figure CN118606366B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data cache, and in particular to a cache queue adjustment method, device, equipment and medium. Background Art
[0002] At present, in order to integrate several businesses and facilitate user use, hundreds of data tables are stored in the data table storage platform, each data table corresponds to a business, the platform is configured with a gateway, and accounts and calling interfaces are assigned to several users through the gateway. When users call data tables, digital signatures are required for authentication. Since the platform usually corresponds to thousands of user interfaces, there will be high concurrency, resulting in call congestion, and the amount of data in some data tables is very large, resulting in slow response of the calling interface. Some users need to check multiple data tables, and there is a recursive query logic similar to graph transmission, and the response time is long. Therefore, there is an urgent need for a cache queue adjustment method that can enable the interface to respond quickly and orderly. Summary of the invention
[0003] The purpose of the present invention is to provide a cache queue adjustment method, device, equipment and medium, which can realize dynamic adjustment of the cache queue according to the cache priority of the call request, thereby ensuring the rapid response of the user interface and the normal and orderly progress of the data table call.
[0004] According to a first aspect of the present invention, a method for adjusting a cache queue is provided, comprising the following steps:
[0005] For any target user and any preset data table in a given data table library, a target impact indicator vector corresponding to the response time of the target user's request to call the preset data table is obtained; the target impact indicator vector includes a first impact indicator vector, a second impact indicator vector and a third impact indicator vector; the first impact indicator vector is obtained based on a number of call requests sent by the target user in a historical time period and a data table weight of the preset data table; the second impact indicator vector is obtained based on the data volume and update status of the preset data table; the third impact indicator vector is obtained based on any call request sent by the target user in a historical time period for calling the preset data table.
[0006] The target impact indicator vectors corresponding to several response times of each preset data table within the historical time period are input into the preset machine learning model for training, and the parameters are adjusted according to the corresponding actual response time to obtain the target machine learning model.
[0007] When a target call request sent by a target user is received, several key impact indicator vectors corresponding to the target impact indicator vector are obtained from the target call request, and the several key impact indicator vectors are input into the target machine learning model to obtain the response time corresponding to each preset data table in the target call request.
[0008] The first cache priority of the target call request is calculated according to a preset response time threshold and a response time corresponding to each preset data table in the target call request.
[0009] When the first cache priority of the target call request is greater than a preset first priority threshold, the target call request is added to a given cache queue to implement update adjustment of the given cache queue.
[0010] Furthermore, the first impact indicator vector is obtained by the following steps:
[0011] According to a number of call requests sent by the target user in the historical time period, the highest daily request number, the lowest daily request number and the average daily request number corresponding to the target user are obtained.
[0012] The maximum daily request number, minimum daily request number, and average daily request number corresponding to the target user are respectively assigned data table weights of the pre-acquired preset data table to obtain the weighted maximum daily request number, weighted minimum daily request number, and weighted average daily request number.
[0013] The weighted maximum daily request number, the weighted minimum daily request number, and the weighted average daily request number are normalized respectively, and the normalized values obtained respectively are combined into a first impact indicator vector.
[0014] Furthermore, the second impact indicator vector is obtained by the following steps:
[0015] The update frequency and average data volume of the preset data table in the historical time period are obtained; the average data volume is the average value of the total data volume after each update of the preset data table in the historical time period.
[0016] The update frequency of the preset data table in the historical time period and the average data volume of the preset data table in the historical time period are respectively normalized, and the respectively obtained normalized values are combined into a second impact indicator vector.
[0017] Furthermore, the third impact indicator vector is obtained by the following steps:
[0018] For any call request for calling a preset data table sent by a target user within a historical time period, a plurality of target data table pairs are obtained from the call request; the target data table pair refers to a table pair consisting of a preset data table and any remaining data table in the call request.
[0019] According to a number of call requests sent by each target user in a historical time period, the number of occurrences of each target data table pair is obtained.
[0020] The number of occurrences of each target data table is normalized, and the respectively obtained normalized values are combined into a third influence index vector.
[0021] Further, the first cache priority of the target call request is calculated according to the preset response time threshold and the response time corresponding to each preset data table in the target call request, including the following steps:
[0022] According to the preset response time threshold and the response time corresponding to each preset data table in the target call request, the redundant time score of the response time corresponding to each preset data table is calculated; the redundant time score is the ratio of the difference between the response time corresponding to any preset data table in the target call request and the response time threshold to the response time threshold.
[0023] The redundant time scores corresponding to each preset data table in the target call request are added together to obtain the first cache priority of the target call request.
[0024] Further, after determining that the first cache priority of the target call request is greater than a preset first priority threshold, the following steps are also included:
[0025] If the number of call requests in the current cache queue does not reach the preset maximum cache number threshold, the target call request is added to the current cache queue.
[0026] If the number of call requests in the current cache queue has reached the preset maximum cache number threshold, for any call request in the current cache queue, obtain the first cache priority corresponding to the call request, the number of preset data tables called in the call request, the total data volume ratio of several preset data tables called in the call request, and the current cache duration of the call request in the cache queue.
[0027] The inverse of the current cache time of the call request in the cache queue, the first cache priority corresponding to the call request, the number of preset data tables called in the call request, and the total data volume ratio of several preset data tables called in the call request are normalized respectively to obtain the corresponding normalized results.
[0028] The second cache priority of the call request is calculated based on the four normalized results obtained.
[0029] When the first cache priority of the target call request is less than the second cache priority of each call request in the current cache queue, the target call request is sent directly to the given data table library; otherwise, the target call request is added to the current cache queue, and the call request corresponding to the minimum value of several second cache priorities is removed from the current cache queue and sent directly to the given data table library to achieve the adjustment of the cache queue.
[0030] According to a second aspect of the present invention, a cache queue adjustment device is provided, the device comprising:
[0031] The first acquisition module is used to obtain, for any target user and any preset data table in a given data table library, a target impact indicator vector corresponding to the response time of a target user's request to call a preset data table; the target impact indicator vector includes a first impact indicator vector, a second impact indicator vector and a third impact indicator vector; the first impact indicator vector is obtained based on a number of call requests sent by the target user within a historical time period and a data table weight of the preset data table; the second impact indicator vector is obtained based on the data volume and update status of the preset data table; the third impact indicator vector is obtained based on any call request sent by the target user within a historical time period for calling a preset data table.
[0032] The training module is used to input the target impact indicator vectors corresponding to several response times of each preset data table in the historical time period into the preset machine learning model for training, and adjust the parameters according to the corresponding actual response time to obtain the target machine learning model.
[0033] The second acquisition module is used to obtain a number of key influence indicator vectors corresponding to the target influence indicator vector from the target call request when a target call request sent by the target user is received, and input the several key influence indicator vectors into the target machine learning model to obtain the response time corresponding to each preset data table in the target call request.
[0034] The first calculation module is used to calculate a first cache priority of the target call request according to a preset response time threshold and a response time corresponding to each preset data table in the target call request.
[0035] The adjustment module is used to add the target call request to a given cache queue when the first cache priority of the target call request is greater than a preset first priority threshold, so as to implement update adjustment of the given cache queue.
[0036] Furthermore, the first acquisition module includes a first impact indicator vector acquisition module, and the first impact indicator vector acquisition module includes:
[0037] The third acquisition module is used to acquire the highest daily request number, the lowest daily request number and the average daily request number corresponding to the target user according to a number of call requests sent by the target user in a historical time period.
[0038] The fourth acquisition module is used to assign the data table weights of the pre-acquired preset data table to the maximum daily request number, minimum daily request number, and average daily request number corresponding to the target user, and obtain the weighted maximum daily request number, weighted minimum daily request number, and weighted average daily request number.
[0039] The first combination module is used to normalize the weighted maximum daily request number, the weighted minimum daily request number and the weighted average daily request number respectively, and combine the respectively obtained normalized values into a first impact indicator vector.
[0040] Furthermore, the first acquisition module further includes a second impact indicator vector acquisition module, and the second impact indicator vector acquisition module includes:
[0041] The fifth acquisition module is used to acquire the update frequency and average data volume of the preset data table in the historical time period; the average data volume is the average value of the total data volume after each update of the preset data table in the historical time period.
[0042] The second combination module is used to normalize the update frequency of the preset data table in the historical time period and the average data volume of the preset data table in the historical time period, and combine the respectively obtained normalized values into a second impact indicator vector.
[0043] Furthermore, the first acquisition module further includes a third impact indicator vector acquisition module, and the third impact indicator vector acquisition module includes:
[0044] The sixth acquisition module is used to acquire several target data table pairs from any call request for calling a preset data table sent by the target user within a historical time period; the target data table pair refers to a table pair consisting of a preset data table and any remaining data table in the call request.
[0045] The seventh acquisition module is used to acquire the number of occurrences of each target data table pair according to a number of call requests sent by each target user in a historical time period.
[0046] The third combination module is used to normalize the number of occurrences of each target data table pair and combine the respectively obtained normalized values into a third influence indicator vector.
[0047] Furthermore, the first calculation module includes:
[0048] The second calculation module is used to calculate the redundant time score of the response time corresponding to each preset data table according to the preset response time threshold and the response time corresponding to each preset data table in the target call request; the redundant time score is the ratio of the difference between the response time corresponding to any preset data table in the target call request and the response time threshold to the response time threshold.
[0049] The third calculation module is used to add the redundant time score corresponding to each preset data table in the target call request to obtain the first cache priority of the target call request.
[0050] Furthermore, the device also includes:
[0051] The adding module is used to add the target calling request to the current cache queue if the number of calling requests in the current cache queue does not reach a preset maximum cache number threshold.
[0052] The eighth acquisition module is used to obtain, if the number of call requests in the current cache queue has reached the preset maximum cache number threshold, for any call request in the current cache queue, the first cache priority corresponding to the call request, the number of preset data tables called in the call request, the proportion of the total data volume of several preset data tables called in the call request, and the current cache duration of the call request in the cache queue.
[0053] The first processing module is used to normalize the inverse of the current cache time of the call request in the cache queue, the first cache priority corresponding to the call request, the number of preset data tables called in the call request, and the total data volume ratio of several preset data tables called in the call request to obtain the corresponding normalized results.
[0054] The fourth calculation module is used to calculate the second cache priority of the call request according to the four normalized results obtained.
[0055] The second processing module is used to send the target call request directly to the given data table library when the first cache priority of the target call request is less than the second cache priority of each call request in the current cache queue; otherwise, the target call request is added to the current cache queue, and the call request corresponding to the minimum value of several second cache priorities is removed from the current cache queue and sent directly to the given data table library to realize the adjustment of the cache queue.
[0056] According to a third aspect of the present invention, there is provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned cache queue adjustment method when executing the computer program.
[0057] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned cache queue adjustment method is implemented.
[0058] Compared with the prior art, the present invention has at least the following beneficial effects:
[0059] The cache queue adjustment method proposed in the present invention obtains the target impact indicator vector corresponding to the response time of the target user's request to call the preset data table for any target user and any preset data table in a given data table library, and trains the preset machine learning model according to several target impact indicator vectors corresponding to each preset data table to obtain the target machine learning model. By using several target impact indicator vectors containing multiple impact indicators to train the model, the prediction accuracy of the response time of each preset data table in the new call request can be improved; when a target call request sent by the target user is received, several key impact indicator vectors are obtained, and the several key impact indicator vectors are input into the target machine learning model, and the response time corresponding to each preset data table in the target call request is obtained respectively, so as to calculate the first cache priority of the target call request. When the first cache priority is greater than the preset first priority threshold, the target call request is added to the given cache queue, and the cache queue is dynamically adjusted according to the cache priority of the call request to prevent congestion of the call request, thereby ensuring the rapid response of the user interface and the normal and orderly progress of the data table call. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0061] Figure 1 A flowchart of a method for adjusting a cache queue provided in Embodiment 1 of the present invention;
[0062] Figure 2 A flowchart of the steps of obtaining a first impact indicator vector provided in the first embodiment of the present invention;
[0063] Figure 3 A flowchart of the steps of obtaining a second impact indicator vector provided in the first embodiment of the present invention;
[0064] Figure 4 A flowchart of the steps of obtaining a third impact indicator vector provided in the first embodiment of the present invention;
[0065] Figure 5 A flowchart of step S400 provided in the first embodiment of the present invention;
[0066] Figure 6 Another flow chart of the method for adjusting the cache queue provided in the first embodiment of the present invention;
[0067] Figure 7 A schematic diagram of the structure of a cache queue adjustment device provided in Embodiment 2 of the present invention;
[0068] Figure 8 A schematic diagram of the structure of a first impact indicator vector acquisition module provided in Embodiment 2 of the present invention;
[0069] Fig. 9 A schematic diagram of the structure of a second impact indicator vector acquisition module provided in the second embodiment of the present invention;
[0070] Fig.10 A schematic diagram of the structure of a third impact indicator vector acquisition module provided in the second embodiment of the present invention;
[0071] Fig.11 A schematic diagram of the structure of the first calculation module 400 provided in the second embodiment of the present invention;
[0072] Fig.12 Another structural schematic diagram of the cache queue adjustment device provided in the second embodiment of the present invention. DETAILED DESCRIPTION
[0073] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0074] Embodiment 1
[0075] like Figure 1 As shown, this embodiment 1 provides a method for adjusting a cache queue, comprising the following steps:
[0076] S100, for any target user and any preset data table in a given data table library, obtain a target impact indicator vector corresponding to the response time of the target user's request to call the preset data table; the target impact indicator vector includes a first impact indicator vector, a second impact indicator vector and a third impact indicator vector; the first impact indicator vector is obtained based on a number of call requests sent by the target user in a historical time period and the data table weight of the preset data table; the second impact indicator vector is obtained based on the data volume and update status of the preset data table; the third impact indicator vector is obtained based on any call request sent by the target user in the historical time period for calling the preset data table; it can be understood that: the first impact indicator vector, the second impact indicator vector and the third impact indicator vector are all factors that affect the response time of the call request; in this embodiment, the historical time period can be the time period corresponding to the 100 days before the current moment.
[0077] In a specific embodiment, Figure 2 As shown, in step S100, the first impact indicator vector is obtained by the following steps:
[0078] S111, according to a number of call requests sent by the target user in a historical time period, obtaining the highest daily request number, the lowest daily request number and the average daily request number corresponding to the target user.
[0079] Specifically, the maximum daily request number is the maximum value of the number of requests sent by the target user himself every day in the historical time period; the minimum daily request number is the minimum value of the number of requests sent by the target user himself every day in the historical time period; the average daily request number is the average value of the number of requests sent by the target user himself every day in the historical time period.
[0080] S112, assigning data table weights of a pre-obtained preset data table to the maximum daily request number, minimum daily request number, and average daily request number corresponding to the target user, respectively, to obtain a weighted maximum daily request number, a weighted minimum daily request number, and a weighted average daily request number.
[0081] Specifically, the data table weight of the preset data table meets the following conditions:
[0082] W i =C i / ∑ m i=1 C i , where W i is the data table weight of the i-th preset data table in a given data table library, C i is the number of times the i-th preset data table is called in the historical time period, and m is the number of preset data tables in a given data table library.
[0083] Specifically, the weighted maximum daily request number is the product of the maximum daily request number and the data table weight of the preset data table; the weighted minimum daily request number is the product of the minimum daily request number and the data table weight of the preset data table; the weighted average daily request number is the product of the average daily request number and the data table weight of the preset data table.
[0084] S113, normalize the weighted maximum daily request number, the weighted minimum daily request number and the weighted average daily request number respectively, and combine the normalized values obtained respectively into the first impact indicator vector; it can be understood as: according to several weighted maximum daily request numbers corresponding to several target users, each weighted maximum daily request number is normalized; according to several weighted minimum daily request numbers corresponding to several target users, each weighted minimum daily request number is normalized; according to several weighted average daily request numbers corresponding to several target users, each weighted average daily request number is normalized; in this embodiment, no special requirements are made on the normalization method.
[0085] As described above, when obtaining the first influencing indicator vector corresponding to the response time of the preset data table, an analysis is performed from the perspective of the historical situation of the target user sending call requests, and multiple factors that may affect the response time of the preset data table are taken into account, such as the target user's highest daily request number, the lowest daily request number, and the average daily request number, and the data table weight of the preset data table is combined to obtain the first influencing indicator vector, so as to enrich the diversity of sample data from the level of target users and improve the effectiveness and reliability of model training.
[0086] In a specific embodiment, Figure 3 As shown, in step S100, the second impact index vector is obtained by the following steps:
[0087] S121, obtaining the update frequency and average data volume of the preset data table in the historical time period; the average data volume is the average value of the total data volume after each update of the preset data table in the historical time period.
[0088] Specifically, the update frequency of the preset data table in the historical time period is the number of times the preset data table is updated in the historical time period.
[0089] S122, normalize the update frequency of the preset data table in the historical time period and the average data volume of the preset data table in the historical time period respectively, and combine the respectively obtained normalized values into a second influencing indicator vector; it can be understood as: according to the update frequency of several preset data tables in the historical time period, the update frequency of each preset data table is normalized, and according to the average data volume of several preset data tables in the historical time period, the average data volume of each preset data table is normalized.
[0090] As mentioned above, when obtaining the second influencing indicator vector corresponding to the response time of the preset data table, the preset data table itself is analyzed, and the update frequency and average data volume of the preset data table that can affect the response time of the preset data table are taken into account, so as to enrich the diversity of sample data and improve the effectiveness and reliability of model training.
[0091] In a specific embodiment, Figure 4 As shown, in step S100, the third impact index vector is obtained by the following steps:
[0092] S131, for any call request for calling a preset data table sent by a target user within a historical time period, obtain a plurality of target data table pairs from the call request; the target data table pair refers to a table pair consisting of a preset data table and any remaining data table in the call request.
[0093] For better understanding, an example is given as follows: when it is necessary to obtain the target impact indicator vector corresponding to the response time of the target user's request to call data table 1 in step S100, and the call request for calling data table 1 sent by the target user during the historical time period also includes calling data table 2, data table 3, and data table 4, the target data table pairs obtained are data table 1-data table 2, data table 1-data table 3, and data table 1-data table 4, a total of three target data table pairs.
[0094] S132, according to a number of call requests sent by each target user in a historical time period, obtaining the number of occurrences of each target data table pair.
[0095] S133, normalizing the number of occurrences of each target data table pair, and combining the respectively obtained normalized values into a third influence index vector.
[0096] As mentioned above, when obtaining the third influencing indicator vector corresponding to the response time of the preset data table, the association level between the preset data tables is analyzed to obtain the total number of times each data table pair in the call request appears in the historical time period. The more times the same data table pair appears, the higher the correlation between the two preset data tables in the data table pair. Therefore, the third influencing indicator vector is obtained according to the number of times each target data table pair appears, which can enrich the diversity of sample data from the association level of the preset data tables and improve the effectiveness and reliability of model training.
[0097] S200, the target impact indicator vectors corresponding to several response times of each preset data table within the historical time period are input into the preset machine learning model for training, and the parameters are adjusted according to the corresponding actual response times to obtain the target machine learning model; technical personnel in this field know the specific implementation method of using any machine learning model to train several target impact indicator vectors and corresponding response times, which will not be repeated here.
[0098] It should be noted that calling the same preset data table within the historical time period may correspond to multiple call requests. Taking the call of data table 1 as an example, if the target user calls data table 1 three times within the historical time period, then data table 1 corresponds to three call requests. Since the call request for calling data table 1 corresponds to the response time of data table 1 one-to-one, that is, data table 1 has a response time in each call request for calling data table 1, and since the third influence indicator vector in the target influence indicator vector is obtained according to any call request sent by the target user for calling the preset data table within the historical time period, when the target influence vector of the response time of data table 1 in the call request is used as a sample, the response time of data table 1 corresponding to the call request should be used as the corresponding actual response time for parameter adjustment.
[0099] S300, when receiving a target call request sent by a target user, obtain several key influence indicator vectors corresponding to the target influence indicator vector from the target call request, and input the several key influence indicator vectors into the target machine learning model, and obtain the response time corresponding to each preset data table in the target call request respectively; it can be understood that: the target call request is a request to call one or more preset data tables at the same time, and each preset data table corresponding to the call has a key influence indicator vector; the key influence indicator vector is obtained in the same way as the target influence indicator vector.
[0100] As mentioned above, by adopting multiple target influence indicator vectors to train the preset machine learning model to obtain the target machine learning model, when receiving a new target call request, it can accurately predict the response time of each preset data table called by the target call request, so as to improve the prediction accuracy of the total response time of the target call request, thereby providing a determining factor for determining whether it can be added to the cache queue.
[0101] S400, calculating a first cache priority of a target call request according to a preset response time threshold and a response time corresponding to each preset data table in the target call request.
[0102] In a specific embodiment, Figure 5 As shown, step S400 specifically includes the following steps:
[0103] S401, calculate the redundant time score of the response time corresponding to each preset data table according to the preset response time threshold and the response time corresponding to each preset data table in the target call request; the redundant time score is the ratio of the difference between the response time corresponding to any preset data table in the target call request and the response time threshold to the response time threshold.
[0104] Specifically, the redundant time score of the response time corresponding to the preset data table meets the following conditions:
[0105] P j =(T j -T 0 ) / T 0 , where P j is the redundant time score of the response time corresponding to the jth preset data table in the target call request, T j is the response time corresponding to the jth preset data table in the target call request, T 0 is the preset response time threshold.
[0106] S402, adding up the redundant time scores corresponding to each preset data table in the target call request to obtain a first cache priority of the target call request.
[0107] S500: When the first cache priority of the target call request is greater than a preset first priority threshold, the target call request is added to a given cache queue to implement update adjustment of the given cache queue.
[0108] As described above, by calculating the redundant time score of the response time corresponding to each preset data table, when the redundant time score of the response time corresponding to each preset data table is higher, it indicates that the total response time corresponding to the target call request is longer, which increases the possibility of being placed in the cache queue, and directly puts the target call request corresponding to the first cache priority that exceeds the preset first priority threshold into the cache queue, preventing system failures caused by congestion of call requests, and realizing dynamic adjustment of the cache queue, thereby ensuring the rapid response of the user interface and the normal and orderly progress of the data table call.
[0109] In a specific embodiment, Figure 6 As shown, after determining that the first cache priority of the target call request is greater than the preset first priority threshold, the following steps are also included:
[0110] S001: If the number of call requests in the current cache queue does not reach a preset maximum cache number threshold, add the target call request to the current cache queue.
[0111] S002: If the number of call requests in the current cache queue has reached the preset maximum cache number threshold, for any call request in the current cache queue, obtain the first cache priority corresponding to the call request, the number of preset data tables called in the call request, the total data volume ratio of several preset data tables called in the call request, and the current cache duration of the call request in the cache queue.
[0112] Specifically, the total data volume ratio of the plurality of preset data tables called in the calling request refers to the ratio of the total data volume of the plurality of preset data tables called in the calling request to the total data volume of all preset data tables in the data table library.
[0113] S003, normalize the inverse of the current cache duration of the call request in the cache queue, the first cache priority corresponding to the call request, the number of preset data tables called in the call request, and the total data volume ratio of several preset data tables called in the call request, and obtain the corresponding normalized results; it can be understood as: according to the first cache priority corresponding to each call request in the cache queue, each first cache priority is normalized respectively; according to the number of preset data tables called by each call request in the cache queue, the number of preset data tables called by each call request is normalized respectively; according to the total data volume ratio of several preset data tables called in each call request in the cache queue, the total data volume ratio of several preset data tables called in each call request is normalized respectively; according to the inverse of the current cache duration of each call request in the cache queue, the inverse of the current cache duration of each call request in the cache queue is normalized respectively.
[0114] It should be noted that when the current cache time of a call request in the cache queue is large, its priority for being removed from the cache queue and sent to the data table library should be increased, that is, its priority for continuing to exist in the cache queue should be lowered. Therefore, the inverse of the current cache time is used as an indicator of the second cache priority.
[0115] S004, calculating the second cache priority of the call request based on the four normalized results obtained; it can be understood as: for any call request in the current cache queue, adding the four normalized results obtained to obtain the second cache priority of the call request.
[0116] S005, when the first cache priority of the target call request is less than the second cache priority of each call request in the current cache queue, the target call request is sent directly to the given data table library; otherwise, the target call request is added to the current cache queue, and the call request corresponding to the minimum value of several second cache priorities is removed from the current cache queue and sent directly to the given data table library to achieve the adjustment of the cache queue.
[0117] As mentioned above, on the basis of the first cache priority, three other factors are also considered, that is, when the number of preset data tables in the call request is small, the total data volume accounts for a small proportion, and the current cache time is long, they will be removed from the cache queue first, that is, the call request will be sent to the data table library first, realizing dynamic adjustment of the cache queue and improving the rationality of the sorting of several call requests.
[0118] Embodiment 2
[0119] like Figure 7 As shown, this embodiment 2 provides a cache queue adjustment device, including:
[0120] The first acquisition module 100 is used to obtain, for any target user and any preset data table in a given data table library, a target impact indicator vector corresponding to the response time of a target user's request to call a preset data table; the target impact indicator vector includes a first impact indicator vector, a second impact indicator vector and a third impact indicator vector; the first impact indicator vector is obtained based on a number of call requests sent by the target user in a historical time period and a data table weight of a preset data table; the second impact indicator vector is obtained based on the data volume and update status of the preset data table; the third impact indicator vector is obtained based on any call request sent by the target user in a historical time period for calling a preset data table; it can be understood that: the first impact indicator vector, the second impact indicator vector and the third impact indicator vector are all factors that affect the response time of the call request; in this embodiment, the historical time period can be the time period corresponding to the 100 days before the current moment.
[0121] In a specific embodiment, Figure 8 As shown, the first acquisition module includes a first impact indicator vector acquisition module, and the first impact indicator vector acquisition module includes:
[0122] The third acquisition module 111 is used to acquire the highest daily request number, the lowest daily request number and the average daily request number corresponding to the target user according to a number of call requests sent by the target user in a historical time period.
[0123] Specifically, the maximum daily request number is the maximum value of the number of requests sent by the target user himself every day in the historical time period; the minimum daily request number is the minimum value of the number of requests sent by the target user himself every day in the historical time period; the average daily request number is the average value of the number of requests sent by the target user himself every day in the historical time period.
[0124] The fourth acquisition module 112 is used to assign the data table weights of the pre-acquired preset data table to the maximum daily request number, the minimum daily request number, and the average daily request number corresponding to the target user, and obtain the weighted maximum daily request number, the weighted minimum daily request number, and the weighted average daily request number.
[0125] Specifically, the data table weight of the preset data table meets the following conditions:
[0126] W i =C i / ∑ m i=1 C i , where W i is the data table weight of the i-th preset data table in a given data table library, C i is the number of times the i-th preset data table is called in the historical time period, and m is the number of preset data tables in a given data table library.
[0127] Specifically, the weighted maximum daily request number is the product of the maximum daily request number and the data table weight of the preset data table; the weighted minimum daily request number is the product of the minimum daily request number and the data table weight of the preset data table; the weighted average daily request number is the product of the average daily request number and the data table weight of the preset data table.
[0128] The first combination module 113 is used to combine the vectors corresponding to the weighted maximum daily request number, the weighted minimum daily request number and the weighted average daily request number into a first impact indicator vector; it can be understood as: according to the weighted maximum daily request number corresponding to the target users, each weighted maximum daily request number is normalized; according to the weighted minimum daily request number corresponding to the target users, each weighted minimum daily request number is normalized; according to the weighted average daily request number corresponding to the target users, each weighted average daily request number is normalized; in this embodiment, no special requirements are made on the normalization method.
[0129] As described above, when obtaining the first influencing indicator vector corresponding to the response time of the preset data table, an analysis is performed from the perspective of the historical situation of the target user sending call requests, and multiple factors that may affect the response time of the preset data table are taken into account, such as the target user's highest daily request number, the lowest daily request number, and the average daily request number, and the data table weight of the preset data table is combined to obtain the first influencing indicator vector, so as to enrich the diversity of sample data from the level of target users and improve the effectiveness and reliability of model training.
[0130] In a specific embodiment, Fig. 9 As shown, the first acquisition module also includes a second impact indicator vector acquisition module, and the second impact indicator vector acquisition module includes:
[0131] The fifth acquisition module 121 is used to acquire the update frequency and average data volume of the preset data table in the historical time period; the average data volume is the average value of the total data volume after each update of the preset data table in the historical time period.
[0132] Specifically, the update frequency of the preset data table in the historical time period is the number of times the preset data table is updated in the historical time period.
[0133] The second combination module 122 is used to combine the vector corresponding to the update frequency of the preset data table in the historical time period and the vector corresponding to the average data volume of the preset data table in the historical time period into a second influencing indicator vector; it can be understood as: according to the update frequency of several preset data tables in the historical time period, the update frequency of each preset data table is normalized, and according to the average data volume of several preset data tables in the historical time period, the average data volume of each preset data table is normalized.
[0134] As mentioned above, when obtaining the second influencing indicator vector corresponding to the response time of the preset data table, the preset data table itself is analyzed, and the update frequency and average data volume of the preset data table that can affect the response time of the preset data table are taken into account, so as to enrich the diversity of sample data and improve the effectiveness and reliability of model training.
[0135] In a specific embodiment, Fig.10 As shown, the first acquisition module also includes a third impact indicator vector acquisition module, and the third impact indicator vector acquisition module includes:
[0136] The sixth acquisition module 131 is used to acquire several target data table pairs from any call request for calling a preset data table sent by the target user within a historical time period; the target data table pair refers to a table pair consisting of a preset data table and any remaining data table in the call request.
[0137] For better understanding, an example is given as follows: when the first acquisition module 100 needs to obtain the target impact indicator vector corresponding to the response time of the target user's request to call data table 1, and the call request sent by the target user during the historical time period for calling data table 1 also includes calling data table 2, data table 3, and data table 4, the target data table pairs obtained are data table 1-data table 2, data table 1-data table 3, and data table 1-data table 4, a total of three target data table pairs.
[0138] The seventh acquisition module 132 is used to acquire the number of occurrences of each target data table pair according to a number of call requests sent by each target user in a historical time period.
[0139] The third combining module 133 is used to combine the vectors corresponding to the number of times that the target data table pairs appear into a third influence indicator vector.
[0140] As mentioned above, when obtaining the third influencing indicator vector corresponding to the response time of the preset data table, the association level between the preset data tables is analyzed to obtain the total number of times each data table pair in the call request appears in the historical time period. The more times the same data table pair appears, the higher the correlation between the two preset data tables in the data table pair. Therefore, the third influencing indicator vector is obtained according to the number of times each target data table pair appears, which can enrich the diversity of sample data from the association level of the preset data tables and improve the effectiveness and reliability of model training.
[0141] The training module 200 is used to input the target impact indicator vectors corresponding to several response times of each preset data table within the historical time period into the preset machine learning model for training, and adjust the parameters according to the corresponding actual response time to obtain the target machine learning model; those skilled in the art are aware of the specific implementation method of using any machine learning model to train several target impact indicator vectors and corresponding response times, which will not be repeated here.
[0142] It should be noted that calling the same preset data table within the historical time period may correspond to multiple call requests. Taking the call of data table 1 as an example, if the target user calls data table 1 three times within the historical time period, then data table 1 corresponds to three call requests. Since the call request for calling data table 1 corresponds to the response time of data table 1 one-to-one, that is, data table 1 has a response time in each call request for calling data table 1, and since the third influence indicator vector in the target influence indicator vector is obtained according to any call request sent by the target user for calling the preset data table within the historical time period, when the target influence vector of the response time of data table 1 in the call request is used as a sample, the response time of data table 1 corresponding to the call request should be used as the corresponding actual response time for parameter adjustment.
[0143] The second acquisition module 300 is used to obtain several key influence indicator vectors corresponding to the target influence indicator vector from the target call request when a target call request sent by the target user is received, and input the several key influence indicator vectors into the target machine learning model to obtain the response time corresponding to each preset data table in the target call request; it can be understood that: the target call request is a request to call one or more preset data tables at the same time, and each preset data table corresponding to the call has a key influence indicator vector; the key influence indicator vector is obtained in the same way as the target influence indicator vector.
[0144] As mentioned above, by adopting multiple target influence indicator vectors to train the preset machine learning model to obtain the target machine learning model, when receiving a new target call request, it can accurately predict the response time of each preset data table called by the target call request, so as to improve the prediction accuracy of the total response time of the target call request, thereby providing a determining factor for determining whether it can be added to the cache queue.
[0145] The first calculation module 400 is used to calculate a first cache priority of the target call request according to a preset response time threshold and a response time corresponding to each preset data table in the target call request.
[0146] In a specific embodiment, Fig.11 As shown, the first calculation module 400 includes:
[0147] The second calculation module 401 is used to calculate the redundant time score of the response time corresponding to each preset data table according to the preset response time threshold and the response time corresponding to each preset data table in the target call request; the redundant time score is the ratio of the difference between the response time corresponding to any preset data table in the target call request and the response time threshold to the response time threshold.
[0148] Specifically, the redundant time score of the response time corresponding to the preset data table meets the following conditions:
[0149] P j =(T j -T 0 ) / T 0 , where P j is the redundant time score of the response time corresponding to the jth preset data table in the target call request, T j is the response time corresponding to the jth preset data table in the target call request, T 0 is the preset response time threshold.
[0150] The third calculation module 402 is used to add the redundant time score corresponding to each preset data table in the target call request to obtain the first cache priority of the target call request.
[0151] The adjustment module 500 is used to add the target call request to a given cache queue when the first cache priority of the target call request is greater than a preset first priority threshold, so as to implement update adjustment of the given cache queue.
[0152] As described above, by calculating the redundant time score of the response time corresponding to each preset data table, when the redundant time score of the response time corresponding to each preset data table is higher, it indicates that the total response time corresponding to the target call request is longer, which increases the possibility of being placed in the cache queue, and directly places the target call request corresponding to the first cache priority that exceeds the preset first priority threshold into the cache queue, preventing system failures caused by congestion of call requests and ensuring the normal and orderly progress of data table calls.
[0153] In a specific embodiment, Fig.12 As shown, the device also includes:
[0154] The adding module 001 is used to add the target calling request to the current cache queue if the number of calling requests in the current cache queue does not reach a preset maximum cache number threshold.
[0155] The eighth acquisition module 002 is used to obtain, if the number of call requests in the current cache queue has reached the preset maximum cache number threshold, for any call request in the current cache queue, the first cache priority corresponding to the call request, the number of preset data tables called in the call request, the proportion of the total data volume of several preset data tables called in the call request, and the current cache duration of the call request in the cache queue.
[0156] Specifically, the total data volume ratio of the plurality of preset data tables called in the calling request refers to the ratio of the total data volume of the plurality of preset data tables called in the calling request to the total data volume of all preset data tables in the data table library.
[0157] The first processing module 003 is used to normalize the inverse of the current cache duration of the call request in the cache queue, the first cache priority corresponding to the call request, the number of preset data tables called in the call request, and the total data volume ratio of several preset data tables called in the call request, and obtain the corresponding normalized results; it can be understood as: according to the first cache priority corresponding to each call request in the cache queue, each first cache priority is normalized respectively; according to the number of preset data tables called by each call request in the cache queue, the number of preset data tables called by each call request is normalized respectively; according to the total data volume ratio of several preset data tables called in each call request in the cache queue, the total data volume ratio of several preset data tables called in each call request is normalized respectively; according to the inverse of the current cache duration of each call request in the cache queue, the inverse of the current cache duration of each call request in the cache queue is normalized respectively.
[0158] It should be noted that when the current cache time of a call request in the cache queue is large, its priority for being removed from the cache queue and sent to the data table library should be increased, that is, its priority for continuing to exist in the cache queue should be lowered. Therefore, the inverse of the current cache time is used as an indicator of the second cache priority.
[0159] The fourth calculation module 004 is used to calculate the second cache priority of the call request based on the four normalized results obtained; it can be understood that: for any call request in the current cache queue, the four normalized results are added together to obtain the second cache priority of the call request.
[0160] The second processing module 005 is used to send the target call request directly to the given data table library when the first cache priority of the target call request is less than the second cache priority of each call request in the current cache queue; otherwise, the target call request is added to the current cache queue, and the call request corresponding to the minimum value of several second cache priorities is removed from the current cache queue and sent directly to the given data table library to achieve the adjustment of the cache queue.
[0161] As mentioned above, on the basis of the first cache priority, three other factors are also considered, that is, when the number of preset data tables in the call request is small, the total data volume accounts for a small proportion, and the current cache time is long, they will be removed from the cache queue first, that is, the call request will be sent to the data table library first, realizing dynamic adjustment of the cache queue and improving the rationality of the sorting of several call requests.
[0162] Embodiment 3
[0163] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:
[0164] For any target user and any preset data table in a given data table library, a target impact indicator vector corresponding to the response time of the target user's request to call the preset data table is obtained; the target impact indicator vector includes a first impact indicator vector, a second impact indicator vector and a third impact indicator vector; the first impact indicator vector is obtained based on a number of call requests sent by the target user in a historical time period and a data table weight of the preset data table; the second impact indicator vector is obtained based on the data volume and update status of the preset data table; the third impact indicator vector is obtained based on any call request sent by the target user in a historical time period for calling the preset data table.
[0165] The target impact indicator vectors corresponding to several response times of each preset data table within the historical time period are input into the preset machine learning model for training, and the parameters are adjusted according to the corresponding actual response time to obtain the target machine learning model.
[0166] When a target call request sent by a target user is received, several key impact indicator vectors corresponding to the target impact indicator vector are obtained from the target call request, and the several key impact indicator vectors are input into the target machine learning model to obtain the response time corresponding to each preset data table in the target call request.
[0167] The first cache priority of the target call request is calculated according to a preset response time threshold and a response time corresponding to each preset data table in the target call request.
[0168] When the first cache priority of the target call request is greater than a preset first priority threshold, the target call request is added to a given cache queue to implement update adjustment of the given cache queue.
[0169] Embodiment 4
[0170] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0171] For any target user and any preset data table in a given data table library, a target impact indicator vector corresponding to the response time of the target user's request to call the preset data table is obtained; the target impact indicator vector includes a first impact indicator vector, a second impact indicator vector and a third impact indicator vector; the first impact indicator vector is obtained based on a number of call requests sent by the target user in a historical time period and a data table weight of the preset data table; the second impact indicator vector is obtained based on the data volume and update status of the preset data table; the third impact indicator vector is obtained based on any call request sent by the target user in a historical time period for calling the preset data table.
[0172] The target impact indicator vectors corresponding to several response times of each preset data table within the historical time period are input into the preset machine learning model for training, and the parameters are adjusted according to the corresponding actual response time to obtain the target machine learning model.
[0173] When a target call request sent by a target user is received, several key impact indicator vectors corresponding to the target impact indicator vector are obtained from the target call request, and the several key impact indicator vectors are input into the target machine learning model to obtain the response time corresponding to each preset data table in the target call request.
[0174] The first cache priority of the target call request is calculated according to a preset response time threshold and a response time corresponding to each preset data table in the target call request.
[0175] When the first cache priority of the target call request is greater than a preset first priority threshold, the target call request is added to a given cache queue to implement update adjustment of the given cache queue.
[0176] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0177] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0178] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will also be appreciated by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. A method for adjusting a cache queue, characterized in that: The following steps are involved: For any target user and any preset data table in a given data table library, a target impact indicator vector corresponding to the response time of a target user's request to call a preset data table is obtained; the target impact indicator vector includes a first impact indicator vector, a second impact indicator vector and a third impact indicator vector; the first impact indicator vector is obtained based on a number of call requests sent by the target user in a historical time period and a data table weight of the preset data table; the second impact indicator vector is obtained based on the data volume and update status of the preset data table; the third impact indicator vector is obtained based on any call request sent by the target user in a historical time period for calling a preset data table; Input the target impact indicator vectors corresponding to several response times of each preset data table in the historical time period into the preset machine learning model for training, and adjust the parameters according to the corresponding actual response time to obtain the target machine learning model; When a target call request sent by a target user is received, a number of key impact indicator vectors corresponding to the target impact indicator vector are obtained from the target call request, and the key impact indicator vectors are input into the target machine learning model to obtain the response time corresponding to each preset data table in the target call request; Calculate the first cache priority of the target call request according to a preset response time threshold and the response time corresponding to each preset data table in the target call request; When the first cache priority of the target call request is greater than a preset first priority threshold, the target call request is added to a given cache queue to implement update adjustment of the given cache queue.
2. The method for adjusting the cache queue according to claim 1, characterized in that: The first impact indicator vector is also obtained by the following steps: According to a number of call requests sent by the target user in the historical time period, obtain the highest daily request number, the lowest daily request number and the average daily request number corresponding to the target user; The data table weights of the pre-obtained preset data table are respectively assigned to the highest daily request count, the lowest daily request count, and the average daily request count corresponding to the target user, and the weighted highest daily request count, the weighted lowest daily request count, and the weighted average daily request count are obtained; The weighted maximum daily request number, the weighted minimum daily request number, and the weighted average daily request number are normalized respectively, and the normalized values obtained respectively are combined into a first impact indicator vector.
3. The method for adjusting the cache queue according to claim 1, characterized in that: The second impact indicator vector is also obtained by the following steps: Obtaining the update frequency and average data volume of the preset data table in the historical time period; the average data volume is the average value of the total data volume after each update of the preset data table in the historical time period; The update frequency of the preset data table in the historical time period and the average data volume of the preset data table in the historical time period are respectively normalized, and the respectively obtained normalized values are combined into a second impact indicator vector.
4. The method for adjusting the cache queue according to claim 1, characterized in that: The third impact indicator vector is also obtained by the following steps: For any call request for calling a preset data table sent by a target user within a historical time period, a plurality of target data table pairs are obtained from the call request; the target data table pair refers to a table pair consisting of a preset data table and any remaining data table in the call request; According to a number of call requests sent by each target user in a historical time period, the number of occurrences of each target data table pair is obtained; The number of occurrences of each target data table is normalized, and the respectively obtained normalized values are combined into a third influence index vector.
5. The method for adjusting the cache queue according to claim 1, characterized in that: The step of calculating the first cache priority of the target call request according to the preset response time threshold and the response time corresponding to each preset data table in the target call request comprises the following steps: According to the preset response time threshold and the response time corresponding to each preset data table in the target call request, the redundant time score of the response time corresponding to each preset data table is calculated; the redundant time score is the ratio of the difference between the response time corresponding to any preset data table in the target call request and the response time threshold to the response time threshold; The redundant time scores corresponding to each preset data table in the target call request are added together to obtain the first cache priority of the target call request.
6. The method for adjusting the cache queue according to claim 1, characterized in that: After determining that the first cache priority of the target call request is greater than a preset first priority threshold, the following steps are also included: If the number of call requests in the current cache queue does not reach the preset maximum cache number threshold, the target call request is added to the current cache queue; If the number of call requests in the current cache queue has reached the preset maximum cache number threshold, for any call request in the current cache queue, obtain the first cache priority corresponding to the call request, the number of preset data tables called in the call request, the total data volume ratio of several preset data tables called in the call request, and the current cache duration of the call request in the cache queue; Normalize the inverse of the current cache time of the call request in the cache queue, the first cache priority corresponding to the call request, the number of preset data tables called in the call request, and the total data volume ratio of several preset data tables called in the call request to obtain the corresponding normalized result; The second cache priority of the call request is calculated based on the four normalized results obtained; When the first cache priority of the target call request is less than the second cache priority of each call request in the current cache queue, the target call request is sent directly to the given data table library; otherwise, the target call request is added to the current cache queue, and the call request corresponding to the minimum value of several second cache priorities is removed from the current cache queue and sent directly to the given data table library to achieve the adjustment of the cache queue.
7. A cache queue adjustment device, characterized in that: The device comprises: A first acquisition module is used to acquire, for any target user and any preset data table in a given data table library, a target impact indicator vector corresponding to a response time of a target user's request to call a preset data table; the target impact indicator vector includes a first impact indicator vector, a second impact indicator vector and a third impact indicator vector; the first impact indicator vector is acquired based on a number of call requests sent by the target user in a historical time period and a data table weight of the preset data table; the second impact indicator vector is acquired based on the data volume and update status of the preset data table; the third impact indicator vector is acquired based on any call request sent by the target user in a historical time period for calling a preset data table; A training module is used to input the target impact indicator vectors corresponding to several response times of each preset data table in the historical time period into the preset machine learning model for training, and adjust the parameters according to the corresponding actual response time to obtain the target machine learning model; The second acquisition module is used to obtain a number of key impact indicator vectors corresponding to the target impact indicator vector from the target call request when receiving the target call request sent by the target user, and input the several key impact indicator vectors into the target machine learning model to obtain the response time corresponding to each preset data table in the target call request; A first calculation module, configured to calculate a first cache priority of a target call request according to a preset response time threshold and a response time corresponding to each preset data table in the target call request; The adjustment module is used to add the target call request to a given cache queue when the first cache priority of the target call request is greater than a preset first priority threshold, so as to implement update adjustment of the given cache queue.
8. The buffer queue adjustment device according to claim 7, characterized in that: The first acquisition module includes a first impact indicator vector acquisition module, and the first impact indicator vector acquisition module includes: The third acquisition module is used to obtain the highest daily request number, the lowest daily request number and the average daily request number corresponding to the target user according to a number of call requests sent by the target user in a historical time period; The fourth acquisition module is used to assign the data table weight of the pre-acquired preset data table to the maximum daily request number, the minimum daily request number, and the average daily request number corresponding to the target user, respectively, to obtain the weighted maximum daily request number, the weighted minimum daily request number, and the weighted average daily request number; The first combination module is used to normalize the weighted maximum daily request number, the weighted minimum daily request number and the weighted average daily request number respectively, and combine the respectively obtained normalized values into a first impact indicator vector.
9. The buffer queue adjustment device according to claim 7, characterized in that: The first acquisition module further includes a second impact indicator vector acquisition module, and the second impact indicator vector acquisition module includes: A fifth acquisition module is used to acquire the update frequency and average data volume of the preset data table in the historical time period; the average data volume is the average value of the total data volume after each update of the preset data table in the historical time period; The second combination module is used to normalize the update frequency of the preset data table in the historical time period and the average data volume of the preset data table in the historical time period, and combine the respectively obtained normalized values into a second impact indicator vector.
10. The buffer queue adjustment device according to claim 7, characterized in that: The first acquisition module further includes a third impact indicator vector acquisition module, and the third impact indicator vector acquisition module includes: A sixth acquisition module is used to acquire a plurality of target data table pairs from any call request for calling a preset data table sent by a target user within a historical time period; the target data table pair refers to a table pair consisting of a preset data table and any remaining data table in the call request; A seventh acquisition module, used to acquire the number of occurrences of each target data table pair according to a number of call requests sent by each target user in a historical time period; The third combination module is used to normalize the number of occurrences of each target data table pair and combine the respectively obtained normalized values into a third influence indicator vector.
11. The buffer queue adjustment device according to claim 7, characterized in that: The first calculation module includes: A second calculation module is used to calculate a redundant time score of the response time corresponding to each preset data table according to a preset response time threshold and the response time corresponding to each preset data table in the target call request; the redundant time score is a ratio of a difference between the response time corresponding to any preset data table in the target call request and the response time threshold to the response time threshold; The third calculation module is used to add the redundant time score corresponding to each preset data table in the target call request to obtain the first cache priority of the target call request.
12. The buffer queue adjustment device according to claim 7, characterized in that: The device also includes: An adding module, used for adding the target calling request to the current cache queue if the number of calling requests in the current cache queue does not reach a preset maximum cache number threshold; An eighth acquisition module is used to obtain, for any call request in the current cache queue, the first cache priority corresponding to the call request, the number of preset data tables called in the call request, the total data volume ratio of several preset data tables called in the call request, and the current cache duration of the call request in the cache queue if the number of call requests in the current cache queue has reached the preset maximum cache quantity threshold; The first processing module is used to normalize the inverse of the current cache time of the call request in the cache queue, the first cache priority corresponding to the call request, the number of preset data tables called in the call request, and the total data volume ratio of several preset data tables called in the call request, and obtain the corresponding normalization result; A fourth calculation module, used for calculating the second cache priority of the call request according to the four normalized results obtained; The second processing module is used to send the target call request directly to the given data table library when the first cache priority of the target call request is less than the second cache priority of each call request in the current cache queue; otherwise, the target call request is added to the current cache queue, and the call request corresponding to the minimum value of several second cache priorities is removed from the current cache queue and sent directly to the given data table library to realize the adjustment of the cache queue.
13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the cache queue adjustment method according to any one of claims 1 to 6 is implemented.
14. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the cache queue adjustment method according to any one of claims 1 to 6 is implemented.
