CN115422202A - Service model generation method, service data query method, device and equipment - Google Patents

Service model generation method, service data query method, device and equipment Download PDF

Info

Publication number
CN115422202A
CN115422202A CN202211174136.5A CN202211174136A CN115422202A CN 115422202 A CN115422202 A CN 115422202A CN 202211174136 A CN202211174136 A CN 202211174136A CN 115422202 A CN115422202 A CN 115422202A
Authority
CN
China
Prior art keywords
field information
data processing
original data
data
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211174136.5A
Other languages
Chinese (zh)
Inventor
吴加齐
丁诗璟
沈文俊
高明
余刚
刘维安
袁园
欧阳明
李亮
沈冰华
姚琛
谢传聪
苏蜜
陈思广
李华峰
周婉月
杨蓓蓓
吕明
龚正
张政
万聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202211174136.5A priority Critical patent/CN115422202A/en
Publication of CN115422202A publication Critical patent/CN115422202A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2291User-Defined Types; Storage management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides a business model generation method, a business data query method, a device and equipment, which can be applied to the technical field of data analysis. The generation method of the business model comprises the following steps: generating K original data tables according to the acquired configuration information, wherein the configuration information is used for defining a service model, and the original data tables correspond to service data one to one; analyzing the K original data tables to obtain M field information corresponding to the K original data tables, wherein the field information is used for expressing the attribute characteristics of the service data; and processing K original data tables through N cascaded data processing layers according to definition logic between the M field information and the M field information to generate a target business model, wherein the input of the nth data processing layer comprises one original data table in the K original data tables and an intermediate table output by the (N-1) th data processing layer, and the definition logic is used for representing the processing relation between the two field information.

Description

Service model generation method, service data query method, device and equipment
Technical Field
The present disclosure relates to the field of data analysis technologies, and in particular, to a method for generating a service model, a method and an apparatus for querying service data, an electronic device, a storage medium, and a program product.
Background
At present, a financial industry generates a business model for evaluating business risks on a risk early warning platform by establishing the risk early warning platform. In the related art, a business person of an enterprise generally summarizes a problem according to a business requirement, and feeds the problem back to a technician, and the technician translates the business problem into a Structured Query Language (SQL) to form a business model.
However, the daily generated business data volume of an enterprise is huge and increases rapidly, and the traditional business model building process converts business problems into business models through the communication between business personnel and technical personnel, so that the technical problems of high communication cost, low communication efficiency, low processing efficiency of generating the business models, high maintenance and tuning cost of the business models and the like are caused.
In addition, the business model generated in the related art is usually operated by one SQL statement comprising dozens of lines of codes, the business model has a complex structure, the operation period of calling a plurality of association tables to perform cartesian product operation is long, the consumption of database resources is large, and the cost of post operation and optimization is high.
Disclosure of Invention
In view of the above, the present disclosure provides a business model generation method, a business data query method, an apparatus, an electronic device, a storage medium, and a program product.
According to a first aspect of the present disclosure, there is provided a method for generating a business model, including: generating K original data tables according to the acquired configuration information, wherein the configuration information is used for defining a service model, the original data tables correspond to service data one to one, and K is more than or equal to 2; analyzing the K original data tables to obtain M field information corresponding to the K original data tables, wherein the field information is used for expressing the attribute characteristics of the service data, and M is more than or equal to 2; and processing K original data tables through N cascaded data processing layers according to definition logic between the M field information and the M field information to generate a target business model, wherein the input of the nth data processing layer comprises one original data table in the K original data tables and an intermediate table output by the N-1 th data processing layer, N is more than or equal to 1, N is more than or equal to 2 and N is less than or equal to N, and the definition logic is used for representing the processing relation between two pieces of field information in the M field information.
According to an embodiment of the present disclosure, wherein the output of the data processing layer comprises an intermediate table and a structured query statement; processing K original data tables through N cascaded data processing layers according to definition logic between the M field information and the M field information to generate a target service model, wherein the method comprises the following steps: after the n-1 th intermediate table is output by the n-1 th data processing layer, determining first field information from the n-1 th intermediate table, wherein the first field information is related to a data processing function executed by the n-1 th data processing layer; determining a first original data table from the K original data tables according to 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 according to the first original data table and the (N-1) th intermediate table, wherein the nth intermediate table is a data table corresponding to the target business model under the condition that N is equal to N.
According to an embodiment of the present disclosure, wherein the definition logic includes a database function or a preset script method; determining a first original data table from the K original data tables according to a definition logic between the first field information and the M field information, including: acquiring second field information corresponding to the first field information from the M field information; determining a target definition logic from definition logics among the M field information according to the field names of the first field information and the second field information; and determining a first raw data table according to the target definition logic.
According to an embodiment of the present disclosure, further comprising: responding to preset operation of a user, and generating a temporary intermediate table corresponding to the nth data processing layer, wherein the preset operation comprises connection operation and/or 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 + 1) th intermediate table generated by the (n + 1) th data processing layer according to the updated n th intermediate table and definition logic between the M field information.
According to the embodiment of the present disclosure, generating a temporary intermediate table corresponding to an nth data processing layer in response to a preset operation of a user includes: responding to the connection operation of the user, and determining third field information selected by the user, wherein the third field information comprises fields displayed on the interactive interface of 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 the intermediate table to which the third field information belongs to generate a temporary intermediate table corresponding to the n-th data processing layer; and/or responding to the filtering operation of the user, determining fourth field information selected by the user, deleting the fourth field information in an original nth intermediate table generated by the nth data processing layer, and generating a temporary intermediate table corresponding to the nth data processing layer.
According to an embodiment of the present disclosure, further comprising: determining the identification field as target field information under the condition that the identification field for representing the user identity exists in the original data table; randomly acquiring field information to be selected 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 1 st intermediate table and a 1 st structured query statement corresponding to the 1 st data processing layer based on the original data table to which the target field information belongs and the original data table to which the field to be selected belongs.
According to an embodiment of the present disclosure, further comprising: and combining the N structured query statements generated by the N data processing layers according to the connection sequence of the N cascaded data processing layers to obtain a target structured query statement, wherein the target structured query statement is used for generating a target business model.
According to an embodiment of the present disclosure, combining N structured query statements generated by N data processing layers according to a connection order of the N cascaded data processing layers to obtain a target structured query statement includes: determining index data corresponding to the N structured query statements from an index table, wherein the index data in the index table are used for representing the processing relation among the M field information through the standard structured query statements; optimizing the N structured query statements according to the index data to obtain P optimized structured query statements, wherein P is greater than or equal to 1 and less than or equal to N; combining the P structured query sentences to obtain Q structured query sentences, wherein the Q structured query sentences are all used for generating a target business model; and determining the target structured query statement corresponding to the target business model according to the verification results of the Q structured query statements, wherein the verification results are used for expressing the running time of the Q structured query statements.
According to the embodiment of the present disclosure, generating K original data tables according to the acquired configuration information includes: responding to the operation of a user, and generating configuration information corresponding to the operation; transmitting the configuration information to a simulation environment, and generating simulation service data corresponding to the configuration information; and generating K original data tables according to the simulation service data and the configuration information.
According to an embodiment of the present disclosure, further comprising: after the target business model is generated, evaluating the target business model to obtain an evaluation result; and releasing the target business model from the simulation environment to the production environment under the condition that the evaluation result is determined to be passed, so that the target business model provides services for the user in the production environment.
A second aspect of the present disclosure provides a service data query method, including: responding to a query request of a target user, analyzing the query request, and obtaining a plurality of field information corresponding to the query request; and inputting the information of the plurality of fields into a service model, and outputting a query result corresponding to the query request: wherein the business model is generated according to the method described above.
A third aspect of the present disclosure provides a device for generating a business model, including:
the acquisition module is used for generating K original data tables according to the acquired configuration information, the configuration information is used for defining a service model, the original data tables correspond to the service data one by one, and K is more than or equal to 2;
the analysis module is used for analyzing the K original data tables to obtain M field information corresponding to the K original data tables, the field information is used for representing attribute characteristics of the service data, and M is greater than or equal to 2; and
the generating module is used for processing K original data tables through N cascaded data processing layers according to the definition logic between the M field information and the M field information to generate a target service model; the input of the nth data processing layer comprises an original data table in the K original data tables and an intermediate table output by the (N-1) th data processing layer, N is more than or equal to 1, N is more than or equal to 1 and N is less than or equal to N, and the definition logic is used for representing the processing relation between two pieces of field information in the M pieces of field information.
A fourth aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein the one or more programs, when executed by 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.
The fifth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions, which, when executed by a processor, cause the processor to perform the above-mentioned business model generation method or business data query method.
A sixth aspect of the present disclosure also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the business model generation method or the business data query method described above.
According to the method and the device, the configuration information is obtained, the original data table is generated according to the configuration information, and then K original data tables are processed through N data processing layers on the basis of M field information in the original data table, so that the target service model is constructed in a layered mode. According to the method and the device, in the process of generating the target business model by using the N data processing layers, the processing logic of the whole business model is optimized to each data processing layer, so that the structure of the business model is simplified, the running time is reduced, the maintenance and the optimization of the model are facilitated, and the maintenance and the optimization cost is reduced.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, taken in conjunction with the accompanying drawings of which:
fig. 1 schematically illustrates an application scenario of a method of generating a business model according to an embodiment of the present disclosure;
FIG. 2 schematically shows a flow chart of a method of generating a business model according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow diagram for generating a target business model based on N data processing layers, in accordance with an embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating the generation of a target business model in accordance with a specific embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow chart of a method of updating an intermediate table according to an embodiment of the present disclosure;
FIG. 6 schematically shows a flow chart of a business data query method according to an embodiment of the disclosure;
FIG. 7 is a block diagram schematically illustrating an architecture of a business model generation apparatus according to an embodiment of the present disclosure;
fig. 8 schematically shows a block diagram of an electronic device adapted to a method of generating a business model according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that these descriptions are illustrative only and are not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B, and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B, and C" would include but not be limited to systems that have A alone, B alone, C alone, A and B together, A and C together, B and C together, and/or A, B, and C together, etc.).
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure, application and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations, necessary confidentiality measures are taken, and the customs of the public order is not violated.
In the technical scheme of the disclosure, before the personal information of the user is acquired or collected, the authorization or the consent of the user is acquired.
The present disclosure finds that, in the related art, a service person generally feeds back a service problem to a technician, and the technician completes construction of a service model. In the process of building the business model, communication between business personnel and technical personnel can cause low building efficiency and high building cost. For the constructed business model, experienced technicians can maintain and optimize a complex model structure, but the model structure needs to be carded by consuming a large amount of time and cost. For technicians who do not know the current model and business personnel who submit the requirements of the business model, whether the functions of the model meet the requirements cannot be determined according to the complex model structure, and therefore communication time, communication cost, model maintenance cost and model maintenance difficulty are further increased.
In addition, the operation framework for constructing the model in the related art is kept unchanged, and only the model and the parameters are changed, so that the generated business model corresponds to an SQL statement. In the process of operating the SQL statement, a plurality of tables need to be correlated, and Cartesian product operation is added, so that the operation time of a business model is long, the structure is complex, a large amount of database resources are consumed, and the later operation and optimization cost is high.
The embodiment of the present disclosure provides a method for generating a business model, including: generating K original data tables according to the acquired configuration information, wherein the configuration information is used for defining a service model, the original data tables correspond to service data one to one, and K is more than or equal to 2; analyzing the K original data tables to obtain M field information corresponding to the K original data tables, wherein the field information is used for expressing the attribute characteristics of the service data, and M is more than or equal to 2; processing K original data tables through N cascaded data processing layers according to the definition logic between the M field information and the M field information to generate a target service model; the input of the nth data processing layer comprises an original data table in the K original data tables and an intermediate table output by the (N-1) th data processing layer, N is more than or equal to 1, N is more than or equal to 1, and N is less than or equal to N, and the definition logic is used for representing the processing relation between the two pieces of field information.
Fig. 1 schematically shows an application scenario of a method for generating a business model according to an embodiment of the present disclosure.
As shown in fig. 1, the 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. The network 104 is used to provide a medium of 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, wireless communication links, or fiber optic cables, to name a few.
The user may use the first terminal device 101, the second terminal device 102, the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages or the like. Various client applications, such as an internet banking client, a web browser application, a search application, an instant messaging tool, and the like, may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, so that a user can perform a transaction operation through the first terminal device 101, the second terminal device 102, and the third terminal device 103.
The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop portable computer, a desktop computer, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The backend management server may analyze and process the received data such as the user request, and feed back a processing result (for example, a web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the method for generating the business model provided in the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the generating device of the business model provided by the embodiment of the present disclosure may be generally disposed in the server 105. The method for generating the service model provided by the embodiment of the present disclosure may also be executed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103 and/or the server 105. Correspondingly, the generating device of the business model provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The method for generating the business model of the disclosed embodiment will be described in detail below with fig. 2 to 6 based on the scenario described in fig. 1.
FIG. 2 schematically shows a flow chart of a method of generating a business model according to an embodiment of the disclosure.
As shown in fig. 2, the method includes operations S210 to S230.
In operation S210, K original data tables are generated according to the obtained configuration information, where the configuration information is used to define a service model, the original data tables correspond to service data one to one, and K is greater than or equal to 2.
According to the embodiment of the disclosure, the configuration information is generated according to the interactive operation of the user on the interactive interface. The user can operate on the risk early warning platform to generate configuration information for defining the business model. For example, the user may perform a selection operation according to the information displayed on the interactive interface to generate the configuration information.
Specifically, the risk early warning platform may be pre-constructed to obtain a dictionary base according to the service type, where the dictionary base includes field names, field types, field lengths, and other information corresponding to multiple services.
For example, for a service model for evaluating a collect-and-pay service, the dictionary database includes a raw data table of transaction data, including field names of account number, name, transaction date, amount, and the like, and accordingly, also includes field types and field lengths corresponding to the field names of account number, name, transaction date, amount, and the like. The user can operate on the interactive interface, and according to the information provided by the dictionary library, the user selects the buttons or the fields related to the target service and generates the configuration information. For example, the generated configuration information may correspond to a "remarks" field by inputting "query for specific transaction information of a collect-and-pay service".
The configuration information may represent the separation from data to data by a delimiter or other special symbol. The risk early warning platform can call a corresponding database method to identify the separator or other special symbols, and K original data tables are generated.
In generating the original data table according to the configuration information, the table name of the original data table may be determined in response to an operation by a user. For example, for service data of which the service type is transaction data, the table name of the generated original data table may be an a.j original table, and a field in the original data table corresponding to the transaction data includes an account, a transaction amount, and a transaction time; for service data with a service type of balance data, the indication of the generated original data table may be an a.y original table, and correspondingly, a field in the original table includes an account and a balance.
After generating configuration information in response to an operation of a user, K raw data tables are generated from the configuration information for defining the business model. The K original data tables include the full amount of configuration information. For example, for the service of collecting and paying for a substitute, the generated original data table includes all field names, field types and field lengths corresponding to the selected transaction data, balance data, user information and the like.
According to an embodiment of the present disclosure, the form of the raw data table may be preset, for example, the account is an initial field of the raw data table, followed by information such as name, balance, date of transaction, and the like.
In operation S220, the K original data tables are analyzed to obtain M field information corresponding to the K original data tables, where the field information is used to indicate an attribute characteristic of the service data, and M is greater than or equal to 2.
According to an embodiment of the present disclosure, the K raw data tables may be transmitted between multiple databases. After the K original data tables are generated and before the target business model is generated based on the K original data tables, a database method is called to analyze the K original data tables to obtain M field information corresponding to the K original data tables. Wherein each original data table comprises a plurality of fields. The M field information may also belong to only one original data table, or belong to multiple original data tables at the same time, for example, each original data table may include the M field information, and may further include at least one field information of the M field information. For example, the "account" field may belong to a plurality of raw data tables, and the "gender" field only belongs to the raw data tables of the user's basic information.
Specifically, the database method is used for performing operations such as splitting, data cleaning, data filtering and the like on the original data table. For example, the K original data tables are divided into a plurality of pieces of field information according to categories, and then the plurality of pieces of field information of the same category are subdivided according to different levels of the fields, so as to determine the connection relationship between the pieces of field information in the following. The data cleaning and data filtering can be to clean and filter invalid fields and invalid information in the original data table.
For example, the user has selected the "remarks" field, but has not performed subsequent operations on the selected "remarks" field, i.e., the "remarks" field is an invalid field. Since the full amount of configuration information is included in the original data table, a "remark" field is included in the original data table. The 'remarks' field may be filtered out during parsing of the original data table.
According to an embodiment of the present disclosure, the field information includes field name, field type, field length, and the like.
In operation S230, the K original data tables are processed through the N cascaded data processing layers according to the definition logic between the M field information and the M field information, and a target service model is generated.
The input of the nth data processing layer comprises an original data table in the K original data tables and an intermediate table output by the (N-1) th data processing layer, wherein N is more than or equal to 1 and less than or equal to N, and the definition logic is used for representing the processing relation between two pieces of field information in the M pieces of field information.
According to an embodiment of the present disclosure, a definition logic is used to represent a processing relationship between two field information. Under the condition that a connection relation exists between two pieces of field information, definition logic exists between the two pieces of field information; in the case that there is no connection relationship between two pieces of field information, there is no definition logic between the two pieces of field information.
The definition logic includes presetting a connection method, for example, a connection relationship exists between the account and the name, and the connection method is to point from the account to the name. The connection method may be a preset script method or a method called for the packaged database.
According to the embodiment of the disclosure, there may be definition logic between one field information and a plurality of field information, and there may be definition logic for unique correspondence between two field information. For example, an account number may have definition logic with a name, and the definition logic is to point from the account number to the name; the account number may also have definition logic with the balance, and the definition logic points the account number to the balance.
According to the embodiment of the disclosure, the N data processing layers are cascaded data processing layers, N is greater than or equal to 1, and the number of the data processing layers is related to the number of the original data tables. And after the connection of the K original data tables is completed by utilizing a plurality of data processing layers, the last data processing layer outputs the data table of the target business model. In fact, after the K raw data tables are processed, the construction of the target business model is completed. And after the target business model is generated, no new data processing layer is generated, and the number of the data processing layers is determined accordingly. Each data processing layer is used for processing one original data table in the K original data tables and the intermediate table output by the previous data processing layer.
According to the embodiment of the present disclosure, each data processing layer may also process an original data table or an intermediate table, for example, perform operations such as filtering on an intermediate table generated by a previous data processing layer, or perform operations such as data filtering on an acquired original data table.
According to the embodiment of the disclosure, the data processing layer of the disclosure refers to a virtual data layer for performing data processing operation in the process of generating a target business model, and is not a structural layer in actual physical meaning.
According to the method and the device, the configuration information is obtained, the original data table is generated according to the configuration information, and then K original data tables are processed through N data processing layers on the basis of M field information in the original data table, so that the target service model is constructed in a layered mode. According to the method and the device, in the process of generating the target business model by using the N data processing layers, the processing logic of the whole business model is optimized to each data processing layer, so that the structure of the business model is simplified, the running time is reduced, the maintenance and the optimization of the model are facilitated, and the maintenance and the optimization cost is reduced.
For each data processing layer, the operation of the model can be realized by using a simple database processing method or a database processing logic. The method and the device realize the liberation of the computing resources of other data processing layers in the operation process of a single data processing layer, and improve the calling efficiency of the database resources. And compared with the traditional model generation method, each data processing layer can be executed by a plurality of databases in parallel, so that the operation efficiency of generating the target model is improved.
FIG. 3 schematically illustrates a flow diagram for generating a target business model based on N data processing layers according to an embodiment of the disclosure.
As shown in fig. 3, the method of this embodiment includes operations S331 to S333, which may be a specific embodiment of operation S230.
According to the embodiment of the disclosure, except for the 1 st data processing layer, for any data processing layer in the N data processing layers, the intermediate table and the SQL statement may be generated by the method of the embodiment.
In operation S331, after the n-1 th intermediate table is output by the n-1 th data processing layer, first field information is determined from the n-1 th intermediate table, the first field information being related to a data processing function performed by the n-1 th data processing layer.
According to an embodiment of the present disclosure, the first field information is related to a data processing function performed by the nth data processing layer. The database comprises definition logic between M field information, and unique definition logic exists between the two field information.
For any field information, the corresponding definition logic and the connection method are included in the database. For this field information, a data processing layer corresponding to each connection method may be formed.
According to the embodiment of the present disclosure, one first field information may be randomly determined from the n-1 th intermediate table, and after the first field information is determined, the nth data processing layer may be determined from the plurality of data processing layers.
In operation S332, a first original data table is determined from the K original data tables according to a definition logic between the first field information and the M field information.
According to an embodiment of the present disclosure, after determining the first field information, field information corresponding to the first field information is determined from the M field information according to the first field information, and then the first original data table is determined from the K original data tables according to a definition logic between the two field information.
The first original data table includes field information corresponding to the first field information, and may include the first field information or may not include the first field information.
For example, an "account" is determined from the original data table corresponding to the transaction data, and in the case where the first original data table is an original data table regarding balance data, both the intermediate table and the first original table include "balance" field information corresponding to the "account". In the case where the first original data table is an original data table about basic information of a user, both the intermediate table and the first original table include a first field "account", but only the first original data table includes "gender" field information.
In operation S333, an nth intermediate table and an nth structured query statement corresponding to the nth data processing layer are generated according to the first original data table and the (N-1) th intermediate table, where in the case that N is equal to N, the nth intermediate table is a data table corresponding to the target business model.
According to the embodiment of the disclosure, after the first field information to be processed is determined from the (n-1) th intermediate table, the definition logic corresponding to the first field information is determined from the definition logic between the M field information, and the nth intermediate table and the nth structured query statement corresponding to the nth data processing layer are generated.
After the first original data table and the (n-1) th intermediate table are determined, a corresponding script method or a corresponding database function can be automatically called, the first original data table and the (n-1) th intermediate table are fused, and an nth intermediate table and an nth structured query statement are generated. The first original data table and the (n-1) th intermediate table can be fused in response to the operation of a user; the generation of the nth intermediate table may also be operated in response to a user operation.
According to the embodiment of the disclosure, the table name of the intermediate table is automatically generated by the system, and the field source of the intermediate table is the first original data table in the K original data tables. The processing results of each data processing layer may be stored in an intermediate table corresponding to the data processing layer. The generated intermediate table also comprises the field name, the field type and the field length of the corresponding field without the reassignment of the user.
For example, the table name of the intermediate table may be formed by field names of two pieces of field information processed by the data processing layer, and may further include a hierarchy in which the data processing layer is located, such as 5 in the intermediate table name of the 5 th data processing layer.
The structured query statement obtained by each data processing layer only includes the processing relation between two pieces of field information processed by the data processing layer, and the finally generated target structured query statement of the target business model is obtained by combining the structured data query statements of each data processing layer.
According to the method and the device, the data processing layers are used for processing the information of the plurality of fields, each data processing layer generates the corresponding intermediate table and the corresponding SQL statement, the processing structure of the whole business model is split on each data processing layer, data separation and SQL statement separation under each data processing layer are realized, and maintenance and optimization of the processing result of each data processing of the model are facilitated. Meanwhile, N data processing layers are connected through the middle table, and the complete function of the whole service data model is guaranteed.
According to an embodiment of the present disclosure, the method of operation S332 includes: and acquiring second field information corresponding to the first field information from the M field information. Specifically, according to the connection relationship between the first field information and other field information, the second field information corresponding to the first field information may be determined.
The nth data processing layer may determine a target definition logic from the plurality of definition logics according to the field names of the first field information and the second field information, and finally determine the first original data table according to the target definition logic. For example, for the "account" and "gender" fields, after the target definition logic is determined, a first raw data table including "account" and "gender" may be determined according to the target definition logic.
According to an embodiment of the present disclosure, the first field information may correspond to a plurality of field information. When the first field information corresponds to a plurality of field information, a second field information related to the first field information can be randomly selected from the plurality of field information for processing.
Similarly, the other field information related to the first field information is processed as the second field information of the other data processing layer.
According to an embodiment of the present disclosure, the definition logic includes a database function or a preset script method.
According to the embodiment of the disclosure, for the 1 st data processing layer, in the case that an identification field for characterizing the identity of the user exists in the original data table, the identification field is determined as the target field information.
For example, for a service of a proxy payment, the account field may characterize the user identity. For the 1 st data processing layer, the account field in the original data table may be used as the target field, and the target field information includes the field name "account" and the field type "numeric".
And randomly acquiring the field information to be selected 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. The target field information can be present in a plurality of original data tables and has a relationship with basic fields or special fields in the plurality of original data tables, and one field information is randomly selected as the field information to be selected in the 1 st data processing layer. And associating the original data table to which the target field information belongs and the original data table to which the to-be-selected field information belongs, and generating a 1 st intermediate table and a 1 st structured query statement corresponding to the 1 st data processing layer through the operation of the 1 st data processing layer.
For example, also taking the above-mentioned service of collecting and paying for a delivery service as an example, in the case where the destination field information is determined to be the account field, the account field and the ID field have a connection relationship. According to the definition logic between the account and the ID, the original data table comprising the target field information of the account and the original data table comprising the ID are associated, the generated 1 st intermediate table comprises the account and the ID, and the generated 1 st SQL statement represents an execution path from the original data table to which the account belongs to the original data table to which the ID belongs, namely from the account to the ID.
For example, the account table is associated with the ID table, and the 1 st intermediate table is obtained by fusion.
FIG. 4 is a schematic diagram illustrating generation of a target business model according to a specific embodiment of the present disclosure.
As shown in fig. 4, the method includes N data processing layers, specifically, a 1 st data processing layer 403, a 2 nd data processing layer 404, a 3 rd data processing to N-1 st data processing layer 405, and an nth data processing layer 406.
The first database 401 generated according to the acquired configuration information is configured to input K original data tables and M field information generated by the K original data tables to the 1 st data processing layer 403, the 2 nd data processing layer 404, the 3 rd data processing to the N-1 st data processing layer 405, and the last nth data processing layer 406.
The second database 402 is used to store definition logic between M fields of information. Specifically, the second database 402 includes a database function or a preset script method for connecting a plurality of pieces of field information in the M pieces of field information.
For the 1 st data processing layer 403, the target field information, and other field information to be processed by the 1 st data processing layer 403, the original data table, may be obtained from the first database 401. After retrieving the definition logic from the second database 402, the 1 st data processing layer 403 generates a 1 st intermediate table and a 1 st SQL statement. Wherein, the 1 st intermediate table is used as an input of the 2 nd data processing layer 404, and the 1 st SQL statement input is used as an input of the SQL statement optimization model 408.
The 2 nd data processing layer 404 may obtain field information to be processed and an original data table from the first database 401 and the 1 st intermediate table, obtain definition logic of fields to be processed from the second database 402, and perform calculation on the field information to be processed according to the definition logic to generate a 2 nd intermediate table and a 2 nd SQL statement. Similarly, for the 3 rd data processing layer to the N-1 th data processing layer 405, the intermediate table is obtained from the previous data processing layer, the field information to be processed and the original data table are obtained from the first database 401, and the definition logic of the field to be processed is obtained from the second database 402. Then, a 3 rd middle table \8230, an N-1 th middle table, a 3 rd SQL statement \8230andan N-1 th SQL statement are generated, wherein the 3 rd data are processed to the 3 rd SQL statement \8230generatedby the N-1 th data processing layer 405, and the N-1 th SQL statement are all input into the SQL statement optimization model 408.
For the last nth data processing layer 406, similarly, after acquiring the field to be processed from the first database 401 and the nth-1 intermediate table and acquiring the definition logic from the second database 402, the generated nth SQL statement is input into the SQL statement optimization model 408. The nth intermediate table is generated as a data table 407 of the business model.
The SQL statement optimization model 408 is configured to receive the SQL statements obtained by each data processing layer, and then combine the N SQL statements to generate a final target SQL statement.
FIG. 5 schematically shows a flow chart of a method of updating an intermediate table according to an embodiment of the present disclosure.
As shown in fig. 5, the method of this embodiment includes operations S510 to S530. This embodiment may be set after the operations S331 to S332, may be parallel to the operations S331 to S332, and may be a specific embodiment of the operation S333. After receiving the preset operation of the user, the above-described operations S510 to S530 are performed.
According to the embodiment of the disclosure, each data processing layer can process the first field information and the second field information according to the definition logic, and generate an intermediate table and an SQL statement corresponding to the data processing layer. And updating the intermediate table corresponding to the data processing layer in response to the operation of the user.
In operation S510, a temporary intermediate table corresponding to the nth data processing layer is generated in response to a preset operation of a user, where the preset operation includes a connection operation and/or a filtering operation.
According to the embodiment of the disclosure, a user can perform a connection operation on two fields included in any one data processing layer, and can also perform a connection operation on an intermediate table generated by the previous data processing layer and an original data table acquired by the data processing layer to connect the two data tables.
The filtering operation may be filtering of an nth intermediate table generated by an nth data processing layer. Specifically, any field in the nth intermediate table may be filtered, or part of the information in any field may be filtered, for example, information that does not meet the balance limit range in the balance field may be deleted.
And after responding to the preset operation of a user and operating the nth intermediate table of the nth data processing layer, generating a temporary intermediate table corresponding to the nth data processing layer for updating the nth intermediate table.
In operation S520, the original nth intermediate table generated by the nth data processing layer is replaced with the temporary intermediate table, resulting in an updated nth intermediate table.
According to the embodiment of the disclosure, after the temporary intermediate table is generated, the original nth intermediate table generated by the nth data processing layer is replaced by the temporary intermediate table, so as to obtain an updated nth intermediate table.
Specifically, the operation of replacing the original nth intermediate table includes: and determining the storage position of the original nth intermediate table, then storing the original nth intermediate table in a preset position, and replacing the original nth intermediate table by using the temporary intermediate table. In the case where the temporary intermediate table successfully replaces the original nth intermediate table, the original nth intermediate table at the preset position is deleted.
In operation S530, the (n + 1) th intermediate table generated by the (n + 1) th data processing layer is updated according to the definition logic between the updated (n) th intermediate table and the M field information.
According to an embodiment of the present disclosure, after updating the nth intermediate table with the temporary intermediate table, the updated nth intermediate table is taken as an input of the (n + 1) th data processing layer. Correspondingly, the (n + 1) th data processing layer updates the output of the (n + 1) th data processing layer according to the updated definition logic between the (n) th intermediate table and the M field information.
According to an embodiment of the present disclosure, for the connection operation, one specific embodiment of operation S510 may be: and determining the third field information selected by the user in response to the connection operation of the user. And 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. Wherein the third field information comprises a field presented on the user's interactive interface.
According to the embodiment of the disclosure, the processing result of each data processing layer can be shown to the user. Specifically, the user requests the risk early warning platform to display the processing result of a certain data processing layer through a preset click operation. The risk early warning platform can display the intermediate table and the SQL statement of the data processing layer to a user, wherein all fields of the intermediate table are displayed by default.
And after the n-1 intermediate table and the n-1 SQL statement of the n-1 data processing layer are presented to the target user, determining third field information selected by the user in response to the connection operation of the user on the n-1 intermediate table and other intermediate tables or original data tables, and generating a temporary intermediate table so as to update the input of a subsequent data processing layer. The user can select the third field information in the original data table, and can also select the third field information in other intermediate tables.
The user operates on the (n-1) th intermediate table to generate a temporary intermediate table, namely, the original nth intermediate table and the temporary intermediate table are different. Therefore, the original nth intermediate table cannot be used as an input of the (n + 1) th data processing layer, and the changed temporary intermediate table needs to be used as an input of the (n + 1) th data processing layer. That is, the processing operation of the original nth data processing layer is replaced with the join operation, and the operations of all data processing layers below the nth data processing layer are updated accordingly.
According to the embodiment of the disclosure, the temporary intermediate table generated by the join operation can be used as the result obtained by the newly added data processing layer, and the temporary intermediate table can be used as the input of the original nth data processing layer.
According to an embodiment of the present disclosure, the connection operation is expressed in the form of a connection line. For example, the connection operation is shown to the user through the connection line on the interactive interface.
According to an embodiment of the present disclosure, for the filtering operation, a specific embodiment of operation S510 may be: and responding to the filtering operation of the user, determining fourth field information selected by the user, deleting the fourth field information in an original nth intermediate table generated by the nth data processing layer, and generating a temporary intermediate table corresponding to the nth data processing layer.
In the case of updating the nth middle table of the nth data processing layer, accordingly, the processing results of all data processing layers behind the nth data processing layer are changed.
For example, in the nth data processing layer, the nth intermediate table is updated by the filtering operation, and the field a is deleted from the updated nth intermediate table. The field a is not included in the (N + 1) th data processing layer after the nth data processing layer until the last nth data processing layer.
According to the method and the device, the intermediate table is updated in response to the operation of the user, the business personnel and the technical personnel do not need to communicate again, the model can be modified in the stage of generating the target business model, and the model generation efficiency is improved.
According to the embodiment of the present disclosure, as shown in fig. 4, the SQL statements obtained by each data processing layer are used as input of the SQL statement optimization module 408. The SQL statement optimization module 408 is configured to obtain a target SQL statement corresponding to the target business model according to the N SQL statements output by the N data processing layers.
According to the embodiment of the disclosure, the N structured query statements generated by the N data processing layers are combined according to the connection sequence of the N cascaded data processing layers to obtain a target structured query statement, and the target structured query statement is used for generating a target business model.
Specifically, the N structured query statements may be sequentially connected in series according to a connection order of the N cascaded data processing layers, so as to obtain a final target structured query statement. In the process of generating the target business model by using the target structured query statement, the target business model is generated by using each structured query statement as a processing unit.
According to an embodiment of the present disclosure, the N structured query statements may include a plurality of pre-loaded structured query statements. For example, for the "account" and "balance" fields, which are all referred to by a number of business scenarios, processing of the "account" and "balance" fields may be done in advance before generating the target business model. In the process of generating the target business model, an intermediate table of a data processing layer for processing the 'account' and 'balance' fields is directly obtained.
According to the method and the device, the SQL sentences generated by each data layer are combined to obtain the target SQL sentences for generating the target business model, the target SQL sentences are simplified, chain calculation is changed into parallel calculation, and the operation time is reduced.
According to an embodiment of the present disclosure, as an embodiment, N structured query statements may be optimized.
And determining index data corresponding to the N structured query statements from the index table, and optimizing the N structured query statements according to the index data to obtain P optimized structured query statements.
The index data in the index table is used for representing the processing relation among the M field information through the standard structured query statement. Specifically, the index table may be an SQL statement table of an optimal processing path, which is formed by a user according to actual processing experience.
And after the P optimized structured query statements are obtained, combining the P structured query statements to obtain Q structured query statements. And determining the target structured query statement corresponding to the target business model according to the verification results of the Q structured query statements.
According to an embodiment of the present disclosure, Q structured query statements are each used to generate the target business model, but the runtime of each structured query statement is different. The validation result of the structured query statement may represent a run-time length for generating the business model.
According to the verification results of the Q structured query statements, the structured query statement with the shortest running time can be selected from the Q structured query statements, and the structured query statement with the shortest running time is used as a target structured query statement. The optimization and simplification of SQL sentences output by each data processing layer are realized, and the processing efficiency of constructing the target business model is improved.
According to the embodiment of the disclosure, a business model building module in a risk early warning platform needs to use an independent database to complete the building of a target business model in a simulation environment of a non-production environment.
Specifically, after configuration information corresponding to an operation is generated in response to the operation of a user, the configuration information is transmitted to a simulation environment, and simulation service data corresponding to the configuration information is generated in the simulation environment. And then generating K original data tables according to the simulation service data and the configuration information.
According to the embodiment of the disclosure, in the case that there is no specific service data in the configuration information, the simulation service data matched with the configuration information can be automatically generated according to the configuration information, so as to generate the original data table.
In the process of generating the target business model, the SQL statement tuning and the business model parameter debugging need to be tried in multiple ways, which may cause short-term high load of the database and even deadlock. According to the method and the device, the target business model is generated in the simulation environment, so that the problems of short-time high load and database collapse caused by generation of the model and tuning of the model are avoided.
According to the embodiment of the disclosure, after the target business model is generated, the target business model can be evaluated to obtain an evaluation result.
Specifically, the evaluation method may include: and inputting the constructed simulation data into a target business model, and then determining an evaluation result according to an output result of the target business model. The output result comprises the running time, whether the output parameter meets the requirement and the like.
And under the condition that the evaluation result is determined to be passed, the target business model is released from the simulation environment to the production environment, so that the target business model provides service for the user in the production environment, and the reliability of the business model is improved.
The method and the system facilitate business personnel to define the model and solve the performance problem of the SQL through the layered operation. Through the layered model, distributed operation can be realized, and the performance of the model is greatly improved. In addition, compared with the traditional modeling mode, the hierarchical model can save the labor cost, greatly reduce the complexity of modeling, and improve the online efficiency of the business model, so that business personnel can obtain an accurate risk prediction report according to the generated target business model.
Fig. 6 schematically shows a flowchart of a business data query method according to an embodiment of the present disclosure.
As shown in fig. 6, the service data query method of this embodiment includes operations S610 to S620.
In operation S610, in response to a query request of a target user, the query request is parsed to obtain a plurality of field information corresponding to the query request.
In operation S620, a plurality of pieces of field information are input to the service model, and a query result corresponding to the query request is output.
According to the embodiment of the disclosure, after the business model is generated according to the user requirement, the business model can be issued, so that business personnel can implement corresponding risk early warning operation according to the business model. Wherein, the business model is generated according to the generation method of the business model.
Specifically, a user initiates a query request through an interactive interface, the risk early warning platform responds to the query request of a target user, analyzes the query request to obtain a plurality of pieces of field information corresponding to the query request, and outputs a query result after the plurality of pieces of field information are input into a service model. The query request may be a risk query request for querying a business corresponding to the current business model.
For example, after discovering the problem of the service of collecting and paying for a substitute, service personnel can select corresponding field information on the risk early warning platform according to the requirement to generate configuration information. After the risk early warning platform generates a business model according to the configuration information, responding to a risk early warning query request of business personnel, analyzing the query request, and obtaining a plurality of field information corresponding to the query request. And then inputting the information of the plurality of fields into a service model to obtain a query result corresponding to the risk early warning query request. The query results may be presented to the business personnel in the form of a risk report.
Business personnel can operate through the interactive interface of risk early warning platform, need not business personnel and know SQL execution logic, also need not technical staff and translate, can be through including the dictionary storehouse of the word in the business field, realize independently defining the model and adjusting parameter for business personnel can directly build a model through the platform, rapidly, directly become the model with the idea, can not lose the idea because of factors such as communication cost height, cycle length, complicacy, cause enterprise risk early warning leak.
Fig. 7 schematically shows a block diagram of a generating apparatus of a business model according to an embodiment of the present disclosure.
As shown in fig. 7, the generating apparatus 700 of the business model of this embodiment includes an obtaining module 710, a parsing module 720, and a generating module 730.
The obtaining module 710 is configured to generate K original data tables according to the obtained configuration information, where the configuration information is used to define a service model, the original data tables correspond to service data one to one, and K is greater than or equal to 2. In an embodiment, the obtaining module 710 may be configured to perform the operation S210 described above, which is not described herein again.
And the analyzing module 720 is configured to analyze the K original data tables to obtain M field information corresponding to the K original data tables, where the field information is used to indicate an attribute characteristic of the service data, and M is greater than or equal to 2. In an embodiment, the parsing module 720 may be configured to perform the operation S220 described above, which is not described herein again.
The generating module 730 is configured to process K original data tables through N cascaded data processing layers according to the definition logic between the M field information and the M field information, to generate a target service model, where an input of an nth data processing layer includes one of the K original data tables and an intermediate table output by an 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, and the definition logic is configured to represent a processing relationship between two pieces of field information in the M field information. In an embodiment, the generating module 730 may be configured to perform the operation S230 described above, which is not described herein again.
According to an embodiment of the present disclosure, the generating module 730 includes a first generating unit, a second generating unit, and a third generating unit.
The first generating unit is used for determining first field information from the (n-1) th intermediate table after the (n-1) th intermediate table is output by the (n-1) th data processing layer, wherein the first field information is related to a data processing function executed by the (n) th data processing layer. In an embodiment, the first generating unit may be configured to perform the operation S331 described above, which is not described herein again.
The second generating unit is used for determining a first original data table from the K original data tables according to the definition logic between the first field information and the M field information. In an embodiment, the second generating unit may be configured to perform the operation S332 described above, which is not described herein again.
The third generating unit is configured to generate an nth intermediate table and an nth structured query statement corresponding to the nth data processing layer according to the first original data table and the (N-1) th intermediate table, where, when N is equal to N, the nth intermediate table is a data table corresponding to the target service model. In an embodiment, the third generating unit may be configured to perform the operation S333 described above, which is not described herein again.
According to an embodiment of the present disclosure, the generating module 730 further includes a first updating unit, a second updating unit, and a third updating unit.
The first updating unit is used for responding to preset operation of a user and generating a temporary intermediate table corresponding to the nth data processing layer, and the preset operation comprises connection operation and/or filtering operation. In an embodiment, the first updating unit may be configured to perform the operation S510 described above, which is not described herein again.
The second updating unit is used for 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. In an embodiment, the second updating unit may be configured to perform the operation S520 described above, which is not described herein again.
The third updating unit is used for updating 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 an embodiment, the third updating unit may be configured to perform the operation S530 described above, and is not described herein again.
According to the embodiment of the disclosure, the business data query device comprises a response module and an output module.
The response module is used for responding to the query request of the target user, analyzing the query request and obtaining a plurality of pieces of field information corresponding to the query request. In an embodiment, the response module may be configured to perform the operation S710 described above, which is not described herein again.
The output module is used for inputting the information of the plurality of fields into a business model and outputting a query result corresponding to the query request, wherein the business model is generated according to the generation method of the business model. In an embodiment, the output module may be configured to perform the operation S720 described above, which is not described herein again.
Fig. 8 schematically shows a block diagram of an electronic device adapted to a method of generating a business model according to an embodiment of the present disclosure.
As shown in fig. 8, an electronic device 800 according to an embodiment of the present disclosure includes a processor 801 that 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 section 808 into a Random Access Memory (RAM) 803. The processor 801 may include, for example, a general purpose microprocessor (e.g., CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., application Specific Integrated Circuit (ASIC)), among others. 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 flows according to embodiments of the present disclosure.
In the RAM803, various programs and data necessary for the operation of the electronic apparatus 800 are stored. The processor 801, the ROM 802, and the RAM803 are connected to each other by a bus 804. The processor 801 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 802 and/or the RAM 803. Note that the programs may also be stored in one or more memories other than the ROM 802 and RAM 803. The processor 801 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 800 may also include input/output (I/O) interface 805, input/output (I/O) interface 805 also connected to bus 804, according to an embodiment of the present disclosure. Electronic device 800 may also include one or more of the following components connected to I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. 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 necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 802 and/or RAM803 described above and/or one or more memories other than the ROM 802 and RAM 803.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated by the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the generation method of the business model provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 801. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted in the form of a signal on a network medium, distributed, downloaded and installed via communication section 809, and/or installed from removable media 811. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program, when executed by the processor 801, performs the above-described functions defined in the system of the embodiments of the present disclosure. The above described systems, devices, apparatuses, modules, units, etc. may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The above-described embodiments, objects, technical solutions and advantages of the present disclosure are further described in detail, it should be understood that the above-described embodiments are only examples of the present disclosure, and should not be construed as limiting the present disclosure, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.

Claims (15)

1. A method for generating a business model comprises the following steps:
generating K original data tables according to the acquired configuration information, wherein the configuration information is used for defining a service model, the original data tables correspond to service data one by one, and K is more than or equal to 2;
analyzing the K original data tables to obtain M field information corresponding to the K original data tables, wherein the field information is used for representing the attribute characteristics of the service data, and M is more than or equal to 2; and
processing the K original data tables through N cascaded data processing layers according to the definition logic between the M field information and the M field information to generate a target service model;
wherein, the input of the nth data processing layer comprises an original data table in 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, and the definition logic is used for representing the processing relationship between two pieces of field information in the M pieces of field information.
2. The method of claim 1, wherein the output of the data processing layer comprises intermediate tables and structured query statements; processing the K original data tables through N cascaded data processing layers according to the definition logic between the M field information and the M field information to generate a target service model, wherein the method comprises the following steps:
after the n-1 th intermediate table is output by the n-1 th data processing layer, determining first field information from the n-1 th intermediate table, wherein the first field information is related to a data processing function executed by the n-1 th data processing layer;
determining a first original data table from the K original data tables according to definition logic between the first field information and the M field information; and
and generating an nth intermediate table and an nth structured query statement corresponding to the nth data processing layer according to the first original data table and the nth-1 intermediate table, wherein the nth intermediate table is a data table corresponding to the target service model when N is equal to N.
3. The method of claim 2, wherein the definition logic comprises a database function or a preset script method;
determining, by the determining according to the definition logic between the first field information and the M field information, a first original data table from the K original data tables, including:
acquiring second field information corresponding to the first field information from the M field information;
determining a target definition logic from definition logics among the M field information according to the field names of the first field information and the second field information; and
determining the first raw data table according to the target definition logic.
4. The method of claim 2, further comprising:
responding to preset operation of a user, and generating a temporary intermediate table corresponding to the nth data processing layer, wherein the preset operation comprises connection operation and/or filtering operation;
replacing the original nth intermediate table generated by the nth data processing layer by using the temporary intermediate table to obtain an updated nth intermediate table; and
and updating the (n + 1) th intermediate table generated by the (n + 1) th data processing layer according to the definition logic between the updated (n) th intermediate table and the M field information.
5. The method of claim 4, wherein the generating of the temporary intermediate table corresponding to the nth data processing layer in response to a preset operation of a user comprises:
responding to the connection operation of the user, and determining third field information selected by the user, wherein the third field information comprises fields displayed on an interactive interface of 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 the intermediate table to which the third field information belongs to generate a temporary intermediate table corresponding to the (n) th data processing layer; and/or
And responding to the filtering operation of the user, determining 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.
6. The method of claim 2, further comprising:
determining an identification field as target field information under the condition that the identification field for representing the user identity exists in the original data table;
randomly acquiring field information to be selected corresponding to the target field information from the M field information according to definition logic between the target field information and the M field information; and
and generating a 1 st intermediate table and a 1 st structured query statement corresponding to the 1 st data processing layer based on the original data table to which the target field information belongs and the original data table to which the field to be selected belongs.
7. The method of claim 2, further comprising:
and combining N structured query statements generated by the N data processing layers according to the connection sequence of the N cascaded data processing layers to obtain a target structured query statement, wherein the target structured query statement is used for generating the target business model.
8. The method of claim 7, wherein the combining the N structured query statements generated by the N cascaded data processing layers according to the connection order of the N data processing layers to obtain the target structured query statement comprises:
determining index data corresponding to the N structured query statements from an index table, wherein the index data in the index table are used for representing the processing relation among the M field information through standard structured query statements; and
optimizing the N structured query statements according to the index data to obtain P optimized structured query statements, wherein 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, wherein the Q structured query statements are all used for generating the target business model;
and determining a target structured query statement corresponding to the target business model according to the verification result of the Q structured query statements, wherein the verification result is used for expressing the running time of the Q structured query statements.
9. The method of claim 1, wherein the generating K raw data tables according to the obtained configuration information comprises:
responding to the operation of a user, and generating configuration information corresponding to the operation;
transmitting the configuration information to a simulation environment to generate simulation service data corresponding to the configuration information; and
and generating the K original data tables according to the simulation service data and the configuration information.
10. The method of claim 9, further comprising:
after a target business model is generated, evaluating the target business model to obtain an evaluation result; and
and under the condition that the evaluation result is determined to be passed, releasing the target business model from the simulation environment to a production environment so that the target business model provides services for users in the production environment.
11. A business data query method comprises the following steps:
responding to a query request of a target user, analyzing the query request, and obtaining a plurality of field information corresponding to the query request; and
inputting the plurality of field information into the service model, and outputting a query result corresponding to the query request;
wherein the business model is generated according to the method of one of claims 1 to 10.
12. An apparatus for generating a business model, comprising:
the system comprises an acquisition module, a data processing module and a data processing module, wherein the acquisition module is used for generating K original data tables according to acquired configuration information, the configuration information is used for defining a service model, the original data tables correspond to service data one to one, and K is more than or equal to 2;
the analysis module is used for analyzing the K original data tables to obtain M field information corresponding to the K original data tables, wherein the field information is used for representing the attribute characteristics of the service data, and M is more than or equal to 2; and
the generating module is used for processing the K original data tables through N cascaded data processing layers according to the definition logic between the M field information and the M field information to generate a target service model;
wherein, the input of the nth data processing layer comprises an original data table in 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, and N is less than or equal to N, and the definition logic is used for representing the processing relationship between two pieces of field information in the M pieces of field information.
13. An electronic device, comprising:
one or more processors;
a storage device to store one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-11.
14. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 11.
15. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 11.
CN202211174136.5A 2022-09-26 2022-09-26 Service model generation method, service data query method, device and equipment Pending CN115422202A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211174136.5A CN115422202A (en) 2022-09-26 2022-09-26 Service model generation method, service data query method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211174136.5A CN115422202A (en) 2022-09-26 2022-09-26 Service model generation method, service data query method, device and equipment

Publications (1)

Publication Number Publication Date
CN115422202A true CN115422202A (en) 2022-12-02

Family

ID=84204238

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211174136.5A Pending CN115422202A (en) 2022-09-26 2022-09-26 Service model generation method, service data query method, device and equipment

Country Status (1)

Country Link
CN (1) CN115422202A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116415199A (en) * 2023-04-13 2023-07-11 广东铭太信息科技有限公司 Business data outlier analysis method based on audit intermediate table

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116415199A (en) * 2023-04-13 2023-07-11 广东铭太信息科技有限公司 Business data outlier analysis method based on audit intermediate table
CN116415199B (en) * 2023-04-13 2023-10-20 广东铭太信息科技有限公司 Business data outlier analysis method based on audit intermediate table

Similar Documents

Publication Publication Date Title
US11487539B2 (en) Systems and methods for automating and monitoring software development operations
US10997531B2 (en) System, method and graphical user interface for workflow generation, deployment and/or execution
CN111177231A (en) Report generation method and report generation device
US20230334017A1 (en) Api for implementing scoring functions
US20090070121A1 (en) System, Method And Graphical User Interface For Workflow Generation, Deployment And/Or Execution
CN110795509A (en) Method and device for constructing index blood relationship graph of data warehouse and electronic equipment
US11531914B2 (en) Artificial intelligence (AI) based automatic rule generation
US20190147029A1 (en) Method and system for generating conversational user interface
CN110795478A (en) Data warehouse updating method and device applied to financial business and electronic equipment
KR20200119176A (en) System, apparatuses, and methods of processing and managing web traffic data
CN111125064A (en) Method and device for generating database mode definition statement
CN115422202A (en) Service model generation method, service data query method, device and equipment
CN112102099A (en) Policy data processing method and device, electronic equipment and storage medium
CN113378346A (en) Method and device for model simulation
CN115760013A (en) Operation and maintenance model construction method and device, electronic equipment and storage medium
CN115904527A (en) Data processing method, device, equipment and medium
CN115033634A (en) Data acquisition method, data acquisition device, electronic equipment and medium
CN110019177A (en) The method and apparatus of rule storage
CN113434382A (en) Database performance monitoring method and device, electronic equipment and computer readable medium
CN115017185A (en) Data processing method, device and storage medium
CN113762702A (en) Workflow deployment method, device, computer system and readable storage medium
CN113779017A (en) Method and apparatus for data asset management
CN116301869B (en) Front-end page configuration management and control system, method, equipment and medium
CN116915870B (en) Task creation request processing method, device, electronic equipment and readable medium
US20230385663A1 (en) Large scale forecasting with explanation information for time series datasets

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination