Data query method, device and equipment

By utilizing the correspondence between columnar tables and query tables in the data query device to obtain business data, the problem of excessive server load during multi-user queries was solved, achieving efficient data querying and decoupling of the core system.

CN116226498BActive Publication Date: 2026-05-22PEOPLE'S INSURANCE COMPANY OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PEOPLE'S INSURANCE COMPANY OF CHINA
Filing Date
2023-03-07
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

When multiple users simultaneously query the same business information in the business system, the server load becomes too heavy, resulting in low data query efficiency.

Method used

By storing multiple columnar tables in the data query device, and utilizing the correspondence between the query tables and the columnar tables, the business data corresponding to the query request can be obtained, instead of directly obtaining it from the business database, thus decoupling data query from the core system.

Benefits of technology

It improves the efficiency of data query, ensures the timeliness of queries, and maximizes the functionality of the interface by parameterizing the element information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116226498B_ABST
    Figure CN116226498B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data query method, device and equipment. The method comprises: obtaining a query request, the query request comprising at least one first business serial number, an identifier of at least one first query table and at least one first element corresponding to each first query table; obtaining a correspondence between a query table and a column table, the column table comprising at least one element and at least one piece of business information corresponding to each element; determining a query result corresponding to the query request according to the query request and the correspondence, the query result comprising the at least one first business serial number and business data corresponding to each first business serial number. The efficiency of data query is improved while timeliness is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data query method, apparatus, and device. Background Technology

[0002] Staff can query data through the company's core business system to obtain corresponding business information.

[0003] In related technologies, data querying can be performed as follows: Users can enter feature information on a query page provided by a terminal device and send it to the server. The server, based on the user-input feature information, determines the corresponding business information in the business system database stored on the server and sends it to the terminal device. In this process, when multiple users simultaneously query the same business information in the business system, if each user inputs different feature information, the server will simultaneously determine the corresponding business information based on each user's input and send it to the user. Multiple simultaneous queries may cause server lag or malfunctions, resulting in low data query efficiency. Summary of the Invention

[0004] This application provides a data query method, apparatus, and device to solve the problem of low efficiency in data querying.

[0005] In a first aspect, embodiments of this application provide a data query method, including:

[0006] Obtain a query request, the query request including at least one first business order number, at least one identifier of a first query table, and at least one first element corresponding to each first query table;

[0007] Obtain the correspondence between the query table and the column table, wherein the column table includes at least one element and at least one piece of business information corresponding to each element;

[0008] Based on the query request and the corresponding relationship, the query result corresponding to the query request is determined. The query result includes at least one first business order number and business data corresponding to each first business order number.

[0009] In one possible implementation, determining the query result corresponding to the query request based on the query request and the correspondence includes:

[0010] Based on the identifier of the at least one first query table and the corresponding relationship, determine the target column table corresponding to each first query table;

[0011] Based on the at least one first business order number and at least one first element corresponding to each first query table, determine the business data corresponding to the query request in multiple target column tables;

[0012] The query results are generated based on the at least one first business order number and the business data corresponding to each first business order number.

[0013] In one possible implementation, for any target column table, based on the at least one first business order number and the at least one first element, the business data corresponding to the query request is determined in the target column table, including:

[0014] In the target list, determine at least one set of business information corresponding to the first element;

[0015] In each set of business information, determine the business information corresponding to the at least one first business order number;

[0016] The business information is identified as the business data corresponding to the query request.

[0017] In one possible implementation, for any set of business information, determining the business information corresponding to the at least one first business order number within the set of business information includes:

[0018] Determine the primary key information corresponding to the first query table;

[0019] The business information is determined from the business information set based on the at least one first business order number and the primary key information.

[0020] In one possible implementation, determining the business information from the business information set based on the at least one first business order number and the primary key information includes:

[0021] Determine whether the number of primary key information entries is 1;

[0022] If so, in the set of business information, one piece of business information corresponding to each first business order number is determined as the business data corresponding to the query request;

[0023] If not, in the set of business information, the multiple pieces of business information corresponding to each first business order number are determined as the business data corresponding to the query request.

[0024] In one possible implementation, the method further includes:

[0025] Retrieve the change log of business information from the business database, the change log including the updated first business information;

[0026] In multiple columnar tables, determine the original business information corresponding to the first business information;

[0027] According to the change log, the original business information in the column table is updated to the first business information.

[0028] In one possible implementation, obtaining the query request includes:

[0029] Receive the query request sent by the terminal device.

[0030] In one possible implementation, after determining the query result corresponding to the query request based on the query request and the correspondence, the method further includes:

[0031] The query results are sent to the terminal device.

[0032] Secondly, embodiments of this application provide a data query device, the device comprising:

