An APP Interface Adaptation Method and Device for Dynamically Assembling Services
Dynamic assembly and online editing are achieved through the process engine, which solves the problem that existing technology is difficult to support rapid business iteration and expansion, improves the system's development efficiency and stability, and reduces development and maintenance costs.
Patent Information
- Application Number
- CN201611175922.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2016-12-19
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2036-12-19
AI Technical Summary
When the existing technology faces rapid business iteration and expansion, it is difficult to support rapid update and iteration of the system, resulting in high development and maintenance costs, long cycles, and system stability is threatened.
The process engine is used to realize dynamic assembly and online editing of services. Through the idea of online editing and rapid online launch, the development of front-end APP interface is simplified, making it an online operation, and improving development speed and maintenance convenience.
It greatly improves the system's development efficiency, shortens the development cycle, supports the rapid iteration and development of business, and reduces system instability factors, and improves the availability and stability of the system.
Smart Images

Figure CN108228149B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network technologies, and in particular, to an APP interface adaptation method and device capable of dynamically assembling services. Background Art
[0002] With the rapid development of mobile communication technologies, the rapid popularization of intelligent devices, and the rapid growth of different types of APPs, the Internet has quickly entered the mobile Internet era. E-commerce traffic from mobile APPs has become the fastest-growing area for major e-commerce platforms. Corresponding to the explosive growth of front-end traffic, the server-side system is also under great pressure. To achieve a highly concurrent and highly available system, most companies will split the entire system into independent subsystems according to the business, and then provide interface services externally through an RPC framework. The mobile APPs then call the corresponding back-end subsystem interface services through the interface service gateway according to the business requirements. Such a design can achieve high cohesion and low coupling of the business, but it brings new problems. With the development and expansion of the business, the frequency of update and upgrade of the subsystems will be very high, and the scale of the subsystems will also expand rapidly. The existing technology system needs to support business iteration by frequently upgrading the interface service gateway to handle this scenario, making it difficult to support rapid business development. Moreover, the interface service gateway is the traffic center of the entire system, aggregating all traffic requests, and its upgrade will directly affect (or even interrupt) the operation of the entire system. Therefore, in the face of rapid business iteration, especially after the business expands to a certain extent, the existing technology solutions will be difficult to support, the system maintenance cost will increase, and the stability of the system will also be threatened. This will further lead to the problems of sharp increase in development and maintenance costs and system instability caused by frequent upgrades of the service gateway when the expansion of the business drives the expansion of the back-end service scale.
[0003] Most of the existing technology solutions are implemented in the way of "hard coding", that is, by writing program code to assemble, process, and transform the service interfaces provided by the back-end subsystems according to the business requirements to obtain the interfaces required by the front-end APPs and provide them for the front-end APPs to call. However, when the business requirements change, adding new functions or modifying existing functions requires modifying the source code of the interface service gateway, and requires recompiling, repackaging, and deploying. This will further lead to a large amount of development and maintenance work, high costs, long cycles, and the need to interrupt the online service. When the system scale is relatively small, this technology solution can still support. But with the development and expansion of the business, new business requirements or changes will be very frequent. The existing technology solutions cannot achieve rapid business update and iteration to handle this scenario, making it difficult to support rapid business development, and the stability of the system will also be threatened. Summary of the Invention
[0004] In view of this, the present invention provides an APP interface adaptation method and system for dynamically assembling services. By utilizing the characteristics of the process engine and adopting the idea of "online editing and rapid go-live", the development of the front-end APP interface of the mobile APP becomes very simple, all of which are online operations, with high development speed and maintenance convenience. This greatly improves the development efficiency of the system and shortens the development cycle. It can well support the rapid iteration of business and the rapid development of business. At the same time, it can also support online upgrade and update of the system, which can reduce the system instability factors caused by frequent system upgrades, and effectively improve the usability and stability of the system. Furthermore, it solves the problem in the prior art that when adding new functions or modifying existing functions, the source code of the interface service gateway needs to be modified, and it is necessary to recompile, package, and deploy, resulting in a large amount of development and maintenance work, high cost, and long cycle.
[0005] To achieve the above object, according to one aspect of the present invention, there is provided an APP interface adaptation method for dynamically assembling services.
[0006] The method of the present invention includes: using a process engine to perform interface adaptation between the front-end APP interface and the back-end service interface.
[0007] Optionally, the method of the present invention further includes performing system analysis according to business requirements to determine the definition of the front-end APP interface and the corresponding definition of the back-end service interface; creating a new process, defining the front-end APP interface at the start node of the process, and performing parameter legality verification according to the business requirements; and defining the content and format of the return value of the front-end APP interface at the end node of the process, and setting content adaptation and format conversion according to the requirements; creating one or more interface call nodes in the process, entering the definition of the back-end service interface, and setting content adaptation and format conversion for the parameters and return values of the back-end service interface; and saving the process.
[0008] Optionally, a branch judgment node is created in the process.
[0009] Optionally, the method of the present invention further includes defining the version information of the process; and testing, modifying, and adjusting the process; and publishing the process.
[0010] Optionally, providing the front-end APP interface and accepting calls from the front-end APP, starting a process instance; according to the process, the process instance calls the back-end service interface, and performs conversion and adaptation of interface parameters; and sending the processed result of the back-end server to the front-end after conversion and processing.
[0011] Optionally, the method of the present invention further includes managing the process and the version information of the process; and monitoring the process instance and exceptions.
[0012] According to another aspect of the present invention, there is provided an APP interface adaptation device for dynamically assembling services.
[0013] An APP interface adaptation device for dynamically assembling services according to the present invention uses a process engine to adapt the front-end APP interface and the back-end service interface.
[0014] Optionally, the device of the present invention further includes an adaptation module for performing system analysis according to business requirements to determine the definition of the front-end APP interface and the corresponding definition of the back-end service interface; and creating a new process, defining the front-end APP interface at the start node of the process, and performing parameter legality verification according to the business requirements; and defining the content and format of the return value of the front-end APP interface at the end node of the process, and setting content adaptation and format conversion according to the requirements; and also for creating one or more interface call nodes in the process, entering the definition of the back-end service interface, and setting the parameters and return values of the back-end service interface for content adaptation and format conversion; and saving the process.
[0015] Optionally, the adaptation module is further configured to create a branch judgment node in the process.
[0016] Optionally, the adaptation module is further configured to define the version information of the process; and test, modify and adjust the process; and publish the process.
[0017] Optionally, the device of the present invention further includes an operation module for providing the front-end APP interface and accepting calls from the front-end APP to start a process instance; and according to the process, the process instance calls the back-end service interface, and performs conversion adaptation of the interface parameters; and sends the processed result of the back-end server to the front-end after conversion and processing.
[0018] Optionally, the device of the present invention further includes a management module for managing the process and the version information of the process; and monitoring the process instance and exceptions.
[0019] According to another aspect of the present invention, there is provided an electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enabling the one or more processors to implement the method for adapting an APP interface for dynamically assembling services according to any one of the above.
[0020] According to another aspect of the present invention, there is provided a computer-readable medium having a computer program stored thereon, characterized in that when the program is executed by a processor, it implements the method for adapting an APP interface for dynamically assembling services according to any one of the above.
[0021] According to the technical solution of the present invention, by using a process engine to achieve dynamic assembly and online editing of services, interface adaptation between the backend service interface and the front-end APP interface is realized. Among them, the process engine provides a visual online development tool. To develop a new interface, only need to design a process by dragging and dropping, and then make appropriate settings. Moreover, this process engine is different from the traditional workflow process engine. It has no human-machine nodes and does not require manual participation. All process nodes are program nodes that can run automatically. The main work of these program nodes is to call the interfaces of the backend sub-services, and at the same time, interface parameter conversion and adaptation can be performed. In addition, scripts can be written on the branch judgment nodes of the process engine, and relatively complex business logic judgments can be realized through the scripts. Therefore, the present invention is an APP interface adaptation technical solution that can be developed online, supports the orchestration and combination, dynamic assembly of multiple backend services, and provides customizable external interfaces. Using this method, fast and visual online development can be achieved. The adaptation and docking between the front-end APP and the backend service can be realized without going through the processes of coding, compiling, packaging, and deployment. Therefore, the development and maintenance costs of the system are greatly reduced, thus well supporting the rapid development of the business. And because the system does not need to be restarted for update and upgrade, the stability of the system is also guaranteed. Description of the Drawings
[0022] The drawings are used to better understand the present invention and do not constitute an improper limitation to the present invention. Among them:
[0023] Figure 1 is a schematic diagram of an APP interface adaptation device capable of dynamically assembling services according to an embodiment of the present invention;
[0024] Figure 2 is a flowchart of interface adaptation in an APP interface adaptation method capable of dynamically assembling services according to an embodiment of the present invention;
[0025] Figure 3 is a schematic diagram of the main steps of an APP interface adaptation method capable of dynamically assembling services according to an embodiment of the present invention;
[0026] Figure 4 is a schematic diagram of a process engine of an APP interface adaptation device capable of dynamically assembling services according to an embodiment of the present invention;
[0027] Figure 5 is a schematic diagram of an APP interface adaptation system capable of dynamically assembling services according to an embodiment of the present invention. Detailed Embodiments
[0028] The following describes exemplary embodiments of the present invention in conjunction with the accompanying drawings. Various details of the embodiments of the present invention are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, descriptions of well-known functions and structures are omitted in the following description for clarity and conciseness.
[0029] A method for adapting an APP interface for dynamically assembled services in an embodiment of the present invention is as follows: using a process engine to adapt the front-end APP interface and the back-end service interface. Figure 1 It is a schematic diagram of the device structure for implementing the method for adapting an APP interface for dynamically assembled services, as Figure 1 shown. An interface adaptation layer is added between the front-end APP and the back-end system, that is, Figure 1 the interface service gateway in. The main component of the interface service gateway is a process engine (workflow engine). This process engine is different from the traditional workflow process engine. It has no human-machine nodes and does not require manual participation. All process nodes are program nodes that can run automatically. The main work of these program nodes is to call the interfaces of the back-end sub-services, and at the same time, interface parameter conversion and adaptation can be performed. In addition, scripts can be written on the branch judgment nodes of the process engine to implement more complex business logic judgments through the scripts.
[0030] Figure 2 It is a flowchart of interface adaptation in a method for adapting an APP interface for dynamically assembled services according to an embodiment of the present invention. As Figure 2 shown. The interface adaptation process in a method for adapting an APP interface for dynamically assembled services according to an embodiment of the present invention includes:
[0031] S21: Provide the front-end APP interface and accept calls from the front-end APP to start a process instance. Receive requests from the front-end APP, first call the external interface provided by the interface service gateway, and then the interface service gateway initiates a process instance.
[0032] S22: According to the process, the process instance calls the back-end service interface and performs interface parameter conversion and adaptation. According to the process design, the process instance sequentially calls the interfaces provided by the back-end service, and performs interface parameter conversion and adaptation while calling.
[0033] S23: Convert and process the back-end service processing result and send it to the front-end. After the call, the processing result is converted and processed and returned to the front-end APP.
[0034] Figure 3It is a schematic diagram of the development process in an APP interface adaptation method for dynamically assembling services according to an embodiment of the present invention. The process engine of the interface service gateway provides a visual online development tool. To develop a new interface, one only needs to design a process by dragging and then make appropriate settings.
[0035] As Figure 3 shown, the main steps of an APP interface adaptation method for dynamically assembling services according to an embodiment of the present invention include:
[0036] S31: Conduct system analysis according to business requirements to determine the definition of the front-end APP interface and the corresponding definition of the back-end service interface.
[0037] S32: Define the front-end APP interface at the start node of the process and perform parameter legality verification according to business requirements; and define the content and format of the return value of the front-end APP interface at the end node of the process, and make settings for content adaptation and format conversion according to requirements. Defining the front-end APP interface at the start node of the process includes defining the content and format of the parameters.
[0038] S33: Create one or more interface call nodes in the process, enter the definition of the back-end service interface, and make settings for content adaptation and format conversion of the parameters and return values of the back-end service interface. In actual applications, create the corresponding number of interface call nodes according to business needs.
[0039] S34: Create a branch judgment node in the process, where the branch judgment node can write scripts to implement business logic judgment for organizing multiple interface call nodes. This branch judgment node can be created or not, and it can be determined whether to create it according to business requirements.
[0040] S35: Save the process. During the above process, the entire process can also be designed according to business requirements to form a flowchart and save the flowchart. The flowchart is connected by all the process nodes created in the above process and is a complete and specific description of the entire process design.
[0041] S36: Define the version information of the process. For other information of the process, it can all be defined and saved.
[0042] S37: Test, modify, and adjust the process. Online testing, modification, and adjustment of the process achieve online detection.
[0043] S38: Publish the process. When publishing the process online, publishing new functions does not require restarting the service, thus ensuring the continuity and stability of the system operation.
[0044] In addition, an APP interface adaptation method for dynamically assembling services according to an embodiment of the present invention further includes managing the process and the version information of the process, and monitoring process instances and exceptions. Thereby, management of process definitions, management of process versions, online query of logs, online monitoring of process instances, online monitoring and handling of exceptions, etc. can be realized.
[0045] As can be seen from the above steps, an APP interface adaptation method for dynamically assembling services according to an embodiment of the present invention can realize the docking between the front-end APP and the back-end service without coding, achieving fast online development. At the same time, it also provides the function of online publishing. Publishing new functions does not require restarting the service, ensuring the continuity and stability of the system operation. Therefore, through the method of the present invention, the rapid development of the business can be well supported, and the stability of the system is also guaranteed.
[0046] The present invention also discloses an APP interface adaptation device for dynamically assembling services. An APP interface adaptation device according to an embodiment of the present invention uses a process engine to perform interface adaptation on the front-end APP interface and the back-end service interface.
[0047] An APP interface adaptation device according to an embodiment of the present invention further includes an adaptation module, which is used to perform system analysis according to business requirements to determine the definition of the front-end APP interface and the corresponding definition of the back-end service interface; and create a new process, define the front-end APP interface at the start node of the process, and perform parameter legality verification according to business requirements; and define the content and format of the return value of the front-end APP interface at the end node of the process, and set content adaptation and format conversion according to requirements; it is also used to create one or more interface call nodes in the process, enter the definition of the back-end service interface, and set content adaptation and format conversion for the parameters and return values of the back-end service interface; and save the process. The adaptation module is also used to create branch judgment nodes in the process, and the branch judgment nodes are used to organize multiple interface call nodes. The adaptation module is also used to define the version information of the process; and test, modify and adjust the process; and publish the process.
[0048] An APP interface adaptation device according to an embodiment of the present invention further includes an operation module, which is used to provide the front-end APP interface and accept the call of the front-end APP to start a process instance; and according to the process, the process instance calls the back-end service interface and performs conversion adaptation of the interface parameters; and processes the result of the back-end server after conversion and sends it to the front end.
[0049] An APP interface adaptation device capable of dynamically assembling services according to an embodiment of the present invention further includes a management module for managing process and process version information, and monitoring process instances and exceptions.
[0050] The device of the present invention utilizes the characteristics of the process engine and adopts the idea of "online editing and rapid go-live", making the development of mobile APP interfaces very simple. All operations are online, with high development speed and maintenance convenience, thus greatly improving the development efficiency of the system and shortening the development cycle. It can well support the rapid iteration of business and the rapid development of business. At the same time, since the device of the present invention supports online upgrade and system update, it can reduce the system instability factors caused by frequent system upgrades and effectively improve the availability and stability of the system.
[0051] As can be seen from the above, an APP interface adaptation device capable of dynamically assembling services according to an embodiment of the present invention at least includes three major components: a development platform, a running platform, and a management platform. Among them, the development platform is an online development tool, the running platform is the core of the process engine, and the management platform is an online management tool. Furthermore, the development platform includes the above-mentioned adaptation module, the running platform includes the above-mentioned running module, and the management platform includes the above-mentioned management module. Figure 4 It is a schematic diagram of the process engine of an APP interface adaptation device capable of dynamically assembling services according to an embodiment of the present invention. The development platform supports online development. As Figure 4 shown, it includes a process designer, a script designer, an interface adapter, an online testing tool, and an online publishing tool. The development platform has the following functions: providing a visual process design tool that can design flowcharts by dragging; the process should support various flow control modes such as sequence, branch, and parallel; providing a script design tool to support script writing; providing an interface adaptation tool to support content adaptation and format conversion of parameters; supporting the legality verification of parameters; supporting exception handling; providing an online testing environment to support online testing; providing an online publishing tool to support online publishing, including operations such as publishing, pausing, and terminating. The running platform can implement services such as process parsing, running, data exchange, and task scheduling. The management platform realizes functions such as management of process definitions, management of process versions, online query of logs, online monitoring of process instances, online monitoring and handling of exceptions, etc.
[0052] The service-oriented architecture disperses different functional units (referred to as services here) of an application program into different subsystems and links them through the interfaces and contracts defined between these services. The interface is defined in a neutral manner and is independent of the hardware platform, operating system, and programming language for implementing the service. The device of the present invention enables services built in such a system to interact in a unified and general way, realizing the choreography combination and dynamic assembly between services.
[0053] The device of the present invention is applicable to adding an interface adaptation layer between a front-end application and a back-end service in a service-oriented architecture. The interface adaptation layer can orchestrate and combine the back-end services to achieve the adaptation between the front-end APP interface and the back-end services. For example, if multiple subsystems directly provide services externally, since they directly provide services to the outside, a front-end application often needs to call the interfaces of multiple subsystems and achieve the orchestration and combination of the services of each subsystem through coding, and the workload of development and debugging is very large. Moreover, the coupling between the front-end and the back-end is too strong. Once the back-end is modified, the maintenance workload is huge. With the rapid growth of business, the back-end services often change frequently. Facing these frequent changes, the system needs to be modified and debugged frequently. Therefore, a good solution is needed. In this scenario, it is particularly suitable to use the device of the present invention, which is specifically used to quickly adapt the interfaces between the front-end and the back-end, reduce the dependence between the front-end and back-end systems, improve the development efficiency, and also improve the stability of the system.
[0054] Figure 5 It is a schematic diagram of an APP interface adaptation system capable of dynamically assembling services according to an embodiment of the present invention. As Figure 5 shown, an APP interface adaptation system 5 capable of dynamically assembling services according to an embodiment of the present invention includes a memory 51 and a processor 52. The memory 51 is used to store instructions, and the processor 52 is configured to execute the APP interface adaptation method capable of dynamically assembling services according to any one of the above according to the instructions.
[0055] The above specific implementation manners do not constitute a limitation to the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. An APP interface adaptation method for dynamically assembling services, characterized in that, Use a process engine to perform interface adaptation between the front-end APP interface and the back-end service interface; Provide the front-end APP interface and accept calls from the front-end APP to start a process instance; According to the process, the process instance calls the back-end service interface and performs conversion and adaptation of interface parameters; Convert and process the processing results of the back-end server and send them to the front-end.
2. The method according to claim 1, characterized in that, It further includes: Conduct system analysis according to business requirements to determine the definition of the front-end APP interface and the corresponding back-end service interface; Create a new process, define the front-end APP interface at the start node of the process, and perform parameter legality verification according to the business requirements; And define the content and format of the return value of the front-end APP interface at the end node of the process, and perform settings for content adaptation and format conversion according to the requirements; create one or more interface call nodes in the process, enter the definition of the back-end service interface, and perform settings for content adaptation and format conversion of the parameters and return values of the back-end service interface; Save the process.
3. The method according to claim 2, characterized in that, Create a branch judgment node in the process.
4. The method according to claim 2, characterized in that, It further includes: Define the version information of the process; and Test, modify, and adjust the process; Publish the process.
5. The method according to claim 1, characterized in that, It further includes: Manage the process and the version information of the process; And Monitor process instances and exceptions.
6. An APP interface adaptation device for dynamically assembling services, characterized in that, For using a process engine to perform interface adaptation between the front-end APP interface and the back-end service interface; It further includes a running module for providing the front-end APP interface and accepting calls from the front-end APP to start a process instance; according to the process, the process instance calls the back-end service interface and performs conversion and adaptation of interface parameters; and converts and processes the processing results of the back-end server and sends them to the front-end.
7. The device according to claim 6, characterized in that, It further includes: An adaptation module for conducting system analysis according to business requirements to determine the definition of the front-end APP interface and the corresponding back-end service interface; Create a new process, define the front-end APP interface at the start node of the process, and perform parameter legality verification according to the business requirements; define the content and format of the return value of the front-end APP interface at the end node of the process, and perform settings for content adaptation and format conversion according to the requirements; create one or more interface call nodes in the process, enter the definition of the back-end service interface, and perform settings for content adaptation and format conversion of the parameters and return values of the back-end service interface; and save the process.
8. The device according to claim 7, characterized in that, The adaptation module is further used to create a branch judgment node in the process.
9. The device according to claim 7, characterized in that, The adaptation module is further used to define the version information of the process; test, modify, and adjust the process; and publish the process.
10. The device according to claim 6, characterized in that, It further includes a management module for managing the process and the version information of the process; and monitoring process instances and exceptions.
11. An electronic device, characterized in that, It includes: One or more processors; A storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-5.
12. A computer-readable medium having a computer program stored thereon, characterized in that, When the described program is executed by a processor, it implements the method according to any one of claims 1-5.
Citation Information
Patent Citations
Visual business process design method
CN102915476A
Diversified business flow creating method
CN105787630A
Method and system for automated handling of resolvable and non-resolvable errors in execution of system management flows consisting of system management tasks
US7840857B2
Process engine achieving method and system in service process
CN104281906A