CN115080596A - Data processing method and device, computer equipment and storage medium - Google Patents

Data processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115080596A
CN115080596A CN202210746368.7A CN202210746368A CN115080596A CN 115080596 A CN115080596 A CN 115080596A CN 202210746368 A CN202210746368 A CN 202210746368A CN 115080596 A CN115080596 A CN 115080596A
Authority
CN
China
Prior art keywords
compiling
compiled
statement
data source
page
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
CN202210746368.7A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202210746368.7A priority Critical patent/CN115080596A/en
Publication of CN115080596A publication Critical patent/CN115080596A/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/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • G06F8/436Semantic checking

Landscapes

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

Abstract

The embodiment of the invention provides a data processing method, which comprises the following steps: classifying the compiling statements corresponding to different service scenes through the back end according to the hierarchy catalog of the page so as to classify the compiling statements under the corresponding hierarchies; establishing a first mapping relation between a page and each compiled statement according to the levels of the compiled statements; analyzing the compiling statements and obtaining a data source table corresponding to each compiling statement; and establishing a second mapping relation between the page and each data source table based on a plurality of data source tables, and storing each compiled statement and each data source table into a database at the back end on the basis of the corresponding first mapping relation and second mapping relation. According to the embodiment of the invention, the SQL statement is associated with the page level, and the SQL statement is associated with the data source table, so that the SQL storage mode and path in the development process are standardized, the development of subsequent projects is facilitated, and the overall development efficiency of the projects is effectively improved.

Description

Data processing method and device, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of big data, in particular to a data processing method and device, computer equipment and a computer readable storage medium.
Background
At present, SQL statements are often required to be used for accessing a database in the process of developing a JavaWeb application program, and the SQL statements corresponding to different processing logics can be developed and completed by different developers. The analysis of the interface data requires developers to obtain and analyze SQL codes from different developers, and the data source table of the interface is gradually analyzed from the SQL codes according to experience. However, analyzing the interface data by the above method, obtaining codes from multiple places and relying on human analysis, results in low development efficiency of projects, low code maintenance efficiency and high cost
Disclosure of Invention
In view of the above, an object of the present invention is to provide a data processing method, an apparatus, a computer device, and a computer readable storage medium, which are used to solve the problem of low project development efficiency caused by relying on manpower to obtain corresponding SQL statements from different developers and relying on manpower to perform statement analysis to obtain interface data.
One aspect of the embodiments of the present invention provides a data processing method, which is applied to a server, where the server includes a front end and a back end, and the front end is used to display a page, and the method includes:
classifying the compiling statements corresponding to different service scenes according to the hierarchy catalog of the page through the back end so as to classify the compiling statements under corresponding hierarchies;
establishing a first mapping relation between a page and each compiling statement according to the levels of the compiling statements;
analyzing the compiling statements and obtaining a data source table corresponding to each compiling statement;
and establishing a second mapping relation between the page and each data source table based on a plurality of data source tables, and storing each compiled statement and each data source table into a database at the back end on the basis of the corresponding first mapping relation and second mapping relation.
Optionally, the step of parsing the compiled statements and obtaining a data source table corresponding to each compiled statement further includes:
inputting the compiled sentences into a preset compiled sentence analysis engine;
judging whether each compiled statement conforms to preset compiled statement syntax logic in a preset compiled statement analysis engine;
and traversing the AST tree generated in the compiling stage according to the execution sequence of the compiling statements and outputting a corresponding data source table and a data screening strategy under the condition that the compiling statements conform to the preset compiling statement syntax logic.
Optionally, after the determining whether each compiled statement conforms to a preset compiled statement syntax logic in a preset compiled statement parsing engine, the method further includes:
under the condition that the compiling statement conforms to the preset compiling statement syntax logic, decomposing each compiling statement into a plurality of clauses according to a preset decomposition rule;
and according to the type corresponding to each clause, performing semantic analysis on each clause to obtain the execution sequence of each clause.
Optionally, the establishing a second mapping relationship between the page and each data source table based on a plurality of data source tables further includes:
recursively traversing the AST tree to obtain information of SQL elements obtained by each recursion, wherein the information of the SQL elements at least comprises table names and field names;
establishing and storing a first set according to the acquired information of the SQL element; the key values in the first set comprise field names corresponding to SQL elements obtained through recursion and table names obtained through recursion;
and generating a second mapping relation between the page and each data source table according to the first set.
Optionally, the method further comprises:
acquiring a target version number corresponding to the target service data;
acquiring a corresponding target data source table according to the target version number;
acquiring a plurality of corresponding target compiling statements from the target data source table according to the target service data;
executing the target compiling statements to display target business data corresponding to the target compiling statements in at least one page.
An aspect of an embodiment of the present invention further provides a data processing apparatus, which is applied to a server, where the server includes a front end and a back end, the front end is used to display a page, and the apparatus includes:
the classification module is used for classifying the compiled sentences corresponding to different service scenes through the back end according to the hierarchical directory of the page so as to classify the compiled sentences under corresponding hierarchies;
the first mapping establishing module is used for establishing a first mapping relation between a page and each compiled statement according to the levels of the compiled statements;
the analysis module is used for analyzing the compiling sentences and obtaining a data source table corresponding to each compiling sentence;
and the second mapping establishing module is used for establishing a second mapping relation between the page and each data source table based on a plurality of data source tables, and persistently storing each compiling statement and each data source table into the database at the back end based on the corresponding first mapping relation and second mapping relation.
Optionally, the parsing module is further configured to:
inputting the compiled sentences into a preset compiled sentence analysis engine;
judging whether each compiled statement conforms to preset compiled statement syntax logic in a preset compiled statement analysis engine;
and traversing the AST tree generated in the compiling stage according to the execution sequence of the compiling statements and outputting a corresponding data source table and a data screening strategy under the condition that the compiling statements conform to the preset compiling statement syntax logic.
One aspect of the embodiments of the present invention further provides a data processing method, which is applied to a server, where the server includes a front end and a back end, and the front end is used to display a page, and the method includes:
receiving, by the backend, project requirements, wherein the project requirements include application development requirements;
acquiring a target page module of an application program according to the project requirement;
and acquiring the SQL sentences corresponding to the target page module from a preset database according to the first mapping relation between the target page module and the SQL sentences and the second mapping relation between the target page module and a data source table.
An aspect of the embodiments of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the steps of the data processing method described above are implemented.
An aspect of the embodiments of the present invention further provides a computer-readable storage medium, in which a computer program is stored, the computer program being executable by at least one processor to cause the at least one processor to perform the steps of the data processing method as described above.
According to the data processing method, the data processing device, the computer equipment and the computer readable storage medium, the compiling statements corresponding to different service scenes are classified by the back end according to the level directory of the page, so that the compiling statements are classified under corresponding levels; establishing a first mapping relation between a page and each compiled statement according to the levels of the compiled statements; analyzing the compiling statements and obtaining a data source table corresponding to each compiling statement; establishing a second mapping relation between the page and each data source table based on a plurality of data source tables, and persistently storing each compiled statement and each data source table into a database at the back end based on the corresponding first mapping relation and second mapping relation; according to the embodiment of the invention, the SQL statement is associated with the page level, and the SQL statement is associated with the data source table, so that the SQL storage mode and path in the development process are standardized, the development of subsequent projects is facilitated, and the overall development efficiency of the projects is effectively improved.
The invention is described in detail below with reference to the drawings and specific examples, but the invention is not limited thereto.
Drawings
FIG. 1 schematically illustrates an example flow chart of a method of implementing data processing of the present invention;
FIG. 2 schematically illustrates a flow chart of steps for implementing a data processing method according to the present invention;
FIG. 3 schematically illustrates a flow chart of steps for implementing a data processing method according to the present invention;
FIG. 4 is a flow chart schematically illustrating the steps of implementing a data processing method in accordance with the present invention;
FIG. 5 is a flow chart schematically illustrating the steps of implementing a data processing method in accordance with the present invention;
fig. 6 schematically shows a block diagram of a data processing apparatus according to a second embodiment of the present invention;
FIG. 7 is a flow chart that schematically illustrates steps in a method for implementing data processing, in accordance with a third embodiment of the present invention;
fig. 8 schematically shows a hardware configuration diagram of a computer device suitable for implementing the data processing method according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the descriptions relating to "first", "second", etc. in the embodiments of the present invention are only for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
In the description of the present invention, it should be understood that the numerical references before the steps do not identify the order of performing the steps, but merely serve to facilitate the description of the present invention and to distinguish each step, and thus should not be construed as limiting the present invention.
Example one
Referring to fig. 1, a flowchart illustrating steps of a data processing method according to an embodiment of the invention is shown. It is to be understood that the flow charts in the embodiments of the present method are not intended to limit the order in which the steps are performed. The data processing method is applied to a server, the server comprises a front end and a back end, the front end is used for displaying a page, and the following description is exemplarily described by taking the server as an execution subject, and specifically includes the following steps:
as shown in fig. 1, the data processing method may include steps S100 to S106, in which:
and S100, classifying the compiled statements corresponding to different business scenes through the back end according to the hierarchical directory of the page, so as to classify the compiled statements into corresponding hierarchies.
In an exemplary embodiment, service scenarios and service processing flows corresponding to different service systems are different, each service system has a plurality of different service scenarios, and each service scenario corresponds to a plurality of service processing flows; different business scenarios and different business processing flows need different SQL sentences.
In this embodiment, the front end is used to present a visualization page of a java web application. Wherein, the visualization page can support multi-level menus, such as: primary/secondary/…/page. For example, if the Java application is a credit card application, corresponding to a credit card payment scenario, the credit card payment process includes: inquiring bill information, inquiring running information, selecting repayment types, selecting repayment preference, inputting repayment amount, selecting repayment modes, paying based on the repayment amount, and realizing repayment of the credit card after payment is finished; the implementation of each step flow requires the corresponding execution of at least one SQL statement.
Step S102, establishing a first mapping relation between the page and each compiled statement according to the levels of the compiled statements.
In an exemplary embodiment, the establishment of the first mapping relationship can associate a plurality of SQL statements with each step flow of the corresponding business scenario, so that the plurality of SQL statements and the business scenario can be reasonably classified.
Step S104, analyzing the compiling statements and obtaining a data source table corresponding to each compiling statement.
In an exemplary embodiment, the method may parse the plurality of SQL statements using an SQL parsing engine.
Referring to fig. 2, the step S104 of parsing the compiled sentences and obtaining the data source table corresponding to each compiled sentence may further include steps S200 to S204, where: step S200, inputting the compiling statements into a preset compiling statement analysis engine; step S202, judging whether each compiling statement conforms to a preset compiling statement syntax logic in a preset compiling statement analysis engine; and step S204, under the condition that the compiling statement conforms to the preset compiling statement syntax logic, traversing the AST tree generated in the compiling stage according to the execution sequence of the compiling statements, and outputting a corresponding data source table and a data screening strategy.
In this embodiment, the parsing of the SQL statement in this step may be understood as semantic analysis of the SQL statement.
Referring to fig. 3, after determining whether each compiled statement conforms to the syntax logic of the preset compiled statement in the preset compiled statement parsing engine, the data processing method further includes the following operations: step S300, under the condition that the compiled statement conforms to the preset compiled statement syntax logic, decomposing each compiled statement into a plurality of clauses according to a preset decomposition rule; and step S302, according to the type corresponding to each clause, performing semantic analysis on each clause to obtain the execution sequence of each clause.
For example, an SQL statement may be broken down into the following 7 chunks according to statement type:
(1)FROM<XXX>
(2)WHERE<XXX>
(3)GROUP BY<XXX>
(4)HAVING<XXX>
(5)SELECT
(6)DISTINCT<XXX>
(7)ORDER BY<XXX>。
in the data processing scheme, it is particularly noted that the FROM statement type and the WHERE statement type correspond to corresponding data screening policies. For example, the table carried behind FROM identifies the data source and clauses to be queried by this SQL statement, such as Cartesian product, ON filtering, and adding external columns (if external connections are used, for optional purposes). The WHERE can filter the data source according to the service requirement.
Step S106, establishing a second mapping relation between the page and each data source table based on a plurality of data source tables, and persistently storing each compiled statement and each data source table into the database at the back end based on the corresponding first mapping relation and second mapping relation.
In an exemplary embodiment, the data source table is associated with the processing logic of the page and persistently stored in the database at the back end, which is helpful for standardizing the storage of the SQL statement logic of the developer and is convenient for the random access of the subsequent SQL statement.
Referring to fig. 4, the step of establishing a second mapping relationship between the page and each data source table based on the plurality of data source tables may further be obtained by: step S400, recursion traversing the AST tree, and obtaining the information of SQL elements obtained by each recursion, wherein the information of the SQL elements at least comprises a table name and a field name; step S402, establishing and saving a first set according to the acquired information of the SQL element; the key values in the first set comprise field names corresponding to SQL elements obtained through recursion and table names obtained through recursion; and step S404, generating a second mapping relation between the page and each data source table according to the first set.
The method further comprises the following steps: matching SQL sentences corresponding to the business data with version numbers, wherein the processing logic of each business data corresponds to a unique version number; in each subsequent version iteration process, the SQL sentences corresponding to different version numbers are extracted for analysis, so that the change and difference of processing logic corresponding to the business data can be quickly positioned. Please refer to fig. 5, which specifically includes: step S500, obtaining a target version number corresponding to the target service data; step S502, obtaining a corresponding target data source table according to the target version number; step S504, according to the target service data, a plurality of corresponding target compiling statements are obtained from the target data source table; and step S506, executing the target compiled statements to display target business data corresponding to the target compiled statements in at least one page.
In the embodiment of the invention, the SQL sentences corresponding to the business data are associated with the page hierarchy, and the SQL sentences are associated with the data source table, so that the storage method of the SQL sentences can be standardized, all the SQL sentences in the project can be extracted, the semantics of the SQL sentences can be analyzed in real time through the mapping relation between the SQL and the page, and the SQL sentences are displayed in the visual page at the front end; the development quality of the whole project group/product group can be improved, and the development work and the code maintenance efficiency can be effectively improved.
Compared with the mode that the code is read by the developer purely by experience, in the embodiment of the invention, in the daily data problem investigation of operators, the working efficiency of the developer can be effectively improved by calling the corresponding SQL statement from the data source table, and even under the condition that the personnel change, the investigation of the data problem can still be ensured not to be influenced by the personnel and the experience; the comparison of different versions of the analysis result is also helpful for operators to more comprehensively control the service requirement in the data problem processing process.
Example two
With continued reference to FIG. 6, a block diagram of a data processing apparatus of the present invention is schematically shown. In the present embodiment, the data processing apparatus may include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to implement the present invention and implement the above-described data processing method. The program module referred to in the embodiments of the present invention is a series of computer program instruction segments capable of performing specific functions, and is more suitable than the program itself for describing the execution process of the data processing apparatus in the storage medium. The following description will specifically describe the functions of the program modules of the present embodiment. The data processing device is used in a server, the server comprises a front end and a back end, and the front end is used for displaying pages.
As shown in fig. 6, the data processing apparatus may include a classification module 600, a first mapping establishing module 602, a parsing module 604, and a second mapping establishing module 606, wherein:
a classification module 600, configured to classify, by the back end, the compiled statements corresponding to different service scenarios according to the hierarchical directory of the page, so as to classify a plurality of compiled statements into corresponding hierarchies;
a first mapping establishing module 602, configured to establish a first mapping relationship between a page and each compiled statement according to the hierarchy of the compiled statements;
the parsing module 604 is configured to parse the compiled statements and obtain a data source table corresponding to each compiled statement;
a second mapping establishing module 606, configured to establish a second mapping relationship between the page and each data source table based on multiple data source tables, and persistently store each compiled statement and each data source table in the database at the back end based on the corresponding first mapping relationship and second mapping relationship.
In an exemplary embodiment, the parsing module 604 is further configured to: inputting the compiling statements into a preset compiling statement analysis engine; judging whether each compiled statement conforms to a preset compiled statement syntax logic in a preset compiled statement analysis engine; and traversing the AST tree generated in the compiling stage according to the execution sequence of the compiling statements and outputting a corresponding data source table and a data screening strategy under the condition that the compiling statements conform to the preset compiling statement syntax logic.
In an exemplary embodiment, the data processing apparatus further comprises a semantic parsing module (not identified), wherein the semantic parsing module is configured to: under the condition that the compiling statements accord with the preset compiling statement syntax logic, decomposing each compiling statement into a plurality of clauses according to a preset decomposition rule; and according to the type corresponding to each clause, performing semantic analysis on each clause to obtain the execution sequence of each clause.
In an exemplary embodiment, the second mapping establishing module 606 is further configured to: recursively traversing the AST tree to obtain information of SQL elements obtained by each recursion, wherein the information of the SQL elements at least comprises table names and field names; establishing and storing a first set according to the acquired information of the SQL element; the key values in the first set comprise field names corresponding to SQL elements obtained through recursion and table names obtained through recursion; and generating a second mapping relation between the page and each data source table according to the first set.
In an exemplary embodiment, the data processing apparatus further comprises an iteration module (not identified), wherein the iteration module is configured to: acquiring a target version number corresponding to the target service data; acquiring a corresponding target data source table according to the target version number; acquiring a plurality of corresponding target compiling statements from the target data source table according to the target service data; and executing the target compiling statements to display target business data corresponding to the target compiling statements in at least one page.
EXAMPLE III
Referring to FIG. 7, a flowchart illustrating steps of a data processing method according to an embodiment of the invention is shown. It is to be understood that the flow charts in the embodiments of the present method are not intended to limit the order in which the steps are performed. The data processing method is applied to a server, the server comprises a front end and a back end, the front end is used for displaying a page, and the following description is exemplarily described by taking the server as an execution subject, and specifically includes the following steps:
as shown in fig. 7, the data processing method may include steps S700 to S706, in which:
step S700, receiving project requirements through the back end, wherein the project requirements comprise application program development requirements;
step S702, acquiring a target page module of the application program according to the project requirement; and
step S704, obtaining the SQL statement corresponding to the target page module from a preset database according to the first mapping relationship between the target page module and the SQL statement and the second mapping relationship between the target page module and the data source table.
In the embodiment of the invention, the SQL statement is quickly extracted from the data source table, so that the development work efficiency of the project and the maintenance efficiency of the subsequent codes are improved.
Example four
Fig. 8 is a schematic diagram of a hardware architecture of a computer device 10000 suitable for implementing a data processing method according to a fourth embodiment of the present invention. In this embodiment, the computer device 10000 is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction. The computer device 10000 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server or a cabinet server (including an independent server or a server cluster composed of a plurality of servers), a gateway, and the like. As shown in fig. 8, the computer device 10000 includes, but is not limited to, at least a memory 10010, a processor 10020, and a network interface 10030, which are communicatively connected to each other through a system bus. Wherein:
in this embodiment, the memory 10010 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 10010 may be an internal storage unit of the computer device 10000, such as a hard disk or a memory of the computer device 10000. In other embodiments, the memory 10010 may also be an external storage device of the computer device 10000, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device 10000. Of course, the memory 10010 may also include both internal and external storage devices of the computer device 10000. In this embodiment, the memory 10010 is generally used for storing an operating system installed in the computer device 10000 and various types of application software, such as the program codes of the data processing apparatus of the above-mentioned embodiment. In addition, the memory 10010 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 10020, in some embodiments, can be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip. The processor 10020 is generally configured to control overall operations of the computer device 10000, such as performing control and processing related to data interaction or communication with the computer device 10000. In this embodiment, the processor 10020 is configured to run the program code stored in the memory 10010 or process data, for example, run a data processing apparatus, so as to implement the data processing method of the above-mentioned embodiment.
The network interface 10030 may comprise a wireless network interface or a wired network interface, and the network interface 10030 is generally used for establishing a communication connection between the computer apparatus 10000 and other electronic devices. For example, the network interface 10030 is configured to connect the computer device 10000 to an external terminal through a network, establish a data transmission channel and a communication connection between the computer device 10000 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM for short), Wideband Code Division Multiple Access (WCDMA for short), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, and the like.
It is noted that fig. 8 only shows computer device 10000 having components 10010-10030, but it is to be understood that not all of the shown components are required and that more or less components may be implemented instead.
In this embodiment, the data processing apparatus stored in the memory 10010 can be further divided into one or more program modules, and the one or more program modules are stored in the memory 10010 and executed by one or more processors (in this embodiment, the processor 10020) to complete the present invention.
For example, fig. 6 shows a schematic diagram of program modules for implementing a second embodiment of the data processing apparatus, in which the data processing apparatus may be divided into a classification module 600, a first mapping establishing module 602, a parsing module 604, and a second mapping establishing module 606. The program module referred to in the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable than a program for describing the execution process of the data processing apparatus in the computer device 10000. The specific functions of the program modules 600 and 606 have been described in detail in the second embodiment, and are not described herein again.
EXAMPLE five
The present embodiment also provides a computer-readable storage medium having stored thereon a computer program which, when executed by at least one processor, implements the steps of the data processing method in the embodiments.
In the present embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device. Of course, the computer-readable storage medium may also include both internal and external storage devices of the computer device. In this embodiment, the computer-readable storage medium is generally used for storing an operating system and various types of application software installed in the computer device, for example, the program code of the katon detection method in the embodiment, and the like. Further, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A data processing method is applied to a server, the server comprises a front end and a back end, the front end is used for displaying pages, and the method comprises the following steps:
classifying the compiling statements corresponding to different service scenes according to the hierarchy catalog of the page through the back end so as to classify the compiling statements under corresponding hierarchies;
establishing a first mapping relation between a page and each compiling statement according to the levels of the compiling statements;
analyzing the compiling statements and obtaining a data source table corresponding to each compiling statement;
and establishing a second mapping relation between the page and each data source table based on a plurality of data source tables, and storing each compiled statement and each data source table into a database at the back end on the basis of the corresponding first mapping relation and second mapping relation.
2. The data processing method according to claim 1, wherein the step of parsing the compiled statements and obtaining a data source table corresponding to each compiled statement further comprises:
inputting the compiled sentences into a preset compiled sentence analysis engine;
judging whether each compiled statement conforms to preset compiled statement syntax logic in a preset compiled statement analysis engine;
and traversing the AST tree generated in the compiling stage according to the execution sequence of the compiling statements and outputting a corresponding data source table and a data screening strategy under the condition that the compiling statements conform to the preset compiling statement syntax logic.
3. The data processing method according to claim 2, wherein after said determining whether each compiled statement conforms to a preset compiled statement syntax logic in a preset compiled statement parsing engine, the method further comprises:
under the condition that the compiling statements accord with the preset compiling statement syntax logic, decomposing each compiling statement into a plurality of clauses according to a preset decomposition rule;
and according to the type corresponding to each clause, performing semantic analysis on each clause to obtain the execution sequence of each clause.
4. The data processing method of claim 3, wherein the establishing a second mapping relationship between the page and each data source table based on a plurality of data source tables further comprises:
recursively traversing the AST tree to obtain information of SQL elements obtained by each recursion, wherein the information of the SQL elements at least comprises table names and field names;
establishing and storing a first set according to the acquired information of the SQL element; the key values in the first set comprise field names corresponding to SQL elements obtained through recursion and table names obtained through recursion;
and generating a second mapping relation between the page and each data source table according to the first set.
5. The data processing method of claim 1, further comprising:
acquiring a target version number corresponding to the target service data;
acquiring a corresponding target data source table according to the target version number;
acquiring a plurality of corresponding target compiling statements from the target data source table according to the target service data;
executing the target compiling statements to display target business data corresponding to the target compiling statements in at least one page.
6. A data processing apparatus, applied to a server, the server including a front end and a back end, the front end being configured to display a page, the apparatus comprising:
the classification module is used for classifying the compiled sentences corresponding to different service scenes through the back end according to the hierarchical directory of the page so as to classify the compiled sentences under corresponding hierarchies;
the first mapping establishing module is used for establishing a first mapping relation between a page and each compiled statement according to the levels of the compiled statements;
the analysis module is used for analyzing the compiling sentences and obtaining a data source table corresponding to each compiling sentence;
and the second mapping establishing module is used for establishing a second mapping relation between the page and each data source table based on a plurality of data source tables, and persistently storing each compiling statement and each data source table into the database at the back end based on the corresponding first mapping relation and second mapping relation.
7. The data processor apparatus of claim 6, wherein the parsing module is further configured to:
inputting the compiled sentences into a preset compiled sentence analysis engine;
judging whether each compiled statement conforms to preset compiled statement syntax logic in a preset compiled statement analysis engine;
and traversing the AST tree generated in the compiling stage according to the execution sequence of the compiling statements under the condition that the compiling statements conform to the preset compiling statement syntax logic, and outputting a corresponding data source table and a data screening strategy.
8. A data processing method is applied to a server, the server comprises a front end and a back end, the front end is used for displaying pages, and the method comprises the following steps:
receiving project requirements through the backend, wherein the project requirements include application development requirements;
acquiring a target page module of an application program according to the project requirement;
and acquiring the SQL sentences corresponding to the target page module from a preset database according to the first mapping relation between the target page module and the SQL sentences and the second mapping relation between the target page module and a data source table.
9. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the data processing method according to any of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which is executable by at least one processor for causing the at least one processor to carry out the steps of the data processing method according to any one of claims 1 to 5.
CN202210746368.7A 2022-06-28 2022-06-28 Data processing method and device, computer equipment and storage medium Pending CN115080596A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210746368.7A CN115080596A (en) 2022-06-28 2022-06-28 Data processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210746368.7A CN115080596A (en) 2022-06-28 2022-06-28 Data processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115080596A true CN115080596A (en) 2022-09-20

Family

ID=83254942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210746368.7A Pending CN115080596A (en) 2022-06-28 2022-06-28 Data processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115080596A (en)

Similar Documents

Publication Publication Date Title
CN107844634B (en) Modeling method of multivariate general model platform, electronic equipment and computer readable storage medium
CN108920370B (en) Compatibility problem detection method, device and equipment
CN111914135A (en) Data query method and device, electronic equipment and storage medium
CN110674360B (en) Tracing method and system for data
CN113360519B (en) Data processing method, device, equipment and storage medium
CN105630684A (en) Software development kit identification method and device
US9367307B2 (en) Staged points-to analysis for large code bases
CN113268500A (en) Service processing method and device and electronic equipment
CN116431520A (en) Test scene determination method, device, electronic equipment and storage medium
CN115599386A (en) Code generation method, device, equipment and storage medium
CN113626558B (en) Intelligent recommendation-based field standardization method and system
CN110727651A (en) Log processing method and device, terminal equipment and computer readable storage medium
CN113296752A (en) Method, system, device and storage medium for generating API document
CN112069052A (en) Abnormal object detection method, device, equipment and storage medium
CN111414395A (en) Data processing method, system and computer equipment
CN116483888A (en) Program evaluation method and device, electronic equipment and computer readable storage medium
CN115080596A (en) Data processing method and device, computer equipment and storage medium
CN117009397A (en) Data query method, data query device, electronic equipment and storage medium
CN114661298A (en) Automatic public method generation method, system, device and medium
CN114625372A (en) Automatic component compiling method and device, computer equipment and storage medium
CN114527993A (en) Application deployment method, device, equipment and medium
CN114218261A (en) Data query method and device, storage medium and electronic equipment
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
Habibi et al. Generating test as a web service (TaaWS) through a method-based attribute grammar
CN109241515B (en) Method and device for generating report file

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