CN114675821A - Service standardization system and method based on low codes - Google Patents

Service standardization system and method based on low codes Download PDF

Info

Publication number
CN114675821A
CN114675821A CN202210578233.4A CN202210578233A CN114675821A CN 114675821 A CN114675821 A CN 114675821A CN 202210578233 A CN202210578233 A CN 202210578233A CN 114675821 A CN114675821 A CN 114675821A
Authority
CN
China
Prior art keywords
message
service
conversion
attribute
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210578233.4A
Other languages
Chinese (zh)
Other versions
CN114675821B (en
Inventor
何晓军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Whale Cloud Technology Co Ltd
Original Assignee
Whale Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Whale Cloud Technology Co Ltd filed Critical Whale Cloud Technology Co Ltd
Priority to CN202210578233.4A priority Critical patent/CN114675821B/en
Publication of CN114675821A publication Critical patent/CN114675821A/en
Application granted granted Critical
Publication of CN114675821B publication Critical patent/CN114675821B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Communication Control (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a service standardization system and method based on low code, the system includes configuration management module and execution engine module; the configuration management module comprises a service information configuration module and a message conversion module; the execution engine module comprises a service connection module, a message protocol conversion module and a message content conversion module. The service standardization method based on low codes can effectively solve the technical stack conversion through the service connector of the preset technical stack, the service standardization method can realize the message content conversion as required without coding or a small amount of codes through the message protocol conversion and the message conversion, can save the cost of a large amount of technical stack customization development and message conversion customization development, can quickly access different technical stacks, can quickly use and open related services, solves the problem of integrated butt joint of IT applications between enterprises or in the enterprises, solves the problem of interface opening and use, and realizes the quick support of enterprise services.

Description

Service standardization system and method based on low codes
Technical Field
The invention relates to the technical field of software development, in particular to a service standardization system and method based on low codes.
Background
With the development of cloud computing technology, cloud native technology and distributed technology, the IT architecture of the enterprise is promoted to continuously evolve. Under the technical change stream, the IT systems of different enterprises have larger architecture difference, even the architecture difference of different application systems of one enterprise is larger, so that the integrated docking of the IT systems of different enterprises or the integrated docking of the IT applications in the enterprises needs to be greatly customized and developed, the integrated docking cost is high, and the business development and the business operation condition of the enterprises are indirectly influenced. Namely, the prior art mainly has the following problems:
1) due to the differentiation of the technical architecture, the IT system integration and docking of different enterprises need to be developed in a customized adaptive manner by a technical stack: different applications need to be adapted to the technology stack, and are repeatedly put into development. 2) The interface is open and the use cost is high: interface provider needs to make a large amount of customizations to meet the requirements of interface message content; interface users also need to make a large amount of customizations to convert the interface messages into a format required by the service; the repeated investment of each application leads to high business development cost of enterprises.
Although the enterprise can adopt a uniform HTTP technology for relieving to a certain extent during enterprise integration, the enterprise technology architecture difference is converted into an HTTP technology stack and customized development is required. Even if the HTTP protocol is adopted, the differentiation of the messages causes the opening of the interface and high use cost. However, some technologies can perform technology stack adaptation currently, for example, the API gateway technology can access services of different technology stacks of HTTP, Dubbo, and SpringCloud. Only if the API gateway platform needs to be accessed, generally, the number of related modules is large, a lot of resources are occupied when the API gateway platform is deployed, and the cost is high for small enterprises.
Even if the API gateway technology is adopted, the interface is open and the use cost is high, and in order to adapt to the message protocol and the conversion content, the application needs to be customized and developed for a large amount of message conversion and the like, so that the cost of integrating and butting with external services is high. And each application needs to be converted similarly when being integrated and butted with the external service so as to meet the application scene requirement of the application, which directly results in a large amount of repeated investment.
An effective solution to the problems in the related art has not been proposed yet.
Disclosure of Invention
The present invention provides a service standardization system and method based on low codes, aiming at the problems in the related art, so as to overcome the technical problems in the prior art.
Therefore, the invention adopts the following specific technical scheme:
according to one aspect of the invention, a low-code-based service standardization system is provided, which comprises a configuration management module and an execution engine module;
the configuration management module comprises a service information configuration module and a message conversion module;
the execution engine module comprises a service connection module, a message protocol conversion module and a message content conversion module;
the service information configuration module is used for providing service basic information configuration, standard service access information and original service access information;
the message conversion module is used for providing conversion configuration of standardized message content and original service message information;
the service connection module is used for calling services of different technology stacks, shielding the differentiation of the technical architecture and only paying attention to the HTTP technology stack for a user;
the message protocol conversion module is used for meeting the requirements of application use and open service and standardizing the request and response message protocol of the service into JSON/XML;
the message content conversion module is used for providing message structure conversion, message content attribute value conversion and custom message content conversion, and solving the requirements of different service scenes under different applications.
Further, the services of the different technology stacks include micro-services of HTTP, Dubbo, gRPC, SpringCloud, and SOAP.
Furthermore, the message protocol conversion module provides eight message protocol conversion functions to realize quick conversion of a request message protocol and a response message protocol, and provides a custom script extension mode to realize personalized message conversion.
Further, the conversion of the request message protocol comprises XML-to-JSON conversion, JSON-to-object conversion, JSON-to-Raw conversion and custom scripts;
the conversion of the response message protocol comprises XML to JSON, Raw to JSON, object to JSON, JSON to XML and custom script.
Further, the message protocol conversion in the message protocol conversion module is to process according to the standardized service message protocol configured by the standardized service and the type of the original service message protocol, and convert the request message protocol from the standardized service message protocol to the original service message protocol before calling the original service; and after the original service response is obtained, converting the original service message protocol into a standard service protocol.
Further, the message structure conversion is used for converting a horizontal table into a vertical table, converting a vertical table into a horizontal table, JSON expansion and array conversion arrays;
the message content attribute value conversion is used for assigning original values, assigning constants, mapping enumerated values, generating primary key IDs, JSON compression and converting date and time formats;
and the custom message content conversion is used for adding a custom converter to the conversion engine, and value conversion is carried out according to the custom converter when the value is generated.
According to another aspect of the present invention, there is provided a low-code based service standardization method including the steps of:
s1, creating a standardized service, and selecting a technology stack, a message protocol, a standardized technology stack and a standardized message protocol;
s2, importing access information of standardized service and access information of original service in a visual interface;
s3, converting and configuring the standardized service request and the response message content on the visual interface, and verifying the configuration;
and S4, testing the standardized service through an API testing tool or a visual interface, binding the execution engine module of the standardized service with the relevant configuration of the service, and performing complete message protocol conversion, message content conversion and service call.
Further, the step of performing standardized service request and response message content conversion configuration on the visual interface in S3, and performing configuration verification includes the following steps:
s31, creating request message content conversion, providing message structure, message content attribute value and custom message content conversion;
s32, verifying the request message configuration, modifying the sample request message, checking the converted request message, and determining whether the request message configuration is as expected;
s33, creating response message content conversion, providing message content structure mapping, message content attribute value mapping and self-defined script value mapping;
s34, verifying the response message configuration, modifying the response message sample, checking the converted response message, and determining whether the response message configuration is as expected.
Further, the step of testing the standardized service through the API testing tool or the visual interface in S4, and binding the execution engine module of the standardized service with the relevant configuration of the service, and performing complete message protocol conversion, message content conversion, and service invocation includes the following steps:
s41, the execution engine module creates the calling context, and the protocol, service environment, access and reference definition and message conversion information of the service are established in the context;
s42, according to the context information, taking the request message content conversion rule to perform the request message content conversion;
s43, determining an original service technology stack according to the context, determining an original service message according to the context information, simultaneously requesting the message to be converted, creating an actuator of the original service technology stack, and calling corresponding service;
s44, acquiring message protocols of the original service and the standardized service according to the context, and calling corresponding message protocol conversion capability;
s45, according to the service context, obtaining the message content conversion configuration, and calling the response message content conversion;
and S46, returning the target message response after message conversion.
Further, the message content conversion includes the following steps:
converting the target message into an object, wherein the object is a nested object and comprises object basic information, an object lower attribute list, an object lower sub-object list and a lower object array list;
recursively analyzing all the sub-objects and sub-object arrays below the parent object from the parent object until the object or the object array has no lower-layer sub-objects and lower-layer sub-object arrays;
if the object is a leaf object, analyzing whether the object has a message structure conversion rule for converting a longitudinal table into a transverse table, converting the object into the object and expanding a target message, and if so, performing structure conversion and associated attribute conversion; analyzing the unconverted attributes to convert the attribute values one by one;
message structure conversion: the vertical table is transferred to the horizontal table, and if no correlation attribute exists, the vertical table is automatically transferred to be the object automatic attribute; if the attribute configuration exists, searching the associated attribute value mapping and converting the corresponding attribute; object-to-object, if there is no associated attribute, then adding the source object attribute to the target object attribute list; if the attribute configuration exists, searching the associated attribute value mapping and converting the corresponding attribute value; when the target message is expanded, the expanded object is used as a converted object;
and (3) attribute value mapping: analyzing the unmapped object attribute, and mapping the attribute value according to the configured conversion rule;
if the leaf object array is the leaf object array, analyzing whether a plurality of arrays are converted into the array, and whether the transverse table is converted into the longitudinal table type message structure conversion is carried out on the object array, and if so, carrying out processing conversion and correlation attribute conversion; analyzing the unconverted attributes to convert the attribute values one by one;
message structure conversion: converting the array into an array, and directly converting the source array into a target array if no associated attribute exists; if the associated attribute exists, only mapping the associated attribute; converting the horizontal table into the vertical table, and converting all attributes of the horizontal table into array objects if no associated attribute exists; if the correlation attributes exist, only the correlation attributes are mapped to the array;
and (3) attribute value mapping: analyzing the unmapped attributes, and mapping attribute values according to the configured conversion rule;
and returning the converted target message after all the sub-objects and the sub-object arrays are recursed.
The invention has the beneficial effects that: the service standardization method based on low codes can effectively solve the technical stack conversion through the service connector of the preset technical stack, and the service standardization method can realize the conversion of message contents as required in a mode of no coding or a small amount of codes through message protocol conversion and message conversion. The invention can be independently deployed and can be reused in an application system as an SDK, thereby saving a large amount of cost of technology stack customization development and message conversion customization development, being capable of rapidly accessing different technology stacks, rapidly using and opening related services, solving the problem of integrated docking of IT applications between enterprises or in enterprises, solving the problem of interface opening and using and realizing rapid support of enterprise services.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a block diagram of a low code based service standardization system according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a message content conversion module in a low-code based service standardization system according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a low-code based service standardization method according to an embodiment of the present invention.
In the figure:
1. configuring a management module; 11. a service information configuration module; 12. a message conversion module; 2. an execution engine module; 21. a service connection module; 22. a message protocol conversion module; 23. and a message content conversion module.
Detailed Description
For further explanation of the various embodiments, the drawings which form a part of the disclosure and which are incorporated in and constitute a part of this specification, illustrate embodiments and, together with the description, serve to explain the principles of operation of the embodiments, and to enable one skilled in the art to understand the embodiments and advantages of the disclosure for reference and without scale, wherein elements are not shown in the drawings and like reference numerals are used to refer to like elements generally.
According to the embodiment of the invention, a service standardization system and method based on low codes are provided.
The abbreviations involved in the present invention are explained as follows:
HTTP: http (hypertext Transport protocol) hypertext transfer protocol is a request and response based, stateless, application layer protocol, often based on TCP/IP protocol to transfer data, and is the most widely used network protocol on the internet, and all WWW files must comply with this standard.
Dubbo: dubbo is a high-performance, lightweight, open source Java RPC framework of the open source of arbiba that provides three core capabilities: interface-oriented remote method invocation, intelligent fault tolerance and load balancing, and automatic registration and discovery of services. Dubbo provides Java, go, erlang three language service management capabilities.
Spring cloud: the SpringCloud is an open source microservice architecture toolkit, and includes service discovery registration, configuration center, message bus, load balancing, circuit breaker, data monitoring, and the like. The method uses the Spring Boot style for repackaging and shielding the complex configuration and implementation principle, and finally leaves a set of distributed system development toolkit which is simple and easy to understand, deploy and maintain for developers.
gRPC: the gRPC is a multi-language micro-service framework open to Google, and the gRPC can use a protocol buffer as its interface to define the language and underlying message exchange format. In a gRPC, a client application can invoke methods directly on a server application on another computer as if it were a local object, making it easier for you to create distributed applications and services. gRPC provides many languages access capability of C + +, C #, Dart, Go, Java, PHP, Ruby, Python, Objective-C, Node, Kotlin.
SOAP: soap (simple Object Access protocol) is a simple Object Access protocol; is a lightweight, simple, XML (a subset of the standard universal markup language) based protocol designed to exchange structured and solidified information on the WEB.
XML: XML (eXtensible Markup language) refers to the extensible Markup language designed to structure, store, and transmit information.
JSON: JSON (JavaScript Object Notification) is a lightweight data exchange format. It stores and represents data in a text format completely independent of the programming language, based on a subset of ECMAScript (JS specification set by the european computer association). The compact and clear hierarchy makes JSON an ideal data exchange language.
Referring now to the drawings and the detailed description, the present invention will be further explained, as shown in fig. 1-2, according to an embodiment of the present invention, there is provided a low-code based service standardization system, which includes a configuration management module 1 and an execution engine module 2;
the configuration management module 1 comprises a service information configuration module 11 and a message conversion module 12;
the execution engine module 2 comprises a service connection module 21, a message protocol conversion module 22 and a message content conversion module 23;
the service information configuration module 11 is configured to provide service basic information configuration, standard service access information, and original service access information;
the message conversion module 12 is configured to provide conversion configuration between standardized message content and original service message information;
the service connection module 21 is used for calling services of different technology stacks, shielding the differentiation of the technical architecture, and only paying attention to the HTTP technology stack for a user;
specifically, the services of the different technology stacks include micro services such as HTTP, Dubbo, gRPC, SpringCloud, SOAP, and the like, and the micro services of the related technology stacks can be called through the service connection module.
The technical stack type of the original service can be configured in the service standardization basic information, the analysis running engine of the standardized service analyzes the technical stack type, the original service is called by combining different technical stack calling modes, and the original service is externally converted into an HTTP technical stack.
The message protocol conversion module 22 is used for meeting the requirements of application use and open service, and standardizing the request and response message protocol of the service into JSON/XML;
due to message differentiation of different service technology stacks, message protocol conversion can provide JSON/XML conversion into a technology stack request message protocol; in order to meet the requirement of service opening, the response message protocol of the technical stack is uniformly converted into JSON/XML.
Specifically, the message protocol conversion module 22 provides eight message protocol conversion functions to realize fast conversion between a request message protocol and a response message protocol, and provides a custom script extension mode to realize personalized message conversion.
The conversion of the request message protocol comprises XML to JSON, JSON to object, JSON to Raw and custom script;
the conversion of the response message protocol comprises XML to JSON, Raw to JSON, object to JSON, JSON to XML and custom script.
The message protocol conversion is to process according to the standard service message protocol and the original service message protocol type configured by the standard service, and convert the request message protocol from the standard service message protocol to the original service message protocol before calling the original service; and after the original service response is obtained, converting the original service message protocol into a standard service protocol.
The message content conversion module 23 is configured to provide message structure conversion, message content attribute value conversion, and custom message content conversion, and solve the requirements of different service scenarios under different applications.
Because the actual APIs of different systems are open to the outside or when an external API is used, the message content needs to be converted according to the requirements, and a large amount of customization and development are needed. The message converter provides a visual configuration capability and a low code capability for one-key conversion of message content. As shown in fig. 2, message conversion provides the following capabilities:
1) message structure conversion:
horizontal table to vertical table: converting part or all leaf nodes under an object into a longitudinal table mode of attribute pairs;
turning the longitudinal table to the transverse table: converting the attribute logarithm group of a longitudinal table into leaf nodes of an object;
JSON expansion: expanding a JSON string into an object;
array conversion array: mapping an array into an array, wherein the attributes of the array object can be selectively assigned to original values or mapped to constants or enumerated values;
2) message content attribute value conversion:
assigning an original value: mapping the original value of the source object attribute to the target object attribute;
constant assignment: setting as a constant;
enumerating value mapping: acquiring a corresponding value according to a configuration enumeration value mapping rule;
primary key ID generation: providing a plurality of ID generation rules;
JSON compression: compressing the information of an object into a JSON string and assigning the JSON string to an attribute;
and (3) converting the date and time format: converting according to a set date and time format;
3) converting the self-defined message content: custom converters can be added to the conversion engine, and values are converted according to the custom converters when the values are generated.
According to another embodiment of the present invention, as shown in fig. 3, there is provided a low-code-based service standardization method, including the steps of:
s1, creating a standardized service, and selecting a technology stack, a message protocol, a standardized technology stack and a standardized message protocol;
s2, importing access information of standardized service and access information of original service in a visual interface;
s3, converting and configuring the standardized service request and the response message content on the visual interface, and verifying the configuration;
wherein, the step of performing standardized service request and response message content conversion configuration on the visual interface in the step S3, and performing configuration verification includes the following steps:
s31, creating request message content conversion, providing message structure, message content attribute value and custom message content conversion;
s32, verifying the request message configuration, modifying the sample request message, checking the converted request message, and determining whether the request message configuration is as expected;
s33, creating response message content conversion, providing message content structure mapping, message content attribute value mapping and self-defined script value mapping;
s34, verifying the response message configuration, modifying the response message sample, checking the converted response message, and determining whether the response message configuration is as expected.
And S4, testing the standardized service through an API testing tool or a visual interface, binding the execution engine module of the standardized service with the relevant configuration of the service, and performing complete message protocol conversion, message content conversion and service call.
Wherein, the step of testing the standardized service through the API test tool or the visual interface in S4, and binding the execution engine module of the standardized service with the relevant configuration of the service, and performing complete message protocol conversion, message content conversion, and service call includes the following steps:
s41, the execution engine module creates the calling context, and the protocol, service environment, access and reference definition and message conversion information of the service are established in the context;
s42, according to the context information, taking the request message content conversion rule to perform the request message content conversion;
s43, determining an original service technology stack according to the context, determining an original service message according to the context information, simultaneously requesting the message for conversion, creating an actuator of the original service technology stack, and calling corresponding services;
s44, acquiring message protocols of the original service and the standardized service according to the context, and calling corresponding message protocol conversion capability;
s45, according to the service context, taking the message content conversion configuration, and calling the response message content conversion;
and S46, returning the target message response after message conversion.
Specifically, the message content conversion includes the following steps:
converting the target message into an object, wherein the object is a nested object and comprises object basic information, an object lower attribute list, an object lower sub-object list and a lower object array list;
recursively analyzing all the sub-objects and sub-object arrays below the parent object from the parent object until the object or the object array has no lower-layer sub-objects and lower-layer sub-object arrays;
if the object is a leaf object, analyzing whether the object has a message structure conversion rule for converting a longitudinal table into a transverse table, converting the object into the object and expanding a target message, and if so, performing structure conversion and associated attribute conversion; analyzing the unconverted attributes to convert the attribute values one by one;
message structure conversion: the vertical table is transferred to the horizontal table, and if no associated attribute exists, the vertical table is automatically transferred to be the object automatic attribute; if the attribute configuration exists, searching the associated attribute value mapping and converting the corresponding attribute; object-to-object, if there is no associated attribute, then adding the source object attribute to the target object attribute list; if the attribute configuration exists, searching the associated attribute value mapping and converting the corresponding attribute value; when the target message is expanded, the expanded object is used as a converted object;
and (3) attribute value mapping: analyzing the unmapped object attribute, and mapping the attribute value according to the configured conversion rule;
if the leaf object array is the leaf object array, analyzing whether a plurality of arrays are converted into the array, and whether the transverse table is converted into the longitudinal table type message structure conversion is carried out on the object array, and if so, carrying out processing conversion and correlation attribute conversion; analyzing the unconverted attributes to convert the attribute values one by one;
message structure conversion: converting the array into an array, and directly converting the source array into a target array if no associated attribute exists; if the associated attribute exists, only mapping the associated attribute; converting the horizontal table into the vertical table, and converting all attributes of the horizontal table into array objects if no associated attribute exists; if the correlation attributes exist, only the correlation attributes are mapped to the array;
and (3) attribute value mapping: analyzing the unmapped attributes, and mapping attribute values according to the configured conversion rule;
and returning the converted target message after all the sub-objects and the sub-object arrays are recursed.
In order to facilitate understanding of the above technical solutions of the present invention, a specific embodiment of the service standardization method of the present invention is described in detail below.
Standardizing a SOAP service into an HTTP service, and returning a JSON message; the service standardization process is as follows:
s1, creating a standardized service, selecting a technical stack SOAP, wherein the message protocol is XML, and the standardized technical stack is HTTP + the message protocol is JSON;
s2, importing access participation of standardized services and access participation of SOAP services in a visual interface;
s3, converting and configuring the standardized service request and the response message content on the visual interface, and verifying the configuration;
s4, testing the standardized service through an API testing tool or a visual interface, binding service configuration by an execution engine module of the standardized service, and performing complete message protocol conversion, message content conversion and service call;
wherein, S3 comprises request message content conversion configuration, request configuration verification, response message content conversion configuration and response configuration verification; the message content conversion and verification is as follows:
s31, creating a request message content conversion, and providing message content conversion such as message structure, message attribute value, self-definition and the like;
s32, request message configuration verification; modifying the sample request message, checking the converted request message, and determining whether the configuration of the request message is as expected;
s33, creating response message content conversion, providing message content structure mapping, message content attribute value mapping and self-defined script value mapping;
s34, verifying the configuration of the response message; modifying the response message sample, checking the converted response message, and determining whether the configuration of the response message is as expected;
in the invention, the execution engine module of S4 comprises loading service configuration, JSON request message content conversion, JSON request message conversion to XML and call SOAP service, SOAP response message protocol conversion from XML to JSON, response message content conversion, and JSON message return; the execution engine carries out analysis operation of service standardization;
s41, the analysis running engine creates the calling context, and the protocol, the service environment, the access and reference definition, the message conversion information and the like of the service are established in the context; the context source code is defined as follows:
package com.iwhalecloud.bassc.rhin;
public class RuntimeEngineContext {
……
/' request
private AbstractRuntimeRequest request;
V. service capability id
private Long busiServiceId;
V. service capability coding +
private String busiServiceCode;
V environmental information · ° s · ° environment information · ° s · ° environment information · ° s · ° environment information · ° s · ° s ·
Map<Long, EnvConf> EnvConfMap;
V. Business object instance key is Business object ID-
private ConcurrentHashMap<Long, ObjectInst> objectInstMap;
Object id/. executed
private Long objId;
Context of engine execution
private String env;
Whether or not it is a test pattern
private boolean testMode;
V. executed business object +
private ExecBusiObjectDTO busiObject;
V all mapping information of this execution
private List<ExecParamMappingDTO> paramMappings;
V. business object information +
private Map<Long, ExecParamObjectDTO> paramObjects;
V. Attribute Specification information +
private Map<Long, ExecAttrSpecDTO> attrSpecs;
……
}
S42, according to the context information, taking the request message content conversion rule to perform the request message content conversion;
s43, according to context, the original service technology stack is SOAP, according to context information, the original service message is determined to be XML, the request message is converted, then a SOAP actuator is created, and SOAP service is called; part of the source code for the service connection is as follows:
v. technology Stack Call service connection configured according to Standard service >
public Map<String, Object> handle(RuntimeEngineContext context , HttpParams request) {
……
V. acquisition service connector class
ExecBusiObjectDTO busiObjectDTO = context.getbusiObjectDTO();
String className = busiObjectDTO.getClassName();
V/get service connector correlation template attributes
List<ExecAdapterAttrDTO> requiredAttrInst = busiObjectDTO.getAdapterAttrs();
// obtaining Environment ID
Long exeEnvId = busiObjectDTO.getExeEnvId();
// get running Environment List
Map<Long, Platform> ExeEnv = context.getExeEnv();
Map<String, ExecEnvCfgDTO> exeEnvConf = getEnvConfigs(exeEnvId, ExeEnv);
V call specific service connector: HTTP, SOAP, Dubbo, gRPC … …
executor.config(requiredAttrInst);
IStandardServiceExecutor executor = factory.get(className);
Response = executor.execute(executor.getConfig(), request, exeEnvConf);
……
}
S44, acquiring message protocols of the original service and the standardized service according to the context, and calling the message protocol conversion capability of XML conversion JSON;
s45, according to the service context, obtaining the message content conversion configuration, and calling the response message content conversion;
s46, returning JSON response after message conversion;
in the invention, both S42 and S45 need to call message content conversion, and the message content conversion comprises the following steps:
step A1, converting the target message JSON into an object, wherein the object is a nested object and comprises object basic information, an object lower attribute list, an object lower sub-object list and a lower object array list;
step A2, from the father object, recursively analyzing all the sub-objects and sub-object arrays under the father object until the object or object array has no lower-layer sub-object and sub-object arrays;
step A3, if the object is a leaf object, analyzing whether the object has the message structure conversion rules of vertical table to horizontal table, object to object, JSON expansion, and the like, if so, performing structure conversion and associated attribute conversion; analyzing the unconverted attributes to convert the attribute values one by one;
message structure conversion: the vertical table is transferred to the horizontal table, and if no correlation attribute exists, the vertical table is automatically transferred to be the object automatic attribute; if the attribute configuration exists, searching the associated attribute value mapping and converting the corresponding attribute. Object-to-object, if there is no associated attribute, then adding the source object attribute to the target object attribute list; if the attribute configuration exists, searching the associated attribute value mapping and converting the corresponding attribute value. When JSON expands, the expanded object is used as a converted object.
And (3) attribute value mapping: analyzing the unmapped object attribute, and mapping the attribute value according to the configured conversion rule.
Step A4, if the leaf object array is obtained, analyzing whether the object array has array-to-array and horizontal-to-vertical-table message structure conversion, if yes, performing processing conversion and correlation attribute conversion; analyzing the unconverted attributes to convert the attribute values one by one;
message structure conversion: converting the array into an array, and directly converting the source array into a target array if no correlation attribute exists; if there is an associated attribute, then only the associated attribute is mapped. Converting the horizontal table into the vertical table, and converting all attributes of the horizontal table into array objects if no associated attribute exists; if there is an associated attribute, only the associated attribute is mapped to the array.
Mapping the attribute value: analyzing the unmapped attributes, and carrying out value mapping according to the configured conversion rule.
Step A5, returning the converted JSON message after all the child objects and the child object arrays are recursed;
mapping the transform-dependent source code as follows:
package com.iwhalecloud.bassc.rhin.runtime.core.convert;
v. parameter conversion, parameter conversion
public Map<String, Object> contextConvert(long long destServiceObjId,Map<String, Object> ParamMap, List<ExecParamMappingDTO> paramMappings){
……
V. get target traffic object +
ServiceObject resultObj = paramMappings.genServiceObj(destServiceObjId);
V. target object +
Map<String, Object> destParamMap = Objectconvert(resultObj,ParamMap, paramMappings);
……
}
In summary, with the above technical solutions of the present invention, the service standardization method based on low codes can effectively solve the technology stack conversion by presetting the service connector of the technology stack, and the service standardization method can realize the message content conversion as required by no coding or a small amount of codes through the message protocol conversion and the message conversion. The invention can be independently deployed and can be reused in an application system as an SDK, thereby saving a large amount of cost of technology stack customization development and message conversion customization development, being capable of rapidly accessing different technology stacks, rapidly using and opening related services, solving the problem of integrated docking of IT applications between enterprises or in enterprises, solving the problem of interface opening and using and realizing rapid support of enterprise services.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A low code based service standardisation system characterised in that it comprises a configuration management module (1) and an execution engine module (2);
the configuration management module (1) comprises a service information configuration module (11) and a message conversion module (12);
the execution engine module (2) comprises a service connection module (21), a message protocol conversion module (22) and a message content conversion module (23);
the service information configuration module (11) is used for providing service basic information configuration, standard service access information and original service access information;
the message conversion module (12) is used for providing conversion configuration of standardized message content and original service message information;
the service connection module (21) is used for calling services of different technology stacks, shielding the differentiation of the technical architecture and only paying attention to the HTTP technology stack for a user;
the message protocol conversion module (22) is used for meeting the requirements of application use and open service and standardizing the request and response message protocol of the service into JSON/XML;
the message content conversion module (23) is used for providing message structure conversion, message content attribute value conversion and user-defined message content conversion, and solving the requirements of different service scenes under different applications.
2. The system of claim 1, wherein the services of the different technology stacks comprise micro services of HTTP, Dubbo, gRPC, SpringCloud, and SOAP.
3. The low-code-based service standardization system according to claim 1, wherein the message protocol conversion module (22) provides eight message protocol conversion functions to realize fast conversion between request message protocol and response message protocol, and provides a custom script extension mode to realize personalized message conversion.
4. The low-code-based service standardization system according to claim 3, wherein the conversion of the request message protocol comprises XML-to-JSON, JSON-to-object, JSON-to-Raw, and custom scripts;
the conversion of the response message protocol comprises XML to JSON, Raw to JSON, object to JSON, JSON to XML and custom script.
5. The low-code-based service standardization system according to claim 4, wherein the message protocol conversion in the message protocol conversion module (22) is performed according to a standardized service message protocol configured by a standardized service and an original service message protocol type, and the request message protocol is converted from the standardized service message protocol to the original service message protocol before the original service is called; and after the original service response is obtained, converting the original service message protocol into a standard service protocol.
6. The low-code based service standardization system according to claim 1, wherein the message structure transformation is used for horizontal table to vertical table, vertical table to horizontal table, JSON expansion and array transformation arrays;
the message content attribute value conversion is used for assigning original values, assigning constants, enumerating value mapping, generating primary key IDs, JSON compression and date-time format conversion;
and the custom message content conversion is used for adding a custom converter to the conversion engine, and value conversion is carried out according to the custom converter when the value is generated.
7. A service standardization method of the low-code based service standardization system according to any one of claims 1 to 6, characterized in that the service standardization method comprises the steps of:
s1, creating a standardized service, and selecting a technology stack, a message protocol, a standardized technology stack and a standardized message protocol;
s2, importing access information of standardized service and access information of original service in a visual interface;
s3, converting and configuring the standardized service request and the response message content on the visual interface, and verifying the configuration;
and S4, testing the standardized service through an API testing tool or a visual interface, binding the execution engine module of the standardized service with the relevant configuration of the service, and performing complete message protocol conversion, message content conversion and service call.
8. The method according to claim 7, wherein the step of performing standardized service request and response message content transformation configuration on the visual interface in S3, and performing configuration verification includes the following steps:
s31, creating request message content conversion, providing message structure, message content attribute value and custom message content conversion;
s32, verifying the request message configuration, modifying the sample request message, checking the converted request message, and determining whether the request message configuration is as expected;
s33, creating response message content conversion, providing message content structure mapping, message content attribute value mapping and self-defined script value mapping;
s34, verifying the response message configuration, modifying the response message sample, checking the converted response message, and determining whether the response message configuration is as expected.
9. The method of claim 7, wherein the step of testing the standardized service through the API testing tool or the visual interface and binding the execution engine module of the standardized service to the relevant configuration of the service in S4, and performing the complete message protocol conversion, the message content conversion and the service call includes the following steps:
s41, the execution engine module creates the calling context, and the protocol, service environment, access and reference definition and message conversion information of the service are established in the context;
s42, according to the context information, taking the request message content conversion rule to perform the request message content conversion;
s43, determining an original service technology stack according to the context, determining an original service message according to the context information, simultaneously requesting the message to be converted, creating an actuator of the original service technology stack, and calling corresponding service;
s44, acquiring message protocols of the original service and the standardized service according to the context, and calling corresponding message protocol conversion capability;
s45, according to the service context, taking the message content conversion configuration, and calling the response message content conversion;
and S46, returning the target message response after message conversion.
10. The method of claim 9, wherein the message content conversion comprises the steps of:
converting the target message into an object, wherein the object is a nested object and comprises object basic information, an object lower attribute list, an object lower sub-object list and a lower object array list;
recursively analyzing all the sub-objects and sub-object arrays below the parent object from the parent object until the object or the object array has no lower-layer sub-objects and lower-layer sub-object arrays;
if the object is a leaf object, analyzing whether the object has a message structure conversion rule for converting a longitudinal table into a transverse table, converting the object into the object and expanding a target message, and if so, performing structure conversion and associated attribute conversion; analyzing the unconverted attributes to convert the attribute values one by one;
message structure conversion: the vertical table is transferred to the horizontal table, and if no associated attribute exists, the vertical table is automatically transferred to be the object automatic attribute; if the attribute configuration exists, searching the associated attribute value mapping and converting the corresponding attribute; object-to-object, if there is no associated attribute, then adding the source object attribute to the target object attribute list; if the attribute configuration exists, searching the associated attribute value mapping and converting the corresponding attribute value; when the target message is expanded, the expanded object is used as a converted object;
and (3) attribute value mapping: analyzing the unmapped object attribute, and mapping the attribute value according to the configured conversion rule;
if the leaf object array is the leaf object array, analyzing whether a plurality of arrays are converted into the array, and whether the transverse table is converted into the longitudinal table type message structure conversion is carried out on the object array, and if so, carrying out processing conversion and correlation attribute conversion; analyzing the unconverted attributes to convert the attribute values one by one;
message structure conversion: converting the array into an array, and directly converting the source array into a target array if no associated attribute exists; if the associated attribute exists, only mapping the associated attribute; converting the horizontal table into the vertical table, and converting all attributes of the horizontal table into array objects if no associated attribute exists; if the correlation attributes exist, only the correlation attributes are mapped to the array;
and (3) attribute value mapping: analyzing the unmapped attributes, and mapping attribute values according to the configured conversion rule;
and returning the converted target message after all the sub-objects and the sub-object arrays are recursed.
CN202210578233.4A 2022-05-26 2022-05-26 Service standardization system and method based on low codes Active CN114675821B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210578233.4A CN114675821B (en) 2022-05-26 2022-05-26 Service standardization system and method based on low codes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210578233.4A CN114675821B (en) 2022-05-26 2022-05-26 Service standardization system and method based on low codes

Publications (2)

Publication Number Publication Date
CN114675821A true CN114675821A (en) 2022-06-28
CN114675821B CN114675821B (en) 2022-09-06

Family

ID=82079836

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210578233.4A Active CN114675821B (en) 2022-05-26 2022-05-26 Service standardization system and method based on low codes

Country Status (1)

Country Link
CN (1) CN114675821B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115840778A (en) * 2023-02-20 2023-03-24 北京百特云享科技有限公司 Model-based visual configuration connector and connection method thereof

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112507005A (en) * 2019-09-16 2021-03-16 北京京东振世信息技术有限公司 Method and device for processing message
CN113344354A (en) * 2021-05-28 2021-09-03 广东电网有限责任公司广州供电局 Data standardization processing system and method for application scene of smart power grid
CN113486629A (en) * 2020-12-31 2021-10-08 易百信息技术(上海)股份有限公司 Application method and system for enterprise service bus of docking third-party system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112507005A (en) * 2019-09-16 2021-03-16 北京京东振世信息技术有限公司 Method and device for processing message
CN113486629A (en) * 2020-12-31 2021-10-08 易百信息技术(上海)股份有限公司 Application method and system for enterprise service bus of docking third-party system
CN113344354A (en) * 2021-05-28 2021-09-03 广东电网有限责任公司广州供电局 Data standardization processing system and method for application scene of smart power grid

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115840778A (en) * 2023-02-20 2023-03-24 北京百特云享科技有限公司 Model-based visual configuration connector and connection method thereof

