CN113779467A - Method and device for visualizing functional component management - Google Patents

Method and device for visualizing functional component management Download PDF

Info

Publication number
CN113779467A
CN113779467A CN202110009561.8A CN202110009561A CN113779467A CN 113779467 A CN113779467 A CN 113779467A CN 202110009561 A CN202110009561 A CN 202110009561A CN 113779467 A CN113779467 A CN 113779467A
Authority
CN
China
Prior art keywords
module
interface
api
instruction request
functional
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.)
Pending
Application number
CN202110009561.8A
Other languages
Chinese (zh)
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202110009561.8A priority Critical patent/CN113779467A/en
Publication of CN113779467A publication Critical patent/CN113779467A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method and a device for visual component management, and relates to the technical field of computers. One embodiment of the method comprises: receiving an instruction request of an application program by using an HTTP interface; calling a function module corresponding to the instruction request through an API (application programming interface) interface to acquire response result data corresponding to the instruction request; and returning the response result data by utilizing an HTTP interface. The implementation mode can solve the problems of access and cross-domain of non-WEB type application by providing HTTP interface capability, and achieves the technical effect of compatible adaptation to different application programs; by adopting the universal API interface, the problem that the access development cost is high due to the API difference of the existing functional components can be solved, and the technical effect of non-differentiation access is achieved.

Description

Method and device for visualizing functional component management
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for managing visual functional components.
Background
With the increasing demand of people, more and more functions need to be supported by the application programs. However, due to development time and maintenance cost considerations, and similar functionality required in many applications, applications need the ability to support integrated external functionality while meeting the requirements of fast iterative development.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
the style of the same function in different application programs is difficult to unify, and a strange feeling is brought when the same function of different application programs is used; it is often desirable that the application be a WEB-type application, and that non-WEB-type applications not be accessible.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for managing a visual function component, which can solve the problem of access and cross-domain of non-WEB applications by providing HTTP interface capability, so as to achieve the technical effect of compatibly adapting to different application programs; by adopting the universal API interface, the problem that the access development cost is high due to the API difference of the existing functional components can be solved, and the technical effect of non-differentiation access is achieved.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method for visualizing functional component management, including:
receiving an instruction request of an application program by using an HTTP interface;
calling a function module corresponding to the instruction request through an API (application programming interface) interface to acquire response result data corresponding to the instruction request;
and returning the response result data by utilizing an HTTP interface.
Optionally, the instruction request includes: module identification; before calling the function module corresponding to the instruction request through the API, the method further comprises the following steps:
registering module identifications of all functional modules of the visual functional assembly and mapping relations among the implementation objects of the functional modules, and determining the implementation objects of the functional modules corresponding to the instruction requests according to the module identifications and the mapping relations.
Optionally, a listener is started based on an application in the Spring framework, an access application implementation class is loaded according to the SPI mechanism, and the module identifiers of the functional modules and the mapping relationship between the implementation objects are registered.
Optionally, the mapping relationship is stored in a Map type format, where a Key is a module identifier, and a Value is an implementation object of a function module.
Optionally, before registering the module identifier of each function module of the visualization function module and the mapping relationship between the implementation objects thereof, the method further includes:
and acquiring the module identification, token information and dependent service configuration information of each functional module corresponding to the application program according to the configuration information.
Optionally, the visualization function component designs the abstract class by using a template method.
Optionally, the visualization function component uses an integrated JAR package local method call.
According to still another aspect of the embodiments of the present invention, there is provided an apparatus for visualizing functional component management, including: a WEB module and an API module; wherein the content of the first and second substances,
the WEB module receives an instruction request of an application program by utilizing an HTTP interface;
the API module calls a function module corresponding to the instruction request through an API interface to acquire response result data corresponding to the instruction request;
and the WEB module returns the response result data by utilizing an HTTP interface.
Optionally, the instruction request includes: module identification; the device further comprises: an initialization module and a context module;
the initialization module registers module identification of each function module of the visual function assembly and mapping relation between the realization objects thereof to the context module, and the context module determines the realization object of the function assembly corresponding to the instruction request according to the module identification and the mapping relation.
Optionally, the initialization module starts a listener based on an application in a Spring framework, loads an access application implementation class according to an SPI mechanism, and registers a module identifier of each functional module and a mapping relationship between implementation objects thereof.
Optionally, the mapping relationship is stored in a Map type format, where a Key is a module identifier, and a Value is an implementation object of a function module.
Optionally, the apparatus further includes a configuration module, configured to store configuration information of each function module corresponding to the application program;
the initialization module is further configured to: before registering the module identifiers of the functional modules of the visual functional assembly and the mapping relationship between the functional modules and the realization objects thereof, the module identifiers, token information and dependent service configuration information of the functional modules corresponding to the application program are obtained according to the configuration information.
Optionally, the visualization function component designs the abstract class by using a template method.
Optionally, the visualization function component uses an integrated JAR package local method call.
According to another aspect of the embodiments of the present invention, there is provided an electronic device for visualizing functional component management, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for visualization function component management provided by the present invention.
According to a further aspect of the embodiments of the present invention, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the method for visualization functional component management provided by the present invention.
One embodiment of the above invention has the following advantages or benefits: by providing HTTP interface capability, the access and cross-domain problems of non-WEB type application can be solved, and the technical effect of compatible adaptation to different application programs is achieved; by adopting the universal API interface, the problem that the access development cost is high due to the API difference of the existing functional components can be solved, and the technical effect of non-differentiation access is achieved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is an exemplary system architecture diagram of a method of visual functional component management or apparatus of visual functional component management suitable for application to embodiments of the present invention;
FIG. 2 is a schematic illustration of a main flow of a method of visualization functional component management according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of the main modules of an apparatus for visualizing functional component management according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of the main components of an apparatus for visual functional component management in an alternative embodiment of the present invention;
FIG. 5 is a sequence diagram illustrating the cooperative processing of the modules of the apparatus for visual function component management in an alternative embodiment of the present invention;
FIG. 6 is a schematic illustration of an initialization process of an apparatus for visual function component management in an alternative embodiment of the present invention;
fig. 7 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 shows an exemplary system architecture diagram of a method for managing a visual function component or an apparatus for managing a visual function component, which is applicable to the embodiment of the present invention, and as shown in fig. 1, the exemplary system architecture of the method for managing a visual function component or the apparatus for managing a visual function component of the embodiment of the present invention includes:
as shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for shopping-like websites browsed by users using the terminal devices 101, 102, 103. The backend management server may analyze and otherwise process data such as the received product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal devices 101, 102, and 103.
It should be noted that the method for managing a visual function component provided by the embodiment of the present invention is generally executed by the server 105, and accordingly, an apparatus for managing a visual function component is generally disposed in the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 is a schematic diagram of a main flow of a method for managing a visualization function component according to an embodiment of the present invention, and as shown in fig. 2, the method for managing a visualization function component includes: step S201, step S202, and step S203.
Step S201, receiving an instruction request of an application program by using an HTTP interface.
The HTTP (HyperText Transfer Protocol) interface may include an HTTP Server (a lightweight HTTP Server based on nodejs) that is custom-implemented based on a Netty (Java open source framework) framework, and an HTTP Servlet (an abstract class of Servlet interface) implementation class with a specific function. The self-defined HTTP Server and the specific HTTP servlet realize the capability of forwarding the specific request parameters to the specific functional components by the intra-class depending routing.
The application program can call the visual function component of the third party to realize the corresponding function of the third party. If the function of the third party is realized by relying on a webpage entrance provided by the third party and the functions provided by all the third parties are completed in a closed loop in the webpage, the scheme is mainly to add a menu in the webpage of the target application to navigate to the third party application in the practical development, and the target application is required to be a WEB type application. The invention can solve the access problem of non-WEB type application by receiving the instruction request of the application program by utilizing the HTTP interface, can achieve the technical effect of compatible adaptation to different application programs, and can support cross-domain.
Step S202, calling a function module corresponding to the instruction request through an API (application programming interface) interface, and acquiring response result data corresponding to the instruction request.
An API (Application Programming Interface), also called an Application Programming Interface, is a set of definitions, programs and protocols, and realizes the mutual communication between computer software through the API Interface. One of the primary functions of an API is to provide a common set of functions. The API is also a middleware and provides data sharing for various platforms. During the development process, the problem is abstracted into the API, and various implementations can be provided for the API. If a new implementation is required to be provided for the API, a new JAR package can be directly generated without modifying the original code, and the new implementation of the API is provided in the JAR package. The invention calls the third-party service by adopting the API interface, can reduce the coupling degree between the application program and the third-party system, and conveniently achieves the purposes of one-site development, everywhere use and reuse.
When the functions of the third party are integrated, if the third party service is called by relying on an RPC interface or an API JAR package provided by the third party, the HTTP interface which needs the target application to provide adaptation can be called for the front-end webpage, and the third party service is remotely called or locally called in the HTTP interface. Because a target application development terminal webpage interface is needed, the style of the same function in different application programs is difficult to unify, and a strange feeling is brought when the same function of a third party is used in different application programs. In addition, the difference of the external functional interfaces also brings difficulty and workload of access adaptation to the application program, resulting in high access development cost. By adopting the universal API interface, the problem of high access development cost caused by the API difference of the existing functional components can be solved, and the technical effect of non-differentiation access is achieved.
And step S203, returning the response result data by utilizing the HTTP interface.
The invention develops an independent function into an independent component, thus being convenient to achieve the aim of multiplexing of development and use everywhere. By determining the responsibility and the boundary between the application programs, the visual interface of the external function is provided by the implementer of the external function, so that the unification of the style and the functionality can be realized, and the technical effect of non-differentiation access is achieved. By providing the universal access capability for different application programs, unnecessary development during accessing external functions can be avoided, and the access development cost is reduced.
The instruction request refers to a request issued when the application program calls a third-party service, such as a data request, a static resource request (a request of a webpage css, js, a picture, a file and the like in the application), a home entry request (a request home) and the like. The instruction request comprises the module identification of the called third-party function module. A functional component may comprise a plurality of functional modules. Before calling the function module corresponding to the instruction request through the API interface, the method may further include: registering module identifications of all functional modules of the visual functional assembly and mapping relations among the implementation objects of the functional modules, and determining the implementation objects of the functional modules corresponding to the instruction requests according to the module identifications and the mapping relations. Illustratively, the mapping relationship between the module identification of the functional module that can be used by the application and the implementation object thereof is registered in advance. Through the pre-registration, the implementation object corresponding to the instruction request can be quickly determined. The storage format of the mapping relationship may be selectively set according to an actual situation, and optionally, the mapping relationship is stored in a Map type format, where the Key is a module identifier, and the Value is an implementation object of the function module.
Optionally, based on an application start listener in a Spring (an open source Java platform) framework, an access application implementation class is loaded according to an SPI (Service Provider Interface, which is a Java built-in Service discovery mechanism) mechanism, and a mapping relationship between a module identifier of each functional module and an implementation object thereof is registered. The decoupling is realized through the SPI mechanism of Java, so that the assembly logic of the third-party service is separated from the service code, the dynamic expansion of the framework can be realized, and the third-party service can be embedded into the system like a plug-in.
Optionally, before registering the module identifier of each functional module and the mapping relationship between the implementation objects thereof, the method further includes: and acquiring the module identification, token information and dependent service configuration information of each functional module corresponding to the application program according to the configuration information. The registration accuracy and efficiency can be improved by storing the configuration information and registering according to the configuration information.
Optionally, the visualization function component designs the abstract class by using a template method. The template method is a design pattern in Java, and the template algorithm defines the skeleton of an algorithm and allows subclasses to provide implementations for one or more steps. The template method allows subclasses to redefine certain steps of the algorithm without changing the algorithm structure. By adopting the template algorithm, the reusability and expansibility of the algorithm of the visual function module can be improved.
Optionally, the visualization function component uses an integrated JAR package local method call. By using the local method calling mode of the integrated JAR packet, higher performance can be obtained, and network overhead is reduced.
According to still another aspect of an embodiment of the present invention, there is provided an apparatus for implementing the above method.
Fig. 3 is a schematic diagram of main modules of an apparatus for visualizing functional component management according to an embodiment of the present invention. As shown in fig. 3, the apparatus 300 for visualizing functional component management includes: a WEB module 301 and an API module 302; wherein the content of the first and second substances,
the WEB module 301 receives an instruction request of an application program by using an HTTP interface;
the API module 302 calls a function module corresponding to the instruction request through an API interface to obtain response result data corresponding to the instruction request;
the WEB module 301 returns the response result data by using an HTTP interface.
Optionally, the instruction request includes: module identification; the device further comprises: an initialization module 304 and a context module 303;
the initialization module registers module identification of each function module of the visual function assembly and mapping relation between the realization objects thereof to the context module, and the context module determines the realization object of the function module corresponding to the instruction request according to the module identification and the mapping relation.
Optionally, the initialization module starts a listener based on an application in a Spring framework, loads an access application implementation class according to an SPI mechanism, and registers a module identifier of each functional module and a mapping relationship between implementation objects thereof.
Optionally, the mapping relationship is stored in a Map type format, where a Key is a module identifier, and a Value is an implementation object of a function module.
Optionally, the apparatus further includes a configuration module 305, configured to store configuration information of each function module corresponding to the application program;
the initialization module is further configured to: and before registering the module identification of each functional module and the mapping relation between the realization objects thereof, acquiring the module identification, token information and dependent service configuration information of each functional module corresponding to the application program according to the configuration information.
Optionally, the visualization function component designs the abstract class by using a template method.
Optionally, the visualization function component uses an integrated JAR package local method call.
Fig. 4 is a schematic diagram of the main components of an apparatus for visual function component management in an alternative embodiment of the present invention. As shown in fig. 4, the apparatus for visualizing functional component management includes a WEB module, an API module, a context module, a routing module, a configuration module, and an initialization module.
A WEB module: the module mainly provides HTTP interface capability, and an HTTP Server realized on the basis of a Netty framework and an HTTP servlet realization class with specific functions are arranged in the module. The HTTP Server and the specific HTTP servlet implementation class are customized, and the capability of forwarding the specific request parameters to the specific function module is realized by the routing module inside.
An API module: the module is mainly an API interface defining a functional component, and is embodied as abstract gwservelets and abstract terminal inalService in a template method design mode in the embodiment. Abstract TerminalService this abstract class defines the abstract method required by the functional component: the method comprises a service processing method, an entrance navigation method, a method for returning an initialized configuration file name and a component initialization method. The self-defined HTTP Server and the specific HTTP servlet realize the capability of forwarding the specific request parameters to the specific function module by relying on the routing module inside the class. The class Abstra ctGwServet provides an abstract method for injecting an AbstractTerminalService object and a method for calling the AbstractTerminalService object in the method of DoGet and DoPost. Instruction types are also defined in this module: data requests, static resource requests (requests for in-application web pages css, js, pictures, files, etc.), home entry requests (request home).
A context module: the module mainly records the information of the functional modules which can be used by the application program and stores the information in a Map type format. Key is the name of the function module, and Value is the object for realizing the corresponding function module.
A routing module: the module is mainly a module name parameter in an HTTP request parameter, and a specific function module is positioned from a context module. And positioning to a specific service logic processing method according to the instruction parameters in the HTTP request parameters.
A configuration module: the module mainly provides the configuration information acquisition required by the functional components. The configuration information is read from the properties configuration file for the specified configuration. The configuration items comprise module names of the components, token information of the modules, service configuration information required to be depended by the components and the like.
An initialization module: the module is mainly based on an application start monitor provided in a Spring framework, then an Abstract terminalService implementation class accessed into an application program is loaded according to an SPI mechanism, an initialization method defined in the class is called to complete the initialization work of the component, and the module name and the implementation object of the module are registered in a context module in the initialization process.
As shown in fig. 5, the WEB browser transmits an HTTP request to the WEB module. The context module queries a module (namely an implementation object of the component) of the component according to the module name and returns the module to the WEB module, a business method is queried and executed according to the instruction parameter, business method response data is returned to the WEB module, and the WEB module generates HTTP response data and returns the HTTP response data to the WEB browser.
As shown in fig. 6, after Spring is started, the functional component list is loaded, module registration is performed after the functional component is initialized, and then initialization is completed.
The implementation scheme of the visual functional component in this embodiment provides API interface definition to achieve the purpose of access non-differentiation, and is compatible with and adapted to different application programs through a WEB module. The built-in general logic control of the functional component is realized through the template method mode, and an abstract method is provided for the implementer of the functional component to realize extension.
Fig. 7 is a schematic structural diagram of a computer system suitable for implementing a terminal device according to an embodiment of the present invention, and as shown in fig. 7, a computer system 700 of a terminal device according to an embodiment of the present invention includes:
a Central Processing Unit (CPU)701 is included, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data necessary for the operation of the system 700 are also stored. The CPU701, the ROM702, and the RAM703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer 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 of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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. In the present invention, a computer 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. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer 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 computer readable signal medium may also be any computer readable medium that is not a computer 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 computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a WEB module, an API module, a context module, a routing module, a configuration module, and an initialization module. The names of these modules do not limit the modules themselves in some cases, for example, a WEB module may also be described as a "module that calls a function module corresponding to the instruction request through an API interface".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: receiving an instruction request of an application program by using an HTTP interface; calling a function module corresponding to the instruction request through an API (application programming interface) interface to acquire response result data corresponding to the instruction request; and returning the response result data by utilizing an HTTP interface.
According to the technical scheme of the embodiment of the invention, the access and cross-domain problems of non-WEB type application can be solved by providing HTTP interface capability, so that the technical effect of compatible adaptation to different application programs is achieved; by adopting the universal API interface, the problem that the access development cost is high due to the API difference of the existing functional components can be solved, and the technical effect of non-differentiation access is achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for visualizing functional component management, comprising:
receiving an instruction request of an application program by using an HTTP interface;
calling a function module corresponding to the instruction request through an API (application programming interface) interface to acquire response result data corresponding to the instruction request;
and returning the response result data by utilizing an HTTP interface.
2. The method of claim 1, wherein the instruction request comprises: module identification; before calling the function module corresponding to the instruction request through the API, the method further comprises the following steps:
registering module identifications of all functional modules of the visual functional assembly and mapping relations among the implementation objects of the functional modules, and determining the implementation objects of the functional modules corresponding to the instruction requests according to the module identifications and the mapping relations.
3. The method according to claim 2, wherein based on an application start listener in a Spring framework, loading access application implementation classes according to an SPI mechanism, and registering a mapping relationship between module identifiers of respective function modules and implementation objects thereof.
4. The method of claim 2, wherein the mapping relationship is stored in a Map type format, wherein the Key is a module identifier and the Value is an implementation object of the function module.
5. The method of claim 2, wherein prior to registering a mapping relationship between module identifications of respective functional modules of a visual functional component and their implementation objects, further comprising:
and acquiring the module identification, token information and dependent service configuration information of each functional module corresponding to the application program according to the configuration information.
6. The method of claim 1, the visualization functionality component employs a template approach to design abstract classes.
7. The method of any of claims 1-6, wherein the visualization function component uses integrated JAR package native method calls.
8. An apparatus for visualizing functional component management, comprising: a WEB module and an API module; wherein the content of the first and second substances,
the WEB module receives an instruction request of an application program by utilizing an HTTP interface;
the API module calls a function module corresponding to the instruction request through an API interface to acquire response result data corresponding to the instruction request;
and the WEB module returns the response result data by utilizing an HTTP interface.
9. An electronic device for visual functional component management, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202110009561.8A 2021-01-05 2021-01-05 Method and device for visualizing functional component management Pending CN113779467A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110009561.8A CN113779467A (en) 2021-01-05 2021-01-05 Method and device for visualizing functional component management

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110009561.8A CN113779467A (en) 2021-01-05 2021-01-05 Method and device for visualizing functional component management

Publications (1)

Publication Number Publication Date
CN113779467A true CN113779467A (en) 2021-12-10

Family

ID=78835399

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110009561.8A Pending CN113779467A (en) 2021-01-05 2021-01-05 Method and device for visualizing functional component management

Country Status (1)

Country Link
CN (1) CN113779467A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770269A (en) * 2017-10-20 2018-03-06 平安科技(深圳)有限公司 A kind of service response method and its terminal
CN110457143A (en) * 2019-07-25 2019-11-15 腾讯科技(深圳)有限公司 The call method and device of micro services
CN111045833A (en) * 2018-10-15 2020-04-21 北京京东尚科信息技术有限公司 Interface calling method and device
CN111176761A (en) * 2019-12-23 2020-05-19 中国联合网络通信集团有限公司 Micro-service calling method and device
CN112100561A (en) * 2020-11-03 2020-12-18 南京研利科技有限公司 Method, electronic device and storage medium for calling local function by webpage

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770269A (en) * 2017-10-20 2018-03-06 平安科技(深圳)有限公司 A kind of service response method and its terminal
CN111045833A (en) * 2018-10-15 2020-04-21 北京京东尚科信息技术有限公司 Interface calling method and device
CN110457143A (en) * 2019-07-25 2019-11-15 腾讯科技(深圳)有限公司 The call method and device of micro services
CN111176761A (en) * 2019-12-23 2020-05-19 中国联合网络通信集团有限公司 Micro-service calling method and device
CN112100561A (en) * 2020-11-03 2020-12-18 南京研利科技有限公司 Method, electronic device and storage medium for calling local function by webpage

Similar Documents

Publication Publication Date Title
CN110019080B (en) Data access method and device
US20050172282A1 (en) System and method for publishing and accessing application APIs on a generic terminal
CN111460129B (en) Method, device, electronic equipment and storage medium for generating identification
CN112507005B (en) Method and device for processing message
CN111045833A (en) Interface calling method and device
CN111309375B (en) Method, device, medium and electronic equipment for generating remote procedure call toolkit
CN112202744B (en) Multi-system data communication method and device
US11882154B2 (en) Template representation of security resources
CN110704200A (en) Method and device for converting call interface
CN110795741A (en) Method and device for carrying out security processing on data
CN110795135A (en) Method and device for realizing injection-resolution configuration
CN109981546B (en) Method and device for acquiring remote call relation between application modules
CN110619101B (en) Method and apparatus for processing information
CN113779122B (en) Method and device for exporting data
CN113779467A (en) Method and device for visualizing functional component management
CN115080274A (en) Service processing method, device and system and interface mapping system
CN112995005B (en) Virtual network data exchange method and device
CN111488286B (en) Method and device for independently developing Android modules
CN114398035A (en) Method, apparatus, device and computer readable medium for providing service using component
CN110765445B (en) Method and device for processing request
CN113765983A (en) Site service deployment method and device
CN109669679B (en) Service detection and processing method and device and electronic equipment
CN112905273A (en) Service calling method and device
CN113778566A (en) Native application calling method and device, electronic equipment and computer readable medium
CN113556370A (en) Service calling method and device

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