A page rendering method and apparatus
Patent Information
- Application Number
- CN202510550736.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]现有的方法存在页面开发和渲染的代码耦合性较强,即使针对具有相似页面布局的不同页面,或者不同页面中包含的相似功能组件,均需要为每一个整体页面执行代码重复开发,并且针对页面的任意变更均需要重新打包和部署,可见,现有的页面开发方法存在开发效率较低,灵活性和扩展性较差的问题
[0025]上述发明中的一个实施例具有如下优点或有益效果:能够从多种版本的页面配置文件中查找匹配于页面版本的目标配置文件;根据目标配置文件,获取页面包含的多个页面处理区域以及各个页面处理区域包含的多个独立功能组件;从目标配置文件中解析出各个独立功能组件对应的数据配置信息,并为各个独立功能组件查找匹配的组件控制器;利用各个组件控制器以及对应的独立功能组件的数据配置信息,执行独立功能组件的页面处理逻辑;根据各个独立功能组件的页面处理逻辑得到的执行结果渲染页面的各个页面处理区域,提高了页面渲染的灵活性和通用性,提高了页面开发效率。
Smart Images

Figure CN123011222A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of application development technology, and in particular to a page rendering method and apparatus. Background Technology
[0002] Application system development typically includes front-end development and back-end development. Front-end page development and rendering often employ a coupled implementation approach using code development for request handling, business logic, and data interaction layers.
[0003] Existing methods suffer from strong code coupling between page development and rendering. Even for different pages with similar layouts or similar functional components within different pages, code needs to be repeatedly developed for each overall page. Furthermore, any changes to the page require repackaging and deployment. As such, existing page development methods suffer from low development efficiency, poor flexibility, and poor scalability. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a page rendering method and apparatus, which can search for a target configuration file matching the page version from multiple versions of page configuration files; obtain multiple page processing areas contained in the page and multiple independent functional components contained in each page processing area according to the target configuration file; parse the data configuration information corresponding to each independent functional component from the target configuration file, and find a matching component controller for each independent functional component; execute the page processing logic of the independent functional component using each component controller and the corresponding data configuration information of the independent functional component; and render each page processing area of the page according to the execution result obtained from the page processing logic of each independent functional component, thereby improving the flexibility and versatility of page rendering and improving page development efficiency.
[0005] To achieve the above objectives, according to one aspect of the present invention, a page rendering method is provided, characterized by comprising: obtaining a configuration file version identifier of the page; searching for a target configuration file matching the configuration file version identifier from multiple versions of page configuration files; obtaining, based on the target configuration file, multiple page processing areas contained in the page and multiple independent functional components contained in each page processing area; wherein, different independent functional components are used to process different types of data operations; parsing data configuration information corresponding to each independent functional component from the target configuration file, and finding a matching component controller for each independent functional component; executing the page processing logic of the independent functional components using the data configuration information of each component controller and the corresponding independent functional components; and rendering each page processing area of the page based on the execution result obtained from the page processing logic of each independent functional component.
[0006] Optionally, a page configuration parser is constructed; a corresponding component controller is constructed for each independent functional component; the page rendering method further includes: using the page configuration parser to perform the step of parsing the data configuration information corresponding to each independent functional component from the target configuration file; for each independent functional component, according to the type of the independent functional component, a corresponding component controller is constructed for the independent functional component, so as to use the component controller to execute the data processing logic of the independent functional component based on the data configuration information of the independent functional component.
[0007] Optionally, the data configuration information corresponding to each independent functional component is parsed, including: finding the component identifier of each independent functional component from the target configuration file, and finding one or more unit functional components contained in the independent functional component according to the component identifier; and parsing the data configuration information corresponding to one or more unit functional components.
[0008] Optionally, using the component controller, based on the data configuration information of the independent functional components, the data processing logic of the independent functional components is executed, including: obtaining the data source type included in the data configuration information corresponding to the independent functional components, determining the data adapter corresponding to the data source type according to the data source type; using the data adapter to obtain the page data processed by the independent functional components from the data source matching the data source type, and using the component controller to execute the data processing logic based on the page data.
[0009] Optionally, the page rendering method further includes: providing a visual page configuration template, wherein the visual page configuration template includes multiple template processing areas and multiple template-independent functional components contained in the template processing areas; receiving region configuration information for the template processing areas and / or data configuration information for one or more template-independent functional components input via the visual page configuration template; and generating a page configuration file for the page based on the region configuration information and / or data configuration information.
[0010] Optionally, generating a page configuration file for a page based on regional configuration information and / or data configuration information further includes: for a first page that has already been configured with one or more versions of page configuration files, generating a new version of the page configuration file for the first page in response to differences in regional configuration information and / or data configuration information; and for a second page that has not been configured with a page configuration file, generating an initial version of the page configuration file for the second page based on regional configuration information and / or data configuration information.
[0011] Optionally, the data configuration information includes the data source type and data source identifier; receiving data configuration information for one or more template-independent functional components input via the visual page configuration template includes: receiving the data source type and data source identifier for one or more template-independent functional components input via the visual page configuration template.
[0012] To achieve the above objectives, according to a second aspect of the present invention, a page rendering apparatus is provided, characterized in that it includes: a file search module, a component acquisition module, and a page rendering module; wherein,
[0013] The file search module is used to obtain the configuration file version identifier of the page and search for the target configuration file that matches the configuration file version identifier from multiple versions of page configuration files;
[0014] The component acquisition module is used to obtain multiple page processing areas contained in the page and multiple independent functional components contained in each page processing area based on the target configuration file. Different independent functional components are used to handle different types of data operations. The module parses the data configuration information corresponding to each independent functional component from the target configuration file and finds the matching component controller for each independent functional component.
[0015] The page rendering module is used to execute the page processing logic of independent functional components by utilizing the data configuration information of each component controller and the corresponding independent functional components; and to render the various page processing areas of the page based on the execution results obtained from the page processing logic of each independent functional component.
[0016] Optionally, a page configuration parser is constructed; a corresponding component controller is constructed for each independent functional component; the page rendering device is further used to utilize the page configuration parser to perform the step of parsing the data configuration information corresponding to each independent functional component from the target configuration file; for each independent functional component, according to the type of the independent functional component, a corresponding component controller is constructed for the independent functional component, so as to utilize the component controller to execute the data processing logic of the independent functional component based on the data configuration information of the independent functional component.
[0017] Optionally, the page rendering device is used to parse the data configuration information corresponding to each independent functional component, including: finding the component identifier of each independent functional component from the target configuration file, and finding one or more unit functional components contained in the independent functional component according to the component identifier; and parsing the data configuration information corresponding to one or more unit functional components.
[0018] Optionally, the page rendering apparatus is used to execute the data processing logic of the independent functional component based on the data configuration information of the independent functional component using the component controller, including: obtaining the data source type included in the data configuration information corresponding to the independent functional component; determining the data adapter corresponding to the data source type based on the data source type; obtaining the page data processed by the independent functional component from the data source matching the data source type using the data adapter; and executing the data processing logic based on the page data using the component controller.
[0019] Optionally, the page rendering apparatus is further configured to provide a visual page configuration template, wherein the visual page configuration template includes multiple template processing areas and multiple template-independent functional components contained in the template processing areas; receive region configuration information for the template processing areas and / or data configuration information for one or more template-independent functional components input via the visual page configuration template; and generate a page configuration file for the page based on the region configuration information and / or data configuration information.
[0020] Optionally, the page rendering apparatus is configured to generate a page configuration file for a page based on regional configuration information and / or data configuration information, further comprising: for a first page that has already been configured with one or more versions of page configuration files, generating a new version of the page configuration file for the first page in response to differences in regional configuration information and / or data configuration information; and for a second page that has not been configured with a page configuration file, generating an initial version of the page configuration file for the second page based on regional configuration information and / or data configuration information.
[0021] Optionally, the data configuration information includes the data source type and the data source identifier; the page rendering device is used to receive the data configuration information of one or more template-independent functional components input via the visual page configuration template, including: receiving the data source type and the data source identifier of one or more template-independent functional components input via the visual page configuration template.
[0022] To achieve the above objectives, according to a third aspect of the present invention, an electronic device for page rendering is provided, characterized in that it includes: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform any of the methods described above for page rendering.
[0023] To achieve the above objectives, according to a fourth aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, characterized in that, when the program is executed by a processor, it implements any of the methods described above for page rendering.
[0024] To achieve the above objectives, according to a fifth aspect of the present invention, a computer program product is provided, comprising a computer program, characterized in that, when executed by a processor, the computer program implements any of the methods described above for page rendering.
[0025] One embodiment of the above invention has the following advantages or beneficial effects: it can find a target configuration file matching the page version from multiple versions of page configuration files; based on the target configuration file, it obtains multiple page processing areas contained in the page and multiple independent functional components contained in each page processing area; it parses the data configuration information corresponding to each independent functional component from the target configuration file and finds a matching component controller for each independent functional component; it uses the data configuration information of each component controller and the corresponding independent functional component to execute the page processing logic of the independent functional component; and it renders each page processing area of the page according to the execution result obtained from the page processing logic of each independent functional component, thereby improving the flexibility and versatility of page rendering and improving page development efficiency.
[0026] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0027] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:
[0028] Figure 1 This is a flowchart illustrating a page rendering method according to an embodiment of the present invention;
[0029] Figure 2A This is a schematic diagram of a page processing area provided in one embodiment of the present invention;
[0030] Figure 2B This is a schematic diagram of the structure of page configuration information provided in one embodiment of the present invention;
[0031] Figure 3 This is a schematic diagram of a page rendering process provided in one embodiment of the present invention;
[0032] Figure 4 This is a schematic diagram of a page rendering process provided in one embodiment of the present invention;
[0033] Figure 5 This is a schematic diagram of the structure of a page rendering device provided in one embodiment of the present invention;
[0034] Figure 6 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;
[0035] Figure 7 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation
[0036] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0037] It should be noted that the collection, use, storage, sharing and transfer of user personal information involved in the technical solution of the present invention all comply with the provisions of relevant laws and regulations, and require notification to users and obtaining their consent or authorization. When applicable, user personal information is subjected to de-identification and / or anonymization and / or encryption technical processing.
[0038] like Figure 1 As shown in the figure, an embodiment of the present invention provides a page rendering method, which may include the following steps:
[0039] Step S101: Obtain the configuration file version identifier of the page, and search for the target configuration file that matches the configuration file version identifier from multiple versions of page configuration files.
[0040] Specifically, this invention provides a multi-version management and control method for page configuration files. Through a configuration driver platform, page configurations can be automatically updated automatically without going through processes such as publishing and deployment. This allows page configuration changes to take effect immediately in the production environment. The dynamic multi-version management of the configuration driver platform improves the flexibility and response speed of page services while reducing operation and maintenance costs.
[0041] For any given page, different development teams or changes to functionality can result in different page configuration files, meaning multiple versions of the page configuration file can exist. Therefore, when receiving a page rendering request, the version identifier of the page configuration file (e.g., V123abc) can be included. This version identifier allows the search for a matching target configuration file from among multiple versions of page configuration files (provided by the server or stored locally). In other words, the page rendering request retrieves the page configuration file version identifier; then, it searches for a target configuration file that matches that version identifier from among the multiple versions of page configuration files.
[0042] Step S102: Based on the target configuration file, obtain the multiple page processing areas contained in the page and the multiple independent functional components contained in each page processing area; wherein, different independent functional components are used to process different types of data operations.
[0043] Specifically, the page configuration file (i.e. the target configuration file) can indicate the multiple page processing areas contained in the page, and each page processing area contains multiple independent functional components; among them, different independent functional components are used to handle different types of data operations.
[0044] The following uses Figure 2A The diagram illustrates the multiple page processing areas of the page, such as... Figure 2A As shown, page 200A includes page areas 1 to 8. These page areas are the page processing areas. The division of these areas can be based on data processing operations or page logic to achieve clear functional zoning and efficient user interaction. For example, the page logic can be divided into the following page processing areas (page areas 1-8): Title area (page area 1): Contains page identification information, describing the main functions and roles of the page, providing users with intuitive functional guidance. Filtering area (page area 2): Provides various filtering options, allowing users to filter and locate data based on specific conditions, improving the accuracy of data retrieval. Data import / export area (page area 3): Integrates data import and export functions, enabling users to easily process data in batches and improve work efficiency. Data operation area (page area 4): Provides various user operations, such as data filtering, batch deletion, and template download, providing convenient means for data management. Checkboxes (page area 5): Used to select multiple data records, facilitating batch operations such as batch deletion or export. Data Display Area (Page Area 6): This area displays data content clearly in tables or other formats, supporting quick reading and understanding by users. Row Operation Area (Page Area 7): This area provides operations for each data entry, such as editing, deleting, or other custom functions, making single-record management simple and direct. Pagination Area (Page Area 7): This area provides pagination functionality to manage the display of large amounts of data. Through pagination control, users can easily browse and access different data pages. The modular division of these page processing areas improves the clarity of page functions and ease of operation, while also facilitating subsequent maintenance and expansion.
[0045] Furthermore, each page processing area contains multiple independent functional components; these components are used to handle different types of data operations. For example, the data import / export area contains import or export functional components for handling data import or export operations; the data operation area contains data filtering components, batch data deletion components, data download components, and data conversion components for handling different types of data operations (filtering, deleting, downloading, etc.); and the data filtering area contains list components for displaying and filtering data.
[0046] By abstracting and modeling the page layout and data processing logic, we construct general-purpose independent functional components. These components can be applied to different page constructions and rendering processes, achieving high modularity and pluggability. This improves page development efficiency and enhances system flexibility and maintainability. Page developers can quickly assemble and customize feature-rich pages according to specific needs, as simply and intuitively as building with blocks. Furthermore, the modular construction method of independent functional components significantly improves component reusability and iteration capabilities, allowing each independent component to be upgraded and maintained independently without affecting other page components. This optimizes the development process and lays a solid foundation for future functional expansion and technological evolution. Moreover, by combining the page processing area with independent functional components, we can further modularize the page's functionality, improving development efficiency and enhancing the user experience.
[0047] Step S103: Parse the data configuration information corresponding to each independent functional component from the target configuration file, and find the matching component controller for each independent functional component; use the data configuration information of each component controller and the corresponding independent functional component to execute the page processing logic of the independent functional component; render each page processing area of the page according to the execution result obtained from the page processing logic of each independent functional component.
[0048] Specifically, the target configuration file contains data configuration information corresponding to the independent functional components, and the data configuration information can be stored in JSON format:
[0049] Taking the data list component (listConfig) as an example, the following is the configuration information for the data list component (which is an independent functional component):
[0050] "listConfig":{"dataSourceConfigList":[
[0051] {"sqlSessionFactory":"promiseSqlSessionFactory",
[0052] "tableName":"load_aaaa_strategy"}
[0053] Here, "listConfig" is the component identifier of the data list component. The data list component can include multiple unit functional components, such as the data source configuration unit component "dataSourceConfigList". The data source configuration unit component can have corresponding data configuration information; for example, the identifier of the data table (tableName) of the data source operated by this component is "load_aaaa_strategy". That is, parsing out the data configuration information corresponding to each independent functional component includes: finding the component identifier of each independent functional component in the target configuration file, and finding one or more unit functional components contained in the independent functional component based on the component identifier; parsing the data configuration information corresponding to one or more unit functional components. It can be understood that the same unit functional component can be used for different independent functional components. For example, a data operation unit functional component (such as a button component) can be used for multiple independent functional components such as listConfig, importConfig, and exportConfig.
[0054] Figure 2B This diagram illustrates the structure of a page configuration information set, including independent functional components 201B (using only the data list component listConfig, data import component importConfig, and data export component exportConfig as examples), unit functional components 202B (using only the data source component dataSourceConfigList, data column component ColumeConfigList, data button component buttonList, and file component fileTitleConfigList as examples), and data configuration information 203B (using only data column configuration information columnName, data conversion configuration information converter, data theme configuration information title, and data type configuration information type as examples). Figure 2B As shown, an independent functional component can contain one or more unit functional components, and the same unit functional component can belong to one or more independent functional components. The data configuration information page can belong to one or more unit functional components, and the lines between components represent association and inclusion relationships. It can be understood that the same data configuration information will have different data values configured for different unit functional components.
[0055] By parsing the configuration information from the target configuration file in JSON format, the component can be extracted through independent functional components, along with specific configuration information such as the data source and data processing logic corresponding to the data operations performed by the component. This provides flexibility and versatility in page processing.
[0056] Furthermore, in embodiments of the present invention, a page configuration parser is used to perform the step of parsing the data configuration information corresponding to each independent functional component from the target configuration file; wherein, the page configuration parser can be regarded as a highly generalized collection of controller, service, and data access object (DAO) layers. It can flexibly load page configuration files in a dynamically configured platform and has the ability to parse JSON configuration information; by parsing the JSON configuration information, it determines the various independent functional components required in the page, parses and assembles these independent functional components, and provides page data for subsequent page rendering.
[0057] Furthermore, in embodiments of the present invention, for each independent functional component, a corresponding component controller is constructed according to the type of the independent functional component, so as to utilize the component controller to execute the page processing logic of the independent functional component based on the data configuration information of the independent functional component.
[0058] Specifically, the component controller includes, for example: a view configuration generator (viewConfig): which generates the view layer of the user interface based on configuration information such as the page title (pageTitle) and filter list (filterList) (page configuration information parsed from the page configuration file). A data download configurator (downloadConfig): which handles data export functionality, including the name of the template file used for data export, so that the data can be provided to the user for download in a predetermined format. A list configuration manager (listConfig): which manages the data structure and presentation format of the data based on the list through data source configuration information (dataSourceConfigList) and data column configuration information (columnConfigList). An export configuration processor (exportConfig): which handles data export functionality, processing configuration files containing filenames, worksheet names, data sources, and title converters. Import Configuration Processor (importConfig): This is used to handle data import functionality. Its associated configuration information includes filename, worksheet name, validator list, column configuration, and data source configuration, etc.; Data Source Configuration: This describes the method for retrieving data from the database, including key information such as SQL Session Factory (sqlSessionFactory), table name (tableName), and filter (filter); Converter: This is used to convert data formats between front-end display and back-end storage, such as converting status values into corresponding names.
[0059] By building corresponding component controllers for different independent functional components, the corresponding component controller can be dynamically found when any independent functional component is resolved, so that the component controller can execute the corresponding data processing logic according to the configuration information of the resolved independent functional component.
[0060] By configuring independent functional components and establishing corresponding component controllers, the scalability and flexibility of page rendering are enhanced. Pages can be applied to different business scenarios simply by changing the JSON configuration information, without altering the underlying code, thus decoupling page component code from the page itself. It also supports multiple data source configurations and various complex data validation rules, suitable for different business needs and data processing workflows. Furthermore, page performance is optimized through effective data structures and algorithms, ensuring high-efficiency data processing even under complex configurations. Caching mechanisms and on-demand loading strategies are also provided to optimize response time and resource consumption. Data security and stability are further improved: enhanced data validation and error handling mechanisms ensure data accuracy and stable system operation. The system design follows security best practices to prevent SQL injection and other potential security threats. The configuration information parsing scheme (JSON format syntax tree) allows for rapid deployment and iteration of business functions while maintaining code clarity and maintainability. This architecture provides a flexible and efficient way to adapt to constantly changing business needs. This involves building a page configuration parser; building a corresponding component controller for each independent functional component; using the page configuration parser to parse the data configuration information corresponding to each independent functional component from the target configuration file; and for each independent functional component, building a corresponding component controller based on the type of the independent functional component, so as to use the component controller to execute the data processing logic of the independent functional component based on the data configuration information of the independent functional component.
[0061] Furthermore, based on the execution results obtained from the page processing logic of each independent functional component, the various page processing areas of the page are rendered to display the page to the user.
[0062] Furthermore, in an embodiment of the present invention, a visual page configuration template is provided, wherein the visual page configuration template includes multiple template processing areas and multiple template-independent functional components contained in the template processing areas; regional configuration information for the template processing areas and / or data configuration information for one or more template-independent functional components are received via the visual page configuration template; and a page configuration file for the page is generated based on the regional configuration information and / or data configuration information.
[0063] Specifically, the provided visual configuration templates are as follows: Figure 2ATaking the style of page 200A as an example, users can select one or more template processing areas as page processing areas through the visual configuration template, and select (input) one or more independent functional components of each template processing area as independent functional components; further input (or select) the area configuration information for the template processing area and / or the data configuration information for one or more independent functional components of the template (e.g., data processing functional components, data source identifiers, data table identifiers, etc.), that is, the data configuration information includes the data source type and the data source identifier; receive the data configuration information of one or more independent functional components of the template input through the visual page configuration template, including: receiving the data source type and the data source identifier of one or more independent functional components of the template input through the visual page configuration template.
[0064] Furthermore, page configuration files are generated for users based on regional configuration information and / or data configuration information.
[0065] Furthermore, version management and version control are performed on the user-generated page configuration files. Based on regional configuration information and / or data configuration information, page configuration files are generated, further including: for a first page that already has one or more versions of page configuration files, in response to differences in regional configuration information and / or data configuration information, a new version of the page configuration file is generated for the first page; for a second page that does not have a page configuration file, an initial version of the page configuration file is generated for the second page based on regional configuration information and / or data configuration information. Specifically, it can be understood that for pages with the same page processing area and containing the same independent functional components, different versions of page configuration files are generated if the data configuration information of their independent functional components is different. For example: if the data source type of page 1 is data source 1, then the corresponding page configuration file version is v1; if the data source type of page 1 is data source 2, then the corresponding page configuration file version is v2; if the data source type of page 3 is data source 3, then the corresponding page configuration file version is v3. It can be understood that the difference in data source type is only an example; any difference in data configuration information will generate a new version of the page configuration file.
[0066] By providing a visual configuration page, the development efficiency for pages and the flexibility in generating page configuration files are improved.
[0067] like Figure 3 As shown, this embodiment of the invention provides a page rendering process, which may include the following steps:
[0068] Step S301: Page modeling.
[0069] Step S302: Identify independent functional components.
[0070] Specifically, for the page to be processed, the layout and data processing logic of the page are abstracted and modeled to build independent functional components with general functions.
[0071] Step S303: Dynamic data information configuration.
[0072] Specifically, a visual page configuration template is provided, wherein the visual page configuration template includes multiple template processing areas and multiple template-independent functional components contained in the template processing areas; regional configuration information for the template data display processing area and / or data configuration information for one or more template-independent functional components are received via the visual page configuration template; and a page configuration file for the page is generated based on the regional configuration information and / or data configuration information.
[0073] Step S304: Configure the parser.
[0074] Step S305: Component controller.
[0075] Specifically, a page configuration parser is constructed; a corresponding component controller is constructed for each independent functional component; the page configuration parser is used to execute the step of parsing the data configuration information corresponding to each independent functional component from the target configuration file; for each independent functional component, according to the type of the independent functional component, a corresponding component controller is constructed for the independent functional component, so as to use the component controller to execute the data processing logic of the independent functional component based on the data configuration information of the independent functional component.
[0076] Step S306: Page rendering.
[0077] Specifically, the data configuration information corresponding to each independent functional component is parsed from the target configuration file, and a matching component controller is found for each independent functional component; the page processing logic of the independent functional component is executed using the data configuration information of each component controller and the corresponding independent functional component; and the page processing areas of the page are rendered according to the execution results obtained from the page processing logic of each independent functional component.
[0078] like Figure 4 As shown in the diagram, this embodiment of the invention provides a structural schematic diagram of page rendering, including:
[0079] Page rendering 401, configuration parser 402, independent functional components 403, data source components 404, and configuration driver platform 405.
[0080] Page rendering error 401 is used to perform page rendering.
[0081] The configuration parser 402 is used to parse the data configuration information corresponding to each independent functional component from the target configuration file.
[0082] Independent functional components 403 include a variety of independently constructed functional components, such as the following independent functional components for data processing: import, export, download, pagination, filtering, display, batch processing, read and write, editing, etc.
[0083] The data source component 404 is used to manage the data source information associated with the page. Specifically, embodiments of the present invention can configure different data source types for different independent functional components in the page, so that various types of data can be appropriately stored and retrieved, thereby achieving efficient and flexible data access capabilities. For example, accessing MySQL (data source type) through dynamic SQL (i.e., data adapter) and interacting with the MySQL database through dynamic SQL technology not only improves the flexibility of queries, but also generates efficient SQL statements according to different business needs to achieve fast and accurate data operations; accessing cached data (i.e., data source type) through RedisClient (i.e., data adapter) allows efficient access and management of data stored in the Redis cache, which significantly improves the speed of data retrieval and effectively reduces the pressure on the main database; accessing ES index data (i.e., data source type) through ESClient (i.e., data adapter) allows accurate and fast access to data in the Elasticsearch index, which optimizes the processing of complex queries, making full-text search, data analysis, and real-time monitoring more efficient. The data adapters corresponding to different data source types collectively constitute the data processing architecture. This not only ensures the efficiency and stability of data processing but also provides specialized solutions for different application scenarios. It ensures that data flows efficiently, securely, and stably within the system while also leaving room for future expansion. Specifically, using the component controller, based on the data configuration information of independent functional components, the data processing logic of those components is executed. This includes: obtaining the data source type included in the data configuration information of the independent functional component; determining the corresponding data adapter based on the data source type; using the data adapter to obtain the page data to be processed by the independent functional component from the data source matching the data source type; and using the component controller to execute the data processing logic based on the page data.
[0084] The configuration driver platform 405 includes a control center, template management, and version management, used to generate and change page configuration file information for one or more pages.
[0085] Each component retrieves the page's configuration file version identifier and searches for a target configuration file matching that identifier from multiple page configuration file versions. Based on the target configuration file, it retrieves multiple page processing areas and individual functional components within each processing area. Different individual functional components handle different types of data operations. A configuration parser extracts the data configuration information corresponding to each individual functional component from the target configuration file and finds a matching component controller for each component. Using the component controllers and their corresponding data configuration information, the page processing logic of each individual functional component is executed. Based on the execution results of the page processing logic of each individual functional component, the page's various processing areas are rendered. This improves the versatility and flexibility of page rendering and enhances adaptability and scalability for different types of data sources.
[0086] like Figure 5 As shown, this embodiment of the invention provides a page rendering device 500, including: a file search module 501, a component acquisition module 502, and a page rendering module 503; wherein,
[0087] The file search module 501 is used to obtain the configuration file version identifier of the page and search for the target configuration file that matches the configuration file version identifier from multiple versions of page configuration files;
[0088] The component acquisition module 502 is used to acquire multiple page processing areas contained in the page and multiple independent functional components contained in each page processing area according to the target configuration file; wherein, different independent functional components are used to process different types of data operations; the data configuration information corresponding to each independent functional component is parsed from the target configuration file, and a matching component controller is found for each independent functional component;
[0089] The rendering page module 503 is used to execute the page processing logic of the independent functional components by utilizing the data configuration information of each component controller and the corresponding independent functional components; and to render each page processing area of the page according to the execution results obtained from the page processing logic of each independent functional component.
[0090] This invention also provides an electronic device for page rendering, comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in any of the above embodiments.
[0091] This invention also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method provided in any of the above embodiments.
[0092] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements any of the methods described above for page rendering.
[0093] Figure 6 An exemplary system architecture 600 is shown that can be applied to the page rendering method or page rendering apparatus of the present invention.
[0094] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, and 603, a network 604, and a server 605. Network 604 serves as the medium for providing communication links between terminal devices 601, 602, and 603 and server 605. Network 604 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0095] Users can use terminal devices 601, 602, and 603 to interact with server 605 via network 604 to receive or send messages, etc. Various client applications can be installed on terminal devices 601, 602, and 603, such as e-commerce client applications, web browser applications, search applications, instant messaging tools, and email clients.
[0096] Terminal devices 601, 602, and 603 can be various electronic devices with displays and supporting various client applications, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0097] Server 605 can be a server that provides various services, such as a backend management server that supports client applications used by users through terminal devices 601, 602, and 603. The backend management server can process received requests for page configuration files and return the target configuration file matching the page configuration file version identifier to the terminal device.
[0098] It should be noted that the page rendering provided in the embodiments of the present invention is generally performed by terminal devices 601, 602, and 603. Accordingly, the page rendering device is generally located in terminal devices 601, 602, and 603; the configuration driver platform is generally located in server 605.
[0099] It should be understood that Figure 6 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.
[0100] The following is for reference. Figure 7 It shows a schematic diagram of the structure of a computer system 700 suitable for implementing a terminal device of the present invention. Figure 7 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0101] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the system 700. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0102] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0103] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by central processing unit (CPU) 701, it performs the functions defined above in the system of this invention.
[0104] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0105] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0106] The modules and / or units described in the embodiments of the present invention can be implemented in software or hardware. The described modules and / or units can also be housed in a processor; for example, a processor can be described as including a file search module, a component acquisition module, and a page rendering module. The names of these modules do not necessarily limit the module itself; for example, a file search module can also be described as "a module that searches for a target configuration file matching the configuration file version identifier from multiple versions of page configuration files."
[0107] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include: searching for a target configuration file matching a page version from multiple versions of page configuration files; obtaining multiple page processing areas contained in the page and multiple independent functional components contained in each page processing area according to the target configuration file; parsing data configuration information corresponding to each independent functional component from the target configuration file and searching for a matching component controller for each independent functional component; executing the page processing logic of the independent functional components using the data configuration information of each component controller and the corresponding independent functional components; and rendering each page processing area of the page according to the execution result obtained from the page processing logic of each independent functional component, thereby improving the flexibility and versatility of page rendering and improving page development efficiency.
[0108] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A page rendering method, characterized in that, include: Obtain the configuration file version identifier of the page, and search for the target configuration file that matches the configuration file version identifier from multiple versions of page configuration files; Based on the target configuration file, obtain the multiple page processing areas contained in the page and the multiple independent functional components contained in each page processing area; wherein, different independent functional components are used to process different types of data operations; The data configuration information corresponding to each independent functional component is parsed from the target configuration file, and a matching component controller is found for each independent functional component; Using the data configuration information of each component controller and the corresponding independent functional component, the page processing logic of the independent functional component is executed; and the page processing areas of the page are rendered according to the execution results obtained from the page processing logic of each independent functional component.
2. The method according to claim 1, characterized in that, Build a page configuration parser; Build a corresponding component controller for each independent functional component; The method further includes: The page configuration parser is used to perform the step of parsing the data configuration information corresponding to each of the independent functional components from the target configuration file; For each independent functional component, a corresponding component controller is constructed according to the type of the independent functional component, so as to use the component controller to execute the data processing logic of the independent functional component based on the data configuration information of the independent functional component.
3. The method according to claim 1, characterized in that, The process of parsing out the data configuration information corresponding to each of the independent functional components includes: Find the component identifier of each independent functional component in the target configuration file, and find one or more unit functional components contained in the independent functional component based on the component identifier; Parse the data configuration information corresponding to one or more of the aforementioned unit functional components.
4. The method according to claim 2, characterized in that, The step of using the component controller to execute the data processing logic of the independent functional component based on the data configuration information of the independent functional component includes: Obtain the data source type included in the data configuration information corresponding to the independent functional component, and determine the data adapter corresponding to the data source type based on the data source type; The data adapter is used to obtain page data for independent functional components from the data source that matches the data source type, and the component controller is used to execute data processing logic based on the page data.
5. The method according to claim 1, characterized in that, Further includes: A visual page configuration template is provided, wherein the visual page configuration template includes multiple template processing areas and multiple independent template functional components contained in the template processing areas; Receives region configuration information for the template processing area and / or data configuration information for one or more independent functional components of the template, input via the visual page configuration template. Based on the region configuration information and / or the data configuration information, a page configuration file for the page is generated.
6. The method according to claim 5, characterized in that, The step of generating the page configuration file for the page based on the region configuration information and / or the data configuration information further includes: For a first page that already has one or more versions of page configuration files configured, in response to differences in regional configuration information and / or data configuration information, a new version of the page configuration file is generated for the first page. For a second page that does not have a page configuration file configured, an initial version of the page configuration file for the second page is generated based on the region configuration information and / or the data configuration information.
7. The method according to claim 5, characterized in that, The data configuration information includes the data source type and the data source identifier; The receiving of data configuration information for one or more template-independent functional components input via the visual page configuration template includes: Receive the data source type and data source identifier of one or more template-independent functional components input via the visualization page configuration template.
8. A page rendering apparatus, characterized in that, include: The modules include a file search module, a component retrieval module, and a page rendering module; among them, The file search module is used to obtain the configuration file version identifier of the page and search for a target configuration file that matches the configuration file version identifier from multiple versions of page configuration files; The component acquisition module is used to acquire, according to the target configuration file, multiple page processing areas contained in the page and multiple independent functional components contained in each page processing area; wherein, different independent functional components are used to process different types of data operations; the data configuration information corresponding to each independent functional component is parsed from the target configuration file, and a matching component controller is found for each independent functional component; The rendering page module is used to execute the page processing logic of the independent functional components by utilizing the data configuration information of each component controller and the corresponding independent functional components; and to render each page processing area of the page according to the execution result obtained from the page processing logic of each independent functional component.
9. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
10. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.
11. A computer program product, comprising a computer program, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.
