CN113515389A - Calling method, device and system of intermediate interface, storage medium and electronic device - Google Patents

Calling method, device and system of intermediate interface, storage medium and electronic device Download PDF

Info

Publication number
CN113515389A
CN113515389A CN202010272902.6A CN202010272902A CN113515389A CN 113515389 A CN113515389 A CN 113515389A CN 202010272902 A CN202010272902 A CN 202010272902A CN 113515389 A CN113515389 A CN 113515389A
Authority
CN
China
Prior art keywords
capability
interface
target
calling
pointer
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
CN202010272902.6A
Other languages
Chinese (zh)
Other versions
CN113515389B (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.)
Qianxin Technology Group Co Ltd
Qianxin Safety Technology Zhuhai Co Ltd
Original Assignee
Qianxin Technology Group Co Ltd
Qianxin Safety Technology Zhuhai 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 Qianxin Technology Group Co Ltd, Qianxin Safety Technology Zhuhai Co Ltd filed Critical Qianxin Technology Group Co Ltd
Priority to CN202010272902.6A priority Critical patent/CN113515389B/en
Publication of CN113515389A publication Critical patent/CN113515389A/en
Application granted granted Critical
Publication of CN113515389B publication Critical patent/CN113515389B/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/547Remote procedure calls [RPC]; Web services
    • G06F9/548Object oriented; Remote method invocation [RMI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/549Remote execution

Abstract

The invention provides a calling method, a calling device, a calling system and an calling device of an intermediate interface, wherein the method comprises the following steps: receiving a capability calling request from a capability requiring party, wherein the capability calling request carries a capability identifier; matching a target interface pointer according to the capability identifier, wherein the target interface pointer points to an interface implementation file for implementing target capability, and the capability identifier corresponds to the target capability; and feeding back the target interface pointer to the capability demander. The invention solves the technical problem of high difficulty in service integration caused by code and logic coupling in the related technology.

Description

Calling method, device and system of intermediate interface, storage medium and electronic device
Technical Field
The invention relates to the field of network security, in particular to a method, a device, a system, a storage medium and an electronic device for calling an intermediate interface.
Background
In the related art, as the functions of products are more and more abundant, more and more scenes are integrated, and more function modules are required to be called.
In the related art, a software product is composed of modules, the modules are mutually called, and codes and logic are integrated. On one hand, the size of the product is large, a large amount of memory and data are occupied in one device, on the other hand, the safety of the product cannot be guaranteed, and various internal interfaces can be called at will as long as the product is cracked or infected by viruses, so that the guarantee is lacked.
In view of the above problems in the related art, no effective solution has been found at present.
Disclosure of Invention
The embodiment of the invention provides a method, a device, a system, a storage medium and an electronic device for calling an intermediate interface.
According to an embodiment of the present invention, there is provided a method for calling an intermediate interface, including: receiving a capability calling request from a capability requiring party, wherein the capability calling request carries a capability identifier; matching a target interface pointer according to the capability identifier, wherein the target interface pointer points to an interface implementation file for implementing target capability, and the capability identifier corresponds to the target capability; and feeding back the target interface pointer to the capability demander.
Optionally, before matching the target interface pointer according to the capability identifier, the method further includes: identifying a capability type according to the capability identifier, wherein the capability identifier is used for characterizing attribute information of the target capability; when the capability type is external capability, determining to match a target interface pointer according to the capability identifier; and when the capability type is internal capability, calling an internal interface corresponding to the internal capability, wherein the internal capability is realized through a local integrated functional module.
Optionally, matching the target interface pointer according to the capability identifier includes: exporting a CreateEngObject function in an entrmanager.dll file; acquiring an IEngFactory interface pointer by calling the CreateEngObject function; and calling a QueryObject function of the IEngFactory interface pointer, and matching to obtain the target interface pointer.
Optionally, before matching the target interface pointer according to the capability identifier, the method further includes: deriving a CreateClientObject function; acquiring an IEngClient interface pointer through the CreateClientObject function; and setting an instance pointer by calling the IEngClient interface pointer, and configuring a pointer interface corresponding to the instance pointer.
Optionally, the target capability includes at least one of: security protection capability, static feature scanning capability, file format error capability, shelling capability.
The method further comprises the following steps: determining local service requirements; calling an external interface according to the local service requirement; and acquiring a target file corresponding to the local service requirement through a network access channel of the external interface.
According to another embodiment of the present invention, there is provided an apparatus for calling an intermediate interface, including: the system comprises a receiving module, a sending module and a processing module, wherein the receiving module is used for receiving a capability calling request from a capability demand party, and the capability calling request carries a capability identifier; the matching module is used for matching a target interface pointer according to the capability identifier, wherein the target interface pointer points to an interface implementation file for implementing target capability, and the capability identifier corresponds to the target capability; and the feedback module is used for feeding the target interface pointer back to the capability demander.
Optionally, the apparatus further comprises: the identification module is used for identifying the capability type according to the capability identifier before the matching module matches a target interface pointer according to the capability identifier, wherein the capability identifier is used for representing the attribute information of the target capability; the processing module is used for determining that a target interface pointer is matched according to the capability identifier when the capability type is the external capability; and when the capability type is internal capability, calling an internal interface corresponding to the internal capability, wherein the internal capability is realized through a local integrated functional module.
Optionally, the matching module includes: an export unit for exporting the CreateEngObject function in the entrmanager.dll file; an obtaining unit, configured to obtain an IEngFactory interface pointer by calling the CreateEngObject function; and the matching unit is used for calling the QueryObject function of the IEngFactory interface pointer to obtain the target interface pointer through matching.
Optionally, the apparatus further comprises: the derivation module is used for deriving a CreateClientObject function before the matching module matches the target interface pointer according to the capability identifier; a first obtaining module, configured to obtain an IEngClient interface pointer through the CreateClientObject function; and the configuration module is used for setting an instance pointer by calling the IEngClient interface pointer and configuring a pointer interface corresponding to the instance pointer.
Optionally, the target capability includes at least one of: security protection capability, static feature scanning capability, file format error capability, shelling capability.
Optionally, the apparatus further comprises: the determining module is used for determining the local service requirement; the calling module is used for calling an external interface according to the local service requirement; and the second acquisition module is used for acquiring the target file corresponding to the local service requirement through a network access channel of the external interface.
According to still another embodiment of the present invention, there is provided a calling system of an intermediate interface, including: a first terminal, a second terminal, and a third terminal, wherein the first terminal includes the apparatus as described in the above embodiments; the second terminal is used for providing the target capability; and the third terminal is used for sending a capability calling request to the first terminal.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
There is also provided, in accordance with yet another embodiment of the present invention, a computer program product, including a computer program stored on a non-transitory computer readable storage medium, the computer program including program instructions, characterized in that, when the program instructions are executed by a computer, the computer is caused to perform the method of any of the preceding embodiments.
According to the invention, the capability calling request from the capability demander is received, then the target interface pointer is matched according to the capability identifier, and finally the target interface pointer is fed back to the capability demander. The capability demander does not care who the called module object is, only care whether the called module object has the capability, so that the structure is relatively loose, the upper layer does not need to care how the bottom layer is realized, codes and logic are separated, the output capability is packaged into a simple and easy-to-use interface, and the integration difficulty of a service integrator needing various capabilities is simplified. The technical problem of high difficulty in service integration caused by code and logic coupling in the related technology is solved, and various large-scale software can be quickly called and run in a flow process.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a block diagram of a hardware architecture of a calling computer of an intermediate interface according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for invoking an intermediate interface according to an embodiment of the present invention;
FIG. 3 is a network architecture diagram of an intermediate layer in an embodiment of the invention;
FIG. 4 is a flowchart of a lookup of a capability output interface layer according to an embodiment of the invention;
FIG. 5 is a diagram illustrating a call relationship between modules of layers according to an embodiment of the present invention;
FIG. 6 is a general flow diagram of integrating capabilities according to an embodiment of the present invention;
FIG. 7 is a flow chart of an external call dotting function according to an embodiment of the present invention;
FIG. 8 is a flow chart of the internal use of the dotting function in an embodiment of the present invention;
FIG. 9 is a block diagram of an apparatus for invoking an intermediate interface according to an embodiment of the present invention;
FIG. 10 is a block diagram of a calling system of an intermediate interface according to an embodiment of the present invention;
fig. 11 is a block diagram of an electronic device implementing an embodiment of the invention.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
The method provided by the first embodiment of the present application may be executed in a server, a computer, a terminal, or a similar computing device. Taking the example of running on a computer, fig. 1 is a hardware structure block diagram of a calling computer of an intermediate interface according to an embodiment of the present invention. As shown in fig. 1, computer 10 may include one or more (only one shown in fig. 1) processors 102 (processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those of ordinary skill in the art that the configuration shown in FIG. 1 is illustrative only and is not intended to limit the configuration of the computer described above. For example, computer 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a calling method of an intermediate interface in an embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the above-mentioned methods. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory located remotely from processor 102, which may be connected to computer 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of such networks may include wireless networks provided by the communications provider of computer 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a method for calling an intermediate interface is provided, and fig. 2 is a flowchart of a method for calling an intermediate interface according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, receiving a capability calling request from a capability requiring party, wherein the capability calling request carries a capability identifier;
the capability identifier of this embodiment may be an ID, a key, and other forms of identifiers, and the capability of this embodiment is a function, a function set, a function engine, and the like, such as a file unshelling capability, a security protection engine (including virus killing, anti-penetration, and patch vulnerability), and the like. The capability demander is also a service integrator, which is used to complete a specific functional service, and one service may need to invoke multiple capabilities.
Step S204, matching a target interface pointer according to a capability identifier, wherein the target interface pointer points to an interface implementation file for implementing target capability, and the capability identifier corresponds to the target capability;
the interface implementation file of this embodiment may be a dll (Dynamic Link Library) file, and is set in a piece of software or a device. The interface implementation file of this embodiment may be distributed in different networks and different devices, and configured by different software, or configured by the same product (software or platform), as if one product includes the functions of a client and a server, the client may serve as a capability demanding party, and the server may serve as a capability providing party.
The DLL file in this embodiment includes a DOS header, a PE identifier, a PE header, a section table, at least one section content, and some bytes filled for memory alignment, where each section content may be a code, or may be data or a symbol, and the specific content may be determined according to factors such as the attribute of the section. The initial location of the DLL file is a DOS header. The DOS HEADER is defined by an IMAGE _ DOS _ HEADER structure, which is 64B in size and whose last member, the value of the elfanew, determines the offset of the NT HEADER (PE identification and PE HEADER) in the PE file.
When the capability requiring party executes the DLL file, the DLL file does not need to be copied into a program file (EXE), but is dynamically loaded into a memory for program calling by a system when a program runs, and only a dynamic library needs to be loaded once, so that other programs in the equipment where the capability requiring party is located can obtain the copy of the same dynamic library (DLL file) in the memory, and the memory can be saved. When a certain program runs on the equipment, the corresponding DLL file can be called by the processor, one application program can use a plurality of DLL files, one DLL file can also be used by a plurality of application programs, and the equipment where the capacity demand side is located can realize DLL file sharing.
And step S206, feeding back the target interface pointer to the capability demander.
Optionally, the service integrated interface calling module, the cloud-end capability matching service or downloading interface, the interface use document and the matching example can be fed back to the capability requiring party according to requirements.
Through the steps, the capacity calling request from the capacity demander is received, then the target interface pointer is matched according to the capacity identifier, and finally the target interface pointer is fed back to the capacity demander. The capability demander does not care who the called module object is, only care whether the called module object has the capability, so that the structure is relatively loose, the upper layer does not need to care how the bottom layer is realized, codes and logic are separated, the output capability is packaged into a simple and easy-to-use interface, and the integration difficulty of a service integrator needing various capabilities is simplified. The technical problem of high difficulty in service integration caused by code and logic coupling in the related technology is solved, and various large-scale software can be quickly called and run in a flow process.
The scheme of the embodiment is applied to a middle layer in a logic framework of the whole network, a capacity demand party (service integrator) is applied to an upper layer, and a capacity provider is applied to a lower layer. Besides, the middle layer can also be a capability demander, namely, the calling of the capability of the application is realized. Before matching the target interface pointer according to the capability identifier, the method further comprises the following steps: identifying a capability type according to a capability identifier, wherein the capability identifier is used for characterizing attribute information of the target capability; when the capability type is external capability, determining to match a target interface pointer according to the capability identifier; and when the capability type is internal capability, calling an internal interface corresponding to the internal capability, wherein the internal capability is realized through a local function module. The external capability of the embodiment is a security detection capability, and the internal capability is a file transmission capability.
In this embodiment, the external capabilities may be, but are not limited to: security protection capabilities (e.g., firewall, virus killing), static feature scanning capabilities (e.g., file scanning, message scanning, etc.), file format misidentification capabilities, and shelling capabilities. Internal capabilities are some basic capabilities that may be, but are not limited to: file upload, file download, log correlation, etc.
In one implementation of this embodiment, matching the target interface pointer according to the capability identifier includes:
s11, deriving the CreateEngObject function in the entrmanager.dll file;
s12, obtaining an IEngFactory interface pointer by calling a CreateEngObject function;
and S13, calling a QueryObject function of the IEngFactory interface pointer, and matching to obtain a target interface pointer. The target interface pointer is an interface implementation file for implementing the target capability.
In an implementation manner of this embodiment, before matching the target interface pointer according to the capability identifier, the method further includes: deriving a CreateClientObject function; acquiring an IEngClient interface pointer through a CreateClientObject function; and setting an instance pointer by calling an IEngClient interface pointer, and configuring a pointer interface corresponding to the instance pointer.
In this embodiment, in addition to receiving a capability calling request from a capability demander in an upper layer, the middle layer itself may also call the capability of a service multiplexer in an external (upper layer or lower layer of a network framework) or the like, so as to complete the related functions of the middle layer, including: determining local service requirements; calling an external interface according to the local service requirement; and acquiring a target file corresponding to the local service requirement through a network access channel of the external interface.
Optionally, the local service requirement may be an update request, a configuration request, or the like. In order to adapt to various different use scenes of service users, the places related to network access, uploading or downloading are not defaulted to realize corresponding network access channels in the middle layer, but the service integrators are enabled to set the network access channels suitable for the service scenes to the middle layer for multiplexing by providing a network channel setting interface.
FIG. 3 is a diagram of a network architecture for an intermediate layer in an embodiment of the invention, the network architecture including: the system comprises a unified entry calling layer, a capability output interface layer and a capability realization adaptation layer. Each layer will consist of one or more implementation files, where,
unified entry calling layer: the integration party needs the IEngFactory interface exported through the layer to further acquire the interface corresponding to the integrated target capability. The design is to reduce the integration difficulty, and through the calling layer, the integrating party can obtain the corresponding capability interface only by knowing the file and the using mode of the calling layer no matter which capability we output is used. It is not necessary to further know that the implementation files to which this capability corresponds are those. The unified entry calling layer is realized in an EntManager.dll file, a CreateEngObject function is exported by the module, an IEngFactory interface pointer can be obtained by loading a DLL and calling the function, and a corresponding use interface which can output all the capabilities can be further obtained by calling a QueryObject function of the IEngFactory interface pointer.
Capability output interface layer: the capabilities are packaged into simple and easy-to-use interfaces, the implementation details of each capability providing team are isolated from the service integration party, and when the capabilities are used by the service integration party, the corresponding details of implementation of too many capabilities are not required to be known. The method comprises the steps that modules of a capability output interface layer derive a CreateClientObject function, dll is loaded, an IEngClient interface pointer can be obtained through the derived function, and an instance pointer of a unified entry calling layer can be set in by calling the function of the pointer, so that interfaces of other capabilities can be obtained in the modules for use. FIG. 4 is a flow chart of a lookup of a capability output interface layer according to an embodiment of the invention.
Capability adaptation implementation layer: the files in this layer are mainly to adapt and convert the capabilities provided by the internal groups into the capabilities that can be used according to the output interface. For each output capability adaptation implementation module, some related work such as parameter conversion or operation information collection is mainly performed, and in addition, in this layer, an output capability implementation module implemented by the client itself, such as a general dotting module, a specific implementation of a sample uploading capability, and the like, is also included. The module of the capability adaptation implementation layer must support setting the instance pointer of the unified entry call layer in order to use other capabilities in the module by means of an export interface or an export function.
Fig. 5 is a schematic diagram of a call relationship between modules of each layer according to an embodiment of the present invention, where an engine implementation layer is used to implement engine capabilities, and is equivalent to a capability output interface layer, and includes various capability modules, where a dongle output module is a security engine, and a shelling output module is used to provide file shelling capability.
Fig. 6 is a general flow chart of the integrated capability according to the embodiment of the present invention, and for different capabilities, the previous operations are the same for all integrators, and we will provide the user with the capability more easily by using the prepared helper. The following illustrates the invocation of the various capabilities:
fig. 7 is a flowchart of an external call dotting function according to an embodiment of the present invention, where the implementation process includes: acquiring an IEngFactory pointer from the EngManager.dll; setting a network callback function used during log uploading; taking a pointer object to IEngDASLog through a function of QueryObjert of IEngFactory; and adding the log to be reported through a pointer object of the IEngDASLog.
Fig. 8 is a flowchart of using a dotting function inside the embodiment of the present invention, that is, inside the intermediate layer, the implementation flow is as follows: a pointer object to IEntSerivce from inside; taking a pointer object to IEngDASLog through a QueryClientObject function of IEntSerivce; and adding the log to be reported through a pointer object of the IEngDASLog. The application scenario of the embodiment includes that when the external integrator uses the file uploading function, when the external integrator uses the monitoring engine, when the external integrator uses the file format recognition function, when the external integrator uses the shelling function, and when the external integrator uses the upgrading function.
In the solution of this embodiment, interfaces of the middle layer are also defined. The definition of the relevant interface of the capability output interface layer comprises the following steps:
internal use interface:
IEngService interface: since it is possible to use other capability module interfaces in the implementation process of the capability adaptation layer of the output interface layer and the lower layers, or after some key tasks are completed, a message needs to be sent to notify the unified entry calling layer, so an IEngService interface is defined, an instance of which represents a calling layer instance, and is set to the module when dll of each capability output interface layer is initialized, so as to be used in subsequent requirements.
IEngClient interface: and after the dll is loaded, the dll can acquire the IEngClient interface through the export function, and the initialization, environment parameter setting and other work are completed by calling the function of the IEngClient interface.
And (3) outputting an interface corresponding to the capability:
each interface represents an output capability, an external capability user can obtain the capability by calling a QueryObject function of an IEngFactory interface pointer, and an internal module can obtain the capability by calling a QueryClientObject of IEngService.
Internally used log upload output interface IDASlogInn (this interface is not visible to external users) and external universal dotting capability interface iengdalog: spreading source codes
An internally used file upload output interface IFileUploadInn and an external sample upload capability interface IFileUpload. Spreading source codes
The interface definition of the capability adaptation implementation layer comprises the following steps:
how the capability adaptation implementation layer can use other capabilities can be implemented in two ways:
the first method is as follows: the DLL of the capability adaptation implementation layer must support the following interfaces:
BOOL CreateObject(const XCHAR*lpKey,void**pObjet);
and objects corresponding to the pObjet must be inherited from the IBetweenModule.
The second method comprises the following steps: the derivation function SetEngService is supported.
In an application scenario of this embodiment, there are two products (the same terminal, or software or operating systems installed by different terminals), a product a and a product B, an installation directory of the product a is a C: \ a directory, an installation directory of the product B is a C: \ B directory, both of which use our output capabilities through the middle layer, and then a subdirectory is required to store a file of the middle layer module under the installation directories of the products a and B, and the directory names can be arbitrary, and here, assuming that all of them use a NewEngine directory to store, then:
for the product A, the intermediate layer module file is stored in the C \ A \ NewEngine directory, and the product A should download the intermediate layer module file and update the related file in the C \ A \ NewEngine directory through the download and upgrade channels of the product A.
For the product B, the middle layer module file is stored in the C \ B \ NewEngine directory, and the product B should download the middle layer module file and update the related files in the C \ B \ NewEngine directory through the download upgrade channels of the product B.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
In this embodiment, a calling device and a system of an intermediate interface are further provided, which are used to implement the foregoing embodiments and preferred embodiments, and are not described again after being described. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 9 is a block diagram of a calling device of an intermediate interface according to an embodiment of the present invention, which is applied to a client, and as shown in fig. 9, the calling device includes: a receiving module 90, a matching module 92, a feedback module 94, wherein,
a receiving module 90, configured to receive a capability invocation request from a capability demander, where the capability invocation request carries a capability identifier;
a matching module 92, configured to match a target interface pointer according to the capability identifier, where the target interface pointer points to an interface implementation file that implements a target capability, and the capability identifier corresponds to the target capability;
a feedback module 94, configured to feed back the target interface pointer to the capability demander.
Optionally, the apparatus further comprises: the identification module is used for identifying the capability type according to the capability identifier before the matching module matches a target interface pointer according to the capability identifier, wherein the capability identifier is used for representing the attribute information of the target capability; the processing module is used for determining that a target interface pointer is matched according to the capability identifier when the capability type is the external capability; and when the capability type is internal capability, calling an internal interface corresponding to the internal capability, wherein the internal capability is realized through a local integrated functional module.
Optionally, the matching module includes: an export unit for exporting the CreateEngObject function in the entrmanager.dll file; an obtaining unit, configured to obtain an IEngFactory interface pointer by calling the CreateEngObject function; and the matching unit is used for calling the QueryObject function of the IEngFactory interface pointer to obtain the target interface pointer through matching.
Optionally, the apparatus further comprises: the derivation module is used for deriving a CreateClientObject function before the matching module matches the target interface pointer according to the capability identifier; a first obtaining module, configured to obtain an IEngClient interface pointer through the CreateClientObject function; and the configuration module is used for setting an instance pointer by calling the IEngClient interface pointer and configuring a pointer interface corresponding to the instance pointer.
Optionally, the target capability includes at least one of: security protection capability, static feature scanning capability, file format error capability, shelling capability.
Optionally, the apparatus further comprises: the determining module is used for determining the local service requirement; the calling module is used for calling an external interface according to the local service requirement; and the second acquisition module is used for acquiring the target file corresponding to the local service requirement through a network access channel of the external interface.
Fig. 10 is a block diagram of a calling system of an intermediate interface according to an embodiment of the present invention, and as shown in fig. 10, the system includes: a first terminal 100, a second terminal 102, and a third terminal 104, wherein the first terminal includes the apparatus as described in the above embodiments; the second terminal is used for providing the target capability and is a capability integration terminal; and the third terminal is used for sending a capacity calling request to the first terminal and calling the capacity for the capacity calling terminal. The first terminal 100, the second terminal 102, and the third terminal 104 may be the same terminal, or two of them may be the same terminal, or different terminals.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, receiving a capability calling request from a capability demand party, wherein the capability calling request carries a capability identifier;
s2, matching a target interface pointer according to the capability identifier, wherein the target interface pointer points to an interface implementation file for implementing target capability, and the capability identifier corresponds to the target capability;
and S3, feeding back the target interface pointer to the capability demander.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, receiving a capability calling request from a capability demand party, wherein the capability calling request carries a capability identifier;
s2, matching a target interface pointer according to the capability identifier, wherein the target interface pointer points to an interface implementation file for implementing target capability, and the capability identifier corresponds to the target capability;
and S3, feeding back the target interface pointer to the capability demander.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
Fig. 11 is a block diagram of an electronic device implementing an embodiment of the invention. As shown in fig. 11, the device includes a processor 41 and a memory 42 for storing data, which are connected by a communication bus 44, and a communication interface 43 connected to the communication bus 44 and adapted to connect to other components or external devices.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (11)

1. A calling method of an intermediate interface is characterized by comprising the following steps:
receiving a capability calling request from a capability requiring party, wherein the capability calling request carries a capability identifier;
matching a target interface pointer according to the capability identifier, wherein the target interface pointer points to an interface implementation file for implementing target capability, and the capability identifier corresponds to the target capability;
and feeding back the target interface pointer to the capability demander.
2. The method of claim 1, wherein prior to matching a target interface pointer based on the capability identifier, the method further comprises:
identifying a capability type according to the capability identifier, wherein the capability identifier is used for characterizing attribute information of the target capability;
when the capability type is external capability, determining to match a target interface pointer according to the capability identifier; and when the capability type is internal capability, calling an internal interface corresponding to the internal capability, wherein the internal capability is realized through a local integrated functional module.
3. The method of claim 1, wherein matching a target interface pointer based on the capability identifier comprises:
exporting a CreateEngObject function in an entrmanager.dll file;
acquiring an IEngFactory interface pointer by calling the CreateEngObject function;
and calling a QueryObject function of the IEngFactory interface pointer, and matching to obtain the target interface pointer.
4. The method of claim 1, wherein prior to matching a target interface pointer based on the capability identifier, the method further comprises:
deriving a CreateClientObject function;
acquiring an IEngClient interface pointer through the CreateClientObject function;
and setting an instance pointer by calling the IEngClient interface pointer, and configuring a pointer interface corresponding to the instance pointer.
5. The method of claim 1, wherein the target capabilities comprise at least one of: security protection capability, static feature scanning capability, file format error capability, shelling capability.
6. The method of claim 1, further comprising:
determining local service requirements;
calling an external interface according to the local service requirement;
and acquiring a target file corresponding to the local service requirement through a network access channel of the external interface.
7. An apparatus for invoking an intermediate interface, comprising:
the system comprises a receiving module, a sending module and a processing module, wherein the receiving module is used for receiving a capability calling request from a capability demand party, and the capability calling request carries a capability identifier;
the matching module is used for matching a target interface pointer according to the capability identifier, wherein the target interface pointer points to an interface implementation file for implementing target capability, and the capability identifier corresponds to the target capability;
and the feedback module is used for feeding the target interface pointer back to the capability demander.
8. An intermediary interface invocation system, comprising: a first terminal, a second terminal, a third terminal, wherein,
the first terminal comprising the apparatus of claim 7;
the second terminal is used for providing the target capability;
and the third terminal is used for sending a capability calling request to the first terminal.
9. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 6 when executed.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 6.
11. A computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the method of any of the preceding claims 1 to 6.
CN202010272902.6A 2020-04-09 2020-04-09 Method and device for calling intermediate interface, system, storage medium and electronic device Active CN113515389B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010272902.6A CN113515389B (en) 2020-04-09 2020-04-09 Method and device for calling intermediate interface, system, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010272902.6A CN113515389B (en) 2020-04-09 2020-04-09 Method and device for calling intermediate interface, system, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN113515389A true CN113515389A (en) 2021-10-19
CN113515389B CN113515389B (en) 2024-03-01

Family

ID=78060406

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010272902.6A Active CN113515389B (en) 2020-04-09 2020-04-09 Method and device for calling intermediate interface, system, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN113515389B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114461293A (en) * 2021-12-21 2022-05-10 奇安信科技集团股份有限公司 Configuration file type open data acquisition method and device and electronic equipment

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5511197A (en) * 1992-11-13 1996-04-23 Microsoft Corporation Method and system for network marshalling of interface pointers for remote procedure calls
US5530858A (en) * 1993-04-01 1996-06-25 Intel Corporation Method and apparatus for background processing for PCMCIA card services
US6292843B1 (en) * 1998-01-16 2001-09-18 International Business Machines Corporation Quick loading of run time dynamic link library for OS/2
CN1971509A (en) * 2006-12-13 2007-05-30 上海科泰世纪科技有限公司 Method to realize binary compatibility operation by component software system based on equipment interface
US20100077411A1 (en) * 2008-09-22 2010-03-25 Alyson Ann Comer Routing function calls to specific-function dynamic link libraries in a general-function environment
US20120036569A1 (en) * 2010-04-05 2012-02-09 Andrew Cottrell Securing portable executable modules
US20130061007A1 (en) * 2011-09-02 2013-03-07 International Business Machines Corporation Generating code that calls functions based on types of memory
US20170126716A1 (en) * 2015-10-30 2017-05-04 F-Secure Corporation Malware detection
US20180113685A1 (en) * 2016-10-24 2018-04-26 International Business Machines Corporation Local Function Call Tailoring for Function Pointer Calls
CN108196917A (en) * 2017-12-27 2018-06-22 北京交通大学 The data-interface adaptation method of heavy haul train dynamics simulation software
CN109117664A (en) * 2018-07-19 2019-01-01 北京明朝万达科技股份有限公司 The access control method and device of application program
CN109711999A (en) * 2018-11-14 2019-05-03 平安科技(深圳)有限公司 Go out single method and device, computer equipment, storage medium based on halfpace
CN109711169A (en) * 2018-05-04 2019-05-03 360企业安全技术(珠海)有限公司 Means of defence and device, system, storage medium, the electronic device of system file
CN109784503A (en) * 2018-12-13 2019-05-21 平安普惠企业管理有限公司 Business O&M method, apparatus, equipment and readable storage medium storing program for executing
CN109857569A (en) * 2018-11-08 2019-06-07 深圳壹账通智能科技有限公司 Interface calling processing method and device, storage medium, computer equipment
CN110221840A (en) * 2019-06-05 2019-09-10 百度在线网络技术(北京)有限公司 The function realizing method and device of application program, equipment and storage medium
CN110244977A (en) * 2019-05-21 2019-09-17 深圳壹账通智能科技有限公司 Customized software generation method, system, electronic equipment and storage medium
US20200042331A1 (en) * 2018-08-03 2020-02-06 International Business Machines Corporation Dynamic-link library usage based on memory size

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5511197A (en) * 1992-11-13 1996-04-23 Microsoft Corporation Method and system for network marshalling of interface pointers for remote procedure calls
US5530858A (en) * 1993-04-01 1996-06-25 Intel Corporation Method and apparatus for background processing for PCMCIA card services
US6292843B1 (en) * 1998-01-16 2001-09-18 International Business Machines Corporation Quick loading of run time dynamic link library for OS/2
CN1971509A (en) * 2006-12-13 2007-05-30 上海科泰世纪科技有限公司 Method to realize binary compatibility operation by component software system based on equipment interface
US20100077411A1 (en) * 2008-09-22 2010-03-25 Alyson Ann Comer Routing function calls to specific-function dynamic link libraries in a general-function environment
US20120036569A1 (en) * 2010-04-05 2012-02-09 Andrew Cottrell Securing portable executable modules
US20130061007A1 (en) * 2011-09-02 2013-03-07 International Business Machines Corporation Generating code that calls functions based on types of memory
US20170126716A1 (en) * 2015-10-30 2017-05-04 F-Secure Corporation Malware detection
US20180113685A1 (en) * 2016-10-24 2018-04-26 International Business Machines Corporation Local Function Call Tailoring for Function Pointer Calls
CN108196917A (en) * 2017-12-27 2018-06-22 北京交通大学 The data-interface adaptation method of heavy haul train dynamics simulation software
CN109711169A (en) * 2018-05-04 2019-05-03 360企业安全技术(珠海)有限公司 Means of defence and device, system, storage medium, the electronic device of system file
CN109117664A (en) * 2018-07-19 2019-01-01 北京明朝万达科技股份有限公司 The access control method and device of application program
US20200042331A1 (en) * 2018-08-03 2020-02-06 International Business Machines Corporation Dynamic-link library usage based on memory size
CN109857569A (en) * 2018-11-08 2019-06-07 深圳壹账通智能科技有限公司 Interface calling processing method and device, storage medium, computer equipment
CN109711999A (en) * 2018-11-14 2019-05-03 平安科技(深圳)有限公司 Go out single method and device, computer equipment, storage medium based on halfpace
CN109784503A (en) * 2018-12-13 2019-05-21 平安普惠企业管理有限公司 Business O&M method, apparatus, equipment and readable storage medium storing program for executing
CN110244977A (en) * 2019-05-21 2019-09-17 深圳壹账通智能科技有限公司 Customized software generation method, system, electronic equipment and storage medium
CN110221840A (en) * 2019-06-05 2019-09-10 百度在线网络技术(北京)有限公司 The function realizing method and device of application program, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114461293A (en) * 2021-12-21 2022-05-10 奇安信科技集团股份有限公司 Configuration file type open data acquisition method and device and electronic equipment
CN114461293B (en) * 2021-12-21 2024-04-30 奇安信科技集团股份有限公司 Configuration file type open data acquisition method and device and electronic equipment

Also Published As

Publication number Publication date
CN113515389B (en) 2024-03-01

Similar Documents

Publication Publication Date Title
CN113595961A (en) Protocol conversion method and system, and gateway device
RU2004119554A (en) SYSTEM AND METHOD OF IDENTIFICATION AND ACCESS TO NETWORK SERVICES
CN112052013A (en) Software package generation method and device, storage medium and electronic device
CN108235763B (en) Detection system, method and related device
CN113010378B (en) Log processing method and device of microservice module, storage medium and electronic device
CN111930382A (en) Application page access method, device and equipment
CN113296871A (en) Method, equipment and system for processing container group instance
CN112988409B (en) Interface calling method and device, computer equipment and storage medium
CN113515389B (en) Method and device for calling intermediate interface, system, storage medium and electronic device
CN106936660B (en) Data acquisition method and device
CN113918232B (en) Algorithm service calling method, device, server and storage medium
CN109450997B (en) Data cross-terminal migration method and device, computer equipment and storage medium
CN108989422A (en) A kind of message and document handling method and system
CN111367686A (en) Service interface calling method and device, computer equipment and storage medium
CN112150590B (en) Animation file output method and device
CN110858846A (en) Resource allocation method, device and storage medium
CN113934552A (en) Method and device for determining function code, storage medium and electronic device
CN108279855A (en) A method of read-write storage device
CN114866970A (en) Policy control method, system and related equipment
CN113934591A (en) Data monitoring method and device, storage medium and electronic device
CN112988176A (en) Channel package generation method and device, storage medium and electronic equipment
CN112883345A (en) Remote login control method and device
CN112714068A (en) Method, device and system for processing coded image, storage medium and electronic device
CN113709264A (en) Address acquisition method, equipment, system and storage medium
CN111427603A (en) Application program upgrading 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
GR01 Patent grant
GR01 Patent grant