Backend interface generation method, management platform, computer device, and storage medium

By decoupling the data retrieval logic and format conversion logic through the backend interface management platform, backend interfaces corresponding to the frontend pages are generated, solving the problems of long development cycles and poor stability in existing technologies, and realizing efficient and stable backend interface generation and management.

CN114637503BActive Publication Date: 2026-11-27上海瑞家信息技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111630374.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2026-11-27
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

In existing technologies, whenever a new front-end page appears, a back-end interface that is compatible with it needs to be redeveloped, resulting in a long development cycle and affecting the operational stability of the back-end interface.

Method used

By using the backend interface management platform, data retrieval statements and dynamic templates are obtained based on the attribute information of the frontend page, thereby decoupling the data retrieval logic and the format conversion logic. Template identifiers are configured to establish the correspondence between API identifiers and template identifiers. Backend interfaces are generated using the main program code, simplifying the development process and improving stability.

Benefits of technology

It greatly shortens the development cycle of backend interfaces, improves development efficiency, reduces system maintenance difficulty, and enhances operational stability through a backend interface management platform that takes effect in real time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114637503B_ABST
    Figure CN114637503B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a kind of back end interface generation method, management platform, computer device and storage medium.The technical scheme provided by the embodiment of the present application provides a kind of back end interface management platform, which is pre-built with the main program code that can be shared, based on the reuse of main program code, back end interface can be simply and quickly generated when each page demand changes, greatly shorten the development cycle, improve the development efficiency;In addition, the decoupling of data retrieval logic and format conversion logic is realized, thereby simplifying the development process and reducing system maintenance difficulty;Furthermore, once the back end interface of the embodiment of the present application is generated, it can take effect in real time, and the back end interface management platform can directly run the back end interface without the need to generate offline and deploy to the server for effect as in the prior art, which is conducive to improving the stability of the back end interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of application development technology, and in particular to a backend interface generation method, management platform, computer equipment, and storage medium. Background Technology

[0002] In various application developments, front-end pages all need to rely on back-end interfaces provided by back-end servers. These back-end interfaces can respond to data requests initiated by the front-end pages, read the target data required by the front-end pages from data sources such as databases or microservices as needed, and convert the target data into a format suitable for front-end display before providing it to the front-end pages for data display.

[0003] In existing technologies, whenever a new front-end page appears, a back-end interface adapted to that front-end page needs to be redeveloped. This not only has a long development cycle, but also requires redeploying the redeveloped back-end interface on the server side each time, which also affects the stability of the back-end interface. Summary of the Invention

[0004] This application provides a backend interface generation method, management platform, computer device, and storage medium to improve the development efficiency and runtime stability of backend interfaces.

[0005] This application provides a backend interface generation method applied to a backend interface management platform. The method includes: obtaining at least one data retrieval statement corresponding to the target frontend page and a dynamic template corresponding to each data retrieval statement based on at least one attribute information of the target frontend page; each data retrieval statement and its corresponding dynamic template respectively represent a data retrieval logic and a format conversion logic corresponding to the target frontend page; for each data retrieval statement, storing the data retrieval statement and its corresponding dynamic template into different fields of a record information to decouple the data retrieval logic and the format conversion logic, and configuring a template identifier for the data retrieval statement and its corresponding dynamic template; configuring an API identifier for the target frontend page as page routing information, establishing a correspondence between the API identifier, at least one attribute information, and at least one template identifier; generating a backend interface corresponding to the target frontend page based on the correspondence and the main program code provided by the backend interface management platform; the main program code represents the logic of selecting a first template identifier from at least one template identifier for the target frontend page based on the correspondence and running the first data retrieval statement and the first dynamic template corresponding to the first template identifier respectively.

[0006] This application embodiment also provides a backend interface management platform, which includes: an information acquisition module, an identifier configuration module, a correspondence establishment module, and an interface generation module. The information acquisition module is used to acquire at least one data retrieval statement corresponding to the target frontend page and a dynamic template corresponding to each data retrieval statement based on at least one attribute information of the target frontend page. Each data retrieval statement and its corresponding dynamic template respectively represent a data retrieval logic and a format conversion logic corresponding to the target frontend page. The identifier configuration module is used to store each data retrieval statement and its corresponding dynamic template into different fields of a record information to decouple the data retrieval logic and the format conversion logic, and to configure template identifiers for the data retrieval statements and their corresponding dynamic templates. The correspondence establishment module is used to configure API identifiers as page routing information for the target frontend page and establish a correspondence between the API identifier, at least one attribute information, and at least one template identifier. The interface generation module is used to generate a backend interface corresponding to the target frontend page based on the correspondence and the main program code provided by the backend interface management platform. The main program code represents the logic of selecting a first template identifier from at least one template identifier for the target frontend page based on the correspondence and running the first data retrieval statement and the first dynamic template corresponding to the first template identifier.

[0007] This application also provides a computer device, which includes a memory and a processor; wherein the memory is used to store a computer program; and the processor is coupled to the memory and is used to execute the computer program to perform the steps in the back-end interface generation method provided in this application.

[0008] This application also provides a computer-readable storage medium storing a computer program, which, when executed by one or more processors, causes one or more processors to perform the steps in the back-end interface generation method provided in this application.

[0009] This application provides a backend interface management platform. This platform pre-builds shareable main program code and decouples the data retrieval logic and format conversion logic of the frontend page. This allows for the generation of backend interfaces for the frontend page by simply combining the frontend page's attribute information to obtain the data retrieval statements representing the data retrieval logic and the dynamic templates representing the format conversion logic, configuring template identifiers, and establishing a correspondence between API identifiers, template identifiers, and attribute information (serving as page routing information). This correspondence is then integrated with the main program code to obtain the corresponding backend interface for the frontend page. Based on the reuse of the main program code, backend interfaces can be generated easily and quickly each time page requirements change, greatly shortening the development cycle and improving development efficiency. Furthermore, the decoupling of data retrieval logic and format conversion logic simplifies the development process and reduces system maintenance difficulty. Moreover, the backend interfaces in this application are effective immediately upon generation, and the backend interface management platform can directly run them without the need for offline generation and server deployment as in existing technologies, thus improving the operational stability of the backend interfaces. Attached Figure Description

[0010] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0011] Figure 1 A schematic diagram of an application system architecture provided for an exemplary embodiment of this application;

[0012] Figure 2a A flowchart illustrating a backend interface generation method provided for an exemplary embodiment of this application;

[0013] Figure 2b A flowchart illustrating another backend interface generation method provided for an exemplary embodiment of this application;

[0014] Figure 3 A schematic diagram of the structure of a backend interface management platform provided in an exemplary embodiment of this application;

[0015] Figure 4 A schematic diagram of the structure of a computer device provided for another exemplary embodiment of this application. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0017] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0018] To facilitate the simple and efficient generation of backend interfaces for frontend pages, this application provides a backend interface management platform. This platform can generate backend interfaces for frontend pages easily and efficiently. Furthermore, after generation, the platform can also act as a host device for the backend interfaces, directly running them to provide interface services to the corresponding frontend pages. This simplifies the deployment and implementation of backend interfaces and improves their operational stability. In this application, the main function of the backend interface is to respond to data requests from the frontend page, obtain the raw data required by the frontend page from the data source, convert the raw data to obtain target data that meets the display requirements of the frontend page, and provide the target data to the frontend page for display.