[0033] The first acquisition module is used to acquire a query request, the query request including at least one first business order number, at least one identifier of a first query table, and at least one first element corresponding to each first query table;

[0034] The second acquisition module is used to acquire the correspondence between the query table and the column table, wherein the column table includes at least one element and at least one piece of business information corresponding to each element;

[0035] The determining module is used to determine the query result corresponding to the query request based on the query request and the correspondence, wherein the query result includes the at least one first business order number and the business data corresponding to each first business order number.

[0036] In one possible implementation, the determining module is specifically used for:

[0037] Based on the identifier of the at least one first query table and the corresponding relationship, determine the target column table corresponding to each first query table;

[0038] Based on the at least one first business order number and at least one first element corresponding to each first query table, determine the business data corresponding to the query request in multiple target column tables;

[0039] The query results are generated based on the at least one first business order number and the business data corresponding to each first business order number.

[0040] In one possible implementation, the determining module is specifically used for:

[0041] In the target list, determine at least one set of business information corresponding to the first element;

[0042] In each set of business information, determine the business information corresponding to the at least one first business order number;

[0043] The business information is identified as the business data corresponding to the query request.

[0044] In one possible implementation, the determining module is specifically used for:

[0045] Determine the primary key information corresponding to the first query table;

[0046] The business information is determined from the business information set based on the at least one first business order number and the primary key information.

[0047] In one possible implementation, the determining module is specifically used for:

[0048] Determine whether the number of primary key information entries is 1;

[0049] If so, in the set of business information, one piece of business information corresponding to each first business order number is determined as the business data corresponding to the query request;

[0050] If not, in the set of business information, the multiple pieces of business information corresponding to each first business order number are determined as the business data corresponding to the query request.

[0051] In one possible implementation, the device further includes an update module, a receiving module, and a sending module.

[0052] The update module is used for:

[0053] Retrieve the change log of business information from the business database, the change log including the updated first business information;

[0054] In multiple columnar tables, determine the original business information corresponding to the first business information;

[0055] According to the change log, the original business information in the column table is updated to the first business information.

[0056] The receiving module is used for:

[0057] Receive the query request sent by the terminal device.

[0058] The sending module is used for:

[0059] The query results are sent to the terminal device.

[0060] Thirdly, embodiments of this application provide a data query device, including:

[0061] At least one processor; and

[0062] A memory communicatively connected to the at least one processor; wherein,

[0063] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described in any of the first aspects.

[0064] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method described in any one of the first aspects.

[0065] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any one of the first aspects.

[0066] The data query method, apparatus, and device provided in this application embodiment include a data query device storing multiple columnar tables. During data querying, the data query device obtains a query request, which includes a first business order number, an identifier of a first query table, and at least one first element. The correspondence between the query table and the columnar tables is obtained. Based on the query request and the correspondence, the query result corresponding to the query request is determined. The query result includes the first business order number and business data corresponding to at least one first element. In this process, because the business data corresponding to the first element can be obtained from the data query device based on the correspondence between the query table and the columnar tables in the business database, rather than directly obtaining the business information corresponding to the first element from the business database, the data query is decoupled from the business database of the core system. Furthermore, business information corresponding to different first elements can be obtained simultaneously, improving the efficiency of data querying. Attached Figure Description

[0067] Figure 1 A schematic diagram illustrating the application scenarios provided in the embodiments of this application;

[0068] Figure 2 A flowchart illustrating a data query method provided in an embodiment of this application;

[0069] Figure 3 A flowchart illustrating another data query method provided in an embodiment of this application;

[0070] Figure 4 A schematic diagram of the database relationships provided in the embodiments of this application;

[0071] Figure 5 A schematic diagram illustrating the data query process provided in this application embodiment;

[0072] Figure 6 This is a schematic diagram of the structure of a data query device provided in an embodiment of this application;

[0073] Figure 7 This is a schematic diagram of another data query device provided in an embodiment of this application;

[0074] Figure 8 This is a schematic diagram of the structure of the data query device provided in the embodiments of this application. Detailed Implementation

[0075] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0076] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0077] To facilitate understanding, the following will be combined with... Figure 1 The application scenarios applicable to the embodiments of this application will be described.

[0078] Figure 1 This is a schematic diagram illustrating an application scenario provided in an embodiment of this application. Please refer to [link / reference]. Figure 1The system includes a terminal device 101 and a server 102. The terminal device 101 can be a tablet computer, computer, etc. The terminal device 101 has a query page. The server 102 has a business database. The business database stores multiple pieces of business information (business information 1, business information 2, ..., business information N). Users can input element information on the display page provided by the terminal device 101 and send it to the server 102. Based on the element information, the server 102 determines the corresponding business information in its business database. The server 102 then sends the corresponding business information to the terminal device 101, so that the user receives the data query results.

[0079] In related technologies, data querying can be performed as follows: When multiple users simultaneously query the same business information in a business system, the server determines the corresponding business information based on the element information entered by each user and sends it to the user. Multiple simultaneous queries at the same time may cause the server corresponding to the core business system to lag or malfunction, resulting in low data query efficiency.

[0080] In this embodiment, a data query device is provided, which stores multiple columnar tables. When performing a data query, the data query device obtains a query request, which includes a first business order number, an identifier of a first query table, and at least one first element. The correspondence between the query table and the columnar tables is obtained. Based on the query request and the correspondence, the query result corresponding to the query request is determined. The query result includes the first business order number and business data corresponding to at least one first element. In the above process, because the business data corresponding to the first element can be obtained from the data query device based on the correspondence between the query table and the columnar tables in the business database, rather than directly obtaining the business information corresponding to the first element from the business database, the data query is decoupled from the business database of the core system. Furthermore, business information corresponding to different first elements can be obtained in real time, improving the efficiency of data query.

[0081] The method described in this application will now be illustrated through specific embodiments. It should be noted that the following embodiments may exist independently or in combination with each other; identical or similar content will not be repeated in different embodiments.

[0082] Figure 2 This is a flowchart illustrating a data query method provided in an embodiment of this application. Please refer to [link / reference]. Figure 2 The method may include:

[0083] S201, Obtain the query request.

[0084] The execution entity in this application embodiment can be a data query device or a data query apparatus installed within a data query device. The data query apparatus can be implemented through software or a combination of software and hardware. The data query device can be a server.

[0085] The query request includes at least one first business order number, at least one identifier of a first query table, and at least one first element corresponding to each first query table.

[0086] Retrieving a query request can include two scenarios.

[0087] Scenario 1: Users can enter a query request on the query page provided by the terminal device and send the request to the data query device. Users can enter multiple primary elements corresponding to the same business order number, or multiple business order numbers corresponding to the same primary element.

[0088] Scenario 2: Other business systems send data query requests to the data query device by entering the business order number and at least one primary element through interface calls.

[0089] The query table is stored in the business database and contains multiple business information entries. The business database is located on the server corresponding to the core system and stores multiple query tables.

[0090] For example, suppose a user queries the start and end dates of insurance policy A. The specific query request the user can enter on the query page provided by the terminal device is shown in Table 1:

[0091] Table 1

[0092] First business order number PADC2023A14023751F Identifier of the first query table PRPCM First element Insurance start time, insurance termination time

[0093] S202. Obtain the correspondence between the lookup table and the column table.

[0094] The list table includes at least one element and at least one piece of business information corresponding to each element.

[0095] Each column in the columnar table can be named in the format of "query table - query table element name". The primary key information in the columnar table can be the business order number. A columnar table with no corresponding business information for an element is defined as an empty columnar table. If the columnar table is empty, the business data corresponding to the query request will be empty when the data query is performed.

[0096] The structural relationships of each business information item in a columnar database differ from those in the business system database. The correspondence between query tables and columnar tables, as well as multiple columnar tables, can be pre-stored in the columnar database, which is then located in the data query device. The columnar database can be HBase, Vertica, or similar databases.

[0097] For example, the specific table corresponding to the basic policy information of insurance company A can be shown in Table 2:

[0098] Table 2

[0099] Order Number Policyholder Insurance start time Insurance termination time PADC2023A14023751F User A 2023.01.01 2025.01.01 PADC2023B24502152C User B 2023.05.01 2025.12.31

[0100] The number of business information entries in the corresponding column table can be determined based on the primary key information of the query table.

[0101] For example, the specific correspondence between the lookup table and the column table can be shown in Table 3:

[0102] Table 3

[0103] Identifier of the lookup table Identification of tables Primary key information PRPCM hbaseTable-A0201 Order Number PRPCIN hbaseTable-A0110 Order number, serial number

[0104] Based on Table 3, the primary key information corresponding to the query table PRPCM is the business order number. Therefore, the correspondence between the query table PRPCM and the columnar table hbaseTable-A0201 is one-to-one, meaning that the query table PRPCM corresponds to one business information record in the columnar table hbaseTable-A0110. The correspondence between the query table and the columnar table can be represented as PRPCM:1:hbaseTable-A0201. Based on Table 3, the primary key information corresponding to the query table PRPCIN is the business order number and the sequence number. Therefore, the correspondence between the query table PRPCIN and the columnar table hbaseTable-A0110 is one-to-M, where M is an integer greater than or equal to 1. That is, the query table PRPCIN corresponds to M business information records in the columnar table hbaseTable-A0110. The correspondence between the query table and the columnar table can be represented as PRPCM:M:hbaseTable-A0201.

[0105] S203. Based on the query request and the corresponding relationship, determine the query result corresponding to the query request.

[0106] The query results include at least one first business order number and the business data corresponding to each first business order number.

[0107] The query results corresponding to the query request can be determined in the following way: based on the identifier and correspondence of at least one first query table, determine the target column table corresponding to each first query table; based on the first business order number and at least one first element corresponding to each first query table, determine the business data corresponding to the query request in multiple target column tables; generate the query results based on the first business order number and the business data.

[0108] For example, based on the query request shown in Table 1 above, the first query table is determined to be PRPCM. Based on the correspondence between the query tables and columnar tables shown in Table 3 above, the columnar table corresponding to the first query table PRPCM is determined to be hbaseTable-A0201. The columnar table hbaseTable-A0201 is shown in Table 4:

[0109] Table 4

[0110] Order Number Policyholder Insurance start time Insurance termination time PADC2021S12450101T User C 2021.01.01 2024.01.01 PADC2022A0124501T User D 2022.01.01 2022.12.31 PADC2023B24502152C User B 2023.05.01 2025.12.31 PADC2023A14023751F User A 2023.01.01 2025.01.01

[0111] Based on Table 3 above, the query request corresponds to one business information record in column table hbaseTable-A0110. Based on the first business order number shown in Table 1 and the column table shown in Table 4, the business data corresponding to the query request is determined to be the insurance start time of 2023.01.01 and the insurance end time of 2025.01.01. Therefore, the query result includes the first business order number PADC2023A14023751F, the insurance start time of 2023.01.01, and the insurance end time of 2025.01.01.

[0112] The data query method provided in this application embodiment obtains a query request. It then obtains the correspondence between a query table and a columnar table. Based on the query request and the correspondence, it determines the query result corresponding to the query request. In this process, because the business data corresponding to the first element can be obtained from the data query device based on the correspondence between the query table and the columnar table in the business database, and the query request, instead of directly obtaining the business information corresponding to the first element from the business database, the data query ensures timeliness while decoupling from the business database of the core system. Furthermore, by parameterizing the element information, the functionality of the interface is maximized, improving the efficiency of data query.

[0113] Based on any of the above embodiments, the following, in conjunction with Figure 3 This section provides a detailed explanation of the data query process.

[0114] Figure 3 This is a flowchart illustrating another data query method provided in an embodiment of this application. Please refer to... Figure 3 The method includes:

[0115] S301, Obtain the query request.

[0116] When obtaining a query request, if there are multiple query tables in the query conditions, the identifier of the first query table can be determined by the query table name + the first element, so as to quickly determine the first query table corresponding to each first element of the query request.

[0117] For example, the first element of a query request includes the insurance start time, the insurance termination time, and the insured. It can be determined that the insurance start time and insurance termination time belong to the lookup table PRPCM, and the insured belongs to the lookup table PRPCIN. The identifier of the first lookup table can be determined by the lookup table name + the first element. That is, the identifier of the first lookup table corresponding to the query request can include PRPCM (insurance start time, insurance termination time) and PRPCIN (insured).

[0118] By identifying the first query table by using the query table name plus the first element, the server can avoid traversing the query table to determine the first element during data retrieval, thus improving the efficiency of data retrieval.

[0119] S302. Obtain the correspondence between the lookup table and the column table.

[0120] The correspondence between the query table and the column table can be set in advance and stored in the preset storage space of the data query device.

[0121] S303. Based on the identifier and correspondence of at least one first query table, determine the target column table corresponding to each first query table.

[0122] Based on the identifier of the first query table, the identifier of the target column table corresponding to the first query table can be determined in the mapping relationship. Based on the identifier of the target column table, the corresponding target column table can be determined in the columnar database.

[0123] For example, the specific correspondence between the lookup table and the column table can be shown in Table 5:

[0124] Table 5

[0125] Identifier of the lookup table Identification of tables PRPCM hbaseTable-A0201 PRPCIN hbaseTable-A0110 PRPCA hbaseTable-B0001 PRPCF hbaseTable-C0002

[0126] Assume that the identifier of the first query table is determined to be PRPCIN based on the query request. According to the correspondence shown in Table 5, the identifier of the column table corresponding to the identifier PRPCIN of the first query table is determined to be hbaseTable-A0110. Therefore, in the columnar database, the column table corresponding to hbaseTable-A0110 is determined as the target column table.

[0127] S304. For any target list, determine at least one set of business information corresponding to the first element in the target list.

[0128] For example, the target column table corresponding to hbaseTable-A0110 determined based on the above example can be shown in Table 6:

