CN113791766B - Method for combining data interfaces, electronic device and readable storage medium - Google Patents
Method for combining data interfaces, electronic device and readable storage medium Download PDFInfo
- Publication number
- CN113791766B CN113791766B CN202111087327.3A CN202111087327A CN113791766B CN 113791766 B CN113791766 B CN 113791766B CN 202111087327 A CN202111087327 A CN 202111087327A CN 113791766 B CN113791766 B CN 113791766B
- Authority
- CN
- China
- Prior art keywords
- interface
- information
- combined
- development
- output parameter
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 238000003860 storage Methods 0.000 title claims abstract description 12
- 238000011161 development Methods 0.000 claims abstract description 81
- 230000015654 memory Effects 0.000 claims description 33
- 238000005457 optimization Methods 0.000 claims description 19
- 238000012795 verification Methods 0.000 claims description 8
- 238000005520 cutting process Methods 0.000 claims description 2
- 238000001914 filtration Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application relates to the field of computer software, and discloses a method for combining data interfaces, electronic equipment and a readable storage medium. The method for combining the data interfaces is used for the electronic equipment comprising the server side and the service side, and by providing the configured interface combination interface at the service side, service personnel or external users can set development configuration items in a simple and convenient mode and generate combination interface development information, and then the server side determines output parameter information of the combination open interface according to the received combination interface development information, so that the service personnel or external users serving as non-professional developers can realize development of the combination open interface without participation of professional developers, the development period of the combination open interface can be shortened, the development efficiency of the combination open interface is improved, the customer requirements of the combination open interface are responded in time, and further the customer satisfaction is improved.
Description
Technical Field
The present application relates to the field of computer software, and in particular, to a method for combining data interfaces, an electronic device, and a readable storage medium.
Background
Currently, an Open interface is widely applied to internet application development, namely an Open application programming interface (Open API, open Application Programming Interface), and a brand new thinking mode and development mode are brought to developers of the internet application by the Open interface, so that the information intercommunication concept is penetrated to the whole internet industry, and more developers can participate in the front edge of the internet application development.
The open interface is typically provided by an internet application provider, which packages the services or technical capabilities that can be provided by the internet application into a series of computer-recognizable data interfaces, such as a map service interface, a search service interface, etc., and provides these data interfaces to third-party developers for use, who access the open interface to obtain corresponding data according to their own project needs.
Because the requirements of third party developers using the open interface are various, the open interface provided by the internet application provider often cannot completely meet the corresponding requirements, and the development of a new open interface by the internet application provider usually needs to be performed in a software coding mode, so that the development period of the new open interface is long, and the timeliness requirement of the open interface is difficult to meet.
Disclosure of Invention
The embodiment of the application provides a method for combining data interfaces, electronic equipment and a readable storage medium, which are used for solving the problems that the development period of an open interface is long and the customer needs cannot be responded in time in the prior art.
In a first aspect, an embodiment of the present application provides a method for combining data interfaces, where the method is used for an electronic device including a server side and a service side, and the method includes:
the service end receives and displays an interface combination interface from the server end, wherein the interface combination interface comprises a plurality of development configuration items;
the service end receives setting operation from a user on an interface combination interface, wherein the setting operation is used for setting metadata of a plurality of reference interfaces and a combination open interface to be used, and generating combination interface development information based on the setting operation;
the server receives the combined interface development information;
and the server side determines output parameter information of the combined open interface according to the combined interface development information.
In a possible implementation of the first aspect, the method further includes: the combined interface development information comprises at least one of the following: reference interface information, assembly information, and optimization information.
In a possible implementation manner of the first aspect, the determining, by the server, output parameter information of the combined open interface according to the combined interface development information includes:
the server side obtains output parameter information of a corresponding reference interface according to the reference interface information in the combined interface development information;
the server combines the output parameter information of the multiple reference interfaces into the output parameter information of the combined open interface according to the assembly information in the combined interface development information;
and the server adjusts the output parameter information of the combined open interface according to the optimization information in the development information of the combined interface.
In a possible implementation of the first aspect, the optimization information includes at least one of: clipping information and add field information.
In one possible implementation manner of the first aspect, the adjusting, by the server, output parameter information of the combined open interface according to optimization information in the combined interface development information includes:
and the server side cuts the output parameter information of the combined open interface according to the cutting information in the optimization information.
In one possible implementation manner of the first aspect, the adjusting, by the server, output parameter information of the combined open interface according to optimization information in the combined interface development information includes:
and the server adds corresponding fields in the output parameter information of the combined open interface according to the added field information in the optimization information.
In a possible implementation of the first aspect, the method further includes:
and the server side checks the input parameter information of the combined open interface according to the check information of the input parameters in the assembly information.
In a possible implementation of the first aspect, the method further includes:
and under the condition that the verification result of the input parameter information of the combined open interface does not meet the preset condition, the server side determines a predefined verification error identifier and verification error information.
In a second aspect, embodiments of the present application provide an electronic device, including:
a memory for storing instructions for execution by one or more processors of the electronic device, an
A processor, one of the processors of an electronic device, for performing the method of combining data interfaces of the first aspect described above and any of the various possible implementations of the first aspect.
In a third aspect, embodiments of the present application provide a readable storage medium having stored thereon instructions that, when executed on an electronic device, cause the electronic device to perform the method of combining data interfaces of the first aspect and any of the various possible implementations of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer program product comprising a computer program/instruction, characterized in that the computer program/instruction, when executed by a processor, implements the method of combining data interfaces of the first aspect and any of the various possible implementations of the first aspect.
According to the method, a service person or an external user can set development configuration items in a simple and convenient mode and generate combined interface development information by providing a configured interface combined interface at the service end, and then the server end determines output parameter information of a combined open interface according to the received combined interface development information, so that the service person or the external user serving as a non-professional developer can develop the combined open interface without participation of the professional developer, the development period of the combined open interface can be shortened, the development efficiency of the combined open interface is improved, customer requirements of the combined open interface are responded timely, and customer satisfaction is improved.
Drawings
FIG. 1 illustrates a scenario diagram of the development and release of a combined open interface, according to some embodiments of the present application.
Fig. 2 illustrates a hardware block diagram of an electronic device, according to some embodiments of the present application.
Fig. 3 illustrates a flow chart of a method of combining data interfaces, according to some embodiments of the present application.
FIG. 4 illustrates a schematic diagram of one example of a reference interface, according to some embodiments of the present application.
Fig. 5 illustrates a schematic diagram of one template example of assembly information, according to some embodiments of the present application.
FIG. 6 illustrates a schematic diagram of one template example of clipping information, according to some embodiments of the present application.
Detailed Description
Illustrative embodiments of the present application include, but are not limited to, methods, electronic devices, and readable storage media for combining data interfaces.
It is to be appreciated that as used herein, the term module may refer to or include an Application Specific Integrated Circuit (ASIC), an electronic circuit, a processor (shared, dedicated, or group) and/or memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable hardware components that provide the described functionality.
It is to be appreciated that in various embodiments of the present application, the processor may be a microprocessor, a digital signal processor, a microcontroller, or the like, and/or any combination thereof. According to another aspect, the processor may be a single core processor, a multi-core processor, or the like, and/or any combination thereof.
It can be appreciated that the method for combining data interfaces of the present application is applicable to a scenario in which multiple open data interfaces are subjected to secondary combination development.
Embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
FIG. 1 provides a scenario for combinatorial development of open interfaces and external distribution for user access, according to some embodiments of the present application. As shown in fig. 1, a service person 100 develops a combined interface through a data interface combined interface 200, and issues a developed combined open interface to an open interface platform 300, and an interface visitor 400 finds and accesses the combined open interface meeting own requirements through the open interface platform 300 to obtain data returned by the combined open interface.
The business person 100 is typically a person familiar with the business of software projects, and is not a professional software developer, and does not have the capability of combining a plurality of open interfaces into one combined open interface through a software language code, but has the capability of combining a plurality of open interfaces only by setting a plurality of development configuration items after simple training. The service person 100 may set a plurality of development configuration items in the data interface combination interface 200 to obtain a final combined open interface, where the combined open interface is an assembly of the existing open interfaces.
The data interface combination interface 200 provides a combination development environment of an open interface for the service personnel 100, can provide a simple, convenient and configured development interface for the service personnel 100 to develop the combination open interface, and can simplify the development work of the open interface of the service personnel 100. In the data interface combination interface 200, a variety of information required for the service person 100 to develop the open interface is provided in a configurable manner, and may include, but is not limited to, information such as a reference interface to be used and metadata of the combination open interface. For example, the combined interface information may be included, and the combined interface information may include related information of a combined interface to be developed, such as an interface name, an interface description, and the like; and the system can also comprise information of a plurality of existing open interfaces required to be used by the combined interface, wherein the existing open interfaces used by the combined interface are reference interfaces, for example, the combined interface can reference N existing open interfaces, and the reference interfaces are from the reference interface 1 to the reference interface N. The reference interface may provide the combined interface with corresponding data, for example, output parameter data of the reference data is taken as input parameter data or output parameter data of the combined interface, etc. The service personnel can develop the combined open interface by setting the configuration items corresponding to the information.
In addition, the service person 100 may set assembly information of the combined open interface in the data interface combination interface 200, and the assembly information may be used to describe related data in the interface assembly process, for example, a data type indicating output parameters of the reference interface, whether the output parameter data is allowed to be null, an error code of interface access, an error information of interface access, and the like.
The service personnel 100 can set corresponding clipping information for the combined open interface in the data interface combined interface 200, and remove the data which is obtained from the reference interface and is not required to be output by the combined interface from the output parameters of the combined open interface by setting the clipping information, so that unnecessary data is avoided to be output.
The data interface combination interface 200 also provides the service personnel 100 with a function of adding a field, where the field refers to an output parameter in the combination open interface, and the output parameter in the combination open interface may be an output parameter directly from the reference interface, or a parameter obtained by processing an input parameter and/or an output parameter of the reference interface, or a new parameter directly set by the service personnel 100. Here, the service person 100 may add a plurality of fields, for example, M fields, from adding field 1 to adding field M, as needed. The field that the business person adds can be represented using a Key Value (KV), for example, one added field is "motion": "Big Max Promotion Info" wherein the bond is "motion" and the value is "Big Max Promotion Info".
The open interface platform 300 is configured to issue an open interface, where the open interface may include an existing open interface, or may include a combined open interface developed by the service personnel 100, and after the open interface platform 300 issues the open interface, the interface accessor 400 can access the open interface through issue information of the open interface, where the issue information of the open interface is used to provide related information for accessing the open interface, for example, an access address of the open interface, input parameter information of the open interface, output parameter information of the open interface, and so on.
The interface accessing person 400 is usually a professional software developer, and can access the open interface provided by the open interface platform 300 in its own application through a software language coding mode, provide corresponding data for the input parameters of the open interface, obtain the output parameter data of the open interface, and then use the output parameter data in its own application.
According to the method provided by the technical scheme, the data interface combination interface 200 is provided for the service personnel 100, so that the service personnel 100 can realize the development of the combined open interface through simple configuration development without using a software language coding development mode with high difficulty for the service personnel 100, the development of the combined open interface is simplified, the development efficiency of the combined open interface can be improved, the service personnel 100 can timely respond to the requirements of third party developers, the cooperation with the third party developers is facilitated, and the customer satisfaction is further improved.
Fig. 2 illustrates a block diagram of the hardware architecture of an electronic device 20 for implementing a method of combining data interfaces, according to some embodiments of the present application. In the embodiment shown in fig. 2, the electronic device 20 may include one or more processors 201, system control logic 202 coupled to at least one of the processors 201, system Memory 203 coupled to the system control logic 202, non-Volatile Memory (NVM) 204 coupled to the system control logic 202, and a network interface 206 coupled to the system control logic 202.
In some embodiments, processor 201 may include one or more single-core or multi-core processors. In some embodiments, processor 201 may include any combination of general-purpose and special-purpose processors (e.g., graphics processor, application processor, baseband processor, etc.). In embodiments where the electronic device 20 employs an enhanced Node B (eNB) or radio access network (Radio Access Network, RAN) controller, the processor 201 may be configured to perform various conforming embodiments. For example, the processor 201 may be used to implement a method of combining data interfaces.
In some embodiments, system control logic 202 may include any suitable interface controller to provide any suitable interface to any suitable device or component in at least one of processors 201 in communication with system control logic 202.
In some embodiments, system control logic 202 may include one or more memory controllers to provide an interface to system memory 203. The system memory 203 may be used for loading and storing data and/or instructions. For example, the system memory 203 may load instructions for acquiring the reference interface in the embodiment of the present application, and may also store the added field data provided by the service personnel, etc.
The system memory 203 of the electronic device 20 may include any suitable volatile memory in some embodiments, such as suitable dynamic random access memory (Dynamic Random Access Memory, DRAM).
NVM memory 204 may include one or more tangible, non-transitory computer-readable media for storing data and/or instructions. In some embodiments, NVM memory 204 may include any suitable nonvolatile memory, such as flash memory, and/or any suitable nonvolatile storage device, such as at least one of a Hard Disk Drive (HDD), compact Disc (CD) Drive, digital versatile Disc (Digital Versatile Disc, DVD) Drive. In embodiments of the present application, NVM memory 204 may be used to store information about the combined open interface that service personnel have developed to complete.
NVM memory 204 may include a portion of a memory resource on the device on which electronic apparatus 20 is installed, or it may be accessed by, but not necessarily a part of, the apparatus. For example, NVM memory 204 may be accessed over a network via network interface 206.
In particular, the system memory 203 and the NVM memory 204 may each include: a temporary copy and a permanent copy of instruction 205. The instructions 205 may include: instructions that, when executed by at least one of the processors 201, cause the electronic device 20 to implement the method as shown in fig. 2. In some embodiments, instructions 205, hardware, firmware, and/or software components thereof may additionally/alternatively be disposed in system control logic 202, network interface 206, and/or processor 201.
The network interface 206 may include a transceiver to provide a radio interface for the electronic device 20 to communicate with any other suitable device (e.g., front end module, antenna, etc.) over one or more networks. In some embodiments, the network interface 206 may be integrated with other components of the electronic device 20. For example, the network interface 206 may be integrated with at least one of the processor 201, the system memory 203, the nvm memory 204, and a firmware device (not shown) having instructions that, when executed by at least one of the processor 201, the electronic device 20 implements the methods as shown in the method embodiments. In the embodiment of the present application, the network interface 206 may be used to transmit the combined open interface developed by the service personnel to the open interface platform for publishing.
The network interface 206 may further include any suitable hardware and/or firmware to provide a multiple-input multiple-output radio interface. For example, network interface 206 may be a network adapter, a wireless network adapter, a telephone modem, and/or a wireless modem.
In some embodiments, at least one of the processors 201 may be packaged together with logic for one or more controllers of the system control logic 202 to form a system package (System In a Package, siP). In some embodiments, at least one of the processors 201 may be integrated on the same die with logic for one or more controllers of the System control logic 202 to form a System on Chip (SoC).
The electronic device 20 may further include: an input/output (I/O) device 207. The I/O device 207 may include a user interface enabling a user to interact with the electronic device 20; the design of the peripheral component interface enables the peripheral component to also interact with the electronic device 20.
It will be appreciated that the configuration illustrated in fig. 2 does not constitute a particular limitation of the electronic device 20. In other embodiments of the present application electronic device 20 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware or software, or a combination of software and hardware.
The following describes the technical solution of the present application in detail with reference to fig. 3 and with reference to a specific scenario in conjunction with the structure shown in fig. 2. As shown in fig. 3, the scheme of combining data interfaces in some embodiments of the present application includes:
s301: the server side provides an interface combination interface for the service side;
the service end is used for receiving the development operation of the service personnel or the external user on the combined open interface, and the server end is used for receiving the combined interface development information generated by the service end according to the development operation of the service personnel or the external user and generating a corresponding combined interface according to the combined interface development information. The hardware devices corresponding to the server side and the service side may be the electronic device 20.
Business personnel are often familiar with the services of an application, i.e., the business functions that an application can provide, which can be packaged as an open interface and published onto the open interface platform 300 for access by external users. If a service person or an external user finds that the open interfaces cannot fully meet the needs of the service person or the external user when using the open interfaces, for example, required data cannot be obtained by accessing one open interface, but rather, a plurality of open interfaces are accessed and returned data of the open interfaces are combined to obtain the data desired by the service person or the external user, the use complexity of the open interfaces is higher for the service person or the external user, the service person or the external user is not easy to use, and even if the desired open interface can be finally obtained by providing new open interface requirements for professional software developers, because the development period of the open interfaces is strictly managed by a process, the development period of even a simple open interface is longer, and the timeliness requirement of the service person or the external user on the open interface cannot be met. Therefore, by authorizing the development of the simple open interface to the business personnel or the external user, the development period of the simple open interface can be reduced, and the time requirement of the business personnel or the external user on the open interface can be timely met.
The server stores a preset interface combination interface, and provides the interface combination interface to the service end when the service end needs the interface combination interface. The interface combination interface is used for facilitating service personnel or external users to carry out combination development on a plurality of reference interfaces. If a business person or an external user desires to obtain a plurality of data from a plurality of existing open interfaces, respectively, however, none of the existing open interfaces can simultaneously provide the plurality of data, and thus a new combined open interface needs to be developed to provide the plurality of data.
The service personnel or external users develop the new combined open interface through the interface combined interface, and the interface combined interface provides a configured and graphical interface development environment for the service personnel, so that the service personnel can complete the development of the combined open interface without the capability of having software language coding and without the intervention of professional software developers.
In the embodiment of the application, the interface combination interface provides relevant configuration items for developing the combination open interface, and service personnel or external users realize the development of the combination open interface by setting the values of the relevant configuration items.
In some embodiments of the present application, the configuration items provided by the interface combination interface may include, but are not limited to, the following: open interface information, reference interface information, assembly information, clip information, add field information, etc. are combined. The combined open interface information is used to describe information about a combined open interface to be developed, such as a combined open interface name, a combined open interface description, a URL of the combined open interface, a request method of the combined open interface, and the like. The reference interface information is used to describe information about open interfaces referenced by the combined open interface, where the referenced open interfaces refer to those open interfaces that are capable of providing corresponding data for the combined open interface. The reference interface information may include, for example, a name of an open interface, a URL of the open interface, a request method of the open interface, the number of open interfaces referenced, and the like. The assembly information is used for describing information needed in the assembly process of the combined open interface, such as data types of output parameter information of the reference interface, access error codes of the reference interface, error information, constraint conditions of output data of the reference interface and the like. The clipping information is used to describe filtering information for the output parameter data of the combined open interface. The added field information is used to describe field information added in the output parameter information of the combined open interface, and the like.
S302: the service end generates combined interface development information according to the user operation corresponding to the interface combined interface and sends the combined interface development information to the server end;
after the service personnel or the external user completes the development of the combined open interface on the interface combined interface of the service end, the interface combined interface packages the information obtained according to the configuration item setting operation of the service personnel or the external user into combined interface development information, the combined interface development information is sent to the server end, and the server end carries out subsequent processing according to the received combined interface development information.
In the embodiment of the application, the combined interface development information may include information corresponding to all configuration items provided by the interface combined interface.
S303: the server side obtains output parameter information of a corresponding reference interface according to the reference interface information in the combined interface development information;
here, the server side acquires the reference interface information from the received combined interface development information. When a service person or an external user develops a combined open interface, an open interface to be referred to is generally specified, and the referred open interface provides corresponding output data for the combined open interface. In specifying a referenced open interface, typically, an identification of the referenced open interface is used, which can be used to uniquely correspond to an existing open interface, e.g., the name of the open interface can be used as the identification of the open interface.
It may be understood that the reference interface information may include information of one referred open interface, or may include information of more than one referred open interface, and a service person or an external user may designate one or more existing open interfaces for the combined open interface as referred open interfaces.
In some embodiments of the present application, the server may obtain the output parameter information of the corresponding reference interface according to the obtained identifier of the reference interface. Here, the server side may store the existing information list of all the open interfaces in advance, so that the server side may query in the information list according to the identifier of the reference interface, so as to obtain the output parameter information of the reference interface.
For example, a service personnel sets a name of a reference interface as a product allnfo in an interface combination interface, the name of the reference interface is packaged into combination interface development information and sent to a server side, the server side obtains the name of the reference interface from the received combination interface development information, and then queries in an information list of the existing open interface according to the name of the reference interface "product allnfo" to obtain reference interface information corresponding to the reference interface. Fig. 4 shows an example of reference interface information, and as shown in fig. 4, the reference interface "productive allnfo" contains 3 kinds of information: the method comprises the steps of accessing a URL, requesting a get method and a standard output model, wherein the accessing URL is http:// pd, ebaoli/pd/products/allnfo/{ product code }, the requesting method is a get method, and output parameters in the standard output model are product objects. The product object includes a plurality of fields, such as a motion field, a product id field, an orgId field, etc., and the information represented in Json format is: product is: { "motion": "Big Max Promotion Info", "ProductId":0, "orgId":0, "ProducName": "," ProductAbbr ": ", … }, wherein the key of the motion field is" motion ", the value is" Big Max Promotion Info ", the key of the product id field is" product id ", the value is 0, the key of the orgId field is" orgId ", and the value is 0.
S304: the server combines the output parameter information of the multiple reference interfaces into the output parameter information of the combined open interface according to the assembly information in the combined interface development information;
here, the content included in the assembly information varies to some extent according to the setting of the development configuration item by the service person or the external user, but the information necessary for the assembly information includes the identification of the reference interface, and one or more of the identifications of the reference interface may be included. In some embodiments of the present application, the name of the reference interface is taken as the identification of the reference interface. And the server obtains corresponding output parameter information through the identification of the reference interfaces, and takes the output parameter information of all the reference interfaces as the output parameters of the combined open interface.
In some embodiments of the present application, the assembly information may be stored as an assembly information template, and a service person or an external user may obtain a pre-stored assembly information template from an interface combination interface, so that development of a combined open interface may be completed by performing a small amount of modification on the basis of a configuration item set in the assembly information template, and efficiency of interface development is improved.
In some embodiments of the present application, clipping information may also be included in the assembly information. The output parameter information of the combined open interface contains the output parameter information of all the reference interfaces, and the output parameter information of the combined open interface may have parameter information which the combined open interface does not want to output, so that the clipping information can indicate which output parameters in the output parameter information are the output parameters which the combined open interface wants to output. Similarly, the clipping information can also be saved as a clipping information template, and a business person or an external user can directly use the pre-stored clipping information template.
In some embodiments of the present application, the assembly information may further include verification information of input parameter information, where the verification information of the input parameter information is used to verify the input parameter information of the combined open interface, and determine whether the input parameter information meets a requirement. The input parameter information of the combined open interface can come from the input parameter information of the reference interface, and can come from the custom parameter information of service personnel or external users. For example, the assembly information may include a check condition for checking whether or not the input parameter is null, an error code returned when the check condition is not satisfied, error information, and the like.
Fig. 5 shows an example of an assembly information template describing assembly information of a combined open interface using data in the Json form, as shown in fig. 5, in which an assembly type of the combined open interface is indicated by a "mainintegrate type" field indicating that assembly is performed by integrating a reference interface, a "mainObjectName" field indicating that the combined open interface is assembled based on a reference interface "productive allnfo" and a "tailorTemplate" field indicating that a clip information template used when assembly is performed is "tailorproductive allnfo". The reference interface in the assembly information template is "productive allnfo", wherein the name of the assembled combined open interface is defined by a "standard ApiName" field, and whether an input parameter named "productive code" is null or not is checked by an "inputRequestParams" field, and if the input parameter is null, an error code and error information are respectively defined in a "nullErrorCode" field and a "nullErrorMsg" field.
S305: the server adjusts the output parameter information of the combined open interface according to the optimization information in the development information of the combined interface;
here, the optimization information is used to describe how to adjust the output parameter information of the combined open interface, which can increase the output parameter in the output parameter information or decrease the output parameter. The optimization information may include, but is not limited to, the following: clipping information, adding field information, etc.
It may be understood that the optimization information may include one of clipping information and adding field information, or may include both clipping information and adding field information, and the kind of information included in the optimization information is not specifically limited in the embodiment of the present application.
In some embodiments of the present application, the server may remove parameter information that does not need to be output from the output parameter information of the combined open interface according to the clipping information;
the clipping information is used for clipping the output parameter information of the combined open interface, so that service personnel or external users can control the output parameter information according to own needs, the combined open interface only outputs necessary output parameter information, and all output parameter information from a plurality of reference interfaces is not required to be output, thereby realizing flexible selection of the output parameter information of the combined open interface.
In some embodiments of the present application, different ways of processing the output parameter information of the combined open interface may be defined in the clipping information, which may include, but is not limited to: output parameter information that is required to be output is directly specified, output parameter information that is not required to be output is directly specified, output parameter information to be output is specified by a filter condition, output parameter information that is not required to be output is specified by a filter condition, and the like.
It will be appreciated that the output parameter information of the combined open interface may be processed in one manner, or may be processed in two or more manners.
And the server side processes the output parameter information of the combined open interface according to different modes defined in the clipping information to obtain the output parameter information which is finally required to be output. For example, the clipping information directly designates the output parameter information to be output, and the server side can directly take the designated output parameter information to be output as the final output parameter information of the combined open interface; for another example, if the clipping information directly designates the output parameter information which does not need to be output, the server removes the output parameter information which does not need to be output from the output parameter information of the combined open interface, and takes the rest of the output parameter information as the final output parameter information of the combined open interface; the server determines output parameter information meeting the filtering conditions from all output parameter information of the combined open interface according to the filtering conditions, and takes the output parameter information meeting the filtering conditions as final output parameter information of the combined open interface; the output parameter information which does not need to be output is specified through the filtering condition in the clipping information, the server determines the output parameter information meeting the filtering condition in all the output parameter information of the combined open interface according to the filtering condition, removes the output parameter information meeting the filtering condition from all the output parameter information, and takes the rest of the output parameter information as the final output parameter information of the combined open interface.
In some embodiments of the present application, the clipping information may be stored as a clipping information template, and a business person or an external user may use the pre-stored clipping information template in the interface combination interface, thereby improving efficiency of interface development.
Fig. 6 shows an example of a clip information template, which describes clip information of a combined open interface using data in Json form, and uses a manner of directly specifying output parameter information to be output, that is, the clip information template directly specifies that output parameter information of the combined open interface includes a "product" object, fields to be output in the "product" object include a "product name" field, a "motion" field, an "interface id" field, and a "life basic" field, and embedded fields to be output in the "life basic" field include a "charge period", "charge Year", "coverage period", and a "coverage Year", as shown in fig. 6.
In some embodiments of the present application, the server may add a corresponding field in the output parameter information of the combined open interface according to the added field information.
Here, the service personnel or the external user can set a new output field for the output parameter information of the combined open interface through the interface combined interface, and the interface combined interface takes the new output field which is set as the added field information in the combined interface development information. In some embodiments of the present application, the value of the added field in the added field information is a character string set by a service person or an external user, for example, the value of the field "motion" in the added field information is a character string "Big Max Promotion Info".
After the server determines the final output parameter information of the combined open interface, in some embodiments of the present application, the server may further obtain an implementation code of the corresponding reference interface according to the reference interface information, and then generate an implementation code corresponding to the combined open interface according to the implementation code of the reference interface and the final output parameter information of the combined open interface.
In some embodiments of the present application, the server may issue the combined open interface and the corresponding implementation code to the open interface platform 300, and implement access control and management on the combined open interface through the open interface platform 300.
Embodiments of the mechanisms disclosed herein may be implemented in hardware, software, firmware, or a combination of these implementations. Embodiments of the present application may be implemented as a computer program or program code that is executed on a programmable system including at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device.
Program code may be applied to input instructions to perform the functions described herein and generate output information. The output information may be applied to one or more output devices in a known manner. For purposes of this application, a processing system includes any system having a processor such as a digital signal processor (Digital Signal Processor, DSP), microcontroller, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or microprocessor.
The program code may be implemented in a high level procedural or object oriented programming language to communicate with a processing system. Program code may also be implemented in assembly or machine language, if desired. Indeed, the mechanisms described in the present application are not limited in scope to any particular programming language. In either case, the language may be a compiled or interpreted language.
In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried by or stored on one or more transitory or non-transitory machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed over a network or through other computer readable media. Thus, a machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including but not limited to floppy diskettes, optical disks, read-Only memories (CD-ROMs), magneto-optical disks, read Only Memories (ROMs), random access memories (Random Access Memory, RAMs), erasable programmable Read-Only memories (Erasable Programmable Read Only Memory, EPROMs), electrically erasable programmable Read-Only memories (Electrically Erasable Programmable Read-Only memories, EEPROMs), magnetic or optical cards, flash Memory, or tangible machine-readable Memory for transmitting information (e.g., carrier waves, infrared signal digital signals, etc.) using the internet in an electrical, optical, acoustical or other form of propagated signal. Thus, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).
In the drawings, some structural or methodological features may be shown in a particular arrangement and/or order. However, it should be understood that such a particular arrangement and/or ordering may not be required. Rather, in some embodiments, these features may be arranged in a different manner and/or order than shown in the illustrative figures. Additionally, the inclusion of structural or methodological features in a particular figure is not meant to imply that such features are required in all embodiments, and in some embodiments, may not be included or may be combined with other features.
It should be noted that, in the embodiments of the present application, each unit/module is a logic unit/module, and in physical aspect, one logic unit/module may be one physical unit/module, or may be a part of one physical unit/module, or may be implemented by a combination of multiple physical units/modules, where the physical implementation manner of the logic unit/module itself is not the most important, and the combination of functions implemented by the logic unit/module is the key to solve the technical problem posed by the present application. Furthermore, to highlight the innovative part of the present application, the above-described device embodiments of the present application do not introduce units/modules that are less closely related to solving the technical problems presented by the present application, which does not indicate that the above-described device embodiments do not have other units/modules.
It should be noted that in the examples and descriptions of this patent, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
While the present application has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.
Claims (8)
1. A method for combining data interfaces for an electronic device comprising a server side and a service side, comprising:
the service end receives and displays an interface combination interface from the server end, wherein the interface combination interface comprises a plurality of development configuration items;
the service end receives setting operation from a user on the interface combination interface, wherein the setting operation is used for setting metadata of a plurality of reference interfaces and a combination open interface to be used, and generating combination interface development information based on the setting operation; wherein the combined interface development information includes: referencing interface information, assembly information, and optimization information;
the server receives the combined interface development information;
the server determines output parameter information of the combined open interface according to the combined interface development information, including,
the server side obtains output parameter information of the corresponding reference interface according to the reference interface information in the combined interface development information;
the server combines the output parameter information of the reference interfaces into the output parameter information of the combined open interface according to the assembly information in the combined interface development information;
and the server adjusts the output parameter information of the combined open interface according to the optimization information in the combined interface development information.
2. The method of claim 1, wherein the optimization information comprises at least one of: clipping information and add field information.
3. The method of claim 2, wherein the server adjusts output parameter information of the combined open interface according to optimization information in the combined interface development information, including:
and the server side cuts the output parameter information of the combined open interface according to the cutting information in the optimization information.
4. The method of claim 2, wherein the server adjusts output parameter information of the combined open interface according to optimization information in the combined interface development information, including:
and the server adds corresponding fields in the output parameter information of the combined open interface according to the added field information in the optimization information.
5. The method according to claim 1, characterized in that the method further comprises:
and the server side checks the input parameter information of the combined open interface according to the check information of the input parameters in the assembly information.
6. The method of claim 5, further comprising:
and under the condition that the verification result of the input parameter information of the combined open interface does not meet the preset condition, the server determines a predefined verification error identifier and verification error information.
7. An electronic device, comprising:
a memory for storing instructions for execution by one or more processors of the electronic device, an
A processor, being one of the processors of an electronic device, for performing the method of combining data interfaces as claimed in any of claims 1-6.
8. A readable storage medium having stored thereon instructions that, when executed on an electronic device, cause the electronic device to perform the method of combining data interfaces of any of claims 1-6.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111087327.3A CN113791766B (en) | 2021-09-16 | 2021-09-16 | Method for combining data interfaces, electronic device and readable storage medium |
PCT/CN2022/116537 WO2023040671A1 (en) | 2021-09-16 | 2022-09-01 | Method for combining data interfaces, and electronic device and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111087327.3A CN113791766B (en) | 2021-09-16 | 2021-09-16 | Method for combining data interfaces, electronic device and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113791766A CN113791766A (en) | 2021-12-14 |
CN113791766B true CN113791766B (en) | 2023-05-16 |
Family
ID=78878592
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111087327.3A Active CN113791766B (en) | 2021-09-16 | 2021-09-16 | Method for combining data interfaces, electronic device and readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113791766B (en) |
WO (1) | WO2023040671A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113791766B (en) * | 2021-09-16 | 2023-05-16 | 易保网络技术(上海)有限公司 | Method for combining data interfaces, electronic device and readable storage medium |
CN117609342A (en) * | 2023-10-24 | 2024-02-27 | 中国人寿保险股份有限公司江苏省分公司 | Configurable data supply method based on data storage |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106649488A (en) * | 2016-09-30 | 2017-05-10 | 广东网金数据服务有限公司 | Method and device for invoking multi-data-source interaction interface |
CN110286897A (en) * | 2019-05-22 | 2019-09-27 | 深圳壹账通智能科技有限公司 | API visualization dynamic configuration method, device, equipment and storage medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9898263B2 (en) * | 2013-04-09 | 2018-02-20 | Level 3 Communications, Llc | System and method for resource-definition-oriented software generation and development |
US20160012451A1 (en) * | 2014-07-10 | 2016-01-14 | Verizon Patent And Licensing Inc. | Combined application programming interface and device management for remote device diagnostics and management |
CN109766166A (en) * | 2018-12-29 | 2019-05-17 | 优刻得科技股份有限公司 | Business flow processing method, apparatus, storage medium and equipment |
CN111142867B (en) * | 2019-12-31 | 2024-04-02 | 谷云科技(广州)有限责任公司 | Service visual arrangement system and method under micro service architecture |
CN113037830A (en) * | 2021-03-04 | 2021-06-25 | 浪潮云信息技术股份公司 | Micro-service API (application program interface) arranging method and system based on gateway |
CN113791766B (en) * | 2021-09-16 | 2023-05-16 | 易保网络技术(上海)有限公司 | Method for combining data interfaces, electronic device and readable storage medium |
-
2021
- 2021-09-16 CN CN202111087327.3A patent/CN113791766B/en active Active
-
2022
- 2022-09-01 WO PCT/CN2022/116537 patent/WO2023040671A1/en active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106649488A (en) * | 2016-09-30 | 2017-05-10 | 广东网金数据服务有限公司 | Method and device for invoking multi-data-source interaction interface |
CN110286897A (en) * | 2019-05-22 | 2019-09-27 | 深圳壹账通智能科技有限公司 | API visualization dynamic configuration method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113791766A (en) | 2021-12-14 |
WO2023040671A1 (en) | 2023-03-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109710236B (en) | Service development and implementation method, device, platform and medium based on shared service | |
CN109840429B (en) | Intelligent contract deployment and calling method and device | |
US20110238498A1 (en) | Service stage for subscription management | |
CN109428911A (en) | Apparatus control method, device, terminal device and operating system | |
US9811605B2 (en) | Methods, apparatuses and computer program products for automated learning of data models | |
CN113791766B (en) | Method for combining data interfaces, electronic device and readable storage medium | |
CN110933095A (en) | Message parsing method and device | |
CN109636306A (en) | Node-flow shifting method, device, terminal and storage medium | |
US10437575B2 (en) | Aercloud application express and aercloud application express launcher | |
CN108279882B (en) | Framework generation method, device, equipment and computer readable medium | |
US9471896B2 (en) | Memo synchronization system, mobile system, and method for synchronizing memo data | |
US20190080380A1 (en) | Virtualized Services Discovery and Recommendation Engine | |
CN111506579A (en) | Method, program and equipment for generating intelligent contract code | |
CN112860308A (en) | Configuration method of interface definition, service processing method, server and storage medium | |
CN111066333A (en) | Device capable of acquiring ESIM configuration file | |
KR20190061060A (en) | Profile-based content and services | |
WO2023045552A1 (en) | Service deployment method, service deployment system, electronic device, and storage medium | |
CN111464351B (en) | Network distribution method and device for intelligent household equipment, terminal equipment and storage medium | |
CN115836511A (en) | Equipment management method and device in Internet of things, computer equipment and storage medium | |
CN111309319A (en) | Inheritable office data dynamic page configuration method and device | |
US8595251B2 (en) | Flexible interface module | |
CN111367500A (en) | Data processing method and device | |
CN111541680B (en) | Smart device registration method, smart device, system, and storage medium | |
CN110286907B (en) | Display method and device of public button assembly | |
CN109471574B (en) | Method and device for configuring resources |
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 |