Page generation method, device, equipment and storage medium

By analyzing and generating application system form pages, the controls are directly connected to the database table fields, solving the problem that developers need to write a large amount of code in the existing technology, achieving fast and accurate page generation, and reducing development complexity and labor costs.

CN113076104BActive Publication Date: 2025-02-18BOE TECHNOLOGY GROUP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110484338.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-30
Publication Date
2025-02-18
Estimated Expiration
2041-04-30

AI Technical Summary

Technical Problem

In the prior art, the form pages of the application system require front-end and back-end developers to write a large amount of code, which is very labor-intensive and prone to errors. In addition, when adding or modifying database tables, the front-end code needs to be modified at the same time, which can easily lead to data errors and increase System development and maintenance complexity.

Method used

By obtaining configuration information, including the page data of the target page and the database table path, parsing the database table path to determine the database table field information corresponding to the control, generating controls based on the field information and preset data attribute rules, and typesetting and rendering the target page , generate the final target page.

Benefits of technology

Without the need for front-end developers to write and modify a large amount of code, they directly connect controls with database table fields, and automatically and quickly generate controls and pages corresponding to database table field information, reducing the workload of developers, reducing the probability of data errors, and increasing the page generation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113076104B_ABST
    Figure CN113076104B_ABST
Patent Text Reader

Abstract

The present application discloses a page generation method, device, equipment and storage medium, the method comprising: obtaining configuration information, the configuration information comprising page data corresponding to a target page, the page data comprising at least one control information and a database table path for generating controls; parsing the database table path, determining the database table field information corresponding to each control information; generating controls corresponding to the database table field information according to the database table field information and preset data attribute rules, the data attribute rules being used to describe the field attributes corresponding to the controls; typeset rendering the controls contained in the target page, generating the target page. The method can directly establish a connection between each control and a database table field, automatically and quickly generate controls and generate corresponding target pages, without the need for front-end developers to write and modify a large amount of code, thereby reducing the workload of developers, reducing the probability of data errors, and improving page generation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention generally relates to the field of Internet technology, and in particular to a page generation method, device, equipment and storage medium. Background Art

[0002] With the rapid development of mobile Internet information technology, more and more users use various application systems in their daily lives. At present, there are a large number of application pages, such as forms, in various application systems. Users can fill in the form on the application interface, so that the application system can obtain the data in the form and store it.

[0003] At present, in the related technology, controls can be configured on the front end, and pages can be generated according to the controls, and then multiple interfaces can be used to interact with the back end, and the back end can be connected to the database to access data. However, this method often requires developers of the front end and the back end to write a lot of code, which is a lot of work and prone to errors. In addition, when adding or modifying database tables, both the front end and the back end developers need to modify the code, which can easily lead to data errors. In addition, multiple interfaces need to be encapsulated to process data for different forms, which increases the complexity of system development and maintenance, resulting in high labor costs and time-consuming and labor-intensive. Summary of the invention

[0004] In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a page generation method, apparatus, device and storage medium.

[0005] In a first aspect, the present application provides a page generation method, the method comprising:

[0006] Acquire configuration information, wherein the configuration information includes page data corresponding to the target page, and the page data includes at least one control information and a database table path for generating the control;

[0007] Parsing the database table path to determine the database table field information corresponding to each control information;

[0008] Generate a control corresponding to the database table field information according to the database table field information and a preset data attribute rule, wherein the data attribute rule is used to describe the field attribute corresponding to the control;

[0009] The controls included in the target page are typeset and rendered to generate the target page.

[0010] In one embodiment, the configuration information further includes a control mapping rule, and a control corresponding to the database table field information is generated according to the database table field information and a preset data attribute rule, including:

[0011] Determine the field type corresponding to the control according to the database field information;

[0012] Based on the field type and the preset data attribute rule, and in accordance with the control mapping rule, a control corresponding to the database table field information is generated.

[0013] In one embodiment, after the controls included in the target page are typeset and rendered to generate the target page, the method further includes:

[0014] When a touch operation on a target control on the target page is detected, a control state of the target control is controlled to be an operable state, and the target control is any control on the target page;

[0015] When it is detected that the touch operation on the target control is completed, obtaining business operation data on the target control;

[0016] Based on the control information and data attribute rules, verify the business operation data;

