A front-end and back-end development management method and device, computer equipment and storage medium
Patent Information
- Application Number
- CN202310717608.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-16
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-06-16
AI Technical Summary
[0004]本申请实施例的目的在于提出一种前后端开发管理方法、装置、计算机设备及存储介质,以解决现有前后端开发管理方案存在的开发成本高、开发周期长和开发效率低的技术问题
[0057]This application discloses a front-end and back-end development management method, apparatus, computer equipment, and storage medium, belonging to the fields of software development technology and property insurance finance. This application defines a general-format JSON configuration file and stores it in a back-end database; calls a first interface provided by the back-end and transmits page configuration parameters stored in the back-end database to the front-end through the first interface; instructs the front-end to generate a configuration template page based on the page configuration parameters; obtains the user's first page operation on the configuration template page, calls a second interface provided by the back-end, and transmits the first page operation to the back-end database through the second interface; finds the corresponding SQL statement based on the JSON configuration file; executes the SQL statement, and returns the execution result to the front-end for display. This application sets up a front-end and back-end development framework based on template configuration through a configuration template page. The front-end only needs to configure the attributes and styles of elements such as display fields, edit fields, and buttons in the configuration file, while the back-end only needs to provide a general API interface and database CRUD operations. The front-end and back-end do not need to repeatedly write repetitive code; rapid development of data management pages can be achieved through simple configuration, greatly reducing workload and development time.
Smart Images

Figure CN116661763B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the fields of software development technology and property insurance finance, and specifically relates to a front-end and back-end development management method, device, computer equipment and storage medium. Background Technology
[0002] An insurance product data management platform is a platform used to manage the sales and customer data of insurance products. This platform can include many different functions, such as data collection, data storage, report generation, analysis, and visualization.
[0003] Currently, front-end and back-end developers of insurance product data management platforms need to write a large amount of repetitive code to implement page display, interaction, data operation and other functions. This not only wastes time and energy, but also easily leads to errors and redundant code. Moreover, when multiple pages have similar functions, a large amount of code needs to be written repeatedly, resulting in high code duplication rate and high maintenance costs. In addition, frequent communication between the front-end and back-end is required, which can easily lead to communication costs and misunderstandings, and may also cause incompatibility issues between the front-end and back-end interfaces. All of these problems increase development costs and time, and reduce development efficiency and quality. Summary of the Invention
[0004] The purpose of this application is to provide a front-end and back-end development management method, apparatus, computer equipment, and storage medium to solve the technical problems of high development cost, long development cycle, and low development efficiency in existing front-end and back-end development management solutions.
[0005] To address the aforementioned technical problems, this application provides a front-end and back-end development management method, employing the following technical solution:
[0006] A front-end and back-end development management method, including:
[0007] Define a JSON configuration file with a common format and save the JSON configuration file in the backend database;
[0008] Call the first interface provided by the backend, and transmit the page configuration parameters stored in the backend database to the frontend through the first interface;
[0009] Instruct the front-end to generate a configuration template page based on the page configuration parameters;
[0010] The system retrieves the user's first page operation on the configuration template page, calls the second interface provided by the backend, and transmits the first page operation to the backend database through the second interface.
[0011] Based on the JSON configuration file, find the SQL statement corresponding to the operation on the first page;
[0012] Execute the SQL statement and return the execution result to the front end for display.
[0013] Furthermore, before calling the first interface provided by the backend and transmitting the page configuration parameters stored in the backend database to the frontend through the first interface, the method further includes:
[0014] Receive the page generation instruction of the configuration template page, and parse the page generation instruction to obtain the page configuration requirements;
[0015] The page configuration parameters in the backend database are based on the page configuration requirements.
[0016] Furthermore, the instruction to the front-end to generate a configuration template page based on the page configuration parameters specifically includes:
[0017] Obtain the front-end page configuration information and generate the page structure based on the front-end page configuration information;
[0018] Find a matching page component in the front-end UI component library and add the page component to the page structure;
[0019] The page structure after adding the page components is rendered according to the page configuration parameters to generate the configuration template page.
[0020] Furthermore, after rendering the page structure with the added page components according to the page configuration parameters to generate the configuration template page, the method further includes:
[0021] Obtain the target element for which the event needs to be bound from the page configuration requirements;
[0022] Locate the target element on the configuration template page and bind the corresponding event to the target element.
[0023] Furthermore, the page component includes page tracking points. The step of obtaining the user's first page operation on the configuration template page, calling a second interface provided by the backend, and transmitting the first page operation to the backend database through the second interface specifically includes:
[0024] The user's first page operation on the configuration template page is obtained through the aforementioned page tracking points;
[0025] Determine the type of operation on the first page;
[0026] The matching second interface is invoked according to the type of the first page operation, and the first page operation is transmitted to the backend database through the matching second interface.
[0027] Furthermore, the JSON configuration file includes a preprocessor, which, before searching for the SQL statement corresponding to the first page operation based on the JSON configuration file, further includes:
[0028] Parse the first page operation to obtain the first operation logic corresponding to the first page operation;
[0029] Determine whether the first operation logic meets the preset operation conditions;
[0030] If the conditions are met, the first page operation is preprocessed by the preprocessor to obtain the preprocessing result.
[0031] The step of finding the SQL statement corresponding to the operation on the first page based on the JSON configuration file specifically includes:
[0032] Find the first SQL statement information corresponding to the preprocessing result in the JSON configuration file;
[0033] Search the backend database for a first SQL statement that matches the information of the first SQL statement.
[0034] Instruct the front end to call the first SQL statement via JDBC.
[0035] Furthermore, the JSON configuration file includes a post-processor that, after executing the SQL statement and returning the execution result to the front end for display, also includes:
[0036] Get user input for the second page operation;
[0037] Parse the second page operation to obtain the second operation logic corresponding to the second page operation;
[0038] Determine whether the second operation logic meets the preset operation conditions;
[0039] If the conditions are met, the second page operation is preprocessed by the post-processor to obtain the post-preprocessing result;
[0040] After the second page operation is preprocessed by the post-processor to obtain the post-preprocessing result, the method further includes:
[0041] Find the second SQL statement information corresponding to the post-preprocessing result in the JSON configuration file;
[0042] Search the backend database for a second SQL statement that matches the information in the second SQL statement.
[0043] Instruct the front end to call the second SQL statement via JDBC.
[0044] To address the aforementioned technical problems, this application also provides a front-end and back-end development management device, which employs the following technical solution:
[0045] A front-end and back-end development management device, comprising:
[0046] The configuration file module is used to define a common format JSON configuration file and save the JSON configuration file in the backend database;
[0047] The first interface module is used to call the first interface provided by the backend and transmit the page configuration parameters stored in the backend database to the frontend through the first interface;
[0048] The page generation module is used to instruct the front end to generate a configuration template page based on the page configuration parameters;
[0049] The second interface module is used to obtain the user's first page operation on the configuration template page, call the second interface provided by the backend, and transmit the first page operation to the backend database through the second interface;
[0050] The SQL statement lookup module is used to find the SQL statement corresponding to the operation on the first page based on the JSON configuration file.
[0051] The SQL statement execution module is used to execute the SQL statement and return the execution result to the front end for display.
[0052] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution:
[0053] A computer device includes a memory and a processor, the memory storing computer-readable instructions, the processor executing the computer-readable instructions to implement the steps of the front-end and back-end development management method as described in any of the preceding claims.
[0054] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solution described below:
[0055] A computer-readable storage medium storing computer-readable instructions, which, when executed by a processor, implement the steps of the front-end and back-end development management method as described in any one of the above descriptions.
[0056] Compared with the prior art, the embodiments of this application have the following main advantages:
[0057] This application discloses a front-end and back-end development management method, apparatus, computer equipment, and storage medium, belonging to the fields of software development technology and property insurance finance. This application defines a general-format JSON configuration file and stores it in a back-end database; calls a first interface provided by the back-end and transmits page configuration parameters stored in the back-end database to the front-end through the first interface; instructs the front-end to generate a configuration template page based on the page configuration parameters; obtains the user's first page operation on the configuration template page, calls a second interface provided by the back-end, and transmits the first page operation to the back-end database through the second interface; finds the corresponding SQL statement based on the JSON configuration file; executes the SQL statement, and returns the execution result to the front-end for display. This application sets up a front-end and back-end development framework based on template configuration through a configuration template page. The front-end only needs to configure the attributes and styles of elements such as display fields, edit fields, and buttons in the configuration file, while the back-end only needs to provide a general API interface and database CRUD operations. The front-end and back-end do not need to repeatedly write repetitive code; rapid development of data management pages can be achieved through simple configuration, greatly reducing workload and development time. Attached Figure Description
[0058] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0059] Figure 1 An exemplary system architecture diagram is shown, in which this application can be applied;
[0060] Figure 2 A flowchart of one embodiment of the front-end and back-end development management method according to this application is shown;
[0061] Figure 3 A schematic diagram of the structure of one embodiment of the front-end and back-end development management device according to this application is shown;
[0062] Figure 4 A schematic diagram of the structure of one embodiment of a computer device according to this application is shown. Detailed Implementation
[0063] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.
[0064] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0065] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0066] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0067] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.
[0068] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.
[0069] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103. The server can be a standalone server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0070] It should be noted that the front-end and back-end development management methods provided in this application are generally executed by the server, and correspondingly, the front-end and back-end development management devices are generally set in the server.
[0071] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0072] Continue to refer to Figure 2 The diagram illustrates a flowchart of an embodiment of the front-end and back-end development management method according to this application. This embodiment can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that utilize digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0073] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0074] Suppose there's a requirement to implement a simple data management page, including functions such as displaying a data list, adding, editing, and deleting data. Without a template-configured development framework, the front-end needs to write various styles, interaction logic, and calls to the back-end API, while the back-end needs to write API interfaces to interface with the front-end and implement corresponding database CRUD operations. The whole process is quite tedious and time-consuming.
[0075] To address the aforementioned technical issues, this application discloses a front-end and back-end development management method, apparatus, computer equipment, and storage medium, belonging to the fields of software development technology and property insurance and finance. This application sets up a front-end and back-end development framework based on template configuration through a configuration template page. The front-end only needs to configure the attributes and styles of elements such as display fields, editing fields, and buttons in the configuration file, while the back-end only needs to provide common API interfaces and database CRUD operations. The front-end and back-end do not need to repeatedly write repetitive code, and the rapid development of data management pages can be achieved through simple configuration, greatly reducing workload and development time.
[0076] The aforementioned front-end and back-end development management method includes the following steps:
[0077] S201 defines a common format JSON configuration file and stores the JSON configuration file in the backend database.
[0078] In this embodiment, the backend needs to pre-set a common JSON format configuration file to configure the basic functions and display methods of the page. This configuration file should contain the page's field information, including field names, field types, default values, and whether they are required. It also needs to configure the page's query conditions, sorting rules, pagination methods, and other information. In one embodiment of this application, the JSON format configuration file may contain SQL statements for operations such as adding, editing, deleting, importing, and exporting.
[0079] It's important to note that for each page, the server creates a corresponding JSON file on the backend to configure the page's basic functionality—this is the JSON configuration file. This includes things like display fields, formatting styles, query conditions, buttons, add fields, and edit fields. The JSON configuration file defines the database tables and corresponding fields required for the page, as well as the corresponding SQL statements for operations such as querying, adding, modifying, deleting, importing, and exporting.
[0080] S202 calls the first interface provided by the backend and transmits the page configuration parameters stored in the backend database to the frontend through the first interface.
[0081] In this embodiment, the backend needs to provide an interface, namely the first interface, for the frontend to call. Through this interface, the page configuration parameters in the JSON configuration file are returned to the frontend. Typically, the backend will read the information in the JSON configuration file, convert it into the corresponding data structure, such as a Java object or a Map, and then return the object or Map to the frontend through the first interface.
[0082] Furthermore, before calling the first interface provided by the backend and transmitting the page configuration parameters stored in the backend database to the frontend through the first interface, the process also includes:
[0083] Receive the page generation instruction for the configuration template page, parse the page generation instruction to obtain the page configuration requirements;
[0084] Based on the page configuration requirements, the corresponding page configuration parameters are retrieved from the backend database.
[0085] In this embodiment, the server receives the page generation instruction for the configuration template page, parses the page generation instruction to obtain the page configuration requirements. The page configuration requirements can be page development requirements preset by the developers according to the development needs. The server reads the corresponding page configuration parameters from the backend database according to the page configuration requirements so that the frontend can call the parameters to render the page.
[0086] In this embodiment, the front-end and back-end development and management methods run on electronic devices (e.g., Figure 1 The server shown can receive page generation instructions for the configuration template page via wired or wireless connection. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G, WiFi, Bluetooth, WiMAX, Zigbee, UWB (ultra-wideband), and other currently known or future wireless connection methods.
[0087] S203 instructs the front-end to generate a configuration template page based on the page configuration parameters.
[0088] In this embodiment, after receiving the page configuration parameters returned by the backend, the frontend can generate the corresponding template page based on these parameters. Typically, the frontend uses a JS framework (such as Vue or React) to generate page components, then applies the information from the page configuration parameters to the components to generate the final page display. It should be noted that the backend provides a set of general CRUD (Create, Read, Update, Delete) and import / export interfaces, and the template page generated by the frontend will call the corresponding interfaces according to the configured functions.
[0089] Furthermore, the front-end is instructed to generate a configuration template page based on the page configuration parameters, specifically including:
[0090] Obtain the front-end page configuration information and generate the page structure based on the front-end page configuration information;
[0091] Find matching page components in the front-end UI component library and add the page components to the page structure;
[0092] The page structure after adding page components is rendered based on the page configuration parameters, and a configuration template page is generated.
[0093] In this embodiment, the front-end obtains the page's configuration information by calling the back-end's API. The back-end returns a JSON-formatted configuration file containing various configuration information, component information, and API information for interacting with the back-end. The front-end generates the page structure based on this configuration information, including components such as tables, forms, and buttons, and binds corresponding events. These components can be generated using existing front-end UI component libraries or developed in-house. The front-end uses AJAX to call the back-end API to retrieve data and render it on the page. The data request can be constructed based on the configuration information to create corresponding API request parameters. After obtaining the configuration parameters, the front-end can process and format them before rendering them into the corresponding components on the page for display to the user.
[0094] Furthermore, after rendering the page structure with added page components based on the page configuration parameters and generating the configuration template page, it also includes:
[0095] Obtain the target element for which events need to be bound from the page configuration requirements;
[0096] Locate the target element on the configuration template page and bind the corresponding event to the target element.
[0097] In this embodiment, after obtaining the page's configuration information, the front-end can generate the page structure based on the configuration information, including components such as tables, forms, and buttons, and bind corresponding events. Event binding can use various JavaScript frameworks or libraries, such as jQuery, Vue, and React. Generally, event binding involves first selecting the element to which the event needs to be bound, and then using the binding method to bind the event handler to that element. This way, when the user triggers the event, the corresponding event handler will be invoked. For example, jQuery methods can be used to bind event handlers:
[0098] $(document).on('click','#buttonId',function(){ / / event handler code});
[0099] The code above binds an event handler to an object, which will execute when the element is clicked. When binding event handlers, the corresponding code can be dynamically generated based on the page's configuration information, thus achieving flexible event binding.
[0100] S204 retrieves the user's first page operation on the configuration template page, calls the second interface provided by the backend, and transmits the first page operation to the backend database through the second interface.
[0101] In this embodiment, the backend needs to provide a set of general interfaces, namely the second interface, for handling operations such as adding, deleting, modifying, querying, importing, and exporting pages. The server obtains the user's first page operations on the configuration template page, calls the second interface provided by the backend, and transmits the first page operations to the backend database through the second interface.
[0102] After the user edits and selects configurations, the frontend sends this configuration information to the backend via an API. The backend then generates SQL statements based on the received configuration information to perform the corresponding CRUD operations. These operations can be implemented using an ORM framework, such as MyBatis. After executing the SQL operations, the backend returns the results to the frontend for display, allowing users to view and manage the data. The backend also needs to provide file import / export APIs so users can quickly import and export data.
[0103] Furthermore, the page component includes page tracking points to capture the user's first page action on the configuration template page, call the second interface provided by the backend, and transmit the first page action to the backend database through the second interface, specifically including:
[0104] Capture user actions on the first page of the configuration template page through page tracking;
[0105] Determine the type of operation on the first page;
[0106] The matching second interface is invoked based on the type of operation on the first page, and the operation on the first page is transmitted to the backend database through the matching second interface.
[0107] In this embodiment, the second interface is a set of general interfaces, including multiple interface channels, which are used for operations such as adding, deleting, modifying, querying, importing, and exporting. The server obtains the user's first page operation on the configuration template page through page tracking points, determines the type of the first page operation, calls the matching second interface according to the type of the first page operation, and transmits the first page operation to the backend database through the matching second interface.
[0108] In one embodiment of this application, for page operations with relatively complex logic, a pre-processor or post-processor can be configured in the JSON configuration file for each function to improve processing efficiency, reduce server pressure, and realize personalized functions.
[0109] For example, suppose you have a product list page that needs to dynamically display different action buttons based on the currently logged-in user's role. You can add a pre-processor to the JSON configuration file. Before calling the data query interface, determine which action buttons to display based on the currently logged-in user's role, then configure the corresponding action buttons and event binding functions in the JSON file, and finally generate the page and bind the events. This achieves the personalized function of dynamically displaying action buttons based on the user's role and reduces the subsequent data processing load on the server. Similarly, you can configure a post-processor in the JSON file to perform special processing on the data after the data query, such as filtering sensitive information or encrypting the data.
[0110] S205, find the SQL statement corresponding to the operation on the first page based on the JSON configuration file.
[0111] In this embodiment, the server searches for the SQL statement information corresponding to the operation on the first page in the JSON configuration file, and searches for the SQL statement that matches the SQL statement information in the backend database.
[0112] It's important to note that while SQL statements can be directly saved in a JSON configuration file, this method is susceptible to security vulnerabilities such as SQL injection. Therefore, this application stores the SQL statements in the backend database instead of directly in the JSON configuration file. The JSON configuration file stores the ID or name of the SQL statement. The frontend retrieves the SQL statement by calling the corresponding API and executes it via JDBC. This approach effectively protects system security while also simplifying development and maintenance.
[0113] In one specific embodiment of this application, taking an insurance product data management platform as an example, a JSON configuration file in a general format can be defined and stored in a backend database. Then, an interface is called to pass the page configuration parameters stored in the backend database to the frontend, allowing the frontend to generate a configuration template page based on these parameters. Users can then perform page operations, which are transmitted to the backend database via a second interface. The backend searches for the corresponding SQL statement based on the JSON configuration file, executes the query or operation, and returns the result to the frontend for display. This technical solution separates the frontend and backend development of the insurance product data management platform, making development more efficient and flexible, while providing flexible query and operation functions.
[0114] Furthermore, the JSON configuration file includes a preprocessor that, before searching for the SQL statement corresponding to the operation on the first page based on the JSON configuration file, also includes:
[0115] Parse the operations on the first page and obtain the first operation logic corresponding to the operations on the first page.
[0116] Determine whether the first operation logic meets the preset operation conditions;
[0117] If the conditions are met, the first page operation is preprocessed by the preprocessor to obtain the preprocessing result.
[0118] Based on the JSON configuration file, find the SQL statement corresponding to the operation on the first page, specifically including:
[0119] Find the first SQL statement information corresponding to the preprocessing result in the JSON configuration file;
[0120] Search the backend database for the first SQL statement that matches the information of the first SQL statement.
[0121] Instruct the front end to call the first SQL statement via JDBC.
[0122] In this embodiment, the server parses the first page operation, obtains the first operation logic corresponding to the first page operation, and determines whether the first operation logic meets preset operation conditions. If the first operation logic meets the preset operation conditions, i.e., the first operation logic is complex operation logic, then the first page operation is preprocessed by a preprocessor to obtain a preprocessing result. Specifically, the server searches for the first SQL statement information corresponding to the preprocessing result in the JSON configuration file, searches for the first SQL statement matching the first SQL statement information in the backend database, instructs the frontend to call the first SQL statement via JDBC, and executes the first SQL statement.
[0123] If the first operation logic does not meet the preset operation conditions, that is, the first operation logic is a simple operation logic, then there is no need to call the preprocessor for preprocessing. Instead, the third SQL statement information corresponding to the first page operation is directly searched in the JSON configuration file, and the third SQL statement matching the third SQL statement information is searched in the backend database. The frontend is then instructed to call the third SQL statement through JDBC and execute the third SQL statement.
[0124] For example, the preset operating conditions are as follows:
[0125] 1. Does the page operation require multiple interactions to complete? For example, does it require a query operation first, and then an editing or deletion operation based on the query results, or does it require a series of judgments to complete the operation?
[0126] 2. Does the page operation result need to display multiple modules, and do these modules have complex interactions, such as updating the data of another module based on the selection result of one module?
[0127] 3. Does the page operation require a large amount of data calculation and processing, such as data statistics or chart display?
[0128] If a page operation meets any one or a combination of the above conditions, then the page operation can be considered relatively complex and requires the configuration of a pre-processor or post-processor to realize personalized functions.
[0129] S206 executes the SQL statement and returns the execution result to the front end for display.
[0130] In this embodiment, the front end obtains the SQL statement by calling the corresponding interface, executes the SQL statement through JDBC, and returns the execution result to the front end for display.
[0131] Furthermore, the JSON configuration file includes a post-processor that, after executing the SQL statement and returning the result to the front end for display, also includes:
[0132] Get user input for the second page operation;
[0133] Parse the second page operation and obtain the second operation logic corresponding to the second page operation;
[0134] Determine whether the second operation logic meets the preset operation conditions;
[0135] If the conditions are met, the second page operation is preprocessed by the post-processor to obtain the post-preprocessing result;
[0136] After preprocessing the second page operations using a post-processor to obtain the post-preprocessing result, the process also includes:
[0137] Find the second SQL statement information corresponding to the post-preprocessing result in the JSON configuration file;
[0138] Search the backend database for the second SQL statement that matches the information in the second SQL statement.
[0139] Instruct the front end to call the second SQL statement via JDBC.
[0140] In this embodiment, the server obtains the second page operation input by the user, parses the second page operation, obtains the second operation logic corresponding to the second page operation, and determines whether the second operation logic meets the preset operation conditions. If the second operation logic meets the preset operation conditions, that is, the second operation logic is complex operation logic, then the second page operation is preprocessed by a post-processor to obtain a post-preprocessing result. Specifically, the server searches for the second SQL statement information corresponding to the post-preprocessing result in the JSON configuration file, searches for the second SQL statement matching the second SQL statement information in the backend database, instructs the frontend to call the second SQL statement via JDBC, and executes the second SQL statement.
[0141] If the second operation logic does not meet the preset operation conditions, that is, the second operation logic is a simple operation logic, then there is no need to call the post-processor for preprocessing. Instead, the fourth SQL statement information corresponding to the second page operation is directly searched in the JSON configuration file, and the fourth SQL statement matching the fourth SQL statement information is searched in the backend database. The frontend is then instructed to call the fourth SQL statement through JDBC and execute the fourth SQL statement.
[0142] In the above embodiments, for some page operations with complex logic, it may be necessary to perform additional logical processing before or after processing interface data. In this case, corresponding pre-processors or post-processors can be configured in the JSON configuration file to improve processing efficiency, reduce server load, and implement personalized functions. Typically, pre-processors or post-processors can be Java classes or JavaScript functions. The front-end or back-end can dynamically load the corresponding processor code based on the processor name in the configuration file. When executing interface operations, the processors will be called sequentially to complete various additional logical operations.
[0143] This application discloses a front-end and back-end development management method, belonging to the fields of software development technology and property insurance finance. This application defines a general-format JSON configuration file and stores it in a back-end database; it calls a first interface provided by the back-end, transmitting page configuration parameters stored in the back-end database to the front-end; it instructs the front-end to generate a configuration template page based on the page configuration parameters; it obtains the user's first page operation on the configuration template page, calls a second interface provided by the back-end, and transmits the first page operation to the back-end database through the second interface; it finds the corresponding SQL statement based on the JSON configuration file; it executes the SQL statement and returns the execution result to the front-end for display. This application sets up a front-end and back-end development framework based on template configuration through a configuration template page. The front-end only needs to configure the attributes and styles of elements such as display fields, edit fields, and buttons in the configuration file, while the back-end only needs to provide a general API interface and database CRUD operations. The front-end and back-end do not need to repeatedly write repetitive code; rapid development of data management pages can be achieved through simple configuration, greatly reducing workload and development time.
[0144] It should be emphasized that, in order to further ensure the privacy and security of the user's page operations, the user's page operations can also be stored in a blockchain node.
[0145] The blockchain referred to in this application is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.
[0146] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware with computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium, and when executed, they can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0147] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0148] Further reference Figure 3 As a response to the above Figure 2 The implementation of the method shown in this application provides an embodiment of a front-end and back-end development management device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0149] like Figure 3 As shown, the front-end and back-end development management device 300 described in this embodiment includes:
[0150] Configuration file module 301 is used to define a common format JSON configuration file and save the JSON configuration file in the backend database;
[0151] The first interface module 302 is used to call the first interface provided by the backend and transmit the page configuration parameters stored in the backend database to the frontend through the first interface;
[0152] Page generation module 303 is used to instruct the front end to generate a configuration template page based on the page configuration parameters;
[0153] The second interface module 304 is used to obtain the user's first page operation on the configuration template page, call the second interface provided by the backend, and transmit the first page operation to the backend database through the second interface;
[0154] SQL statement lookup module 305 is used to find the SQL statement corresponding to the operation on the first page based on the JSON configuration file.
[0155] The SQL statement execution module 306 is used to execute SQL statements and return the execution results to the front end for display.
[0156] Furthermore, the front-end and back-end development management device 300 also includes:
[0157] The instruction receiving module is used to receive page generation instructions for the configuration template page, parse the page generation instructions to obtain page configuration requirements;
[0158] The parameter lookup module is used to retrieve the corresponding page configuration parameters from the backend database based on the page configuration requirements.
[0159] Furthermore, the page generation module 303 specifically includes:
[0160] The page structure generation unit is used to obtain front-end page configuration information and generate page structure based on the front-end page configuration information.
[0161] The page component import unit is used to find matching page components in the front-end UI component library and add the page components to the page structure;
[0162] The page rendering unit is used to render the page structure after adding page components according to the page configuration parameters, and generate the configuration template page.
[0163] Furthermore, the page generation module 303 also includes:
[0164] The element determination unit is used to obtain the target element that needs to be bound to the event from the page configuration requirements;
[0165] The event binding unit is used to locate the target element on the configuration template page and bind the corresponding event to the target element.
[0166] Furthermore, the page components include page tracking points, and the second interface module 304 specifically includes:
[0167] The first operation acquisition unit is used to acquire the user's first page operation on the configuration template page through page tracking.
[0168] The operation type determination unit is used to determine the type of operation on the first page;
[0169] The second interface calling unit is used to call the matching second interface according to the type of the first page operation, and transmit the first page operation to the backend database through the matching second interface.
[0170] Furthermore, the JSON configuration file includes a preprocessor, and the front-end and back-end development management device 300 also includes:
[0171] The first parsing module is used to parse the first page operation and obtain the first operation logic corresponding to the first page operation.
[0172] The first logic judgment module is used to determine whether the first operation logic meets the preset operation conditions;
[0173] The preprocessing module is used to preprocess the first page operation through the preprocessor when the condition is met, and obtain the preprocessing result.
[0174] The SQL statement lookup module 305 specifically includes:
[0175] The first statement lookup unit is used to find the first SQL statement information corresponding to the preprocessing result in the JSON configuration file.
[0176] The first statement matching unit is used to find the first SQL statement that matches the first SQL statement information in the backend database;
[0177] The first JDBC call unit is used to instruct the front end to call the first SQL statement via JDBC.
[0178] Furthermore, the JSON configuration file includes a post-processor, and the front-end and back-end development management device 300 also includes:
[0179] Get user input for the second page operation;
[0180] The second parsing module is used to parse the second page operation and obtain the second operation logic corresponding to the second page operation.
[0181] The second logic judgment module is used to determine whether the second operation logic meets the preset operation conditions;
[0182] The post-preprocessing module is used to preprocess the second page operation through the post-processor when the condition is met, and obtain the post-preprocessing result.
[0183] The front-end and back-end development management device 300 also includes:
[0184] The second statement lookup unit is used to find the second SQL statement information corresponding to the post-preprocessing result in the JSON configuration file.
[0185] The second statement matching unit is used to find the second SQL statement that matches the second SQL statement information in the backend database;
[0186] The second JDBC call unit is used to instruct the front end to call the second SQL statement via JDBC.
[0187] This application discloses a front-end and back-end development management device, belonging to the fields of software development technology and property insurance finance. This application defines a general-format JSON configuration file and stores it in a back-end database; it calls a first interface provided by the back-end and transmits page configuration parameters stored in the back-end database to the front-end through the first interface; it instructs the front-end to generate a configuration template page based on the page configuration parameters; it obtains the user's first page operation on the configuration template page, calls a second interface provided by the back-end, and transmits the first page operation to the back-end database through the second interface; it finds the corresponding SQL statement based on the JSON configuration file; it executes the SQL statement and returns the execution result to the front-end for display. This application sets up a front-end and back-end development framework based on template configuration through a configuration template page. The front-end only needs to configure the attributes and styles of elements such as display fields, edit fields, and buttons in the configuration file, while the back-end only needs to provide a general API interface and database CRUD operations. The front-end and back-end do not need to repeatedly write repetitive code; rapid development of data management pages can be achieved through simple configuration, greatly reducing workload and development time.
[0188] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0189] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected via a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0190] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.
[0191] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 4. Of course, the memory 41 may also include both the internal storage unit and its external storage device of the computer device 4. In this embodiment, the memory 41 is typically used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions for front-end and back-end development management methods. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or will be output.
[0192] In some embodiments, the processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute computer-readable instructions stored in the memory 41 or to process data, for example, to execute computer-readable instructions of the front-end and back-end development management method.
[0193] The network interface 43 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 4 and other electronic devices.
[0194] In the above embodiments, this application discloses a computer device belonging to the fields of software development technology and property insurance finance. This application defines a general-format JSON configuration file and stores it in a backend database; it calls a first interface provided by the backend and transmits the page configuration parameters stored in the backend database to the frontend through the first interface; it instructs the frontend to generate a configuration template page based on the page configuration parameters; it obtains the user's first page operation on the configuration template page, calls a second interface provided by the backend, and transmits the first page operation to the backend database through the second interface; it finds the SQL statement corresponding to the first page operation based on the JSON configuration file; it executes the SQL statement and returns the execution result to the frontend for display. This application sets up a frontend and backend development framework based on template configuration through a configuration template page. The frontend only needs to configure the attributes and styles of elements such as display fields, edit fields, and buttons in the configuration file, while the backend only needs to provide a general API interface and database CRUD operations. The frontend and backend do not need to repeatedly write repetitive code; rapid development of data management pages can be achieved through simple configuration, greatly reducing workload and development time.
[0195] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the front-end and back-end development management method described above.
[0196] In the above embodiments, this application discloses a storage medium, belonging to the fields of software development technology and property insurance finance. This application defines a general-format JSON configuration file and saves it in a backend database; it calls a first interface provided by the backend and transmits the page configuration parameters stored in the backend database to the frontend through the first interface; it instructs the frontend to generate a configuration template page based on the page configuration parameters; it obtains the user's first page operation on the configuration template page, calls a second interface provided by the backend, and transmits the first page operation to the backend database through the second interface; it finds the SQL statement corresponding to the first page operation based on the JSON configuration file; it executes the SQL statement and returns the execution result to the frontend for display. This application sets up a frontend and backend development framework based on template configuration through a configuration template page. The frontend only needs to configure the attributes and styles of elements such as display fields, edit fields, and buttons in the configuration file, while the backend only needs to provide a general API interface and database CRUD operations. The frontend and backend do not need to repeatedly write repetitive code; rapid development of data management pages can be achieved through simple configuration, greatly reducing workload and development time.
[0197] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0198] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0199] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.
Claims
1. A front-end and back-end development management method, characterized in that, include: Define a JSON configuration file with a general format and save the JSON configuration file in the backend database; Call the first interface provided by the backend, and transmit the page configuration parameters stored in the backend database to the frontend through the first interface; Instruct the front-end to generate a configuration template page based on the page configuration parameters; The system retrieves the user's first page operation on the configuration template page, calls the second interface provided by the backend, and transmits the first page operation to the backend database through the second interface. Based on the JSON configuration file, find the SQL statement corresponding to the operation on the first page; Execute the SQL statement and return the execution result to the front end for display. The step of obtaining the user's first page operation on the configuration template page, calling the second interface provided by the backend, and transmitting the first page operation to the backend database through the second interface specifically includes: The user's first page action on the configured template page is obtained through page tracking; Determine the type of operation on the first page; The matching second interface is invoked according to the type of the first page operation, and the first page operation is transmitted to the backend database through the matching second interface; The JSON configuration file contains a preprocessor, which, before searching for the SQL statement corresponding to the operation on the first page based on the JSON configuration file, further includes: Parse the first page operation to obtain the first operation logic corresponding to the first page operation; Determine whether the first operation logic meets the preset operation conditions; If the conditions are met, the first page operation is preprocessed by the preprocessor to obtain the preprocessing result. The step of finding the SQL statement corresponding to the operation on the first page based on the JSON configuration file specifically includes: Find the first SQL statement information corresponding to the preprocessing result in the JSON configuration file; Search the backend database for a first SQL statement that matches the information of the first SQL statement. Instruct the front end to call the first SQL statement via JDBC.
2. The front-end and back-end development management method as described in claim 1, characterized in that, Before calling the first interface provided by the backend and transmitting the page configuration parameters stored in the backend database to the frontend through the first interface, the method further includes: Receive the page generation instruction of the configuration template page, and parse the page generation instruction to obtain the page configuration requirements; The page configuration parameters in the backend database are based on the page configuration requirements.
3. The front-end and back-end development management method as described in claim 2, characterized in that, The instruction frontend generates a configuration template page based on the page configuration parameters, specifically including: Obtain the front-end page configuration information and generate the page structure based on the front-end page configuration information; Find matching page components in the front-end UI component library and add the page components to the page structure; The page structure after adding the page components is rendered according to the page configuration parameters to generate the configuration template page.
4. The front-end and back-end development management method as described in claim 3, characterized in that, After rendering the page structure with the added page components according to the page configuration parameters and generating the configuration template page, the process further includes: Obtain the target element for which the event needs to be bound from the page configuration requirements; Locate the target element on the configuration template page and bind the corresponding event to the target element.
5. The front-end and back-end development management method as described in claim 3, characterized in that, The page components include page tracking points.
6. The front-end and back-end development management method as described in claim 1, characterized in that, The JSON configuration file contains a post-processor that, after executing the SQL statement and returning the execution result to the front end for display, also includes: Get user input for the second page operation; Parse the second page operation to obtain the second operation logic corresponding to the second page operation; Determine whether the second operation logic meets the preset operation conditions; If the conditions are met, the second page operation is preprocessed by the post-processor to obtain the post-preprocessing result; After the second page operation is preprocessed by the post-processor to obtain the post-preprocessing result, the method further includes: Find the second SQL statement information corresponding to the post-preprocessing result in the JSON configuration file; Search the backend database for a second SQL statement that matches the information in the second SQL statement. Instruct the front end to call the second SQL statement via JDBC.
7. A front-end and back-end development management device, characterized in that, The front-end and back-end development management device implements the steps of the front-end and back-end development management method as described in any one of claims 1 to 6, wherein the front-end and back-end development management device includes: The configuration file module is used to define a common format JSON configuration file and save the JSON configuration file in the backend database; The first interface module is used to call the first interface provided by the backend and transmit the page configuration parameters stored in the backend database to the frontend through the first interface; The page generation module is used to instruct the front end to generate a configuration template page based on the page configuration parameters; The second interface module is used to obtain the user's first page operation on the configuration template page, call the second interface provided by the backend, and transmit the first page operation to the backend database through the second interface; The SQL statement lookup module is used to find the SQL statement corresponding to the operation on the first page based on the JSON configuration file. The SQL statement execution module is used to execute the SQL statement and return the execution result to the front end for display.
8. A computer device, characterized in that, It includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the front-end and back-end development management method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the front-end and back-end development management method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Dynamic allocation report data processing method based on two-dimension relationship
CN104657384A
Template marketing activity publishing method and template marketing activity publishing system
CN111857700A