CN113434315A - 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
CN113434315A
CN113434315A CN202110766537.9A CN202110766537A CN113434315A CN 113434315 A CN113434315 A CN 113434315A CN 202110766537 A CN202110766537 A CN 202110766537A CN 113434315 A CN113434315 A CN 113434315A
Authority
CN
China
Prior art keywords
service
interface
configuration
file
implementation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110766537.9A
Other languages
Chinese (zh)
Other versions
CN113434315B (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

Images

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 files 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. When the extension service interface is called, the configuration of the service interface is only needed to be finely adjusted, the dependence of the service interface of the core does not need to be adjusted, and the application service cannot be influenced. Moreover, an interface foundation is provided for a core service product with stable standard, the work development and risk of adaptation expansion are migrated out of the core service, the function 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, an interface management apparatus, a computer-readable storage medium, and an electronic device.
Background
Generally, a caller designs and defines an interface, and an implementer implements the interface function. Meanwhile, a plurality of interface realizators can be provided by utilizing the characteristic of the polymorphism, so that the caller can call various realizations according to the requirement. For the SPI (Service Provider Interface) technology, three ways are usually included, namely a Service discovery mechanism built in Java JDK, a Dubbo SPI mechanism, and a Service Interface defining SPI. The service discovery mechanism realizes the function of the SPI interface, packs the function realization and places the function realization in a project, and automatically loads definition classes under a META-INF/services/file directory; loading a specified implementation class through an ExtensionLoader by a Dubbo SPI mechanism under a configuration file directory/META-INF/Dubbo; the service interface of the defined SPI calls for third party implementation via the HTTP protocol.
The SPI implementation mechanism integrates the implementation class function into the service and configures the implementation class function into a corresponding file under the implementation class and logic condition based on the completion of the SPI, and switches function calls of different logics by configuring different extension classes, which is not favorable for functional logic decoupling. Moreover, all SPI is coupled for realization, functional codes are redundant, and project output, particularly source code output, is not facilitated. Besides, the SPI technology is adaptive to different interface protocols, and the stability of the application core function is not guaranteed.
In view of the above, there is a need in the art to develop a new interface management method and apparatus.
It is to be noted that the information disclosed in the above background section is only for enhancement of 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
An object of the present disclosure is to provide an interface management method, an interface management apparatus, a computer-readable storage medium, and an electronic device, which overcome the technical problems of functional logic coupling and low functional stability due to the limitations of the related art, at least to some extent.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to a first aspect of the embodiments 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 files 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 extended interface;
and classifying and configuring the expansion interface to obtain a service interface.
In an exemplary embodiment of the present invention, the classifying and configuring the expansion interface to obtain a service interface includes:
acquiring function classification information of the original interface, and classifying the expansion interface according to the function 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 file to be configured to obtain a call configuration result and a implementation configuration result includes:
determining a calling configuration label, and performing service calling configuration on the file to be configured by using the calling configuration label to obtain a calling configuration result;
and determining a configuration implementation label, and performing service implementation configuration on the file to be configured by using the configuration implementation label to obtain a configuration implementation result.
In an exemplary embodiment of the present invention, the performing, by using the calling configuration tag, service calling configuration on the file to be configured to obtain a calling configuration result includes:
and based on the calling configuration label, performing service calling configuration on the file to be configured by using an extensible markup language to obtain a calling configuration result.
In an exemplary embodiment of the present invention, the performing service implementation configuration on the file to be configured by using the implementation configuration tag to obtain an implementation configuration result includes:
and based on the implementation configuration label, performing 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 acquiring the service data returned by the service interface includes:
acquiring original data returned by the service interface;
and encapsulating the original data to obtain service data.
According to a second aspect of the embodiments of the present invention, there is provided an interface management apparatus, including: the interface design module is configured to classify and configure the expansion interfaces to determine the 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 embodiments 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 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 exemplary embodiments described above.
As can be seen from the foregoing technical solutions, the interface management method, the interface management apparatus, the computer storage medium and the electronic device in 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, the service calling configuration and the service implementation configuration are performed on the file to be configured to obtain the calling configuration result and the implementation configuration result, so that the calling configuration and the implementation logic of the service interface are standardized, and when the calling of the service interface is extended, only the configuration of the service interface needs to be finely adjusted, the dependence of the service interface of the core does not need to be adjusted, and 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 rapidly adapted, application scenes of the interface management method are enriched, an interface basis is provided for a set of standard and stable core service products, work development and risks needing adaptation expansion are migrated out of the core service, the functional stability of the core service is ensured, corresponding projects can be rapidly 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 present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
Fig. 1 schematically illustrates a flow chart 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 an expansion interface in an exemplary embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart of a method of classifying and configuring an expansion interface in an exemplary embodiment of the present disclosure;
FIG. 4 is a flow diagram schematically illustrating a method of service invocation configuration and service implementation configuration in an exemplary embodiment of the disclosure;
fig. 5 schematically illustrates a flow chart of a method of acquiring business data in an exemplary embodiment of the disclosure;
fig. 6 is a schematic structural diagram illustrating a framework of an interface management method in an application scenario in an exemplary embodiment of the present disclosure;
FIG. 7 is a schematic structural diagram illustrating a framework for invoking a service interface in an application scenario in an exemplary embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an interface management apparatus according to 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. Example embodiments may, however, be embodied in many different 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 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 disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. 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/parts/etc.; the terms "comprising" and "having" are intended to be inclusive and mean that there may be additional elements/components/etc. other than the listed elements/components/etc.; the terms "first" and "second", etc. are used merely as labels, and are not limiting on 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 their repetitive description 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.
In order to solve the problems in the related art, the present disclosure provides 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 includes the following steps:
and S110, classifying and configuring the expansion interfaces to determine service interfaces, and extracting the service interfaces to obtain files to be configured.
And S120, carrying out 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 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, the service calling configuration and the service implementation configuration are performed on the file to be configured to obtain the calling configuration result and the implementation configuration result, the calling configuration and the implementation logic of the service interface are standardized, and when the calling of the service interface is extended, only the configuration of the service interface needs to be finely adjusted, the dependence of the service interface of the core does not need to be adjusted, and 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 rapidly adapted, application scenes of the interface management method are enriched, an interface basis is provided for a set of standard and stable core service products, work development and risks needing adaptation expansion are migrated out of the core service, the functional stability of the core service is ensured, corresponding projects can be rapidly delivered, and the project delivery efficiency is improved.
The following describes each step of the interface management method in detail.
In step S110, the expansion interfaces are classified and configured to determine a service interface, and the service interface is extracted to obtain a file to be configured.
In an exemplary embodiment of the present disclosure, the expansion interface is an interface on the main board for connecting various external devices. Through these expansion interfaces, external devices such as printers, external modems, scanners, flash disks, MP3 (players for playing music files), DC (direct current chopper), DVs, portable hard disks, mobile phones, and tablets can be connected to the computer. Moreover, the interconnection between computers can be realized through the expansion interface.
Currently, common expansion interfaces include a Serial Port (Serial Port), a parallel Port (parallel el Port), a Universal Serial Bus (USB), an IEEE 1394 interface, and the like.
In an alternative embodiment, fig. 2 shows a flowchart of a method for classifying and configuring an expansion interface, and as shown in fig. 2, the method at least includes the following steps: in step S210, an original interface is determined, and the original interface is screened to obtain an extended interface.
The original interface is all the expansion interfaces currently in use. After the original interface is determined, the more important extended interfaces can be combed according to the use scene of the core service. When combing the extended interface, it can be determined according to the importance of the functional classification of the original interface.
It is worth noting that the functionality of the extended interface requires a third party to implement. For example, the extended interface may be to invoke a crowd tag system interface to obtain a crowd tag interface.
In step S220, the service interface is obtained by classifying and configuring the expansion interface.
After the more important expansion interfaces in the original interface are sorted out, the expansion interfaces can be classified and configured.
In an alternative embodiment, fig. 3 shows a flow diagram of a method for further classifying and configuring an expansion interface, and as shown in fig. 3, the method at least includes the following steps: in step S310, the function classification information of the original interface is obtained, and the extended interfaces are classified according to the function classification information to obtain the classification interfaces.
The function classification information of the original interface may be information for characterizing functions implemented by the original interface, such as crowd function information and data function information.
After the function classification information is obtained, the sorted expansion interfaces can be classified according to the function classification information to obtain a plurality of classification interfaces. For example, the classification interface may be an SPI interface.
The SPI is a technical system provided by JAVA for third party implementation or extended use, and is also a Service provision (interface implementation) discovery mechanism built in JDK (JAVA Development Kit, JAVA Development tool), and can load classes defined therein by looking up a file through a META-INF/Service file under a ClassPath path. Therefore, SPI is a specification built under interface-oriented programming for extensible or dynamically changing implementation of components. The SPI may be used to enable the framework expansion and replacement components, for example, in the most common database connection JDBC, java. Therefore, the SPI mechanism of JAVA can search service implementation for a certain service interface, and by decoupling specific implementation and service use of the service, the expandability of a program is greatly enhanced, and the program can be plugged and unplugged.
In step S320, the classification interface is configured according to the function classification information to obtain a service interface.
Because the input parameter object, the output parameter object and the interface method of the different kinds of classification interfaces are different, the classification interfaces can be configured according to the configuration of the input parameter object, the output parameter object and the interface method required by different function classification information, so that the configured classification interfaces are determined as service interfaces.
In the exemplary embodiment, the original interface is subjected to processing procedures such as screening, classification and configuration, so that the service interface which is normalized and supports the core service product can be obtained, and the degree of functional code redundancy 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 processing may be to pack the SPI into a jar packet, that is, a file to be configured, so that the interface caller and the interface implementer perform function implementation. In addition, other extraction processing modes are also possible, and this exemplary embodiment is not particularly limited to this.
The jar packages are ZIP compressed archives of class files, each jar package has a default generated META-INF directory, and the META-INF directory is equivalent to an information package and is used for configuring application programs, extension programs, class loaders and the like.
In step S120, the service calling configuration and the service implementation configuration are performed on the file to be configured to obtain a calling configuration result and an implementation configuration result, and a target file in the file to be configured is determined according to the calling configuration result and the implementation configuration result.
In an exemplary embodiment of the present disclosure, after the file to be configured is obtained, service call configuration and service implementation configuration may be performed on the file to be configured.
In an alternative embodiment, fig. 4 shows a flowchart of a method for service invocation configuration and service implementation configuration, and as shown in fig. 4, the method at least includes the following steps: in step S410, a call configuration tag is determined, and the call configuration tag is utilized to perform service call configuration on the file to be configured to obtain a call configuration result.
When the service interface is an SPI interface, the service call configuration may be performed using a call configuration tag < jsf: consumer >. Specifically, the service call configuration may include information such as configuration id, interface, protocol, alias, and the like, and JSF provider Config (service call interface configuration of JSF) information.
And, the service calling configuration can also be carried out by using a specific language.
In an optional embodiment, based on the calling configuration tag, the extensible markup language is used to perform service calling configuration on the file to be configured to obtain a calling configuration result.
Therefore, the Language for configuring the service call to the file to be configured may be Extensible Markup Language (XML). In addition, other languages may be adopted according to the actual situation, and the exemplary embodiment is not particularly limited thereto.
In step S420, the implementation configuration tag is determined, and the implementation configuration tag is used to perform service implementation configuration on the to-be-configured file to obtain an implementation configuration result.
When the service interface is an SPI interface, the service implementation configuration may be performed by using an implementation configuration tag < jsf: provider >. Specifically, the service implementation configuration may include JSF Provider configuration (service interface implementation configuration of JSF) information such as configuration id, interface, alias, ref, and the like.
It should be noted that when the jsf (javaserver faces) framework is adopted, the registration service addresses and protocols such as < jsf: registry > and < jsf: server > need to be configured in advance.
And, the service implementation configuration can also be carried out by using a specific mark-up language.
In an optional 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.
Therefore, the language for configuring the service implementation of the file to be configured may be XML. In addition, other languages may be adopted according to the actual situation, and the exemplary embodiment is not particularly limited thereto.
In the exemplary embodiment, the service calling configuration and the service implementation configuration are performed on the file to be configured, and data support is provided for calling the service interface.
After the service calling configuration and the service implementation configuration are performed on the file to be configured to obtain the corresponding calling configuration result and implementation configuration result, the target file in the file to be configured can be determined according to the calling configuration result and the implementation configuration result.
It should be noted that the definition of the SPI interface is that the caller, and after 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 the specific implementation class of the interface. When other programs need the service, the JSF service discovery mechanism can search the configuration file in the META-INF/services (the object file) of the jar packet (generally, the jar packet is used as a dependency), namely the object file. The configuration file has a specific implementation class name of the interface, and the service can be used by loading and instantiating according to the class name. The tool classes for lookup service implementation in JDK (JAVA development tool) are: java.util.serviceloader.
When service instantiation is performed, a service instance may be obtained through a service annotation mode @ automated, or may be obtained in other modes, which is not particularly limited in this exemplary embodiment.
In step S130, the service interface is called according to the target file to obtain the service data returned by the service interface.
In an exemplary embodiment of the present disclosure, after the target file is determined, the corresponding service interface may be called to obtain the service data returned by the interface.
In an alternative embodiment, fig. 5 shows a flowchart of a method for acquiring service data, as shown in fig. 5, the method at least includes the following steps: in step S510, original data returned by the service interface is obtained.
After the service interface of the third party is called, 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 requirements of the current service platform, so that the original data can be encapsulated to obtain service data meeting the requirements.
For example, the number of service data required by the current service platform is 4, but the total number of the original data returned by the service interface is 10, so that 10 entries in the original data can be encapsulated to obtain service data meeting the requirements of 4 data entries.
In the exemplary embodiment, by encapsulating the original data, the service data adapted to the current service platform can be obtained, the service data of the core service is standardized, the function stability and the data format of the core service are ensured, and the delivery efficiency of the corresponding project is improved.
The following describes an interface management method in the embodiment of the present disclosure in detail with reference to an application scenario.
Fig. 6 shows a schematic structural diagram of a framework of an interface management method in an application scenario, and as shown in fig. 6, the framework of the interface management method includes a caller service platform and an implementer third party implementer.
Generally, a service platform directly calls a service interface of a 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 the SPI can be introduced, and the development interface realization function can be completed according to SPI development documents.
When the service interface is an SPI interface, the service implementation configuration may be performed by using an implementation configuration tag < jsf: provider >. Specifically, the service implementation configuration may include JSF Provider configuration (service interface implementation configuration of JSF) information such as configuration id, interface, alias, ref, and the like.
It should be noted that when the jsf (javaserver faces) framework is adopted, the registration service addresses and protocols such as < jsf: registry > and < jsf: server > need to be configured in advance.
And, the language for configuring the service implementation of the file to be configured may be XML.
Furthermore, calling the corresponding service interface to acquire the service data returned by the interface.
First, after calling a service interface of a third party, the service interface may return corresponding original data.
Then, the original data returned by the service interface may not meet the requirements of the current service platform, so that the original data can be encapsulated to obtain service data meeting the requirements.
For example, the number of service data required by the current service platform is 4, but the total number of the original data returned by the service interface is 10, so that 10 entries in the original data can be encapsulated to obtain service data meeting the requirements of 4 data entries.
Fig. 7 shows a schematic structural diagram of a framework for calling a service interface in an application scenario, and as shown in fig. 7, in a core service platform, in addition to using a JSF framework to call an SPI interface to implement an interface function extension of an SP I, the framework may be replaced by an HTTP (Hypertext Transfer protocol) interface protocol or a Dubbo (open source distributed service framework) interface protocol. In addition, other interface protocols may be substituted, and the exemplary embodiment is not particularly limited thereto.
When the SPI frame is replaced by an HTTP interface protocol, a business interface of a third party can be called by using the HTTP interface protocol; when the SPI frame is replaced by an HTTP interface protocol, a 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, other interface protocols may be used to call a third party's service interface.
In the application scenario of the present disclosure, the service calling configuration and the service implementation configuration are performed on the file to be configured to obtain the calling configuration result and the implementation configuration result, so that the calling configuration and the implementation logic of the service interface are standardized, and when the calling of the service interface is extended, only the configuration of the service interface needs to be finely adjusted, the service interface dependency of the core does not need to be adjusted, and 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 rapidly adapted, application scenes of the interface management method are enriched, an interface basis is provided for a set of standard and stable core service products, work development and risks needing adaptation expansion are migrated out of the core service, the functional stability of the core service is ensured, corresponding projects can be rapidly delivered, and the project delivery efficiency is improved.
Further, in an exemplary embodiment of the present disclosure, an interface management apparatus is also provided. Fig. 8 shows a schematic structural diagram of the 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 files 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; and the interface calling module 830 is configured to call the service interface according to the target file to obtain the 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 extended interface;
and classifying and configuring the expansion interface to obtain a service interface.
In an exemplary embodiment of the present invention, the classifying and configuring the expansion interface to obtain a service interface includes:
acquiring function classification information of the original interface, and classifying the expansion interface according to the function 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 file to be configured to obtain a call configuration result and a implementation configuration result includes:
determining a calling configuration label, and performing service calling configuration on the file to be configured by using the calling configuration label to obtain a calling configuration result;
and determining a configuration implementation label, and performing service implementation configuration on the file to be configured by using the configuration implementation label to obtain a configuration implementation result.
In an exemplary embodiment of the present invention, the performing, by using the calling configuration tag, service calling configuration on the file to be configured to obtain a calling configuration result includes:
and based on the calling configuration label, performing service calling configuration on the file to be configured by using an extensible markup language to obtain a calling configuration result.
In an exemplary embodiment of the present invention, the performing service implementation configuration on the file to be configured by using the implementation configuration tag to obtain an implementation configuration result includes:
and based on the implementation configuration label, performing 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 acquiring the service data returned by the service interface includes:
acquiring original data returned by the service interface;
and encapsulating the original data to obtain service data.
The details of the interface management apparatus 800 are described in detail in the corresponding interface management method, and therefore are not described herein again.
It should be noted that although several modules or units of the interface management device 800 are mentioned in the above detailed description, such division 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, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
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 only an example and should not bring any limitations to the function and scope of use of the 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 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 to cause the processing unit 910 to perform steps according to various exemplary embodiments of the present invention described in the above section "exemplary methods" of the present specification.
The storage unit 920 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)921 and/or a cache memory unit 922, and may further include a read only memory unit (ROM) 923.
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 of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 930 can be any 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 devices (e.g., router, modem, etc.) that enable the electronic device 900 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interface 950. Also, the electronic device 900 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) via the network adapter 960. As shown, the network adapter 960 communicates with the other modules of the electronic device 900 via the bus 930. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, 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 (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above-mentioned "exemplary methods" section of the present description, when said program product is run on the terminal device.
Referring to fig. 10, a program product 1000 for implementing the above 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 in this regard and, in the present 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. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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 for aspects 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 and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, 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., through 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 variations, 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 (10)

1. A method for interface management, the method comprising:
classifying and configuring the expansion interfaces to determine service interfaces, and extracting the service interfaces to obtain files 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.
2. The interface management method according to claim 1, wherein the classifying and configuring the extended interfaces to determine the service interfaces comprises:
determining an original interface, and screening the original interface to obtain an extended interface;
and classifying and configuring the expansion interface to obtain a service interface.
3. The interface management method according to claim 2, wherein the classifying and configuring the extended interface to obtain a service interface comprises:
acquiring function classification information of the original interface, and classifying the expansion interface according to the function classification information to obtain a classification interface;
and configuring the classification interface according to the function classification information to obtain a service interface.
4. The interface management method according to claim 1, wherein the performing service call configuration and service implementation configuration on the file to be configured to obtain a call configuration result and a implementation configuration result includes:
determining a calling configuration label, and performing service calling configuration on the file to be configured by using the calling configuration label to obtain a calling configuration result;
and determining a configuration implementation label, and performing service implementation configuration on the file to be configured by using the configuration implementation label to obtain a configuration implementation result.
5. The interface management method according to claim 4, wherein the performing service call configuration on the file to be configured by using the call configuration tag to obtain a call configuration result includes:
and based on the calling configuration label, performing service calling configuration on the file to be configured by using an extensible markup language to obtain a calling configuration result.
6. The interface management method according to claim 4, wherein the performing service implementation configuration on the file to be configured by using the implementation configuration tag to obtain an implementation configuration result includes:
and based on the implementation configuration label, performing service implementation configuration on the file to be configured by using an extensible markup language to obtain an implementation configuration result.
7. The interface management method according to claim 1, wherein the acquiring the service data returned by the service interface includes:
acquiring original data returned by the service interface;
and encapsulating the original data to obtain service data.
8. An interface management apparatus, comprising:
the interface design module is configured to classify and configure the expansion interfaces to determine the 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.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the interface management method according to any one of claims 1 to 7.
10. 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 one of claims 1-7 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 true CN113434315A (en) 2021-09-24
CN113434315B 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)

