Data preloading method, device, electronic equipment, medium and product

By pre-determining and storing the result of the second query request with high probability in advance when the user querys the first request, the problem of low cache hit rate is solved, and the query speed and cache hit rate are improved.

CN114491178BActive Publication Date: 2024-12-13BANK OF CHINA FINANCIAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210142403.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-16
Publication Date
2024-12-13
Estimated Expiration
2042-02-16

AI Technical Summary

Technical Problem

In the prior art, the probability of the result of the cache hit query request is low, resulting in the user query speed still being slow, and it is necessary to improve the cache hit rate.

Method used

When the user querys the first query request, the subsequent high-probability second query request is predetermined and the results are stored in the cache in advance, thereby increasing the cache hit rate.

Benefits of technology

During the process of multiple consecutive queries, the query speed and cache hit rate are significantly improved, and the query result acquisition time is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114491178B_ABST
    Figure CN114491178B_ABST
Patent Text Reader

Abstract

The present application discloses a data preloading method, device, electronic device, medium and product, which can be applied to the financial field or other fields. If a first query request is obtained, a second query request is determined, and the second query request is a query request whose probability of being queried is higher than a preset threshold when the first query request has been queried; because in the case of querying the first query request, the probability of subsequently querying the second query request is relatively high, if the cache of the electronic device does not include the query result corresponding to the second query request, it takes a long time to query the query result corresponding to the second query request, so when the user queries the first query request, the second query request that will be queried later is determined, so that the query result of the second query request is preloaded into the cache of the electronic device in advance, thereby improving the cache hit rate when the second query request is queried later, and speeding up the overall query speed of the user in the process of multiple consecutive queries.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to a data preloading method, device, electronic device, medium and product. Background Art

[0002] In order to improve the query speed of users, some query results are usually stored in the cache. If the query result corresponding to the query request is in the cache, the query result can be quickly fed back to the user, thereby improving the query speed of the user.

[0003] Currently, the probability of query results corresponding to query requests hitting the cache is low, so the user's query speed is still slow. Therefore, how to improve the probability of query results corresponding to query requests hitting the cache is a difficult problem that technical personnel in this field continue to solve. Summary of the invention

[0004] In view of this, the present application provides a data preloading method, device, electronic device, medium and product.

[0005] To achieve the above objectives, this application provides the following technical solutions:

[0006] According to a first aspect of an embodiment of the present disclosure, a data preloading method is provided, which is applied to an electronic device, and the data preloading method includes:

[0007] If the first query request is obtained, a second query request is determined, where the second query request is a query request for which the probability of being queried is higher than a preset threshold when the first query request has been queried;

[0008] Sending the first query request to the server;

[0009] Sending the second query request to the server;

[0010] receiving a second query result fed back by the server in response to the second query request;

[0011] Storing the second query result in a cache;

[0012] Receiving a first query result fed back by the server in response to the first query request;

[0013] If the second query request input by the user is received, the second query result is obtained from the cache.

[0014] According to a second aspect of an embodiment of the present disclosure, a data preloading device is provided, which is applied to an electronic device, and the data preloading device includes:

[0015] A determination module, configured to determine a second query request if the first query request is obtained, wherein the second query request is a query request for which a probability of being queried is higher than a preset threshold when the first query request has been queried;

[0016] A first sending module, used for sending the first query request to a server;

[0017] A second sending module, used for sending the second query request to the server;

[0018] A first receiving module, configured to receive a second query result fed back by the server in response to the second query request;

[0019] A storage module, used for storing the second query result in a cache;

[0020] A second receiving module, configured to receive a first query result fed back by the server in response to the first query request;

[0021] The acquisition module is configured to acquire the second query result from the cache if the second query request input by the user is received.

[0022] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0023] processor;

[0024] a memory for storing instructions executable by the processor;

[0025] Wherein, the processor is configured to execute the instructions to implement the data preloading method as described in the first aspect.

[0026] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the data preloading method as described in the first aspect.

