Business data query method, device, equipment and medium
By building a target sub-learning library to integrate and process data from multiple business systems, the problems of slow query response and data redundancy caused by scattered business data are solved, and fast and orderly business data query and analysis are achieved.
Patent Information
- Application Number
- CN202210691042.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-17
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2042-06-17
AI Technical Summary
In the existing technology, business data is scattered in different systems and has no connection, resulting in slow query response and chaotic and redundant queried data, which affects the efficiency of business analysis.
By building a target sub-learning library and integrating data from multiple business systems using preset field information, N sub-data tables are generated and stored in the cloud database, achieving orderly integration and backup of data and supporting fast query.
Even when the query conditions are not comprehensive, orderly and non-redundant business query results can be quickly obtained from the target sub-learning library, which improves the query response speed and business analysis efficiency.
Smart Images

Figure CN115080606B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of artificial intelligence and big data technology, and in particular to a business data query method, apparatus, device, medium, and program product. Background Art
[0002] With the continuous development of the internet, transactions via the internet have become widely used. This has generated massive amounts of business data within various business systems. Querying and analyzing this business data requires searching for relevant data across multiple systems. Furthermore, this data remains unprocessed, chaotic, and redundant. This results in delays in timely responses and implementation of requests to extract relevant information from business data, indirectly impacting the efficiency of both business and system functions. Summary of the Invention
[0003] In view of the above problems, the present disclosure provides a business data query method, apparatus, device, medium and program product.
[0004] According to a first aspect of the present disclosure, a business data query method is provided, comprising:
[0005] In response to receiving the service query request, determining a query condition;
[0006] Determine, according to the query condition, a sub-learning library to be queried from the N target sub-learning libraries included in the learning library; and
[0007] Using the sub-learning library to be queried, according to the query conditions, business query results are obtained;
[0008] The target sub-learning library is obtained by integrating and processing the business data in M business systems according to the preset field information in the business data; M is an integer ≥ 2; N>M, and N is an integer.
[0009] According to an embodiment of the present disclosure, the categories of business data include business input data and business output data; the target sub-learning library is obtained by integrating and processing the business data obtained from M business systems based on preset field information in the business data, including:
[0010] Import the acquired business data from the M business systems into the cloud database;
[0011] Pair and combine the business data in the cloud database according to the business input data and the business output data to obtain N data sets;
[0012] Integrate N data sets separately to obtain N sub-data tables; and
[0013] Import N sub-data tables into the target table storage service cluster respectively as N target sub-learning repositories.
[0014] According to an embodiment of the present disclosure, it further includes:
[0015] Import N sub-data tables into the backup table storage service cluster separately to serve as N backup sub-learning repositories.
[0016] According to an embodiment of the present disclosure, the data set includes initial stock data and initial incremental data; N data sets are respectively integrated to obtain N sub-data tables, including:
[0017] For a dataset among N datasets:
[0018] Use the preset field information to obtain the status query results;
[0019] Classify the initial stock data and initial incremental data according to the status query results to obtain the target stock data and target incremental data;
[0020] Integrate the target stock data to obtain an integrated data table; and
[0021] Update the integrated data table according to the target incremental data to obtain the sub-data table.
[0022] According to an embodiment of the present disclosure, the target inventory data includes first target inventory data and second target inventory data; the target inventory data are integrated to obtain an integrated data table, including:
[0023] sorting the first target stock data and the second target stock data respectively according to a preset sorting rule to obtain sorted first target stock data and sorted second target stock data; and
[0024] According to the preset field information, the sorted first target inventory data and the sorted second target inventory data are associated with the status query result to obtain an integrated data table.
[0025] According to an embodiment of the present disclosure, updating the integrated data table according to the target incremental data to obtain the sub-data table includes:
[0026] If the target incremental data does not exist in the integrated data table, the target incremental data is added to the integrated data table to obtain a sub-data table; and
[0027] In the case that the target incremental data exists in the integrated data table, the occurrence number corresponding to the target incremental data in the integrated data table is updated to obtain a sub-data table.
[0028] According to an embodiment of the present disclosure, the target incremental data includes first target incremental data and second target incremental data; if the target incremental data does not exist in the integrated data table, the target incremental data is added to the integrated data table to obtain a sub-data table, including:
[0029] If the first target incremental data does not exist in the integrated data table, adding the first target incremental data to the integrated data table; and
[0030] According to the preset field information, the second target incremental data and the first target incremental data are associated with the status query result to obtain a sub-data table.
[0031] According to an embodiment of the present disclosure, importing the acquired business data from the M business systems into a cloud database includes:
[0032] Obtain business data from M business systems;
[0033] Pair business data with preset topics in the message queue to obtain matching results;
[0034] Importing the matching results into a message queue; and
[0035] Import business data in the message queue into the cloud database according to preset partitioning rules.
[0036] According to an embodiment of the present disclosure, it further includes:
[0037] When the message queue receives new business data, the cloud database is updated according to the new business data; and
[0038] The updated cloud database is used to update the sub-learning library corresponding to the new business data.
[0039] According to an embodiment of the present disclosure, it further includes:
[0040] In the event that a failure occurs in the sub-learning library to be queried, the backup sub-learning library corresponding to the sub-learning library to be queried is called;
[0041] Use the backup sub-learning library to obtain business query results based on the query conditions.
[0042] A second aspect of the present disclosure provides a business data query device, comprising:
[0043] A response module, configured to determine a query condition in response to receiving a service query request;
[0044] A first processing module is configured to determine a sub-learning library to be queried from the N target sub-learning libraries included in the learning library according to a query condition; and
[0045] The second processing module is used to obtain the business query result according to the query conditions using the sub-learning library to be queried;
[0046] The target sub-learning library is obtained by integrating and processing the business data in M business systems according to the preset field information in the business data; M is an integer ≥ 2; N>M, and N is an integer.
[0047] The third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned business data query method.
[0048] A fourth aspect of the present disclosure further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned business data query method.
[0049] A fifth aspect of the present disclosure further provides a computer program product, including a computer program, which implements the above-mentioned business data query method when executed by a processor.
[0050] According to the disclosed embodiments, when querying business data, N target sub-learning repositories are obtained by integrating and processing the business data from M business systems based on the preset field information in the business data. Even if the query conditions entered are not comprehensive, business query results can be quickly obtained from the target sub-learning repositories. The query response speed is fast, thereby improving query efficiency and simplifying the query method. Moreover, the relevant data retrieved is processed, orderly, and non-redundant, and does not need to be processed again during analysis, thereby improving business analysis efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0052] Figure 1 Schematically illustrates an application scenario diagram of the business data query method, apparatus, device, medium, and program product according to an embodiment of the present disclosure;
[0053] Figure 2 The following schematically shows a flow chart of a business data query method according to an embodiment of the present disclosure;
[0054] Figure 3 A flowchart schematically illustrates a method for integrating and processing acquired business data from M business systems based on preset field information in the business data according to an embodiment of the present disclosure;
[0055] Figure 4 A flowchart schematically illustrates a method for integrating N data sets to obtain N sub-data tables according to an embodiment of the present disclosure;
[0056] Figure 5 Schematically shows a business data query architecture diagram according to another embodiment of the present disclosure;
[0057] Figure 6 A schematic diagram of a structure of a business data query device according to an embodiment of the present disclosure is shown; and
[0058] Figure 7 A block diagram of an electronic device suitable for implementing a business data query method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0059] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0060] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0061] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0062] When expressions such as "at least one of A, B and C, etc." are used, they should generally be interpreted in accordance with the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0063] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.
[0064] In the technical solution of the embodiment of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.
[0065] During the implementation of this disclosure, it was discovered that when querying business data, database queries were performed on the corresponding business system, depending on the type of business, to retrieve relevant data. However, because this data existed independently in the corresponding system, it was scattered and unconnected, resulting in slow query responses. Furthermore, the retrieved relevant data was not processed, resulting in confusion and redundancy, requiring further processing during analysis, resulting in low business analysis efficiency.
[0066] An embodiment of the present disclosure provides a business data query method, comprising: determining a query condition in response to receiving a business query request; determining a sub-learning library to be queried from N target sub-learning libraries included in the learning library based on the query condition; and obtaining a business query result based on the query condition using the sub-learning library to be queried; wherein the target sub-learning library is obtained by integrating and processing business data from M business systems acquired based on preset field information in the business data; M is an integer ≥2; N>M, and N is an integer.
[0067] Figure 1 The application scenario diagram of the business data query method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown.
[0068] like Figure 1 As shown, an application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and servers 105-1...105-N. Network 104 is a medium for providing communication links between terminal devices 101, 102, 103 and servers 105-1...105-N. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0069] Users can use terminal devices 101, 102, and 103 to interact with servers 105-1...105-N via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as financial applications, shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0070] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0071] Servers 105-1...105-N may be servers that provide various services, such as background management servers (for example only) that support websites browsed by users using terminal devices 101, 102, and 103. The background management servers may analyze and process received data such as user requests, and feed back processing results (e.g., web pages, information, or data obtained or generated based on user requests) to the terminal devices.
[0072] It should be noted that the business data query method provided by the embodiment of the present disclosure can generally be executed by the server 105-1...server 105-N. Accordingly, the business data query device provided by the embodiment of the present disclosure can generally be set in the server 105-1...server 105-N. The business data query method provided by the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105-1...server 105-N and can communicate with the terminal devices 101, 102, 103 and / or the server 105-1...server 105-N. Accordingly, the business data query device provided by the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105-1...server 105-N and can communicate with the terminal devices 101, 102, 103 and / or the server 105-1...server 105-N.
[0073] The service data query method provided in the embodiment of the present disclosure may also be executed by the terminal devices 101, 102, and 103. Accordingly, the service data query apparatus provided in the embodiment of the present disclosure may also be generally provided in the terminal devices 101, 102, and 103. The service data query method provided in the embodiment of the present disclosure may also be executed by other terminals different from the terminal devices 101, 102, and 103. Accordingly, the service data query apparatus provided in the embodiment of the present disclosure may also be provided in other terminals different from the terminal devices 101, 102, and 103.
[0074] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0075] The following will be based on Figure 1 The scene described by Figures 2 to 5 The business data query method of the disclosed embodiment is described in detail.
[0076] Figure 2The flowchart of the business data query method according to the embodiment of the present disclosure is schematically shown.
[0077] like Figure 2 As shown, the business data query method 200 of this embodiment includes operations S201 to S203.
[0078] In operation S201 , in response to receiving a service query request, a query condition is determined.
[0079] According to an embodiment of the present disclosure, a user can initiate a service query request using a terminal device, which can then send the service query request to a server. The server responds to the received service query request and obtains query conditions. The query conditions can include keyword queries associated with the service or detailed queries of service data.
[0080] In operation S202 , a sub-learning library to be queried is determined from N target sub-learning libraries included in the learning library according to a query condition.
[0081] According to an embodiment of the present disclosure, a target sub-learning library can be obtained by integrating and processing business data from M business systems based on preset field information in the business data; M is an integer ≥ 2; N>M, and N is an integer. The M business systems may include, but are not limited to, registration-related business systems and financial business systems. Financial business systems may include trading business systems and fund business systems, among others.
[0082] For example, for financial business data, the preset field information may include user account number and / or business bank number. All types of business data associated with the user account number can be integrated. All types of business data associated with the business bank number can also be integrated.
[0083] In operation S203, the business query result is obtained according to the query conditions using the sub-learning library to be queried.
[0084] According to the embodiment of the present disclosure, the business query result under the query condition can be directly obtained from the sub-learning library to be queried according to the query condition, and the business query result can be provided to the user for reference.
[0085] It should be noted that if the query conditions are relevant to the preset field information, the sub-learning library to be queried can be accurately determined, resulting in accurate business query results. If the query conditions are unrelated to the preset field information, the keywords in the query conditions can be used to determine the relevant sub-learning library to be queried, obtaining relevant business query results. The probability of the keyword appearing in the relevant business query results can also be calculated and fed back to the user for reference.
[0086] For example, the top five related service query results ranked by probability of appearance can be fed back to the user terminal for reference. Calculating the probability of appearance in the related service query results can include counting the total number of query result appearances, then dividing the number of occurrences of each query result by the total number of occurrences to obtain the probability of appearance in the related service query results. The probability of appearance in the related service query results can represent the accuracy of the related service query results found at that time.
[0087] According to the disclosed embodiments, when querying business data, N target sub-learning repositories are obtained by integrating and processing the business data from M business systems based on the preset field information in the business data. Even if the query conditions entered are not comprehensive, business query results can be quickly obtained from the target sub-learning repositories. The query response speed is fast, thereby improving query efficiency and simplifying the query method. Moreover, the relevant data retrieved is processed, orderly, and non-redundant, and does not need to be processed again during analysis, thereby improving business analysis efficiency.
[0088] Figure 3 The flowchart schematically shows a method in which a target sub-learning library according to an embodiment of the present disclosure is obtained by integrating and processing business data in M business systems based on preset field information in the business data.
[0089] like Figure 3 As shown, the target sub-learning library of this embodiment is obtained by integrating and processing the acquired business data in M business systems according to the preset field information in the business data. The method 300 includes operations S301 to S304.
[0090] In operation S301 , the acquired business data in the M business systems are imported into a cloud database.
[0091] According to embodiments of the present disclosure, data acquisition software can be used to acquire business data from M business systems and then import it into a cloud database. The cloud database is not limited by capacity. When importing the acquired business data from the M business systems into the cloud database, the data can be matched to a message queue with preset topics that correspond one-to-one with the business data, and then imported into the cloud database.
[0092] According to an embodiment of the present disclosure, when business data is imported into a cloud database using a message queue, the data can be imported into the cloud database in partitions according to the timestamps when the business data was generated, so as to facilitate data integration.
[0093] In operation S302 , the business data in the cloud database is paired and combined according to the business input data and the business output data to obtain N data sets.
[0094] According to an embodiment of the present disclosure, the categories of business data include business input data and business output data. According to the business input data, the corresponding business output data can be paired and combined to obtain a data set.
[0095] For example, if the business input data is a bank number, the business output data can be all data associated with that bank number. The bank number can be combined with all data associated with it to form a data set. If the business input data is an account number, the business output data can be all data associated with that account number. The account number can be combined with all data associated with that account number to form a data set. It should be noted that since each business system has multiple business data sets, pairing and combining the corresponding business input data and business output data will result in multiple data sets. The number of data sets is greater than the number of business systems, so N>M, and N is an integer.
[0096] In operation S303 , the N data sets are integrated to obtain N sub-data tables.
[0097] According to an embodiment of the present disclosure, the business data in the data set obtained in operation S302 can be divided into initial stock data and initial incremental data according to the timestamp of the business data. The initial stock data is first integrated to obtain an integrated data table; then the initial incremental data is updated to the integrated data table to obtain a sub-data table.
[0098] For example, you can obtain business data generated in M business systems within a period of time, select a time point as the current time point, the business data generated before this time point can be regarded as the initial stock data, and the business data generated after this time point can be regarded as the initial incremental data.
[0099] In operation S304 , the N sub-data tables are imported into the target table storage service cluster respectively as N target sub-learning repositories.
[0100] According to an embodiment of the present disclosure, the target table storage service cluster can store data as a learning repository.
[0101] According to the disclosed embodiments, by importing the acquired business data from M business systems into a cloud database, database capacity limitations are eliminated. The business data in the cloud database is first consolidated and processed, then imported into the target table storage service cluster to serve as the learning repository. The learning repository serves as a database for business data queries, improving query efficiency and simplifying query methods.
[0102] According to another embodiment of the present disclosure, in a method for obtaining a target sub-learning library by integrating and processing business data from M business systems obtained based on preset field information in the business data, in addition to the above operations S301 to S304, the following steps may also be included:
[0103] Import N sub-data tables into the backup table storage service cluster separately to serve as N backup sub-learning repositories.
[0104] According to an embodiment of the present disclosure, the backup sub-learning library can be used to switch to call the backup sub-learning library when the target sub-learning library cannot be called during business query, thereby ensuring the smooth progress of business query.
[0105] Figure 4 The flowchart schematically shows a method for integrating N data sets to obtain N sub-data tables according to an embodiment of the present disclosure.
[0106] like Figure 4 As shown, the method 400 of integrating N data sets to obtain N sub-data tables in this embodiment includes operations S401 to S404. It should be noted that operations S401 to S404 are applicable to any one of the N data sets.
[0107] In operation S401, a status query result is obtained using preset field information.
[0108] According to an embodiment of the present disclosure, the preset field information can be determined based on the acquired business data from the M business systems. The status query result may include the success or failure status of the business operation. Business data can be understood as the data generated during the business operation. The preset field information can be used to perform a query to obtain the corresponding business query result, and the success or failure status of the business operation can be determined based on the corresponding business query result.
[0109] In operation S402, the initial stock data and the initial incremental data are classified according to the status query result to obtain target stock data and target incremental data.
[0110] According to an embodiment of the present disclosure, the initial stock data can be classified according to the status query result to obtain the target stock data. The initial incremental data can be classified according to the status query result to obtain the target incremental data.
[0111] For example, the initial inventory data can be divided into success status data and failure status data, and the target inventory data includes the success status data of the initial inventory data and the failure status data of the initial inventory data. The initial incremental data can also be divided into success status data and failure status data, and the target incremental data includes the success status data of the initial incremental data and the failure status data of the initial incremental data.
[0112] In operation S403, the target inventory data is integrated to obtain an integrated data table.
[0113] According to an embodiment of the present disclosure, the target inventory data may be sorted, and then the sorted target inventory data may be associated with the status query result to obtain an integrated data table.
[0114] For example, the target stock data may be sorted according to the number of times it appears, and the sorting may include descending sorting. After sorting, the status query results including success status and failure status may be associated with the target stock data to obtain an integrated data table.
[0115] In operation S404, the integrated data table is updated according to the target incremental data to obtain a sub-data table.
[0116] According to an embodiment of the present disclosure, the integrated data table may be updated based on whether a relationship exists between the integrated data table and the target incremental data.
[0117] For example, if the target incremental data already exists in the integrated data table, then only the data count corresponding to the target incremental data in the integrated data table needs to be updated. If the target incremental data does not exist in the integrated data table, then the target incremental data also needs to be imported into the integrated data table.
[0118] According to the embodiments of the present disclosure, by classifying the initial stock data, the initial stock data is first integrated to obtain an integrated data table; the classified initial incremental data is then also updated to the integrated data table. The resulting sub-data table can be used to generate sub-learning libraries to facilitate business data queries. The relevant data obtained from the sub-learning libraries has been processed, is orderly, and non-redundant, and does not require further processing during analysis, thereby improving business analysis efficiency.
[0119] According to an embodiment of the present disclosure, the target inventory data may include first target inventory data and second target inventory data; integrating the target inventory data to obtain an integrated data table may include:
[0120] sorting the first target stock data and the second target stock data respectively according to a preset sorting rule to obtain sorted first target stock data and sorted second target stock data; and
[0121] According to the preset field information, the sorted first target inventory data and the sorted second target inventory data are associated with the status query result to obtain an integrated data table.
[0122] According to an embodiment of the present disclosure, the first target stock data may be target stock data in a successful state. The second target stock data may be target stock data in a failed state. The preset sorting rule may be determined based on the preset field information and the number of query results obtained by querying using the preset field information. The first target stock data and the second target stock data may be sorted separately based on the preset field information, and then sorted based on the number of query results obtained by querying the same preset field information; after the sorting is completed, the first target stock data and the second target stock data under the same preset field information are associated to obtain an integrated data table.
[0123] For example, the preset field information can be the query field and the field to be queried. For example, the query field can be the account name, and the field to be queried can be the row number. All business data in the successful state can be stored in temporary table A. Similarly, all business data in the failed state under the preset field information can be stored in temporary table B. Tables A and B are sorted according to the preset sorting rules. After the sorting is completed, the data in tables A and B can be linked to the status query results and stored in table C.
[0124] According to the embodiments of the present disclosure, by sorting the first target inventory data and the second target inventory data and associating the sorted first target inventory data and the second target inventory data with the status query result, the initial inventory data is integrated, the data in the resulting integrated data table is orderly, and query efficiency is improved.
[0125] According to an embodiment of the present disclosure, the integrated data table is updated according to the target incremental data to obtain a sub-data table, including:
[0126] If the target incremental data does not exist in the integrated data table, the target incremental data is added to the integrated data table to obtain a sub-data table; and
[0127] In the case that the target incremental data exists in the integrated data table, the occurrence number corresponding to the target incremental data in the integrated data table is updated to obtain a sub-data table.
[0128] According to an embodiment of the present disclosure, for a data set, after the initial stock data is integrated to obtain an integrated data table, the initial incremental data can be integrated. The target incremental data obtained after the classification of the initial incremental data is detected to see if it exists in the integrated data table. If it does, it does not need to be saved repeatedly, and the number of occurrences corresponding to the target incremental data can be updated to obtain a sub-data table. If it does not exist, the target incremental data needs to be added and saved to the integrated data table to obtain a sub-data table.
[0129] According to the embodiments of the present disclosure, the integration of the initial incremental data is achieved by integrating the target incremental data obtained after classification. The data in the sub-data table finally obtained is non-redundant and is also conducive to improving query efficiency.
[0130] According to an embodiment of the present disclosure, the target incremental data includes first target incremental data and second target incremental data; if the target incremental data does not exist in the integrated data table, the target incremental data is added to the integrated data table to obtain a sub-data table, including:
[0131] If the first target incremental data does not exist in the integrated data table, adding the first target incremental data to the integrated data table; and
[0132] According to the preset field information, the second target incremental data and the first target incremental data are associated with the status query result to obtain a sub-data table.
[0133] According to an embodiment of the present disclosure, the first target incremental data may be target incremental data in a successful state. The second target incremental data may be target incremental data in a failed state. Preset field information may be used to perform an associated query on the integrated data table using the first target incremental data. If the first target incremental data does not exist in the integrated data table, the first target incremental data needs to be added to the integrated data table. The second target incremental data corresponding to the preset field information is then associated with the first target incremental data through the status query result to obtain a sub-data table.
[0134] For example, the preset field information can be the query field and the field to be queried. For example, the query field can be the account name, and the field to be queried can be the row number. The initial incremental data for all successful states queried can be stored in temporary table D. Similarly, the initial incremental data for all failed states queried under the preset field information can be stored in temporary table E. Use temporary table D to perform an associated query on table C using the preset field information. If temporary table D exists in table C, the number of records in table C can be added. If temporary table D does not exist in table C, directly add temporary table D to table C. Then, use temporary table D to associate the status query results with temporary table E, and store the data in table F. This allows table F to be imported into the target table storage service cluster as N target sub-learning libraries.
[0135] According to the embodiments of the present disclosure, by using preset field information to process the first target incremental data and the second target incremental data obtained after classification, and then integrating them into the final sub-data table, the data in the sub-data table is not redundant and query efficiency is improved. This method also simplifies the integration of continuously generated new business data.
[0136] According to an embodiment of the present disclosure, importing the acquired business data from M business systems into a cloud database includes:
[0137] Obtain business data from M business systems;
[0138] Pair business data with preset topics in the message queue to obtain matching results;
[0139] Importing the matching results into a message queue; and
[0140] Import business data in the message queue into the cloud database according to preset partitioning rules.
[0141] According to an embodiment of the present disclosure, a preset topic in a message queue can be established based on a corresponding topic of business data. The preset partitioning rule can be partitioning based on timestamps, for example, business data generated every day can be divided into one zone.
[0142] Business data from M business systems can be obtained through the inter-bank clearing system; with the help of the data replication platform, the business data obtained from the inter-bank clearing system is paired with the preset topics in the message queue and copied to the message queue; then, the business data in the message queue is imported into each partition of the cloud database according to the time when it was generated, so as to facilitate the identification of initial stock data and initial incremental data when integrating and processing business data later.
[0143] According to the embodiments of the present disclosure, due to the large amount of business data acquired, using a traditional MySQL database often requires a large amount of hardware capacity to store it, placing high demands on resources and making it difficult to support the database capacity. Therefore, the business data acquired from M business systems is copied and imported into a cloud database via batch jobs, eliminating capacity constraints.
[0144] According to an embodiment of the present disclosure, the business data query method may further include:
[0145] When the message queue receives new business data, the cloud database is updated according to the new business data; and
[0146] The updated cloud database is used to update the sub-learning library corresponding to the new business data.
[0147] According to an embodiment of the present disclosure, the business data in M business systems acquired by the interbank clearing system can be monitored through a data replication platform. If there are any changes in the business data, the new business data can be pushed to a message queue. After the message queue receives the new business data, the cloud database is updated. The new business data in the updated cloud database can be used to update the sub-learning library according to the above-mentioned method for constructing the sub-learning library.
[0148] According to the embodiments of the present disclosure, the sub-learning library can be continuously updated by utilizing new business data. After continuous updating, it is expected to build an omni-channel learning library, making the data range of the learning library more complete, and ultimately realizing a learning library with synchronous learning and intelligent updates.
[0149] According to another embodiment of the present disclosure, the business data query method may further include:
[0150] In the event that a failure occurs in the sub-learning library to be queried, the backup sub-learning library corresponding to the sub-learning library to be queried is called;
[0151] Use the backup sub-learning library to obtain business query results based on the query conditions.
[0152] According to an embodiment of the present disclosure, the data of the backup sub-learning library is synchronized with the data of the target sub-learning library.
[0153] Figure 5 A business data query architecture diagram according to another embodiment of the present disclosure is schematically shown.
[0154] like Figure 5 As shown, the business data query architecture diagram can be divided into three layers. The first layer can be the data deployment layer: two learning libraries can be deployed in the same area to store business data. When a learning library fails, you can switch to the other learning library to continue using it. The data of the two learning libraries are synchronized. The second layer is the deployment service layer, which integrates services between the learning library and the application. By setting up the table storage service (i.e., kva service), the learning library is centrally called for services, and the sub-database is accessed in a unified manner. The third layer is the access layer: the access layer can be deployed in a sub-park manner. The access application accesses the park randomly according to the resource situation through load balancing, that is, the data is called through the kva service to access the learning library.
[0155] This business data query architecture enables bidirectional data replication and access across two campuses through middleware, enabling flexible application of learning libraries across both campuses. It also provides a degree of resilience: if a system-level failure occurs in one campus, the KVA service can support the takeover of all services through other campuses, making campus-level failures transparent to connected applications.
[0156] According to an embodiment of the present disclosure, when a business query is performed and a target sub-learning library fails, a backup sub-learning library can be switched and called to ensure the smooth progress of the business query.
[0157] Based on the above business data query method, the present disclosure also provides a business data query device. Figure 6 The device is described in detail.
[0158] Figure 6 The structural block diagram of the business data query device according to an embodiment of the present disclosure is schematically shown.
[0159] like Figure 6 As shown, the business data query device 600 of this embodiment includes a response module 610 , a first processing module 620 and a second processing module 630 .
[0160] The response module 610 is used to determine the query condition in response to receiving the service query request. In one embodiment, the response module 610 can be used to perform the operation S201 described above, which will not be repeated here.
[0161] The first processing module 620 is used to determine the sub-learning library to be queried from the N target sub-learning libraries included in the learning library according to the query condition. In one embodiment, the first processing module 620 can be used to perform the operation S202 described above, which will not be repeated here.
[0162] The second processing module 630 is used to obtain a business query result based on the query condition using the sub-learning library to be queried. In one embodiment, the second processing module 630 can be used to perform the operation S203 described above, which will not be repeated here.
[0163] According to an embodiment of the present disclosure, the service data query device 600 may further include a first updating module and a second updating module.
[0164] The first updating module is used to update the cloud database according to the new business data when the message queue receives new business data.
[0165] The second updating module is used to update the sub-learning library corresponding to the new business data using the updated cloud database.
[0166] According to an embodiment of the present disclosure, the business data query device 600 may further include a calling module and a third processing module.
[0167] The calling module is used to call the backup sub-learning library corresponding to the sub-learning library to be queried when a failure occurs in the sub-learning library to be queried.
[0168] The third processing module is used to obtain business query results based on query conditions using the backup sub-learning library.
[0169] According to an embodiment of the present disclosure, any multiple modules in the response module 610, the first processing module 620, and the second processing module 630 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the response module 610, the first processing module 620, and the second processing module 630 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in an appropriate combination of any of them. Alternatively, at least one of the response module 610, the first processing module 620, and the second processing module 630 can be at least partially implemented as a computer program module, which can perform the corresponding function when the computer program module is executed.
[0170] Figure 7 A block diagram of an electronic device suitable for implementing a business data query method according to an embodiment of the present disclosure is schematically shown.
[0171] like Figure 7 As shown, the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. The processor 701 may, for example, include a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0172] Various programs and data required for the operation of the electronic device 700 are stored in the RAM 703. The processor 701, ROM 702, and RAM 703 are connected to each other via a bus 704. The processor 701 executes the various operations of the method flow according to the embodiment of the present disclosure by executing the programs in the ROM 702 and / or RAM 703. It should be noted that the programs may also be stored in one or more memories other than the ROM 702 and RAM 703. The processor 701 may also execute the various operations of the method flow according to the embodiment of the present disclosure by executing the programs stored in the one or more memories.
[0173] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage portion 708 including a hard disk; and a communication portion 709 including a network interface card such as a LAN card or a modem. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed in the drive 710 as needed, so that a computer program read therefrom can be installed into the storage portion 708 as needed.
[0174] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.
[0175] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.
[0176] The embodiments of the present disclosure also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiments of the present disclosure.
[0177] The computer program executes the above functions defined in the system / device of the embodiment of the present disclosure when the processor 701 executes the computer program. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0178] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 709, and / or installed from a removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0179] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from a removable medium 711. When the computer program is executed by the processor 701, the above-described functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.
[0180] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).
[0181] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0182] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways, even if such combinations and / or couplings are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or couplings are intended to fall within the scope of this disclosure.
[0183] The embodiments of the present disclosure are described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be used in combination to advantage. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A business data query method, comprising: In response to receiving the service query request, determining a query condition; According to the query condition, determining a sub-learning library to be queried from the N target sub-learning libraries included in the learning library; Using the sub-learning library to be queried, according to the query conditions, obtain business query results; The target sub-learning library is obtained by the following operations: Import the acquired business data from the M business systems into the cloud database; Pairing and combining the business data in the cloud database according to business input data and business output data to obtain N data sets, wherein the data sets include initial stock data and initial incremental data; For a data set among the N data sets: Use the preset field information to obtain the status query results; Classifying the initial stock data and the initial incremental data according to the status query result to obtain target stock data and target incremental data; Integrating the target inventory data to obtain an integrated data table; Update the integrated data table according to the target incremental data to obtain a sub-data table; The N sub-data tables corresponding to the N data sets are respectively imported into the target table storage service cluster as the N target sub-learning libraries; M is an integer ≥ 2; N>M, and N is an integer, and the business data includes at least one of the following: registration business data and financial business data.
2. The method according to claim 1, further comprising: The N sub-data tables are respectively imported into the backup table storage service cluster as N backup sub-learning libraries.
3. The method according to claim 1, wherein The target stock data includes first target stock data and second target stock data; the target stock data are integrated to obtain an integrated data table, including: sorting the first target stock data and the second target stock data respectively according to a preset sorting rule to obtain sorted first target stock data and sorted second target stock data; and According to the preset field information, the sorted first target inventory data and the sorted second target inventory data are associated with the status query result to obtain the integrated data table.
4. The method according to claim 1 or 3, wherein The updating of the integrated data table according to the target incremental data to obtain the sub-data table includes: If the target incremental data does not exist in the integrated data table, the target incremental data is added to the integrated data table to obtain the sub-data table; and In the case that the target incremental data exists in the integrated data table, the number of occurrences corresponding to the target incremental data in the integrated data table is updated to obtain the sub-data table.
5. The method according to claim 4, wherein The target incremental data includes first target incremental data and second target incremental data; when the target incremental data does not exist in the integrated data table, the target incremental data is added to the integrated data table to obtain the sub-data table, including: If the first target incremental data does not exist in the integrated data table, adding the first target incremental data to the integrated data table; and According to the preset field information, the second target incremental data and the first target incremental data are associated with the status query result to obtain the sub-data table.
6. The method according to claim 1, wherein Importing the acquired business data from the M business systems into the cloud database includes: Acquire business data from the M business systems; Pairing the business data with a preset topic in the message queue to obtain a pairing result; Importing the pairing result into the message queue; and According to a preset partitioning rule, the business data in the message queue is imported into the cloud database.
7. The method according to claim 6, further comprising: When the message queue receives new business data, updating the cloud database according to the new business data; as well as The sub-learning library corresponding to the new business data is updated using the updated cloud database.
8. The method according to claim 1, further comprising: In the event that the sub-learning library to be queried fails, calling a backup sub-learning library corresponding to the sub-learning library to be queried; The backup sub-learning library is used to obtain business query results according to the query conditions.
9. A business data query device, comprising: A response module, configured to determine a query condition in response to receiving a service query request; A first processing module is configured to determine a sub-learning library to be queried from the N target sub-learning libraries included in the learning library according to the query condition; as well as A second processing module is configured to obtain a business query result based on the query condition using the sub-learning library to be queried; The target sub-learning library is obtained by the following operations: Import the acquired business data from the M business systems into the cloud database; Pairing and combining the business data in the cloud database according to business input data and business output data to obtain N data sets, wherein the data sets include initial stock data and initial incremental data; For a data set among the N data sets: Use the preset field information to obtain the status query results; Classifying the initial stock data and the initial incremental data according to the status query result to obtain target stock data and target incremental data; Integrating the target inventory data to obtain an integrated data table; Update the integrated data table according to the target incremental data to obtain a sub-data table; The N sub-data tables corresponding to the N data sets are respectively imported into the target table storage service cluster as the N target sub-learning libraries; M is an integer ≥ 2; N>M, and N is an integer, and the business data includes at least one of the following: registration business data and financial business data.
10. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to perform the method according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Data query method and device, electronic equipment and storage medium
CN112328596A
Financial data storage and query method, system, device and program product
CN114064841A