Cited By (2)

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

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030112275A1 (en) * 2001-12-19 2003-06-19 Lorraine Proulx Dynamically configurable human-machine interface
US20060080443A1 (en) * 2004-08-31 2006-04-13 Microsoft Corporation URL namespace to support multiple-protocol processing within worker processes
US20060112372A1 (en) * 2004-11-18 2006-05-25 International Business Machines Corporation Method, system and program product for implementing java server page (JSP) containers as java server faces (JSF) components
US20070005642A1 (en) * 2005-07-01 2007-01-04 Microsoft Corporation Modification of logic in an application
US20140040438A1 (en) * 2010-08-26 2014-02-06 Adobe Systems Incorporated Dynamic configuration of applications deployed in a cloud
US20150040063A1 (en) * 2011-11-23 2015-02-05 Zte Corporation Method, device and terminal for generating logic service for embedded terminal
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

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030112275A1 (en) * 2001-12-19 2003-06-19 Lorraine Proulx Dynamically configurable human-machine interface
US20060080443A1 (en) * 2004-08-31 2006-04-13 Microsoft Corporation URL namespace to support multiple-protocol processing within worker processes
US20060112372A1 (en) * 2004-11-18 2006-05-25 International Business Machines Corporation Method, system and program product for implementing java server page (JSP) containers as java server faces (JSF) components
US20070005642A1 (en) * 2005-07-01 2007-01-04 Microsoft Corporation Modification of logic in an application
US20140040438A1 (en) * 2010-08-26 2014-02-06 Adobe Systems Incorporated Dynamic configuration of applications deployed in a cloud
US20150040063A1 (en) * 2011-11-23 2015-02-05 Zte Corporation Method, device and terminal for generating logic service for embedded terminal
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

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHANGFANG2714: "JSF基础知识", pages 1 - 6, Retrieved from the Internet <URL:《https://blog.csdn.net/u012472945/article/details/80267810》> *