[0027] According to the fourth aspect of an embodiment of the present disclosure, a computer program product is provided, which can be directly loaded into the internal memory of a computer. The memory is the memory included in the electronic device described in the third aspect and contains software code. After the computer program is loaded and executed, it can implement the data preloading method described in the first aspect.

[0028] It can be known from the above technical scheme that in the data preloading method provided by the present application, if the first query request is obtained, the second query request is determined, and the second query request is a query request with a probability of being queried higher than a preset threshold when the first query request has been queried; the first query request is sent to the server; the second query request is sent to the server; the second query result fed back by the server for the second query request is received; the second query result is stored in the cache; the first query result fed back by the server for the first query request is received; if the second query request input by the user is received, the second query result is obtained from the cache. Since the probability of continuing to query the second query request is relatively high in the case of querying the first query request, if the query result corresponding to the second query request is not included in the cache, it takes a long time to query the query result corresponding to the second query request. Therefore, in the case of the user querying the first query request, the second query request that the subsequent user is about to query is determined, so that the query result of the second query request is preloaded into the cache of the electronic device in advance. Since the user has a high probability of querying the second query request, the cache has a high probability of hitting the user's subsequent query request, thereby improving the cache hit rate and speeding up the overall query speed of the user in the process of multiple consecutive queries. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0030] Figure 1 A schematic diagram of the hardware architecture involved in this application;

[0031] Figure 2 A flowchart of a data preloading method provided in an embodiment of the present application;

[0032] Figure 3 A structural diagram of a data preloading device provided in an embodiment of the present application;

[0033] Figure 4 It is a block diagram showing a device used in an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0035] The embodiments of the present application provide a data preloading method, device, electronic device, medium and product. Before introducing the technical solution provided by the present application, the hardware architecture involved in the present application is first described.

[0036] Please refer to the attached Figure 1 , is a schematic diagram of the hardware architecture involved in this application, and the hardware architecture includes: an electronic device 11 and a server 12.

[0037] Exemplarily, the electronic device 11 can be any electronic product that can interact with a user through one or more methods such as a keyboard, touchpad, touch screen, remote control, voice interaction or handwriting device, such as a mobile phone, a laptop computer, a tablet computer, a PDA, a personal computer, a wearable device, a smart TV, a PAD, etc.

[0038] It should be noted that Figure 1 This is just an example. There are many types of electronic devices, not limited to Figure 1 Smartphone in the.

[0039] Exemplarily, the server 12 may be a single server, or a server cluster consisting of multiple servers, or a cloud computing server center. The server 12 may include a processor, a memory, a network interface, and the like.

[0040] Exemplarily, the electronic device 11 may establish a connection and communicate with the server 12 via a wireless communication network.

[0041] The electronic device 11 may run a client, which may be an application client or a web client. The user may input a query request through the client running on the electronic device 11 and display the query result fed back by the server.

[0042] The electronic device 11 may send a query request to the server 12 , and the server 12 responds to the query request and feeds back the query result corresponding to the query request to the electronic device 11 , which then displays it to the user through the client.

[0043] Those skilled in the art should understand that the above-mentioned electronic devices and servers are only examples. Other existing or future possible electronic devices or servers that can be applied to this disclosure should also be included within the protection scope of this disclosure and are hereby incorporated herein by reference.

[0044] Next, in combination with the above hardware architecture, the data preloading method provided by the embodiments of this application will be described.

[0045] As Figure 2 shown, it is a flowchart of the data preloading method provided by the embodiments of this application. This method can be applied to the electronic device 11 in the above hardware architecture. During the implementation of this method, the following steps S21 to step S27 are included.

[0046] Step S21: If a first query request is obtained, determine a second query request, where the second query request is a query request whose probability of being queried immediately after the first query request has been queried is higher than a preset threshold.

[0047] Exemplarily, the preset threshold can be determined based on the actual situation and is not limited here.

[0048] In an optional embodiment, the first query statement can be voice or text. If the first query statement is voice, it is necessary to convert the voice into text.

[0049] In an optional implementation manner, the first query request includes multiple keywords.

[0050] In an optional implementation manner, the first query request can be obtained from the query statement input by the user.

