WO2024098755A1 - 一种接口开发方法及相关设备 - Google Patents
一种接口开发方法及相关设备 Download PDFInfo
- Publication number
- WO2024098755A1 WO2024098755A1 PCT/CN2023/100929 CN2023100929W WO2024098755A1 WO 2024098755 A1 WO2024098755 A1 WO 2024098755A1 CN 2023100929 W CN2023100929 W CN 2023100929W WO 2024098755 A1 WO2024098755 A1 WO 2024098755A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- page
- business
- web
- user
- apis
- Prior art date
Links
- 238000011161 development Methods 0.000 title claims abstract description 215
- 238000000034 method Methods 0.000 title claims abstract description 86
- 239000008186 active pharmaceutical agent Substances 0.000 claims description 274
- 230000015654 memory Effects 0.000 claims description 26
- 230000001960 triggered effect Effects 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 6
- 230000004044 response Effects 0.000 claims description 6
- 238000013461 design Methods 0.000 abstract description 24
- 230000006870 function Effects 0.000 description 17
- 230000003068 static effect Effects 0.000 description 14
- 238000004891 communication Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 10
- 230000000007 visual effect Effects 0.000 description 5
- 238000007726 management method Methods 0.000 description 4
- 238000012800 visualization Methods 0.000 description 4
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000013507 mapping Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 2
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 241000590419 Polygonia interrogationis Species 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 230000007717 exclusion Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 239000002184 metal Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Definitions
- the present application relates to the field of application development technology, and in particular to an interface development method, system, computing device cluster, computer-readable storage medium, and computer program product.
- Web applications (web applications, web apps), referred to as web applications, refer to applications that use a web browser to operate on a network (Internet or intranet). Web applications usually do not require additional client installation on the terminal, so they are widely used in many scenarios. For example, web applications can be used in the catering industry to provide users with ordering services. For another example, web applications can be used in the logistics industry to provide users with logistics query services.
- Web applications can usually be developed collaboratively by a development team including front-end developers, back-end developers, and testers.
- front-end developers are responsible for client design
- back-end developers are responsible for back-end logic services
- testers are responsible for application feature testing.
- An important part of client design is the design of the web application programming interface (web API).
- Web APIs usually rely on manual design by front-end and back-end developers, which is inefficient and difficult to meet business needs, especially the needs of frequently iterated businesses.
- the present application provides an interface development method, which captures the business scenarios that developers are dealing with based on page metadata, such as the components carried by the page, obtains corresponding business information, searches the background service model library based on the business information to obtain the corresponding business model, and automatically completes the web API design and assembly work based on the business model, thereby improving development efficiency.
- the present application provides an interface development method.
- the method can be executed by an application development system.
- the application development system can be a software system or a hardware system for developing applications.
- the software system can be an integrated development environment (IDE) or an independent development software.
- the IDE can include low-code development tools.
- the software system can be deployed in a computing device cluster, and the computing device cluster executes the program code of the software system, thereby executing the interface development method of the present application.
- the application development system is a hardware system
- the hardware system can be a computing device cluster with an interface development function, and when the hardware system is running, the interface development method of the present application is executed.
- the application development system receives page metadata of a web application configured by a user through a development interface, where the page metadata includes components carried by the page of the web application.
- the system searches the background service model library based on business information corresponding to the components carried by the page to obtain at least one set of business models corresponding to the page.
- the system then generates a web application programming interface (web API) corresponding to the page based on at least one set of business models.
- web API web application programming interface
- This method can capture the business scenarios that developers are dealing with based on page metadata, such as the components carried by the page, obtain the corresponding business information, and search the background service model library based on the business information to obtain the corresponding business model.
- the web API design and assembly work can be completed automatically, thereby improving development efficiency.
- the web API is generated based on the service API assembly of the business model in the background service model library. Therefore, the definition of the business entity in the web view model corresponding to the web API is consistent with the definition of the business entity in the background business model, which reduces communication costs and improves development efficiency.
- the application development system may also present the at least one group of business models to the user, and determine a group of business models selected by the user from the at least one group of business models. Accordingly, when generating a web API, the application development system may generate a web application programming interface corresponding to the page according to the group of business models selected by the user.
- This method recommends at least one group of business models to users through intelligent search. Users can select a group of business models for generating web APIs through simple interactive operations, thereby improving development efficiency and lowering development thresholds.
- each business model can provide at least one service API
- the application development system can generate a web API by assembling the service APIs with the service API as the granularity.
- the application development system can generate a web API from at least one set of service APIs of the business model.
- the service API at least one group of target APIs is determined, and then a web API corresponding to the page is generated according to the at least one group of target APIs.
- the service API used to generate the web API comes from the business model, which ensures the consistency of the definition of business entities between the front-end and back-end, reduces communication costs, and improves development efficiency.
- the application development system may also present the at least one set of target APIs to the user, and then determine a set of target APIs selected by the user from the at least one set of target APIs. Accordingly, when generating a web API, the application development system may generate a web API corresponding to the page according to the set of target APIs selected by the user.
- This method recommends a group of target APIs to users through intelligent search. Users can select a group of target APIs for generating web APIs through simple interactive operations, thereby improving development efficiency and lowering the development threshold.
- the web API corresponding to the page includes a query API.
- the application development system can determine at least one set of target APIs that meet the data loading requirements from at least one set of service APIs of the business model according to the data loading requirements of the components carried by the page.
- This method combines the data loading requirements edited by the user when designing static pages in the development interface, accurately searches for at least one set of target APIs that meet the data loading requirements, and then generates a web API that meets business needs, reducing the number of rework times and improving development efficiency.
- the web API corresponding to the page includes an operation API.
- the operation API is an API for performing change operations on the page, such as an API for performing order submission operations on the order page, and an API for performing payment operations on the order page. Accordingly, the application development system can determine at least one group of target APIs that meet the operation requirements from the service APIs of the at least one group of business models according to the operation requirements of the components carried by the page.
- This method combines the operational requirements edited by users when designing static pages in the development interface, accurately searches for at least one set of target APIs that meet the operational requirements, and then generates a web API that meets business needs, reducing the number of rework times and improving development efficiency.
- the application development system when the application development system generates a web API corresponding to a page based on at least one set of target APIs, the application development system can associate at least one set of target APIs through the model fields of the business model to obtain the web API corresponding to the page.
- This method does not require users to manually bind different service APIs. On the one hand, it can improve development efficiency, and on the other hand, it can avoid manual binding errors that cause the web API to fail to meet business needs.
- the application development system can present a development interface to the user, which includes multiple component templates.
- the application development system can then determine a target component template selected by the user from the multiple component templates, receive the user's configuration information for the target component template, and obtain a component carried by at least one page of the network application.
- This method provides users with visual components to complete building block-style page design and development work, simplifying the development process and improving development efficiency.
- the application development system may respond to the interface generation operation triggered by the user, search the background service model library according to the business information corresponding to the component carried by the at least one page, and obtain the business model.
- This method captures the interface generation operations triggered by users, automatically captures business scenarios to obtain business information, and searches the background service model library based on the business information to obtain the business model, laying the foundation for generating web APIs.
- the application development system can search the background service model library to obtain the business model based on the business information corresponding to the component carried by at least one page.
- This method captures the operation time of the most recent configuration operation, identifies whether the user has completed the static page design, and then decides whether to trigger interface generation, laying the foundation for automatically generating web APIs.
- the development interface carries a model recommendation control
- the application development system can present the at least one group of business models to the user in response to the user's triggering operation on the model recommendation control, thereby intelligently recommending business models to the user to assist in generating a web API.
- the method improves development efficiency by recommending business models without the need for manual design by the user.
- the method improves user experience by setting a model recommendation control in the development interface to guide the user to trigger model recommendation.
- the development interface carries a service API recommendation control
- the application development system can present the at least one set of target APIs to the user in response to the user's triggering operation on the service API recommendation control, thereby intelligently recommending the target API to the user to assist in generating the web API.
- the method improves development efficiency by recommending the target API without the need for manual design by the user.
- the method improves the user experience by setting the service API recommendation control in the development interface to guide the user to trigger the API recommendation.
- the present application provides an application development system.
- the system comprises:
- a web editor configured to receive page metadata of a network application configured by a user through a development interface, wherein the page metadata includes components carried by the page of the network application;
- a model search device used to search the background service model library according to the business information corresponding to the component carried by the page, and obtain at least one group of business models corresponding to the page;
- the web editor is also used to generate a network application programming interface web API corresponding to the page based on at least one set of business models.
- the web editor is further used to:
- the web editor is specifically used for:
- a network application programming interface web API corresponding to the page is generated.
- the web editor is specifically used to:
- the web editor is further used to:
- the web editor is specifically used for:
- the web API corresponding to the page includes a query API
- the web editor is specifically used for:
- At least one group of target APIs that meet the data loading requirement are determined from the at least one group of service APIs of the business model.
- the web API corresponding to the page includes an operation API
- the web editor is specifically used for:
- At least one group of target APIs that meet the operation requirements are determined from the at least one group of service APIs of the business model.
- the web editor is specifically used to:
- the web editor is specifically used to:
- the development interface includes a plurality of component templates
- the model search device is specifically used to:
- the backend service model library is searched according to the business information corresponding to the component carried by the at least one page to obtain the business model.
- the model search device is specifically used to:
- the operation time of the user's most recent configuration operation on the development interface meets a preset condition, and the background service model library is searched according to the business information corresponding to the component carried by the at least one page to obtain the business model.
- the present application provides a computing device cluster.
- the computing device cluster includes at least one computing device, and the at least one computing device includes at least one processor and at least one memory.
- the at least one processor and the at least one memory communicate with each other.
- the at least one processor is used to execute instructions stored in the at least one memory, so that the computing device or the computing device cluster executes the interface development method described in the first aspect or any implementation of the first aspect.
- the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, wherein the instructions instruct a computing device or a computing device cluster to execute the interface development method described in the above-mentioned first aspect or any one of the implementations of the first aspect.
- the present application provides a computer program product comprising instructions, which, when executed on a computing device or a computing device cluster, When the computing device or computing device cluster executes the interface development method described in the first aspect or any one of the implementations of the first aspect.
- FIG1 is a schematic diagram of an ordering page provided in an embodiment of the present application.
- FIG2 is a schematic diagram of an order page provided in an embodiment of the present application.
- FIG3 is a schematic diagram of the architecture of an application development system provided in an embodiment of the present application.
- FIG4 is a flow chart of an interface development method provided in an embodiment of the present application.
- FIG5 is a schematic diagram of a development interface provided in an embodiment of the present application.
- FIG6 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application.
- FIG7 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application.
- FIG8 is a schematic diagram of the structure of another computing device cluster provided in an embodiment of the present application.
- FIG. 9 is a schematic diagram of the structure of another computing device cluster provided in an embodiment of the present application.
- first and second in the embodiments of the present application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of the features.
- Web applications refer to applications that are operated on a network (Internet or intranet) using a web browser.
- Common web applications may include but are not limited to webmail, online shopping, online forums, online games or blogs.
- Web applications can be developed using a client/server (C/S) architecture or a serverless architecture.
- the client is a program that corresponds to a server and provides local services to clients.
- a client can be a web browser.
- the server is used to respond to client requests to provide services.
- Serverless is a cloud-native development model that allows developers to focus on building and running applications without having to manage servers. It should be noted that there are still servers in the serverless solution, but the servers have been removed from application development, and the cloud service provider is responsible for routine tasks such as provisioning, maintaining, and scaling server infrastructure. Developers can simply package the code into a container for deployment. Once deployed, serverless applications can respond to demand and automatically perform scaling management (such as expansion or reduction) as needed.
- aPaaS application platform as a service
- PaaS platform as a service
- aPaaS can provide users with low-code tools (even zero-code tools). On the one hand, it provides a rapid development environment where users can complete the development, testing, and deployment of applications (such as web applications) within a few hours and can adjust or update them at any time. On the other hand, it lowers the development threshold so that non-technical personnel can also complete application development.
- front-end developers can use rich page components to build web application static pages in a building block manner. Then front-end developers and back-end developers can manually design web APIs based on the above web application static pages and provide data query and business action interfaces involved in page components.
- Web API is the interface contract between front-end developers and back-end developers, and front-end developers and back-end developers can complete related development work respectively.
- the front-end developer uses page components to assemble static ordering pages as shown in Figure 1 and order pages as shown in Figure 2 based on the needs of the ordering business on the low-code tool.
- the ordering page may include the following components: application container, restaurant name box, restaurant address box, restaurant menu table, table selection list, total price box, order button, my order button, and the order page may include the following components: application container, restaurant name box, restaurant address box, close page button, order entry table, order total price box, table box, order progress box, and payment button.
- Table 1 The specific details are shown in Table 1:
- the demonstration application of Figure 1 or Figure 2 covers the process involved from the user's perspective, which specifically includes the following steps: the user opens the application through the mobile phone, visits the ordering page, views the restaurant information and menu, selects the dish and the number of portions, and the table, and then submits the order and views the results on the order page.
- the user can view the order progress while waiting and dining, and can also initiate payment.
- the front-end developers and back-end developers jointly designed the web API based on the static ordering page and order page.
- the interface parameters of the web API are formulated according to component interaction (obtaining data to be rendered or performing business operations), as shown below:
- the web view model involved in each web API includes at least one view sub-model, and each view sub-model includes at least one model field, as shown below:
- front-end developers and back-end developers complete the front-end and back-end development work in parallel based on the web API.
- front-end developers need to bind page components to web API.
- Web API calls and input and output operations need to be manually configured by front-end developers and associated with the corresponding page components, as shown below:
- backend services can be divided by domain, and support flexible development and maintenance, and can be efficiently combined and reused.
- backend services and service APIs are as follows:
- Web API can be assembled from the API of the background service.
- the web view model mapping included in it covers the page operation scenario.
- the API of the background service will not be called directly to the front end, because the page logic of the front end often involves the cooperation of multiple background services. Calling domain services is not only complex to implement, but also increases the number of calls between the front-end and the back-end, reducing performance.
- the implementation process of Web API is done manually and requires developers to assemble it manually, as shown below:
- the web API that cooperates with the page components is a traditional manual design from scratch, which requires not only considering the page information one by one, but also considering the actual business logic modeling, which is relatively inefficient.
- the web API depends on the API of the background service, and the model of the API of the background service also depends on the manual design of the developer. The developer who develops the API of the background service may be different from the developer who develops the web API. If the communication is not appropriate, the same business entity definition will be inconsistent, resulting in additional rework, further reducing the development efficiency of the web API.
- the present application provides an interface development method.
- the method can be executed by an application development system.
- the application development system can be a software system or a hardware system for developing applications.
- the software system can be an integrated development environment (IDE) or an independent development software.
- the IDE can include the above-mentioned aPaaS.
- the software system can be deployed in a computing device cluster, and the computing device cluster executes the program code of the software system, thereby executing the interface development method of the present application.
- the application development system is a hardware system
- the hardware system can be a computing device cluster with an interface development function, and when the hardware system is running, the interface development method of the present application is executed.
- the application development system receives page metadata of the web application configured by the user through the development interface, where the page metadata includes components carried by the page of the web application, and then searches the background service model library based on the business information corresponding to the components carried by the page to obtain at least one set of business models corresponding to the page, and then generates a web API corresponding to the page based on at least one set of business models.
- the method can capture the business scenario that the developer is dealing with based on page metadata such as the components carried by the page, obtain the corresponding business information, search the background service model library based on the business information to obtain the corresponding business model, and automatically complete the web API design and assembly work based on the business model, thereby improving development efficiency.
- the web API is generated based on the service API assembly of the business model in the background service model library. Therefore, the definition of the business entity in the web view model corresponding to the web API is consistent with the definition of the business entity in the background business model, which reduces communication costs and improves development efficiency.
- the method can realize the automatic mapping of the background business model and the web view model without manual binding, further improving development efficiency.
- the application development system 30 may include a web editor 32 and a model search device 34.
- the web editor 32 may be a low-code web editor, such as a low-code editor in aPaaS, and users (such as front-end developers) may perform front-end development through the web editor 32.
- the application development system 30 may also include a service editor 36. Similar to the web editor 32, the service editor 36 may be a low-code service editor, such as a low-code service editor in aPaaS, and users (such as back-end developers) may perform back-end service development through the service editor 36.
- the web editor 32 is used to receive page metadata of a web application configured by a user through a development interface, and the page metadata includes components carried by the page of the web application. Accordingly, the model search device 34 is used to search the background service model library 38 according to the business information corresponding to the components carried by the page, and obtain at least one group of business models corresponding to the page. The web editor 32 is also used to generate a network application programming interface web API corresponding to the page according to at least one group of business models.
- the web editor 32 can provide users with visual components to complete the building block-style page design and development work. At the same time, the web editor 32 can also capture business scenarios through page assembly information, automatically complete the web API design through the model search device 34, and notify the service editor 36.
- the model search device 34 may be software deployed on a local computing device or a service deployed in a cloud environment (e.g., a cloud service).
- the model search device 34 may search for a matching business model based on the business information provided by the web editor 32, for example, searching for a business model matching the keyword based on a keyword in the business information.
- the service editor 36 can provide users with visual service development capabilities, realize service arrangement visualization, business process visualization, and business logic scripting.
- the application development system 30 can also include a background service model library 38, which provides users with high cohesion and low coupling background services and supports customized development and assembly into web services by users.
- the service editor 36 supports loading templates from the background service model library 38 for customized development.
- the embodiment of the present application further provides an interface development method.
- the interface development method of the embodiment of the present application is described in detail below in conjunction with the accompanying drawings.
- the method comprises the following steps:
- the application development system 30 receives page metadata of the web application configured by the user through the development interface.
- the page metadata includes the components carried by the web application page.
- the web application may include at least one page.
- a restaurant ordering application may include an ordering page and an order page; for another example, a logistics management application may include a logistics query page and a shipping page.
- the application development system 30 can assist users in quickly creating static pages by providing low-code tools.
- the web editor 32 in the application development system 30 can be a low-code web editor, which provides component templates.
- the application development system 30 can present a development interface to the user.
- the development interface 50 includes multiple component templates 52, such as buttons, lists, and text boxes.
- the user can select at least one component template by dragging or clicking.
- the component model selected by the user is referred to as the target component template in this embodiment.
- the application development system 30 can determine the target component template selected by the user from multiple component templates, receive the user's configuration information 54 for the target component template, such as component name, component requirements, and obtain the component carried by at least one page of the web application.
- the application development system 30 searches the background service model library according to the business information corresponding to the components carried by the page, and obtains at least one set of business models corresponding to the page.
- the backend service model library stores the business models of the backend services.
- the backend service model library can be a previously accumulated industry backend service model library (also known as an industry backend service template library).
- the backend service model library can collect the business models of the backend services contributed by developers from the open source platform, or receive the business models of the backend services uploaded by developers.
- the application development system 30 can obtain the business information corresponding to the component based on the configuration information of the component carried by the page, and then the application development system 30 can search the background service model library through keyword matching based on the keywords in the business information to obtain at least one set of business models corresponding to the page.
- the application development system 30 may also associate multiple keywords through Boolean logic to search the background service model library based on multiple keywords, thereby obtaining at least one set of business models corresponding to the page.
- Boolean logic can include one or more of logical AND, logical OR, and logical NOT.
- Logical AND represents the same When including two keywords, the AND abbreviated instruction is generally replaced by a space and is not explicitly written. In addition, the AND instruction can also be replaced by +.
- a AND B means that both keyword A and keyword B are included.
- Logical OR means either or, or both are included.
- the OR abbreviated instruction can be replaced by
- For example, A OR B means including keyword A or keyword B.
- Logical negation means exclusion, which can usually be represented by a minus sign "-", which means excluding the content after the minus sign. The minus sign command can be used multiple times in a row.
- the application development system 30 can also use wildcards for intelligent search. Wildcards can include asterisks (*) or question marks (?). As reserved position characters, the above characters can be used to search for different variations of precise phrases. Among them, "*" represents a series of characters, and "?” represents a single character.
- the application development system 30 can search for different variations of phrases through the following instruction: largest*in the world.
- the application development system 30 can also perform intelligent search through the following instruction: progr? m.
- the “restaurant ordering” application is still used as an example to illustrate how to obtain business information and search for a business model based on the business information.
- the application development system 30 can obtain the following business information from the components used for information display (usually excluding operation components, such as button components):
- the application development system 30 intelligently searches for matching business models based on the above business information and the background service model library, as shown below:
- the application development system 30 can use the business model as a view sub-model, and assemble or merge multiple view sub-models into a web view model (referred to as a view model).
- the view sub-models (business models) in the view model are automatically associated according to the model fields.
- the web view model corresponding to the ordering page includes the following view sub-models: user, table, menu, and menu sub-item.
- the view sub-model "restaurant” and the view sub-model "table” can be associated through the "restaurant ID”.
- the model not only facilitates the assembly of web APIs from the service APIs of backend services, but also avoids the problem of repeated definition of view model and business model fields, which leads to inconsistent definitions.
- the application development system 30 can trigger the execution of the above S404 after the user completes the static page design.
- the user can trigger the interface generation operation after completing the static page design.
- the application development system 30 can respond to the interface generation operation triggered by the user, and search the background service model library according to the business information corresponding to the component carried by at least one page to obtain the business model.
- the application development system 30 can also set a timer to time the configuration operation of the user in the development interface.
- the application development system 30 can search the background service model library according to the business information corresponding to the component carried by the at least one page to obtain the business model.
- the application development system 30 presents at least one set of business models to the user.
- the application development system 30 searches the background service model library according to the business information corresponding to the components carried by the page, and can obtain one or more groups of business models.
- Each group of business models can be used to assemble into a web view model of the page. That is, the application development system 30 can recommend one or more web view models for a page by intelligently searching the background service model library, and each web view model includes a group of business models.
- the application development system 30 can present the above-mentioned at least one group of business models to the user.
- the application development system 30 determines a group of business models selected by the user from at least one group of business models.
- the user may select a group of business models from at least one group of business models presented by the application development system 30 according to business requirements. For example, in order to reduce the size of the software package of the web application as much as possible, the user may select a group of business models with the least number of business models. For another example, in order to avoid single point failures, the user may filter a group of business models whose calling relationships between business models are star-shaped.
- the application development system 30 may determine a group of business models selected by the user from at least one group of business models according to the user's operation.
- the application development system 30 can automatically determine a group of business models from at least one group of business models for generating a web API corresponding to the page, or perform subsequent operations of generating a web API for each group of business models.
- the application development system 30 determines at least one set of target APIs from a set of service APIs of a business model selected by the user.
- Each business model can provide at least one service API, for example, referring to Table 5, the business model "order" can include a service API for viewing orders and a service API for submitting orders.
- the application development system 30 can determine at least one set of target APIs from the service APIs provided by a set of business models selected by the user.
- the web API corresponding to the page may include a query API or an operation API.
- the application development system 30 may determine at least one set of target APIs that meet the data loading requirements from a set of service APIs of a business model selected by the user based on the data loading requirements of the component carried by the page.
- the application development system 30 may determine at least one set of target APIs that meet the operation requirements from the at least one set of service APIs of the business model based on the operation requirements of the component carried by the page.
- the web API corresponding to the ordering page may include a web API for querying the ordering page
- the web API corresponding to the ordering page may include a web API for querying the ordering page.
- the application development system 30 can intelligently generate a query API based on the data loading requirements of the components carried by the page, as shown below:
- the web API corresponding to the order page may also include submitting an order and paying for an order.
- the application development system 30 may intelligently generate an operation API according to the operation requirements of the components carried by the page, as shown below:
- the front end of the web application can call the background service API and associate the returned results according to the model fields, thereby providing a complete web API.
- the above S410 is a specific implementation method for the application development system 30 to determine at least one group of target APIs from the service APIs of the at least one group of business models.
- the application development system 30 does not execute S406 and S408, the application development system 30 can determine at least one group of target APIs for each group of business models, or automatically determine a group of business models and then determine at least one target API for the business model.
- the application development system 30 presents at least one set of target APIs to the user.
- the application development system 30 can determine at least one group of service APIs for assembling the web API from the service APIs of the group of business models.
- the service APIs for assembling the web API are referred to as target APIs in the embodiment of the present application.
- the application development system 30 can present the above at least one group of target APIs to the user, thereby recommending the target API to the user for assembling the web API.
- S414 The application development system 30 determines a set of target APIs selected by the user from at least one set of target APIs.
- the user may select a group of APIs from at least one group of target APIs according to business requirements. Accordingly, the application development system 30 may determine a group of target APIs selected by the user from at least one group of target APIs according to the user's operation.
- the application development system 30 can automatically determine a set of target APIs from at least one set of target APIs for generating a web API corresponding to the page, or perform subsequent operations of generating a web API for each set of target APIs.
- S416 The application development system 30 generates a web API corresponding to the page based on a set of target APIs selected by the user.
- the application development system 30 can obtain the model fields of each target API in a group of target APIs selected by the user, and then associate this group of target APIs through the model fields of the business model, thereby assembling a group of target APIs into a web API.
- the above S416 is a specific implementation method for the application development system 30 to generate the web API corresponding to the page according to at least one set of target APIs.
- the application development system 30 can generate the web API corresponding to the page for each set of target APIs, or automatically determine a set of target APIs, and then generate the web API corresponding to the page for the set of target APIs.
- the above S406 to S416 are a specific implementation of the application development system 30 generating a web API corresponding to a page according to at least one set of business models in the embodiment of the present application.
- the application development system 30 may also generate a web API corresponding to a page according to at least one set of business models in other ways.
- This method captures the business scenarios that developers are dealing with based on page metadata, such as the components carried by the page, obtains the corresponding business information, searches the background service model library based on the business information to obtain the corresponding business model, and automatically completes the web API design and assembly work through the business model, thereby improving development efficiency. Furthermore, the web API is generated based on the service API assembly of the business model in the background service model library. Therefore, the definition of the business entity in the web view model corresponding to the web API is consistent with the definition of the business entity in the background business model, which reduces communication costs and improves development efficiency. Moreover, this method can realize the automatic mapping of the background business model and the web view model without manual binding, further improving development efficiency.
- the present application further provides an application development system 30, as shown in FIG3 , comprising:
- a web editor 32 for receiving page metadata of a network application configured by a user through a development interface, wherein the page metadata includes components carried by the page of the network application;
- Model search means 34 for searching a backend service model library 38 according to business information corresponding to the components carried by the page, and obtaining at least one set of business models corresponding to the page;
- the web editor 32 is further configured to generate a web application programming interface (web API) corresponding to the page according to the at least one set of business models.
- web API web application programming interface
- the web editor 32 and the model search device 34 may be implemented by hardware or software.
- the web editor 32 is used as an example for explanation below.
- the web editor 32 may be an application running on a computer device, such as a computing engine.
- the application may be provided to users in the form of a virtualized service.
- Virtualized services may include virtual machine (VM) services, bare metal server (BMS) services, and container services.
- VM service may be a service that uses virtualization technology to virtualize a virtual machine (VM) resource pool on multiple physical hosts (such as computing devices) to provide users with VMs on demand for use.
- the BMS service is a service that virtualizes a BMS resource pool on multiple physical hosts to provide users with BMS on demand for use.
- the container service is a service that virtualizes a container resource pool on multiple physical hosts to provide users with containers on demand for use.
- VM is a simulated virtual computer, that is, a logical computer.
- BMS is a high-performance computing service that can be elastically scalable, and its computing performance is no different from that of a traditional physical machine, and it has the characteristics of secure physical isolation.
- Containers are a kernel virtualization technology that can provide lightweight virtualization to achieve the purpose of isolating user space, processes, and resources. It should be understood that the VM service, BMS service and container service in the above-mentioned virtualization services are merely specific examples. In actual applications, the virtualization service may also be other lightweight or heavyweight virtualization services, which are not specifically limited here.
- the web editor 32 may include at least one computing device, such as a server, etc.
- the web editor 32 may also be a device implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), etc.
- the PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
- the application development system 30 may further include a service editor 36, which is used to develop a business model.
- the service editor 36 may provide users with a visual service development capability, realize service orchestration visualization, business process visualization, and business logic scripting. Similar to the web editor 32, the service editor 36 may be implemented by software or by hardware. Its implementation method may refer to the web editor 32, which will not be described in detail here.
- the application development system 30 further includes a background service model library 38.
- the background service model library 38 may be implemented by hardware or software. When the background service model library 38 is implemented by hardware, it may include at least one storage device with data storage capability, such as one or more storage servers. When the background service model library 38 is implemented by software, it may be database software for storing business models.
- the web editor 32 is further used to:
- the web editor 32 is specifically used for:
- a network application programming interface web API corresponding to the page is generated.
- the web editor 32 is specifically used to:
- the web editor 32 is further used to:
- the web editor 32 is specifically used for:
- the web API corresponding to the page includes a query API
- the web editor 32 is specifically used for:
- At least one group of target APIs that meet the data loading requirement are determined from the at least one group of service APIs of the business model.
- the web API corresponding to the page includes an operation API
- the web editor 32 is specifically used for:
- the service APIs that meet the operation requirements from the at least one group of business models. At least one set of target APIs is required.
- the web editor 32 is specifically used to:
- the web editor 32 is specifically used to:
- the development interface includes a plurality of component templates
- model search device 34 is specifically used to:
- the backend service model library is searched according to the business information corresponding to the component carried by the at least one page to obtain the business model.
- model search device 34 is specifically used to:
- the operation time of the user's most recent configuration operation on the development interface meets a preset condition, and the background service model library is searched according to the business information corresponding to the component carried by the at least one page to obtain the business model.
- the present application also provides a computing device 600.
- the computing device 600 includes: a bus 602, a processor 604, a memory 606, and a communication interface 608.
- the processor 604, the memory 606, and the communication interface 608 communicate with each other through the bus 602.
- the computing device 600 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 600.
- the bus 602 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
- the bus may be divided into an address bus, a data bus, a control bus, etc.
- FIG. 6 is represented by only one line, but does not mean that there is only one bus or one type of bus.
- the bus 602 may include a path for transmitting information between various components of the computing device 600 (e.g., the memory 606, the processor 604, and the communication interface 608).
- Processor 604 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
- CPU central processing unit
- GPU graphics processing unit
- MP microprocessor
- DSP digital signal processor
- the memory 606 may include a volatile memory (volatile memory), such as a random access memory (RAM).
- the memory 606 may also include a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid state drive (SSD).
- ROM read-only memory
- HDD hard disk drive
- SSD solid state drive
- the memory 606 stores executable program code, and the processor 604 executes the executable program code to implement the aforementioned interface development method.
- the memory 606 stores instructions for the application development system 30 to execute the interface development method.
- the communication interface 608 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 600 and other devices or communication networks.
- a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 600 and other devices or communication networks.
- the embodiment of the present application also provides a computing device cluster.
- the computing device cluster includes at least one computing device.
- the computing device can be a server, such as a central server, an edge server, or a local server in a local data center.
- the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.
- the computing device cluster includes at least one computing device 600.
- the memory 606 in one or more computing devices 600 in the computing device cluster may store the same instructions used by the application development system 30 to execute the interface development method.
- one or more computing devices 600 in the computing device cluster may also be used to execute some instructions of the application development system 30 for executing the interface development method.
- a combination of one or more computing devices 600 may jointly execute instructions of the application development system 30 for executing the interface development method.
- the memory 606 in different computing devices 600 in the computing device cluster may store different instructions for executing partial functions of the application development system 30 .
- FIG8 shows a possible implementation.
- two computing devices 600A and 600B are connected via a communication interface 608.
- the memory in computing device 600A stores instructions for executing the functions of the web editor.
- the memory in computing device 600B stores instructions for executing the functions of the model search device 34.
- computing device 600A also stores instructions for executing the functions of the server.
- the computing device 600B also stores instructions for executing the functions of the background service model library 38.
- the memory 606 of the computing devices 600A and 600B jointly stores instructions for the application development system 30 to execute the interface development method.
- connection mode between the computing device clusters shown in Figure 8 may be considered to be that the interface development method provided by the present application requires more computing power for searching and storing. Therefore, it is considered that the functions implemented by the model search device 34 and the background service model library 38 are handed over to the computing device 600B for execution.
- the functions of the computing device 600A shown in FIG8 may also be completed by multiple computing devices 600.
- the functions of the computing device 600B may also be completed by multiple computing devices 600.
- one or more computing devices in the computing device cluster can be connected via a network.
- the network can be a wide area network or a local area network, etc.
- Figure 9 shows a possible implementation. As shown in Figure 9, two computing devices 600C and 600D are connected via a network. Specifically, the network is connected through the communication interface in each computing device.
- the memory 606 in the computing device 600C stores instructions for executing the functions of the web editor 32.
- the memory 606 in the computing device 600D stores instructions for executing the functions of the model search device 34.
- the computing device 600C also stores instructions for executing the functions of the service editor 36
- the computing device 600D also stores instructions for executing the functions of the background service model library 38.
- connection method between the computing device clusters shown in Figure 9 can be considered to be that the interface development method provided in this application requires more computing power for searching and storage, so it is considered to hand over the functions implemented by the metadata management module 104 to the computing device 600D for execution.
- the functions of the computing device 600C shown in FIG9 may also be completed by multiple computing devices 600.
- the functions of the computing device 600D may also be completed by multiple computing devices 600.
- the embodiment of the present application also provides a computer-readable storage medium.
- the computer-readable storage medium can be any available medium that can be stored by the computing device or a data storage device such as a data center containing one or more available media.
- the available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).
- the computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned application to the application development system 30 for executing the interface development method.
- the embodiment of the present application also provides a computer program product including instructions.
- the computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium.
- the at least one computing device executes the above-mentioned interface development method.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Stored Programmes (AREA)
Abstract
本申请提供了一种接口开发方法,包括:接收用户通过开发界面配置的网络应用的页面元数据,页面元数据包括页面承载的组件,根据页面承载的组件对应的业务信息,搜索后台服务模型库,获得页面对应的至少一组业务模型;根据至少一组业务模型,生成页面对应的web API。该方法基于页面元数据如页面承载的组件捕捉到开发人员正在处理的业务场景,获得相应的业务信息,基于该业务信息搜索后台服务模型库获得相应的业务模型,基于该业务模型可以自动化地完成web API设计及组装的工作,从而提升开发效率。
Description
本申请要求于2022年11月08日提交中国国家知识产权局、申请号为202211392876.6、发明名称为“一种接口开发方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及应用开发技术领域,尤其涉及一种接口开发方法、系统、计算设备集群、计算机可读存储介质、计算机程序产品。
网络应用程序(web application,web app),简称为web应用,是指使用网络浏览器在网络(互联网或内网)进行操作的应用。web应用通常无需在终端额外安装客户端,因而在许多场景中得到广泛应用。例如,web应用可以用于餐饮行业,为用户提供点餐服务。又例如,web应用可以用于物流行业,为用户提供物流查询服务。
web应用通常可以由包括前端开发人员、后台开发人员、测试人员在内的开发团队协同开发。其中,前端开发人员负责客户端设计,后台开发人员负责后台逻辑服务,测试人员负责应用特性测试。客户端设计的一个重要环节是网络应用程序编程接口(web application programming interface,web API)设计。
Web API通常依赖前端和后台开发人员手工设计,效率较低,难以满足业务需求,尤其是难以满足频繁迭代的业务的需求。
发明内容
本申请提供了一种接口开发方法,该方法基于页面元数据如页面承载的组件捕捉到开发人员正在处理的业务场景,获得相应的业务信息,基于该业务信息搜索后台服务模型库获得相应的业务模型,基于该业务模型可以自动化地完成web API设计及组装的工作,从而提升开发效率。
第一方面,本申请提供一种接口开发方法。该方法可以由应用开发系统执行。其中,应用开发系统可以是用于开发应用的软件系统或硬件系统。当应用开发系统为软件系统时,该软件系统可以是集成开发环境(integrated development environment,IDE)或者是独立的开发软件。其中,IDE可以包括低代码开发工具。软件系统可以部署在计算设备集群,计算设备集群执行软件系统的程序代码,从而执行本申请的接口开发方法。当应用开发系统为硬件系统时,硬件系统可以是具有接口开发功能的计算设备集群,硬件系统运行时,执行本申请的接口开发方法。
具体地,应用开发系统接收用户通过开发界面配置的网络应用的页面元数据,该页面元数据包括网络应用的页面承载的组件,然后根据页面承载的组件对应的业务信息,搜索后台服务模型库,获得页面对应的至少一组业务模型,接着根据至少一组业务模型,生成页面对应的网络应用程序编程接口web API。
该方法可以基于页面元数据如页面承载的组件捕捉到开发人员正在处理的业务场景,获得相应的业务信息,基于该业务信息搜索后台服务模型库获得相应的业务模型,基于该业务模型可以自动化地完成web API设计及组装的工作,从而提升开发效率。进一步地,web API基于后台服务模型库中业务模型的服务API组装生成,因此,web API对应的web视图模型中业务实体的定义与后台的业务模型中业务实体的定义一致,降低了沟通成本,提高了开发效率。
在一些可能的实现方式中,应用开发系统还可以向所述用户呈现所述至少一组业务模型,确定所述用户从所述至少一组业务模型中选中的一组业务模型。相应地,应用开发系统在生成web API时,可以根据用户选中的一组业务模型,生成页面对应的网络应用程序编程接口web API。
该方法通过智能搜索向用户推荐至少一组业务模型,用户通过简单的交互操作,即可选择一组业务模型用于生成web API,由此提升了开发效率,降低了开发门槛。
在一些可能的实现方式中,每个业务模型可以提供至少一个服务API,应用开发系统可以以服务API为粒度,对服务API进行组装等方式生成web API。具体地,应用开发系统可以从至少一组业务模型的服
务API中,确定至少一组目标API,然后根据至少一组目标API,生成页面对应的web API。
该方法中,用于生成web API的服务API来自于业务模型,如此保障了前端与后台对业务实体的定义的一致性,降低了沟通成本,提高了开发效率。
在一些可能的实现方式中,应用开发系统还可以向用户呈现所述至少一组目标API,然后确定用户从至少一组目标API中选中的一组目标API。相应地,应用开发系统在生成web API时,可以根据所述用户选中的一组目标API,生成所述页面对应的web API。
该方法通过智能搜索向用户推荐指数一组目标API,用户通过简单的交互操作,即可选择一组目标API用于生成web API,由此提升了开发效率,降低了开发门槛。
在一些可能的实现方式中,页面对应的web API包括查询API。应用开发系统在确定目标API时,可以根据页面承载的组件的数据加载要求,从至少一组业务模型的服务API中确定符合所述数据加载要求的至少一组目标API。
该方法通过结合用户在开发界面设计静态页面时编辑的数据加载要求,精准搜索符合数据加载要求的至少一组目标API,进而生成满足业务需求的web API,减少返工次数,提高开发效率。
在一些可能的实现方式中,页面对应的web API包括操作API。其中,操作API是在页面执行变更操作的API,如点餐页面执行提交订单操作的API,订单页面执行支付操作的API。相应地,应用开发系统可以根据所述页面承载的组件的操作要求,从所述至少一组业务模型的服务API中确定符合所述操作要求的至少一组目标API。
该方法通过结合用户在开发界面设计静态页面时编辑的操作要求,精准搜索符合操作要求的至少一组目标API,进而生成满足业务需求的web API,减少返工次数,提高开发效率。
在一些可能的实现方式中,应用开发系统在根据至少一组目标API,生成页面对应的web API时,可以将至少一组目标API通过业务模型的模型字段关联,获得页面对应的web API。
该方法无需用户手动绑定不同的服务API,一方面可以提高开发效率,另一方面可以避免人工绑定失误导致web API不能满足业务需求。
在一些可能的实现方式中,应用开发系统可以向用户呈现开发界面,该开发界面包括多个组件模板,然后应用开发系统可以确定用户从多个组件模板中选择的目标组件模板,接收用户对所述目标组件模板的配置信息,获得网络应用的至少一个页面承载的组件。
该方法通过为用户提供可视化的组件,以完成积木式的页面设计开发工作,简化开发过程,提高开发效率。
在一些可能的实现方式中,应用开发系统可以响应于所述用户触发的接口生成操作,根据所述至少一个页面承载的组件对应的业务信息,搜索后台服务模型库,获得业务模型。
该方法通过捕捉用户触发的接口生成操作,自动捉业务场景获得业务信息,并根据业务信息搜索后台服务模型库,获得业务模型,为生成web API奠定基础。
在一些可能的实现方式中,用户在所述开发界面的最近一次配置操作的操作时间满足预设条件,例如,最近一次配置操作的操作时间距离当前时间达到预设时长,则视为完成静态的页面设计,应用开发系统可以根据至少一个页面承载的组件对应的业务信息,搜索后台服务模型库,获得业务模型。
该方法通过捕捉最近一次配置操作的操作时间,识别用户是否完成静态的页面设计,进而决定是否触发接口生成,为自动化生成web API奠定基础。
在一些可能的实现方式中,开发界面承载有模型推荐控件,应用开发系统可以响应于用户对所述模型推荐控件的触发操作,向所述用户呈现所述至少一组业务模型,从而实现向用户智能推荐业务模型,以辅助生成web API。一方面,该方法通过推荐业务模型,无需用户手动设计,提高了开发效率,另一方面该方法通过在开发界面设置模型推荐控件,指引用户触发模型推荐,提升了用户体验。
在一些可能的实现方式中,开发界面承载有服务API推荐控件,应用开发系统可以响应于用户对所述服务API推荐控件的触发操作,向所述用户呈现所述至少一组目标API,从而实现向用户智能推荐目标API,以辅助生成web API。一方面,该方法通过推荐目标API,无需用户手动设计,提高了开发效率,另一方面该方法通过在开发界面设置服务API推荐控件,指引用户触发API推荐,提升了用户体验。
第二方面,本申请提供一种应用开发系统。所述系统包括:
web编辑器,用于接收用户通过开发界面配置的网络应用的页面元数据,所述页面元数据包括所述网络应用的页面承载的组件;
模型搜索装置,用于根据所述页面承载的组件对应的业务信息,搜索后台服务模型库,获得所述页面对应的至少一组业务模型;
所述web编辑器,还用于根据所述至少一组业务模型,生成所述页面对应的网络应用程序编程接口web API。
在一些可能的实现方式中,所述web编辑器还用于:
向所述用户呈现所述至少一组业务模型;
确定所述用户从所述至少一组业务模型中选中的一组业务模型;
所述web编辑器具体用于:
根据所述用户选中的一组业务模型,生成所述页面对应的网络应用程序编程接口web API。
在一些可能的实现方式中,所述web编辑器具体用于:
从所述至少一组业务模型的服务API中,确定至少一组目标API;
根据所述至少一组目标API,生成所述页面对应的web API。
在一些可能的实现方式中,所述web编辑器还用于:
向所述用户呈现所述至少一组目标API;
确定所述用户从所述至少一组目标API中选中的一组目标API;
所述web编辑器具体用于:
根据所述用户选中的一组目标API,生成所述页面对应的web API。
在一些可能的实现方式中,所述页面对应的web API包括查询API;
所述web编辑器具体用于:
根据所述页面承载的组件的数据加载要求,从所述至少一组业务模型的服务API中确定符合所述数据加载要求的至少一组目标API。
在一些可能的实现方式中,所述页面对应的web API包括操作API;
所述web编辑器具体用于:
根据所述页面承载的组件的操作要求,从所述至少一组业务模型的服务API中确定符合所述操作要求的至少一组目标API。
在一些可能的实现方式中,所述web编辑器具体用于:
将所述至少一组目标API通过业务模型的模型字段关联,获得所述页面对应的web API。
在一些可能的实现方式中,所述web编辑器具体用于:
向用户呈现开发界面,所述开发界面包括多个组件模板;
确定所述用户从所述多个组件模板中选择的目标组件模板,接收所述用户对所述目标组件模板的配置信息,获得所述网络应用的至少一个页面承载的组件。
在一些可能的实现方式中,所述模型搜索装置具体用于:
响应于所述用户触发的接口生成操作,根据所述至少一个页面承载的组件对应的业务信息,搜索后台服务模型库,获得业务模型。
在一些可能的实现方式中,所述模型搜索装置具体用于:
所述用户在所述开发界面的最近一次配置操作的操作时间满足预设条件,根据所述至少一个页面承载的组件对应的业务信息,搜索后台服务模型库,获得业务模型。
第三方面,本申请提供一种计算设备集群。所述计算设备集群包括至少一台计算设备,所述至少一台计算设备包括至少一个处理器和至少一个存储器。所述至少一个处理器、所述至少一个存储器进行相互的通信。所述至少一个处理器用于执行所述至少一个存储器中存储的指令,以使得计算设备或计算设备集群执行如第一方面或第一方面的任一种实现方式所述的接口开发方法。
第四方面,本申请提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,所述指令指示计算设备或计算设备集群执行上述第一方面或第一方面的任一种实现方式所述的接口开发方法。
第五方面,本申请提供了一种包含指令的计算机程序产品,当其在计算设备或计算设备集群上运行
时,使得计算设备或计算设备集群执行上述第一方面或第一方面的任一种实现方式所述的接口开发方法。
本申请在上述各方面提供的实现方式的基础上,还可以进行进一步组合以提供更多实现方式。
为了更清楚地说明本申请实施例的技术方法,下面将对实施例中所需使用的附图作以简单地介绍。
图1为本申请实施例提供的一种点餐页面的示意图;
图2为本申请实施例提供的一种订单页面的示意图;
图3为本申请实施例提供的一种应用开发系统的架构示意图;
图4为本申请实施例提供的一种接口开发方法的流程图;
图5为本申请实施例提供的一种开发界面的界面示意图;
图6为本申请实施例提供的一种计算设备的结构示意图;
图7为本申请实施例提供的一种计算设备集群的结构示意图;
图8为本申请实施例提供的另一种计算设备集群的结构示意图;
图9为本申请实施例提供的又一种计算设备集群的结构示意图。
本申请实施例中的术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。
首先对本申请实施例中所涉及到的一些技术术语进行介绍。
web应用,是指使用网络浏览器在网络(互联网或内网)进行操作的应用。常见的web应用可以包括但不限于网络邮件(webmail)、网络购物、网络论坛、网络游戏或博客。
web应用可以采用客户端到服务器(client/server,C/S)架构或无服务器(serverless)架构开发得到。其中,客户端是指与服务器相对应并为客户提供本地服务的程序。例如,客户端可以为网页浏览器。服务器用于响应客户端的请求,从而提供服务。serverless是一种云原生开发模型,可使开发人员专注构建和运行应用,而无需管理服务器。需要说明的是,无服务器方案中仍然有服务器,但服务器已从应用开发中抽离,由云服务提供商负责置备、维护和扩展服务器基础架构等例行工作。开发人员可以简单地将代码打包到容器中进行部署。部署之后,无服务器应用即可响应需求,并根据需要自动进行伸缩管理(例如扩容或缩容)。
在开发web应用时,可以通过应用程序平台即服务(application Platform as a Service,aPaaS)提高开发效率。aPaaS是基于平台即服务(Platform as a Service,PaaS)的一种解决方案,支持应用在云端的开发、部署和运行,提供软件开发中的基础工具给用户,包括数据对象、权限管理、用户界面等。
aPaaS可以提供低代码工具(甚至是零代码工具)给用户,一方面提供了快速开发的环境,用户在几个小时内就能完成应用(例如是web应用)的开发、测试、部署,并能够随时调整或更新,另一方面,降低了开发门槛,非技术人员也能完成应用开发。
通过低代码工具开发典型的web应用的过程中,前端开发人员可以使用丰富的页面组件,积木式搭建web应用静态页面,然后前端开发人员和后台开发人员可以根据上述web应用静态页面手工设计web API,提供页面组件涉及的数据查询及业务动作接口,web API是前端开发人员和后台开发人员的接口契约,前端开发人员和后台开发人员可以分别完成相关开发工作。
为了便于理解,以“餐厅点餐”应用对开发过程进行示例说明。
在第一阶段,前端开发人员根据点餐业务需求,在低代码工具上用页面组件积木式拼装出静态的如图1所示的点餐页面和如图2所示的订单页面。在该示例中,点餐页面可以包括如下组件:应用容器、餐厅名称框、餐厅地址框、餐厅菜单表、桌位选择列表、总价框、下单按钮、我的订单按钮,订单页面可以包括如下组件:应用容器、餐厅名称框、餐厅地址框、关闭页面按钮、订单条目表、订单总价框、桌位框、订单进度框、支付按钮。具体明细如表1所示:
表1页面组件列表
其中,图1或图2的演示应用覆盖用户视角涉及的流程,具体包括如下步骤:用户通过手机打开应用,访问点餐页面,查看餐厅信息和菜单,选择菜及份数、桌位,然后提交订单,查看订单页面的结果,用户在等待及就餐过程中可以查看订单进度,也可以发起支付。
在第二阶段,前端开发人员和后台开发人员根据上述静态的点餐页面和订单页面联合设计web API。web API的接口参数按组件交互(获取待渲染数据或执行业务操作)来制定,具体如下所示:
表2 web API的接口参数以及处理逻辑
每个web API涉及的web视图模型包括至少一个视图子模型,每个视图子模型包括至少一个模型字段,具体如下所示:
表3 web视图模型的组成
在第三阶段,前端开发人员和后台开发人员基于web API并行完成前端和后台的开发工作。
前端作为web API的消费方,前端开发人员需要将页面组件与web API绑定。Web API调用及输入输出的操作需要前端开发人员手工配置,关联绑定到对应的页面组件上,如下所示:
表4 web API与页面组件的绑定关系
后台作为web API的提供方,需要后台开发人员基于业务逻辑设计实现后台服务的API(也可以称作服务API)。后台服务可以按领域划分,并支持灵活地开发维护,可以被高效组合复用。后台服务以及服务API具体如下所示:
表5后台服务明细
上述后台服务的API涉及的服务模型即业务模型具体如下所示:
表6后台服务的API涉及的业务模型
Web API可以由后台服务的API组装而成,其包括的web视图模型映射覆盖页面操作场景,后台服务的API不会直接给前端调用,因为前端的页面逻辑往往会涉及多个后台服务的配合,在前端直接组合
调用领域服务不仅实现复杂,而且会增加前端与后台间的调用次数,降低性能。Web API的实现过程是手工完成的,需要开发人员手工组装,具体如下所示:
表7用于组装web API的服务API明细
上述方法虽然支持开发人员使用丰富的、可视化的组件,积木式地搭建web应用的静态页面,提高了创建页面的效率,但是与页面组件配合的web API是传统的从零开始手工设计,既要逐个考虑到页面信息,也要考虑到实际业务逻辑建模,效率比较低。并且,web API依赖后台服务的API,而后台服务的API的模型也依赖开发人员手工设计,开发后台服务的API的开发人员可能与开发web API的开发人员不同,如果沟通不当就会出现相同的业务实体定义不一致的问题,造成额外的返工,进一步降低了web API的开发效率。例如,在:“餐厅点餐”应用开发过程中,开发人员在完成第一阶段的静态页面设计后,虽然已经在页面上通过组件描述了业务需求,但还是需要在后续的开发过程中(如第二阶段、第三阶段)重复描述需求,相同的业务实体(如餐厅)在web视图模型和业务模型均有定义,但是需要开发人员去手动重复编辑,效率比较低,而且按前端和后台分给不同的角色去定义时也可能造成细节不一致。
有鉴于此,本申请提供一种接口开发方法。该方法可以由应用开发系统执行。其中,应用开发系统可以是用于开发应用的软件系统或硬件系统。当应用开发系统为软件系统时,该软件系统可以是集成开发环境(integrated development environment,IDE)或者是独立的开发软件。其中,IDE可以包括上述aPaaS。软件系统可以部署在计算设备集群,计算设备集群执行软件系统的程序代码,从而执行本申请的接口开发方法。当应用开发系统为硬件系统时,硬件系统可以是具有接口开发功能的计算设备集群,硬件系统运行时,执行本申请的接口开发方法。
具体地,应用开发系统接收用户通过开发界面配置的web应用的页面元数据,该页面元数据包括web应用的页面承载的组件,然后根据页面承载的组件对应的业务信息,搜索后台服务模型库,获得页面对应的至少一组业务模型,接着根据至少一组业务模型,生成页面对应的web API。
该方法可以基于页面元数据如页面承载的组件捕捉到开发人员正在处理的业务场景,获得相应的业务信息,基于该业务信息搜索后台服务模型库获得相应的业务模型,基于该业务模型可以自动化地完成web API设计及组装的工作,从而提升开发效率。进一步地,web API基于后台服务模型库中业务模型的服务API组装生成,因此,web API对应的web视图模型中业务实体的定义与后台的业务模型中业务实体的定义一致,降低了沟通成本,提高了开发效率。而且,该方法能够实现后台的业务模型与web视图模型的自动映射,无需人工绑定,进一步提高了开发效率。
为了使得本申请的技术方案更加清楚、易于理解,下面结合附图对本申请实施例的应用开发系统的架构进行介绍。
参见图3所示的应用开发系统的架构图,应用开发系统30可以包括web编辑器32模型搜索装置34。其中,web编辑器32可以是低代码web编辑器,例如是aPaaS中的低代码编辑器,用户(如前端开发人员)可以通过该web编辑器32进行前端开发。进一步地,应用开发系统30还可以包括服务编辑器36。与web编辑器32类似,服务编辑器36可以是低代码服务编辑器,例如是aPaaS中的低代码服务编辑器,用户(如后台开发人员)可以通过该服务编辑器36进行后台服务开发。
具体地,web编辑器32用于接收用户通过开发界面配置的web应用的页面元数据,页面元数据包括web应用的页面承载的组件。相应地,模型搜索装置34用于根据页面承载的组件对应的业务信息,搜索后台服务模型库38,获得所述页面对应的至少一组业务模型。web编辑器32还用于根据至少一组业务模型,生成页面对应的网络应用程序编程接口web API。
其中,web编辑器32可以为用户提供可视化的组件,以完成积木式的页面设计开发工作,同时,web编辑器32还可以通过页面组装信息捕捉业务场景,通过模型搜索装置34自动完成web API设计,并通知服务编辑器36。
模型搜索装置34可以是部署在本地的计算设备的软件或者是部署在云环境中的服务(例如云服务)。模型搜索装置34可以根据web编辑器32提供的业务信息搜索匹配的业务模型,例如是根据业务信息中的关键字搜索与该关键字匹配的业务模型。
服务编辑器36可以为用户提供可视化的服务开发能力,实现服务编排可视化,业务流程可视化,业务逻辑脚本化。并且,应用开发系统30还可以包括后台服务模型库38,后台服务模型库38为用户提供高内聚、低耦合的后台服务,支持被用户定制开发及组装为web服务。服务编辑器36支持从后台服务模型库38加载模板,进行定制开发。
基于图3所示的应用开发系统30,本申请实施例还提供了一种接口开发方法。下面结合附图对本申请实施例的接口开发方法进行详细说明。
参见图4所示的接口开发方法的流程图,该方法包括如下步骤:
S402:应用开发系统30接收用户通过开发界面配置的web应用的页面元数据。
页面元数据包括web应用的页面承载的组件。web应用可以包括至少一个页面。例如,餐厅点餐应用可以包括点餐页面和订单页面;又例如,物流管理应用可以包括查询物流页面和寄件页面。
应用开发系统30可以通过提供低代码工具,辅助用户快速创建静态的页面。具体地,应用开发系统30中的web编辑器32可以是低代码web编辑器,该低代码web编辑器提供有组件模板。相应地,应用开发系统30可以向用户呈现开发界面,参见图5所示的开发界面的界面示意图,开发界面50包括多个组件模板52,如按钮、列表、文本框。用户可以通过拖拽或点击方式选择至少一个组件模板。为了便于描述,本实施例将用户选择的组件模型称作目标组件模板。应用开发系统30可以确定用户从多个组件模板中选择的目标组件模板,接收用户对目标组件模板的配置信息54,例如是组件名称、组件需求,获得web应用的至少一个页面承载的组件。
S404:应用开发系统30根据页面承载的组件对应的业务信息,搜索后台服务模型库,获得页面对应的至少一组业务模型。
后台服务模型库存储有后台服务的业务模型。后台服务模型库可以是事先积累的行业后台服务模型库(也称行业后台服务模板仓库)。例如,后台服务模型库可以从开源平台收集开发人员贡献的后台服务的业务模型,或者接收开发人员上传的后台服务的业务模型。
应用开发系统30可以根据页面承载的组件的配置信息,获得组件对应的业务信息,然后应用开发系统30可以根据业务信息中的关键字,通过关键字匹配的方式搜索后台服务模型库,获得页面对应的至少一组业务模型。
考虑到业务信息可以包括多个关键字,应用开发系统30还可以通过布尔逻辑,将多个关键字关联,实现基于多个关键字搜索后台服务模型库,从而获得页面对应的至少一组业务模型。
其中,布尔逻辑可以包括逻辑与(AND)、逻辑或(OR)、逻辑非中的一种或多种。逻辑与代表同
时包括两个关键词,AND简写指令一般以空格代替,不明确写出。另外,AND指令还可以用+代替。例如,A AND B表示同时包括关键字A和关键字B。逻辑或代表既可以又可以,或者两者都包括。OR简写指令可用|代替。例如,A OR B表示包括关键字A或关键字B。逻辑非表示排除,通常可以采用减号“-”表示,代表排除减号后面的内容,减号的命令可以多个连续使用。AND、OR等逻辑语通常大写,否则可能被认为是普通的单词,而不是搜索指令。需要说明,OR指令优先于AND指令。例如,Inverted OR Signature files OR file OR index,实际等同于(Inverted OR Signature)(files OR file OR index)。
进一步地,应用开发系统30还可以采用通配符进行智能搜索。通配符可以包括星号(*)或问号(?)。作为预留位置字符,上述字符可以用于搜索精确词组的不同变化。其中,“*”代表一连串字符,“?”代表单个字符。例如,应用开发系统30可以通过如下指令:largest*in the world搜索词组的不同变化形式。又例如,应用开发系统30也可以通过如下指令:progr?m进行智能搜索。应用开发系统30还可以根据num参数调整显示结果。具体地,num取值范围可以设置为1至100,搜索一页默认显示10个搜索结果。用户可以通过设置num参数调整显示结果,末尾的num=1表示一页只显示1个搜索结果。
为了便于理解,仍以“餐厅点餐”应用对获取业务信息以及基于业务信息搜索得到业务模型进行示例说明。
首先,应用开发系统30可以从用于信息展示的组件(通常不包括操作组件,如按钮组件),得到如下业务信息:
表8页面承载的组件对应的业务信息
然后,应用开发系统30根据上述业务信息,结合后台服务模型库,智能搜索匹配的业务模型,具体如下所示:
表9基于业务信息搜索得到的业务模型
需要说明的是,应用开发系统30可以以业务模型作为视图子模型,将多个视图子模型组装或合并为web视图模型(简称为视图模型)。视图模型中的视图子模型(业务模型)间根据模型字段自动关联。
以“餐厅点餐”示例说明,视图模型、视图子模型的关系具体如下所示:
表10视图模型和视图子模型关系
在该示例中,点餐页面对应的web视图模型包括如下视图子模型:用户、桌位、菜单、菜单子项。其中,视图子模型“餐厅”和视图子模型“桌位”可以通过“餐厅ID”关联。这里以业务模型为视图子
模型,既方便web API由后台服务的服务API组装,也避免了重复定义视图模型和业务模型字段,导致定义不一致的问题。
在该实施例中,应用开发系统30可以在用户完成静态的页面设计后,触发执行上述S404。其中,用户可以在完成静态的页面设计后,触发接口生成操作,相应地,应用开发系统30可以响应于用户触发的接口生成操作,根据至少一个页面承载的组件对应的业务信息,搜索后台服务模型库,获得业务模型。应用开发系统30也可以设置计时器,对用户在开发界面的配置操作进行计时,当用户在开发界面的最近一次配置操作的操作时间满足预设条件,例如最近一次配置操作的操作时间距离当前时间达到预设时长,则视为完成静态的页面设计,应用开发系统30可以根据所述至少一个页面承载的组件对应的业务信息,搜索后台服务模型库,获得业务模型。
S406:应用开发系统30向所述用户呈现至少一组业务模型。
考虑到一个组件的业务信息可以匹配到一个或多个业务模型,一个页面可以承载一个或多个组件,基于此,应用开发系统30根据页面承载的组件对应的业务信息搜索后台服务模型库,可以得到一个或多组业务模型。每一组业务模型可以用于组装为页面的web视图模型。也即,应用开发系统30可以针对一个页面,通过智能搜索后台服务模型库,可以推荐一个或多个web视图模型,每个web视图模型包括一组业务模型。为此,应用开发系统30可以向用户呈现上述至少一组业务模型。
S408:应用开发系统30确定所述用户从至少一组业务模型中选中的一组业务模型。
具体地,用户可以根据业务需求,从应用开发系统30呈现的至少一组业务模型中选择一组业务模型。例如,为了尽可能减少web应用的软件包的规模,用户可以选择业务模型数量最少的一组业务模型。又例如,为了避免单点故障,用户可以过滤业务模型之间调用关系呈现星形分布的一组业务模型。应用开发系统30可以根据用户的操作,确定用户从至少一组业务模型中选中的一组业务模型。
需要说明的是,上述S406至S408为本申请实施例的可选步骤,执行本申请实施例的接口开发方法也可以不执行S406至S408。例如,应用开发系统30可以自动从至少一组业务模型中确定一组业务模型,用于生成页面对应的web API,或者是针对每一组业务模型,均执行后续生成web API的操作。
S410:应用开发系统30从用户选中的一组业务模型的服务API中,确定至少一组目标API。
每个业务模型可以提供至少一个服务API,例如,参见表5,业务模型“订单”可以包括查看订单的服务API和提交订单的服务API。应用开发系统30可以从用户选中的一组业务模型所提供的服务API中,确定至少一组目标API。
具体地,页面对应的web API可以包括查询API或操作API。当页面对应的web API为查询API时,应用开发系统30可以根据页面承载的组件的数据加载要求,从用户选中的一组业务模型的服务API中确定符合所述数据加载要求的至少一组目标API。当页面对应的web API为操作API,应用开发系统30可以根据所述页面承载的组件的操作要求,从所述至少一组业务模型的服务API中确定符合所述操作要求的至少一组目标API。
例如,“餐厅点餐”应用中,点餐页面对应的web API可以包括查询点餐页面的web API,订单页面对应的web API可以包括查询订单页面的web API。应用开发系统30可以根据页面承载的组件的数据加载要求,智能生成查询API,如下所示:
表11查询API的输入输出参数及组装信息
订单页面对应的web API还可以包括提交点餐订单、支付点餐订单,应用开发系统30可以根据页面承载的组件的操作要求,智能生成操作API,如下所示:
表12操作API的输入输出参数以及组织信息
由于web视图模型映射到后台服务模型(业务模型),而后台服务模型提供了服务API,如此,web应用的前台可以调用后台的服务API,对返回结果按模型字段关联,从而提供完整的web API。
上述S410为应用开发系统30从所述至少一组业务模型的服务API中,确定至少一组目标API的一种具体实现方式。当应用开发系统30不执行S406、S408时,应用开发系统30可以针对每组业务模型分别确定至少一组目标API,或者自动确定一组业务模型,然后针对该业务模型确定至少一种目标API。
S412:应用开发系统30向用户呈现至少一组目标API。
与上述S406类似,针对每一组业务模型,应用开发系统30可以从该组业务模型的服务API中,确定出至少一组用于组装web API的服务API。为了便于描述,本申请实施例将用于组装web API的服务API记作目标API。应用开发系统30可以向用户呈现上述至少一组目标API,从而实现向用户推荐目标API,以用于组装得到web API。
S414:应用开发系统30确定用户从至少一组目标API中选中的一组目标API。
与上述S408类似,用户可以根据业务需求,从至少一组目标API中选择一组API。相应地,应用开发系统30可以根据用户的操作,确定用户从至少一组目标API中选中的一组目标API。
上述S412至S414为本申请实施例的可选步骤,执行本申请实施例的接口开发方法也可以不执行S412至S414。例如,应用开发系统30可以自动从至少一组目标API中确定一组目标API,用于生成页面对应的web API,或者是针对每一组目标API,均执行后续生成web API的操作。
S416:应用开发系统30根据用户选中的一组目标API,生成页面对应的web API。
具体地,应用开发系统30可以获取用户选中的一组目标API中各目标API的模型字段,然后将这一组目标API通过业务模型的模型字段关联,从而实现将一组目标API组装为web API。
上述S416为应用开发系统30根据至少一组目标API,生成所述页面对应的web API的一种具体实现方式。当应用开发系统30不执行S412、S414时,应用开发系统30可以针对每组目标API分别生成页面对应的web API,或者自动确定一组目标API,然后针对该组目标API,生成页面对应的web API。
进一步地,上述S406至S416为本申请实施例中应用开发系统30根据至少一组业务模型,生成页面对应的web API的一种具体实现。在本申请实施例其他可能的实现方式中,应用开发系统30也可以根据至少一组业务模型,通过其他方式生成页面对应的web API。
该方法基于页面元数据如页面承载的组件捕捉到开发人员正在处理的业务场景,获得相应的业务信息,基于该业务信息搜索后台服务模型库获得相应的业务模型,通过业务模型可以自动化地完成web API设计及组装的工作,从而提升开发效率。进一步地,web API基于后台服务模型库中业务模型的服务API组装生成,因此,web API对应的web视图模型中业务实体的定义与后台的业务模型中业务实体的定义一致,降低了沟通成本,提高了开发效率。而且,该方法能够实现后台的业务模型与web视图模型的自动映射,无需人工绑定,进一步提高了开发效率。
基于前述实施例的接口开发方法,本申请还提供一种应用开发系统30,如图3所示,包括:
web编辑器32,用于接收用户通过开发界面配置的网络应用的页面元数据,所述页面元数据包括所述网络应用的页面承载的组件;
模型搜索装置34,用于根据所述页面承载的组件对应的业务信息,搜索后台服务模型库38,获得所述页面对应的至少一组业务模型;
所述web编辑器32,还用于根据所述至少一组业务模型,生成所述页面对应的网络应用程序编程接口web API。
示例性地,上述web编辑器32、模型搜索装置34可以通过硬件实现,或者可以通过软件实现。为了便于描述,下面以web编辑器32示例说明。
当通过软件实现时,web编辑器32可以是运行在计算机设备上的应用程序,如计算引擎等。该应用程序可以以虚拟化服务的方式提供给用户使用。虚拟化服务可以包括虚拟机(virtual machine,VM)服务、裸金属服务器(bare metal server,BMS)服务以及容器(container)服务。其中,VM服务可以是通过虚拟化技术在多个物理主机(如计算设备)上虚拟出虚拟机(virtual machine,VM)资源池以为用户按需提供VM进行使用的服务。BMS服务是在多个物理主机上虚拟出BMS资源池以为用户按需提供BMS进行使用的服务。容器服务是在多个物理主机上虚拟出容器资源池以为用户按需提供容器进行使用的服务。VM是模拟出来的一台虚拟的计算机,也即逻辑上的一台计算机。BMS是一种可弹性伸缩的高性能计算服务,计算性能与传统物理机无差别,具有安全物理隔离的特点。容器是一种内核虚拟化技术,可以提供轻量级的虚拟化,以达到隔离用户空间、进程和资源的目的。应理解,上述虚拟化服务中的VM服务、BMS服务以及容器服务仅仅是作为具体的示例,在实际应用中,虚拟化服务还可以是其他轻量级或者重量级的虚拟化服务,此处不作具体限定。
当通过硬件实现时,web编辑器32中可以包括至少一个计算设备,如服务器等。或者,web编辑器32也可以是利用专用集成电路(application-specific integrated circuit,ASIC)实现、或可编程逻辑器件(programmable logic device,PLD)实现的设备等。其中,上述PLD可以是复杂程序逻辑器件(complex programmable logical device,CPLD)、现场可编程门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合实现。
在一些可能的实现方式中,应用开发系统30还可以包括服务编辑器36,服务编辑器36用于开发业务模型。其中,服务编辑器36可以为用户提供可视化的服务开发能力,实现服务编排可视化,业务流程可视化,业务逻辑脚本化。与web编辑器32类似,服务编辑器36可以通过软件实现,或者通过硬件实现。其实现方式可以参考web编辑器32,在此不再赘述。
在一些可能的实现方式中,应用开发系统30还包括后台服务模型库38。上述后台服务模型库38可以通过硬件实现,或者可以通过软件实现。后台服务模型库38通过硬件实现时,可以包括至少一个具有数据存储能力的存储设备,例如可以包括一个或者多个存储服务器等。后台服务模型库38通过软件实现时,可以是存储业务模型的数据库软件。
在一些可能的实现方式中,所述web编辑器32还用于:
向所述用户呈现所述至少一组业务模型;
确定所述用户从所述至少一组业务模型中选中的一组业务模型;
所述web编辑器32具体用于:
根据所述用户选中的一组业务模型,生成所述页面对应的网络应用程序编程接口web API。
在一些可能的实现方式中,所述web编辑器32具体用于:
从所述至少一组业务模型的服务API中,确定至少一组目标API;
根据所述至少一组目标API,生成所述页面对应的web API。
在一些可能的实现方式中,所述web编辑器32还用于:
向所述用户呈现所述至少一组目标API;
确定所述用户从所述至少一组目标API中选中的一组目标API;
所述web编辑器32具体用于:
根据所述用户选中的一组目标API,生成所述页面对应的web API。
在一些可能的实现方式中,所述页面对应的web API包括查询API;
所述web编辑器32具体用于:
根据所述页面承载的组件的数据加载要求,从所述至少一组业务模型的服务API中确定符合所述数据加载要求的至少一组目标API。
在一些可能的实现方式中,所述页面对应的web API包括操作API;
所述web编辑器32具体用于:
根据所述页面承载的组件的操作要求,从所述至少一组业务模型的服务API中确定符合所述操作要
求的至少一组目标API。
在一些可能的实现方式中,所述web编辑器32具体用于:
将所述至少一组目标API通过业务模型的模型字段关联,获得所述页面对应的web API。
在一些可能的实现方式中,所述web编辑器32具体用于:
向用户呈现开发界面,所述开发界面包括多个组件模板;
确定所述用户从所述多个组件模板中选择的目标组件模板,接收所述用户对所述目标组件模板的配置信息,获得所述网络应用的至少一个页面承载的组件。
在一些可能的实现方式中,所述模型搜索装置34具体用于:
响应于所述用户触发的接口生成操作,根据所述至少一个页面承载的组件对应的业务信息,搜索后台服务模型库,获得业务模型。
在一些可能的实现方式中,所述模型搜索装置34具体用于:
所述用户在所述开发界面的最近一次配置操作的操作时间满足预设条件,根据所述至少一个页面承载的组件对应的业务信息,搜索后台服务模型库,获得业务模型。
本申请还提供一种计算设备600。如图6所示,计算设备600包括:总线602、处理器604、存储器606和通信接口608。处理器604、存储器606和通信接口608之间通过总线602通信。计算设备600可以是服务器或终端设备。应理解,本申请不限定计算设备600中的处理器、存储器的个数。
总线602可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条线表示,但并不表示仅有一根总线或一种类型的总线。总线602可包括在计算设备600各个部件(例如,存储器606、处理器604、通信接口608)之间传送信息的通路。
处理器604可以包括中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)、微处理器(micro processor,MP)或者数字信号处理器(digital signal processor,DSP)等处理器中的任意一种或多种。
存储器606可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM)。存储器606还可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM),快闪存储器,机械硬盘(hard disk drive,HDD)或固态硬盘(solid state drive,SSD)。存储器606中存储有可执行的程序代码,处理器604执行该可执行的程序代码以实现前述接口开发方法。具体的,存储器606上存有应用开发系统30用于执行接口开发方法的指令。
通信接口608使用例如但不限于网络接口卡、收发器一类的收发模块,来实现计算设备600与其他设备或通信网络之间的通信。
本申请实施例还提供了一种计算设备集群。该计算设备集群包括至少一台计算设备。该计算设备可以是服务器,例如是中心服务器、边缘服务器,或者是本地数据中心中的本地服务器。在一些实施例中,计算设备也可以是台式机、笔记本电脑或者智能手机等终端设备。
如图7所示,所述计算设备集群包括至少一个计算设备600。计算设备集群中的一个或多个计算设备600中的存储器606中可以存有相同的、应用开发系统30用于执行接口开发方法的指令。
在一些可能的实现方式中,该计算设备集群中的一个或多个计算设备600也可以用于执行应用开发系统30用于执行接口开发方法的部分指令。换言之,一个或多个计算设备600的组合可以共同执行应用开发系统30用于执行接口开发方法的指令。
需要说明的是,计算设备集群中的不同的计算设备600中的存储器606可以存储不同的指令,用于执行应用开发系统30的部分功能。
图8示出了一种可能的实现方式。如图8所示,两个计算设备600A和600B通过通信接口608实现连接。计算设备600A中的存储器上存有用于执行web编辑器的功能的指令。计算设备600B中的存储器上存有用于执行模型搜索装置34的功能的指令。进一步地,计算设备600A还存有用于执行服
务编辑器36的功能的指令,计算设备600B还存有用于执行后台服务模型库38的功能的指令。换言之,计算设备600A和600B的存储器606共同存储了应用开发系统30用于执行接口开发方法的指令。
图8所示的计算设备集群之间的连接方式可以是考虑到本申请提供的接口开发方法需要较多算力进行搜索、存储。因此,考虑将模型搜索装置34、后台服务模型库38实现的功能交由计算设备600B执行。
应理解,图8中示出的计算设备600A的功能也可以由多个计算设备600完成。同样,计算设备600B的功能也可以由多个计算设备600完成。
在一些可能的实现方式中,计算设备集群中的一个或多个计算设备可以通过网络连接。其中,所述网络可以是广域网或局域网等等。图9示出了一种可能的实现方式。如图9所示,两个计算设备600C和600D之间通过网络进行连接。具体地,通过各个计算设备中的通信接口与所述网络进行连接。在这一类可能的实现方式中,计算设备600C中的存储器606中存有执行web编辑器32的功能的指令。同时,计算设备600D中的存储器606中存有执行模型搜索装置34的功能的指令。进一步地,计算设备600C还存有用于执行服务编辑器36的功能的指令,计算设备600D还存有用于执行后台服务模型库38的功能的指令。
图9所示的计算设备集群之间的连接方式可以是考虑到本申请提供的接口开发方法需要较多算力进行搜索、存储,因此考虑将元数据管理模块104实现的功能交由计算设备600D执行。
应理解,图9中示出的计算设备600C的功能也可以由多个计算设备600完成。同样,计算设备600D的功能也可以由多个计算设备600完成。
本申请实施例还提供了一种计算机可读存储介质。所述计算机可读存储介质可以是计算设备能够存储的任何可用介质或者是包含一个或多个可用介质的数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘)等。该计算机可读存储介质包括指令,所述指令指示计算设备执行上述应用于应用开发系统30用于执行接口开发方法。
本申请实施例还提供了一种包含指令的计算机程序产品。所述计算机程序产品可以是包含指令的,能够运行在计算设备上或被储存在任何可用介质中的软件或程序产品。当所述计算机程序产品在至少一个计算设备上运行时,使得至少一个计算设备执行上述接口开发方法。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的保护范围。
Claims (23)
- 一种接口开发方法,其特征在于,所述方法包括:接收用户通过开发界面配置的网络应用的页面元数据,所述页面元数据包括所述网络应用的页面承载的组件;根据所述页面承载的组件对应的业务信息,搜索后台服务模型库,获得所述页面对应的至少一组业务模型;根据所述至少一组业务模型,生成所述页面对应的网络应用程序编程接口web API。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:向所述用户呈现所述至少一组业务模型;确定所述用户从所述至少一组业务模型中选中的一组业务模型;所述根据所述至少一组业务模型,生成所述页面对应的网络应用程序编程接口web API,包括:根据所述用户选中的一组业务模型,生成所述页面对应的网络应用程序编程接口web API。
- 根据权利要求1或2所述的方法,其特征在于,所述根据所述至少一组业务模型,生成所述页面对应的网络应用程序编程接口web API,包括:从所述至少一组业务模型的服务API中,确定至少一组目标API;根据所述至少一组目标API,生成所述页面对应的web API。
- 根据权利要求3所述的方法,其特征在于,所述方法还包括:向所述用户呈现所述至少一组目标API;确定所述用户从所述至少一组目标API中选中的一组目标API;所述根据所述至少一组目标API,生成所述页面对应的web API,包括:根据所述用户选中的一组目标API,生成所述页面对应的web API。
- 根据权利要求3或4所述的方法,其特征在于,所述页面对应的web API包括查询API;所述从所述至少一组业务模型的服务API中,确定至少一组目标API,包括:根据所述页面承载的组件的数据加载要求,从所述至少一组业务模型的服务API中确定符合所述数据加载要求的至少一组目标API。
- 根据权利要求3或4所述的方法,其特征在于,所述页面对应的web API包括操作API;所述从所述至少一组业务模型的服务API中,确定至少一组目标API,包括:根据所述页面承载的组件的操作要求,从所述至少一组业务模型的服务API中确定符合所述操作要求的至少一组目标API。
- 根据权利要求3至6任一项所述的方法,其特征在于,所述根据所述至少一组目标API,生成所述页面对应的web API,包括:将所述至少一组目标API通过业务模型的模型字段关联,获得所述页面对应的web API。
- 根据权利要求1至7任一项所述的方法,其特征在于,所述接收用户通过开发界面配置的网络应用的页面元数据,包括:向用户呈现开发界面,所述开发界面包括多个组件模板;确定所述用户从所述多个组件模板中选择的目标组件模板,接收所述用户对所述目标组件模板的配置信息,获得所述网络应用的至少一个页面承载的组件。
- 根据权利要求1至8任一项所述的方法,其特征在于,所述根据所述至少一个页面承载的组件对应的业务信息,搜索后台服务模型库,获得业务模型,包括:响应于所述用户触发的接口生成操作,根据所述至少一个页面承载的组件对应的业务信息,搜索后台服务模型库,获得业务模型。
- 根据权利要求1至8任一项所述的方法,其特征在于,所述根据所述至少一个页面承载的组件对应的业务信息,搜索后台服务模型库,获得业务模型,包括:所述用户在所述开发界面的最近一次配置操作的操作时间满足预设条件,根据所述至少一个页面承载的组件对应的业务信息,搜索后台服务模型库,获得业务模型。
- 一种应用开发系统,其特征在于,所述系统包括:web编辑器,用于接收用户通过开发界面配置的网络应用的页面元数据,所述页面元数据包括所述网络应用的页面承载的组件;模型搜索装置,用于根据所述页面承载的组件对应的业务信息,搜索后台服务模型库,获得所述页面对应的至少一组业务模型;所述web编辑器,还用于根据所述至少一组业务模型,生成所述页面对应的网络应用程序编程接口web API。
- 根据权利要求11所述的系统,其特征在于,所述web编辑器还用于:向所述用户呈现所述至少一组业务模型;确定所述用户从所述至少一组业务模型中选中的一组业务模型;所述web编辑器具体用于:根据所述用户选中的一组业务模型,生成所述页面对应的网络应用程序编程接口web API。
- 根据权利要求11或12所述的系统,其特征在于,所述web编辑器具体用于:从所述至少一组业务模型的服务API中,确定至少一组目标API;根据所述至少一组目标API,生成所述页面对应的web API。
- 根据权利要求13所述的系统,其特征在于,所述web编辑器还用于:向所述用户呈现所述至少一组目标API;确定所述用户从所述至少一组目标API中选中的一组目标API;所述web编辑器具体用于:根据所述用户选中的一组目标API,生成所述页面对应的web API。
- 根据权利要求13或14所述的系统,其特征在于,所述页面对应的web API包括查询API;所述web编辑器具体用于:根据所述页面承载的组件的数据加载要求,从所述至少一组业务模型的服务API中确定符合所述数据加载要求的至少一组目标API。
- 根据权利要求13或14所述的系统,其特征在于,所述页面对应的web API包括操作API;所述web编辑器具体用于:根据所述页面承载的组件的操作要求,从所述至少一组业务模型的服务API中确定符合所述操作要求的至少一组目标API。
- 根据权利要求13至16任一项所述的系统,其特征在于,所述web编辑器具体用于:将所述至少一组目标API通过业务模型的模型字段关联,获得所述页面对应的web API。
- 根据权利要求11至17任一项所述的系统,其特征在于,所述web编辑器具体用于:向用户呈现开发界面,所述开发界面包括多个组件模板;确定所述用户从所述多个组件模板中选择的目标组件模板,接收所述用户对所述目标组件模板的配置信息,获得所述网络应用的至少一个页面承载的组件。
- 根据权利要求11至18任一项所述的系统,其特征在于,所述模型搜索装置具体用于:响应于所述用户触发的接口生成操作,根据所述至少一个页面承载的组件对应的业务信息,搜索后台服务模型库,获得业务模型。
- 根据权利要求11至18任一项所述的系统,其特征在于,所述模型搜索装置具体用于:所述用户在所述开发界面的最近一次配置操作的操作时间满足预设条件,根据所述至少一个页面承载的组件对应的业务信息,搜索后台服务模型库,获得业务模型。
- 一种计算设备集群,其特征在于,所述计算设备集群包括至少一台计算设备,所述至少一台计算设备包括至少一个处理器和至少一个存储器,所述至少一个存储器中存储有计算机可读指令;所述至少一个处理器执行所述计算机可读指令,以使得所述计算设备集群执行如权利要求1至10中任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,包括计算机可读指令;所述计算机可读指令用于实现权利要求1至10任一项所述的方法。
- 一种计算机程序产品,其特征在于,包括计算机可读指令;所述计算机可读指令用于实现权利 要求1至10任一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211392876.6A CN118034680A (zh) | 2022-11-08 | 2022-11-08 | 一种接口开发方法及相关设备 |
CN202211392876.6 | 2022-11-08 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024098755A1 true WO2024098755A1 (zh) | 2024-05-16 |
Family
ID=91002771
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/100929 WO2024098755A1 (zh) | 2022-11-08 | 2023-06-19 | 一种接口开发方法及相关设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN118034680A (zh) |
WO (1) | WO2024098755A1 (zh) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106843835A (zh) * | 2016-12-21 | 2017-06-13 | 中国电子科技网络信息安全有限公司 | 一种元数据定制的应用系统软件构建系统、系统构建方法 |
CN112835560A (zh) * | 2021-03-04 | 2021-05-25 | 广州图创计算机软件开发有限公司 | Web多终端低代码智能软件开发平台 |
CN113918140A (zh) * | 2021-10-21 | 2022-01-11 | 浪潮软件集团有限公司 | 一种基于拖拽方式生成前后端代码的系统构建方法 |
CN114115883A (zh) * | 2022-01-26 | 2022-03-01 | 广州云徙科技有限公司 | 一种使用中台业务能力快速构建前端应用的方法 |
-
2022
- 2022-11-08 CN CN202211392876.6A patent/CN118034680A/zh active Pending
-
2023
- 2023-06-19 WO PCT/CN2023/100929 patent/WO2024098755A1/zh unknown
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106843835A (zh) * | 2016-12-21 | 2017-06-13 | 中国电子科技网络信息安全有限公司 | 一种元数据定制的应用系统软件构建系统、系统构建方法 |
CN112835560A (zh) * | 2021-03-04 | 2021-05-25 | 广州图创计算机软件开发有限公司 | Web多终端低代码智能软件开发平台 |
CN113918140A (zh) * | 2021-10-21 | 2022-01-11 | 浪潮软件集团有限公司 | 一种基于拖拽方式生成前后端代码的系统构建方法 |
CN114115883A (zh) * | 2022-01-26 | 2022-03-01 | 广州云徙科技有限公司 | 一种使用中台业务能力快速构建前端应用的方法 |
Also Published As
Publication number | Publication date |
---|---|
CN118034680A (zh) | 2024-05-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10637796B2 (en) | Linking instances within a cloud computing environment | |
US11204793B2 (en) | Determining an optimal computing environment for running an image | |
US10203938B2 (en) | Application engineering platform | |
KR101442360B1 (ko) | 플랫폼들 간 가상 머신 이미지 포팅 | |
JP2021500658A (ja) | インタラクティブ・ワークフローを実行するコンピュータ実施方法、システム、およびコンピュータ・プログラム製品、ならびにコンピュータ・プログラム | |
US20140344123A1 (en) | Dynamically modifying workload patterns in a cloud | |
US20180196647A1 (en) | Application Programming Interface Discovery Using Pattern Recognition | |
JP2018519580A (ja) | サービス実装方法及び装置 | |
US10877805B2 (en) | Optimization of memory usage by integration flows | |
US12118378B2 (en) | Application programming interface for spinning up machine learning inferencing server on demand | |
US11195137B2 (en) | Model-driven and automated system for shared resource solution design | |
JP2024535426A (ja) | タスクを実行するノードの自動選択 | |
US10803246B2 (en) | Decomposing composite product reviews | |
WO2022100439A1 (en) | Workflow patching | |
US20200334260A1 (en) | User-driven adaptation of rankings of navigation elements | |
US9342527B2 (en) | Sharing electronic file metadata in a networked computing environment | |
US10832458B2 (en) | System, method and computer program product for electronic document display | |
WO2024098755A1 (zh) | 一种接口开发方法及相关设备 | |
US11645583B2 (en) | Automatic rule learning in shared resource solution design | |
US20190057087A1 (en) | Onboarding services | |
US11176134B2 (en) | Navigation paths between content items | |
US20240338302A1 (en) | Simulated software features in a simulated sandbox within a production environment | |
CN118657488A (zh) | 用于确定对象的流程状态的方法及相关设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23887452 Country of ref document: EP Kind code of ref document: A1 |