CN117271514A - Data processing method, apparatus, device, storage medium, and program product - Google Patents

Data processing method, apparatus, device, storage medium, and program product Download PDF

Info

Publication number
CN117271514A
CN117271514A CN202311246426.0A CN202311246426A CN117271514A CN 117271514 A CN117271514 A CN 117271514A CN 202311246426 A CN202311246426 A CN 202311246426A CN 117271514 A CN117271514 A CN 117271514A
Authority
CN
China
Prior art keywords
field
data table
target
target data
value
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
CN202311246426.0A
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.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology 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 Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202311246426.0A priority Critical patent/CN117271514A/en
Publication of CN117271514A publication Critical patent/CN117271514A/en
Pending legal-status Critical Current

Links

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/2282Tablespace storage structures; 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/283Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP

Landscapes

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

Abstract

Embodiments of the present disclosure provide a data processing method, apparatus, device, computer readable medium, and computer program product. The method described herein comprises: determining a source data table from a database; determining at least one target field from a source data table; generating configuration information of the target data table based on a preset corresponding relation between a first field in at least one target field and a second field in the target data table, wherein the configuration information indicates path information and visual description information of the second field, and the path information of the second field comprises identification of the first field corresponding to the second field, identification of a source data table where the first field is located, identification of the second field and identification of the target data table where the second field is located; based on the configuration information of the target data table, part or all of the fields in the target data table are visually presented. Thus, the workload of the developer is reduced, and the efficiency of operating the database is improved.

Description

Data processing method, apparatus, device, storage medium, and program product
Technical Field
Example embodiments of the present disclosure relate generally to the field of computers and, more particularly, relate to data processing methods, apparatuses, devices, computer-readable storage media, and computer program products.
Background
Databases are an important technology in the field of information management today. A database is a repository that organizes, stores, and manages data according to a data structure. In other words, a database is a collection of large amounts of data stored in a computer for a long period of time, organized, sharable, and uniformly managed. Databases enable efficient and convenient data storage, access, and updating. Accordingly, database technology is widely used in various fields such as enterprise management, social network, electronic commerce, educational management, and medical management. In some application scenarios, the database needs to be operated to process multiple data tables in the database. How to improve the efficiency of the database operation is of great concern.
Disclosure of Invention
In a first aspect of the present disclosure, a data processing method is provided. The method comprises the following steps: determining a source data table from a database, wherein the source data table at least comprises a first data table and a second data table; determining at least one target field from the first data table and the second data table, respectively; generating configuration information of the target data table based on a preset corresponding relation between a first field in at least one target field and a second field in the target data table, wherein the configuration information at least indicates path information and visual description information of the second field, the value of the second field is obtained based on the value of the first field corresponding to the second field, and the path information of the second field comprises an identifier of the first field corresponding to the second field, an identifier of a source data table where the first field is located, an identifier of the second field and an identifier of a target data table where the second field is located; and visually displaying part or all of the fields in the target data table based on the configuration information of the target data table.
In a second aspect of the present disclosure, a data processing apparatus is provided. The device comprises: a data table determination module configured to determine a source data table from the database, the source data table including at least a first data table and a second data table; a field determination module configured to determine at least one target field from the first data table and the second data table, respectively; the generating module is configured to generate configuration information of the target data table based on a preset corresponding relation between a first field in at least one target field and a second field in the target data table, wherein the configuration information at least indicates path information and visual description information of the second field, the value of the second field is obtained based on the value of the first field corresponding to the second field, and the path information of the second field comprises an identifier of the first field corresponding to the second field, an identifier of a source data table where the first field is located, an identifier of the second field and an identifier of the target data table where the second field is located; and a visual presentation module configured to visually present some or all of the fields in the target data table based on the configuration information of the target data table.
In a third aspect of the present disclosure, an electronic device is provided. The electronic device comprises at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions when executed by the at least one processing unit cause the electronic device to perform the method of the first aspect of the disclosure.
In a fourth aspect of the present disclosure, a computer-readable storage medium is provided. The computer readable storage medium has stored thereon a computer program executable by a processor to perform the method according to the first aspect of the present disclosure.
In a fifth aspect of the present disclosure, a computer program product is provided. The computer program product comprises computer executable instructions which, when executed by a processor, implement a method according to the first aspect of the present disclosure.
It should be understood that what is described in this summary is not intended to limit the critical or essential features of the embodiments of the disclosure nor to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The above and other features, advantages, and aspects of various implementations of the present disclosure will become more apparent hereinafter with reference to the following detailed description in conjunction with the accompanying drawings. In the drawings, wherein like or similar reference numerals denote like or similar elements, in which:
FIG. 1 illustrates a schematic diagram of an example environment in which embodiments of the present disclosure may be implemented;
FIG. 2 illustrates a block diagram of a data processing system, according to some embodiments of the present disclosure;
FIG. 3 illustrates an example diagram of a configuration interface, according to some embodiments of the present disclosure;
FIG. 4 illustrates a flow chart of a data processing process according to some embodiments of the present disclosure;
FIG. 5 illustrates a block diagram of a data processing apparatus according to some embodiments of the present disclosure; and
fig. 6 illustrates a block diagram of an electronic device in which one or more embodiments of the disclosure may be implemented.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the embodiments of the present disclosure have been illustrated in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather, embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
In describing embodiments of the present disclosure, the term "comprising" and its like should be taken to be open-ended, i.e., including, but not limited to. The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions are also possible below.
In this context, unless explicitly stated otherwise, performing a step "in response to a" does not mean that the step is performed immediately after "a", but may include one or more intermediate steps.
It will be appreciated that the data (including but not limited to the data itself, the acquisition, use, storage or deletion of the data) involved in the present technical solution should comply with the corresponding legal regulations and the requirements of the relevant regulations.
As mentioned previously, in some application scenarios, the database needs to be operated to process multiple data tables in the database. For example, one application scenario is to design a student management system using database technology. The student management system may include course management module, course selection management module, achievement management module, etc. For the lesson selection management module, the page displayed by the module for the user may include fields of student names, school numbers, courses and the like, and possible values corresponding to the fields. The fields and values of the fields presented in the page are derived from a plurality of data tables stored in a database, such as student tables, curriculum tables. This process involves how to query the data of the student's list, curriculum, in the database to be presented. Further, the user may assign values to the fields shown in the page, modify values of the fields, and so on. The process involves storing data such as values of fields generated by user operations in a data table. In summary, the scenario involves some operations on multiple data tables in the database.
In the current scheme, a developer realizes the display and storage of data of a plurality of data tables through handwriting Structured Query Language (SQL) according to the requirement. If the data in the data tables needs to be updated, the research and development personnel are required to write SQL according to the service requirement. This solution increases the workload of the developer and is less efficient.
In view of this, the present disclosure provides a scheme for data processing. In this scenario, a plurality of source data tables are determined from a database. The plurality of source data tables may include a first data table and a second data table. At least one destination field is determined from the plurality of source data tables, respectively. And generating configuration information of the target data table based on a preset corresponding relation between a first field in the at least one target field and a second field in the target data table. The configuration information indicates at least path information and visual description information of the second field. The path information of the second field may represent information associated with how the value of the second field is obtained. The value of the second field is obtained based on the value of the first field corresponding to the second field. Thus, the path information of the second field includes an identification of the first field corresponding to the second field, an identification of the source data table in which the first field is located, an identification of the second field, and an identification of the destination data table in which the second field is located. Then, based on the configuration information of the target data table, part or all of the fields in the target data table are visually presented. In this scheme, some or all of the fields in the target data table are presented based on configuration information of the target data table. The configuration information of the target data table includes path information of fields in the target data table. In this way, the corresponding source data table may be queried or updated based on the path information. The workload of the developer is reduced and the efficiency of operating the database is improved.
Example Environment
Example embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
FIG. 1 illustrates a schematic diagram of an example environment 100 in which embodiments of the present disclosure may be implemented. The environment 100 relates to a terminal device 110 and an electronic device 120. In embodiments of the present disclosure, terminal device 110 and electronic device 120 may communicate with each other. Any suitable wired or wireless communication means may be employed between terminal device 110 and electronic device 120. The present disclosure is not limited in this regard.
In some embodiments of the present disclosure, terminal device 110 is installed with an application program to which database technology is applied. Alternatively, the terminal device 110 is installed with a browser 111, and the user 115 can log in a program or system to which the database technology is applied in the form of a web page through the browser 111. Such as a student course selection management system, an enterprise management system, etc. A program or system to which the database technology is applied may present data provided by a data table in the database. The user 115 may operate on the data of the data sheet presented by these programs or systems. The user 115 operations further trigger writing or updating of data to the data tables in the database 125.
The electronic device 120 deploys a database 125. A plurality of data tables may be included in database 125. The data table in the database 125 may be written by the developer 130 according to actual needs. The data of the data table in the database 125 may be presented in a corresponding application installed in the terminal device 110 or in a corresponding web page, as desired.
For example, a practical requirement is to implement a student course selection management system in the terminal device 110. The developer 130 may write a plurality of data tables, such as student tables, curriculum tables, scoring tables, etc., in the electronic device 120 as desired. Further, the functionality of one or more modules in the student course selection management system may be implemented based on the plurality of data tables. For example, the function of the course selection management module in the student course selection management system may be implemented based on the student table and the curriculum schedule. As another example, the functionality of the performance management module may be implemented based on student lists, curriculum schedules, and scoring lists, and so forth. The user 115 can log in to the student course selection management system in a web page and select courses among the functions provided by the course selection management module. Operations such as selecting courses, modifying courses by the user 115 in the student course selection management system may further trigger writing data or updating data in the data tables of the database 125.
In some embodiments of the present disclosure, an association relationship between a plurality of data tables may be established. The association between the plurality of data tables is further embodied as an association between fields in the plurality of data tables. In the embodiment of the disclosure, the association relationship is described as path information of a field to be displayed, and then a corresponding data table is queried or updated based on the association relationship (e.g., path information). This process is described in detail below and is not described here.
In environment 100, terminal device 110 and electronic device 120 may be any type of device having computing capabilities, including terminal devices or server devices. The terminal device may be any type of mobile terminal, fixed terminal, or portable terminal, including a mobile handset, desktop computer, laptop computer, notebook computer, netbook computer, tablet computer, media computer, multimedia tablet, personal Communication System (PCS) device, personal navigation device, personal Digital Assistant (PDA), audio/video player, digital camera/camcorder, positioning device, television receiver, radio broadcast receiver, electronic book device, game device, or any combination of the preceding, including accessories and peripherals for these devices, or any combination thereof. The server devices may include, for example, computing systems/servers, such as mainframes, edge computing nodes, electronic devices in a cloud environment, and so forth.
In the example of fig. 1, in environment 100, terminal device 110 and electronic device 120 are different devices. In practical applications, the terminal device 110 and the electronic device 120 may also be the same device.
It should be understood that the structure and function of environment 100 are described for illustrative purposes only and are not meant to suggest any limitation as to the scope of the disclosure.
Example data processing System
FIG. 2 illustrates a data processing system 200 capable of implementing data processing functions in accordance with some embodiments of the present disclosure.
It is noted that the present disclosure is not limited to the modules/systems involved in data processing system 200, and that data processing system 200 may include more or fewer modules, and that modules/systems as shown in the figures may be added or replaced to achieve a similar purpose, and are considered to be included within the scope of the present disclosure.
Referring to FIG. 2, data processing system 200 includes data model manager 210. The data model manager 210 is configured to retrieve a data table from the database 290. Each data table in database 290 may correspond to a data model. In the example of FIG. 2, data model manager 210 has obtained four data tables from database 290. The four data tables correspond to data model 211, data model 212, data model 213, and data model 214, respectively. In embodiments of the present disclosure, the data table obtained by the data model manager 210 may be referred to as a source data table. To distinguish between different source data tables, the different source data tables may be referred to as a first data table, a second data table, etc. and so on in embodiments of the present disclosure.
In some embodiments of the present disclosure, configuration information for the target data table may be generated based on the source data table obtained by the data model manager 210. Some or all of the fields of the target data table may then be visually presented based on the configuration information of the target data table.
In the example of fig. 2, virtual view designer 220 may be configured to generate configuration information for a target data table. Virtual view 230 may represent the generated configuration information.
In some embodiments, virtual view designer 220 may determine at least one target field from a plurality of source data tables (e.g., a first data table and a second data table), respectively. Then, the configuration information of the target data table may be generated based on a preset correspondence between a first field in the at least one target field and a second field in the target data table.
In some embodiments of the present disclosure, the preset correspondence between the first field and the second field may be a relationship of a primary key and a foreign key. For example, the first field in the source data table is a primary key and the second field is a foreign key.
In some embodiments of the present disclosure, the configuration information indicates at least path information and visual description information of the second field. The path information of the second field may include information about how the value of the second field is obtained. In an embodiment of the disclosure, the value of the second field is obtained based on the value of the first field corresponding to the second field. For example, the possible value of the second field is the possible value of the first field. As one possible implementation form, the path information of the second field may include an identification of the first field corresponding to the second field, an identification of a source data table in which the first field is located, an identification of the second field, and an identification of a destination data table in which the second field is located. The visual description information of the second field may include description information corresponding to the second field when the second field is visually displayed, and the description information of the second field may be the same as or different from the description information of the first field. The visual description information of the second field may include a data type of the second field, such as a text type or a selection type, and may further include a name of the second field and remark information, which is a field name at the time of visual presentation. For example, in the course selection information table, the name of the second field is "sno", and the corresponding remark information is "number".
For example, the source data sheet includes a student sheet and a curriculum sheet. The target data table is a course selection information table. The fields in the course selection information table will be visually presented. The fields in the course selection information table are derived from the student table and the course table. Thus, to expose the fields in the course selection information table, the corresponding fields in the student table and the curriculum table need to be queried. The fields are presented based on descriptive information of the fields in the source data table. For example, the name and number fields in the course selection information table are derived from the student table and the course fields in the course selection information table are derived from the course table. Then, when the course selection information table is visually displayed, the fields in the student table and the course table and the corresponding descriptive information thereof can be queried for display.
As one example, table 1 is one possible example of configuration information of a target data table. It will be appreciated that table 1 is an example, and the configuration information of the target data table in practical application may include more or less information, such as the value of the second field, etc. The configuration information of the data table may be in other forms besides the form of a table, which will not be described here.
TABLE 1
In table 1, the identification of the first field, the identification of the source data table, the identification of the target data table, and the identification of the second field represent path information of the second field in the target data table as part of configuration information of the target data table. The type of the first field and the Chinese name of the first field can be used as a part of configuration information of the target data table to represent description information of a second field corresponding to the first field in the target data table.
Of course, some fields in the target data table may be fields set by the developer, not from the source data table already in the database. Such as a developer newly adding a "remark" field, etc.
In some embodiments, the developer may create the target data table in a manner that creates a view (create view). Further, configuration information of the target data table is automatically generated based on related statements or commands to create the view. For example, key information of the SQL statement used to create the view (e.g., identification of the source data table and selected fields) is read to generate configuration information of the target data table.
In some embodiments, a visual configuration interface is provided for a developer, in which the developer may perform some operations to trigger the generation of configuration information for the target data table.
As an example, referring to fig. 3, the electronic device 120 may present a configuration interface 300. The configuration interface 300 includes a first control for selecting or entering an identification of a source data table. In the example of fig. 3, the first control is a drop-down control in drop-down list 310. The user may select or input a source data table through the first control. In response to an operation for the first control, a source data table may be determined. That is, the data table selected by the developer from the drop-down list is taken as the source data table.
With continued reference to fig. 3. Further, the electronic device 120 may present at least one field included in the source data table at the configuration interface 300 in response to the selected source data table. For example, the fields included in the selected source data table are presented in the drop-down list 320. The developer may select a field from the drop down list 320 as the target field. Then, in response to a target field being selected from among the at least one field presented by the configuration interface 300, the at least one target field may be determined.
Further still referring to FIG. 3, the configuration interface 300 also includes a second control for selecting or entering a target data table. In the example of fig. 3, the second control is a drop-down control in drop-down list 330. In response to an operation for the second control, a target data table may be determined. That is, the data table selected by the developer from the drop-down list 330 is taken as the target data table.
Alternatively or additionally, an identification of the second field is also presented in the configuration interface 300. The identification of the second field may be generated directly based on the identification of the first field, e.g. the identification of the second field is identical to the identification of the first field. The identity of the second field may also be customized by the developer.
The data records that have been generated after operation of the configuration interface provided by the electronic device 120 by the developer are shown in fig. 3. For example, in the first record, the source data table is data table 1, the first field selected by the developer in data table 1 is field 1, the target data table is data table 4, and the field corresponding to field 1 in data table 4 is field a. Other records can be seen in fig. 3, and will not be described here again.
In some embodiments of the present disclosure, terminal device 110 may visually present some or all of the fields in the target data table based on the configuration information of the target data table. It can also be said that some fields of the source data table are queried based on the configuration information of the target data table, and then visually exposed. The fields of the show target data table are identical to those of the show source data table. The manner of visual presentation may be in any suitable manner. For example, it may be presented in a web page of a browser.
In some embodiments of the present disclosure, the browser 111 in the terminal device 110 may obtain the configuration information of the target data table from the electronic device 120, and then visually expose some or all of the fields in the target data table.
With continued reference to fig. 2, a page generator 240 (e.g., browser 111 in fig. 1) located in terminal device 110 may obtain virtual view 230 (i.e., configuration information of the target data table) from electronic device 120. Terminal device 110 may then generate a visualization page 250 based on the acquired virtual view 230.
After visually displaying some or all of the fields in the target data table, the user may perform operations such as adding, deleting, modifying, querying, etc. on the displayed data. These operations at the visualization page 250 may trigger updating the data model in the database 290, i.e., updating the data table to which the data model corresponds.
In the example of FIG. 2, page parser 260 may parse the user's 115 operations on visualization page 250, sending information contained in the parsed operations to SQL generator 270. The SQL generator 270 may generate SQL statements that update the data model 211, the data model 212, the data model 213, and the data model 214. The SQL executor 280 may execute the SQL generated by the SQL generator 270 to update the data model in the database 290.
In the example of FIG. 2, SQL generator 270 generates updated SQL against the four data models provided by data model manager 210 and updates the four data models in database 290 after execution by the SQL executor. In practice, some or all of the data models provided by the data model manager 210 may be updated. I.e. update part of the data table or the whole data table.
In some embodiments, the first page may be presented based on configuration information of the target data table. At least part or all of the fields in the target data table are visually displayed in the first page, and the values corresponding to part or all of the fields in the visual display area in the first page can be edited.
In the example of fig. 2, the first page may be the add-delete page 251 or the modify page 252. Editing the second field for the visual presentation may be, for example, assigning a value to the second field, modifying a value of the second field, deleting a possible value of the second field, adding a possible value of the second field, etc.
In some embodiments, the electronic device 120 may further respond to the editing operation for at least one target second field in some or all of the fields in the first page, and may automatically generate at least one operation instruction expressed in a preset executable language (e.g., SQL) based on the value of the at least one target second field corresponding to the editing operation and the configuration information of the target data table. I.e., without the need for a developer to write the SQL language. The electronic device 120 may then execute a preset executable language on the database to operate at least on the target data table based on the at least one operation indication.
In some embodiments, the editing operation for the target second field may be an operation of determining a target value from possible values of the target second field, the possible values of the target second field being obtained based on the values of the first field in the corresponding source data table. In this case, a first new increase instruction expressed in a preset executable language may be generated, the first new increase instruction being used to instruct to increase a data record in the target data table, and the value of the target second field in the increased data record being the target value.
For example, after the user 115 logs in to the course selection system, the Chinese name of the field "course" and the drop-down box are displayed in the page displayed in the course selection module provided by the course selection system. In the drop-down box are courses that may be selected by the user 115. The possible values of these courses as this field of the course may originate from a source data sheet called "curriculum". If user 115 selects the "Chinese" course and clicks on save on the page, this operation is validated. In this case, an SQL statement may be automatically generated, which indicates that the lesson selection record corresponding to the user 115 is added to the target data table of "lesson selection table". In the added course selection record, the value of the field of the course is 'Chinese'. The term "language" is used herein as a visual name for the value of the field of the course. It will be appreciated that in the database-stored data table, the field name of the field "course" is a name code (e.g., sc) predefined by the developer, and the value "Chinese" also has a custom value representation code (e.g., yuwen).
Alternatively or additionally, the editing operation for the target second field is an operation to increase the possible value. In this case, a second new addition instruction expressed in a preset executable language is generated, where the second new addition instruction is used to instruct that the possible value of the target first field corresponding to the target second field is increased in the target source data table, and the target first field is recorded in the target source data table; and generating a third new addition instruction expressed in a preset executable language, wherein the third new addition instruction is used for indicating that the possible value corresponding to the second field of the target is added in the target data table to be the possible value added.
Of course, it will be appreciated that the second and third newly added indications generated in this case may be the same newly added indication. That is, the same new indication indicates both the update of the target source data table and the update of the target data table.
For example, after the user 115 logs in the lesson selection system as an administrator, the lesson selection system provides a chinese name and a corresponding input box for the field "name" displayed in the page displayed in the user management module. The user 115 adds a name "BB" to the input box. Of course, the user 115 may further add information such as the corresponding number "123123". In this case, an SQL statement may be automatically generated that indicates that the data record is added to the "name table". The added data record may include the added names and numbers of the users 115 such as "BB", "123123". Accordingly, since the possible value of the second field (e.g., name) in the configuration information of the target data table comes from the possible value of the corresponding first field (e.g., name).
Alternatively or additionally, the editing operation for the second field of the object is an operation to delete a possible value of the object. In this case, a first deletion instruction expressed in a preset executable language may be generated, the first deletion instruction being used to instruct deletion of a possible target value among possible values of a target first field corresponding to a target second field in a target source data table in which the target first field is recorded. Further, a second deletion instruction expressed in a preset executable language may be generated, where the second deletion instruction is used to instruct to delete the target possible value corresponding to the target second field in the target data table.
The first deletion indication and the second deletion indication generated in this case may be the same deletion indication, similar to the previously mentioned new addition indication. That is, the same delete indication may indicate both the update target source data table and the update target data table.
Alternatively or additionally, the editing operation for the target second field is an operation to modify the value of the target second field in the generated data record. In this case, an update instruction expressed in a preset executable language may be generated, the update instruction being used to instruct updating of the value of the target second field in the target data record in the target data table to the modified value, the target data record being the generated data record.
For example, after the user 115 logs in to the course selection system, the selected course record of the user 115 is displayed in the page displayed in the course selection module provided by the course selection system. If the user modifies the value of "course" in the course selection record from "math" to "Chinese", in this case, the SQL statement is automatically generated to update the value of the course in the target data table (e.g., the course selection record table), for example, to "Chinese" from "math".
In some embodiments, a query operation for the target data table may also be responded, and based on the configuration information of the target data table, a part or all of fields and corresponding values of the target data table are visually displayed in a second page, where the second page is a visual detail page or list page for an existing data record in the target data table.
The source data table, target data table, fields, field values, editing operations, etc. described above, such as student tables, curriculum tables, selection tables, courses, languages, are exemplary, and other suitable examples may be applied to embodiments of the present disclosure.
Example procedure
Fig. 4 illustrates a flow chart of a process 400 of data processing according to some embodiments of the present disclosure. The process 400 may be implemented at the electronic device 120.
At block 410, the electronic device 120 determines a source data table from the database. In an embodiment of the present disclosure, the source data table includes at least a first data table and a second data table.
At block 420, the electronic device 120 determines at least one target field from the first data table and the second data table, respectively.
At block 430, the electronic device 120 generates configuration information for the target data table based on a preset correspondence between a first field in the at least one target field and a second field in the target data table. In an embodiment of the present disclosure, the configuration information indicates at least path information and visual description information of a second field, where the value of the second field is obtained based on the value of a first field corresponding to the second field, and the path information of the second field includes an identifier of the first field corresponding to the second field, an identifier of a source data table where the first field is located, an identifier of the second field, and an identifier of a target data table where the second field is located.
At block 440, the electronic device 120 visually exposes some or all of the fields in the target data table based on the configuration information of the target data table.
In some embodiments, visually exposing some or all of the fields in the target data table includes: based on the configuration information of the target data table, at least part or all of the fields in the target data table are visually displayed in the first page, and the values corresponding to part or all of the fields in the visual display in the first page can be edited.
In some embodiments, the process 400 further comprises: responding to the effectiveness of editing operation for at least one target second field in part or all of fields in a first page, and generating at least one operation instruction expressed in a preset executable language based on the value of the at least one target second field corresponding to the editing operation and the configuration information of a target data table; and executing a preset executable language on the database to operate at least the target data table based on the at least one operation instruction.
In some embodiments, the editing operation for the target second field is an operation of determining a target value from possible values of the target second field, where the possible values of the target second field are obtained based on the values of the first field in the corresponding source data table; and generating at least one operation instruction expressed in a preset executable language comprises: generating a first new instruction expressed in a preset executable language, wherein the first new instruction is used for indicating that a data record is added in a target data table, and the value of a target second field in the added data record is taken as a target value.
In some embodiments, the editing operation for the target second field is an operation to increase a possible value, and generating at least one operation instruction expressed in a preset executable language includes: generating a second newly added instruction expressed in a preset executable language, wherein the second newly added instruction is used for indicating that the possible value of the target first field corresponding to the target second field is increased in a target source data table, and the target first field is recorded in the target source data table; and generating a third new addition instruction expressed in a preset executable language, wherein the third new addition instruction is used for indicating that the possible value corresponding to the second field of the target is added in the target data table to be the possible value added.
In some embodiments, the editing operation for the second field of the object is an operation to delete a possible value of the object, and generating at least one operation instruction expressed in a preset executable language includes: generating a first deletion instruction expressed in a preset executable language, wherein the first deletion instruction is used for indicating that a possible target value is deleted in possible values of target first fields corresponding to target second fields in a target source data table, and the target first fields are recorded in the target source data table; and generating a second deletion instruction expressed in a preset executable language, wherein the second deletion instruction is used for indicating that the target possible value corresponding to the second field of the target is deleted in the target data table.
In some embodiments, the editing operation for the target second field is an operation to modify the value of the target second field in the generated data record, and generating at least one operation instruction expressed in a preset executable language includes: and generating an update instruction expressed in a preset executable language, wherein the update instruction is used for indicating that the value of a target second field in a target data record in an update target data table is a modified value, and the target data record is a generated data record.
In some embodiments, visually exposing some or all of the fields in the target data table further comprises: and responding to the query operation aiming at the target data table, and visually displaying part or all of fields and corresponding values of the target data table in a second page based on the configuration information of the target data table, wherein the second page is a visual detail page or list page aiming at the existing data records in the target data table.
In some embodiments, determining the source data table from the database comprises: presenting a configuration interface including a first control for selecting or entering an identification of a source data table; and determining a source data table in response to an operation for the first control.
In some embodiments, determining the at least one target field includes: in response to determining that the source data table is obtained, presenting at least one field included in the source data table at the configuration interface; and determining at least one target field in response to a target field of the at least one field presented by the configuration interface being selected.
In some embodiments, the configuration interface further includes a second control for selecting or entering the target data table, and the process 400 further includes: in response to an operation for the second control, a target data table is determined.
Example apparatus
Fig. 5 illustrates a block diagram of a data processing apparatus 500 according to some embodiments of the present disclosure. The apparatus 500 may be implemented in the electronic device 120. The various modules/components in apparatus 500 may be implemented in hardware, software, firmware, or any combination thereof.
The apparatus 500 comprises a data table determination module 510 configured to determine a source data table from a database, the source data table comprising at least a first data table and a second data table. The apparatus 500 further comprises a field determination module 520 configured to determine at least one target field from the first data table and the second data table, respectively. The apparatus 500 further includes a generating module 530 configured to generate configuration information of the target data table based on a preset correspondence between a first field in the at least one target field and a second field in the target data table, where the configuration information indicates at least path information and visual description information of the second field, and the value of the second field is obtained based on the value of the first field corresponding to the second field, and the path information of the second field includes an identifier of the first field corresponding to the second field, an identifier of a source data table where the first field is located, an identifier of the second field, and an identifier of the target data table where the second field is located. The apparatus 500 further comprises a visualization presentation module 540 configured to visually present some or all of the fields in the target data table based on configuration information of the target data table.
In some embodiments, the visual presentation module 540 is further configured to visually present at least some or all of the fields in the target data table in the first page based on the configuration information of the target data table, wherein the values corresponding to some or all of the fields in the visual presentation can be edited.
In some embodiments, the apparatus 500 further includes a data table operation module configured to generate at least one operation instruction expressed in a preset executable language based on a value of at least one target second field corresponding to the editing operation and configuration information of the target data table in response to the editing operation for at least one target second field of some or all of the fields being validated in the first page; and executing a preset executable language on the database to operate at least the target data table based on the at least one operation instruction.
In some embodiments, the editing operation for the target second field is an operation of determining a target value from possible values of the target second field, where the possible values of the target second field are obtained based on the values of the first field in the corresponding source data table; and the data table operation module is further configured to generate a first new indication expressed in a preset executable language, wherein the first new indication is used for indicating that the data record is added in the target data table, and the value of the second field of the target in the added data record is the target value.
In some embodiments, the editing operation for the target second field is an operation of increasing a possible value, and the data table operation module is further configured to generate a second new addition indication expressed in a preset executable language, where the second new addition indication is used to indicate that the possible value of the target first field corresponding to the target second field is increased in the target source data table, and the target first field is recorded in the target source data table; and generating a third new addition instruction expressed in a preset executable language, wherein the third new addition instruction is used for indicating that the possible value corresponding to the second field of the target is added in the target data table to be the possible value added.
In some embodiments, the editing operation for the target second field is an operation of deleting a target possible value, and the data table operation module is further configured to generate a first deletion instruction expressed in a preset executable language, where the first deletion instruction is used to indicate deleting the target possible value in the possible value of the target first field corresponding to the target second field in the target source data table, and the target first field is recorded in the target source data table; and generating a second deletion instruction expressed in a preset executable language, wherein the second deletion instruction is used for indicating that the target possible value corresponding to the second field of the target is deleted in the target data table.
In some embodiments, the editing operation for the target second field is an operation to modify a value of the target second field in the generated data record, and the data table operation module is further configured to generate an update indication expressed in a preset executable language, the update indication being used to indicate that the value of the target second field in the target data record in the target data table is the modified value, the target data record being the generated data record.
In some embodiments, the visualization presentation module 540 is further configured to, in response to a query operation for the target data table, visually present a portion or all of the fields and corresponding values of the target data table in a second page, based on the configuration information of the target data table, the second page being a visualization detail page or list page for existing data records in the target data table.
In some embodiments, the apparatus 500 further comprises a presentation module configured to present a configuration interface comprising a first control for selecting or entering an identification of the source data table; the data table determination module 510 is further configured to determine a source data table in response to an operation for the first control.
In some embodiments, the presentation module is further configured to present at least one field included in the source data table at the configuration interface in response to determining that the source data table is obtained; the field determination module 520 is further configured to determine at least one target field in response to a target field being selected from the at least one field presented by the configuration interface.
In some embodiments, the configuration interface further comprises a second control for selecting or entering the target data table, the data table determination module 510 further being configured to determine the target data table in response to an operation for the second control.
The elements included in apparatus 500 may be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units may be implemented using software and/or firmware, such as machine executable instructions stored on a storage medium. In addition to or in lieu of machine-executable instructions, some or all of the elements in apparatus 500 may be at least partially implemented by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that can be used include Field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standards (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
Fig. 6 illustrates a block diagram of an electronic device 600 in which one or more embodiments of the disclosure may be implemented. It should be understood that the electronic device 600 illustrated in fig. 6 is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein. The electronic device 600 shown in fig. 6 may be used to implement the electronic device 120 of fig. 1.
As shown in fig. 6, the electronic device 600 is in the form of a general-purpose electronic device. The components of electronic device 600 may include, but are not limited to, one or more processors or processing units 610, memory 620, storage 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. The processing unit 610 may be an actual or virtual processor and is capable of performing various processes according to programs stored in the memory 620. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to increase the parallel processing capabilities of electronic device 600.
The electronic device 600 typically includes a number of computer storage media. Such a medium may be any available medium that is accessible by electronic device 600, including, but not limited to, volatile and non-volatile media, removable and non-removable media. The memory 620 may be volatile memory (e.g., registers, cache, random Access Memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 630 may be a removable or non-removable media and may include machine-readable media such as flash drives, magnetic disks, or any other media that may be capable of storing information and/or data (e.g., training data for training) and may be accessed within electronic device 600.
The electronic device 600 may further include additional removable/non-removable, volatile/nonvolatile storage media. Although not shown in fig. 6, a magnetic disk drive for reading from or writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk may be provided. In these cases, each drive may be connected to a bus (not shown) by one or more data medium interfaces. Memory 620 may include a computer program product 625 having one or more program modules configured to perform the various methods or acts of the various embodiments of the disclosure.
The communication unit 640 enables communication with other electronic devices through a communication medium. Additionally, the functionality of the components of the electronic device 600 may be implemented in a single computing cluster or in multiple computing machines capable of communicating over a communication connection. Thus, the electronic device 600 may operate in a networked environment using logical connections to one or more other servers, a network Personal Computer (PC), or another network node.
The input device 650 may be one or more input devices such as a mouse, keyboard, trackball, etc. The output device 660 may be one or more output devices such as a display, speakers, printer, etc. The electronic device 600 may also communicate with one or more external devices (not shown), such as storage devices, display devices, etc., with one or more devices that enable a user to interact with the electronic device 600, or with any device (e.g., network card, modem, etc.) that enables the electronic device 600 to communicate with one or more other electronic devices, as desired, via the communication unit 640. Such communication may be performed via an input/output (I/O) interface (not shown).
According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, having stored thereon one or more computer instructions, wherein the one or more computer instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, there is also provided a computer program product tangibly stored on a non-transitory computer-readable medium and comprising computer-executable instructions that are executed by a processor to implement the method described above.
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer readable program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable medium having the instructions stored therein includes an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowcharts 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 implementations of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). 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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The foregoing description of implementations of the present disclosure has been provided for illustrative purposes, is not exhaustive, and is not limited to the implementations disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various implementations described. The terminology used herein was chosen in order to best explain the principles of each implementation, the practical application, or the improvement of technology in the marketplace, or to enable others of ordinary skill in the art to understand each implementation disclosed herein.

Claims (14)

1. A data processing method, comprising:
determining a source data table from a database, wherein the source data table at least comprises a first data table and a second data table;
determining at least one target field from the first data table and the second data table, respectively;
generating configuration information of a target data table based on a preset corresponding relation between a first field in at least one target field and a second field in the target data table, wherein the configuration information at least indicates path information and visual description information of the second field, the value of the second field is obtained based on the value of the first field corresponding to the second field, and the path information of the second field comprises an identifier of the first field corresponding to the second field, an identifier of the source data table where the first field is located, an identifier of the second field and an identifier of the target data table where the second field is located; and
Based on the configuration information of the target data table, part or all of the fields in the target data table are visually displayed.
2. The method of claim 1, the visually exposing some or all of the fields in the target data table comprising:
based on the configuration information of the target data table, at least part or all of fields in the target data table are visually displayed in a first page, and values corresponding to part or all of the fields in the visual display in the first page can be edited.
3. The method of claim 2, the method further comprising:
responding to the effective editing operation of at least one target second field in the partial or all fields in the first page, and generating at least one operation instruction expressed in a preset executable language based on the value of the at least one target second field corresponding to the editing operation and the configuration information of the target data table; and
based on the at least one operation instruction, the preset executable language is executed on the database to operate at least the target data table.
4. A method according to claim 3, wherein the editing operation for the target second field is an operation of determining a target value from possible values of the target second field, the possible values of the target second field being derived based on the value of the first field in the corresponding source data table;
And said generating at least one operational instruction expressed in a preset executable language comprises:
generating a first new indication expressed in a preset executable language, wherein the first new indication is used for indicating that a data record is added in the target data table, and the value of the target second field in the added data record is the target value.
5. A method according to claim 3, wherein the editing operation for the target second field is an operation to increase a possible value, and the generating at least one operation instruction expressed in a preset executable language comprises:
generating a second new addition instruction expressed in a preset executable language, wherein the second new addition instruction is used for indicating that the possible value of a target first field corresponding to the target second field is added in a target source data table, and the target source data table records the target first field; and
and generating a third new addition instruction expressed in a preset executable language, wherein the third new addition instruction is used for indicating that the possible value corresponding to the second field of the target is added in the target data table to be the possible value of the addition.
6. A method according to claim 3, wherein the editing operation for the target second field is an operation to delete a target possible value, and the generating at least one operation instruction expressed in a preset executable language comprises:
generating a first deletion instruction expressed in a preset executable language, wherein the first deletion instruction is used for indicating that the target possible value is deleted from possible values of a target first field corresponding to the target second field in a target source data table, and the target first field is recorded in the target source data table; and
and generating a second deletion instruction expressed in a preset executable language, wherein the second deletion instruction is used for indicating that the target possible value corresponding to the target second field is deleted in the target data table.
7. A method according to claim 3, wherein the editing operation for the target second field is an operation of modifying a target second field value in a generated data record, and the generating at least one operation indication expressed in a preset executable language comprises:
and generating an update instruction expressed in a preset executable language, wherein the update instruction is used for indicating to update the value of the target second field in a target data record in the target data table to be the modified value, and the target data record is the generated data record.
8. The method of claim 1, wherein visually exposing some or all of the fields in the target data table further comprises:
and responding to the query operation aiming at the target data table, and visually displaying part or all of fields and corresponding values of the target data table in a second page based on the configuration information of the target data table, wherein the second page is a visual detail page or list page aiming at the existing data records in the target data table.
9. The method of claim 1, wherein determining a source data table from a database comprises:
presenting a configuration interface comprising a first control for selecting or entering an identification of the source data table; and
the source data table is determined in response to an operation for the first control.
10. The method of claim 9, wherein determining at least one target field comprises:
in response to determining that the source data table is obtained, presenting at least one field included in the source data table at the configuration interface; and
at least one target field is determined in response to a target field of the at least one field presented by the configuration interface being selected.
11. The method of claim 9 or 10, the configuration interface further comprising a second control for selecting or entering the target data table, the method further comprising:
the target data table is determined in response to an operation for the second control.
12. A data processing apparatus comprising:
a data table determination module configured to determine a source data table from a database, the source data table comprising at least a first data table and a second data table;
a field determination module configured to determine at least one target field from the first data table and the second data table, respectively;
the generating module is configured to generate configuration information of the target data table based on a preset corresponding relation between a first field in the at least one target field and a second field in the target data table, wherein the configuration information at least indicates path information and visual description information of the second field, the value of the second field is obtained based on the value of the first field corresponding to the second field, and the path information of the second field comprises an identifier of the first field corresponding to the second field, an identifier of the source data table where the first field is located, an identifier of the second field and an identifier of the target data table where the second field is located; and
And the visual display module is configured to visually display part or all of the fields in the target data table based on the configuration information of the target data table.
13. An electronic device, comprising:
at least one processing unit; and
at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, which when executed by the at least one processing unit, cause the electronic device to perform the method of any one of claims 1 to 12.
14. A computer readable storage medium having stored thereon a computer program executable by a processor to implement the method of any of claims 1 to 12.
CN202311246426.0A 2023-09-25 2023-09-25 Data processing method, apparatus, device, storage medium, and program product Pending CN117271514A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311246426.0A CN117271514A (en) 2023-09-25 2023-09-25 Data processing method, apparatus, device, storage medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311246426.0A CN117271514A (en) 2023-09-25 2023-09-25 Data processing method, apparatus, device, storage medium, and program product

Publications (1)

Publication Number Publication Date
CN117271514A true CN117271514A (en) 2023-12-22

Family

ID=89221006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311246426.0A Pending CN117271514A (en) 2023-09-25 2023-09-25 Data processing method, apparatus, device, storage medium, and program product

Country Status (1)

Country Link
CN (1) CN117271514A (en)

Similar Documents

Publication Publication Date Title
CN109992589B (en) Method, device, server and medium for generating SQL (structured query language) statements based on visual page
US9047346B2 (en) Reporting language filtering and mapping to dimensional concepts
CN108762743B (en) Data table operation code generation method and device
US10678519B2 (en) Code generation for isomorphic data fetching
MX2013014800A (en) Recommending data enrichments.
US20170212930A1 (en) Hybrid architecture for processing graph-based queries
US20120158742A1 (en) Managing documents using weighted prevalence data for statements
US20220229769A1 (en) Test automation systems and methods using logical identifiers
CN110019111B (en) Data processing method, data processing device, storage medium and processor
CN109299352B (en) Method and device for updating website data in search engine and search engine
CN107391528B (en) Front-end component dependent information searching method and equipment
CN110720097A (en) Functional equivalence of tuples and edges in graph databases
US6212533B1 (en) Hyper-media document management system having navigation mechanism
CN111984659B (en) Data updating method, device, computer equipment and storage medium
CN113934786A (en) Implementation method for constructing unified ETL
CN110633258B (en) Log insertion method, device, computer device and storage medium
CN111563094A (en) Data query method and device, electronic equipment and computer-readable storage medium
US20210049158A1 (en) Natural language interface to databases
CN117271514A (en) Data processing method, apparatus, device, storage medium, and program product
CN115617338A (en) Method and device for quickly generating service page and readable storage medium
US20190095538A1 (en) Method and system for generating content from search results rendered by a search engine
US10732946B2 (en) Simulation-based code duplication
CN110737642B (en) Database information analysis method, database information analysis device, computer device and storage medium
CN111221817B (en) Service information data storage method, device, computer equipment and storage medium
CN113760654B (en) System processing method, device, equipment and storage medium

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