[0051] The embodiments of this application provide but are not limited to the following methods for obtaining the first query request from the query statement.

[0052] The first method for obtaining the first query request includes:

[0053] Step A1: Divide the query statement to obtain multiple words.

[0054] Optionally, if the query statement is "loan contract for customer's house purchase", then the words included in the query statement are: customer, house purchase, of, loan contract.

[0055] Step A2: According to the preset rules, obtain keywords from the multiple words to obtain the first query request composed of keywords.

[0056] Optionally, the preset rules may include: removing the words belonging to the stop words among the multiple words obtained in step A1. Suppose the stop words include: of, de, le, ma, ba, in, among, etc. Then, the keywords obtained through step A2 include: customer, house purchase, loan contract.

[0057] The second method for obtaining the first query request includes: a keyword extraction method based on statistical features to obtain the first query request composed of keywords.

[0058] The keyword extraction algorithm based on statistical features uses the statistical information of the words in the query statement to extract the keywords of the query statement.

[0059] The third method for obtaining the first query request includes: a keyword extraction algorithm based on a word graph model, such as a TextRank algorithm.

[0060] The keyword extraction algorithm based on the word graph model first constructs a language network graph of the query statement, then analyzes the language network graph, and searches for words or phrases that play an important role on the language network graph. These phrases are the keywords of the query statement, so as to obtain the first query request composed of keywords.

[0061] A fourth method for obtaining the first query request includes: a keyword extraction algorithm based on a topic model, such as an LDA algorithm.

[0062] The keyword extraction algorithm based on the topic model mainly uses the properties of topic distribution in the topic model to extract keywords to obtain the first query request composed of keywords.

[0063] Exemplarily, the method for obtaining the second query request may be the same as the method for obtaining the first query request.

[0064] Step S22: Send the first query request to the server.

[0065] Step S23: Send the second query request to the server.

[0066] Step S24: receiving a second query result fed back by the server in response to the second query request.

[0067] Step S25: store the second query result in a cache.

[0068] Step S26: receiving a first query result fed back by the server in response to the first query request.

[0069] Step S27: if the second query request input by the user is received, the second query result is obtained from the cache.

[0070] It should be noted that the order of the steps in this embodiment is only an example. In actual application scenarios, there is no fixed order between the above-mentioned step S22 and step S23, or between step S24 and step S26. When there are sufficient processing resources, the above-mentioned step S22 and step S23 can be executed in parallel, or step S24 and step S26 can be executed in parallel.

[0071] In the data preloading method provided in the embodiment of the present application, if a first query request is obtained, a second query request is determined, and the second query request is a query request with a probability of being queried higher than a preset threshold when the first query request has been queried; the first query request is sent to a server; the second query request is sent to a server; the second query result fed back by the server for the second query request is received; the second query result is stored in a cache; the first query result fed back by the server for the first query request is received; if a second query request input by a user is received, the second query result is obtained from the cache. Since the probability of continuing to query the second query request is relatively high in the case of querying the first query request, if the cache does not include the query result corresponding to the second query request, it takes a long time to query the query result corresponding to the second query request. Therefore, in the case of the user querying the first query request, the second query request that the user is about to query is determined, so that the query result of the second query request is preloaded into the cache of the electronic device in advance. Since the user has a high probability of querying the second query request, the cache has a high probability of hitting the user's subsequent query request, thereby improving the cache hit rate and speeding up the overall query speed of the user in the process of multiple consecutive queries.

[0072] It is understandable that the query results stored in the cache of the electronic device may be different for different first query requests, that is, the query results stored in the cache of the electronic device vary with different first query requests.

[0073] It is understandable that there are multiple ways to implement step S22. The embodiment of the present application provides but is not limited to the following method, which includes the following steps B1 to B4.

[0074] Step B1: Obtain multiple query records, wherein the query records include query requests corresponding to multiple query times respectively, the absolute value of the difference between the query times of two adjacent query requests contained in the query record is less than or equal to a first preset duration, and the multiple query requests contained in the query record are sorted from early to late according to the query time.

[0075] Exemplarily, the server 12 may store query records corresponding to each user. Each user may have one or more query records.

[0076] Exemplarily, each query record includes multiple query requests.

[0077] The absolute value of the difference between query times of two query requests that are adjacent in time among the multiple query requests included in the query record is less than or equal to the first preset duration.

[0078] The query records contain multiple query requests generated during the process of the user performing multiple consecutive queries. The following example illustrates multiple consecutive queries.

[0079] Assume that the user inputs query request 1 at query time 1, query request 2 at query time 2, query request 3 at query time 3, query request 4 at query time 4, query request 5 at query time 5, and query request 6 at query time 6.

[0080] If query time 2 is later than query time 1, query time 3 is later than query time 2, query time 4 is later than query time 3, query time 5 is later than query time 4, and query time 6 is later than query time 5. If the difference between query time 2 and query time 1 is less than the first preset time, the difference between query time 3 and query time 2 is less than the first preset time, the difference between query time 4 and query time 3 is greater than the first preset time, the difference between query time 5 and query time 4 is less than the first preset time, and the difference between query time 6 and query time 5 is greater than the first preset time, then it is determined that there are three query records, which are: query record 1 {(query time 1, query request 1), (query time 2, query request 2), (query time 3, query request 3)}, query record 2 {(query time 4, query request 4), (query time 5, query request 5)}, query record 3 {(query time 6, query request 6)}.

[0081] It is understandable that multiple query requests belonging to the same query record may have certain associations, so the query requests obtained by multiple consecutive queries are classified into the same query record.

[0082] Exemplarily, the first preset duration may be 1 hour, or 1 day, or 1 month, or any other duration, which may be determined based on actual conditions and is not limited here.

[0083] Exemplarily, the query request includes one or more keywords. The query request is described below by taking an example. If a user enters "notebook paper quality" in an input box of a user interface displayed by a client, then the query request includes the keywords entered by the user in the input box, that is, the query request includes "notebook" and "paper quality".

[0084] There are many ways to implement step B1, and the embodiments of the present application provide but are not limited to the following two.

[0085] The first implementation method of step B1 includes the following steps B11 to B13.

[0086] Step B11: searching for a target user type corresponding to the target user account corresponding to the first query request from a pre-constructed correspondence relationship between user accounts and user types.

[0087] Exemplarily, when a query is performed through a client in an electronic device, if the user has logged into the client, the target user account is the account of the logged-in client.

[0088] Exemplarily, when querying through a client in an electronic device, the user may not be logged into the client. In this case, the target user account is a unique identifier of the electronic device.

[0089] Exemplarily, if the electronic device is a smart phone, the unique identifier may be IMSI (International Mobile Subscriber Identification Number) or IMEI (International Mobile Equipment Identification Number).

[0090] Step B12: If the target user type belongs to the first type, multiple query records corresponding to the target user account are obtained.

[0091] Exemplarily, multiple query records of the target user account within a preset time period may be obtained; exemplary, multiple query records of the target user account at all times may be obtained.

[0092] Step B13: If the target user type belongs to the second type, multiple query records corresponding to each user account are obtained.

[0093] Exemplarily, a plurality of query records corresponding to each user account within a preset time period may be obtained; exemplary, a plurality of query records corresponding to each user account at all times may be obtained.

[0094] For the description of the preset time period, please refer to the description of the preset time period in the implementation of the second step B1, which will not be repeated here.

[0095] It is understandable that some users have different query patterns from those of general users during multiple consecutive queries. In this case, the user is considered to belong to the first type. For example, if user A continues to input query request B after obtaining query result A corresponding to query request A, while most users will not continue to input query request B after obtaining query result A corresponding to query request A, but will continue to input query request C. In this case, user A is considered to belong to the first type, that is, the query pattern of general users cannot be used to predict the query pattern of user A.

[0096] It is understandable that some users have the same query pattern as the general public during multiple consecutive queries. In this case, the user is considered to belong to the second type. For example, if user A continues to input query request B after obtaining query result A corresponding to query request A, and most users continue to input query request B after obtaining query result A corresponding to query request A, then user A is considered to belong to the second type, that is, the query pattern of the general public can be used to predict the query pattern of user A.

[0097] Exemplarily, the correspondence between the user account and the user type can be determined based on the user's historical query records and the query records of general users.

[0098] In an optional implementation, if the target user type belongs to the first type, the multiple query records obtained in step B1 are multiple query records corresponding to the same user. If the target user type belongs to the second type, the multiple query records obtained in step B1 are multiple query records corresponding to different users.

[0099] The second implementation method of step B1 includes the following steps B21 to B23.

[0100] Step B21: Determine the query type to which the first query request belongs.

[0101] Step B22: If the query type is the first query type, multiple query records within a preset time period are obtained.

[0102] Step B23: If the query type is the second query type, multiple query records within all time periods are obtained.

[0103] It is understandable that as time goes by, the query needs of users are constantly changing in different periods. For example, between December 1 and December 31, 2021, the query needs of users may be epidemic-Xi'an, and the corresponding query log is {(query time December 1, 2021 at 13:00, where the epidemic is more serious), (query time December 1, 2021 at 13:01, heartwarming stories during the epidemic in Xi'an)}, between January 1 and January 31, 2022, the query needs of users may be epidemic-whether it affects going home for the New Year, and the corresponding query log is {(query time January 1, 2022 at 13:00, where the epidemic is more serious), (query time January 1, 2022 at 13:01, whether it affects going home for the New Year)}. Therefore, the query logs corresponding to each user in the preset time period closest to the current time can be obtained.

[0104] Exemplarily, the duration of the preset time period may be L hours or G days, where L is any value greater than 0, and G is any value greater than 0.

[0105] It is understandable that some query requirements will not change over time. For example, after purchasing a vehicle, a user may inquire about the vehicle's loan discounts, the vehicle's purchase tax, or the method for applying for a temporary license plate for the vehicle. The corresponding query log is {(query time 11, query vehicle loan discounts), (query time 12, vehicle purchase tax), (query time 13, method for applying for a temporary license plate for the vehicle)}.

[0106] In an embodiment of the present application, multiple consecutive queries may be classified in advance, for example, query requests whose query requirements do not change over time may be classified into the second query type, and query requests whose query requirements may change over time may be classified into the first query type.

[0107] Step B2: obtaining a plurality of target query records including the first query request from the plurality of query records.

[0108] Step B3: acquiring target query requests corresponding to the plurality of target query records respectively, wherein the target query request corresponding to the target query record is the next query request of the first query request in the target query record.

[0109] Step B3 is explained by taking target query record 21 {(query time 21, query request 21), (query time 22, query request 22), (query time 23, query request 23)} and target query record 22 {(query time 24, query request 21), (query time 25, query request 23)} as examples.

[0110] If the first query request is query request 21, then for the target query record 21, the next query request of query request 21 is query request 22, or the next query request of query request 21 is query request 22 and query request 23, or the next query request of query request 21 is query request 23. Then for the target query record 22, the next query request of query request 22 is query request 23.

[0111] Step B4: Filter out the second query request from the target query requests corresponding to the multiple target query records.

[0112] There are many ways to implement step B4, and the embodiments of the present application provide but are not limited to the following three.

[0113] The first method for implementing step B4 includes the following steps C11 to C12.

[0114] Step C11: grouping the same target query requests among the target query requests corresponding to the plurality of target query records into the same query request set.

[0115] Still taking the above as an example, if the target query requests corresponding to the target query record 21 are query request 22 and query request 23; the target query request corresponding to the target query record 22 is query request 23, then the two query requests 23 are divided into the same query request set, and query request 22 is divided into another query request set.

[0116] Step C12: Determine the target query request in the query request set that includes the largest number of the target query requests as the second query request.

[0117] Still taking the above as an example, the query request 23 is the second query request.

[0118] The second method for implementing step B4 includes the following steps C21.

[0119] Step C21: Determine that the target query requests corresponding to the multiple target query records are all the second query requests.

[0120] Still taking the above as an example, if the target query request corresponding to the target query record 21 is query request 22 and query request 23; the target query request corresponding to the target query record 22 is query request 23, then the two query requests 23 are divided into the same query request set, and query request 22 is divided into another query request set. Then query request 23 and query request 22 are both second query requests. That is, the query results of query request 23 and the query results of query request 22 are both preloaded into the cache.

[0121] The third method for implementing step B4 includes the following steps C31 to C32.

[0122] Step C31: Filter out time-consuming query requests whose query time is greater than or equal to a second preset time length from the target query requests respectively corresponding to the plurality of target query records.

[0123] Exemplarily, since the target query request has been queried by the user, it can be determined that the historical query time of the target query request is the query time in step C31.

[0124] Exemplarily, step C31 includes: dividing the same target query requests among the target query requests corresponding to the multiple target query records into the same query request set; sorting the query request set in descending order according to the number of target query requests included in the query request set to obtain a sorting result; obtaining the first preset number of query request sets from the sorting result; and filtering out time-consuming query requests whose query time is greater than or equal to a second preset time length from the target query requests included in the preset number of query request sets.

[0125] Step C32: Determine the time-consuming query request as the second query request.

[0126] In a third implementation, query results of time-consuming query requests that take a long time to query are preloaded in advance, and query results corresponding to query requests that take a short time may not be loaded in advance.

[0127] The method is described in detail in the embodiments disclosed in the above-mentioned application. The method of the application can be implemented by various forms of devices. Therefore, the application also discloses a device, and a specific embodiment is given below for detailed description.

[0128] like Figure 3 As shown, it is a structural diagram of a data preloading device provided in an embodiment of the present application, and the device includes: a determination module 31, a first sending module 32, a second sending module 33, a first receiving module 34, a storage module 35, a second receiving module 36 and an acquisition module 37, wherein:

[0129] A determination module 31, configured to determine a second query request if the first query request is obtained, wherein the second query request is a query request for which a probability of being queried is higher than a preset threshold when the first query request has been queried;

[0130] A first sending module 32, configured to send the first query request to a server;

[0131] A second sending module 33, used to send the second query request to the server;

[0132] A first receiving module 34 is configured to receive a second query result fed back by the server in response to the second query request;

[0133] A storage module 35, configured to store the second query result in a cache;

[0134] A second receiving module 36, configured to receive a first query result fed back by the server in response to the first query request;

[0135] The acquisition module 37 is configured to acquire the second query result from the cache if the second query request input by the user is received.

[0136] In an optional implementation, the determining module includes:

[0137] A first acquisition unit is used to acquire multiple query records, wherein the query records include query requests corresponding to multiple query times respectively, the absolute value of the difference between the query times of two adjacent query requests included in the query record is less than or equal to a first preset duration, and the multiple query requests included in the query record are sorted from early to late according to the query time;

[0138] A second acquisition unit, configured to obtain a plurality of target query records including the first query request from the plurality of query records;

[0139] A third acquisition unit is used to acquire target query requests corresponding to the multiple target query records respectively, where the target query request corresponding to the target query record is a next query request of the first query request in the target query record;

[0140] The screening unit is used to screen out the second query request from the target query requests respectively corresponding to the multiple target query records.

[0141] In an optional implementation, the screening unit includes:

[0142] A division subunit, used to divide the same target query requests among the target query requests respectively corresponding to the multiple target query records into the same query request set;

[0143] The first determining subunit is configured to determine that the target query request in the query request set that includes the largest number of the target query requests is the second query request.

[0144] In an optional implementation, the screening unit includes:

[0145] The second determining subunit is configured to determine that the target query requests respectively corresponding to the plurality of target query records are all the second query requests.

[0146] In an optional implementation, the screening unit includes:

[0147] A screening subunit, configured to screen out time-consuming query requests whose query time is greater than or equal to a second preset time length from the target query requests respectively corresponding to the plurality of target query records;

[0148] The third determining subunit is configured to determine the time-consuming query request as the second query request.

[0149] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0150] Figure 4 It is a block diagram showing a device used in an electronic device according to an exemplary embodiment.

[0151] The electronic device includes, but is not limited to, a processor 41 , a memory 42 , a network interface 43 , an I / O controller 44 , and a communication bus 45 .

[0152] It should be noted that those skilled in the art can understand that Figure 4 The structure of the electronic device shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include Figure 4 More or fewer components may be shown, or certain components may be combined, or the components may be arranged differently.

[0153] Combine the following Figure 4 A detailed introduction to the various components of electronic equipment:

[0154] The processor 41 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 42, and calling data stored in the memory 42, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 41 may include one or more processing units; illustratively, the processor 41 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 41.

[0155] The processor 41 may be a central processing unit (CPU), or an application specific integrated circuit ASIC (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;

[0156] The memory 42 may include a memory, such as a high-speed random access memory (RAM) 421 and a read-only memory (ROM) 422, and may also include a large-capacity storage device 423, such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.

[0157] The memory 42 is used to store instructions executable by the processor 41. The processor 41 has the following functions: if a first query request is obtained, a second query request is determined, where the second query request is a query request with a probability of being queried higher than a preset threshold when the first query request has been queried;

[0158] Sending the first query request to the server;

[0159] Sending the second query request to the server;

[0160] receiving a second query result fed back by the server in response to the second query request;

[0161] Storing the second query result in a cache;

[0162] Receiving a first query result fed back by the server in response to the first query request;

[0163] If the second query request input by the user is received, the second query result is obtained from the cache.

[0164] A wired or wireless network interface 43 is configured to connect the electronic device to a network.

[0165] The processor 41, the memory 42, the network interface 43 and the I / O controller 44 may be interconnected via a communication bus 45, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc.

[0166] In an exemplary embodiment, the electronic device may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the data preloading method.

[0167] In an exemplary embodiment, the present disclosure provides a storage medium including instructions, such as a memory 42 including instructions, and the instructions can be executed by a processor 41 of an electronic device to complete the above method. Optionally, the storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0168] In an exemplary embodiment, a computer-readable storage medium is also provided, which can be directly loaded into the internal memory of a computer, such as the above-mentioned memory 42, and contains software code. After the computer program is loaded and executed, the above-mentioned data preloading method can be implemented.

[0169] In an exemplary embodiment, a computer program product is also provided, which can be directly loaded into the internal memory of a computer, such as the memory included in the electronic device, and contains software code. After being loaded and executed by the computer, the computer program can implement the above-mentioned data preloading method.

[0170] The data preloading method, device, electronic device, medium and product provided by the present invention can be used in the financial field or other fields, for example, can be used in query application scenarios in the financial field. Other fields are any fields other than the financial field, for example, the power field. The above is only an example and does not limit the application field of the data preloading method, device, electronic device, medium and product provided by the present invention.

[0171] It should be noted that the features described in the various embodiments in this specification can be replaced or combined with each other. For the device or system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0172] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0173] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0174] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data preloading method, It is characterized in that Applied to electronic equipment, the data preloading method comprises: If the first query request is obtained, a second query request is determined, where the second query request is a query request for which the probability of being queried is higher than a preset threshold when the first query request has been queried; Sending the first query request to the server; Sending the second query request to the server; receiving a second query result fed back by the server in response to the second query request; Storing the second query result in a cache; Receiving a first query result fed back by the server in response to the first query request; If the second query request input by the user is received, obtaining the second query result from the cache; Wherein, determining the second query request includes: Acquire multiple query records, the query records including query requests corresponding to multiple query times respectively, the absolute value of the difference between the query times of two adjacent query requests included in the query record is less than or equal to a first preset duration, and the multiple query requests included in the query record are sorted from early to late according to the query time; Obtaining a plurality of target query records including the first query request from the plurality of query records; Obtaining target query requests corresponding to the multiple target query records respectively, where the target query request corresponding to the target query record is a next query request of the first query request in the target query record; Filtering out the second query request from the target query requests respectively corresponding to the multiple target query records; Wherein, obtaining multiple query records, the query records including query requests corresponding to multiple query times respectively, the absolute value of the difference between the query times of two adjacent query requests included in the query record is less than or equal to the first preset duration, and the multiple query requests included in the query record are sorted from early to late according to the query time, including: From the pre-constructed correspondence between user accounts and user types, searching for a target user type corresponding to a target user account corresponding to the first query request; if the target user type belongs to the first type, obtaining multiple query records corresponding to the target user account; if the target user type belongs to the second type, obtaining multiple query records corresponding to each user account; or, Determine the query type to which the first query request belongs; if the query type is the first query type, obtain multiple query records within a preset time period; if the query type is the second query type, obtain multiple query records within all time periods; wherein, query requests whose query requirements do not change over time are classified into the second query type, and query requests whose query requirements change over time are classified into the first query type.

2. According to the data preloading method of claim 1, It is characterized in that The step of selecting the second query request from the target query requests respectively corresponding to the plurality of target query records includes: Grouping the same target query requests among the target query requests respectively corresponding to the multiple target query records into the same query request set; Determine that the target query request in the query request set that includes the largest number of the target query requests is the second query request.

3. According to the data preloading method of claim 1, It is characterized in that The step of selecting the second query request from the target query requests respectively corresponding to the plurality of target query records includes: It is determined that the target query requests respectively corresponding to the multiple target query records are all the second query requests.

4. According to the data preloading method of claim 1, It is characterized in that Determining the second query request includes: Filter out time-consuming query requests whose query time is greater than or equal to a second preset time length from the target query requests respectively corresponding to the multiple target query records; The time-consuming query request is determined as the second query request.

5. A data preloading device, It is characterized in that Applied to electronic equipment, the data preloading device comprises: A determination module, configured to determine a second query request if the first query request is obtained, wherein the second query request is a query request for which a probability of being queried is higher than a preset threshold when the first query request has been queried; A first sending module, used for sending the first query request to a server; A second sending module, used for sending the second query request to the server; A first receiving module, configured to receive a second query result fed back by the server in response to the second query request; A storage module, used for storing the second query result in a cache; A second receiving module, configured to receive a first query result fed back by the server in response to the first query request; an acquisition module, configured to acquire the second query result from the cache upon receiving the second query request input by the user; Wherein, the determination module includes: A first acquisition unit is used to acquire multiple query records, wherein the query records include query requests corresponding to multiple query times respectively, the absolute value of the difference between the query times of two adjacent query requests included in the query record is less than or equal to a first preset duration, and the multiple query requests included in the query record are sorted from early to late according to the query time; A second acquisition unit, configured to obtain a plurality of target query records including the first query request from the plurality of query records; A third acquisition unit is used to acquire target query requests corresponding to the multiple target query records respectively, where the target query request corresponding to the target query record is a next query request of the first query request in the target query record; A screening unit, configured to screen out the second query request from the target query requests respectively corresponding to the plurality of target query records; The first acquisition unit acquires a plurality of query records, the query records include query requests corresponding to a plurality of query times respectively, an absolute value of a difference between query times of two adjacent query requests included in the query record is less than or equal to a first preset duration, and the plurality of query requests included in the query record are sorted from early to late according to the query time, including: From the pre-constructed correspondence between user accounts and user types, searching for a target user type corresponding to a target user account corresponding to the first query request; if the target user type belongs to the first type, obtaining multiple query records corresponding to the target user account; if the target user type belongs to the second type, obtaining multiple query records corresponding to each user account; or, Determine the query type to which the first query request belongs; if the query type is the first query type, obtain multiple query records within a preset time period; if the query type is the second query type, obtain multiple query records within all time periods; wherein, query requests whose query requirements do not change over time are classified into the second query type, and query requests whose query requirements change over time are classified into the first query type.

6. An electronic device, It is characterized in that include: processor; a memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the instructions to implement the data preloading method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the data preloading method as claimed in any one of claims 1 to 4.

8. A computer program product that can be directly loaded into the internal memory of a computer, wherein the memory is the memory contained in the electronic device described in claim 6 and contains software code. After the computer program is loaded and executed, it can implement the data preloading method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Query processing method, server and computer readable storage medium

    CN108509501A

  • Data query method and device, electronic equipment and storage medium

    CN113220718A