Cited By (3)

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

Also Published As

Publication number Publication date
CN113434315B (en) 2024-05-17

Similar Documents

Publication Publication Date Title
US9619304B2 (en) Automatic connections between application components
WO2020063019A1 (en) Information processing method, device, storage medium, electronic device and system
CN109643252B (en) Middleware interface and middleware interface generator
US7720953B2 (en) System and method of data source detection
US20080270999A1 (en) System And Method For Extending Capabilities And Execution Efficiency Of Script Based Applications
US20140136717A1 (en) Configuring cloud resources
CN110032392B (en) Service management method and device, storage medium and electronic equipment
CN110309005B (en) Function calling method and device, terminal equipment and storage medium
CN110309006B (en) Function calling method and device, terminal equipment and storage medium
CN113434315B (en) Interface management method and device, storage medium and electronic equipment
KR20050091027A (en) System and method of creating and communicating with component based wireless applications
CN110351134A (en) A kind of server environment switching method, device and electronic equipment
CN113419710B (en) Development method and device of applet, electronic equipment and medium
CN112181542A (en) Function calling method and device, electronic equipment and storage medium
CN1853167B (en) System and method for dynamic content processing with extendable provisioning
CN112685020A (en) Method and device for dynamically creating service interface, electronic equipment and storage medium
CN113626095A (en) Switching method and switching system of configuration center, electronic equipment and storage medium
CN116227625A (en) Intelligent model development method, medium and equipment
CN110275701A (en) Data processing method, device, medium and calculating equipment
CN108459884A (en) Closing application program method, apparatus, storage medium and electronic equipment
CN111612501B (en) Information generation method and device based on strategy multiplexing and electronic equipment
US20100223595A1 (en) Method, apparatus and system for supporting polymorphic elements at run-time in portable computing devices
CN113572851B (en) Remote desktop connection method based on browser
CN111680032B (en) Method and device for processing information sending task and electronic equipment
WO2024001569A1 (en) Network configuration method and apparatus, storage medium and electronic apparatus

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