[0129] Table 6

[0130]

[0131] Assuming the first element is the insured person and their identification number, then the set of business information corresponding to the first element can be determined as the column corresponding to the insured person in Table 6, and the column corresponding to the identification number in Table 6.

[0132] S305. For any set of business information, determine the primary key information corresponding to the first query table.

[0133] The primary key information corresponding to the query table can be stored in the preset storage space of the data query device.

[0134] The primary key information is the information used to generate a query table by associating all business information.

[0135] For example, for insurance company A, multiple basic policy information tables can be linked based on the policy number to generate a policy information query table. The primary key information corresponding to the policy information query table is the policy number.

[0136] Primary key information can include a serial number. The serial number is used to indicate a dynamic column in a columnar database.

[0137] For example, if a business order number corresponds to two insured individuals with serial numbers 1 and 2, then the corresponding columns in the columnar table HbaseTableA would be $1 and $2.

[0138] Dynamic columns are designed to accommodate one-to-many business information under a single business order number. An element with a dynamic column can have multiple entries under one business order number. For example, a single business order number might contain multiple entries corresponding to elements such as the insured's ID number and the insured's name.

[0139] S306. Determine if the number of primary key information is 1.

[0140] If so, execute S307.

[0141] If not, proceed with S308.

[0142] S307. Determine one piece of business information corresponding to each first business order number as the business data corresponding to the query request.

[0143] For example, suppose the identifier of the first query table is determined to be PRPCM based on the query request, and the primary key information corresponding to the query table PRPCM is determined to be the business order number. Based on the correspondence between the identifier PRPCM of the first query table and the relationship shown in Table 5 above, the target column table corresponding to the first query table PRPCM is determined to be hbaseTable-A0201. Then, in the target column table hbaseTable-A0201, the set of business information corresponding to the first element is determined to be the column corresponding to the policyholder. Within the set of business information, the business information record for user A corresponding to the first business order number PADC2023A14023751F is determined to be the business data corresponding to the query request.

[0144] After S307, execute S309.

[0145] S308. In the business information set, the multiple business information items corresponding to each first business order number are identified as the business data corresponding to the query request.

[0146] For example, assuming the first element is the insured person and their identification number, based on the target column table hbaseTable-A0110 shown in Table 6 above, the set of business information corresponding to the first element can be determined as the column corresponding to the insured person and the column corresponding to the identification number in Table 6. Within this set of business information, the two business information entries corresponding to the first business order number PADC2022A0124501T are identified as the business data corresponding to the query request. The specific business data is shown in Table 7.

[0147] Table 7

[0148] Insured ID number User F 60212403548596705 User B 21306460844561098

[0149] S309. Generate query results based on at least one first business order number and the business data corresponding to each first business order number.

[0150] For example, based on the first business order number PADC2022A0124501T and the business data shown in Table 7 above, the generated query results are shown in Table 8:

[0151] Table 8

[0152]

[0153] S310: Send the query results to the terminal device.

[0154] The query results can be sent to the terminal device in the format of "Business Order Number - Query Table - Business Information". The terminal device can parse and process the query results in this format according to a preset method to obtain the business information corresponding to the query request. If there is a sub-table within a query table, the query result can be "Business Order Number - Query Table - Sub-table - Business Information".

[0155] If the number of business information items is 1, the query result will contain a single data item; if the number of business information items is not 1, the query result will contain a group of data items.

[0156] The query results can be parsed and processed in the following way: obtain the structural information corresponding to the first element; based on the first element and the structural information, parse and process the query results to obtain at least one piece of business information corresponding to the first element.

[0157] Structural information is used to indicate the relationship between features and the lookup table. Features and their corresponding structural information can be stored in the preset storage space of the terminal device.

[0158] The elements corresponding to the query request can be input parameters using preset methods to generate structural information. During the data query process, the structural information, the method of parsing the structural information, and the method of providing back parameters for the query results are all determined based on the query table structure in the core business system. Therefore, it is possible to develop and configure once and reuse it multiple times.

[0159] For example, after receiving the query results shown in Table 8 above, the terminal device obtains the structural information of the insured and their identification numbers. The specific structural information can be shown in Table 9:

[0160] Table 9

[0161] Insured ID number PRPCIN-column PRPCIN-column

[0162] Based on the first element and the structural information shown in Table 9, the query results are parsed to obtain at least one piece of business information corresponding to the first element. The specific business information is shown in Table 10.

[0163] Table 10

[0164]

[0165] The terminal device parses and processes the query results based on the primary element and structural information, ensuring that data queries based on the query request can accurately return the query results.

[0166] The data query method provided in this application embodiment obtains a query request. It obtains the correspondence between a query table and a columnar table. Based on the identifier and correspondence of the first query table, it determines the target columnar table corresponding to the first query table. In the target columnar table, it determines at least one set of business information corresponding to a first element. It determines the primary key information corresponding to the first query table. Based on the first business order number and the primary key information, it determines the business information in the business information set. Based on the first business order number and the business data, it generates a query result and sends the query result to the terminal device. In the above process, because the business data corresponding to the first element can be obtained from the data query device based on the correspondence between the query table and the columnar table in the business database, and the query request, instead of directly obtaining the business information corresponding to the first element from the business database, the data query ensures timeliness while decoupling from the business database of the core system. At the same time, by parameterizing the element information, the functionality of the interface is maximized, improving the efficiency of data query.

[0167] Based on any of the above embodiments, the following, in conjunction with Figure 4 This section explains the relationship between columnar databases and business databases.

[0168] Figure 4 This is a schematic diagram illustrating the relationships within the database provided in an embodiment of this application. Please refer to [link / reference]. Figure 4 The system comprises a business database 401, a message middleware 402, and a columnar database 403. Business database 401 is located in the core business system, while message middleware 402 and columnar database 403 are located in the data query device. Business database 401 stores multiple query tables (query table 1, query table 2, ..., query table M), each query table containing multiple business information entries linked by primary key information. Message middleware 402 stores data corresponding to multiple topics. Each topic corresponds to a query table in business database 401. Columnar database 403 stores multiple columnar tables (columnar table 1, columnar table 2, ..., columnar table K), each columnar table corresponding to at least one query table in business database 401.

[0169] Based on the monitoring logs, business information in the columnar database 403 and the business database 401 can be synchronized in real time via message middleware 402. When business information in business database 401 is updated, the corresponding business information in columnar database 403 can be updated as follows: The change log of the business information is retrieved from business database 401, including the updated first business information. The original business information corresponding to the first business information is determined from multiple columnar tables in columnar database 403 via message middleware 402. Based on the change logs, columnar database 403 updates the original business information in the columnar tables to the first business information.

[0170] The business information update process provided in this application embodiment involves retrieving a change log of business information from a business database, the change log including updated first business information; determining the original business information corresponding to the first business information from multiple column tables; and updating the original business information in the column tables to the first business information based on the change log. In this process, a message middleware can decouple the data query device from the core business system, allowing the data query process and other business processes of the core business system to be performed independently, thus improving the efficiency of data query.

[0171] Based on any of the above embodiments, the following, in conjunction with Figure 5 The process of data query will be illustrated with an example.

[0172] Figure 5 This is a schematic diagram illustrating the data query process provided in an embodiment of this application. Please refer to [link / reference]. Figure 5 The system includes a terminal device 501, a data query device 502, and a server 503. The terminal device 501 can be a tablet computer, computer, etc., and includes a query page. The data query device 502 can be a server, and includes a columnar database and a message broker. The columnar database stores multiple columnar tables (columnar table 1, columnar table 2, ..., columnar table K). The data query device 502 stores the correspondence between the query tables and the columnar tables. The server 503 includes a business database, which stores multiple query tables (query table 1, query table 2, ..., query table M). The data query device 502 can synchronize business information from the server 503 through the message broker.

[0173] Users input query requests through the query page provided by terminal device 501 and send the query requests to data query device 502. Specific query requests are shown in Table 11:

[0174] Table 11

[0175]

[0176] Data query device 502 receives the query request sent by terminal device 501, and determines the target column table corresponding to the first query table PRPCM (insurance start time, insurance termination time) as hbaseTable-A0201, and the target column table corresponding to the first query table PRPCIN (insured) as hbaseTable-A0110, based on the identifier and correspondence of the first query table. The specific details of the target column table hbaseTable-A0201 are shown in Table 12.

[0177] Table 12

[0178]

[0179]

[0180] The target column table hbaseTable-A0110 is shown in Table 13:

[0181] Table 13

[0182]

[0183] In the target column table hbaseTable-A0201 shown in Table 12, data query device 502 determines that the business information set 1 corresponding to the first element is the column corresponding to the insurance start time and the column corresponding to the insurance termination time in Table 12. In the target column table hbaseTable-A0110 shown in Table 13, data query device 502 determines that the business information set 2 corresponding to the first element is the column corresponding to the insured in Table 13.

[0184] Data query device 502 determines that the primary key information corresponding to the first query table PRPCM is the business order number, and determines that the primary key information corresponding to the first query table PRPCIN is both the business order number and the sequence number. The primary key information corresponding to the first query table PRPCM has one entry. In the business information set 1, data query device 502 identifies the business information corresponding to the first business order number PADC2023D54012751C as the business data corresponding to the query request. The specific business data identified in business information set 1 is shown in Table 14.

[0185] Table 14

[0186] Insurance start time Insurance termination time 2023.05.01 2025.12.31

[0187] The primary key information corresponding to the first query table PRPCIN has 2 entries. Data query device 502, within business information set 2, identifies multiple business information entries corresponding to the first business order number PADC2023D54012751C as the business data corresponding to the query request. The specific business data identified in business information set 2 is shown in Table 15.

[0188] Table 15

[0189]

[0190]

[0191] Based on the first business order number PADC2023D54012751C and the business data shown in Tables 14 and 15, the query results are generated. The specific query results are shown in Table 16.

[0192] Table 16

[0193]

[0194] The data query device 502 sends the query results shown in Table 16 to the terminal device 501. The terminal device 501 can parse and process the query results to obtain the business information corresponding to the query request.

[0195] The data query method provided in this application embodiment obtains a query request. It obtains the correspondence between a query table and a columnar table. Based on the identifier and correspondence of the first query table, it determines the target columnar table corresponding to the first query table. In the target columnar table, it determines at least one set of business information corresponding to a first element. It determines the primary key information corresponding to the first query table. Based on the first business order number and the primary key information, it determines the business information in the business information set. Based on the first business order number and the business data, it generates a query result and sends the query result to the terminal device. In the above process, because the business data corresponding to the first element can be obtained from the data query device based on the correspondence between the query table and the columnar table in the business database, and the query request, instead of directly obtaining the business information corresponding to the first element from the business database, the data query ensures timeliness while decoupling from the business database of the core system. At the same time, by parameterizing the element information, the functionality of the interface is maximized, improving the efficiency of data query.

[0196] Figure 6 This is a schematic diagram of a data query device provided in an embodiment of this application. Please refer to... Figure 6 The data query device 10 may include:

[0197] The first acquisition module 11 is used to acquire a query request, the query request including at least one first business order number, at least one identifier of a first query table, and at least one first element corresponding to each first query table;

[0198] The second acquisition module 12 is used to acquire the correspondence between the query table and the column table, wherein the column table includes at least one element and at least one piece of business information corresponding to each element;

[0199] The determining module 13 is used to determine the query result corresponding to the query request based on the query request and the correspondence relationship. The query result includes the at least one first business order number and the business data corresponding to each first business order number.

[0200] The data query device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0201] In one possible implementation, the determining module 13 is specifically used for:

[0202] Based on the identifier of the at least one first query table and the corresponding relationship, determine the target column table corresponding to each first query table;

[0203] Based on the at least one first business order number and at least one first element corresponding to each first query table, determine the business data corresponding to the query request in multiple target column tables;

[0204] The query results are generated based on the at least one first business order number and the business data corresponding to each first business order number.

[0205] In one possible implementation, the determining module 13 is specifically used for:

[0206] In the target list, determine at least one set of business information corresponding to the first element;

[0207] In each set of business information, determine the business information corresponding to the at least one first business order number;

[0208] The business information is identified as the business data corresponding to the query request.

[0209] In one possible implementation, the determining module 13 is specifically used for:

[0210] Determine the primary key information corresponding to the first query table;

[0211] The business information is determined from the business information set based on the at least one first business order number and the primary key information.

[0212] In one possible implementation, the determining module 13 is specifically used for:

[0213] Determine whether the number of primary key information entries is 1;

[0214] If so, in the set of business information, one piece of business information corresponding to each first business order number is determined as the business data corresponding to the query request;

[0215] If not, in the set of business information, the multiple pieces of business information corresponding to each first business order number are determined as the business data corresponding to the query request.

[0216] The data query device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0217] Figure 7 This is a schematic diagram of another data query device provided in an embodiment of this application. Figure 6Based on the illustrated embodiments, please refer to Figure 7 The data query device 10 also includes an update module 14, a receiving module 15, and a sending module 16.

[0218] The update module 14 is used for:

[0219] Retrieve the change log of business information from the business database, the change log including the updated first business information;

[0220] In multiple columnar tables, determine the original business information corresponding to the first business information;

[0221] According to the change log, the original business information in the column table is updated to the first business information.

[0222] The receiving module 15 is used for:

[0223] Receive the query request sent by the terminal device.

[0224] The sending module 16 is used for:

[0225] The query results are sent to the terminal device.

[0226] The data query device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0227] Figure 8 This is a schematic diagram of the data query device provided in an embodiment of this application. Please refer to... Figure 8 The data query device 20 may include a memory 21 and a processor 22. Exemplarily, the memory 21 and the processor 22 are interconnected via a bus 23.

[0228] Memory 21 is used to store program instructions;

[0229] The processor 22 is used to execute the program instructions stored in the memory, so that the data query device 20 performs the method shown in the above method embodiment.

[0230] The data query device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0231] This application provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above-described method when executed by a processor.

[0232] This application embodiment may also provide a computer program product, including a computer program that, when executed by a processor, can implement the above-described method.

[0233] All or part of the steps in the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above-described method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), random access memory (RAM), flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.

[0234] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0235] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0236] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0237] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.

[0238] In this application, the term "comprising" and its variations can refer to non-limiting inclusion; the term "or" and its variations can refer to "and / or". The terms "first", "second", etc., in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

Claims

1. A data query method, characterized in that, include: Obtain a query request, the query request including at least one first business order number, at least one identifier of a first query table, and at least one first element corresponding to each first query table; The system obtains the correspondence between query tables and columnar tables. Each columnar table includes at least one element and at least one piece of business information corresponding to each element. The correspondence is pre-set and stored in the preset storage space of the data query device. Multiple query tables are stored in the business database. Each query table is a collection of multiple pieces of business information linked together based on primary key information. Multiple columnar tables are stored in the columnar database. Each columnar table has a correspondence with at least one query table in the business database. The business database is located in the core business system. The columnar database is located in the data query device. The data query device also has a message middleware. The message middleware stores data corresponding to multiple topics. Each topic corresponds to a query table in the business database. Based on the query request and the corresponding relationship, the query result corresponding to the query request is determined, and the query result includes the at least one first business order number and the business data corresponding to each first business order number; The method further includes: synchronizing business information between the columnar database and the business database in real time through the message middleware based on the monitoring logs.

2. The method according to claim 1, characterized in that, Based on the query request and the corresponding relationship, the query result corresponding to the query request is determined, including: Based on the identifier of the at least one first query table and the corresponding relationship, determine the target column table corresponding to each first query table; Based on the at least one first business order number and at least one first element corresponding to each first query table, determine the business data corresponding to the query request in multiple target column tables; The query results are generated based on the at least one first business order number and the business data corresponding to each first business order number.

3. The method according to claim 2, characterized in that, For any target column table, based on the at least one first business order number and the at least one first element, determine the business data corresponding to the query request in the target column table, including: In the target list, determine at least one set of business information corresponding to the first element; In each set of business information, determine the business information corresponding to the at least one first business order number; The business information is identified as the business data corresponding to the query request.

4. The method according to claim 3, characterized in that, For any set of business information, determining the business information corresponding to the at least one first business order number within the set of business information includes: Determine the primary key information corresponding to the first query table; The business information is determined from the business information set based on the at least one first business order number and the primary key information.

5. The method according to claim 4, characterized in that, Based on the at least one first business order number and the primary key information, the business information is determined from the business information set, including: Determine whether the number of primary key information entries is 1; If so, in the set of business information, one piece of business information corresponding to each first business order number is determined as the business data corresponding to the query request; If not, in the set of business information, the multiple pieces of business information corresponding to each first business order number are determined as the business data corresponding to the query request.

6. The method according to any one of claims 1-5, characterized in that, The method further includes: Retrieve the change log of business information from the business database, the change log including the updated first business information; In multiple columnar tables, determine the original business information corresponding to the first business information; According to the change log, the original business information in the column table is updated to the first business information.

7. The method according to any one of claims 1-6, characterized in that, Retrieve query requests, including: Receive the query request sent by the terminal device.

8. The method according to any one of claims 1-7, characterized in that, After determining the query result corresponding to the query request based on the query request and the correspondence, the method further includes: The query results are sent to the terminal device.

9. A data query device, characterized in that, The device includes: The first acquisition module is used to acquire a query request, the query request including at least one first business order number, at least one identifier of a first query table, and at least one first element corresponding to each first query table; The second acquisition module is used to acquire the correspondence between the query table and the column table. The column table includes at least one business order number and at least one piece of business information corresponding to each business order number. The correspondence is pre-set and stored in the preset storage space of the data query device. Multiple query tables are stored in the business database. Each query table is a set of multiple pieces of business information linked together based on primary key information. Multiple column tables are stored in the column database. Each column table has a correspondence with at least one query table in the business database. The business database is set in the core business system. The column database is set in the data query device. The data query device is also equipped with a message middleware. The message middleware stores data corresponding to multiple topics. Each topic corresponds to a query table in the business database. The determining module is used to determine the query result corresponding to the query request based on the query request and the correspondence, wherein the query result includes the at least one first business order number and the business data corresponding to each first business order number; The device is also used to: synchronize business information between the columnar database and the business database in real time through the message middleware according to the monitoring log.

10. A data query device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 8.

11. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, in, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 8.