[0017] When the verification is passed, based on the mapping relationship between the target control and the database table, the business operation data is stored in the database table corresponding to the target control, and the control state of the target control is controlled to be a non-operational state.

[0018] In one embodiment, verifying the business operation data based on the control information and the data attribute rule includes:

[0019] Parsing the business operation data to determine a target event and event attributes corresponding to the touch operation;

[0020] Check whether the target event and event attribute corresponding to the touch operation conform to the data attribute rule corresponding to the control information;

[0021] If the data attribute rules corresponding to the control information are met, the business operation data is verified to be passed.

[0022] In one embodiment, after the business operation data is verified, the method further includes:

[0023] Execute a target event corresponding to the touch operation.

[0024] In one embodiment, the method further comprises:

[0025] Monitoring behavior operation data on the target control, wherein the behavior operation data includes operation behavior and operation records on the target control;

[0026] Processing the operation behavior, the operation record and the business operation data to obtain an audit record of the target control;

[0027] The audit records of the target control are stored in an audit record database table.

[0028] In one embodiment, after storing the audit record of the target control in the audit record database table, the method further includes:

[0029] Receiving and responding to a control operation viewing instruction, wherein the control operation viewing instruction carries a control identifier;

[0030] Based on the control identifier, searching the audit record database table for an audit record corresponding to the control identifier;

[0031] The audit record is displayed in the target area corresponding to the control.

[0032] In a second aspect, the present application provides a page generation device, the device comprising:

[0033] A configuration information acquisition module, used to acquire configuration information, wherein the configuration information includes page data corresponding to a target page, and the page data includes at least one control information;

[0034] A parsing module, used for parsing the database table path and determining the database table field information corresponding to each control information;

[0035] A control generation module, used to generate a control corresponding to the database table field information according to the database table field information and a preset data attribute rule, wherein the data attribute rule is used to describe the field attribute corresponding to the control;

[0036] The page generation module is used to perform typeset rendering on the controls included in the target page to generate the target page.

[0037] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of the first aspect when executing the program.

[0038] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is used to implement the method described in the first aspect.

[0039] The page generation method, device, equipment and storage medium provided in the embodiment of the present application obtain configuration information, which includes page data corresponding to the target page, and the page data includes at least one control information and a database table path for generating controls, and parses the database table path for generating controls, determines the database table field information corresponding to each control information, generates controls corresponding to the database table field information according to the database table field information and preset data attribute rules, and the data attribute rules are used to describe the field attributes corresponding to the controls, and then typesets and renders the controls contained in the target page to generate the target page. The solution can directly establish a connection between each control and a database table field, automatically and quickly generate controls corresponding to the database table field information, and then generate the corresponding target page, without the need for front-end developers to write and modify a large amount of code and jointly debug multiple complex interfaces, thereby reducing the workload of developers, reducing the probability of data errors, and improving page generation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0041] Figure 1 A schematic diagram of the structure of a page generation system provided in an embodiment of the present application;

[0042] Figure 2 A schematic diagram of a flow chart of a page generation method provided in an embodiment of the present application;

[0043] Figure 3 A schematic diagram of the structure of the interaction between the control provided in the embodiment of the present application and the database;

[0044] Figure 4 A schematic diagram of a flow chart for operating a control provided in an embodiment of the present application;

[0045] Figure 5 A schematic diagram of the structure of the operable state of the control provided in the embodiment of the present application;

[0046] Figure 6 A schematic diagram of the structure of a control in a non-operating state provided in an embodiment of the present application;

[0047] Figure 7 A schematic diagram of the structure of viewing control operation records provided in an embodiment of the present application;

[0048] Figure 8 A schematic diagram of the structure of a page generation device provided in an embodiment of the present application;

[0049] Fig. 9 A schematic diagram of the structure of a page generation device provided in an embodiment of the present application;

[0050] Fig.10 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.

[0052] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0053] It is understandable that with the continuous development of network technology, many conveniences are provided to users through the use of major application systems. For each major application system, there are a large number of forms. Users can fill in the forms on the application page so that the application system can obtain data and store it. At present, in the process of developing form pages, the related technology requires front-end developers to complete the development of user interface and control codes, and back-end developers to complete the development of interfaces and background database codes. Then, the front-end developers and back-end developers need to interact through multiple interfaces to generate corresponding pages. However, the related technology requires front-end and back-end developers to write a large amount of code, which is a large workload and prone to errors. Failure to process a field will affect the preservation of the entire form. In addition, when adding or modifying database tables, both front-end and back-end developers need to modify the code, which is very likely to cause data errors, and multiple interfaces need to be encapsulated for different forms to process data, thereby increasing the complexity of system development and maintenance. In addition, for systems with high system security requirements such as medical systems, personnel systems, and financial systems, it is necessary to have clear records for the modification of each content in the system form. However, it is common to locate the modification records at the form level, or to manually define the monitoring logic corresponding to the control, and to write the monitoring logic into the code corresponding to each page control or page element by writing additional embedding code, which is time-consuming and labor-intensive and prone to errors.

[0054] Based on the above-mentioned defects, the present application provides a page generation method, apparatus, device and storage medium. Compared with the related technology, the scheme can directly establish a connection between each control and the database table field, automatically and quickly generate controls corresponding to the database table field information, and then generate the corresponding target page. There is no need for front-end developers to write and modify a large amount of code and coordinate multiple complex interfaces, thereby reducing the workload of developers, reducing the probability of data errors, and improving page generation efficiency.

[0055] Figure 1: is a diagram of the implementation environment of the page generation method provided in the embodiment of the present application. Figure 1 As shown, the implementation environment structure includes: a terminal 100 and a server 200.

[0056] Optionally, the terminal 100 may include a desktop computer and a mobile terminal. The mobile terminal may include a mobile phone, a tablet computer, a PDA (personal digital assistant), an internet-connected electronic reader, and the like.

[0057] The terminal 100 may have a client of at least one application system installed therein. The application system may be, for example, a medical system, a financial system, a personnel system, or the like.

[0058] The server 200 may be a single server, or a server cluster consisting of a plurality of servers, or the server 200 may include one or more virtualization platforms, or the server 200 may be a cloud computing service center.

[0059] The server 200 may be a server device that provides background services for the application system installed in the terminal 100 .

[0060] The terminal 100 and the server 200 establish a communication connection via a wired or wireless network.

[0061] Optionally, the wireless network or wired network uses standard communication technologies and / or protocols. The network is typically the Internet, but may be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a private network or any combination of a virtual private network.

[0062] It should be noted that the various pages running in the client of the terminal 100 can interact with the server 200, and each page includes corresponding controls. For example, when the user starts the client, the client presents the home page of the client to the user; when the user operates the corresponding control on the home page, the client presents the corresponding page to the user.

[0063] For ease of understanding and explanation, the following Figures 2 to 10 The page generation method, device, equipment and storage medium provided in the embodiments of the present application are described in detail.

[0064] Figure 2 FIG. 1 is a flow chart of a page generation method provided in an embodiment of the present application, wherein the method is applied to a terminal device, such as Figure 2 As shown, the method includes:

[0065] S101. Acquire configuration information, where the configuration information includes page data corresponding to a target page, where the page data includes at least one control information and a database table path for generating a control.

[0066] Specifically, the target page may be one or more. If there are multiple target pages to be generated, the page data corresponding to each of the multiple target pages to be generated may be obtained. The target page may include at least one control, and the page data corresponding to the target page may include at least one control information. One control information is used to create a control in the target page.

[0067] Each of the above control information may include basic configuration information of different types of controls, for example, business operation data and behavior operation data, wherein the business operation data is used to indicate the business content of the control, and the behavior operation data is used to indicate the event content corresponding to the control.

[0068] For each page, developers can use the configuration tool to pre-configure the control information corresponding to each control in the server configuration page. The server then generates the page data for each page using the configured data according to preset rules. The client running on the terminal device needs to obtain the configuration information from the server.

[0069] The above configuration information may also include a database table path and a control mapping rule for generating controls. The database table path may be, for example, a data source, which refers to the path of a database table corresponding to each control in a page, such as a database or a database server used by each control. The data source may include a database and a database table corresponding to the database, wherein the database table is used to represent and store the relationship between data objects. According to the database table path, the corresponding database connection may be found, and the database table field information may be obtained. Optionally, different database table field information may come from the same data source or from different data sources. For example, field 1 "name" and field 2 "age" may both come from table 1 of database 1, or field 1 "name" may come from table 1 of database 1, and field 2 "age" may come from table 1 of database 2.

[0070] Among them, the control mapping rule refers to mapping to different control types according to different data types designed by the database. For example, when the data type designed by the database is a text type, a text box control is generated; when the data type designed by the database is a radio type, a radio button control is generated.

[0071] S102: Parse the database table path to determine the database table field information corresponding to each control information.

[0072] In this step, after obtaining the configuration information from the server, the corresponding database can be found according to the database table path of the generated control, that is, the data source name and the corresponding server name, and then the database and the database table corresponding to the database are traversed, and each control information is parsed according to the design structure of the database table, so as to determine the database table field information corresponding to each control information. Among them, the design structure of the database refers to the data structure designed according to its attributes when the database table field information is stored in the database, that is, when designing the database, different fields are designed into different storage forms.

[0073] The above-mentioned database table field information refers to the basic configuration information of the database table field, which may include, for example, the field name and field attributes. For example, the database table field 1 "name" may correspond to the basic configuration information of inputting Chinese characters, and only allows the input character text length to be 2 to 4 characters; for another example, the database table field 2 indicates "whether the name has been authenticated by real name", and the basic configuration information corresponding to the field 2 may be: when the name has been authenticated by real name, the value is assigned to 1; when the name has not been authenticated by real name, the value is assigned to 0.

[0074] S103. Generate a control corresponding to the database table field information according to the database table field information and preset data attribute rules, where the data attribute rules are used to describe the field attributes corresponding to the control.

[0075] Specifically, after parsing the database table path according to the acquired configuration information and obtaining the database table field information corresponding to each control information, the field type corresponding to the control can be determined according to the database field information, and then based on the field type and data attribute rules, the control corresponding to the database table field information is generated according to the control mapping rules. The above data attribute rules may include pre-defined field attributes corresponding to the control, for example, the database table field information obtained by parsing from the database.

[0076] When generating controls, you can add preset custom data attribute rules to each control, specifically:

[0077]

[0078] The above data attribute rules may include two variables, namely input type input Type and data identifier data-identity, wherein inputType is database field information obtained from the database, for example, including basic configuration information of database table fields, and the basic configuration information may be, for example, field type, text length, etc. Then, according to the field type and the preset data attribute rules, the control corresponding to the database table information is generated according to the mapping relationship between the field type and the control.

[0079] dbName is the database name; tableName is the table name; recordUid is the uid or id of the record. It is recommended to use uuid or xuid; columnName is the field name; expireStamp is the expiration timestamp in seconds. The default is the session expiration time to ensure that the page itself expires as a whole after the expiration. If the expiration time is less than the session expiration time, a pop-up window will be displayed when saving to prompt you to enter the login page. For example, for a page with high security, the session expiration time can be set to 10 minutes. If it is detected that the page display time exceeds 10 minutes, if the user performs an operation, a pop-up window will be displayed to prompt the user that the operation cannot be performed.

[0080] ValidationToken is a verification token. The calculation method of verification token is: combine all the above fields + server-side session id + salt string and perform sha1 hash. The purpose of this practice is to ensure security and recall the save permission after the client session expires, so that the data cannot be tampered with during the process of being transmitted from the front end to the server, ensuring the security of data transmission.

[0081] Exemplarily, the obtained database table field 1 is parsed to obtain the corresponding database table field information. The field type in the field information is a text type, and only allows the input text length to be 3-6 letters, which is case-insensitive. Then dataType=" / \w{3,6} / i" can be directly obtained from the database according to the data attribute rule, and then combined with the control mapping rule in the configuration information: when the field type is a text type, a text box is generated, and the corresponding control can be generated according to the control information. At the same time, the control attribute set is that the text length of the input characters is not allowed to be less than 3 letters and not allowed to be more than 6 letters; for example, the database table field 2 indicates "whether the name has been authenticated by real name", and the basic configuration information corresponding to the field 2 can be: when the name has been authenticated by real name, the value is assigned to 1; when the name has not been authenticated by real name, the value is assigned to 0, then the control generated according to the control mapping rule is a radio button control, and the set options can include yes or no.

[0082] S104: Layout and render the controls included in the target page to generate the target page.

[0083] In this step, after the controls included in the target page are generated, the controls included in the target page can be typeset and rendered according to the control typesetting style of the target page, thereby generating the target page. The user can drag the controls on the front end according to the control typesetting style of the target page to move the control position. The control typesetting style may include the typesetting position, size, etc. of the control on the target page.

[0084] like Figure 3 As shown, the front end can communicate with the database in the server through the API interface according to the needs, so as to automatically realize the generation and arrangement of controls in the front end. At the same time, when the database table field information changes, the control type and control properties corresponding to the generated controls also change accordingly, without modifying the front end code, reducing the workload of front end development, and without releasing a new version.

[0085] This embodiment obtains configuration information, which includes page data corresponding to the target page, and the page data includes at least one control information and a database table path for generating controls, and parses the database table path to determine the database table field information corresponding to each control information, and generates controls corresponding to the database table field information according to the database table field information and preset data attribute rules, and the data attribute rules are used to describe the field attributes corresponding to the controls, and then typesets and renders the controls contained in the target page to generate the target page. This solution can directly establish a connection between each control and the database table field, automatically and quickly generate controls corresponding to the database table field information, and then generate the corresponding target page, without the need for front-end developers to write and modify a large amount of code and jointly debug multiple complex interfaces, thereby reducing the workload of developers, reducing the probability of data errors, and improving page generation efficiency.

[0086] Based on the above embodiment, as an implementable method, after generating the target page, Figure 4 A flowchart of a method for operating a control provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the method includes:

[0087] S201. When a touch operation on a target control on a target page is detected, the control state of the target control is controlled to be an operable state, and the target control is any control on the target page.

[0088] S202: When it is detected that the touch operation on the target control is completed, business operation data on the target control is obtained.

[0089] S203: Verify the business operation data based on the control information and data attribute rules.

[0090] S204: When the verification is passed, based on the mapping relationship between the target control and the database table, the business operation data is stored in the database table corresponding to the target control, and the control state of the target control is controlled to be a non-operational state.

[0091] Specifically, after generating the target page, the user needs to add or modify information in the target control corresponding to the target page, and can perform a touch operation on the target control on the target page. After detecting the user's touch operation on the target page, the touched target control is determined according to the user's touch position on the target page. The touch operation can be, for example, a click operation or a slide operation, wherein the click operation can be a single-click operation or a double-click operation. The target control can be any control on the target page.

[0092] When a touch operation of a target control on the target page is detected, the control state of the target control is set to an operable state. The operable state is that the target control changes color. For example, if it is set to red, it means that the control is currently in an editable state. Figure 5 As shown, when it is detected that the touch operation on the target control is completed, the business operation data of the target control is obtained, and then the business operation data is verified based on the control information and data attribute rules. When the business operation data is verified, based on the mapping relationship between the target control and the database table, the business operation data is stored in the database table corresponding to the target control, and the control state of the target control is controlled to be a non-operation state, for example, the color control of the target control is adjusted to gray, which can be seen in Figure 6 As shown, at the same time, when the business operation data is verified, the target event corresponding to the trigger operation is executed; when the business operation data is verified, no processing operation may be performed, and the target event corresponding to the touch operation is not executed.

[0093] It should be noted that in the process of verifying the business operation data based on the control information and data attribute rules, the business operation data can be parsed first to determine the target event and event attribute corresponding to the trigger operation, and then check whether the target event and event attribute corresponding to the trigger operation conform to the data attribute rule corresponding to the control information. If the target event and event attribute conform to the data attribute rule corresponding to the control information, the business operation data is verified to pass; if the target event and event attribute conform to the data attribute rule corresponding to the control information, the business operation data is not verified to pass. The target event can be, for example, writing text content into the input box corresponding to the control, and the event attribute can be, for example, basic setting information for the text content written into the input box of the control.

[0094] Exemplarily, when the target control corresponding to the field "telephone number" is a text input box, the user can click on the target control. At this time, the text input box is controlled to change color, and the user can enter the text content "13898889888" in the text input box. When the user completes entering the text content, the business operation data of the target control is obtained, that is: 13898889888, and then based on the control information and data attribute rules, the business operation data 13898889888 is verified. For example, the control attribute corresponding to the text input box is: the text characters entered are required to be numeric characters, and the length of the entered numeric characters is 11 digits. By parsing the business operation data "13898889888", it is determined that the target event corresponding to the trigger operation is to write the text content into the text input box, and the corresponding event attribute is 11, which is a numeric character. It is determined that the business operation event meets the data attribute rules corresponding to the text input box, and the business operation data is verified and passed. The target event corresponding to the touch operation is executed, and the text content "13898889888" is written into the text input box corresponding to the field "telephone number".

[0095] In this embodiment, the onblur event of the target control can be monitored in real time, and the target control can be directly mapped to the database field without writing complex codes, which reduces the development difficulty and makes data access more efficient.

[0096] It is understandable that the above onblur event refers to the event triggered when the control loses focus. For example, a login box for inputting a user name, when the mouse is clicked on the input box, the cursor will become flashing to prompt the user to input information, that is, the login box gets the focus, which will trigger the onfocus event. When the mouse is clicked on the input box, the input box loses the focus and triggers the onblur event. The onblur event of a form element must be triggered after it gets the focus.

[0097] Furthermore, when a user's touch operation on a target control on a target page is detected, the behavioral operation data on the target control can be monitored, and the behavioral operation data includes the operation behavior and operation records on the target control. The operation behavior, operation records and business operation data are then processed to obtain an audit record of the target control, and the audit record of the target control is stored in an audit record database table.

[0098] It should be noted that the above operation line may be, for example, a click action or a slide action. The operation record may be, for example, a data updater and an update time.

[0099] The above audit records may also include the target control identification ID, the name of the database associated with the target control, the table name, the field name, the original data content, the new data content, the updater and the update time. The new data content may be the business operation data formed by the touch operation on the target control. The audit records formed may be shown in the following table:

[0100] Control ID Library Name Table name Fields Original content New Content Updated by Update time

[0101] In this embodiment, there is no need to write special code on the front end to collect data. The control can directly monitor operation events, and process the behavioral operation data and business operation data generated by the user's touch operation on the target control in real time into audit records, and then directly store them in the database. Compared with the prior art that can only generate form-level records, it can achieve finer data audit records at the field level and granularity level.

[0102] Optionally, after the audit record of the target control is stored in the audit record database table, when a control operation view instruction is received, the control operation view instruction carries a control identifier, and then in response to the control operation view instruction and based on the control identifier, the audit record corresponding to the control identifier is searched from the audit record database, and the audit record is displayed in the target area corresponding to the control.

[0103] It should be noted that when the user right-clicks the control in the target page, the control operation viewing instruction is received. The control identifier can be obtained by detecting the user's touch position on the control. Then, based on the control identifier, the audit record corresponding to the control identifier is searched from the audit record database table. The audit record includes the database name, table name, field, update content, updater, update time, etc. of the data associated with the control. Then, the audit record is displayed in the target area corresponding to the control. The target area can be, for example, the surrounding area of ​​the control. The audit record can be found in Figure 7 As shown, for example, when the user clicks the control corresponding to the field "phone number", the audit found from the audit record database table according to the control identifier shows that the audit record corresponding to the control is "Updated by: Hong Liang; Update time: November 24, 2020 01:40; Old content is 13577777777, new content: 13898889888.

[0104] In this embodiment, the control can be linked to the database table, so that the user can intuitively view the control operation record on the front end, thereby recording the control operation status in real time, and can directly parse the database table path and determine the database table field information, and can achieve instant access across databases and table fields, which is conducive to realizing complex business needs.

[0105] on the other hand, Figure 8Schematic diagram of the structure of a page generation device provided in an embodiment of the present application. The device may be a device in a terminal, such as Figure 8 As shown, the device 600 includes:

[0106] A configuration information acquisition module, 610, is used to acquire configuration information, the configuration information includes page data corresponding to a target page, the page data includes at least one control information;

[0107] The parsing module 620 is used to parse the database table path and determine the database table field information corresponding to each control information;

[0108] A control generation module 630 is used to generate a control corresponding to the database table field information according to the database table field information and preset data attribute rules, where the data attribute rules are used to describe the field attributes corresponding to the control;

[0109] The page generation module 640 is used to format and render the controls included in the target page to generate the target page.

[0110] Optional, such as Fig. 9 As shown, the control generation module 630 includes:

[0111] The determination unit 631 is used to determine the field type corresponding to the control according to the database field information;

[0112] The generating unit 632 is used to generate a control corresponding to the database table field information based on the field type and preset data attribute rules and according to the control mapping rules.

[0113] Optionally, the above device further includes:

[0114] A first control module 650 is used to control the control state of the target control to be an operable state when a touch operation on a target control on a target page is detected, and the target control is any control on the target page;

[0115] The data acquisition module 660 is used to acquire the business operation data of the target control when it is detected that the touch operation on the target control is completed;

[0116] Verification module 670, used to verify business operation data based on control information and data attribute rules;

[0117] The second control module 680 is used to store the business operation data in the database table corresponding to the target control based on the mapping relationship between the target control and the database table after the verification is passed, and control the control state of the target control to be a non-operational state.

[0118] Optionally, the verification module 670 is specifically used to:

[0119] Parse the business operation data to determine the target event and event attributes corresponding to the touch operation;

[0120] Check whether the target event and event attributes corresponding to the touch operation conform to the data attribute rules corresponding to the control information;

[0121] If the data attribute rules corresponding to the control information are met, the business operation data is verified.

[0122] Optionally, the above device is also used for:

[0123] Execute the target event corresponding to the touch operation.

[0124] Optionally, the above device is also used for:

[0125] Monitor the behavior operation data of the target control, the behavior operation data includes the operation behavior and operation record of the target control;

[0126] Process the operation behavior, operation records and business operation data to obtain the audit records of the target control;

[0127] Store the audit records of the target control in the audit record database table.

[0128] Optionally, the above device is also used for:

[0129] Receiving and responding to a control operation viewing instruction, the control operation viewing instruction carrying a control identifier;

[0130] Based on the control identifier, search the audit record corresponding to the control identifier from the audit record database table;

[0131] Display the audit records in the target area corresponding to the control.

[0132] The page generation device provided by the embodiment of the present application, the configuration information acquisition module acquires configuration information, the configuration information includes page data corresponding to the target page, the page data includes at least one control information and the database table path for generating the control, and the database table path for generating the control is parsed by the parsing module to determine the database table field information corresponding to each control information, and then the control generation module generates the control corresponding to the database table field information according to the database table field information and the preset data attribute rules, the data attribute rules are used to describe the field attributes corresponding to the control, and then the page generation module typesets and renders the controls contained in the target page to generate the target page. This solution can directly establish a connection between each control and the database table field, automatically and quickly generate the control corresponding to the database table field information, and then generate the corresponding target page, without the need for the front-end developer to write and modify a large amount of code and to coordinate multiple complex interfaces, thereby reducing the workload of the developer, reducing the probability of data errors, and improving the efficiency of page generation.

[0133] On the other hand, the device provided by the embodiment of the present application includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the page generation method as described above when executing the program.

[0134] Reference below Fig.10 , Fig.10 A schematic diagram of the structure of a computer system of a terminal device according to an embodiment of the present application.

[0135] like Fig.10 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 703 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0136] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0137] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a machine-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 703, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present application are executed.

[0138] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0139] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of the code, and the aforementioned module, program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0140] The units or modules involved in the embodiments described in the present application may be implemented by software or by hardware. The units or modules described may also be arranged in a processor, for example, may be described as: a processor comprising: a configuration information acquisition module, a parsing module, a control generation module and a page generation module. Among them, the names of these units or modules do not constitute a limitation on the units or modules themselves under certain circumstances. For example, the configuration information acquisition module may also be described as "used to obtain configuration information, the configuration information including page data corresponding to the target page, and the page data including at least one control information".

[0141] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently and not be assembled into the electronic device. The above computer-readable storage medium stores one or more programs, and when the above programs are used by one or more processors to execute the page generation method described in the present application:

[0142] Acquire configuration information, wherein the configuration information includes page data corresponding to the target page, and the page data includes at least one control information and a database table path for generating the control;

[0143] Parsing the database table path to determine the database table field information corresponding to each control information;

[0144] Generate a control corresponding to the database table field information according to the database table field information and a preset data attribute rule, wherein the data attribute rule is used to describe the field attribute corresponding to the control;

[0145] The controls included in the target page are typeset and rendered to generate the target page.

[0146] In summary, the page generation method, device, equipment and storage medium provided by the embodiment of the present application obtain configuration information, which includes page data corresponding to the target page, and the page data includes at least one control information and a database table path for generating controls, and parses the database table path for generating controls, determines the database table field information corresponding to each control information, generates controls corresponding to the database table field information according to the database table field information and preset data attribute rules, and the data attribute rules are used to describe the field attributes corresponding to the controls, and then typesets and renders the controls contained in the target page to generate the target page. This solution can directly establish a connection between each control and a database table field, automatically and quickly generate controls corresponding to the database table field information, and then generate the corresponding target page, without the need for front-end developers to write and modify a large amount of code and jointly debug multiple complex interfaces, thereby reducing the workload of developers, reducing the probability of data errors, and improving page generation efficiency.

[0147] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the present application.

Claims

1. A page generation method, characterized in that: The method comprises: Acquire configuration information, wherein the configuration information includes page data corresponding to the target page, and the page data includes at least one control information and a database table path for generating the control; Parse the database table path to determine the database table field information corresponding to each control information; Generate a control corresponding to the database table field information according to the database table field information and a preset data attribute rule, wherein the data attribute rule is used to describe the field attribute corresponding to the control; Performing layout and rendering on the controls included in the target page to generate the target page; When a touch operation on a target control on the target page is detected, a control state of the target control is controlled to be an operable state, and the target control is any control on the target page; When it is detected that the touch operation on the target control is completed, obtaining business operation data on the target control; Based on the control information and data attribute rules, verify the business operation data; When the verification is passed, based on the mapping relationship between the target control and the database table, the business operation data is stored in the database table corresponding to the target control, and the control state of the target control is controlled to be a non-operational state.

2. The method according to claim 1, characterized in that The configuration information also includes a control mapping rule, which generates a control corresponding to the database table field information according to the database table field information and a preset data attribute rule, including: Determine the field type corresponding to the control according to the database field information; Based on the field type and the preset data attribute rule, and in accordance with the control mapping rule, a control corresponding to the database table field information is generated.

3. The method according to claim 1, characterized in that Based on the control information and data attribute rules, verifying the business operation data includes: Parsing the business operation data to determine a target event and event attributes corresponding to the touch operation; Check whether the target event and event attribute corresponding to the touch operation conform to the data attribute rule corresponding to the control information; If the data attribute rules corresponding to the control information are met, the business operation data is verified to be passed.

4. The method according to claim 3, characterized in that: After the business operation data is verified, the method further includes: Execute a target event corresponding to the touch operation.

5. The method according to claim 1, characterized in that The method further comprises: Monitoring behavior operation data on the target control, wherein the behavior operation data includes operation behavior and operation records on the target control; Processing the operation behavior, the operation record and the business operation data to obtain an audit record of the target control; The audit records of the target control are stored in an audit record database table.

6. The method according to claim 5, characterized in that After storing the audit record of the target control in the audit record database table, the method further includes: Receiving and responding to a control operation viewing instruction, wherein the control operation viewing instruction carries a control identifier; Based on the control identifier, searching the audit record database table for an audit record corresponding to the control identifier; The audit record is displayed in the target area corresponding to the control.

7. A page generating device, characterized in that: The device comprises: A configuration information acquisition module, used to acquire configuration information, wherein the configuration information includes page data corresponding to a target page, and the page data includes at least one control information; A parsing module, used to parse the database table path and determine the database table field information corresponding to each control information; A control generation module, used to generate a control corresponding to the database table field information according to the database table field information and a preset data attribute rule, wherein the data attribute rule is used to describe the field attribute corresponding to the control; A page generation module is used to perform layout rendering on the controls included in the target page to generate the target page; and is used to: When a touch operation on a target control on the target page is detected, a control state of the target control is controlled to be an operable state, and the target control is any control on the target page; When it is detected that the touch operation on the target control is completed, obtaining business operation data on the target control; Based on the control information and data attribute rules, verify the business operation data; When the verification is passed, based on the mapping relationship between the target control and the database table, the business operation data is stored in the database table corresponding to the target control, and the control state of the target control is controlled to be a non-operational state.

8. A computer device, characterized in that: The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to implement the page generation method according to any one of claims 1 to 6 when executing the program.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is used to implement the page generation method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Page generation method, server and storage medium

    CN111782216A