Nothing Special   »   [go: up one dir, main page]

CN113434315B - Interface management method and device, storage medium and electronic equipment - Google Patents

Interface management method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113434315B
CN113434315B CN202110766537.9A CN202110766537A CN113434315B CN 113434315 B CN113434315 B CN 113434315B CN 202110766537 A CN202110766537 A CN 202110766537A CN 113434315 B CN113434315 B CN 113434315B
Authority
CN
China
Prior art keywords
service
interface
configuration
file
interfaces
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
Application number
CN202110766537.9A
Other languages
Chinese (zh)
Other versions
CN113434315A (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.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding 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 Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202110766537.9A priority Critical patent/CN113434315B/en
Publication of CN113434315A publication Critical patent/CN113434315A/en
Application granted granted Critical
Publication of CN113434315B publication Critical patent/CN113434315B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/541Interprogram communication via adapters, e.g. between incompatible applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure belongs to the technical field of computers, and relates to an interface management method and device, a storage medium and electronic equipment. The method comprises the following steps: classifying and configuring the expansion interfaces to determine service interfaces, and extracting the service interfaces to obtain a file to be configured; service calling configuration and service implementation configuration are carried out on the files to be configured to obtain calling configuration results and implementation configuration results, and target files in the files to be configured are determined according to the calling configuration results and the implementation configuration results; and calling the service interface according to the target file to acquire service data returned by the service interface. When the expanded service interface is used for realizing the call, the configuration of the service interface is only finely adjusted, the dependence of the service interface of the core is not required to be adjusted, and the application service is not influenced. And an interface foundation is provided for standard stable core service products, and the work development and risk of the adaptation expansion are migrated out of the core service, so that the functional stability of the core service is ensured, and the project delivery efficiency is improved.

Description

Interface management method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an interface management method and apparatus, a computer readable storage medium, and an electronic device.
Background
Generally, a caller designs a definition interface, and an implementer implements interface functions. Meanwhile, a plurality of interface implementers can be provided by utilizing the characteristics of polymorphism, so that a caller can call various implementations as required. For SPI (Service Provider Interface) technology, three ways are generally included, namely a Java JDK built-in service discovery mechanism, a Dubbo SPI mechanism, and a service interface defining the SPI. The service discovery mechanism automatically loads definition classes under the/META-INF/services/file catalogs by realizing SPI interface functions and packing and placing the function realization in the project; dubbo SPI mechanism loads the appointed implementation class through ExtensionLoader under the configuration file catalog/META-INF/dubbo; the defined SPI service interface calls the third party implementation through the HTTP protocol.
The implementation mechanism of the SPI integrates the implementation class function into the service and configures the service to the corresponding file under the implementation class and logic condition based on the completion SPI, and the function call for switching different logics is achieved by configuring different extension classes, so that the decoupling of the function logic is not facilitated. And all SPI implementations are coupled, the functional codes are redundant, and project output, especially source code output, is not facilitated. Besides, the SPI technology is adaptive to different interface protocols, which is not beneficial to ensuring the stability of the application core function.
In view of this, there is a need in the art to develop a new interface management method and apparatus.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to an interface management method, an interface management apparatus, a computer-readable storage medium, and an electronic device, and further, at least to some extent, to overcome the technical problems of functional logic coupling and low functional stability due to the limitations of the related art.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to a first aspect of an embodiment of the present invention, there is provided an interface management method, including: classifying and configuring the expansion interfaces to determine service interfaces, and extracting the service interfaces to obtain a file to be configured;
performing service calling configuration and service implementation configuration on the file to be configured to obtain a calling configuration result and an implementation configuration result, and determining a target file in the file to be configured according to the calling configuration result and the implementation configuration result;
And calling the service interface according to the target file to acquire service data returned by the service interface.
In an exemplary embodiment of the present invention, the classifying and configuring the expansion interface to determine the service interface includes:
determining an original interface, and screening the original interface to obtain an expansion interface;
and classifying and configuring the expansion interfaces to obtain service interfaces.
In an exemplary embodiment of the present invention, the classifying and configuring the expansion interface to obtain a service interface includes:
acquiring functional classification information of the original interface, and classifying the expansion interface according to the functional classification information to obtain a classification interface;
And configuring the classification interface according to the function classification information to obtain a service interface.
In an exemplary embodiment of the present invention, the performing service call configuration and service implementation configuration on the to-be-configured file obtains a call configuration result and an implementation configuration result, including:
Determining a calling configuration tag, and carrying out service calling configuration on the file to be configured by utilizing the calling configuration tag to obtain a calling configuration result;
Determining an implementation configuration tag, and carrying out service implementation configuration on the file to be configured by using the implementation configuration tag to obtain an implementation configuration result.
In an exemplary embodiment of the present invention, the performing service call configuration on the to-be-configured file by using the call configuration tag obtains a call configuration result, including:
And based on the call configuration tag, performing service call configuration on the file to be configured by using an extensible markup language to obtain a call configuration result.
In an exemplary embodiment of the present invention, the configuring the service implementation of the to-be-configured file by using the implementation configuration tag obtains an implementation configuration result, including:
and based on the implementation configuration tag, carrying out service implementation configuration on the file to be configured by using an extensible markup language to obtain an implementation configuration result.
In an exemplary embodiment of the present invention, the obtaining service data returned by the service interface includes:
Acquiring original data returned by the service interface;
and packaging the original data to obtain service data.
According to a second aspect of the embodiment of the present invention, there is provided an interface management apparatus, the apparatus including: the interface design module is configured to classify and configure the expansion interfaces to determine service interfaces, and extract the service interfaces to obtain files to be configured;
The file configuration module is configured to perform service calling configuration and service implementation configuration on the file to be configured to obtain a calling configuration result and an implementation configuration result, and determine a target file in the file to be configured according to the calling configuration result and the implementation configuration result;
and the interface calling module is configured to call the service interface according to the target file so as to acquire service data returned by the service interface.
According to a third aspect of an embodiment of the present invention, there is provided an electronic apparatus including: a processor and a memory; wherein the memory has stored thereon computer readable instructions which, when executed by the processor, implement the interface management method of any of the above-described exemplary embodiments.
According to a fourth aspect of embodiments of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the interface management method in any of the above-described exemplary embodiments.
As can be seen from the above technical solutions, the interface management method, the interface management device, the computer storage medium, and the electronic device according to the exemplary embodiments of the present invention have at least the following advantages and positive effects:
In the method and the device provided by the exemplary embodiment of the disclosure, service calling configuration and service implementation configuration are performed on the file to be configured to obtain a calling configuration result and an implementation configuration result, so that calling configuration and implementation logic of a service interface are standardized, when the service interface is expanded to realize calling, only the configuration of the service interface is required to be finely adjusted, the service interface dependence of a core is not required to be adjusted, and the whole application service is not influenced. In addition, in the process of calling the service interface according to the target file, various interface protocols of a third party are quickly adapted, the application scene of the interface management method is enriched, an interface foundation is provided for a set of standard stable core service products, work development and risks needing to be adapted and expanded are migrated out of the core service, the functional stability of the core service is ensured, the corresponding project can be quickly delivered, and the project delivery efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort.
FIG. 1 schematically illustrates a flow diagram of an interface management method in an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow diagram of a method of classifying and configuring expansion interfaces in an exemplary embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow diagram of a method for further classifying and configuring expansion interfaces in an exemplary embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow diagram of a method of service invocation configuration and service implementation configuration in an exemplary embodiment of the present disclosure;
fig. 5 schematically illustrates a flowchart of a method for acquiring service data in an exemplary embodiment of the present disclosure;
Fig. 6 schematically illustrates a structural diagram of a framework of an interface management method in an application scenario in an exemplary embodiment of the present disclosure;
fig. 7 schematically illustrates a structural diagram of a framework for calling a service interface in an application scenario in an exemplary embodiment of the present disclosure;
fig. 8 schematically illustrates a structural diagram of an interface management apparatus in an exemplary embodiment of the present disclosure;
FIG. 9 schematically illustrates an electronic device for implementing an interface management method in an exemplary embodiment of the present disclosure;
Fig. 10 schematically illustrates a computer-readable storage medium for implementing an interface management method in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the present disclosure. One skilled in the relevant art will recognize, however, that the aspects of the disclosure may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
The terms "a," "an," "the," and "said" are used in this specification to denote the presence of one or more elements/components/etc.; the terms "comprising" and "having" are intended to be inclusive and mean that there may be additional elements/components/etc. in addition to the listed elements/components/etc.; the terms "first" and "second" and the like are used merely as labels, and are not intended to limit the number of their objects.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities.
Aiming at the problems in the related art, the present disclosure proposes an interface management method. Fig. 1 shows a flow chart of an interface management method, as shown in fig. 1, the interface management method at least comprises the following steps:
S110, classifying and configuring the expansion interfaces to determine service interfaces, and extracting the service interfaces to obtain a file to be configured.
S120, carrying out service calling configuration and service implementation configuration on the files to be configured to obtain calling configuration results and implementation configuration results, and determining target files in the files to be configured according to the calling configuration results and the implementation configuration results.
S130, calling a service interface according to the target file to acquire service data returned by the service interface.
In the exemplary embodiment of the disclosure, service calling configuration and service implementation configuration are performed on the file to be configured to obtain a calling configuration result and an implementation configuration result, so that calling configuration and implementation logic of a service interface are standardized, when the service interface is expanded to realize calling, only the configuration of the service interface is required to be finely adjusted, the service interface dependence of a core is not required to be adjusted, and the whole application service is not influenced. In addition, in the process of calling the service interface according to the target file, various interface protocols of a third party are quickly adapted, the application scene of the interface management method is enriched, an interface foundation is provided for a set of standard stable core service products, work development and risks needing to be adapted and expanded are migrated out of the core service, the functional stability of the core service is ensured, the corresponding project can be quickly delivered, and the project delivery efficiency is improved.
The respective steps of the interface management method are described in detail below.
In step S110, the expansion interfaces are classified and configured to determine service interfaces, and the service interfaces are extracted to obtain a file to be configured.
In an exemplary embodiment of the present disclosure, the expansion interface is an interface on a motherboard for connecting various external devices. Through these expansion interfaces, external devices such as printers, external modems (modems), scanners, flash memory discs, MP3 (players for playing music files), DC (direct current chopper), DV, mobile hard disks, mobile phones, tablets and the like can be connected to the computer. Moreover, the interconnection between computers can be realized through the expansion interface.
Currently, common expansion interfaces are a Serial interface (Serial Port), a parallel interface (Parall el Port), a universal Serial bus interface (USB), an IEEE 1394 interface, and the like.
In an alternative embodiment, fig. 2 shows a flow diagram of a method for classifying and configuring an expansion interface, as shown in fig. 2, the method at least comprises the following steps: in step S210, an original interface is determined, and screening is performed on the original interface to obtain an extended interface.
The original interface is all expansion interfaces currently in use. After the original interface is determined, the important expansion interface can be combed according to the use situation of the core service. When the expansion interface is carded, the determination can be carried out according to the importance degree of the functional classification of the original interface.
It should be noted that the functionality of the expansion interface requires a third party to be implemented. For example, the extension interface may be a call to the crowd-tag system interface to obtain the crowd-tag interface.
In step S220, the expansion interfaces are classified and configured to obtain service interfaces.
After the important expansion interfaces in the original interfaces are carded out, the expansion interfaces can be classified and configured.
In an alternative embodiment, fig. 3 shows a flow chart of a method for further classifying and configuring expansion interfaces, as shown in fig. 3, the method at least comprises the following steps: in step S310, the function classification information of the original interface is obtained, and the expansion interface is classified according to the function classification information to obtain a classification interface.
The function classification information of the original interface may be information for characterizing functions implemented by the original interface, such as crowd-class function information, data-class function information, and the like.
After the function classification information is obtained, the carded extension interfaces can be classified according to the function classification information to obtain various classification interfaces. The classification interface may be, for example, an SPI interface.
SPI is a technical system provided by JAVA for realizing or expanding by a third party, is also a Service providing (interface realizing) discovery mechanism built in JDK (Java Development Kit, JAVA developing tool), and can search files through META-INF/Service files under CLASSPATH path to load defined classes therein. Thus, SPI is a specification built under interface-oriented programming to make components extensible or dynamically change implementations. The SPI may be used to enable framework extension and replacement components, such as java. Sql. Driver in the most common database connection JDBC, different database providers may implement interfaces differently, and JDK needs to find the implementation of the interface through the SPI to know which of these database providers are implemented, i.e., to operate it, i.e., to decouple it. Therefore, the SPI mechanism of JAVA can find service implementation for a certain service interface, and the expandability of the program is greatly enhanced through decoupling service specific implementation and service use, namely plug-in.
In step S320, the service interface is configured according to the function classification information.
Because the input parameter objects, the output parameter objects and the interface methods of the different kinds of classified interfaces are different, the classified interfaces can be configured according to the configuration of the input parameter objects, the output parameter objects and the interface methods required by different functional classification information, so that the configured classified interfaces are determined to be service interfaces.
In the present exemplary embodiment, the process of screening, classifying, configuring and the like is performed on the original interface, so that the service interface of the core service product can be normalized, and the redundancy degree of the functional code is reduced to a certain extent.
After the service interface is determined, the service interface can be extracted to obtain a file to be configured.
Specifically, the extraction process may be to package the SPI interface into jar packets, that is, the to-be-configured file, for the interface caller and the interface implementer to implement functions. In addition, there may be other ways of extracting, and this is not particularly limited in the present exemplary embodiment.
The jar packages are ZIP compressed archives of class files, each jar package has a default META-INF directory, which corresponds to a packet for configuring applications, extensions, class loaders, etc.
In step S120, service calling configuration and service implementation configuration are performed on the to-be-configured file to obtain a calling configuration result and an implementation configuration result, and a target file in the to-be-configured file is determined according to the calling configuration result and the implementation configuration result.
In an exemplary embodiment of the present disclosure, after obtaining the to-be-configured file, service call configuration and service implementation configuration may also be performed on the to-be-configured file.
In an alternative embodiment, fig. 4 shows a flow diagram of a method of service invocation configuration and service implementation configuration, as shown in fig. 4, the method comprising at least the steps of: in step S410, a call configuration tag is determined, and service call configuration is performed on the file to be configured by using the call configuration tag to obtain a call configuration result.
When the service interface is an SPI interface, the service call configuration can be performed by using a call configuration tag < jsf:consumer >. Specifically, the service invocation configuration may include information such as configuration id, interface, protocol, alias and the like JSF Consumer Config (service invocation interface configuration of JSF) information.
Further, the service call configuration may also be configured in a specific language.
In an alternative embodiment, based on the call configuration tag, the service call configuration is performed on the file to be configured by using the extensible markup language to obtain a call configuration result.
Thus, the language in which the service call configuration is to be performed on the document to be configured may be an extensible markup language (Extensible Markup Language, XML). In addition, other languages may be adopted according to the actual situation, and the present exemplary embodiment is not particularly limited thereto.
In step S420, an implementation configuration tag is determined, and service implementation configuration is performed on the file to be configured by using the implementation configuration tag to obtain an implementation configuration result.
When the service interface is an SPI interface, the service implementation configuration may be performed using an implementation configuration tag < jsf:provider >. In particular, the service implementation configuration may include JSF Provider Config (service interface implementation configuration of JSF) information of the configuration id, interface, alias, ref or the like.
It should be noted that when JSF (JavaServer Faces) frames are adopted, registration service addresses and protocols such as < jsf:registry > and < jsf:server > need to be configured in advance.
And, the service implementation configuration may also be configured with a specific markup language.
In an alternative embodiment, based on the implementation configuration tag, service implementation configuration is performed on the file to be configured by using an extensible markup language to obtain an implementation configuration result.
Thus, the language in which the service implementation is configured for the files to be configured may be XML. In addition, other languages may be adopted according to the actual situation, and the present exemplary embodiment is not particularly limited thereto.
In the present exemplary embodiment, service call configuration and service implementation configuration are performed on a file to be configured, and data support is provided for calling a service interface.
After service calling configuration and service implementation configuration are carried out on the files to be configured to obtain corresponding calling configuration results and implementation configuration results, the target files in the files to be configured can be determined according to the calling configuration results and the implementation configuration results.
It should be noted that, the definition of the SPI interface is that, when the service provider provides an implementation of the interface, a file named as the service interface needs to be created in META-INF/services/directory under classpath, and the content in the file is a specific implementation class of the interface. When other programs need this service, the JSF service discovery mechanism can find the META-INF/service configuration file, i.e., the object file, in this jar package (typically relying on jar packages). The specific implementation class name of the interface in the configuration file can be loaded and instantiated according to the class name, so that the service can be used. The tool class of the lookup service implementation in JDK (JAVA developed tool) is: java.
When the service instantiation is performed, the service instantiation may be obtained through a service annotation mode @ Autowired, or may be obtained through other modes, and the exemplary embodiment is not limited in particular.
In step S130, the service interface is called according to the target file, so as to obtain the service data returned by the service interface.
In an exemplary embodiment of the present disclosure, after determining the target file, a corresponding service interface may be invoked to obtain service data returned by the interface.
In an alternative embodiment, fig. 5 shows a flow chart of a method for acquiring service data, and as shown in fig. 5, the method at least includes the following steps: in step S510, the original data returned by the service interface is acquired.
After invoking the service interface of the third party, the service interface may return the corresponding original data.
In step S520, the original data is encapsulated to obtain service data.
The original data returned by the service interface may not meet the requirement of the current service platform, so that the original data can be packaged to obtain the service data meeting the requirement.
For example, the number of service data required by the current service platform is 4, but the total of 10 original data returned by the service interface is 10, so 10 entries in the original data can be encapsulated to obtain service data meeting the requirement of 4 data entries.
In the present exemplary embodiment, by encapsulating the original data, service data adapted to the current service platform may be obtained, so as to normalize service data of the core service, ensure functional stability and data format of the core service, and promote delivery efficiency of the corresponding item.
The following describes the interface management method in the embodiment of the present disclosure in detail in connection with an application scenario.
Fig. 6 shows a schematic structural diagram of a framework of an interface management method in an application scenario, where the framework of the interface management method includes a caller service platform and an implementer third party implementer as shown in fig. 6.
Generally, the service platform directly calls the service interface of the third party implementation party through the JSF. In addition, an API-ADAPTER SPI adaptation layer may be provided. In the SPI adaptation layer, jar packets of an SPI interface can be introduced, documents can be developed according to the SPI interface, and the function of realizing the development interface can be completed.
When the service interface is an SPI interface, the service implementation configuration may be performed using an implementation configuration tag < jsf:provider >. In particular, the service implementation configuration may include JSF Provider Config (service interface implementation configuration of JSF) information of the configuration id, interface, alias, ref or the like.
It should be noted that when JSF (JavaServer Faces) frames are adopted, registration service addresses and protocols such as < jsf:registry > and < jsf:server > need to be configured in advance.
And, the language for performing service implementation configuration on the file to be configured may be XML.
Further, the corresponding service interface is called to acquire the service data returned by the interface.
First, after invoking the service interface of the third party, the service interface may return the corresponding original data.
Then, the original data returned by the service interface may not meet the requirement of the current service platform, so that the original data may be packaged to obtain the service data meeting the requirement.
For example, the number of service data required by the current service platform is 4, but the total of 10 original data returned by the service interface is 10, so 10 entries in the original data can be encapsulated to obtain service data meeting the requirement of 4 data entries.
Fig. 7 shows a schematic structural diagram of a framework for calling a service interface in an application scenario, as shown in fig. 7, in a core service platform, besides an interface function extension of SP I can be realized by using a JSF framework to call an SPI interface, an HTTP (Hypertext Transfer Protoc ol ) interface protocol or a Dubbo (open source distributed service framework) interface protocol can be substituted. In addition, other interface protocols may be substituted, and the present exemplary embodiment is not limited thereto.
When the SPI framework is replaced by the HTTP interface protocol, the HTTP interface protocol can be used for calling a service interface of a third party; when the SPI framework is replaced by the HTTP interface protocol, dubbo interface protocol can be used for calling a service interface of a third party; when the SPI framework is replaced with other interface protocols, the service interface of the third party may be invoked using other interface protocols.
In the application scene of the present disclosure, service calling configuration and service implementation configuration are performed on a file to be configured to obtain a calling configuration result and an implementation configuration result, which specify calling configuration and implementation logic of a service interface, and when the service interface is extended to implement calling, only the configuration of the service interface needs to be finely tuned, and the service interface dependence of a core does not need to be adjusted, so that the whole application service is not affected. In addition, in the process of calling the service interface according to the target file, various interface protocols of a third party are quickly adapted, the application scene of the interface management method is enriched, an interface foundation is provided for a set of standard stable core service products, work development and risks needing to be adapted and expanded are migrated out of the core service, the functional stability of the core service is ensured, the corresponding project can be quickly delivered, and the project delivery efficiency is improved.
In addition, in an exemplary embodiment of the present disclosure, an interface management apparatus is also provided. Fig. 8 shows a schematic structural diagram of an interface management apparatus, and as shown in fig. 8, the interface management apparatus 800 may include: an interface design module 810, a file configuration module 820, and an interface call module 830. Wherein:
the interface design module 810 is configured to classify and configure the expansion interfaces to determine service interfaces, and extract the service interfaces to obtain a file to be configured; the file configuration module 820 is configured to perform service calling configuration and service implementation configuration on the file to be configured to obtain a calling configuration result and an implementation configuration result, and determine a target file in the file to be configured according to the calling configuration result and the implementation configuration result; the interface calling module 830 is configured to call the service interface according to the target file, so as to obtain service data returned by the service interface.
In an exemplary embodiment of the present invention, the classifying and configuring the expansion interface to determine the service interface includes:
determining an original interface, and screening the original interface to obtain an expansion interface;
and classifying and configuring the expansion interfaces to obtain service interfaces.
In an exemplary embodiment of the present invention, the classifying and configuring the expansion interface to obtain a service interface includes:
acquiring functional classification information of the original interface, and classifying the expansion interface according to the functional classification information to obtain a classification interface;
And configuring the classification interface according to the function classification information to obtain a service interface.
In an exemplary embodiment of the present invention, the performing service call configuration and service implementation configuration on the to-be-configured file obtains a call configuration result and an implementation configuration result, including:
Determining a calling configuration tag, and carrying out service calling configuration on the file to be configured by utilizing the calling configuration tag to obtain a calling configuration result;
Determining an implementation configuration tag, and carrying out service implementation configuration on the file to be configured by using the implementation configuration tag to obtain an implementation configuration result.
In an exemplary embodiment of the present invention, the performing service call configuration on the to-be-configured file by using the call configuration tag obtains a call configuration result, including:
And based on the call configuration tag, performing service call configuration on the file to be configured by using an extensible markup language to obtain a call configuration result.
In an exemplary embodiment of the present invention, the configuring the service implementation of the to-be-configured file by using the implementation configuration tag obtains an implementation configuration result, including:
and based on the implementation configuration tag, carrying out service implementation configuration on the file to be configured by using an extensible markup language to obtain an implementation configuration result.
In an exemplary embodiment of the present invention, the obtaining service data returned by the service interface includes:
Acquiring original data returned by the service interface;
and packaging the original data to obtain service data.
The specific details of the interface management apparatus 800 are described in detail in the corresponding interface management method, and thus are not described herein.
It should be noted that although several modules or units of interface management apparatus 800 are mentioned in the detailed description above, such partitioning is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
An electronic device 900 according to such an embodiment of the invention is described below with reference to fig. 9. The electronic device 900 shown in fig. 9 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 9, the electronic device 900 is embodied in the form of a general purpose computing device. Components of electronic device 900 may include, but are not limited to: the at least one processing unit 910, the at least one storage unit 920, a bus 930 connecting the different system components (including the storage unit 920 and the processing unit 910), and a display unit 940.
Wherein the storage unit stores program code that is executable by the processing unit 910 such that the processing unit 910 performs steps according to various exemplary embodiments of the present invention described in the above-described "exemplary methods" section of the present specification.
The storage unit 920 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 921 and/or cache memory 922, and may further include Read Only Memory (ROM) 923.
The storage unit 920 may also include a program/utility 924 having a set (at least one) of program modules 925, such program modules 925 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The bus 930 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 900 may also communicate with one or more external devices 1100 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 900, and/or with any device (e.g., router, modem, etc.) that enables the electronic device 900 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 950. Also, electronic device 900 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 960. As shown, the network adapter 960 communicates with other modules of the electronic device 900 over the bus 930. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 900, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary methods" section of this specification, when said program product is run on the terminal device.
Referring to fig. 10, a program product 1000 for implementing the above-described method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (8)

1. An interface management method, the method comprising:
Classifying and configuring the expansion interfaces to determine service interfaces, and extracting the service interfaces to obtain a file to be configured;
performing service calling configuration and service implementation configuration on the file to be configured to obtain a calling configuration result and an implementation configuration result, and determining a target file in the file to be configured according to the calling configuration result and the implementation configuration result;
Invoking the service interface according to the target file to acquire service data returned by the service interface;
Wherein the classifying and configuring the expansion interface to determine the service interface includes:
Determining an original interface, and screening the original interface to obtain an expansion interface; the expansion interface is obtained by screening according to the use scene of the core service;
classifying and configuring the expansion interfaces to obtain service interfaces;
the classifying and configuring the expansion interface to obtain a service interface includes:
acquiring functional classification information of the original interface, and classifying the expansion interface according to the functional classification information to obtain a classification interface;
And configuring the classified interfaces according to the configuration of the input parameter object, the output parameter object and the interface method in the function classification information to obtain service interfaces.
2. The interface management method according to claim 1, wherein the performing service call configuration and service implementation configuration on the to-be-configured file obtains call configuration results and implementation configuration results, including:
Determining a calling configuration tag, and carrying out service calling configuration on the file to be configured by utilizing the calling configuration tag to obtain a calling configuration result;
Determining an implementation configuration tag, and carrying out service implementation configuration on the file to be configured by using the implementation configuration tag to obtain an implementation configuration result.
3. The interface management method according to claim 2, wherein the performing service call configuration on the to-be-configured file by using the call configuration tag obtains a call configuration result, including:
And based on the call configuration tag, performing service call configuration on the file to be configured by using an extensible markup language to obtain a call configuration result.
4. The interface management method according to claim 2, wherein the performing service implementation configuration on the to-be-configured file by using the implementation configuration tag obtains an implementation configuration result, including:
and based on the implementation configuration tag, carrying out service implementation configuration on the file to be configured by using an extensible markup language to obtain an implementation configuration result.
5. The method for managing an interface according to claim 1, wherein the obtaining the service data returned by the service interface includes:
Acquiring original data returned by the service interface;
and packaging the original data to obtain service data.
6. An interface management apparatus, comprising:
The interface design module is configured to classify and configure the expansion interfaces to determine service interfaces, and extract the service interfaces to obtain files to be configured;
The file configuration module is configured to perform service calling configuration and service implementation configuration on the file to be configured to obtain a calling configuration result and an implementation configuration result, and determine a target file in the file to be configured according to the calling configuration result and the implementation configuration result;
The interface calling module is configured to call the service interface according to the target file so as to acquire service data returned by the service interface;
the interface design module classifies and configures the expansion interfaces to determine service interfaces, and the interface design module comprises:
Determining an original interface, and screening the original interface to obtain an expansion interface; the expansion interface is obtained by screening according to the use scene of the core service;
classifying and configuring the expansion interfaces to obtain service interfaces;
the interface design module classifies and configures the expansion interface to obtain a service interface, and the interface design module comprises:
acquiring functional classification information of the original interface, and classifying the expansion interface according to the functional classification information to obtain a classification interface;
And configuring the classified interfaces according to the configuration of the input parameter object, the output parameter object and the interface method in the function classification information to obtain service interfaces.
7. A computer readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the interface management method of any of claims 1-5.
8. An electronic device, comprising:
A processor;
a memory for storing executable instructions of the processor;
Wherein the processor is configured to perform the interface management method of any of claims 1-5 via execution of the executable instructions.
CN202110766537.9A 2021-07-07 2021-07-07 Interface management method and device, storage medium and electronic equipment Active CN113434315B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110766537.9A CN113434315B (en) 2021-07-07 2021-07-07 Interface management method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110766537.9A CN113434315B (en) 2021-07-07 2021-07-07 Interface management method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113434315A CN113434315A (en) 2021-09-24
CN113434315B true CN113434315B (en) 2024-05-17

Family

ID=77759354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110766537.9A Active CN113434315B (en) 2021-07-07 2021-07-07 Interface management method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113434315B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114253240B (en) * 2021-12-20 2024-08-27 中国电信股份有限公司 Control method, device and equipment of cloud industrial system equipment and storage medium
CN115686665B (en) * 2022-09-30 2023-09-12 广州市玄武无线科技股份有限公司 Plug-in quick access method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN208424644U (en) * 2018-09-27 2019-01-22 北京明讯恒基科技发展有限责任公司 A kind of access multiservice platform
CN112346794A (en) * 2020-10-21 2021-02-09 深圳鼎盛电脑科技有限公司 Interface calling method, device, equipment and medium
CN112559095A (en) * 2020-12-16 2021-03-26 微医云(杭州)控股有限公司 Target service execution method, system, server and storage medium
CN112685020A (en) * 2020-12-24 2021-04-20 京东数字科技控股股份有限公司 Method and device for dynamically creating service interface, electronic equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2365501A1 (en) * 2001-12-19 2003-06-19 Alcatel Canada Inc. Dynamically configurable human-machine interface
US7418709B2 (en) * 2004-08-31 2008-08-26 Microsoft Corporation URL namespace to support multiple-protocol processing within worker processes
US7617482B2 (en) * 2004-11-18 2009-11-10 International Business Machines Corporation Method, system and program product for implementing java server page (JSP) containers as java server faces (JSF) components
US7523461B2 (en) * 2005-07-01 2009-04-21 Microsoft Corporation Modification of logic in an application
US8676939B2 (en) * 2010-08-26 2014-03-18 Adobe Systems Incorporated Dynamic configuration of applications deployed in a cloud
CN102520927B (en) * 2011-11-23 2014-09-10 中兴通讯股份有限公司 Method, device and terminal for generation logic business of embedded terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN208424644U (en) * 2018-09-27 2019-01-22 北京明讯恒基科技发展有限责任公司 A kind of access multiservice platform
CN112346794A (en) * 2020-10-21 2021-02-09 深圳鼎盛电脑科技有限公司 Interface calling method, device, equipment and medium
CN112559095A (en) * 2020-12-16 2021-03-26 微医云(杭州)控股有限公司 Target service execution method, system, server and storage medium
CN112685020A (en) * 2020-12-24 2021-04-20 京东数字科技控股股份有限公司 Method and device for dynamically creating service interface, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113434315A (en) 2021-09-24

Similar Documents

Publication Publication Date Title
US9619304B2 (en) Automatic connections between application components
CN110032392B (en) Service management method and device, storage medium and electronic equipment
US8321852B2 (en) System and method for extending a component-based application platform with custom services
CN109643252B (en) Middleware interface and middleware interface generator
CN113434315B (en) Interface management method and device, storage medium and electronic equipment
US20190138498A1 (en) Resolving in-memory foreign keys in transmitted data packets from single-parent hierarchies
KR20050091027A (en) System and method of creating and communicating with component based wireless applications
US20060234548A1 (en) Method and system for extending scripting languages
CN113419710B (en) Development method and device of applet, electronic equipment and medium
CN112667415B (en) Data calling method and device, readable storage medium and electronic equipment
KR20080023695A (en) Using messages to extend crm functionality
US8271031B2 (en) Communication between integrated device and mobile application client on mobile personal communication device
CN112181542A (en) Function calling method and device, electronic equipment and storage medium
CN112685020A (en) Method and device for dynamically creating service interface, electronic equipment and storage medium
CN109933381A (en) A kind of loading method and device of kernel
CN1853167B (en) System and method for dynamic content processing with extendable provisioning
US9141352B2 (en) Dynamically building locale objects at run-time
CN112035270A (en) Interface adaptation method, system, device, computer readable medium and electronic equipment
CN116227625A (en) Intelligent model development method, medium and equipment
US20240176600A1 (en) Intelligent Adaptation of Source Code for Multi-Purpose Compilation
CN115514611B (en) Message processing method, device, equipment and storage medium
CN113572851B (en) Remote desktop connection method based on browser
CN112445850A (en) Data conversion method and device, electronic equipment and readable medium
KR101948437B1 (en) Apparatus and method sharing customizable contents using user information of the mobile terminal
CN114936046A (en) Expansion method and device of WEB service public component, electronic equipment and storage medium

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