[0019] Therefore, the application system architecture provided in this application embodiment, such as Figure 1 As shown, the application system architecture includes: a front-end page hosting device 11, a back-end interface management platform 12, and a data source device 13. The front-end page hosting device 11 can be a development device used during the development phase, such as various laptops, desktop computers, or smartphones used by developers; or it can be a user terminal running the application after the front-end page is deployed online, such as a smartphone, laptop, or desktop computer used by the user. The data source device is responsible for providing data to the front-end page, and its implementation can be a database, server-side device, or microservice application system. The back-end interface management platform 12 and the data source device 13 can be the same device or different devices. The back-end interface management platform 12 generates the back-end interfaces required by the front-end page; the process for generating back-end interfaces can be found in [link to relevant documentation]. Figure 2aThe illustrated embodiment will not be described in detail here. On the other hand, the backend interface management platform 12 can also directly run the backend interface corresponding to the frontend page, providing interface services to the frontend page. The main function of this interface service is to respond to data requests from the frontend page, obtain the raw data required by the frontend page from the data source, convert the raw data into target data that meets the display requirements of the frontend page, and provide the target data to the frontend page for display. It should be noted that the process of the backend interface management platform 12 running the backend interface to provide interface services to the frontend page can be found in [reference needed]. Figure 2b The embodiments shown are not described in detail here.

[0020] Specifically, such as Figure 2a As shown in the figure, an embodiment of this application provides a backend interface generation method including:

[0021] 101. Based on at least one attribute information of the target front-end page, obtain at least one data retrieval statement corresponding to the target front-end page and a dynamic template corresponding to each data retrieval statement. Each data retrieval statement and its corresponding dynamic template respectively represent a data retrieval logic and a format conversion logic corresponding to the target front-end page.

[0022] 102. For each data retrieval statement, store the data retrieval statement and its corresponding dynamic template into different fields of a record information to decouple the data retrieval logic and the format conversion logic, and configure template identifiers for the data retrieval statement and its corresponding dynamic template.

[0023] 103. Configure an API identifier as page routing information for the target front-end page, establish a correspondence between the API identifier, at least one attribute information, and at least one template identifier, generate the back-end interface corresponding to the target front-end page based on the correspondence and the main program code provided by the back-end interface management platform, and the main program code represents the logic of selecting the first template identifier from at least one template identifier for the target front-end page based on the correspondence and running the first data retrieval statement and the first dynamic template corresponding to the first template identifier respectively.

[0024] The method in this embodiment can be executed by a backend interface management platform, which can generate the required backend interfaces for any frontend page in any application. The frontend page is the interface through which the application provides information display and human-computer interaction with the user. The frontend page will vary depending on the application. Optionally, the applications applicable to this embodiment can be, for example, lifestyle applications, financial applications, audio applications, and game applications. Lifestyle applications can be further divided according to different types, such as car rental / sales applications, housing rental / sales applications, housekeeping service applications, and leisure / entertainment applications. Taking a housing rental / sales application as an example, the frontend page can be a homepage displaying various housing information, a details page for a specific housing property, etc. These pages are used to display information such as the rental / sales unit price, historical transaction price, etc., and can also display information such as the floor plan, location, surrounding environment, and facilities of each property. The rental / sales unit price, historical transaction price, and other information displayed on the frontend page need to be obtained from the data source device through the backend interface and then converted into a specific format. This requires generating a backend interface adapted to the frontend page.

[0025] In this embodiment, the backend interface mainly has the following two functions: First, it retrieves raw data from the data source based on the data request of the target frontend page, such as retrieving the unit price of a property from the data source as 20,000. This function can be called data retrieval logic. Second, it performs format conversion on the raw data, transforming it into target data that can be displayed on the frontend page, such as 20,000 / square meter. The target data after format conversion is data that has business significance for the user. This function can be called format conversion logic. For example, it can combine the raw data with set business parameters, such as units, or it can add some business attributes to the raw data to make it data that has business significance for the user. In this embodiment, different frontend pages have different business functions, and therefore correspond to different data retrieval logic and format conversion logic. For example, for the homepage displaying information about each property, it needs to display the name of each property, rental and sales price, the average rental and sales price of each community, historical rental and sales price, etc., so it needs to retrieve data such as the name of the property, rental and sales price, the average rental and sales price of each community, and historical rental and sales price from the data source, and adapt it with different business parameters to obtain target data suitable for display. It's important to note that the various data sources mentioned earlier can come from the same data source or different data sources. For example, consider a property details page. It needs to display the property's floor plan, rental / sale price, location, navigation to public transportation stations, and surrounding environment / facilities. Therefore, it needs to obtain this information from a data source and adapt it to different business parameters to obtain the appropriate target data for display. Again, it's important to note that the various data sources mentioned earlier can come from the same data source or different data sources.

[0026] In this embodiment, the data retrieval logic corresponding to the front-end page can be represented by data retrieval statements, and correspondingly, its format conversion logic can be represented by dynamic templates. The data retrieval statements can be executable statements written in various programming languages ​​to obtain the raw data required by the front-end page from the data source, such as SQL statements. Optionally, the data retrieval statements can obtain the data required by the front-end page from the data source (e.g., a database or back-end microservice) via HTTP or RPC. The dynamic template is an executable script that can convert data from one format to another. In this embodiment, the dynamic template can be implemented using the JSLT language, or it can be implemented using a scripting language (JavaScript). JSLT is a complete JSON query and conversion language. Furthermore, it should be noted that not only are the data retrieval logic and format conversion logic different for different front-end pages, but the data retrieval logic and format conversion logic corresponding to the same front-end page under different attribute information will also be different.

[0027] In this embodiment, the attribute information corresponding to the front-end page mainly refers to at least one of the following: application type, front-end type, version information, and regional information of the application to which the front-end page belongs. The application type determines whether the application is a housing rental / sales application, a financial application, or a game application, etc. Different application types require different data to be displayed on the front-end page, thus necessitating different data retrieval and format conversion logic. The front-end type refers to the front-end implementation form supported by the application. The same application can have one or more front-end forms, resulting in applications with different front-end forms, such as applications for PCs, applications for mobile devices, applications for web applications, and mini-program applications. Applications with different front-end types will require different data to be displayed on their front-end pages, thus requiring different data retrieval and format conversion logic. Version information refers to the versions supported by the application. An application can support multiple versions or only one version. Different versions of the application will require different data to be displayed on their front-end pages, thus requiring different data retrieval and format conversion logic. Regional information refers to the regional information that the application needs to serve, such as city or province. Taking a housing rental and sales application as an example, it can provide users with rental and sales information for city A, or for city B, and so on. The rental and sales information differs for different regions, and the data displayed on the front-end page will vary, thus requiring different data retrieval and format conversion logic.

[0028] For ease of description and distinction, this embodiment uses a target front-end page as an example. The target front-end page can be any front-end page in any application. Based on this, before generating the back-end interface, it is first necessary to combine at least one attribute information of the target front-end page to obtain at least one data retrieval statement corresponding to the target front-end page and a dynamic template corresponding to each data retrieval statement. This embodiment does not limit the method of obtaining these statements. In an optional embodiment, the application type of the target application to which the target front-end page belongs, as well as at least one of the following information—version information, front-end type, and region information supported by the target application—can be determined first, serving as at least one attribute information of the target front-end page. The target application may support only a single version type, or it may support multiple version types. When the target application supports multiple versions, each version information is an attribute information of the front-end page. The data retrieval statements and dynamic templates corresponding to different version information may not be the same. Therefore, it is necessary to obtain the data retrieval statements and dynamic templates required for the target front-end page for each version information. The target application can have only one front-end type or multiple front-end types simultaneously. For example, it may include a target application for web, a target application for PC, a target application for mobile, and a target application in the form of a mini-program. When the target application has multiple front-end types, each front-end type is an attribute of the front-end page. The data retrieval statements and dynamic templates corresponding to different front-end types may not be the same. Therefore, it is necessary to obtain the data retrieval statements and dynamic templates required for the target front-end page for each front-end type. Regional information can be information such as southern region, northern region, or specific city. The target application can serve one region (e.g., city) or multiple regions (e.g., multiple cities). Each regional information is an attribute of the front-end page. The data retrieval statements and dynamic templates corresponding to different regional information may not be the same. Therefore, it is necessary to obtain the data retrieval statements and dynamic templates required for the target front-end page for each regional information. Then, based on at least one attribute of the target front-end page, at least one data retrieval statement and a corresponding dynamic template for each data retrieval statement can be obtained. Each data retrieval statement and its corresponding dynamic template represent a data retrieval logic and a format conversion logic corresponding to the target front-end page, respectively.

[0029] Specifically, based on at least one attribute information of the target front-end page, obtaining at least one data retrieval statement corresponding to the target front-end page and a dynamic template corresponding to each data retrieval statement can be achieved in the following way: when the target application supports different version information, different front-end types and / or different regional information, according to the application type of the target application, obtain the data retrieval statement and dynamic template corresponding to the target front-end page under different version information, different front-end types and / or different regional information supported by the target application.

[0030] In one optional embodiment, the backend interface management platform can provide a human-computer interaction interface (HCI) for backend interface developers. These developers can use this HCI to provide data retrieval statements and corresponding dynamic templates for different attribute information of the target frontend page. Specifically, the HCI has a code editing area where developers can write data retrieval statements and their dynamic templates, and set their corresponding attribute information. Alternatively, developers can provide different attribute information of the target frontend page and descriptions of the data to be displayed through the HCI. The backend interface management platform determines the corresponding data source and required data fields based on these attribute and data descriptions, and generates data retrieval statements and corresponding dynamic templates capable of retrieving data from these data fields.

[0031] In this embodiment, after obtaining the data retrieval statements and their corresponding dynamic templates, to simplify the development process and improve development efficiency, in an optional embodiment, after obtaining at least one data retrieval statement and the dynamic template corresponding to each data retrieval statement for the target front-end page, for each data retrieval statement, the data retrieval statement and its corresponding dynamic template are stored in different fields of a record information to decouple the data retrieval logic and the format conversion logic, and a template identifier is configured for the data retrieval statement and its corresponding dynamic template. Therefore, in this embodiment, the data retrieval statements and dynamic templates corresponding to the front-end page are stored and managed in a data table manner. Different information records in the data table store the data retrieval statements and dynamic templates of the same front-end page under different attribute information. It should be noted that the data retrieval statements and dynamic templates corresponding to different front-end pages can be managed using different data tables, or they can be managed using the same data table. When using the same data table to manage the data retrieval statements and dynamic templates corresponding to different front-end pages, the different information records in the data table store the data retrieval statements and dynamic templates of different front-end pages under different attribute information. Decoupling the data retrieval logic and the format conversion logic facilitates code maintenance and updates.

[0032] In this embodiment, to distinguish between target front-end pages, an API identifier can be configured for each target front-end page. This API identifier is used as page routing information, meaning the target front-end page can initiate data requests to its corresponding back-end interface through the API identifier used as page routing information. To facilitate the back-end interface's response to data requests initiated by the target front-end page using its API identifier, a correspondence needs to be established between the API identifier, at least one attribute information, and at least one template identifier. Based on this correspondence, the template identifier corresponding to the target front-end page can be determined. Further, the back-end interface corresponding to the target front-end page is generated based on this correspondence and the main program code provided by the back-end interface management platform. Specifically, this correspondence can be used as the query object of the main program code, establishing a binding relationship between the main program code and this correspondence, as well as the data retrieval statement and dynamic template corresponding to the template identifier in the correspondence, to obtain the complete back-end interface code. In this embodiment, the main program code represents the logic for selecting a first template identifier from at least one template identifier for the target front-end page based on its bound correspondence, and executing the first data retrieval statement and the first dynamic template corresponding to the first template identifier, respectively.

[0033] It should be noted that the timing of generating backend interfaces for the target frontend page is not limited to the embodiments of this application. It can be done before, during, or after the development of the target frontend page. Regardless of the stage, as long as the attribute information of the target frontend page is determined, the methods provided in the embodiments of this application can be used to generate backend interfaces for the target frontend page.

[0034] Furthermore, after generating the backend interface corresponding to the target frontend page, the target frontend page can send data requests to the backend interface data platform based on the API identifier used as page routing information. Based on this, such as... Figure 2b As shown, the method further includes the following steps:

[0035] 104. After receiving a data request from the target front-end page, the back-end interface management platform runs the corresponding back-end interface of the target front-end page to execute the following logic:

[0036] 105. Respond to a data request from the target front-end page. The data request includes the API identifier corresponding to the target front-end page and the first attribute information, wherein the first attribute information is at least one type of attribute information.

[0037] 106. Based on the API identifier and the first attribute information, and in conjunction with the above correspondence, select the first template identifier that matches the data request from at least one template identifier;

[0038] 107. Run the first data retrieval statement corresponding to the first template identifier to obtain the raw data from the data source, and run the first dynamic template corresponding to the first template identifier to perform format conversion processing on the raw data to obtain the target data required by the target front-end page;

[0039] 108. Return the target data to the target front-end page so that the target front-end page can display the target data.

[0040] To make it easier to understand, let's take a housing rental application as an example. The target front-end page needs to display the average housing price of a certain community as "10,000 yuan / square meter". It needs to call its back-end interface to provide the data to be displayed, which is "10,000 yuan / square meter". So it sends a data request to the back-end interface management platform. In this data request, it carries an API identifier to identify which front-end page it is, and carries its current corresponding attribute information, which is the first attribute information, so as to determine which template identifier's data retrieval statement and dynamic template need to be used. The backend interface management platform runs the backend interface corresponding to the target frontend page, thus it can receive and respond to data requests. The response process is as follows: The API identifier and first attribute information are obtained from the data request. Based on the API identifier and first attribute information, the corresponding relationship of the target frontend page is queried. The template identifier corresponding to the first attribute information is determined as the first template identifier. The data retrieval statement and dynamic template under the first template identifier are obtained as the first data retrieval statement and the first dynamic template, respectively. Running the first data retrieval statement retrieves the value "10000" from the data source. This value itself has no specific meaning, so the first dynamic template needs to be run. Its format conversion function is used to convert the value "10000" into "10000 yuan / square meter" to give it a practical business meaning, which is then returned to the target frontend page for display.

[0041] As user needs evolve, the target front-end page also requires corresponding modifications or improvements. Taking a housing rental application as an example, the target front-end page initially displays the average house price of a particular neighborhood. However, if a user expands their needs and wants to know the average house price of that neighborhood over the past year, an item displaying the average house price over the past year needs to be added to the target front-end page. This requires changing the data source, consequently altering the data retrieval statements, and optionally, changing the dynamic template. In this embodiment, by decoupling the data retrieval statements and the dynamic template, one or both of these can be dynamically modified according to the target front-end page's modification requirements. Specifically, the modification of the target front-end page can be achieved through the following process: obtaining modification request information for the target front-end page. This can be done through the human-computer interaction interface provided by the back-end interface management platform. The back-end interface developers can provide this modification request information through the human-computer interaction interface, or other devices can send the modification request information to the back-end interface management platform via remote communication; there are no limitations on this. The modification requirement information includes API identifier, second attribute information, and modification object description information. The modification object description information indicates the second data retrieval statement to be modified and / or the second dynamic template corresponding to the second data retrieval statement in the dynamic template corresponding to each data retrieval statement of the target front-end page. The second data retrieval statement refers to the data retrieval statement corresponding to the second attribute information among the at least one data retrieval statements obtained above, and the second attribute information belongs to at least one attribute information. Then, based on the second attribute information and the modification object description information, a third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement are obtained. The third data retrieval statement is a new data retrieval statement other than the at least one data retrieval statement, and the third dynamic template is a new dynamic template other than the dynamic template corresponding to the at least one data retrieval statement mentioned above. Then, the second data retrieval statement corresponding to the second attribute information and / or the second dynamic template corresponding to the second data retrieval statement are updated to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement.

[0042] In this application embodiment, updating the second data retrieval statement corresponding to the second attribute information and / or the second dynamic template corresponding to the second data retrieval statement to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement can be achieved in the following ways.

[0043] In one optional embodiment, the third data retrieval statement and / or the third dynamic template are first set to a pre-launch state to test the third data retrieval statement and / or the third dynamic template in the pre-launch state; after the third data retrieval statement and / or the third dynamic template passes the test, the second data retrieval statement and / or the second dynamic template corresponding to the second attribute information are updated to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement, and the third data retrieval statement and / or the third dynamic template are set to an online state.

[0044] Optionally, the second data retrieval statement and / or the second dynamic template corresponding to the second attribute information are updated to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement. This includes adding the third data retrieval statement and / or the third dynamic template to the second template identifier corresponding to the second attribute information. The second template identifier refers to the template identifier corresponding to the second data retrieval statement and / or the second dynamic template. It should be noted that if the modification to the front-end page only involves data retrieval statements, in addition to adding the third data retrieval statement to the second template identifier corresponding to the second attribute information, the second dynamic template corresponding to the second data retrieval statement also needs to be added synchronously to the second template identifier as the third dynamic template corresponding to the third data retrieval statement. Similarly, if the modification to the front-end page only involves dynamic templates, in addition to adding the third dynamic template to the second template identifier corresponding to the second attribute information, the second data retrieval statement corresponding to the second dynamic template also needs to be added synchronously to the second template identifier as the third data retrieval statement corresponding to the third dynamic template.

[0045] In the above embodiments, there may be two or more data retrieval statements and their corresponding dynamic templates under the same template identifier. Based on this, in step 107, before running the first data retrieval statement corresponding to the first template identifier to obtain raw data from the data source, and running the first dynamic template corresponding to the first template identifier to perform format conversion processing on the raw data to obtain the target data required by the target front-end page, it is also necessary to determine whether the first template identifier corresponds to at least two data retrieval statements and at least two dynamic templates. If the first template identifier corresponds to at least two data retrieval statements and at least two dynamic templates, based on the creation time of the at least two data retrieval statements, the data retrieval statement whose creation time is closest to the current time and its corresponding dynamic template are selected as the first data retrieval statement and the first dynamic template, respectively. The creation time is the time when the data retrieval statement and its corresponding dynamic template are added to the corresponding template identifier. For example, if the original data retrieval statement is A1, created on January 1, 2021, and another data retrieval statement B1, created on December 20, 2021, is added under its corresponding second template identifier, the data retrieval statements become A1 and B1. Then, the creation time of the two data retrieval statements is selected as the first data retrieval statement and the first dynamic template, with the creation time distance between them being December 20, 2021, and the data retrieval statement B1 and its corresponding dynamic template.

[0046] In another optional embodiment, after adding the third data retrieval statement and its corresponding third dynamic template to the second template identifier corresponding to the second attribute information, the second data retrieval statement and its corresponding second dynamic template can be set to an offline state, or the second data retrieval statement and its corresponding second dynamic template can be deleted, so as to quickly match the first data retrieval statement and its corresponding first dynamic template.

[0047] In another optional embodiment, if the third data retrieval statement and / or the third dynamic template pass the test, updating the second data retrieval statement and / or the second dynamic template corresponding to the second attribute information to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement can also be achieved in the following way: Based on the API identifier and the second attribute information, and combined with the correspondence, determine the second template identifier, where the second template identifier refers to the template identifier corresponding to the second data retrieval statement and / or the second dynamic template; replace the second data retrieval statement and / or the second dynamic template corresponding to the second template identifier with the third data retrieval statement and / or the third dynamic template. It should be noted that if the modification of the front-end page only involves data retrieval statements, in addition to replacing the second data retrieval statement corresponding to the second template identifier with the third data retrieval statement, it is also necessary to change the second dynamic template corresponding to the second data retrieval statement to the third dynamic template corresponding to the third data retrieval statement. Similarly, if the modification of the front-end page only involves dynamic templates, in addition to replacing the second dynamic template corresponding to the second template identifier with the third dynamic template, it is also necessary to change the second data retrieval statement corresponding to the second dynamic template to the third data retrieval statement corresponding to the third dynamic template.

[0048] The technical solutions provided in the embodiments of this application pre-build shareable main program code in the backend interface management platform, and provide the function of decoupling the data retrieval logic and format conversion logic corresponding to the frontend page. This allows the platform to generate backend interfaces for the frontend page by simply combining the attribute information of the frontend page, obtaining the data retrieval statement representing the data retrieval logic and the dynamic template representing the format conversion logic, configuring the template identifier, and establishing the correspondence between the API identifier, template identifier, and attribute information used as page routing information. Then, this correspondence is integrated with the main program code to obtain the backend interface corresponding to the frontend page. Based on the reuse of the main program code, the backend interface can be generated simply and quickly every time the page requirements change, greatly shortening the development cycle and improving development efficiency. In addition, the decoupling of the data retrieval logic and the format conversion logic simplifies the development process and reduces the difficulty of system maintenance. Furthermore, the backend interface in the embodiments of this application takes effect immediately after generation, and the backend interface management platform can run the backend interface directly without having to deploy it to the server after offline generation as required by the prior art, which is beneficial to improving the stability of the backend interface.

[0049] Figure 3 A backend interface management platform provided for an exemplary embodiment of this application. For example... Figure 3 As shown, the platform includes:

[0050] The information acquisition module 31 is used to acquire at least one data retrieval statement corresponding to the target front-end page and a dynamic template corresponding to each data retrieval statement based on at least one attribute information of the target front-end page. Each data retrieval statement and its corresponding dynamic template respectively represent a data retrieval logic and a format conversion logic corresponding to the target front-end page.

[0051] The identifier configuration module 32 is used to store the data retrieval statement and its corresponding dynamic template into different fields of a record information for each data retrieval statement, so as to decouple the data retrieval logic and the format conversion logic, and to configure template identifiers for the data retrieval statement and its corresponding dynamic template.

[0052] The mapping relationship establishment module 33 is used to configure the API identifier as page routing information for the target front-end page and establish the mapping relationship between the API identifier, at least one attribute information and at least one template identifier.

[0053] The interface generation module 34 is used to generate the backend interface corresponding to the target frontend page according to the correspondence and the main program code provided by the backend interface management platform. The main program code represents the logic of selecting a first template identifier from at least one template identifier for the target frontend page based on the correspondence and running the first data retrieval statement and the first dynamic template corresponding to the first template identifier respectively.

[0054] Furthermore, after the interface generation module 34 generates the backend interface corresponding to the target frontend page, the backend interface management platform further includes: an interface running module, used to run the backend interface corresponding to the target frontend page to execute the following logic: responding to a data request from the target frontend page, the data request including the API identifier and first attribute information corresponding to the target frontend page, the first attribute information belonging to at least one attribute information of the target frontend page; selecting a first template identifier that matches the data request from at least one template identifier of the target frontend page based on the API identifier and the first attribute information of the target frontend page, combined with the corresponding relationship of the target frontend page; running a first data retrieval statement corresponding to the first template identifier of the target frontend page to obtain raw data from the data source, and running a first dynamic template corresponding to the first template identifier of the target frontend page to perform format conversion processing on the raw data of the target frontend page to obtain the target data required by the target frontend page; and returning the target data of the target frontend page to the target frontend page so that the target frontend page can display the target data of the target frontend page.

[0055] Furthermore, the information acquisition module 31 is also used to acquire modification requirement information of the target front-end page. The modification requirement information includes the target front-end page API identifier, second attribute information, and modification object description information. The modification object description information indicates the second data retrieval statement to be modified and / or the second dynamic template corresponding to the second data retrieval statement. The second data retrieval statement refers to the data retrieval statement in at least one data retrieval statement of the target front-end page that corresponds to the second attribute information of the target front-end page. The second attribute information of the target front-end page belongs to at least one attribute information of the target front-end page. Based on the second attribute information of the target front-end page and the target front-end page... The client page modifies the object description information and obtains the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement. The third data retrieval statement of the target front-end page is a new data retrieval statement other than at least one data retrieval statement of the target front-end page, and the third dynamic template of the target front-end page is a new dynamic template other than the dynamic template corresponding to at least one data retrieval statement of the target front-end page. Correspondingly, the back-end interface management platform also includes: an update module, used to update the second data retrieval statement and / or the second dynamic template corresponding to the second attribute information of the target front-end page to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement of the target front-end page.

[0056] Furthermore, when the update module updates the second data retrieval statement and / or the second dynamic template corresponding to the second attribute information of the target front-end page to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement of the target front-end page, it is specifically used to: test the third data retrieval statement and / or the third dynamic template of the target front-end page; and if the third data retrieval statement and / or the third dynamic template of the target front-end page passes the test, update the second data retrieval statement and / or the second dynamic template corresponding to the second attribute information of the target front-end page to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement of the target front-end page.

[0057] Furthermore, before the update module tests the third data retrieval statement and / or the third dynamic template of the target front-end page, the back-end interface management platform also includes: a setting module, used to set the third data retrieval statement and / or the third dynamic template of the target front-end page to a pre-launch state, so as to test the third data retrieval statement and / or the third dynamic template of the target front-end page in the pre-launch state; and after the third data retrieval statement and / or the third dynamic template of the target front-end page passes the test, to set the third data retrieval statement and / or the third dynamic template of the target front-end page to an online state.

[0058] Furthermore, when the update module updates the second data retrieval statement and / or the second dynamic template corresponding to the second attribute information of the target front-end page to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement of the target front-end page, it specifically adds the third data retrieval statement and / or the third dynamic template of the target front-end page to the second template identifier corresponding to the second attribute information of the target front-end page. The second template identifier of the target front-end page refers to the template identifier corresponding to the second data retrieval statement and / or the second dynamic template of the target front-end page.

[0059] Furthermore, before the interface execution module retrieves raw data from the data source by running the first data retrieval statement corresponding to the first template identifier of the target front-end page, and performs format conversion processing on the raw data of the target front-end page by running the first dynamic template corresponding to the first template identifier of the target front-end page to obtain the target data required by the target front-end page, it also includes: a selection module, which is used to select the data retrieval statement whose creation time is closest to the current time and its corresponding dynamic template as the first data retrieval statement and the first dynamic template, respectively, based on the creation time of the at least two data retrieval statements of the target front-end page.

[0060] Furthermore, the update module, when used to update the second data retrieval statement and / or the second dynamic template corresponding to the second attribute information of the target front-end page to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement of the target front-end page, specifically uses the following steps: Based on the API identifier and the second attribute information of the target front-end page, and combined with the correspondence of the target front-end page, determine the second template identifier, where the second template identifier of the target front-end page refers to the template identifier corresponding to the second data retrieval statement and / or the second dynamic template of the target front-end page; replace the second data retrieval statement and / or the second dynamic template corresponding to the second template identifier of the target front-end page with the third data retrieval statement and / or the third dynamic template of the target front-end page.

[0061] Furthermore, the backend interface management platform also includes: a determination module, used to determine the application type of the target application to which the target frontend page belongs, and at least one of the following information: version information, frontend type, and region information supported by the target application, as at least one attribute information of the target frontend page; correspondingly, when the information acquisition module 31 is used to acquire at least one data retrieval statement and a dynamic template corresponding to each data retrieval statement based on at least one attribute information of the target frontend page, it is specifically used to: when the target application supports different version information, different frontend types, and / or different region information, according to the application type of the target application, acquire the data retrieval statement and dynamic template corresponding to the target frontend page under different version information, different frontend types, and / or different region information supported by the target application.

[0062] Furthermore, the target front-end page data request originates from the target front-end page of the target application running in the first region information, which has the first version information, the first front-end type, and the first region information. The first attribute information of the target front-end page includes at least one of the first version information, the first front-end type, and the first region information.

[0063] For details on the specific implementation principles of each module or unit in the embodiments of this application and the detailed implementation methods of each step, please refer to the description of the same or corresponding steps above, which will not be repeated here.

[0064] Figure 4 A computer device provided as an exemplary embodiment of this application includes: a memory 40a and a processor 40b; wherein the memory 40a is used to store a computer program; and the processor 40b is coupled to the memory 40a and used to execute the computer program to perform the following steps:

[0065] Based on at least one attribute information of the target front-end page, obtain at least one data retrieval statement corresponding to the target front-end page and a dynamic template corresponding to each data retrieval statement. Each data retrieval statement and its corresponding dynamic template respectively represent a data retrieval logic and a format conversion logic corresponding to the target front-end page. For each data retrieval statement, store the data retrieval statement and its corresponding dynamic template into different fields of a record information to decouple the data retrieval logic and the format conversion logic, and configure template identifiers for the data retrieval statements and their corresponding dynamic templates. Configure an API identifier for the target front-end page as page routing information, establish a correspondence between the API identifier, at least one attribute information, and at least one template identifier, and generate a back-end interface corresponding to the target front-end page according to the correspondence and the main program code provided by the back-end interface management platform. The main program code represents the logic of selecting a first template identifier from at least one template identifier for the target front-end page based on the correspondence and running the first data retrieval statement and the first dynamic template corresponding to the first template identifier respectively.

[0066] Furthermore, after the processor 40b generates the backend interface corresponding to the target frontend page, the processor 40b is also used to run the backend interface corresponding to the target frontend page to execute the following logic: responding to a data request from the target frontend page, the data request including an API identifier corresponding to the target frontend page and first attribute information, the first attribute information being at least one type of attribute information; selecting a first template identifier that matches the data request from at least one template identifier based on the API identifier and the first attribute information, combined with the correspondence; running a first data retrieval statement corresponding to the first template identifier to obtain raw data from the data source, and running a first dynamic template corresponding to the first template identifier to perform format conversion processing on the raw data to obtain the target data required by the target frontend page; and returning the target data to the target frontend page so that the target frontend page can display the target data.

[0067] Furthermore, the processor 40b is also used to obtain modification requirement information of the target front-end page, including API identifier, second attribute information, and modification object description information; wherein, the modification object description information indicates the second data retrieval statement to be modified and / or the second dynamic template corresponding to the second data retrieval statement, the second data retrieval statement refers to the data retrieval statement corresponding to the second attribute information among at least one data retrieval statement, and the second attribute information belongs to at least one attribute information; based on the second attribute information and the modification object description information, a third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement are obtained, the third data retrieval statement is a new data retrieval statement other than at least one data retrieval statement, and the third dynamic template is a new dynamic template other than the dynamic template corresponding to at least one data retrieval statement; the second data retrieval statement corresponding to the second attribute information and / or the second dynamic template corresponding to the second data retrieval statement are updated to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement.

[0068] Furthermore, when the processor 40b updates the second data retrieval statement and / or the second dynamic template corresponding to the second attribute information to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement, it specifically performs the following: tests the third data retrieval statement and / or the third dynamic template; and if the third data retrieval statement and / or the third dynamic template passes the test, updates the second data retrieval statement and / or the second dynamic template corresponding to the second attribute information to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement.

[0069] Furthermore, before the processor 40b tests the third data retrieval statement and / or the third dynamic template, the processor 40b is also configured to: set the third data retrieval statement and / or the third dynamic template to a pre-launch state, so as to test the third data retrieval statement and / or the third dynamic template in the pre-launch state; and, after the third data retrieval statement and / or the third dynamic template passes the test, set the third data retrieval statement and / or the third dynamic template to an online state.

[0070] Furthermore, when the processor 40b updates the second data retrieval statement and / or the second dynamic template corresponding to the second attribute information to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement, it specifically adds the third data retrieval statement and / or the third dynamic template to the second template identifier corresponding to the second attribute information. The second template identifier refers to the template identifier corresponding to the second data retrieval statement and / or the second dynamic template.

[0071] Furthermore, before the processor 40b is used to run the first data retrieval statement corresponding to the first template identifier to obtain raw data from the data source, and to run the first dynamic template corresponding to the first template identifier to perform format conversion processing on the raw data to obtain the target data required by the target front-end page, it is also used to: in the case that the first template identifier corresponds to at least two data retrieval statements and at least two dynamic templates, select the data retrieval statement whose creation time is closest to the current time and its corresponding dynamic template as the first data retrieval statement and the first dynamic template, respectively, based on the creation time of the at least two data retrieval statements.

[0072] Furthermore, when the processor 40b updates the second data retrieval statement and / or the second dynamic template corresponding to the second attribute information to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement, it specifically performs the following steps: determining the second template identifier based on the API identifier and the second attribute information, combined with the correspondence relationship; the second template identifier refers to the template identifier corresponding to the second data retrieval statement and / or the second dynamic template; and replacing the second data retrieval statement and / or the second dynamic template corresponding to the second template identifier with the third data retrieval statement and / or the third dynamic template.

[0073] Furthermore, the processor 40b is also used to: determine the application type of the target application to which the target front-end page belongs, and at least one of the following information: version information, front-end type and region information supported by the target application, as at least one attribute information of the target front-end page;

[0074] Accordingly, when processor 40b is used to obtain at least one data retrieval statement and a dynamic template corresponding to each data retrieval statement based on at least one attribute information of the target front-end page, it is specifically used to: when the target application supports different version information, different front-end types and / or different regional information, according to the application type of the target application, obtain the data retrieval statement and dynamic template corresponding to the target front-end page under different version information, different front-end types and / or different regional information supported by the target application.

[0075] Furthermore, the data request originates from a target front-end page in a target application that is based on the first version information, the first front-end type, and the first region information. The first attribute information includes at least one of the first version information, the first front-end type, and the first region information.

[0076] Furthermore, such as Figure 4 As shown, the electronic terminal also includes: a display screen 40c, a communication component 40d, a power supply component 40e, an audio component 40f, and other components. Figure 4 The diagram only shows some components and does not mean that the electronic terminal only includes... Figure 4The components shown. The electronic terminal in this embodiment can be implemented as a desktop computer, laptop computer, smartphone, or IoT device, etc.

[0077] For details on the specific implementation principles of each module or unit in the embodiments of this application and the detailed implementation methods of each step, please refer to the description of the same or corresponding steps above, which will not be repeated here.

[0078] An exemplary embodiment of this application provides a computer-readable storage medium storing a computer program, which, when executed by one or more processors, causes the one or more processors to perform the following steps:

[0079] Based on at least one attribute information of the target front-end page, obtain at least one data retrieval statement corresponding to the target front-end page and a dynamic template corresponding to each data retrieval statement. Each data retrieval statement and its corresponding dynamic template respectively represent a data retrieval logic and a format conversion logic corresponding to the target front-end page. For each data retrieval statement, store the data retrieval statement and its corresponding dynamic template into different fields of a record information to decouple the data retrieval logic and the format conversion logic, and configure template identifiers for the data retrieval statements and their corresponding dynamic templates. Configure an API identifier for the target front-end page as page routing information, establish a correspondence between the API identifier, at least one attribute information, and at least one template identifier, and generate a back-end interface corresponding to the target front-end page according to the correspondence and the main program code provided by the back-end interface management platform. The main program code represents the logic of selecting a first template identifier from at least one template identifier for the target front-end page based on the correspondence and running the first data retrieval statement and the first dynamic template corresponding to the first template identifier respectively.

[0080] Furthermore, after the processor generates the backend interface corresponding to the target frontend page, the processor also runs the backend interface corresponding to the target frontend page to execute the following logic: responding to a data request from the target frontend page, the data request including an API identifier corresponding to the target frontend page and first attribute information, the first attribute information being at least one type of attribute information; selecting a first template identifier that matches the data request from at least one template identifier based on the API identifier and the first attribute information, combined with the correspondence; running a first data retrieval statement corresponding to the first template identifier to obtain raw data from the data source, and running a first dynamic template corresponding to the first template identifier to perform format conversion processing on the raw data to obtain the target data required by the target frontend page; and returning the target data to the target frontend page so that the target frontend page can display the target data.

[0081] Furthermore, the processor is also used to obtain modification requirement information of the target front-end page, including API identifier, second attribute information, and modification object description information; wherein, the modification object description information indicates the second data retrieval statement to be modified and / or the second dynamic template corresponding to the second data retrieval statement, the second data retrieval statement refers to the data retrieval statement corresponding to the second attribute information among at least one data retrieval statement, and the second attribute information belongs to at least one attribute information; based on the second attribute information and the modification object description information, a third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement are obtained, the third data retrieval statement is a new data retrieval statement other than at least one data retrieval statement, and the third dynamic template is a new dynamic template other than the dynamic template corresponding to at least one data retrieval statement; the second data retrieval statement corresponding to the second attribute information and / or the second dynamic template corresponding to the second data retrieval statement are updated to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement.

[0082] Furthermore, when the processor updates the second data retrieval statement corresponding to the second attribute information and / or the second dynamic template corresponding to the second data retrieval statement to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement, it specifically performs the following: tests the third data retrieval statement and / or the third dynamic template; if the third data retrieval statement and / or the third dynamic template passes the test, it updates the second data retrieval statement corresponding to the second attribute information and / or the second dynamic template corresponding to the second data retrieval statement to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement.

[0083] Furthermore, before the processor tests the third data retrieval statement and / or the third dynamic template, the processor is also configured to: set the third data retrieval statement and / or the third dynamic template to a pre-launch state for testing the third data retrieval statement and / or the third dynamic template in the pre-launch state; and, after the third data retrieval statement and / or the third dynamic template passes the test, set the third data retrieval statement and / or the third dynamic template to an online state.

[0084] Furthermore, when the processor updates the second data retrieval statement and / or the second dynamic template corresponding to the second attribute information to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement, it specifically adds the third data retrieval statement and / or the third dynamic template to the second template identifier corresponding to the second attribute information. The second template identifier refers to the template identifier corresponding to the second data retrieval statement and / or the second dynamic template.

[0085] Furthermore, before the processor runs the first data retrieval statement corresponding to the first template identifier to obtain raw data from the data source, and runs the first dynamic template corresponding to the first template identifier to perform format conversion processing on the raw data to obtain the target data required by the target front-end page, it is also used to: in the case that the first template identifier corresponds to at least two data retrieval statements and at least two dynamic templates, select the data retrieval statement whose creation time is closest to the current time and its corresponding dynamic template as the first data retrieval statement and the first dynamic template, respectively, based on the creation time of the at least two data retrieval statements.

[0086] Furthermore, when the processor updates the second data retrieval statement and / or the second dynamic template corresponding to the second attribute information to the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement, it specifically performs the following steps: based on the API identifier and the second attribute information, and in conjunction with the correspondence, determines the second template identifier, where the second template identifier refers to the template identifier corresponding to the second data retrieval statement and / or the second dynamic template; and replaces the second data retrieval statement and / or the second dynamic template corresponding to the second template identifier with the third data retrieval statement and / or the third dynamic template.

[0087] Furthermore, the processor is also used to: determine the application type of the target application to which the target front-end page belongs, and at least one of the following information: version information, front-end type, and region information supported by the target application, as at least one attribute information of the target front-end page;

[0088] Accordingly, when the processor is used to obtain at least one data retrieval statement and a dynamic template corresponding to each data retrieval statement based on at least one attribute information of the target front-end page, it is specifically used to: when the target application supports different version information, different front-end types and / or different regional information, according to the application type of the target application, obtain the data retrieval statement and dynamic template corresponding to the target front-end page under different version information, different front-end types and / or different regional information supported by the target application.

[0089] Furthermore, the data request originates from a target front-end page in a target application that is based on the first version information, the first front-end type, and the first region information. The first attribute information includes at least one of the first version information, the first front-end type, and the first region information.

[0090] For detailed implementation methods of the above steps in the embodiments of this application, please refer to the description of the same or corresponding steps above, which will not be repeated here.

[0091] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0092] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application.

[0093] Understand that each block of a flowchart and / or block diagram can be implemented by computer program instructions, as well as combinations of blocks in a flowchart and / or block diagram. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0094] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0095] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0096] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0097] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0098] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0099] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0100] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for generating a backend interface, characterized in that, The method, applied to a backend interface management platform, includes: Based on at least one attribute information of the target front-end page, at least one data retrieval statement corresponding to the target front-end page and a dynamic template corresponding to each data retrieval statement are obtained. Each data retrieval statement and its corresponding dynamic template respectively represent a data retrieval logic and a format conversion logic corresponding to the target front-end page. The at least one attribute information of the target front-end page is at least one of the application type, front-end type, version information and region information of the application to which the front-end page belongs. The data retrieval logic and format conversion logic corresponding to the same target front-end page or different target front-end pages under different attribute information will be different. For each data retrieval statement, the data retrieval statement and its corresponding dynamic template are stored in different fields of a record information to decouple the data retrieval logic and the format conversion logic. Template identifiers are configured for the data retrieval statement and its corresponding dynamic template, so that when at least one attribute information of the target front-end page changes, the corresponding data retrieval statement and / or dynamic template can be dynamically modified. Configure an API identifier as page routing information for the target front-end page, and establish a correspondence between the API identifier, the at least one attribute information, and the at least one template identifier; The correspondence is used as a query object for the pre-built, shareable main program code of the backend interface management platform. A binding relationship is established between the main program code and the correspondence, as well as the data retrieval statement and dynamic template corresponding to the template identifier in the correspondence, so as to generate the backend interface corresponding to the target frontend page. The main program code represents the logic of selecting a first template identifier from the at least one template identifier for the target frontend page based on the correspondence and running the first data retrieval statement and the first dynamic template corresponding to the first template identifier respectively.

2. The method according to claim 1, characterized in that, After generating the backend interface corresponding to the target frontend page, the process also includes: Run the backend interface corresponding to the target frontend page to execute the following logic: Responding to a data request from the target front-end page, the data request includes an API identifier corresponding to the target front-end page and first attribute information, wherein the first attribute information belongs to at least one type of attribute information; Based on the API identifier and the first attribute information, and in conjunction with the correspondence, a first template identifier adapted to the data request is selected from the at least one template identifier; and The system executes the first data retrieval statement corresponding to the first template identifier to obtain raw data from the data source, and executes the first dynamic template corresponding to the first template identifier to perform format conversion processing on the raw data to obtain the target data required by the target front-end page; and The target data is returned to the target front-end page so that the target front-end page can display the target data.

3. The method according to claim 1, characterized in that, Also includes: Obtain modification request information for the target front-end page, wherein the modification request information includes the API identifier, the second attribute information, and the description information of the modification object; Wherein, the modified object description information indicates the second data retrieval statement to be modified and / or the second dynamic template corresponding to the second data retrieval statement, the second data retrieval statement refers to the data retrieval statement corresponding to the second attribute information among the at least one data retrieval statements, and the second attribute information belongs to the at least one attribute information; Based on the second attribute information and the modified object description information, obtain the third data retrieval statement and / or the third dynamic template corresponding to the third data retrieval statement. The third data retrieval statement is a new data retrieval statement other than the at least one data retrieval statement. The third dynamic template is a new dynamic template other than the dynamic template corresponding to the at least one data retrieval statement. Update the second dynamic template corresponding to the second data retrieval statement and / or the second data retrieval statement to the third dynamic template corresponding to the third data retrieval statement and / or the third data retrieval statement.

4. The method according to claim 3, characterized in that, Updating the second dynamic template corresponding to the second data retrieval statement and / or the second data retrieval statement to the third dynamic template corresponding to the third data retrieval statement includes: The third data retrieval statement and / or the third dynamic template are tested. If the third data retrieval statement and / or the third dynamic template passes the test, the second dynamic template corresponding to the second attribute information and / or the second data retrieval statement is updated to the third dynamic template corresponding to the third data retrieval statement and / or the third data retrieval statement.

5. The method according to claim 4, characterized in that, Before testing the third data retrieval statement and / or the third dynamic template, the following is also included: Set the third data retrieval statement and / or the third dynamic template to a pre-launch state for testing in the pre-launch state; and After the third data retrieval statement and / or the third dynamic template pass the test, the third data retrieval statement and / or the third dynamic template are set to online status.

6. The method according to any one of claims 3-5, characterized in that, Updating the second dynamic template corresponding to the second data retrieval statement and / or the second data retrieval statement to the third dynamic template corresponding to the third data retrieval statement includes: Add the third data retrieval statement and / or the third dynamic template to the second template identifier corresponding to the second attribute information. The second template identifier refers to the template identifier corresponding to the second data retrieval statement and / or the second dynamic template.

7. The method according to claim 6, characterized in that, Before executing the first data retrieval statement corresponding to the first template identifier to obtain raw data from the data source, and executing the first dynamic template corresponding to the first template identifier to perform format conversion processing on the raw data to obtain the target data required by the target front-end page, the process further includes: When the first template identifier corresponds to at least two data retrieval statements and at least two dynamic templates, the data retrieval statement whose creation time is closest to the current time and its corresponding dynamic template are selected as the first data retrieval statement and the first dynamic template, respectively, based on the creation time of the at least two data retrieval statements.

8. The method according to any one of claims 3-5, characterized in that, Updating the second dynamic template corresponding to the second data retrieval statement and / or the second data retrieval statement to the third dynamic template corresponding to the third data retrieval statement includes: Based on the API identifier and the second attribute information, and in conjunction with the correspondence, a second template identifier is determined. The second template identifier refers to the template identifier corresponding to the second data retrieval statement and / or the second dynamic template. Replace the second data retrieval statement and / or the second dynamic template corresponding to the second template identifier with the third data retrieval statement and / or the third dynamic template.

9. The method according to any one of claims 2-5, characterized in that, Also includes: The application type of the target application to which the target front-end page belongs, and at least one of the following information—version information, front-end type, and region information supported by the target application—are determined as at least one attribute information of the target front-end page. Accordingly, based on at least one attribute information of the target front-end page, at least one data retrieval statement corresponding to the target front-end page and a dynamic template corresponding to each data retrieval statement are obtained, including: When the target application supports different version information, different front-end types and / or different regional information, the data retrieval statements and dynamic templates corresponding to the target front-end page under the different version information, different front-end types and / or different regional information supported by the target application are obtained according to the application type of the target application.

10. The method according to claim 9, characterized in that, The data request originates from a target front-end page in a target application that is running in a target region and has first version information, first front-end type, and first region information. The first attribute information includes at least one of the first version information, first front-end type, and first region information.

11. A backend interface management platform, characterized in that, include: The information acquisition module is used to acquire at least one data retrieval statement and a dynamic template corresponding to each data retrieval statement based on at least one attribute information of the target front-end page. Each data retrieval statement and its corresponding dynamic template respectively represent a data retrieval logic and a format conversion logic corresponding to the target front-end page. The at least one attribute information of the target front-end page is at least one of the application type, front-end type, version information and region information of the application to which the front-end page belongs. The data retrieval logic and format conversion logic corresponding to the same target front-end page or different target front-end pages under different attribute information will be different. The identifier configuration module is used to store each data retrieval statement and its corresponding dynamic template into different fields of a record information to decouple the data retrieval logic and the format conversion logic, and to configure template identifiers for the data retrieval statement and its corresponding dynamic template, so that when at least one attribute information of the target front-end page changes, the corresponding data retrieval statement and / or dynamic template can be dynamically modified. The correspondence establishment module is used to configure an API identifier as page routing information for the target front-end page, and to establish a correspondence between the API identifier, the at least one attribute information and the at least one template identifier; An interface generation module is used to use the correspondence as a query object for the pre-built, shareable main program code of the backend interface management platform, establish a binding relationship between the main program code and the correspondence, as well as the data retrieval statement and dynamic template corresponding to the template identifier in the correspondence, so as to generate the backend interface corresponding to the target frontend page. The main program code represents the logic for selecting a first template identifier from the at least one template identifier for the target frontend page based on the correspondence and running the first data retrieval statement and the first dynamic template corresponding to the first template identifier respectively.

12. A computer device, characterized in that, include: A memory and a processor; wherein the memory is used to store a computer program; and the processor is coupled to the memory for executing the computer program to perform the steps of the method according to any one of claims 1-10.

13. A computer-readable storage medium storing a computer program, characterized in that, When the computer instructions are executed by one or more processors, the one or more processors are caused to perform the steps of the method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Data processing method and device and electronic equipment

    CN111552606A

  • Call code generation method and device, electronic terminal and storage medium

    CN113535147A