Business model generation method, business data query method, device and equipment
By constructing a target business model in layers and using N data processing layers to process K raw data tables, the problems of low communication efficiency and high resource consumption in traditional business model construction are solved, and efficient generation and optimization of business models are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA CONSTRUCTION BANK
- Filing Date
- 2022-09-26
- Publication Date
- 2026-06-05
AI Technical Summary
In the process of building traditional business models, communication costs are high, efficiency is low, generation and maintenance costs are high, running time is long, database resources are consumed in large quantities, and the model structure is complex and difficult to optimize.
By generating K original data tables, parsing field information, and processing these data tables using N cascading data processing layers, a target business model is generated. The processing logic is optimized to each data processing layer, simplifying the model structure.
It reduces model runtime and maintenance/optimization costs, improves generation efficiency and database resource retrieval efficiency, and facilitates model maintenance and optimization.
Smart Images

Figure CN115422202B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data analysis technology, specifically to a method for generating a business model, a method for querying business data, an apparatus, an electronic device, a storage medium, and a program product. Background Technology
[0002] Currently, the financial industry establishes risk warning platforms, on which business models are generated to assess business risks. In this process, business personnel typically summarize problems based on business needs and then relay them to technical staff. The technical staff then translates these business problems into Structured Query Language (SQL) to form the business model.
[0003] However, enterprises generate a huge amount of business data every day, and the growth rate is rapid. The traditional business model building process involves communication between business personnel and technical personnel to transform business problems into business models, which leads to high communication costs, low communication efficiency, low processing efficiency in generating business models, and high costs in maintaining and optimizing business models.
[0004] Furthermore, the business models generated by related technologies are typically run by a single SQL statement containing more than a dozen lines of code. The business model structure is complex, and the operation cycle of calling multiple related tables to perform Cartesian product operations is long, resulting in high consumption of database resources and high costs for later maintenance and optimization. Summary of the Invention
[0005] In view of the above problems, this disclosure provides a method for generating a business model, a method for querying business data, an apparatus, an electronic device, a storage medium, and a program product.
[0006] According to the first aspect of this disclosure, a method for generating a business model is provided, comprising: generating K original data tables based on acquired configuration information, wherein the configuration information is used to define the business model, the original data tables correspond one-to-one with the business data, and K is greater than or equal to 2; parsing the K original data tables to obtain M field information corresponding to the K original data tables, wherein the field information is used to represent the attribute characteristics of the business data, and M is greater than or equal to 2; and processing the K original data tables through N cascaded data processing layers based on the M field information and the definition logic between the M field information to generate a target business model, wherein the input of the nth data processing layer includes one original data table from the K original data tables and an intermediate table output by the (n-1)th data processing layer, where N is greater than or equal to 1, n is greater than or equal to 2 and n is less than or equal to N, and the definition logic is used to represent the processing relationship between two field information in the M field information.
[0007] According to embodiments of this disclosure, the output of the data processing layer includes intermediate tables and structured query statements; based on M field information and the definition logic between the M field information, K original data tables are processed through N cascaded data processing layers to generate a target business model, including: after the (n-1)th data processing layer outputs the (n-1)th intermediate table, determining first field information from the (n-1)th intermediate table, the first field information being related to the data processing function executed by the nth data processing layer; determining a first original data table from the K original data tables based on the definition logic between the first field information and the M field information; and generating an nth intermediate table and an nth structured query statement corresponding to the nth data processing layer based on the first original data table and the (n-1)th intermediate table, wherein, when n equals N, the Nth intermediate table is the data table corresponding to the target business model.
[0008] According to embodiments of this disclosure, the definition logic includes a database function or a preset script method; determining a first original data table from K original data tables based on the definition logic between the first field information and M field information includes: obtaining second field information corresponding to the first field information from the M field information; determining target definition logic from the definition logic between the M field information based on the field names of the first field information and the second field information; and determining the first original data table based on the target definition logic.
[0009] According to embodiments of this disclosure, the method further includes: generating a temporary intermediate table corresponding to the nth data processing layer in response to a user's preset operation, the preset operation including a join operation and / or a filtering operation; replacing the original nth intermediate table generated by the nth data processing layer with the temporary intermediate table to obtain an updated nth intermediate table; and updating the n+1th intermediate table generated by the n+1th data processing layer according to the definition logic between the updated nth intermediate table and the M field information.
[0010] According to embodiments of this disclosure, generating a temporary intermediate table corresponding to the nth data processing layer in response to a user's preset operation includes: determining the third field information selected by the user in response to a user's connection operation, the third field information including fields displayed on the user's interactive interface; connecting the (n-1)th intermediate table generated by the (n-1)th data processing layer with the second original data table or the intermediate table to which the third field information belongs, to generate a temporary intermediate table corresponding to the nth data processing layer; and / or determining the fourth field information selected by the user in response to a user's filtering operation, deleting the fourth field information from the original nth intermediate table generated by the nth data processing layer, to generate a temporary intermediate table corresponding to the nth data processing layer.
[0011] According to embodiments of this disclosure, the method further includes: if an identifier field for characterizing a user's identity exists in the original data table, determining the identifier field as the target field information; and randomly selecting candidate field information corresponding to the target field information from the M field information according to the definition logic between the target field information and the M field information; and generating a first intermediate table and a first structured query statement corresponding to the first data processing layer based on the original data table to which the target field information belongs and the original data table to which the candidate fields belong.
[0012] According to embodiments of this disclosure, the method further includes: combining N structured query statements generated by the N data processing layers according to the connection order of the N cascaded data processing layers to obtain a target structured query statement, which is used to generate a target business model.
[0013] According to an embodiment of this disclosure, N structured query statements generated by the N cascaded data processing layers are combined according to their connection order to obtain a target structured query statement. This includes: determining index data corresponding to the N structured query statements from an index table, where the index data is used to characterize the processing relationship between M field information using standard structured query statements; optimizing the N structured query statements based on the index data to obtain P optimized structured query statements, where P is greater than or equal to 1 and less than or equal to N; combining the P structured query statements to obtain Q structured query statements, where all Q structured query statements are used to generate a target business model; and determining the target structured query statement corresponding to the target business model based on the verification results of the Q structured query statements, where the verification results represent the runtime of the Q structured query statements.
[0014] According to an embodiment of this disclosure, generating K raw data tables based on the acquired configuration information includes: generating configuration information corresponding to the user's operation in response to the user's operation; transmitting the configuration information to a simulation environment to generate simulated business data corresponding to the configuration information; and generating K raw data tables based on the simulated business data and the configuration information.
[0015] According to embodiments of this disclosure, the method further includes: after generating the target business model, evaluating the target business model to obtain an evaluation result; and if the evaluation result is determined to be passing, publishing the target business model from the simulation environment to the production environment so that the target business model can provide services to users in the production environment.
[0016] The second aspect of this disclosure provides a business data query method, comprising: responding to a query request from a target user, parsing the query request to obtain multiple field information corresponding to the query request; and inputting the multiple field information into a business model to output query results corresponding to the query request, wherein the business model is generated according to the above method.
[0017] A third aspect of this disclosure provides an apparatus for generating a business model, comprising:
[0018] The acquisition module is used to generate K raw data tables based on the acquired configuration information. The configuration information is used to define the business model. The raw data tables correspond one-to-one with the business data, and K is greater than or equal to 2.
[0019] The parsing module is used to parse K original data tables to obtain M fields corresponding to the K original data tables. These fields represent the attribute characteristics of the business data, and M is greater than or equal to 2.
[0020] The generation module is used to process K original data tables through N cascading data processing layers based on M field information and the definition logic between the M field information to generate the target business model. The input of the nth data processing layer includes one original data table from the K original data tables and an intermediate table output by the (n-1)th data processing layer. N is greater than or equal to 1, n is greater than or equal to 1 and n is less than or equal to N. The definition logic is used to represent the processing relationship between two field informations among the M field informations.
[0021] A fourth aspect of this disclosure provides an electronic device comprising: one or more processors; and 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 cause the one or more processors to perform the above-described business model generation method or business data query method.
[0022] The fifth aspect of this disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the above-described business model generation method or business data query method.
[0023] The sixth aspect of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described business model generation method or business data query method.
[0024] This disclosure achieves layered construction of the target business model by obtaining configuration information, generating raw data tables based on the configuration information, and then processing K raw data tables through N data processing layers based on M fields in the raw data tables. In the process of generating the target business model using N data processing layers, this disclosure optimizes the processing logic of the entire business model to each data processing layer, simplifying the business model structure, reducing runtime, facilitating model maintenance and optimization, and reducing maintenance and optimization costs. Attached Figure Description
[0025] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0026] Figure 1 The illustration shows an application scenario of the business model generation method according to an embodiment of the present disclosure;
[0027] Figure 2 A flowchart illustrating a method for generating a business model according to an embodiment of the present disclosure is shown schematically;
[0028] Figure 3 A flowchart illustrating the generation of a target business model based on N data processing layers according to an embodiment of the present disclosure is shown in the schematic diagram.
[0029] Figure 4 A schematic diagram illustrating the generation of a target business model according to a specific embodiment of the present disclosure is shown.
[0030] Figure 5 A flowchart illustrating an embodiment of the present disclosure of a method for updating an intermediate table is shown schematically.
[0031] Figure 6 A flowchart illustrating a business data query method according to an embodiment of the present disclosure is shown schematically.
[0032] Figure 7 This schematic diagram illustrates a structural block diagram of a business model generation apparatus according to an embodiment of the present disclosure;
[0033] Figure 8 A block diagram of an electronic device suitable for a business model generation method according to an embodiment of the present disclosure is shown schematically. Detailed Implementation
[0034] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0035] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0036] 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 are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0037] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).
[0038] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure, and application of user personal information comply with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and there is no violation of public order and good morals.
[0039] In the technical solution disclosed herein, the user's authorization or consent is obtained before acquiring or collecting the user's personal information.
[0040] This disclosure reveals that in related technologies, business personnel typically report business issues to technical personnel, who then construct the business model. During the business model construction process, communication between business and technical personnel leads to low efficiency and high costs. While experienced technical personnel can maintain and optimize the complex model structure after construction, this requires significant time and effort to clarify the structure. For technical personnel unfamiliar with the model, and for business personnel submitting the business model requirements, it is impossible to determine whether the model's functionality meets the requirements based on its complex structure, further increasing communication time and costs, model maintenance costs, and model maintenance difficulty.
[0041] Furthermore, the operational framework for building the model remains unchanged in the related technologies; only the model and parameters are altered, resulting in the generated business model corresponding to a single SQL statement. Executing this SQL statement requires joining multiple tables and performing Cartesian product operations, leading to long execution times, complex structures, high database resource consumption, and high costs for subsequent maintenance and optimization.
[0042] The embodiments of this disclosure provide a method for generating a business model, comprising: generating K original data tables based on acquired configuration information, wherein the configuration information is used to define the business model, the original data tables correspond one-to-one with the business data, and K is greater than or equal to 2; parsing the K original data tables to obtain M field information corresponding to the K original data tables, wherein the field information is used to represent the attribute characteristics of the business data, and M is greater than or equal to 2; and processing the K original data tables through N cascaded data processing layers according to the M field information and the definition logic between the M field information to generate a target business model; wherein the input of the nth data processing layer includes one original data table from the K original data tables and an intermediate table output by the (n-1)th data processing layer, where N is greater than or equal to 1, n is greater than or equal to 1 and n is less than or equal to N, and the definition logic is used to represent the processing relationship between the two field information.
[0043] Figure 1 The illustration depicts an application scenario of the business model generation method according to an embodiment of the present disclosure.
[0044] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, and a third terminal device 103. Network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0045] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various client applications, such as online banking clients, web browser applications, search applications, and instant messaging tools, can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, so that users can perform transaction operations through these devices.
[0046] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0047] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0048] It should be noted that the business model generation method provided in this embodiment can generally be executed by server 105. Correspondingly, the business model generation apparatus provided in this embodiment can generally be located in server 105. The business model generation method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the business model generation apparatus provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0049] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0050] The following will be based on Figure 1 The described scene, through Figures 2-6 The method for generating a business model according to the disclosed embodiments is described in detail.
[0051] Figure 2A flowchart illustrating a method for generating a business model according to an embodiment of this disclosure is shown schematically.
[0052] like Figure 2 As shown, the method includes operations S210 to S230.
[0053] In operation S210, K raw data tables are generated based on the acquired configuration information. The configuration information is used to define the business model. The raw data tables correspond one-to-one with the business data, and K is greater than or equal to 2.
[0054] According to embodiments of this disclosure, the configuration information is generated based on user interactions on the interactive interface. Users can operate on the risk warning platform to generate configuration information for defining business models. For example, users can generate configuration information by making selections based on information displayed on the interactive interface.
[0055] Specifically, the risk warning platform can pre-build a dictionary based on the business type. The dictionary includes information such as field names, field types, and field lengths corresponding to various services.
[0056] For example, for a business model used to evaluate collection and payment services, the dictionary includes the original data table of transaction data, including field names such as account, name, transaction date, and amount. Correspondingly, it also includes the field types and lengths corresponding to these field names. Users can operate on the interactive interface, selecting buttons or fields related to the target business based on the information provided by the dictionary and generating configuration information. For example, entering "Query specific transaction information for collection and payment services" will generate configuration information corresponding to the "Remarks" field.
[0057] Configuration information can use delimiters or other special symbols to represent the separation between data. The risk warning platform can call the corresponding database methods to identify the above delimiters or other special symbols and generate K original data tables.
[0058] During the process of generating the original data table based on the configuration information, the table name can be determined in response to user operations. For example, for business data of transaction type, the generated original data table can be named AJ original table, and the fields in the original data table corresponding to transaction data include account, transaction amount, and transaction time; for business data of balance type, the generated original data table can be named AY original table, and the corresponding fields in the original table include account and balance.
[0059] After generating configuration information in response to user actions, K raw data tables are created from the configuration information used to define the business model. These K raw data tables contain all the configuration information. For example, for a collection and payment agency business, the generated raw data tables include all field names, field types, and field lengths corresponding to the selected transaction data, balance data, user information, etc.
[0060] According to embodiments of this disclosure, the form of the original data table can be pre-set. For example, the account is the initial field of the original data table, followed by information such as name, balance, and transaction date.
[0061] In operation S220, K original data tables are parsed to obtain M field information corresponding to the K original data tables. The field information is used to represent the attribute characteristics of the business data, and M is greater than or equal to 2.
[0062] According to embodiments of this disclosure, K original data tables can be transferred between multiple databases. After generating the K original data tables, and before generating the target business model based on the K original data tables, a database method is invoked to parse the K original data tables, obtaining M field information corresponding to the K original data tables. Each original data table includes multiple fields. The M field information can belong to only one original data table, or it can belong to multiple original data tables simultaneously. For example, each original data table can include M field information, or it can include at least one of the M field information. For instance, the "account" field can belong to multiple original data tables, while the "gender" field belongs only to the original data table containing user basic information.
[0063] Specifically, database methods are used to perform operations such as splitting, cleaning, and filtering raw data tables. For example, K raw data tables can be split into multiple fields according to categories, and then further subdivided into multiple fields within the same category according to different levels of the fields, in order to determine the connections between the fields later. Data cleaning and filtering can remove invalid fields and information from the raw data tables.
[0064] For example, a user selects the "Remarks" field but doesn't perform any subsequent operations on it, rendering the "Remarks" field invalid. Since the original data table includes all configuration information, it contains the "Remarks" field. During the parsing of the original data table, the "Remarks" field can be filtered out.
[0065] According to embodiments of this disclosure, field information includes field name, field type, field length, and other information.
[0066] In operation S230, based on the definition logic of M fields and the M fields, K original data tables are processed through N cascading data processing layers to generate the target business model.
[0067] The input to the nth data processing layer includes one of the K original data tables and an intermediate table output by the (n-1)th data processing layer, where n is greater than or equal to 1 and less than or equal to N. The logic is defined to represent the processing relationship between two fields among the M fields.
[0068] According to embodiments of this disclosure, definition logic is used to represent the processing relationship between two field information pieces. Specifically, if a connection relationship exists between two field information pieces, definition logic exists between them; if no connection relationship exists between two field information pieces, no definition logic exists between them.
[0069] The defined logic includes preset connection methods. For example, there is a connection relationship between an account and a name, and the connection method is from account to name. The connection method can be a preset script method or a wrapped database call method.
[0070] According to embodiments of this disclosure, a field of information may have definition logic with multiple fields of information, and there may be a unique corresponding definition logic between two fields of information. For example, an account number may have definition logic with a name, and the definition logic is that the account number points to the name; an account number may also have definition logic with a balance, and the definition logic is that the account number points to the balance.
[0071] According to embodiments of this disclosure, N data processing layers are cascaded, where N is greater than or equal to 1, and the number of data processing layers is related to the number of original data tables. After connecting K original data tables using multiple data processing layers, the last data processing layer outputs the target business model's data table. In fact, the construction of the target business model is completed after processing the K original data tables. Furthermore, no new data processing layers are generated after the target business model is generated, thus the number of data processing layers is determined. Each data processing layer is used to process one original data table from the K original data tables and an intermediate table output by the previous data processing layer.
[0072] According to embodiments of this disclosure, each data processing layer can also process the original data table or the intermediate table. For example, it can perform operations such as filtering on the intermediate table generated by the previous data processing layer, or perform operations such as data filtering on the obtained original data table.
[0073] According to embodiments of this disclosure, the data processing layer refers to a virtual data layer that performs data processing operations during the generation of the target business model, rather than a structural layer in the actual physical sense.
[0074] This disclosure achieves layered construction of the target business model by obtaining configuration information, generating raw data tables based on the configuration information, and then processing K raw data tables through N data processing layers based on M fields in the raw data tables. In the process of generating the target business model using N data processing layers, this disclosure optimizes the processing logic of the entire business model to each data processing layer, simplifying the business model structure, reducing runtime, facilitating model maintenance and optimization, and reducing maintenance and optimization costs.
[0075] For each data processing layer, simple database processing methods or logic can be used to perform model calculations. This frees up computing resources for other data processing layers during the computation of a single data processing layer, improving the efficiency of database resource utilization. Furthermore, compared to traditional model generation methods, each data processing layer can be executed in parallel by multiple databases, improving the efficiency of generating the target model.
[0076] Figure 3 A flowchart illustrating the generation of a target business model based on N data processing layers according to an embodiment of the present disclosure is shown.
[0077] like Figure 3 As shown, the method of this embodiment includes operations S331 to S333, which can be used as a specific embodiment of operation S230.
[0078] According to embodiments of this disclosure, for any of the N data processing layers other than the first data processing layer, intermediate tables and SQL statements can be generated using the method of this embodiment.
[0079] In operation S331, after the (n-1)th data processing layer outputs the (n-1)th intermediate table, the first field information is determined from the (n-1)th intermediate table. The first field information is related to the data processing function executed by the nth data processing layer.
[0080] According to embodiments of this disclosure, the first field information is related to the data processing function performed by the nth data processing layer. The database includes definition logic among M field information pieces, and there is a unique definition logic between any two field information pieces.
[0081] For any given field, the database includes corresponding definition logic and join methods. A data processing layer can then be formed for each join method based on that field.
[0082] According to embodiments of this disclosure, a first field information can be randomly determined from the (n-1)th intermediate table, and after determining the first field information, the nth data processing layer can be determined from multiple data processing layers.
[0083] In operation S332, the first original data table is determined from the K original data tables based on the definition logic between the first field information and the M field information.
[0084] According to an embodiment of this disclosure, after determining the first field information, the field information corresponding to the first field information is determined from M field information based on the first field information, and then the first original data table is determined from K original data tables based on the definition logic between the two field information.
[0085] The first original data table includes field information corresponding to the first field information, which may or may not include the first field information.
[0086] For example, when determining the "account" from the original data table corresponding to the transaction data, if the first original data table is about balance data, both the intermediate table and the first original table include the "balance" field information corresponding to the "account". If the first original data table is about user basic information, both the intermediate table and the first original table include the first field "account", but only the first original data table includes the "gender" field information.
[0087] In operation S333, based on the first original data table and the (n-1)th intermediate table, the nth intermediate table and the nth structured query statement corresponding to the nth data processing layer are generated. When n equals N, the Nth intermediate table is the data table corresponding to the target business model.
[0088] According to an embodiment of this disclosure, after determining the first field information to be processed from the (n-1)th intermediate table, the definition logic corresponding to the first field information is determined from the definition logic among the M field information, and the nth intermediate table and the nth structured query statement corresponding to the nth data processing layer are generated.
[0089] After determining the first original data table and the (n-1)th intermediate table, the corresponding script method or database function can be automatically invoked to merge the first original data table and the (n-1)th intermediate table to generate the nth intermediate table and the nth structured query statement. It can also respond to user operations by merging the first original data table and the (n-1)th intermediate table, and by performing operations on the generation of the nth intermediate table.
[0090] According to embodiments of this disclosure, the name of the intermediate table is automatically generated by the system, and the fields of the intermediate table are derived from the first of the K original data tables. The processing results of each data processing layer can be stored in the intermediate table corresponding to that data processing layer. The generated intermediate table also includes the field name, field type, and field length of the corresponding fields, without requiring the user to specify them again.
[0091] For example, the name of the intermediate table can be composed of the field names of the two fields processed by the data processing layer, and can also include the level of the data processing layer, such as the 5th data processing layer being represented as 5 in the intermediate table name.
[0092] The structured query statement obtained by each data processing layer only includes the processing relationship between the two fields processed by that data processing layer. The target structured query statement of the final target business model is obtained by combining the structured data query statements of each data processing layer.
[0093] This disclosure utilizes a data processing layer to process multiple fields of information, with each data processing layer generating a corresponding intermediate table and SQL statement. This splits the entire business model's processing structure across each data processing layer, achieving data separation and SQL statement separation within each layer. This facilitates the maintenance and optimization of the processing results for each data processing step in the model. Simultaneously, intermediate tables connect N data processing layers, ensuring the complete functionality of the entire business data model.
[0094] According to an embodiment of this disclosure, the method for operation S332 includes: obtaining second field information corresponding to the first field information from M field information. Specifically, the second field information corresponding to the first field information can be determined based on the connection relationship between the first field information and other field information.
[0095] The nth data processing layer can determine the target definition logic from multiple definition logics based on the field names of the first and second field information, and finally determine the first original data table based on the target definition logic. For example, for the "account" and "gender" fields, after determining the target definition logic, the first original data table including "account" and "gender" can be determined based on the target definition logic.
[0096] According to embodiments of this disclosure, the first field information may correspond to multiple field information. When the first field information corresponds to multiple field information, a second field information related to the first field information can be randomly selected from the multiple field information for processing.
[0097] Similarly, other field information related to the first field information is treated as the second field information of other data processing layers and processed accordingly.
[0098] According to embodiments of this disclosure, the defined logic includes database functions or preset script methods.
[0099] According to an embodiment of this disclosure, for the first data processing layer, if an identifier field for characterizing user identity exists in the original data table, the identifier field is determined as the target field information.
[0100] For example, in a collection and payment agency business, the account field can represent the user's identity. For the first data processing layer, the account field in the original data table can be used as the target field. The target field information includes the field name "account" and the field type "numeric".
[0101] Based on the defined logic between the target field information and the M fields, candidate fields corresponding to the target field information are randomly selected from the M fields. The target field information can exist in multiple original data tables and has relationships with basic or special fields in these tables. In the first data processing layer, one field is randomly selected as a candidate field. The original data tables containing the target field information and the candidate field information are then linked together. After processing in the first data processing layer, the first intermediate table and the first structured query statement corresponding to the first data processing layer are generated.
[0102] For example, taking the aforementioned collection and payment service as an example, if the target field is determined to be the account field, the account field and the ID field have a connection relationship. Based on the definition logic between account and ID, the original data table containing the target field information of the account and the original data table containing the ID are associated. The first intermediate table generated includes the account and ID, and the first SQL statement generated represents the execution path from the original data table to the original data table to the original data table to the ID.
[0103] For example, the account table is associated with the ID table, and the two tables are merged to obtain the first intermediate table.
[0104] Figure 4 A schematic diagram illustrating the generation of a target business model according to a specific embodiment of this disclosure is shown.
[0105] like Figure 4 As shown, the method includes N data processing layers, specifically the first data processing layer 403, the second data processing layer 404, the third to the (N-1)th data processing layers 405 and the Nth data processing layer 406.
[0106] The first database 401, generated based on the acquired configuration information, is used to input K original data tables and M field information generated from the K original data tables into the first data processing layer 403, the second data processing layer 404, the third to the (N-1)th data processing layer 405, and the final Nth data processing layer 406.
[0107] The second database 402 is used to store the definition logic between M fields. Specifically, the second database 402 includes database functions or preset script methods for connecting multiple fields among the M fields.
[0108] For the first data processing layer 403, target field information, other field information to be processed, and the original data table can be obtained from the first database 401. After obtaining the definition logic from the second database 402, the first data processing layer 403 generates the first intermediate table and the first SQL statement. The first intermediate table serves as an input to the second data processing layer 404, and the first SQL statement input serves as an input to the SQL statement optimization model 408.
[0109] The second data processing layer 404 can obtain the field information to be processed and the original data table from the first database 401 and the first intermediate table, and obtain the definition logic of the field to be processed from the second database 402. It then calculates the field information to be processed based on the definition logic to generate the second intermediate table and the second SQL statement. Similarly, for the third to the (N-1)th data processing layers 405, they all obtain the intermediate table from the previous data processing layer, the field information to be processed and the original data table from the first database 401, and the definition logic of the field to be processed from the second database 402. Then, they generate the third intermediate table…the (N-1)th intermediate table, the third SQL statement…the (N-1)th SQL statement. The third SQL statement…the (N-1)th SQL statement generated by the third to the (N-1)th data processing layers 405 are all input into the SQL statement optimization model 408.
[0110] Similarly, for the final Nth data processing layer 406, after retrieving the fields to be processed from the first database 401 and the (N-1)th intermediate table, and obtaining the defined logic from the second database 402, the generated Nth SQL statement is input into the SQL statement optimization model 408. Furthermore, the generated Nth intermediate table is the data table 407 of the business model.
[0111] SQL statement optimization model 408 is used to receive the SQL statements obtained from each data processing layer, and then combine the N SQL statements to generate the final target SQL statement.
[0112] Figure 5 A flowchart illustrating an embodiment of the present disclosure of a method for updating an intermediate table is shown.
[0113] like Figure 5 As shown, the method of this embodiment includes operations S510 to S530. This embodiment can be set after operations S331 to S332, or it can be parallel to operations S331 to S332, or it can be a specific embodiment of operation S333. After receiving a preset operation from the user, the above operations S510 to S530 are executed.
[0114] According to embodiments of this disclosure, each data processing layer can process the first field information and the second field information according to defined logic, generating an intermediate table and SQL statement corresponding to that data processing layer. It can also update the intermediate table corresponding to the data processing layer in response to user operations.
[0115] In operation S510, in response to the user's preset operation, a temporary intermediate table corresponding to the nth data processing layer is generated. The preset operation includes a join operation and / or a filtering operation.
[0116] According to embodiments of this disclosure, users can perform join operations on two fields included in any data processing layer, and can also perform join operations on an intermediate table generated by the previous data processing layer and the original data table obtained by the data processing layer to connect the two data tables.
[0117] Filtering operations can be performed on the nth intermediate table generated by the nth data processing layer. Specifically, it can filter any field in the nth intermediate table, or filter partial information under any field, for example, deleting information under the balance field that does not meet the balance limit.
[0118] In response to the user's preset operation, after operating on the nth intermediate table of the nth data processing layer, a temporary intermediate table corresponding to the nth data processing layer is generated to update the nth intermediate table.
[0119] In operation S520, the original nth intermediate table generated by the nth data processing layer is replaced with a temporary intermediate table to obtain the updated nth intermediate table.
[0120] According to an embodiment of this disclosure, after generating a temporary intermediate table, the original nth intermediate table generated by the nth data processing layer is replaced with the temporary intermediate table to obtain an updated nth intermediate table.
[0121] Specifically, the operation of replacing the original nth intermediate table includes: determining the storage location of the original nth intermediate table, storing the original nth intermediate table in a preset location, and replacing the original nth intermediate table with a temporary intermediate table. If the temporary intermediate table successfully replaces the original nth intermediate table, the original nth intermediate table at the preset location is deleted.
[0122] In operation S530, based on the defined logic between the updated nth intermediate table and the M field information, the (n+1)th intermediate table generated by the (n+1)th data processing layer is updated.
[0123] According to embodiments of this disclosure, after updating the nth intermediate table using a temporary intermediate table, the updated nth intermediate table is used as the input of the (n+1)th data processing layer. Accordingly, the (n+1)th data processing layer updates its output based on the defined logic between the updated nth intermediate table and the M field information.
[0124] According to embodiments of this disclosure, for a connection operation, a specific embodiment of operation S510 may be: in response to a user's connection operation, determining the third field information selected by the user. Connecting the (n-1)th intermediate table generated by the (n-1)th data processing layer with the second original data table or its intermediate table to which the third field information belongs, generating a temporary intermediate table corresponding to the nth data processing layer. The third field information includes fields displayed on the user's interactive interface.
[0125] According to embodiments of this disclosure, the processing results of each data processing layer can be displayed to the user. Specifically, the user requests the risk warning platform to display the processing results of a specific data processing layer through a preset click operation. The risk warning platform can display the intermediate table and SQL statement of that data processing layer to the user, wherein, by default, all fields of the intermediate table are displayed.
[0126] After displaying the (n-1)th intermediate table and the (n-1)th SQL statement of the (n-1)th data processing layer to the target user, in response to the user's join operation on the (n-1)th intermediate table and other intermediate tables or the original data table, the third field information selected by the user is determined, and a temporary intermediate table is generated to update the input of subsequent data processing layers. The user can select the third field information in the original data table or in other intermediate tables.
[0127] The user performed operations on the (n-1)th intermediate table, generating a temporary intermediate table. This means there's a difference between the original nth intermediate table and the temporary intermediate table. Therefore, the original nth intermediate table cannot be used as input to the (n+1)th data processing layer; the modified temporary intermediate table must be used as input to the (n+1)th data processing layer. In other words, a join operation replaces the processing operations of the original nth data processing layer, correspondingly updating the operations of all data processing layers below the nth data processing layer.
[0128] According to embodiments of this disclosure, the temporary intermediate table generated by the join operation can also be used as the result of the new data processing layer, and the temporary intermediate table can be used as the input of the original nth layer data processing layer.
[0129] According to embodiments of this disclosure, the connection operation is represented by a connection line. For example, the connection operation is displayed to the user via a connection line on an interactive interface.
[0130] According to an embodiment of this disclosure, for the filtering operation, a specific embodiment of operation S510 may be: in response to the user's filtering operation, determining the fourth field information selected by the user, deleting the fourth field information from the original nth intermediate table generated by the nth data processing layer, and generating a temporary intermediate table corresponding to the nth data processing layer.
[0131] When the nth intermediate table of the nth data processing layer is updated, the processing results of all data processing layers following the nth data processing layer are changed accordingly.
[0132] For example, in the nth data processing layer, a filtering operation updates the nth intermediate table, and the updated nth intermediate table deletes field A. Field A will not be included in the (n+1)th data processing layer after the nth data processing layer, up to the final Nth data processing layer.
[0133] This disclosure improves model generation efficiency by updating intermediate tables in response to user actions, eliminating the need for further communication between business and technical personnel, and enabling model modifications during the target business model generation phase.
[0134] According to embodiments of this disclosure, such as Figure 4 As shown, the SQL statement obtained from each data processing layer serves as the input to the SQL statement optimization module 408. The SQL statement optimization module 408 is used to obtain the target SQL statement corresponding to the target business model based on the N SQL statements output by the N data processing layers.
[0135] According to embodiments of this disclosure, N structured query statements generated by the N cascaded data processing layers are combined in the order of their connection to obtain a target structured query statement, which is used to generate a target business model.
[0136] Specifically, N structured query statements can be chained together sequentially according to the connection order of N cascading data processing layers to obtain the final target structured query statement. Furthermore, in the process of generating the target business model using the target structured query statement, the target business model is generated using each structured query statement as a processing unit.
[0137] According to embodiments of this disclosure, the N structured query statements may include multiple pre-loaded structured query statements. For example, regarding the "account" and "balance" fields, which are involved in multiple business scenarios, the processing of the "account" and "balance" fields can be completed in advance before generating the target business model. During the generation of the target business model, the intermediate table of the data processing layer that processes the "account" and "balance" fields is directly obtained.
[0138] This disclosure combines the SQL statements generated by each data layer to obtain the target SQL statement for generating the target business model, thereby simplifying the target SQL statement, changing chained computation to parallel computation, and reducing computation time.
[0139] According to an embodiment of this disclosure, as one example, N structured query statements can be optimized.
[0140] Determine the index data corresponding to N structured query statements from the index table, optimize the N structured query statements based on the index data, and obtain P optimized structured query statements.
[0141] The index data in the index table is used to represent the processing relationships between M fields using standard structured query statements. Specifically, the index table can be a table of SQL statements representing the optimal processing path, formed by the user based on practical processing experience.
[0142] After obtaining P optimized structured query statements, these P structured query statements are combined to obtain Q structured query statements. Based on the validation results of the Q structured query statements, the target structured query statement corresponding to the target business model is determined.
[0143] According to embodiments of this disclosure, Q structured query statements are used to generate the target business model, but the execution time of each structured query statement is different. The validation result of the structured query statements can represent the runtime of generating the business model.
[0144] Based on the validation results of Q structured query statements, the structured query statement with the shortest runtime can be selected from the Q structured query statements and used as the target structured query statement. This optimizes and simplifies the SQL statements output by each data processing layer, improving the processing efficiency of building the target business model.
[0145] According to embodiments of this disclosure, the business model building module in the risk warning platform needs to use an independent database to complete the construction of the target business model in a simulated environment outside of production.
[0146] Specifically, in response to a user's action, after generating configuration information corresponding to the action, the configuration information is transmitted to the simulation environment, where simulated business data corresponding to the configuration information is generated. Then, based on the simulated business data and the configuration information, K raw data tables are generated.
[0147] According to embodiments of this disclosure, when there is no specific business data in the configuration information, simulated business data matching the configuration information can be automatically generated based on the configuration information in order to generate the original data table.
[0148] Considering that the process of generating the target business model involves multiple attempts to optimize SQL statements and debug business model parameters, which may lead to brief periods of high database load or even deadlocks, this disclosure avoids the problems of brief periods of high database load and database crashes caused by model generation and optimization by generating the target business model in a simulated environment.
[0149] According to embodiments of this disclosure, after generating the target business model, the target business model can be evaluated to obtain evaluation results.
[0150] Specifically, the evaluation method may include: inputting the constructed simulation data into the target business model, and then determining the evaluation result based on the output of the target business model. The output result includes runtime, whether the output parameters meet the requirements, etc.
[0151] If the evaluation result is deemed satisfactory, the target business model will be deployed from the simulation environment to the production environment so that the target business model can provide services to users in the production environment and improve the reliability of the business model.
[0152] This disclosure addresses SQL performance issues by employing layered computation, facilitating model definition for business personnel. The layered model enables distributed computing, significantly improving model performance. Furthermore, compared to traditional modeling methods, the layered model not only saves labor costs and greatly reduces modeling complexity but also improves the efficiency of deploying business models, enabling business personnel to obtain accurate risk prediction reports based on the generated target business model.
[0153] Figure 6 A flowchart illustrating a business data query method according to an embodiment of this disclosure is shown.
[0154] like Figure 6 As shown, the business data query method in this embodiment includes operations S610 to S620.
[0155] When operating S610, in response to the query request from the target user, the query request is parsed to obtain multiple field information corresponding to the query request.
[0156] When operating S620, multiple fields of information are input into the business model, and the query results corresponding to the query request are output.
[0157] According to embodiments of this disclosure, after generating a business model based on user needs, the business model can be published so that business personnel can implement corresponding risk warning operations based on the business model. The business model is generated according to the aforementioned business model generation method.
[0158] Specifically, users initiate query requests through the interactive interface. The risk warning platform responds to the target user's query request by parsing it, obtaining multiple fields corresponding to the query request, inputting these fields into the business model, and then outputting the query results. The query request can be a risk query request used to query the business corresponding to the current business model.
[0159] For example, after business personnel discover problems with the collection and payment service, they can select the corresponding fields on the risk warning platform to generate configuration information according to their needs. After the risk warning platform generates a business model based on the configuration information, it responds to the business personnel's risk warning query request, parses the query request, and obtains multiple fields corresponding to the query request. Then, these multiple fields are input into the business model to obtain the query results corresponding to the risk warning query request. The query results can be displayed to business personnel in the form of a risk report.
[0160] Business personnel can operate through the interactive interface of the risk warning platform. There is no need for business personnel to understand the SQL execution logic or for technical personnel to translate it. They can independently define models and adjust parameters through a dictionary that includes business domain terms. This allows business personnel to directly build models through the platform, quickly and directly turning ideas into models. This avoids the loss of ideas due to high communication costs, long cycles, complexity, etc., which could lead to enterprise risk warning vulnerabilities.
[0161] Figure 7 A schematic block diagram of a business model generation apparatus according to an embodiment of the present disclosure is shown.
[0162] like Figure 7 As shown, the business model generation device 700 of this embodiment includes an acquisition module 710, a parsing module 720, and a generation module 730.
[0163] The acquisition module 710 is used to generate K original data tables based on the acquired configuration information. The configuration information is used to define the business model, and the original data tables correspond one-to-one with the business data. K is greater than or equal to 2. In one embodiment, the acquisition module 710 can be used to execute the operation S210 described above, which will not be repeated here.
[0164] The parsing module 720 is used to parse K original data tables to obtain M field information corresponding to the K original data tables. The field information is used to represent the attribute characteristics of the business data, and M is greater than or equal to 2. In one embodiment, the parsing module 720 can be used to perform the operation S220 described above, which will not be repeated here.
[0165] The generation module 730 is used to process K original data tables through N cascading data processing layers based on M field information and the definition logic between the M field information to generate a target business model. The input of the nth data processing layer includes one of the K original data tables and an intermediate table output by the (n-1)th data processing layer. N is greater than or equal to 1, n is greater than or equal to 2 and n is less than or equal to N. The definition logic represents the processing relationship between two fields among the M field information. In one embodiment, the generation module 730 can be used to execute the operation S230 described above, which will not be repeated here.
[0166] According to embodiments of this disclosure, the generation module 730 includes a first generation unit, a second generation unit, and a third generation unit.
[0167] The first generation unit is used to determine the first field information from the (n-1)th intermediate table after the (n-1)th data processing layer outputs the first intermediate table. The first field information is related to the data processing function executed by the nth data processing layer. In one embodiment, the first generation unit can be used to perform the operation S331 described above, which will not be repeated here.
[0168] The second generation unit is used to determine the first original data table from the K original data tables based on the definition logic between the first field information and the M field information. In one embodiment, the second generation unit can be used to perform the operation S332 described above, which will not be repeated here.
[0169] The third generation unit is used to generate an nth intermediate table and an nth structured query statement corresponding to the nth data processing layer based on the first original data table and the (n-1)th intermediate table. Wherein, when n equals N, the Nth intermediate table is the data table corresponding to the target business model. In one embodiment, the third generation unit can be used to execute the operation S333 described above, which will not be repeated here.
[0170] According to embodiments of this disclosure, the generation module 730 further includes a first update unit, a second update unit, and a third update unit.
[0171] The first update unit is used to generate a temporary intermediate table corresponding to the nth data processing layer in response to a user's preset operation. The preset operation includes a join operation and / or a filtering operation. In one embodiment, the first update unit can be used to perform the operation S510 described above, which will not be repeated here.
[0172] The second update unit is used to replace the original nth intermediate table generated by the nth data processing layer with a temporary intermediate table to obtain an updated nth intermediate table. In one embodiment, the second update unit can be used to perform the operation S520 described above, which will not be repeated here.
[0173] The third update unit is used to update the (n+1)th intermediate table generated by the (n+1)th data processing layer according to the definition logic between the updated nth intermediate table and the M field information. In one embodiment, the third update unit can be used to perform the operation S530 described above, which will not be repeated here.
[0174] According to embodiments of this disclosure, the business data query device includes a response module and an output module.
[0175] The response module is used to respond to the query request of the target user, parse the query request, and obtain multiple field information corresponding to the query request. In one embodiment, the response module can be used to perform the operation S710 described above, which will not be repeated here.
[0176] The output module is used to input multiple field information into the business model and output the query results corresponding to the query request. The business model is generated according to the aforementioned business model generation method. In one embodiment, the output module can be used to perform the operation S720 described above, which will not be repeated here.
[0177] Figure 8 A block diagram of an electronic device suitable for a business model generation method according to an embodiment of the present disclosure is shown schematically.
[0178] like Figure 8 As shown, an electronic device 800 according to an embodiment of this disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage portion 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this disclosure.
[0179] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804. Processor 801 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 802 and / or RAM 803. It should be noted that the programs may also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.
[0180] According to embodiments of this disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.
[0181] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0182] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803 described above.
[0183] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to enable the computer system to implement the business model generation method provided in the embodiments of this disclosure.
[0184] When the computer program is executed by the processor 801, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0185] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 809, and / or installed from a removable medium 811. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0186] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by processor 801, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0187] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational 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 execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0188] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0189] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0190] The specific embodiments described above further illustrate the purpose, technical solutions, and beneficial effects of this disclosure. It should be understood that the above descriptions are merely specific embodiments of this disclosure and are not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the protection scope of this disclosure.
Claims
1. A method for generating a business model, comprising: Based on the obtained configuration information, K original data tables are generated. The configuration information is used to define the business model. The original data tables correspond one-to-one with the business data, and K is greater than or equal to 2. Parse the K original data tables to obtain M field information corresponding to the K original data tables. The field information is used to represent the attribute characteristics of the business data, and M is greater than or equal to 2. as well as Based on the M fields and the definition logic between them, the K original data tables are processed through N cascaded data processing layers to generate the target business model; The input to the nth data processing layer includes one of the K original data tables and an intermediate table output by the (n-1)th data processing layer, where N is greater than or equal to 1, n is greater than or equal to 2 and n is less than or equal to N. The definition logic is used to represent the processing relationship between two fields among the M fields. If there is a connection between two fields, there is definition logic between them; if there is no connection between them, there is no definition logic between them. The output of the data processing layer includes intermediate tables and structured query statements; based on the M field information and the definition logic between the M field information, the K original data tables are processed through N cascading data processing layers to generate the target business model, including: After the (n-1)th data processing layer outputs the (n-1)th intermediate table, the first field information is determined from the (n-1)th intermediate table. The first field information is related to the data processing function executed by the nth data processing layer. Based on the definition logic between the first field information and the M field information, a first original data table is determined from the K original data tables; and Based on the first original data table and the (n-1)th intermediate table, generate the nth intermediate table and the nth structured query statement corresponding to the nth data processing layer, wherein, when n equals N, the Nth intermediate table is the data table corresponding to the target business model.
2. The method according to claim 1, wherein, The defined logic includes database functions or preset script methods; The step of determining the first original data table from the K original data tables based on the definition logic between the first field information and the M field information includes: Obtain the second field information corresponding to the first field information from the M field information; Based on the field names of the first and second field information, the target definition logic is determined from the definition logic among the M field information; and Based on the target definition logic, the first original data table is determined.
3. The method according to claim 1, further comprising: In response to a user's preset operation, a temporary intermediate table corresponding to the nth data processing layer is generated, wherein the preset operation includes a join operation and / or a filtering operation; The original nth intermediate table generated by the nth data processing layer is replaced with the temporary intermediate table to obtain the updated nth intermediate table; as well as Based on the definition logic between the updated nth intermediate table and the M field information, update the (n+1)th intermediate table generated by the (n+1)th data processing layer.
4. The method according to claim 3, wherein, The step of generating a temporary intermediate table corresponding to the nth data processing layer in response to a user's preset operation includes: In response to a user's connection operation, determine the third field information selected by the user, the third field information including fields displayed on the user's interactive interface; and connect the (n-1)th intermediate table generated by the (n-1)th data processing layer with the second original data table or the intermediate table to which the third field information belongs, to generate a temporary intermediate table corresponding to the nth data processing layer; and / or In response to the user's filtering operation, the fourth field information selected by the user is determined, the fourth field information is deleted from the original nth intermediate table generated by the nth data processing layer, and a temporary intermediate table corresponding to the nth data processing layer is generated.
5. The method according to claim 1, further comprising: If an identifier field for characterizing a user's identity exists in the original data table, the identifier field is identified as the target field information. Based on the definition logic between the target field information and the M field information, candidate field information corresponding to the target field information is randomly obtained from the M field information; as well as Based on the original data table to which the target field information belongs and the original data table to which the candidate field belongs, the first intermediate table and the first structured query statement corresponding to the first data processing layer are generated.
6. The method according to claim 1, further comprising: According to the connection order of N cascaded data processing layers, the N structured query statements generated by the N data processing layers are combined to obtain the target structured query statement, which is used to generate the target business model.
7. The method according to claim 6, wherein, The step involves combining the N structured query statements generated by the N cascaded data processing layers according to their connection order to obtain the target structured query statement, including: The index data corresponding to the N structured query statements is determined from the index table, whereby the index data is used to characterize the processing relationships between the M field information using standard structured query statements; and Based on the index data, optimize the N structured query statements to obtain P optimized structured query statements, where P is greater than or equal to 1 and less than or equal to N; The P structured query statements are combined to obtain Q structured query statements, and all Q structured query statements are used to generate the target business model. Based on the verification results of the Q structured query statements, the target structured query statement corresponding to the target business model is determined, and the verification results are used to represent the runtime of the Q structured query statements.
8. The method according to claim 1, wherein, The step of generating K raw data tables based on the acquired configuration information includes: In response to a user's action, generate configuration information corresponding to that action; The configuration information is transmitted to the simulation environment to generate simulated service data corresponding to the configuration information; and Based on the simulated business data and the configuration information, the K original data tables are generated.
9. The method according to claim 8, further comprising: After generating the target business model, the target business model is evaluated to obtain the evaluation results; as well as If the evaluation result is determined to be satisfactory, the target business model is released from the simulation environment to the production environment so that the target business model can provide services to users in the production environment.
10. A business data query method, comprising: In response to a query request from a target user, the query request is parsed to obtain multiple field information corresponding to the query request; as well as Input the multiple field information into the business model and output the query results corresponding to the query request; The business model described therein is generated by the method according to any one of claims 1-9.
11. A business model generation apparatus, comprising: The acquisition module is used to generate K raw data tables based on the acquired configuration information. The configuration information is used to define the business model. The raw data tables correspond one-to-one with the business data, and K is greater than or equal to 2. The parsing module is used to parse the K original data tables to obtain M field information corresponding to the K original data tables. The field information is used to represent the attribute characteristics of the business data, and M is greater than or equal to 2. as well as The generation module is used to process the K original data tables through N cascading data processing layers based on the M field information and the definition logic between the M field information to generate the target business model; The input to the nth data processing layer includes one of the K original data tables and an intermediate table output by the (n-1)th data processing layer, where N is greater than or equal to 1, n is greater than or equal to 1 and n is less than or equal to N. The definition logic is used to represent the processing relationship between two fields among the M fields. If there is a connection between two fields, there is definition logic between them; if there is no connection between them, there is no definition logic between them. The output of the data processing layer includes intermediate tables and structured query statements; based on the M field information and the definition logic between the M field information, the K original data tables are processed through N cascading data processing layers to generate the target business model, including: After the (n-1)th data processing layer outputs the (n-1)th intermediate table, the first field information is determined from the (n-1)th intermediate table. The first field information is related to the data processing function executed by the nth data processing layer. Based on the definition logic between the first field information and the M field information, a first original data table is determined from the K original data tables; and Based on the first original data table and the (n-1)th intermediate table, generate the nth intermediate table and the nth structured query statement corresponding to the nth data processing layer, wherein, when n equals N, the Nth intermediate table is the data table corresponding to the target business model.
12. An electronic device, comprising: One or more processors; Storage device 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 perform the method according to any one of claims 1 to 10.
13. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 10.
14. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 10.