CN113076104A - Page generation method, device, equipment and storage medium - Google Patents

Page generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN113076104A
CN113076104A CN202110484338.9A CN202110484338A CN113076104A CN 113076104 A CN113076104 A CN 113076104A CN 202110484338 A CN202110484338 A CN 202110484338A CN 113076104 A CN113076104 A CN 113076104A
Authority
CN
China
Prior art keywords
control
target
database table
page
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110484338.9A
Other languages
Chinese (zh)
Inventor
王洪亮
黄佼
刘欣欣
翟芳
于芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202110484338.9A priority Critical patent/CN113076104A/en
Publication of CN113076104A publication Critical patent/CN113076104A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/26Visual data mining; Browsing structured data

Abstract

The application discloses a page generation method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring configuration information, wherein the configuration information comprises page data corresponding to a target page, and the page data comprises at least one control information and a database table path for generating the control; analyzing the database table path, and determining the database table field information corresponding to each control information; generating a control corresponding to the field information of the database table according to the field information of the database table and a preset data attribute rule, wherein the data attribute rule is used for describing the field attribute corresponding to the control; and performing typesetting rendering on the control contained in the target page to generate the target page. The method can directly establish the relation between each control and the database table field, automatically and quickly generate the control and generate the corresponding target page, and front-end developers do not need to write and modify a large number of codes, so that the workload of the developers is reduced, the probability of data errors is reduced, and the page generation efficiency is improved.

Description

Page generation method, device, equipment and storage medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a page generation method, apparatus, device, and storage medium.
Background
With the rapid development of mobile internet information technology, more and more users use various application systems in daily life. At present, a large number of application pages, such as forms, exist in each large application system, and a user can fill in the completed forms through an application interface, so that the application system acquires and stores data in the forms.
At present, in the related art, a control can be configured at the front end, a page is generated according to the control, then the page is interacted with the back end through a plurality of interfaces, and the back end is connected with a database to realize data access. However, the method usually needs developers at the front end and the back end to specially write a large amount of codes, the workload is large, errors are easy to occur, in addition, when a database table is newly added or modified, the developers at the front end and the back end need to modify the codes, data errors are easy to cause, and a plurality of interfaces are required to be packaged for processing data for different forms, so that the complexity of system development and maintenance is increased, the labor cost is high, and time and labor are wasted.
Disclosure of Invention
In view of the above-mentioned drawbacks and deficiencies of the prior art, it is desirable to provide a page generation method, apparatus, device and storage medium.
In a first aspect, the present application provides a page generating method, including:
acquiring configuration information, wherein the configuration information comprises page data corresponding to a target page, and the page data comprises at least one control information and a database table path for generating the control;
analyzing the database table path, and determining the database table field information corresponding to each control information;
generating 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 for describing the field attribute corresponding to the control;
and performing typesetting rendering on the control contained in the target page to generate the target page.
In one embodiment, the configuration information further includes a control mapping rule, and the generating of the control corresponding to the database table field information according to the database table field information and a preset data attribute rule includes:
determining a field type corresponding to the control according to the database field information;
and generating a control corresponding to the field information of the database table according to the control mapping rule based on the field type and the preset data attribute rule.
In one embodiment, after performing layout rendering on the control included in the target page and generating the target page, the method further includes:
when touch operation on a target control on the target page is detected, controlling the control state of the target control to be an operable state, wherein the target control is any one control on the target page;
when the touch operation on the target control is detected to be completed, acquiring business operation data on the target control;
based on the control information and the data attribute rule, verifying the service operation data;
and after the verification is passed, storing the business operation data into a database table corresponding to the target control based on the mapping relation between the target control and the database table, and controlling the control state of the target control to be a non-operation state.
In one embodiment, the verifying the business operation data based on the control information and the data attribute rule includes:
analyzing the service operation data, and determining a target event and an event attribute corresponding to the touch operation;
checking whether a target event and an event attribute corresponding to the touch operation meet a data attribute rule corresponding to the control information;
and if the data attribute rule corresponding to the control information is met, the business operation data is verified to pass.
In one embodiment, after the service operation data is verified, the method further includes:
and executing a target event corresponding to the touch operation.
In one embodiment, the method further comprises:
monitoring behavior operation data of the target control, wherein the behavior operation data comprises operation behaviors and operation records of the target control;
processing the operation behavior, the operation record and the service operation data to obtain an audit record of the target control;
and storing the audit record of the target control into an audit record database table.
In one embodiment, after storing the audit record of the target control in an audit record database table, the method further comprises:
receiving and responding to a control operation checking instruction, wherein the control operation checking instruction carries a control identification;
based on the control identification, searching an audit record corresponding to the control identification from the audit record database table;
and displaying the audit record in a target area corresponding to the control.
In a second aspect, the present application provides a page generating apparatus, including:
the configuration information acquisition module is used for acquiring configuration information, wherein the configuration information comprises page data corresponding to a target page, and the page data comprises at least one control piece of information;
the analysis module is used for analyzing the database table path and determining the database table field information corresponding to each control information;
the control generation module is used for generating 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 for describing the field attribute corresponding to the control;
and the page generation module is used for performing typesetting rendering on the control contained in the target page to generate the target page.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method according to the first aspect when executing the program.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, the computer program being configured to implement the method according to the first aspect.
According to the page generation method, the page generation device, the page generation equipment and the storage medium, configuration information is obtained, the configuration information comprises page data corresponding to a target page, the page data comprises at least one piece of control information and a database table path for generating a control, the database table path for generating the control is analyzed, database table field information corresponding to each piece of control information is determined, the control corresponding to the database table field information is generated according to the database table field information and a preset data attribute rule, the data attribute rule is used for describing field attributes corresponding to the control, then typesetting and rendering are carried out on the control contained in the target page, and the target page is generated. According to the scheme, the relation between each control and the database table field can be directly established, the controls corresponding to the database table field information can be automatically and quickly generated, and then the corresponding target page can be generated, a front-end developer does not need to write and modify a large number of codes and jointly adjust a plurality of complex interfaces, so that the workload of the developer is reduced, the probability of data errors is reduced, and the page generation efficiency is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a schematic structural diagram of a page generation system provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a page generation method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of interaction between a control and a database according to an embodiment of the present application;
fig. 4 is a schematic flowchart of operating a control according to an embodiment of the present application;
FIG. 5 is a structural diagram illustrating an operable state of a control according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a non-operating state of a control provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of an operation record of a view control provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of a page generation apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a page generation apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
It can be understood that, with the continuous development of network technology, great convenience is provided for users by using various large application systems, and for various large application systems, a large number of forms exist, and users can complete the forms by filling in application pages, so that the application systems acquire data and realize storage. At present, in the process of developing a form page, a front-end developer is required to develop and complete a user interface and a control code, a back-end developer is required to develop and complete an interface and a background database code, and then the front-end developer and the back-end developer need to interact through a plurality of interfaces to generate a corresponding page, but in the related technology, the front-end developer and the back-end developer need to compile a large number of codes, so that the workload is large, errors are easy to occur, and the storage of the whole form can be influenced by one field processing failure; in addition, when a database table is newly added or modified, front-end and back-end developers need to modify codes, data errors are easily caused, and a plurality of interfaces are required to be packaged for processing data for different forms, so that the system development and maintenance complexity is increased, and for systems with higher requirements on system safety, such as medical systems, personnel systems, financial systems and the like, a definite record is required for modifying each item of content in the system form, but modification records positioned to the form level are commonly found at present, or monitoring logics corresponding to controls are defined manually, and the monitoring logics need to be written into codes corresponding to each page control or page element by writing extra embedded point codes, so that time and labor are wasted, and errors are easily caused.
Based on the defects, the method, the device, the equipment and the storage medium for generating the page are provided, compared with the related technology, the scheme can directly establish the relation between each control and the field of the database table, automatically and quickly generate the control corresponding to the field information of the database table, and further generate the corresponding target page, and front-end developers do not need to write, modify a large number of codes and jointly debug a plurality of complex interfaces, so that the workload of the developers is reduced, the probability of data errors is reduced, and the page generation efficiency is improved.
Fig. 1 is a diagram of an implementation environment structure of a page generation method according to an embodiment of the present application. As shown in fig. 1, the implementation environment structure includes: a terminal 100 and a server 200.
Alternatively, the terminal 100 may include a desktop computer and a mobile terminal, and the mobile terminal may include a mobile phone, a tablet computer, a PDA (personal digital assistant), a network-enabled e-reader, and the like.
In which at least one application system client can be installed in the terminal 100. The application system may be, for example, a medical system, a financial system, a personnel system, or the like.
The server 200 may be a server, or may be a server cluster composed of several servers, or the server 200 may include one or more virtualization platforms, or the server 200 may be a cloud computing service center.
The server 200 may be a server device that provides a background service for the application system installed in the terminal 100.
The terminal 100 and the server 200 establish a communication connection therebetween through a wired or wireless network.
Optionally, the wireless network or wired network described above uses standard communication techniques 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, wireline or wireless Network, a private Network, or any combination of virtual private networks.
It should be noted that the server 200 can be interacted with through various pages running in the client of the terminal 100, and each page includes a corresponding control. For example, when a user starts a client, the client may present the user with a home page of the client; and when the user operates the corresponding control of the home page, the client presents the corresponding page to the user.
For convenience of understanding and explanation, the page generation method, apparatus, device and storage medium provided by the embodiments of the present application are described in detail below with reference to fig. 2 to 10.
Fig. 2 is a schematic flowchart of a page generation method provided in an embodiment of the present application, where the method is applied to a terminal device, and as shown in fig. 2, the method includes:
s101, obtaining configuration information, wherein the configuration information comprises page data corresponding to a target page, and the page data comprises at least one piece of control information and a database table path for generating a control.
Specifically, the target page may be one or multiple, and if multiple target pages to be generated exist, the page data corresponding to each target page in 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 one control in the target page.
Each control information may include basic configuration information of different types of controls, and may include, for example, business operation data and behavior operation data, where the business operation data is used to indicate business contents of the controls, and the behavior operation data is used to indicate event contents corresponding to the controls.
For each page, a developer can use a configuration tool to configure control information corresponding to each control in the page in advance in a server, then the server generates page data of each page according to a preset rule and configured data, and a client running on a terminal device needs to acquire the configuration information from a server.
The configuration information may further include a database table path for generating the control, and a control mapping rule, where the database table path may be, for example, a data source, and the data source refers to a path of a database table corresponding to each control in the page, such as a database or a database server used by each control. The data sources may include a database and database tables corresponding to the database, wherein the database tables are used to represent and store relationships between data objects. Corresponding database connection can be found according to the database table path, and then database table field information is obtained. Alternatively, 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 database 1 table 1, or field 1 "name" comes from database 1 table 1 and field 2 "age" comes from database 2 table 1.
The control mapping rule refers to mapping to different control types according to different data types of the database design, for example, when the data type of the database design is a text type, a text box control is generated; and if the data type of the database design is the radio selection type, generating the radio box control.
And S102, analyzing the database table path, and determining the database table field information corresponding to each control information.
In this step, after the configuration information is obtained from the server, the corresponding database may be found according to the database table path for generating the 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 piece of control information is analyzed according to the design structure of the database table, so as to determine the database table field information corresponding to each piece of control information. The design structure of the database refers to a data structure designed according to the attribute of the field information of the database when the field information of the database is stored in the database, namely, different fields are designed into different storage forms when the database is designed.
The database table field information refers to basic configuration information of a database table field, and may include, for example, a field name and a field attribute. For example, the field 1 'name' of the database table, the corresponding basic configuration information can be input Chinese characters, and only the text length of the input characters is allowed to be 2-4 characters; for another example, a database table field 2 indicates whether the name is authenticated by a real name, and the basic configuration information corresponding to the field 2 may be: when the name is subjected to real-name authentication, the value is assigned to 1; when the name is not authenticated by a real name, the value is assigned to 0.
S103, generating a control corresponding to the field information of the database table according to the field information of the database table and a preset data attribute rule, wherein the data attribute rule is used for describing the field attribute corresponding to the control.
Specifically, after the database table path is analyzed according to the acquired configuration information to obtain 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 the control corresponding to the database table field information is generated according to the control mapping rule based on the field type and the data attribute rule. The data attribute rule may include a field attribute corresponding to a predefined control, for example, may include database table field information obtained by parsing from a database.
In the process of generating the controls, a preset custom data attribute rule can be added to each control, specifically:
the data attribute rule may include two variables, which are respectively an input Type and data identification data-identity, where the input Type is database field information obtained from a database, for example, the input Type includes basic configuration information of a database table field, and the basic configuration information may be, for example, a field Type, a text length, and the like. And then generating a control corresponding to the database table information according to the field type and a preset data attribute rule and according to the mapping relation between the field type and the control.
dbName is the database name; tableName is the table name; recordUid is the recorded uid or id, and uuid or xuid is recommended; columnName is the field name; the expireStamp is an expiration timestamp, takes seconds as a unit, defaults to session expiration time, so as to ensure that the page is expired integrally after expiration, and if the expiration time is less than the session expiration time, the page is prompted to enter a login page through a popup window during storage. For example, for a page with higher security, session expiration time may be set to 10 minutes, and if it is detected that the page display time exceeds 10 minutes, and assuming that the user performs an operation, the user may be prompted to fail the operation through a pop-up window.
validationToken is a verification token, and the calculation method of the verification token comprises the following steps: and combining all the character strings of the field + the session id + salt at the server side, and then hashing the combined character strings by sha 1. The method aims to guarantee safety, meanwhile, the storage authority is recalled after the session of the client expires, so that data cannot be tampered in the process of being transmitted from the front end to the server, and the safety of data transmission is guaranteed.
Illustratively, if the acquired database table field 1 is parsed to acquire corresponding database table field information, the field type in the field information is a text type, and only the input text is allowed to have a length of 3-6 letters, and cases are not distinguished, a dataType ═ w {3,6}/i "can be acquired from the database directly according to the data attribute rule, and then in combination with the control mapping rule in the configuration information: when the field type is a text type, generating a text box, and generating a corresponding control according to the control information, wherein the set control attribute is that the text length of the input character is not allowed to be lower than 3 letters, and is not allowed to be higher than 6 letters; for another example, a database table field 2 indicates whether the name is authenticated by a real name, and the basic configuration information corresponding to the field 2 may be: when the name is subjected to real-name authentication, the value is assigned to 1; when the name is not authenticated by a real name, the value is assigned to 0, the control generated according to the control mapping rule is a radio box control, and the set options can include yes or no.
And S104, typesetting and rendering the controls contained in the target page to generate the target page.
In this step, after the control included in the target page is generated, the control included in the target page may be typeset and rendered according to the control typesetting style of the target page, so as to generate the target page. The control typesetting style can include the typesetting position, the size and the like of the control on the target page.
As shown in fig. 3, the front end may contact the database in the server through the API interface according to the requirement, so as to automatically generate and arrange the control at the front end. Meanwhile, when the field information of the database table changes, the control type and the control attribute corresponding to the generated control also change, the front-end code does not need to be modified, the front-end development workload is reduced, and a new version does not need to be released.
In this embodiment, configuration information is obtained, where the configuration information includes page data corresponding to a target page, the page data includes at least one control information and a database table path for generating a control, the database table path is analyzed, database table field information corresponding to each control information is determined, a control corresponding to the database table field information is generated according to the database table field information and a preset data attribute rule, the data attribute rule is used to describe a field attribute corresponding to the control, and then the control included in the target page is subjected to composition rendering to generate the target page. According to the scheme, the relation between each control and the database table field can be directly established, the controls corresponding to the database table field information can be automatically and quickly generated, and then the corresponding target page can be generated, a front-end developer does not need to write and modify a large number of codes and jointly adjust a plurality of complex interfaces, so that the workload of the developer is reduced, the probability of data errors is reduced, and the page generation efficiency is improved.
On the basis of the foregoing embodiment, as an implementation manner, after a target page is generated, fig. 4 is a flowchart illustrating a method for operating a control according to an embodiment of the present application, and as shown in fig. 4, the method includes:
s201, when touch operation on a target control on a target page is detected, controlling the control state of the target control to be an operable state, wherein the target control is any one control on the target page.
S202, when the touch operation on the target control is detected to be completed, business operation data on the target control is obtained.
S203, verifying the business operation data based on the control information and the data attribute rule.
And S204, after the verification is passed, storing the business operation data into a database table corresponding to the target control based on the mapping relation between the target control and the database table, and controlling the control state of the target control to be a non-operation state.
Specifically, after the target page is generated, the user needs to add new information or modify information in the target control corresponding to the target page, touch operation can be performed on the target control on the target page, and after the touch operation of the user on the target page is detected, the target control which is touched is determined according to the touch position of the user on the target page. The touch operation may be, for example, a click operation or a slide operation, where the click operation may be a single click operation or a double click operation. The target control may be any one of the controls on the target page.
When a touch operation of a target control on a target page is detected, controlling the control state of the target control to be an operable state, where the operable state is a target control adjustment color change, for example, set to red to indicate that the control is currently in an editable state, as shown in fig. 5, when the touch operation of the target control is detected to be completed, acquiring service operation data of the target control, then checking the service operation data based on control information and data attribute rules, when the service operation data passes the check, storing the service operation data in a database table corresponding to the target control based on the mapping relationship between the target control and the database table, and controlling the control state of the target control to be a non-operating state, for example, adjusting the color control of the target control to be gray, as shown in fig. 6, and, when the service operation data passes the check, executing a target event corresponding to the trigger operation; and when the service operation data is not verified, the processing operation is not performed, and the target event corresponding to the touch operation is not executed.
It should be noted that, in the process of verifying the business operation data based on the control information and the data attribute rule, the business operation data may be analyzed first to determine a target event and an event attribute corresponding to the trigger operation, and then to check whether the target event and the event attribute corresponding to the trigger operation meet the data attribute rule corresponding to the control information, and if the target event and the event attribute meet the data attribute rule corresponding to the control information, the business operation data is verified; and if the data attribute rule corresponding to the control information is not met, the service operation data is not checked to be passed. The target event may be, for example, writing text content into the input box corresponding to the control, and the event attribute may be, for example, basic setting information for the text content written into the input box of the control.
For example, when the target control corresponding to the field "phone number" is a text input box, the user may perform a click operation on the target control, and at this time, the text input box is controlled to be in a color-changing state, the user may input text content "13898889888" in the text input box, and after the user finishes inputting the text content, the service operation data of the target control is obtained, that is: 13898889888, based on the control information and the data attribute rule, the business operation data 13898889888 is verified, for example, the control attribute corresponding to the text entry box is: the text characters required to be input are numeric characters, and the numeric characters input are 11 bits in length. Analyzing the service operation data '13898889888', determining that the target event corresponding to the trigger operation is to write the text content into the text input box, and if the corresponding event attribute is 11, determining that the service operation event meets the data attribute rule corresponding to the text input box, checking the service operation data to pass, executing the target event corresponding to the touch operation, and writing the text content '13898889888' into the text input box corresponding to the field 'telephone number'.
In the embodiment, an onblu event of the target control can be monitored in real time, and the target control can be directly mapped with the database field without writing complex codes, so that the development difficulty is reduced, and the data access is more efficient.
It will be appreciated that the onblu event described above refers to an event that the control triggers when focus is lost. For example, a login box for inputting a user name, and clicking the input box by a mouse, which means that a cursor changes to prompt a user to input information in a flash manner, that is, the login box gets a focus and triggers an onfocus event, when clicking the input box by the mouse, the input box loses the focus and triggers an onblu event, and an onblu event of an form element must be triggered after the onblu event gets the focus.
Further, when the touch operation of the user on the target control on the target page is detected, behavior operation data of the target control can be monitored, the behavior operation data comprises operation behaviors and operation records of the target control, then the operation behaviors, the operation records and the service operation data are processed, audit records of the target control are obtained, and the audit records of the target control are stored in an audit record database table.
The operation line may be, for example, a click action or a slide action. The operation record may be, for example, a data updater, an update time.
The audit record may further include a target control identification ID, a database name associated with the target control, a table name, a field name, original data content, new data content, an updater, and update time, where the new data content may be service operation data formed by performing touch operation on the target control, and the formed audit record may be shown in the following table:
control ID Name of storehouse Table name Field(s) Original content New content Renewing person Update time
In the embodiment, a front end does not need to compile special code collection data, the control can directly monitor the operation event, and behavior operation data and business operation data generated by touch operation of a user on the target control are processed into the audit record in real time and then directly stored in the database.
Optionally, after the audit record of the target control is stored in the audit record database table, when a control operation check instruction is received, the control operation check instruction carries a control identifier, then the control operation check instruction is responded, the audit record corresponding to the control identifier is searched from the audit record database based on the control identifier, and the audit record is displayed in a target area corresponding to the control.
It should be noted that when the user right clicks the control in the target page through the mouse, the control operation viewing instruction is received, the control identifier can be obtained by detecting the touch position of the user on the control, then based on the control identification, the audit record corresponding to the control identification is searched in the audit record database table, the audit record comprises database name, table name, field, update content, updater, update time and the like of the data associated with the control, then the audit record is displayed in a target area corresponding to the control, the target area may be, for example, the area surrounding the control, and the audit record may be as shown in fig. 7, for example, when the user clicks on the control corresponding to the field "phone number", and according to the control identification, finding the audit from the audit record database table, and showing that the audit record corresponding to the control is' updater: flooding and brightening; updating time: year 2020, 11, 24, 01: 40; old content is 13577777777, new content: 13898889888.
in the embodiment, the control can be linked with the database table, so that a user can visually check the control operation record at the front end, the control operation condition is recorded in real time, the database table path can be directly analyzed, the database table field information is determined, the cross-database and cross-table field instant access can be realized, and the realization of complex business requirements is facilitated.
On the other hand, fig. 8 is a schematic structural diagram of a page generation apparatus according to an embodiment of the present application. The apparatus may be an apparatus in a terminal, as shown in fig. 8, and the apparatus 600 includes:
a configuration information obtaining module 610, configured to obtain configuration information, where the configuration information includes page data corresponding to a target page, and the page data includes at least one control information;
the analysis module 620 is used for analyzing the database table path and determining the database table field information corresponding to each control information;
a control generating module 630, configured to generate a control corresponding to the database table field information according to the database table field information and a preset data attribute rule, where the data attribute rule is used to describe a field attribute corresponding to the control;
the page generating module 640 is configured to perform layout rendering on the controls included in the target page, and generate the target page.
Optionally, as shown in fig. 9, the control generating module 630 includes:
the determining unit 631 is configured to determine, according to the database field information, a field type corresponding to the control;
and a generating unit 632, configured to generate a control corresponding to the field information of the database table according to the control mapping rule based on the field type and the preset data attribute rule.
Optionally, the apparatus further includes:
the first control module 650 is configured to, when a touch operation on a target control on a target page is detected, control the control state of the target control to be an operable state, where the target control is any one control on the target page;
the data acquisition module 660 is configured to acquire service operation data of the target control after the touch operation on the target control is detected to be completed;
the checking module 670 is configured to check the service operation data based on the control information and the data attribute rule;
and the second control module 680 is configured to, after the verification is passed, store the service operation data in the database table corresponding to the target control based on the mapping relationship between the target control and the database table, and control the control state of the target control to be a non-operation state.
Optionally, the check module 670 is specifically configured to:
analyzing the service operation data, and determining a target event and an event attribute corresponding to the touch operation;
checking whether a target event and an event attribute corresponding to the touch operation meet a data attribute rule corresponding to the control information;
and if the data attribute rule corresponding to the control information is met, the business operation data is verified to pass.
Optionally, the apparatus is further configured to:
and executing a target event corresponding to the touch operation.
Optionally, the apparatus is further configured to:
monitoring behavior operation data of the target control, wherein the behavior operation data comprises operation behaviors and operation records of the target control;
processing the operation behavior, the operation record and the service operation data to obtain an audit record of the target control;
and storing the audit record of the target control into an audit record database table.
Optionally, the apparatus is further configured to:
receiving and responding to a control operation checking instruction, wherein the control operation checking instruction carries a control identification;
based on the control identification, searching an audit record corresponding to the control identification from an audit record database table;
and displaying the audit record in a target area corresponding to the control.
In the page generation apparatus provided in this embodiment of the application, the configuration information obtaining module obtains configuration information, where the configuration information includes page data corresponding to a target page, the page data includes at least one piece of control information and a database table path for generating a control, and the database table path for generating a control is analyzed by the analysis module, to determine database table field information corresponding to each piece of control information, and then, the control generating module generates a control corresponding to the database table field information according to the database table field information and a preset data attribute rule, where the data attribute rule is used to describe a field attribute corresponding to the control, and then, the page generating module performs composition rendering on the control included in the target page, so as to generate the target page. According to the scheme, the relation between each control and the database table field can be directly established, the controls corresponding to the database table field information can be automatically and quickly generated, and then the corresponding target page can be generated, a front-end developer does not need to write and modify a large number of codes and jointly adjust a plurality of complex interfaces, so that the workload of the developer is reduced, the probability of data errors is reduced, and the page generation efficiency is improved.
On the other hand, the device provided by the embodiment of the present application includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the page generation method as described above when executing the program.
Referring to fig. 10, fig. 10 is a schematic structural diagram of a computer system of a terminal device according to an embodiment of the present application.
As shown in fig. 10, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 703 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM702, and the RAM703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. 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, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a machine-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 703 and/or installed from the removable medium 711. The computer program executes the above-described functions defined in the system of the present application when executed by the Central Processing Unit (CPU) 701.
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 two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, and may be described as: a processor, comprising: the device comprises a configuration information acquisition module, an analysis module, a control generation module and a page generation module. The names of these units or modules do not form a limitation on the units or modules themselves in some cases, for example, the configuration information obtaining module may also be described as "obtaining configuration information, the configuration information including page data corresponding to a target page, the page data including at least one control information".
As another aspect, the present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may be separate and not incorporated into the electronic device. The computer-readable storage medium stores one or more programs that, when executed by one or more processors, perform the page generation method described in the present application:
acquiring configuration information, wherein the configuration information comprises page data corresponding to a target page, and the page data comprises at least one control information and a database table path for generating the control;
analyzing the database table path, and determining the database table field information corresponding to each control information;
generating 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 for describing the field attribute corresponding to the control;
and performing typesetting rendering on the control contained in the target page to generate the target page.
To sum up, according to the page generation method, apparatus, device, and storage medium provided in this embodiment of the present application, configuration information is obtained, where the configuration information includes page data corresponding to a target page, the page data includes at least one control information and a database table path for generating a control, the database table path for generating a control is analyzed, database table field information corresponding to each control information is determined, a control corresponding to the database table field information is generated according to the database table field information and a preset data attribute rule, the data attribute rule is used to describe field attributes corresponding to the control, and then the control included in the target page is typesetted and rendered, so as to generate the target page. According to the scheme, the relation between each control and the database table field can be directly established, the controls corresponding to the database table field information can be automatically and quickly generated, and then the corresponding target page can be generated, a front-end developer does not need to write and modify a large number of codes and jointly adjust a plurality of complex interfaces, so that the workload of the developer is reduced, the probability of data errors is reduced, and the page generation efficiency is improved.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present application is not limited to the embodiments with a specific combination of the above-mentioned features, but also covers other embodiments with any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. A page generation method, characterized in that the method comprises:
acquiring configuration information, wherein the configuration information comprises page data corresponding to a target page, and the page data comprises at least one control information and a database table path for generating the control;
analyzing the database table path, and determining the database table field information corresponding to each control information;
generating 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 for describing the field attribute corresponding to the control;
and performing typesetting rendering on the control contained in the target page to generate the target page.
2. The method of claim 1, wherein the configuration information further includes a control mapping rule, and generating a control corresponding to the database table field information according to the database table field information and a preset data attribute rule includes:
determining a field type corresponding to the control according to the database field information;
and generating a control corresponding to the field information of the database table according to the control mapping rule based on the field type and the preset data attribute rule.
3. The method according to claim 1, wherein after performing layout rendering on the controls included in the target page and generating the target page, the method further comprises:
when touch operation on a target control on the target page is detected, controlling the control state of the target control to be an operable state, wherein the target control is any one control on the target page;
when the touch operation on the target control is detected to be completed, acquiring business operation data on the target control;
based on the control information and the data attribute rule, verifying the service operation data;
and after the verification is passed, storing the business operation data into a database table corresponding to the target control based on the mapping relation between the target control and the database table, and controlling the control state of the target control to be a non-operation state.
4. The method of claim 3, wherein verifying the business operation data based on the control information and data attribute rules comprises:
analyzing the service operation data, and determining a target event and an event attribute corresponding to the touch operation;
checking whether a target event and an event attribute corresponding to the touch operation meet a data attribute rule corresponding to the control information;
and if the data attribute rule corresponding to the control information is met, the business operation data is verified to pass.
5. The method of claim 4, wherein after the business operation data is verified, the method further comprises:
and executing a target event corresponding to the touch operation.
6. The method of claim 3, further comprising:
monitoring behavior operation data of the target control, wherein the behavior operation data comprises operation behaviors and operation records of the target control;
processing the operation behavior, the operation record and the service operation data to obtain an audit record of the target control;
and storing the audit record of the target control into an audit record database table.
7. The method of claim 6, wherein after storing the audit record of the target control in an audit record database table, the method further comprises:
receiving and responding to a control operation checking instruction, wherein the control operation checking instruction carries a control identification;
based on the control identification, searching an audit record corresponding to the control identification from the audit record database table;
and displaying the audit record in a target area corresponding to the control.
8. An apparatus for generating a page, the apparatus comprising:
the configuration information acquisition module is used for acquiring configuration information, wherein the configuration information comprises page data corresponding to a target page, and the page data comprises at least one control piece of information;
the analysis module is used for analyzing the database table path and determining the database table field information corresponding to each control information;
the control generation module is used for generating 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 for describing the field attribute corresponding to the control;
and the page generation module is used for performing typesetting rendering on the control contained in the target page to generate the target page.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor being configured to implement the page generation method of any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon for implementing the page generation method according to any one of claims 1 to 7.
CN202110484338.9A 2021-04-30 2021-04-30 Page generation method, device, equipment and storage medium Pending CN113076104A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110484338.9A CN113076104A (en) 2021-04-30 2021-04-30 Page generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110484338.9A CN113076104A (en) 2021-04-30 2021-04-30 Page generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113076104A true CN113076104A (en) 2021-07-06

Family

ID=76616605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110484338.9A Pending CN113076104A (en) 2021-04-30 2021-04-30 Page generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113076104A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115221178A (en) * 2022-08-10 2022-10-21 北京国电通网络技术有限公司 Data table binding method and device, electronic equipment and computer readable medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115221178A (en) * 2022-08-10 2022-10-21 北京国电通网络技术有限公司 Data table binding method and device, electronic equipment and computer readable medium

Similar Documents

Publication Publication Date Title
US11449379B2 (en) Root cause and predictive analyses for technical issues of a computing environment
US10592837B2 (en) Identifying security risks via analysis of multi-level analytical records
US10075462B2 (en) System and user context in enterprise threat detection
US20180349257A1 (en) Systems and methods for test prediction in continuous integration environments
US8601438B2 (en) Data transformation based on a technical design document
US20130036172A1 (en) Sharing form training result utilizing a social network
US20190196861A1 (en) System for detecting impairment issues of distributed hosts
US20180060415A1 (en) Language tag management on international data storage
US20070016544A1 (en) Best practices analyzer
US10853440B2 (en) Displaying an object having a link to a database record in response to a user selection of a highlighted reference
US11003563B2 (en) Compliance testing through sandbox environments
US20200250587A1 (en) Framework for multi-tenant data science experiments at-scale
CN110023901A (en) System and method for updating multilayer application stack based on cloud
CN111414350A (en) Service generation method and device
CN113076104A (en) Page generation method, device, equipment and storage medium
US20180365333A1 (en) Enhanced web browsing
US11307850B2 (en) Efficient change analysis in poly-lingual corpus hierarchies
CN113935847A (en) Online process risk processing method, device, server and medium
CN109409419B (en) Method and apparatus for processing data
CN113760317A (en) Page display method, device, equipment and storage medium
US10956309B2 (en) Source code management systems and methods
CN111125064A (en) Method and device for generating database mode definition statement
CN111741046B (en) Data reporting method, data acquisition method, device, equipment and medium
US11347492B2 (en) Software deployment control using blockchain
US20220114189A1 (en) Extraction of structured information from unstructured documents

Legal Events

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