Also Published As

Publication number Publication date
CN114675821B (en) 2022-09-06

Similar Documents

Publication Publication Date Title
JP6912469B2 (en) Access request conversion method and device
CN106776313B (en) Method and device for simulating service and centralized management platform
US7587447B2 (en) Systems, methods and computer programs for implementing and accessing web services
CN100536479C (en) Service establishing, executing, mapping system and method
US20030009539A1 (en) Distributed object middleware connection method
Wu et al. OneM2M-based IoT protocol integration
US20200293541A1 (en) Methods, systems, and computer readable media for data translation using a representational state transfer (rest) application programming interface (api)
KR101602099B1 (en) System for Service inter-working based REST in Internet of Things and Method thereof
CN108446105B (en) Lightweight API Server development framework and development method
US8621041B2 (en) Message oriented construction of web services
CN114675821B (en) Service standardization system and method based on low codes
US8972487B2 (en) Automated framework for testing enterprise services consumer technologies
CN113179269B (en) Protocol data analysis method, system and medium based on Internet of things
US7392060B2 (en) Mobile exchange infrastructure
CN101616027A (en) Service creation, execution, mapped system and method
US10402307B2 (en) System and method for providing runtime tracing for a web-based client accessing a transactional middleware platform using an extension interface
CN114285859B (en) Data processing method, device, equipment and storage medium for middle layer block chain service
CN114185695A (en) Loosely-coupled data processing method and system based on industrial APP micro-service
CN117270833B (en) Service calling and issuing method, medium and computer equipment
Johansson et al. Comparative Study of REST and gRPC for Microservices in Established Software Architectures
CN112596929B (en) Micro-service registration and calling method based on command event conversion and related device
CN117435177B (en) Application program interface construction method, system, equipment and storage medium
CN117632445B (en) Request processing method and device, task execution method and device
CN115134397A (en) Method, device and equipment for realizing self-adaptive transaction baffle platform
CN118312151A (en) Service calling and issuing method, medium and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant