A DSL-based view processing method, system, device and storage medium

By using a DSL-based view processing method, users can edit filtering logic in natural language, construct DSL query statements, and automatically render views, solving the problem of large development workload in traditional DSLs and enabling fast view rendering and style switching.

CN115827670BActive Publication Date: 2026-02-24GUANGDONG HENGQIN SHUSHUSHUO STORY INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211570381.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-08
Publication Date
2026-02-24
Estimated Expiration
2042-12-08

AI Technical Summary

Technical Problem

Traditional DSLs are not conducive to users quickly querying data and require developers to pre-configure page effects, resulting in a large amount of development work.

Method used

The DSL-based view processing method allows users to edit filtering logic using natural language, construct DSL query statements, and automatically render views without developer intervention.

Benefits of technology

It enables fast view rendering, reduces front-end development workload, and allows users to quickly define and switch view styles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115827670B_ABST
    Figure CN115827670B_ABST
Patent Text Reader

Abstract

The application discloses a view processing method, system and device based on DSL, and a storage medium, and the method comprises the following steps: constructing a DSL query statement according to view configuration information input by a user, and executing the DSL query statement to query library table data and obtain a data query result; wherein the view configuration information comprises field filtering logic information and multi-field combination logic information; matching the data query result with a preselected view component to obtain a data dimension mapping relationship; rendering the preselected view component according to the data dimension mapping relationship, and displaying a view rendering result; the application supports a user in editing filtering logic by using a natural language, and a back end automatically analyzes a word meaning to translate a DSL query statement, so that a data query result is returned based on the DSL query statement, a visual page is automatically rendered, quick view rendering is realized, a developer does not need to participate, and front-end development is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a view processing method, system, device and storage medium based on DSL. Background Technology

[0002] DSL (Domain Specified Language) refers to a domain-specific language designed to address the difficulties in requirements gathering caused by inconsistencies in language models between users and builders during the early stages of system (including hardware and software) development. DSLs are specialized tools designed during the requirements analysis phase to resolve mutual understanding difficulties between the requirements describer and the builders. However, traditional DSLs are not conducive to users quickly querying data. If a page-based approach is required, developers need to pre-configure page effects and construct different query logic components, resulting in a significant development workload. Summary of the Invention

[0003] This invention provides a DSL-based view processing method, system, device, and storage medium that allows users to edit filtering logic using natural language, enables rapid view rendering, eliminates the need for developer intervention, and reduces front-end development workload.

[0004] In a first aspect, embodiments of the present invention provide a view processing method based on a DSL, comprising:

[0005] Based on the view configuration information input by the user, a DSL query statement is constructed and executed to query the database table data to obtain the data query results; wherein, the view configuration information includes field filtering logic information and multi-field combination logic information;

[0006] The data query results are matched with pre-selected view components to obtain the data dimension mapping relationship;

[0007] Based on the data dimension mapping relationship, the pre-selected view components are rendered and the view rendering results are displayed.

[0008] As an improvement to the above solution, the step of matching the data query results with pre-selected view components to obtain data dimension mapping relationships includes:

[0009] Parse the field structure of the data query results to obtain metadata information; wherein, the metadata information includes field types;

[0010] Parse the attribute parameters of the selected view component; wherein, the attribute parameters include dimension field types;

[0011] The metadata information is matched with the attribute parameters to obtain the data dimension mapping relationship.

[0012] As an improvement to the above solution, the DSL-based view processing method further includes:

[0013] In response to the user's selection of the dimension field type for the currently rendered view, the corresponding view component is adjusted; the dimension field type of the adjusted view component is different from that of the view component before adjustment.

[0014] The adjusted view components and the data query results are re-matched, and the data dimension mapping relationship is modified.

[0015] Based on the modified data dimension mapping relationship, render the modified view component and display the view rendering result.

[0016] As an improvement to the above solution, the step of constructing a DSL query statement based on the view configuration information input by the user includes:

[0017] Keyword validity verification is performed on the field filtering logic information and the multi-field combination logic information;

[0018] When the keyword validity check is passed, the field filtering logic information and the multi-field combination logic information are split into fields, and the resulting field filtering logic is converted into a DSL query statement.

[0019] As an improvement to the above solution, the DSL-based view processing method further includes:

[0020] In response to a user's click on any object in the currently rendered view, obtain the data identifier corresponding to the object;

[0021] The data content of the object is retrieved from the database table data based on the data identifier;

[0022] Based on the metadata information and the pre-configured style DSL statement, the field filling style is rendered using the queried data content to obtain the detailed data page and display it on the interface where the currently rendered view is located.

[0023] As an improvement to the above solution, the DSL-based view processing method further includes:

[0024] In response to a user's modification operation on the data details page, obtain the modified content of the data details page and the data identifier of the object corresponding to the data details page;

[0025] Construct a DSL update statement based on the data identifier of the object corresponding to the data details page;

[0026] The DSL update statement is executed to update the data in the database table.

[0027] Secondly, embodiments of the present invention provide a view processing system based on a DSL, comprising:

[0028] The data query module is used to construct a DSL query statement based on the view configuration information input by the user, and execute the DSL query statement to query the database table data to obtain the data query results;

[0029] The data matching module is used to match the data query results with pre-selected view components to obtain data dimension mapping relationships;

[0030] The view rendering module is used to render pre-selected view components according to the data dimension mapping relationship and display the view rendering results.

[0031] As an improvement to the above solution, the data matching module includes:

[0032] The first field parsing unit is used to parse the field structure of the data query result to obtain metadata information; wherein, the metadata information includes field types;

[0033] The second field parsing unit is used to parse the attribute parameters of the selected view component; wherein, the attribute parameters include dimension field types;

[0034] The field information matching unit is used to match the metadata information with the attribute parameters to obtain the data dimension mapping relationship.

[0035] Thirdly, embodiments of the present invention provide a DSL-based view processing device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the DSL-based view processing method as described in any one of the first aspects.

[0036] Fourthly, embodiments of the present invention provide a computer-readable storage medium, the computer-readable storage medium including a computer program stored thereon, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the DSL-based view processing method as described in any one of the first aspects.

[0037] Compared to existing technologies, the beneficial effects of this invention are as follows: Based on user-inputted view configuration information, including field filtering logic information and multi-field combination logic information, a DSL query statement is constructed, and the DSL query statement is executed to query the database table data to obtain data query results; the data query results are matched with pre-selected view components to obtain data dimension mapping relationships; according to the data dimension mapping relationships, the pre-selected view components are rendered, and the view rendering results are displayed; this invention supports users to edit filtering logic using natural language, and the backend automatically parses and translates the DSL query statement, thereby returning data query results based on the DSL query statement and automatically rendering the visualization page, achieving fast view rendering without the need for developer intervention, thus reducing front-end development workload. Attached Figure Description

[0038] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a flowchart of a view processing method based on DSL provided in an embodiment of the present invention;

[0040] Figure 2 This is a schematic diagram of a DSL-based view processing system provided in an embodiment of the present invention;

[0041] Figure 3 This is a schematic diagram of a DSL-based view processing device provided in an embodiment of the present invention. Detailed Implementation

[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0043] Example 1

[0044] Please see Figure 1 This is a flowchart of a DSL-based view processing method provided in an embodiment of the present invention. The method specifically includes:

[0045] S1: Based on the view configuration information input by the user, construct a DSL query statement and execute the DSL query statement to query the database table data to obtain the data query results; wherein, the view configuration information includes field filtering logic information and multi-field combination logic information;

[0046] The field filtering logic information and multi-field combination logic information are data filtering conditions entered by the user on the user interface, used to filter data in the database table. These include operation type, field name, operator, logical operator, and condition combination logic. A view dataset can be constructed using these field filtering logic information and multi-field combination logic information.

[0047] The operation types include filtering, hiding, sorting, freezing, and grouping. These functions define the data content in the view and configure how the dataset is displayed. Examples include sorting by reimbursement amount, grouping by reimbursement department, freezing the claimant in the first column, hiding reimbursement invoices, and not displaying approved data. Different operation types indicate different view display effects for different datasets. Operators, logical operators, and conditional combination logic are used to construct filtering logic. For example, operators include equal to, greater than, and contain; logical operators include AND, OR, and NOT; and conditional combination logic indicates how multiple fields can be combined for filtering.

[0048] Example: Setting field filtering logic information:

[0049] 1. Date of birth: The time range is: 20220701-20220930;

[0050] 2. Keyword fingerprint: equal to any of the following values: 478943eff7d, f4135e12, ..., 1820c012c;

[0051] 3. Other: equal to any of the following values: {}, {"uid":""}, {"plate_name":"technology"}, {"terminal":"APP"};

[0052] 4. Year of birth: All records;

[0053] 5. Content: Search criteria: XXX (keywords);

[0054] Based on the filtering conditions set above, the custom multi-field combination logic information is 1AND 2AND 3. At this time, a DSL query statement can be constructed based on the above birth date, keyword fingerprint and other three filtering logics to query and filter the database table data, and return the data query results in JSON format.

[0055] S2: Match the data query results with the pre-selected view components to obtain the data dimension mapping relationship;

[0056] For example, the system pre-configures several view components, such as icon view components, including but not limited to line charts, bar charts, pie charts, scatter plots, candlestick charts, radar charts, box-and-whisker plots, heatmaps, relationship diagrams, path diagrams, tree diagrams, rectangular tree diagrams, sunburst charts, mulberry charts, funnel charts, and dashboards; and dashboard view components, including but not limited to basic tables, Gantt charts, calendars, photo albums, dashboard charts, forms, and list views. Furthermore, the attribute parameters of each view component can be pre-set by the system or user-defined. These parameters can be directly retrieved and used during data view rendering, or adjusted before use. The attribute parameters include the dimension field types of the corresponding view and their corresponding metadata, the assembly method of different row and column datasets, etc.

[0057] Taking a Gantt chart as an example, the system's default dimension field types are start and end time. Its metadata must be time-based, and the end time must be greater than the start time. Other attribute parameters include task bar color and the main object (person, event, thing). Taking a bar chart as an example, the system's default dimension field types are: the vertical axis is a numeric field, the horizontal axis is a text field (not empty), and the bars are blue.

[0058] S3: Render the pre-selected view components according to the data dimension mapping relationship, and display the view rendering result.

[0059] Taking an expense reimbursement form as an example, suppose a user needs to know the distribution of cities with reimbursement amounts exceeding 200 yuan. The user sets the field filtering logic and multi-field combination logic to "reimbursement expenses exceeding 200 yuan" on the user interface and selects a pie chart as the view component. The system then converts these data filtering conditions into a DSL query statement and executes it, filtering out data that meets the "reimbursement expenses exceeding 200 yuan" criterion from the expense reimbursement form—the data query results. The system then matches the data query results with the selected view component's field types to obtain a data dimension mapping relationship, and renders and displays the selected view component based on this mapping relationship. In this embodiment of the invention, the page provides rich components, allowing users to edit filtering logic using natural language. The backend automatically parses and translates the DSL query statement, returning the data query results based on the DSL query statement and automatically rendering the visualization page. This achieves rapid view rendering without developer intervention, reducing front-end development workload. It also supports users in quickly defining views and switching view styles.

[0060] In one optional embodiment, matching the data query results with pre-selected view components to obtain a data dimension mapping relationship includes:

[0061] Parse the field structure of the data query results to obtain metadata information; wherein, the metadata information includes field types;

[0062] Parse the attribute parameters of the selected view component; wherein, the attribute parameters include dimension field types;

[0063] The metadata information is matched with the attribute parameters to obtain the data dimension mapping relationship.

[0064] In an optional embodiment, the DSL-based view processing method further includes:

[0065] In response to the user's selection of the dimension field type for the currently rendered view, the corresponding view component is adjusted; the dimension field type of the adjusted view component is different from that of the view component before adjustment.

[0066] The adjusted view components and the data query results are re-matched, and the data dimension mapping relationship is modified.

[0067] Based on the modified data dimension mapping relationship, render the modified view component and display the view rendering result.

[0068] It should be noted that the metadata information also includes field length, data volume, and semantic information; the dimension field type indicates the field requirements of the view, and the attribute parameters also include key style configuration attributes, indicating other view configurations, such as the bar color of a bar chart and the task bar color of a Gantt chart. By matching the dimension field types of the parsed view component with the field types of the data query results, a data dimension mapping relationship is automatically generated. Taking an expense reimbursement statistics table, with a calendar chart as the target view component for rendering, the date field of the calendar chart matches the reimbursement date field of the expense reimbursement statistics table, and then the date field of the calendar chart displays the reimbursement date data. Users can also reconstruct the DSL query statement based on business needs and the mapping fields in the data dimension mapping relationship corresponding to the calendar chart, automatically rendering the data page, for example, switching "date field - reimbursement date" to "date field - reimbursement approval time" to display the data. In this embodiment of the invention, the data dimension mapping relationship between data and view can be modified by adjusting the dimension field type of the view component, thereby adjusting the dimension information displayed in the view and solving the problems of fixed views and poor interactivity in traditional BI tools and business systems.

[0069] In an optional embodiment, constructing a DSL query statement based on user-inputted view configuration information includes:

[0070] Keyword validity verification is performed on the field filtering logic information and the multi-field combination logic information;

[0071] When the keyword validity check is passed, the field filtering logic information and the multi-field combination logic information are split into fields, and the resulting field filtering logic is converted into a DSL query statement.

[0072] In this embodiment of the invention, keyword validity verification mainly involves determining whether the field filtering logic information and the multi-field combination logic information contain at least one of the following: operators, logical operators, and conditional combination operators. If they do, the keyword validity verification is confirmed to have passed; otherwise, the user is prompted to re-enter the view configuration information. After passing the keyword validity verification, the field filtering logic information and the multi-field combination logic information are split into target fields, filter fields, summary fields, etc. The target field indicates the non-hidden field configured on the page, i.e., the data column that the view can display; the filter field indicates the filter field selected on the page; and the summary field indicates which field is used for statistical analysis. The split fields are then used as field filtering logic, escaped into Boolean query statements, and finally parsed into a series of executable DSL query statements.

[0073] In an optional embodiment, the DSL-based view processing method further includes:

[0074] In response to a user's click on any object in the currently rendered view, obtain the data identifier corresponding to the object;

[0075] The data content of the object is retrieved from the database table data based on the data identifier;

[0076] Based on the metadata information and the pre-configured style DSL statement, the field filling style is rendered using the queried data content to obtain the detailed data page and display it on the interface where the currently rendered view is located.

[0077] In this embodiment of the invention, a pie chart is used as an example. The sectors in the pie chart represent cities, and the area of ​​each sector represents the percentage of cities in the total number of cities. When a user clicks on a city within a sector of the pie chart, a list of all data for that city is displayed. Clicking on a specific data entry in the list displays the details of that data entry. The data identifier is a unique identifier for each data entry. When a user queries the detailed data page or modifies / edits the data, they can quickly locate the data in the database based on this unique data identifier.

[0078] In an optional embodiment, the DSL-based view processing method further includes:

[0079] In response to a user's modification operation on the data details page, obtain the modified content of the data details page and the data identifier of the object corresponding to the data details page;

[0080] Construct a DSL update statement based on the data identifier of the object corresponding to the data details page;

[0081] The DSL update statement is executed to update the data in the database table.

[0082] In this embodiment of the invention, data content can be directly modified on the aforementioned detailed data page. The system will automatically submit the modification to the database based on the modified content and the current data identifier. Data can also be added or deleted directly. In this embodiment of the invention, no developer intervention is required. Users can adjust the content, style, and related display components of the visualization page at any time. Data can be edited directly on the page, and the system automatically converts DSL statements for data editing operations, solving the problem that conventional visualization pages cannot edit data.

[0083] Compared to existing technologies, the beneficial effects of this invention are as follows: Based on user-inputted view configuration information, including field filtering logic information and multi-field combination logic information, a DSL query statement is constructed, and the DSL query statement is executed to query the database table data to obtain data query results; the data query results are matched with pre-selected view components to obtain data dimension mapping relationships; according to the data dimension mapping relationships, the pre-selected view components are rendered, and the view rendering results are displayed; this invention supports users to edit filtering logic using natural language, and the backend automatically parses and translates the DSL query statement, thereby returning data query results based on the DSL query statement and automatically rendering the visualization page, achieving fast view rendering without the need for developer intervention, thus reducing front-end development workload.

[0084] Example 2

[0085] Please see Figure 2 This invention provides a DSL-based view processing system, comprising:

[0086] Data query module 1 is used to construct a DSL query statement based on the view configuration information input by the user, and execute the DSL query statement to query the database table data to obtain the data query results;

[0087] Data matching module 2 is used to match the data query results with pre-selected view components to obtain data dimension mapping relationships;

[0088] The view rendering module 3 is used to render pre-selected view components according to the data dimension mapping relationship and display the view rendering results.

[0089] In one optional embodiment, the data matching module includes:

[0090] The first field parsing unit is used to parse the field structure of the data query result to obtain metadata information; wherein, the metadata information includes field types;

[0091] The second field parsing unit is used to parse the attribute parameters of the selected view component; wherein, the attribute parameters include dimension field types;

[0092] The field information matching unit is used to match the metadata information with the attribute parameters to obtain the data dimension mapping relationship.

[0093] In an optional embodiment, the DSL-based view processing system further includes:

[0094] The dimension field adjustment module is used to adjust the corresponding view component in response to the user's selection of the dimension field type of the currently rendered view; the dimension field type of the adjusted view component is different from that of the view component before adjustment.

[0095] The data dimension mapping relationship adjustment module is used to re-match the adjusted view components and the data query results, and modify the data dimension mapping relationship.

[0096] The view adjustment module is used to render modified view components based on the modified data dimension mapping relationship and display the view rendering result.

[0097] In an optional embodiment, the data query module 1 includes:

[0098] The verification unit is used to verify the keyword validity of the field filtering logic information and the multi-field combination logic information.

[0099] The DSL query statement conversion unit is used to split the field filtering logic information and the multi-field combination logic information when the keyword validity verification is passed, and convert the split field filtering logic into a DSL query statement.

[0100] In an optional embodiment, the DSL-based view processing system further includes:

[0101] The data identifier acquisition module is used to acquire the data identifier corresponding to any object in the currently rendered view in response to the user's click operation on any object in the view.

[0102] The query module is used to query the data content of the object from the database table data based on the data identifier;

[0103] The data detail page rendering module is used to render the field filling style using the queried data content based on the metadata information and the pre-configured style DSL statement, to obtain the data detail page and display it on the interface where the currently rendered view is located.

[0104] In an optional embodiment, the DSL-based view processing system further includes:

[0105] The data acquisition module is modified to respond to the user's modification operation on the data details page, and to acquire the modified content of the data details page and the data identifier of the object corresponding to the data details page.

[0106] The DSL update statement construction module is used to construct a DSL update statement based on the data identifier of the object corresponding to the data details page.

[0107] The database update module is used to execute the DSL update statement to update the data in the database table.

[0108] It should be noted that the principle and technical effects of the DSL-based view processing system described in this embodiment of the invention are the same as those in Embodiment 1, and will not be repeated here.

[0109] Example 3

[0110] See Figure 3 This is a schematic diagram of a DSL-based view processing device provided in an embodiment of the present invention. Figure 3 As shown, the DSL-based video processing device includes: at least one processor 11, such as a CPU; at least one network interface 14 or other user interface 13; memory 15; and at least one communication bus 12 for enabling communication between these components. The user interface 13 may optionally include a USB interface and other standard interfaces, or a wired interface. The network interface 14 may optionally include a Wi-Fi interface and other wireless interfaces. The memory 15 may include high-speed RAM, or it may also include non-volatile memory, such as at least one disk drive. The memory 15 may optionally include at least one storage device located remotely from the aforementioned processor 11.

[0111] In some implementations, memory 15 stores executable modules or data structures, or subsets thereof, or extended sets thereof:

[0112] Operating system 151 contains various system programs used to implement various basic business functions and handle hardware-based tasks;

[0113] Program 152.

[0114] Specifically, the processor 11 is used to call the program 152 stored in the memory 15 to execute the DSL-based view processing method described in the above embodiments, for example... Figure 1 The steps S1-S3 are shown. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above-described device embodiments. For example, the data query module is used to construct a DSL query statement based on the view configuration information input by the user, and execute the DSL query statement to query the database table data to obtain the data query result; the data matching module is used to match the data query result with the pre-selected view components to obtain the data dimension mapping relationship; and the view rendering module is used to render the pre-selected view components according to the data dimension mapping relationship and display the view rendering result.

[0115] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the DSL-based view processing device.

[0116] The DSL-based view processing device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The DSL-based view processing device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the schematic diagram is merely an example of a DSL-based view processing device and does not constitute a limitation on the DSL-based view processing device; it may include more or fewer components than illustrated, or combine certain components, or use different components.

[0117] The processor 11 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. The processor 11 is the control center of the DSL-based view processing device, connecting all parts of the DSL-based view processing device via various interfaces and lines.

[0118] The memory 15 can be used to store the computer programs and / or modules. The processor 11 implements various functions of the DSL-based view processing device by running or executing the computer programs and / or modules stored in the memory and calling data stored in the memory. The memory 15 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 15 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0119] Wherein, if the modules / units integrated in the DSL-based view processing device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0120] Example 4

[0121] This invention provides a computer-readable storage medium, which includes a computer program stored thereon. When the computer program is executed, it controls the device where the computer-readable storage medium is located to perform a DSL-based view processing method as described in any one of the embodiments in Example 1.

[0122] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0123] The above description is a preferred embodiment of the present invention. It should be noted that, for those skilled in the art, many improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A view processing method based on DSL, characterized in that, include: Based on the view configuration information input by the user, a DSL query statement is constructed and executed to query the database table data to obtain the data query results; wherein, the view configuration information includes field filtering logic information and multi-field combination logic information; The field filtering logic information and multi-field combination logic information are data filtering conditions entered by the user on the user interface, used to filter data in the database table; wherein, the field filtering logic information and multi-field combination logic information include operation type, field name, operator, logical operator, and condition combination logic; a view dataset can be constructed through the field filtering logic information and multi-field combination logic information; The data query results are matched with pre-selected view components to obtain the data dimension mapping relationship; Based on the data dimension mapping relationship, render the pre-selected view components and display the view rendering results; The step of matching the data query results with pre-selected view components to obtain data dimension mapping relationships includes: Parse the field structure of the data query results to obtain metadata information; wherein, the metadata information includes field types; Parse the attribute parameters of the selected view component; wherein, the attribute parameters include dimension field types; The data dimension mapping relationship is obtained by matching the field types of the metadata information with the dimension field types of the attribute parameters. The step of constructing a DSL query statement based on the view configuration information input by the user includes: Keyword validity verification is performed on the field filtering logic information and the multi-field combination logic information; When the keyword validity check is passed, the field filtering logic information and the multi-field combination logic information are split into fields, and the split field filtering logic is converted into a DSL query statement. The keyword validity check mainly determines whether the field filtering logic information and the multi-field combination logic information contain at least one of the following: operators, logical operators, and condition combination operators. If they do, the keyword validity check is confirmed to be passed. The field filtering logic information and the multi-field combination logic information are decomposed into target fields, filter fields, and summary fields. The target field indicates the non-hidden field configured on the page; the filter field indicates the filter field selected on the page; and the summary field indicates the field for user statistics.

2. The DSL-based view processing method as described in claim 1, characterized in that, Also includes: In response to the user's selection of the dimension field type for the currently rendered view, the corresponding view component is adjusted; the dimension field type of the adjusted view component is different from that of the view component before adjustment. The adjusted view components and the data query results are re-matched, and the data dimension mapping relationship is modified. Based on the modified data dimension mapping relationship, render the modified view component and display the view rendering result.

3. The DSL-based view processing method as described in claim 1, characterized in that, Also includes: In response to a user's click on any object in the currently rendered view, obtain the data identifier corresponding to the object; The data content of the object is retrieved from the database table data based on the data identifier; Based on the metadata information and the pre-configured style DSL statement, the field filling style is rendered using the queried data content to obtain the detailed data page and display it on the interface where the currently rendered view is located.

4. The DSL-based view processing method as described in claim 3, characterized in that, Also includes: In response to a user's modification operation on the data details page, obtain the modified content of the data details page and the data identifier of the object corresponding to the data details page; Construct a DSL update statement based on the data identifier of the object corresponding to the data details page; The DSL update statement is executed to update the data in the database table.

5. A view processing system based on DSL, characterized in that, include: The data query module is used to construct a DSL query statement based on the view configuration information input by the user, and execute the DSL query statement to query the database table data to obtain the data query results; wherein, the view configuration information includes field filtering logic information and multi-field combination logic information; The field filtering logic information and multi-field combination logic information are data filtering conditions entered by the user on the user interface, used to filter data in the database table; wherein, the field filtering logic information and multi-field combination logic information include operation type, field name, operator, logical operator, and condition combination logic; a view dataset can be constructed through the field filtering logic information and multi-field combination logic information; The data matching module is used to match the data query results with pre-selected view components to obtain data dimension mapping relationships; The view rendering module is used to render pre-selected view components according to the data dimension mapping relationship and display the view rendering results; The data matching module includes: The first field parsing unit is used to parse the field structure of the data query result to obtain metadata information; wherein, the metadata information includes field types; The second field parsing unit is used to parse the attribute parameters of the selected view component; wherein, the attribute parameters include dimension field types; The field information matching unit is used to perform conformity matching between the field types of the metadata information and the dimension field types of the attribute parameters to obtain the data dimension mapping relationship; The data query module includes: The verification unit is used to verify the keyword validity of the field filtering logic information and the multi-field combination logic information. The DSL query statement conversion unit is used to split the field filtering logic information and the multi-field combination logic information when the keyword validity verification is passed, and convert the split field filtering logic into a DSL query statement. The keyword validity check mainly determines whether the field filtering logic information and the multi-field combination logic information contain at least one of the following: operators, logical operators, and condition combination operators. If they do, the keyword validity check is confirmed to be passed. The field filtering logic information and the multi-field combination logic information are decomposed into target fields, filter fields, and summary fields. The target field indicates the non-hidden field configured on the page; the filter field indicates the filter field selected on the page; and the summary field indicates the field for user statistics.

6. A DSL-based view processing device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the DSL-based view processing method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program that, when the computer program is executed, controls the device on which the computer-readable storage medium is located to perform the DSL-based view processing method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Data query method and device based on rule configuration, storage medium and terminal

    CN111259037A

  • Dynamic form generation method based on DSL layout engine

    CN112199626A

  • Data conversion method and device based on DSL

    CN113656475A

  • Business index driven data visualization preview system of medical industry

    CN115168480A