Business data query method and device, electronic equipment and computer program product
By using preset cache areas to judge and extract business data in federated learning scenarios, the shortcomings of traditional Bloom filters in data update and query efficiency are solved, and more efficient and flexible data query is achieved.
Patent Information
- Application Number
- CN202510024347.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-04-11
AI Technical Summary
In the federated learning scenario, traditional Bloom filters do not support deletion operations, resulting in complex data updates and low query efficiency.
By receiving a service data query request, it is determined whether the target data type exists in the preset cache area. If it exists, data will be extracted from the cache area. If it does not exist, data will be extracted from multiple service databases, and the result will be sent to the client.
It improves the efficiency and accuracy of querying business data, enhances the flexibility of data management, and solves the problem of low query efficiency.
Smart Images

Figure CN119807254A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology, and specifically, to a method, device, electronic device and computer program product for querying business data. Background Art
[0002] With the digital transformation of the financial industry and the widespread application of big data technology, financial institutions are facing challenges in efficient management and real-time query of massive data in many fields such as credit business, risk assessment, and customer information management. Federated learning, as an emerging data cooperation model, is centered on the fact that multiple participants can use Bloom filters to query data without sharing the original data, which not only improves data utilization efficiency, but also enhances data privacy and security.
[0003] However, traditional Bloom filters use multiple hash functions to map elements in a set to specific locations in an array, thereby quickly determining whether an element may exist in a set. Although this method can save storage space and increase query speed, in the context of federated learning, data updates become very complicated because the above method does not support deletion operations. Once an element is mistakenly considered to exist in a set, the "false positive" result is difficult to correct, which increases risk and uncertainty.
[0004] In order to solve the deletion problem of ordinary Bloom filters, financial institutions use counting Bloom filters for data query, which can add a counter to each mapping position, so that the frequency of occurrence of elements can be counted. Although this method can help increase and decrease data, the storage problem of a large number of counters still exists, which not only wastes storage space, but also increases the cost of data query and equipment maintenance.
[0005] With regard to the technical problem of low query efficiency when querying business data in related technologies, no effective solution has been proposed yet. Summary of the invention
[0006] The main purpose of the present application is to provide a business data query method, device, electronic device and computer program product to solve the technical problem of low query efficiency when querying business data in the related technology.
[0007] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for querying business data is provided. The method comprises: receiving a business data query request sent by a query object through a client, determining a target data type according to the business data query request, wherein the target data type is a data type of data of the target data type; judging whether there is data of the target data type in a preset cache area, and obtaining a judgment result, wherein the preset cache area is used to cache data queried from M business databases within a historical time period, and M is a positive integer; when the judgment result indicates that there is no data of the target data type in the preset cache area, extracting data of the target data type from the M business databases, obtaining a query result, and sending the query result to the client; when the judgment result indicates that there is data of the target data type in the preset cache area, extracting data of the target data type, obtaining a query result, and sending the query result to the client.
[0008] Furthermore, determining whether there is data of the target data type in the preset cache area and obtaining the determination result includes: obtaining a function mapping rule and a data conversion rule, wherein the function mapping rule includes a mapping relationship between multiple data types and hash functions, and the data conversion rule includes a conversion relationship between multiple data types and type codes; determining a target hash function from the function mapping rule according to the data type, and using the data conversion rule to perform encoding conversion on the target data type to obtain an encoding result; and using the target hash function to determine whether there is an encoding result in the preset cache area to obtain a determination result.
[0009] Furthermore, a target hash function is used to determine whether there is an encoding result in a preset cache area, and obtaining the judgment result includes: using the target hash function to calculate the hash value of the encoding result to obtain a target hash value; obtaining a tree structure, and querying the target hash value in the tree structure, wherein the tree structure represents the storage status of business data in the preset cache area; if the target hash value exists in the tree structure, a judgment result is generated that there is data of the target data type in the preset cache area; if the target hash value does not exist in the tree structure, a judgment result is generated that there is no data of the target data type in the preset cache area.
[0010] Furthermore, the target data type is encoded and converted using data conversion rules to obtain an encoding result, including: obtaining Y data subtypes contained in the target data type, where Y is a positive integer; obtaining Y type codes from the data conversion rules according to the Y data subtypes, and obtaining an encoding result by concatenating the Y type codes.
[0011] Furthermore, the tree structure is constructed in the following manner: obtain K business data to be stored, and obtain data attributes of each business data to obtain K groups of data attributes, wherein each data attribute includes at least one data type of the business data, and K is a positive integer; extract different data attributes from the K groups of data attributes to obtain L data attributes, wherein L is a positive integer; generate a tree structure based on the L data attributes and the K business data.
[0012] Furthermore, generating a tree structure based on L data attributes and K business data includes: obtaining preset attribute levels, dividing the L data attributes into levels according to the preset attribute levels, and obtaining P attribute levels, wherein each attribute level is associated with at least one data attribute, and P is a positive integer; constructing a tree structure using the P attribute levels to obtain an initial tree structure, wherein the initial tree structure includes P levels; and determining the hash function of each level in the initial tree structure using function mapping rules to generate a tree structure.
[0013] Furthermore, after sending the query result to the client, the method further includes: obtaining a cache address of an associated data type in a preset cache; and caching data of the target data type into the preset cache according to the cache address.
[0014] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a device for querying business data is provided. The device comprises: a receiving unit, which is used to receive a business data query request sent by a query object through a client, and determine a target data type according to the business data query request, wherein the target data type is the data type of data of the target data type; a judging unit, which is used to judge whether there is data of the target data type in a preset cache area, and obtain a judgment result, wherein the preset cache area is used to cache data queried from M business databases in a historical time period, and M is a positive integer; a first extraction unit, which is used to extract data of the target data type from M business databases when the judgment result indicates that there is no data of the target data type in the preset cache area, obtain a query result, and send the query result to the client; a second extraction unit, which is used to extract data of the target data type when the judgment result indicates that there is data of the target data type in the preset cache area, obtain a query result, and send the query result to the client.
[0015] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned business data query methods.
[0016] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory stores an executable program, and the processor is used to run the program, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any one of the above-mentioned business data query methods.
[0017] According to another aspect of an embodiment of the present invention, a computer program product is provided. The computer program product includes a computer program, wherein when the computer program is executed by a processor, any one of the above-mentioned business data query methods is implemented.
[0018] In an embodiment of the present application, a business data query method is adopted, by receiving a business data query request sent by a query object through a client, determining a target data type according to the business data query request, wherein the target data type is the data type of data of the target data type; judging whether there is data of the target data type in a preset cache area, and obtaining a judgment result, wherein the preset cache area is used to cache data queried from M business databases within a historical time period, and M is a positive integer; in a case where the judgment result indicates that there is no data of the target data type in the preset cache area, extracting data of the target data type from the M business databases, obtaining a query result, and sending the query result to the client; in a case where the judgment result indicates that there is data of the target data type in the preset cache area, extracting data of the target data type, obtaining a query result, and sending the query result to the client, thereby achieving the technical effect of improving the efficiency and accuracy of querying business data and enhancing the flexibility of data management, thereby solving the technical problem of low query efficiency when querying business data. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 It is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for querying business data;
[0021] Figure 2 is a flowchart of a method for querying business data provided in an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of a method for encoding data types provided in an embodiment of the present application;
[0023] Figure 4 is a schematic diagram of an optional business data query method provided according to an embodiment of the present application;
[0024] Figure 5 is a schematic diagram of a device for querying business data provided in an embodiment of the present application;
[0025] Figure 6 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set up between this system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0029] It should be noted that the collected information used in this application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse to use it.
[0030] Example 1
[0031] According to an embodiment of the present application, a method embodiment for querying business data is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0032] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 It is a hardware structure diagram of a computer terminal (or mobile device) for implementing a method for querying business data, such as Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more ( Figure 1 102a, 102b, ..., 102n are used to illustrate) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU (Microcontroller Unit) or a programmable logic device FPGA (Field-Programmable Gate Array)), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a keyboard, a cursor control device, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0033] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0034] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the query method for business data in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the query method for business data described above. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0035] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC) and a network interface, which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0036] The display may be, for example, a touch screen liquid crystal display (LCD), which may enable a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0037] Under the above operating environment, this application provides Figure 2 The query method of the business data shown. Figure 2 is a flowchart of a method for querying business data provided in an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:
[0038] Step S201 , receiving a business data query request sent by a query object through a client, and determining a target data type according to the business data query request, wherein the target data type is a data type of data of the target data type.
[0039] Specifically, a business data query request may include query keywords, data types, time ranges, etc. The query object may be a staff member or customer who needs to find certain business data in a financial institution. In order to efficiently and accurately query certain data in a financial institution, after the query object issues a business data query request, the query request may be identified, and fields or attributes related to the data type may be extracted therefrom. The target data type of the queried data may then be determined based on this information. For example, when the query request includes "loan type" and "credit score", the determined target data type may be "loan business data".
[0040] Step S202, determine whether there is data of the target data type in the preset cache area, and obtain a determination result, wherein the preset cache area is used to cache data queried from M business databases within a historical time period, and M is a positive integer.
[0041] Specifically, in order to improve the query speed of business data in financial institutions and reduce frequent access to the underlying business database, data caching can be performed by setting a preset cache area. That is, when querying business data, it is possible to first determine whether data of the target data type is cached in the preset cache data area. The preset cache area serves as an intermediate data storage layer that can cache data that has been queried from the underlying business database within a historical time period.
[0042] In order to quickly determine whether there is data of the target data type in the preset cache area, when judging the preset cache area, a tree structure Bloom filter (TBF) constructed by a tree structure can be used for query, wherein the tree structure Bloom filter can store different business classifications and feature values on different nodes by constructing a tree structure, so that efficient hierarchical query can be performed. Through preliminary screening of the cache area, the number of visits to the underlying database can be significantly reduced, resource consumption can be reduced, and query efficiency can be improved.
[0043] It should be noted that in order to further optimize the use of the preset cache area, multiple measures can be taken for optimization. First, the preset cache area can be updated regularly to ensure that the cached data is the latest and most relevant; according to changes in query patterns and data volume, the size of the preset cache area can be dynamically adjusted to balance storage and query performance.
[0044] Step S203, when the judgment result indicates that there is no data of the target data type in the preset cache area, extract the data of the target data type from the M business databases, obtain the query result, and send the query result to the client.
[0045] Specifically, when the preset cache area is judged for data, if the judgment result shows that there is no data of the target data type in the preset cache area, a more in-depth data retrieval process needs to be performed to ensure that the most accurate and comprehensive information requested by the client can be provided. At this time, according to the target data type, a corresponding structured query statement or other data access protocol can be constructed, wherein these query statements can include all necessary screening conditions, including time range, data attributes, and possible business logic rules, to ensure that the extracted data fully meets the client's request.
[0046] Furthermore, data can be queried from multiple business databases in a concurrent manner to shorten the overall response time and obtain query results. It should be noted that since the data extracted from different business databases may have different formats and structures, these data need to be format converted and preprocessed to ensure data consistency and readability. Finally, the query results associated with the extracted data of the target data type are sent back to the client using an encrypted protocol.
[0047] Step S204, when the judgment result indicates that there is data of the target data type in the preset cache area, extract the data of the target data type, obtain the query result, and send the query result to the client.
[0048] Specifically, if the data of the target data type exists in the preset cache area, the data can be quickly located based on the tree-structured Bloom filter, or the previously determined data type and feature encoding information, such as loan type, credit score, etc., can be used to quickly locate the specific data record through the index mechanism of the cache area. Once the data of the target data type is found, the data can be processed to generate query results, and the query results can be sent to the client.
[0049] The query method for business data provided by the embodiment of the present application receives a business data query request sent by the query object through the client, determines the target data type according to the business data query request, wherein the target data type is the data type of data of the target data type; judges whether there is data of the target data type in the preset cache area, and obtains a judgment result, wherein the preset cache area is used to cache data queried from M business databases in a historical time period, and M is a positive integer; when the judgment result indicates that there is no data of the target data type in the preset cache area, extracts the data of the target data type from the M business databases, obtains the query result, and sends the query result to the client; when the judgment result indicates that there is data of the target data type in the preset cache area, extracts the data of the target data type, obtains the query result, and sends the query result to the client, solves the technical problem of low query efficiency when querying business data in the related art, determines the target data type according to the business data query request, judges whether there is data of the target data type in the preset cache area, and when there is no data of the target data type in the preset cache area, extracts the data from the business database, otherwise extracts the data from the preset cache area, thereby achieving the technical effect of improving the efficiency and accuracy of querying business data and enhancing the flexibility of data management.
[0050] The judgment method for the preset cache area can be implemented based on a hash function. Optionally, in the query method for business data provided in an embodiment of the present application, it is judged whether there is data of the target data type in the preset cache area, and the judgment result is obtained, including: obtaining a function mapping rule and obtaining a data conversion rule, wherein the function mapping rule includes a mapping relationship between multiple data types and hash functions, and the data conversion rule includes a conversion relationship between multiple data types and type encodings; determining the target hash function from the function mapping rule according to the data type, and using the data conversion rule to encode the target data type to obtain an encoding result; using the target hash function to judge whether there is an encoding result in the preset cache area to obtain a judgment result.
[0051] Specifically, the function mapping rule refers to the correspondence between the data type and the specific hash function. This rule can ensure that different data types are processed by different hash functions, thereby avoiding hash collisions and improving the accuracy and efficiency of data queries. For example, for "loan type" data, "hash%3" can be used as the target hash function; for "credit score", "hash%7" can be used as the target hash function. The data conversion rule can convert the original data type into the encoding format for internal processing, for example, converting the loan type "housing loan" into the code 01, and converting the credit score into a digital code (for example, converting "800" into "0800"), which is convenient for data location and query in the tree structure Bloom filter.
[0052] When checking the preset buffer area, the corresponding hash function, i.e., the target hash function, can be first determined from the function mapping rules according to the parsed data type. For example, if the requested data type is "loan type", the system will use the hash function mapped to "loan type" for subsequent processing. At the same time, the target data type can be encoded and converted using the data conversion rules to generate encoding results, for example, converting categorical data into numeric encoding, or converting numeric data into fixed-length string encoding, to facilitate hash operations.
[0053] Finally, the encoding result is hashed using the determined target hash function to obtain a hash value. Then, a query is performed in a preset cache area (such as a tree-structured Bloom filter) based on this hash value to determine whether specific data of the data type already exists in the cache. If the query result shows that there is an encoding result in the preset cache area, it means that the data of the target data type has been cached, and the query result can be quickly returned to avoid access to the underlying business database, saving time and resources; conversely, if there is no encoding result in the preset cache area, it is necessary to access the underlying business data source for deeper data query and acquisition. This embodiment can quickly locate and retrieve data by using a target hash function and a preset cache area, significantly reducing query delays and improving overall data processing speed. It can also reduce the load on the database, extend the life of the database, and reduce hardware and maintenance costs.
[0054] Optionally, in the query method for business data provided in the embodiment of the present application, a target hash function is used to determine whether there is a coding result in a preset cache area, and obtaining the judgment result includes: using the target hash function to calculate the hash value of the coding result to obtain a target hash value; obtaining a tree structure, and querying the target hash value in the tree structure, wherein the tree structure represents the storage status of the business data in the preset cache area; if the target hash value exists in the tree structure, a judgment result is generated that there is data of the target data type in the preset cache area; if the target hash value does not exist in the tree structure, a judgment result is generated that there is no data of the target data type in the preset cache area.
[0055] Specifically, when using the target hash function to judge the encoding result, the target hash function can be used to perform hash calculation on the encoding result first, and then the target hash value used for querying in the tree-structured Bloom filter can be obtained. Further, the hash value can be used to search the intermediate nodes (i.e., the nodes storing the hash values) of the tree-structured Bloom filter. First, starting from the root node, the target hash value can be used to traverse the tree-structured Bloom filter downward to check whether the hash value of each node matches the target hash value. If it matches, continue to query the child nodes, where it can be judged whether all expected bit identifiers are 1; if a path that completely matches the target hash value is found in the tree-structured Bloom filter, this indicates that there is data of the target data type in the preset cache area, and a judgment result of data existence is generated; if the hash value of any node is found to be unmatched during the traversal process, or the matching target hash value is still not found after traversing to the leaf node, this indicates that there is no data of the target data type in the preset cache area, and a judgment result of data non-existence is generated.
[0056] Furthermore, if the judgment result shows that the data to be queried exists in the preset cache area, the data can be directly extracted from the cache area to avoid access to the underlying database, significantly improve the query speed, and reduce the load on the underlying database; if the judgment result shows that the data to be queried does not exist in the preset cache area, it is necessary to access the business database for deeper data retrieval. This embodiment greatly improves the query response speed by using the target hash function and the tree-structured Bloom filter for querying, and can also significantly reduce direct access to the underlying database, reduce the load on the database, and reduce the cost of database maintenance.
[0057] In order to perform more accurate queries, the target data type can be processed. Optionally, in the query method for business data provided in the embodiment of the present application, the target data type is encoded and converted using data conversion rules to obtain an encoding result including: obtaining Y data subtypes contained in the target data type, where Y is a positive integer; obtaining Y type codes from the data conversion rules according to the Y data subtypes, and obtaining an encoding result by concatenating the Y type codes.
[0058] Specifically, when using data encoding rules for encoding conversion, since the target data type can be further subdivided into multiple data subtypes, these subtypes provide more specific information dimensions, which facilitate more accurate data analysis and query. For example, under the data type of "loan", it can be subdivided into "housing loan", "car loan", "consumer loan", etc.; under the data type of each loan, it can be subdivided into "high credit score", "medium credit score", "low credit score", etc. Therefore, multiple data subtypes of the target data type can be determined, and then the type code corresponding to each data subtype can be obtained according to the data conversion rules, which is convenient for subsequent indexing and querying in tree-type Bloom filters, for example, Figure 3 is a schematic diagram of a method for encoding data types according to an embodiment of the present application, such as Figure 3 As shown, the type code corresponding to "housing loan" is 01, the type code corresponding to "car loan" is 10, and the type code corresponding to "consumer loan" is 11; the type code corresponding to "high credit score" is 100, the type code corresponding to "medium credit score" is 101, and the type code corresponding to "low credit score" is 110.
[0059] Furthermore, all the obtained types of codes can be spliced to generate a coding result. It should be noted that the splicing process needs to follow predefined rules to ensure that the coding result can uniquely represent a specific data type combination. For example, Figure 3 As shown, if the query request contains three data subtypes of "housing loan", "high credit score" and "high value", the encoding result of the characterization combination code generated by hash value calculation is 01100, where 01 represents "housing loan" and 100 represents "high credit score". This embodiment subdivides the data type into multiple data subtypes and assigns a type code to each subtype to quickly identify the required data subtype combination, avoids complex combination and screening of the original data, quickly locates data through hierarchical query, improves query speed, accuracy and relevance, reduces query delay, and reduces query complexity.
[0060] In order to improve the query efficiency of the preset cache area and the business database, optionally, in the query method of business data provided in the embodiment of the present application, the tree structure is constructed in the following manner: obtain K business data to be stored, and obtain data attributes of each business data to obtain K groups of data attributes, wherein each data attribute includes at least one data type of the business data, and K is a positive integer; extract different data attributes from the K groups of data attributes to obtain L data attributes, wherein L is a positive integer; generate a tree structure based on the L data attributes and the K business data.
[0061] Specifically, in the context of large-scale data processing and efficient data management, a tree structure based on data attributes can be constructed, and then the preset cache area and business database can be adjusted using the tree structure, thereby improving query efficiency. First, multiple business data obtained from multiple sources to be stored can be collected, such as business transactions, customer information, market analysis reports, etc. At the same time, its detailed data attributes can be obtained, and then the corresponding multiple groups of data attributes can be obtained, thereby laying the foundation for subsequent data attribute extraction and tree structure construction.
[0062] Furthermore, different data attributes can be extracted from all the above data attributes, that is, data attributes with repeated descriptions can be removed to ensure the uniqueness of each attribute in the tree structure. For example, if the description of "loan type" appears multiple times in the data attributes, after this step, it can be ensured that "loan type" is only retained once as an attribute. Then, the hierarchy of the tree structure is constructed based on the extracted data attributes. For example, "loan type" can be used as the root node of the tree, and then "credit score" and "collateral characteristics" can be set as child nodes at the next level, and so on, to form a clear hierarchical structure.
[0063] Furthermore, since all the acquired business data may be categorical or text data, after converting its attributes into numerical codes, it is mounted to the corresponding nodes in the tree structure according to its data attributes so that it can be effectively stored and quickly retrieved in the tree structure. For example, "housing loan" is encoded as 01, "car loan" is encoded as 10, and "consumer loan" is encoded as 11, and branches are constructed in the tree structure based on this. Finally, the tree structure is improved and optimized according to the actual business data and query requirements, for example, new attribute nodes are added, the hierarchical relationship of nodes is adjusted, and the data mounting strategy is optimized to ensure that the tree structure can accurately reflect the characteristics of the business data and maximize its performance in data query and storage. This embodiment can effectively reduce data redundancy, optimize storage space, avoid full table scans, greatly shorten query time, and significantly improve data query efficiency by constructing a tree structure using multiple business data.
[0064] Optionally, in the query method for business data provided in an embodiment of the present application, generating a tree structure based on L data attributes and K business data includes: obtaining preset attribute levels, dividing the L data attributes into levels according to the preset attribute levels, and obtaining P attribute levels, wherein each attribute level is associated with at least one data attribute, and P is a positive integer; constructing a tree structure using the P attribute levels to obtain an initial tree structure, wherein the initial tree structure includes P levels; and determining the hash function of each level in the initial tree structure using function mapping rules to generate a tree structure.
[0065] In order to improve the query efficiency of the business database and the preset cache area, the business database and the preset cache area can be adjusted using a tree structure. Specifically, when using data attributes and business data to generate a tree structure, it is first necessary to classify the data attributes according to the preset attribute level. For example, it can be divided according to business logic and query requirements, or it can be divided based on the importance of data attributes, query frequency or data processing priority. For example, in credit business data processing, "loan type" can be set as the highest-level attribute, followed by "credit score" and "collateral characteristics". Then, the selected data attributes are divided into multiple attribute levels, and an initial tree structure is constructed according to the attribute levels to ensure that the construction of the tree structure conforms to the logical order of data query and efficiency optimization. Among them, the initial tree structure can contain multiple levels, each level corresponding to an attribute level.
[0066] Furthermore, for each level in the tree structure, corresponding, multiple independent hash functions are determined according to factors such as function mapping rules, attribute type, query frequency, and data distribution to ensure that the hash results of different elements are as different as possible to reduce the probability of collision and the effective hashing and positioning of data in the tree structure. For example, the highest-level attribute "loan type" can use the hash%3 function, and the secondary attribute "credit score" can use the hash%7 function.
[0067] Furthermore, by using the determined hash function and attribute level, all selected hash functions are used to calculate the hash values of all business data sets, and these hash values are mapped to the bit array, that is, the bit corresponding to each hash value is set to 1, and then the final tree structure is constructed. This embodiment generates a tree structure by using data attributes and business data, and can realize hierarchical screening based on the tree structure, significantly reduce useless data scanning, improve query efficiency, and reduce hash conflicts and avoid waste of storage space. In addition, the division of attribute levels can be dynamically adjusted according to business needs, and has good scalability. When new data attributes or business needs appear, the attribute level can be added or adjusted to quickly adapt to changes in data processing.
[0068] In order to improve the query efficiency of business data, optionally, in the query method of business data provided in an embodiment of the present application, after sending the query results to the client, the method also includes: obtaining a cache area address of an associated data type in a preset cache area; and caching data of the target data type to the preset cache area according to the cache area address.
[0069] Specifically, after obtaining data of the target data type from a preset cache area or a business database and sending the query results to the client, the data can be intelligently stored in the cache area, thereby accelerating the subsequent query process. At this time, the cache address of the target data type associated with the preset cache area can be obtained, and then the above data can be compressed, encoded, or formatted according to the address, and cached to the corresponding address of the preset cache area. This process may involve adapting to the storage requirements of the cache area. This embodiment pre-caches the data to the preset cache area, and then when processing the query request, it can directly obtain the data from the cache area, avoiding direct access to the underlying business database, significantly improving the query speed, extending the service life of the database, and improving the overall operational efficiency.
[0070] The present application also provides a method for querying business data. Figure 4 is a schematic diagram of an optional business data query method provided according to an embodiment of the present application, such as Figure 4 As shown, the method includes:
[0071] When it is necessary to query a certain business data in a financial institution, the query object can be queried through the XGBoost (eXtreme Gradient Boosting) modeling query method based on federated learning, that is, under the framework of federated learning, the XGBoost algorithm is used for model construction and data query.
[0072] First, the query object can initiate a business data query request through the client. After receiving the business data query request at the business category layer, the target data type can be determined according to the business data query request, and then it can be determined whether there is data of the target data type in the preset cache area (that is, the database Cache cache area) to obtain a judgment result. When the data of the target data type exists in the preset cache area, the data can be quickly located according to the tree-structured Bloom filter, and the data can be processed after the data of the target data type is queried to generate a query result, and then the query result is returned to the client used by the query object.
[0073] When there is no data of the target data type in the preset cache area, a corresponding structured query statement or other data access protocol can be constructed according to the target data type, and data can be queried from multiple business databases according to the query statement or data access protocol. For example, data of the target data type can be filtered out from database A or database B to obtain query results, and the query results associated with the extracted data of the target data type can be sent back to the client using an encrypted protocol.
[0074] It should be noted that when querying from a preset cache area or a business database, the hash value of the target data type can be calculated using a hash function first, and then the location can be searched in the middle layer of the tree-structured Bloom filter. If the corresponding hash value cannot be found in the middle layer, it can be determined that the data to be queried is not in the preset cache area or the business database; if it is found, the query continues to go down to the leaf node to determine whether the leaf node stores the above data. In this way, the false alarm rate can be reduced, and the query efficiency and storage space utilization can be improved. This embodiment can achieve the technical effect of improving the efficiency and accuracy of querying business data and enhancing the flexibility of data management by adjusting the preset cache area and the business database to a tree structure.
[0075] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0076] Example 2
[0077] The embodiment of the present application also provides a device for querying business data. It should be noted that the device for querying business data in the embodiment of the present application can be used to execute the method for querying business data provided in the embodiment of the present application. The device for querying business data provided in the embodiment of the present application is introduced below.
[0078] According to an embodiment of the present application, a device for implementing the above-mentioned business data query method is also provided. Figure 5 is a schematic diagram of a device for querying business data provided in an embodiment of the present application, such as Figure 5 As shown, the device includes: a receiving unit 50, a judging unit 51, a first extracting unit 52, and a second extracting unit 53.
[0079] A receiving unit 50 is used to receive a business data query request sent by a query object through a client, and determine a target data type according to the business data query request, wherein the target data type is a data type of data of the target data type;
[0080] A determination unit 51 is used to determine whether there is data of a target data type in a preset buffer area, and obtain a determination result, wherein the preset buffer area is used to cache data queried from M business databases within a historical time period, where M is a positive integer;
[0081] The first extraction unit 52 is used to extract the data of the target data type from the M business databases to obtain the query result, and send the query result to the client when the judgment result indicates that there is no data of the target data type in the preset cache area;
[0082] The second extraction unit 53 is used to extract the data of the target data type when the judgment result indicates that there is data of the target data type in the preset cache area, obtain the query result, and send the query result to the client.
[0083] The business data query device provided by the embodiment of the present application receives a business data query request sent by the query object through the client through the receiving unit 50, and determines the target data type according to the business data query request, wherein the target data type is the data type of data of the target data type; the judgment unit 51 judges whether there is data of the target data type in the preset cache area, and obtains a judgment result, wherein the preset cache area is used to cache data queried from M business databases in a historical time period, and M is a positive integer; the first extraction unit 52 extracts the data of the target data type from the M business databases when the judgment result indicates that there is no data of the target data type in the preset cache area, obtains the query result, and sends the query result to the client; the second extraction unit 53 extracts the data of the target data type when the judgment result indicates that there is data of the target data type in the preset cache area, obtains the query result, and sends the query result to the client, which solves the technical problem of low query efficiency when querying business data in the related art, by determining the target data type according to the business data query request, judging whether there is data of the target data type in the preset cache area, when there is no data of the target data type in the preset cache area, the data is extracted from the business database, otherwise the data is extracted from the preset cache area, thereby achieving the technical effect of improving the efficiency and accuracy of querying business data and enhancing the flexibility of data management.
[0084] Optionally, in the query device for business data provided in the embodiment of the present application, the judgment unit 51 includes: a first acquisition module, used to obtain function mapping rules and data conversion rules, wherein the function mapping rules include mapping relationships between multiple data types and hash functions, and the data conversion rules include conversion relationships between multiple data types and type codes; a first determination module, used to determine the target hash function from the function mapping rules according to the data type, and use the data conversion rules to encode the target data type to obtain an encoding result; a judgment module, used to use the target hash function to determine whether there is an encoding result in a preset cache area to obtain a judgment result.
[0085] Optionally, in the query device for business data provided in the embodiment of the present application, the judgment unit 51 includes: a calculation module, which is used to use the target hash function to calculate the hash value of the encoding result to obtain the target hash value; a second acquisition module, which is used to obtain a tree structure and query the target hash value in the tree structure, wherein the tree structure represents the storage status of the business data in a preset cache area; a first generation module, which is used to generate a judgment result that there is data of the target data type in the preset cache area if the target hash value exists in the tree structure; and a second generation module, which is used to generate a judgment result that there is no data of the target data type in the preset cache area if the target hash value does not exist in the tree structure.
[0086] Optionally, in the query device for business data provided in the embodiment of the present application, the judgment unit 51 includes: a third acquisition module, used to obtain Y data subtypes contained in the target data type, where Y is a positive integer; a fourth acquisition module, used to obtain Y type codes from the data conversion rules according to the Y data subtypes, and obtain the encoding result by splicing the Y type codes.
[0087] Optionally, in the query device for business data provided in the embodiment of the present application, the judgment unit 51 includes: a fifth acquisition module, used to acquire K business data to be stored, and acquire data attributes of each business data to obtain K groups of data attributes, wherein each data attribute includes at least one data type of business data, and K is a positive integer; an extraction module, used to extract different data attributes from the K groups of data attributes to obtain L data attributes, wherein L is a positive integer; and a third generation module, used to generate a tree structure based on the L data attributes and the K business data.
[0088] Optionally, in the query device for business data provided in the embodiment of the present application, the judgment unit 51 includes: a sixth acquisition module, used to obtain preset attribute levels, and classify L data attributes according to the preset attribute levels to obtain P attribute levels, wherein each attribute level is associated with at least one data attribute, and P is a positive integer; a construction module, used to construct a tree structure using P attribute levels to obtain an initial tree structure, wherein the initial tree structure includes P levels; a second determination module, used to determine the hash function of each level in the initial tree structure using a function mapping rule to generate a tree structure.
[0089] Optionally, in the query device for business data provided in an embodiment of the present application, the device also includes: an acquisition unit, used to obtain a cache area address of an associated data type in a preset cache area after sending the query result to the client; and a cache unit, used to cache data of the target data type to a preset cache area according to the cache area address.
[0090] It should be noted that the above-mentioned receiving unit 50, judging unit 51, first extracting unit 52, and second extracting unit 53 correspond to steps S201 to S204 in Example 1, and the above-mentioned units and corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules or units may be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above-mentioned units may also be part of the device and may be run in the computer terminal 10 provided in Example 1.
[0091] Example 3
[0092] The embodiment of the present application may provide a computer terminal, which may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal or an electronic device.
[0093] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
[0094] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the business data query method: receiving a business data query request sent by the query object through the client, and determining the target data type according to the business data query request, wherein the target data type is the data type of data of the target data type; judging whether there is data of the target data type in the preset cache area, and obtaining a judgment result, wherein the preset cache area is used to cache data queried from M business databases within a historical time period, and M is a positive integer; when the judgment result indicates that there is no data of the target data type in the preset cache area, extracting data of the target data type from the M business databases, obtaining a query result, and sending the query result to the client; when the judgment result indicates that there is data of the target data type in the preset cache area, extracting data of the target data type, obtaining a query result, and sending the query result to the client.
[0095] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the business data query method: obtain function mapping rules and obtain data conversion rules, wherein the function mapping rules include mapping relationships between multiple data types and hash functions, and the data conversion rules include conversion relationships between multiple data types and type codes; determine the target hash function from the function mapping rules according to the data type, and use the data conversion rules to encode the target data type to obtain an encoding result; use the target hash function to determine whether there is an encoding result in a preset cache area to obtain a judgment result.
[0096] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the business data query method: use the target hash function to calculate the hash value of the encoding result to obtain the target hash value; obtain a tree structure, and query the target hash value in the tree structure, wherein the tree structure represents the storage status of the business data in a preset cache area; if the target hash value exists in the tree structure, generate a judgment result that there is data of the target data type in the preset cache area; if the target hash value does not exist in the tree structure, generate a judgment result that there is no data of the target data type in the preset cache area.
[0097] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the business data query method: obtain Y data subtypes contained in the target data type, where Y is a positive integer; obtain Y type codes from the data conversion rules according to the Y data subtypes, and obtain the encoding result by splicing the Y type codes.
[0098] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the business data query method: obtain K business data to be stored, and obtain data attributes of each business data to obtain K groups of data attributes, wherein each data attribute includes at least one data type of the business data, and K is a positive integer; extract different data attributes from the K groups of data attributes to obtain L data attributes, wherein L is a positive integer; generate a tree structure based on the L data attributes and the K business data.
[0099] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the business data query method: obtain preset attribute levels, classify L data attributes according to the preset attribute levels, and obtain P attribute levels, wherein each attribute level is associated with at least one data attribute, and P is a positive integer; use the P attribute levels to construct a tree structure to obtain an initial tree structure, wherein the initial tree structure includes P levels; use the function mapping rule to determine the hash function of each level in the initial tree structure to generate a tree structure.
[0100] Optionally, the computer terminal may execute the program code of the following steps in the business data query method: obtaining a cache address of an associated data type in a preset cache; and caching data of a target data type into a preset cache according to the cache address.
[0101] Optionally, Figure 6 is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 6 As shown, the electronic device may include: one or more ( Figure 6(only one is shown) processor 602, memory 604, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0102] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the query method and device for business data in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the query method for the above-mentioned business data. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0103] The processor can call the information and application programs stored in the memory through the transmission device to execute the above steps in the above business data query method.
[0104] By adopting the embodiment of the present application, a solution for querying business data is provided. By receiving a business data query request sent by a query object through a client, a target data type is determined according to the business data query request, wherein the target data type is the data type of data of the target data type; judging whether there is data of the target data type in a preset cache area, and obtaining a judgment result, wherein the preset cache area is used to cache data queried from M business databases in a historical time period, and M is a positive integer; in the case where the judgment result indicates that there is no data of the target data type in the preset cache area, the data of the target data type is extracted from the M business databases to obtain a query result, and the query result is sent to the client; in the case where the judgment result indicates that there is data of the target data type in the preset cache area, the data of the target data type is extracted to obtain a query result, and the query result is sent to the client, thereby achieving the technical effect of improving the efficiency and accuracy of querying business data and enhancing the flexibility of data management, thereby solving the technical problem of low query efficiency when querying business data.
[0105] It can be understood by those skilled in the art that Figure 6 The structure shown is for illustration only, and the electronic device may also be a smart phone, a tablet computer, a PDA, a mobile Internet device (MID), a PAD or other terminal device. Figure 6 The structure of the electronic device is not limited. Figure 6More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 6 Different configurations shown.
[0106] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0107] Example 4
[0108] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the query method for business data provided in the first embodiment.
[0109] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0110] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: receiving a business data query request sent by the query object through the client, determining the target data type according to the business data query request, wherein the target data type is the data type of data of the target data type; judging whether there is data of the target data type in a preset cache area, and obtaining a judgment result, wherein the preset cache area is used to cache data queried from M business databases within a historical time period, and M is a positive integer; when the judgment result indicates that there is no data of the target data type in the preset cache area, extracting data of the target data type from the M business databases, obtaining a query result, and sending the query result to the client; when the judgment result indicates that there is data of the target data type in the preset cache area, extracting data of the target data type, obtaining a query result, and sending the query result to the client.
[0111] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the steps of the query method for business data.
[0112] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0113] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0114] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0115] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0116] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0117] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program code.
[0118] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for querying business data, characterized in that: include: Receiving a business data query request sent by a query object through a client, and determining a target data type according to the business data query request, wherein the target data type is a data type of data of the target data type; Determine whether there is data of the target data type in a preset cache area, and obtain a determination result, wherein the preset cache area is used to cache data queried from M business databases within a historical time period, where M is a positive integer; If the judgment result indicates that there is no data of the target data type in the preset cache area, extracting the data of the target data type from the M business databases to obtain a query result, and sending the query result to the client; In a case where the judgment result indicates that data of the target data type exists in the preset cache area, the data of the target data type is extracted to obtain the query result, and the query result is sent to the client.
2. The method according to claim 1, characterized in that Determine whether there is data of the target data type in the preset buffer area, and obtain the determination result including: Acquire a function mapping rule and a data conversion rule, wherein the function mapping rule includes a mapping relationship between multiple data types and hash functions, and the data conversion rule includes a conversion relationship between multiple data types and type codes; Determine a target hash function from the function mapping rule according to the data type, and perform encoding conversion on the target data type using the data conversion rule to obtain an encoding result; The target hash function is used to determine whether the encoding result exists in the preset buffer area to obtain the determination result.
3. The method according to claim 2, characterized in that Using the target hash function to determine whether the encoding result exists in the preset buffer area, the determination result includes: Calculating a hash value of the encoding result using the target hash function to obtain a target hash value; Acquire a tree structure, and query the target hash value in the tree structure, wherein the tree structure represents the storage status of the business data in the preset cache area; If the target hash value exists in the tree structure, generating a judgment result that data of the target data type exists in the preset buffer area; If the target hash value does not exist in the tree structure, a determination result is generated that data of the target data type does not exist in the preset buffer area.
4. The method according to claim 2, characterized in that: The target data type is encoded and converted using the data conversion rule to obtain an encoding result including: Obtain Y data subtypes contained in the target data type, where Y is a positive integer; According to the Y data subtypes, Y type codes are obtained from the data conversion rule, and the encoding result is obtained by splicing the Y type codes.
5. The method according to claim 3, characterized in that: The tree structure is constructed in the following way: Obtain K business data to be stored, and obtain data attributes of each business data to obtain K groups of data attributes, wherein each data attribute includes at least a data type of the business data, and K is a positive integer; Extract different data attributes from the K groups of data attributes to obtain L data attributes, where L is a positive integer; The tree structure is generated according to the L data attributes and the K business data.
6. The method according to claim 5, characterized in that Generating the tree structure according to the L data attributes and the K business data includes: Obtaining a preset attribute level, and classifying the L data attributes according to the preset attribute level to obtain P attribute levels, wherein each attribute level is associated with at least one data attribute, and P is a positive integer; Constructing a tree structure using the P attribute levels to obtain an initial tree structure, wherein the initial tree structure includes P levels; The hash function of each level in the initial tree structure is determined by using a function mapping rule to generate the tree structure.
7. The method according to claim 1, characterized in that After sending the query result to the client, the method further includes: Obtaining a buffer address associated with the data type in the preset buffer; The data of the target data type is cached in the preset cache area according to the cache area address.
8. A device for querying business data, characterized in that: include: A receiving unit, configured to receive a business data query request sent by a query object through a client, and determine a target data type according to the business data query request, wherein the target data type is a data type of data of the target data type; A judgment unit, used to judge whether there is data of the target data type in a preset cache area, and obtain a judgment result, wherein the preset cache area is used to cache data queried from M business databases within a historical time period, where M is a positive integer; A first extraction unit is used to extract the data of the target data type from the M business databases to obtain a query result, and send the query result to the client when the judgment result indicates that there is no data of the target data type in the preset cache area; A second extraction unit is configured to extract the data of the target data type, obtain the query result, and send the query result to the client if the judgment result indicates that the data of the target data type exists in the preset cache area.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is run, the device where the computer-readable storage medium is located is controlled to execute the business data query method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: A memory storing an executable program; A processor is used to run the program, wherein the program, when running, executes the business data query method described in any one of claims 1 to 7.
11. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the business data query method described in any one of claims 1 to 7 are implemented.