[go: up one dir, main page]

CN112181542A - Function calling method and device, electronic equipment and storage medium - Google Patents

Function calling method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112181542A
CN112181542A CN202011065967.XA CN202011065967A CN112181542A CN 112181542 A CN112181542 A CN 112181542A CN 202011065967 A CN202011065967 A CN 202011065967A CN 112181542 A CN112181542 A CN 112181542A
Authority
CN
China
Prior art keywords
function
target
callback
call instruction
module
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
CN202011065967.XA
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.)
Weiyiyun Hangzhou Holding Co ltd
Original Assignee
Weiyiyun Hangzhou Holding Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Weiyiyun Hangzhou Holding Co ltd filed Critical Weiyiyun Hangzhou Holding Co ltd
Priority to CN202011065967.XA priority Critical patent/CN112181542A/en
Publication of CN112181542A publication Critical patent/CN112181542A/en
Pending legal-status Critical Current

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/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a function calling method, a function calling device, electronic equipment and a storage medium, wherein the method comprises the following steps: when a call instruction of at least one functional component is received, determining a target callback implementation class corresponding to the call instruction; processing the access information based on a callback function corresponding to the target callback implementation class, and feeding back a processing result to a target service platform to which the call instruction belongs; the parameter information is carried in the call instruction. By the technical scheme of the embodiment of the invention, the function components can be managed in a unified manner, namely the function modules and the function components are unified, the problems that developers consume a large amount of time to carry out bridging and bridging confusion is easily caused because different service platforms need to carry out bridging respectively when calling the function components and no unified bridging rule exists are solved, and the convenience and the high efficiency of function calling can be improved because the function component bridging method is unified in advance.

Description

Function calling method and device, electronic equipment and storage medium
Technical Field
The present invention relates to communications technologies, and in particular, to a method and an apparatus for function invocation, an electronic device, and a storage medium.
Background
The cross-platform framework means that the same code can be compiled into different target files to run on the Android and iOS platforms respectively.
Native components and modules, in turn, have different implementations in different platforms, but they both provide corresponding interfaces. The original multi-round API repeated construction is carried out, so that the standard definition of an API interface is lacked, and the current situation that unified management and control are difficult to realize is caused.
Due to the lack of standardized definitions, a set of registration and implementation needs to be written in different cross-platform frameworks, sometimes the requirements are different, or developers are different, so that the Bridge definitions and implementations of the same function are different, which not only wastes the time and energy of the developers, but also increases the difficulty and risk of replacement when the cross-platform frameworks are converted.
Disclosure of Invention
The invention provides a function calling method, a function calling device, electronic equipment and a storage medium, which are used for realizing that different service platforms can call corresponding functions so as to execute corresponding operations, and the technical effects of convenience and high efficiency of function calling are improved.
In a first aspect, an embodiment of the present invention provides a function calling method, including:
when a call instruction of at least one functional component is received, determining a target callback implementation class corresponding to the call instruction;
processing the access information based on the callback function corresponding to the target callback implementation class, and feeding back a processing result to a target platform to which the call instruction belongs; wherein, the parameter information is carried in the call instruction.
In a second aspect, an embodiment of the present invention further provides a function calling apparatus, including:
the callback implementation class determining module is used for determining a target callback implementation class corresponding to a call instruction when the call instruction of at least one functional component is received;
the processing result feedback module is used for processing the access information based on the callback function corresponding to the target callback implementation class and feeding back the processing result to the target platform to which the call instruction belongs; wherein, the parameter information is carried in the call instruction.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
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 function calling method according to any one of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are used for executing the function calling method according to any one of the embodiments of the present invention.
The invention determines the target callback implementation class by receiving the function module calling instruction, processes the input information according to the corresponding callback function, and feeds back the processing result to the target service platform, and performs unified management on the function components, namely, unifies the function modules and the function components, thereby solving the problems that developers need to respectively bridge and do not have unified bridging rules when different service platforms call the function components, so that a lot of time is consumed for bridging and the bridging is easy to be disordered, and realizing that the function component bridging method is unified in advance, so that the convenience and the efficiency of function calling can be improved when the function components are called to realize corresponding functions.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flow chart of a function calling method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a function calling method according to a second embodiment of the present invention;
fig. 3 is a schematic flow chart of a function calling method according to a third embodiment of the present invention;
fig. 4 is a diagram of a function calling method architecture according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a function calling device according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic flow diagram of a function invoking method according to an embodiment of the present invention, where the embodiment is applicable to a case where a function component is invoked on different service platforms to implement a corresponding function, and the method may be executed by a function invoking device, and the device may be implemented in a form of software and/or hardware.
As shown in fig. 1, the method of this embodiment specifically includes the following steps:
s110, when a call instruction of at least one functional component is received, determining a target callback implementation class corresponding to the call instruction.
The functional component is obtained by packaging implementation methods corresponding to certain functions. The call instruction may be an instruction sent by another service platform, and is used to call a corresponding functional component, so as to implement a corresponding function. The target callback implementation class is encapsulated in the functional component, and is an implementation method for implementing a specific function corresponding to the call instruction.
Specifically, the call instruction includes information for determining the functional component and information for causing the functional component to implement the corresponding function. For example: name information of the functional components, specific parameter information of the functional components for realizing corresponding functions, and the like. When a call instruction of at least one functional component is received, a target callback implementation class for the functional component to implement a corresponding function can be further determined according to relevant information in the call instruction.
Illustratively, a call instruction of the network connection function component sent by the service platform is received, and a target callback implementation class for implementing the network connection function may be determined according to parameter information in the call instruction, such as a network identifier.
And S120, processing the access information based on the callback function corresponding to the target callback implementation class, and feeding back a processing result to the target service platform to which the call instruction belongs.
The callback function is a function used for inputting parameter information in the call instruction to a target callback implementation class, acquiring an output result of the target callback implementation class, and feeding back the output result to a target service platform to which the call instruction belongs. The parameter information is carried in the call instruction and is used for enabling the target callback implementation class to realize the corresponding function. The target service platform is a service platform for sending the call instruction.
Specifically, the callback function corresponding to the target callback implementation class may be determined or generated according to the target callback implementation class. The callback function is used for inputting the parameter information in the call instruction into the target callback implementation class to obtain a corresponding processing result. The callback function transmits the entry information into the target callback implementation class to implement the corresponding function. And the callback function also comprises a service platform identifier corresponding to the call instruction, such as a pointer, and the like, and is used for feeding back the processing result of the target callback implementation class to the target service platform so as to implement the corresponding function of the functional component.
According to the technical scheme, the target callback implementation class is determined by receiving the function module calling instruction, the incoming reference information is processed according to the corresponding callback function, the processing result is fed back to the target service platform, the function components are managed in a unified mode, namely, the function modules and the function components are unified, the problems that developers need to bridge and do not have unified bridging rules when different service platforms call the function components are solved, a large amount of time is consumed for bridging, and bridging confusion is easily caused are solved, the function component bridging method is unified in advance, and therefore convenience and efficiency of function calling can be improved when the function components are called to achieve corresponding functions.
Example two
In this embodiment, the invocation and execution of the middle target implementation class of the functional component are specifically described. Fig. 2 is a schematic flow chart of a function calling method according to a second embodiment of the present invention, and as shown in fig. 2, the method specifically includes the following steps:
s210, according to the module calling identification in the calling instruction, determining a target function module corresponding to the module calling identification from all function modules.
The module calling identifier is used for determining the identifier of the function module, the identifier has a one-to-one correspondence relationship with each function module, and the target function module is a module for storing at least one function component for executing similar functions.
Specifically, the call instruction includes a module call identifier corresponding to the function module to which the function component belongs, and the function module that is actually matched with the call instruction from among all the function modules can be used as the target function module according to the module call identifier. Optionally, the module calling identifier may be a name identifier corresponding to the module implementing function, for example: data transmission module, network connection module, etc., and may also be the ID of the module, for example: data001, Net003, etc. According to the module calling identification, only one corresponding functional module can be determined, and the form of the module calling identification is not limited correspondingly.
S220, determining a target callback implementation class corresponding to the target service platform identification from the target function module according to the target service platform identification in the calling instruction.
The service platform is a platform for quickly calling and realizing service functions, specifically, the service platform can be an application program, a webpage and the like, the target service platform identifier is a platform identifier for sending a function component calling instruction, and a source platform of the calling instruction can be determined as the target service platform according to the target service platform identifier.
In order to realize the cross-end function of the functional component on the service platform, a cross-platform framework can be used for developing and realizing the service function, and the cross-platform framework can be Web (World Wide Web), read Native (cross-platform Mobile application development framework), Weex (high-performance Native application framework) and the like.
When the service platform calls the functional component, a corresponding call instruction which can send the functional component in a cross-platform framework of the development service platform is developed, and at the moment, the call instruction should contain a service platform identifier corresponding to the service platform.
Specifically, at least one functional component capable of implementing similar functions is stored in the functional module, each functional component can be called by at least one service platform that is to implement a corresponding function, and at this time, a target callback implementation class corresponding to the functional component called by the service platform needs to be determined in the functional module according to a target service platform identifier in the call instruction.
Illustratively, the platforms a, B, and C all need to call the functional component E in the functional module D to implement a corresponding function, and when calling the functional component E, the service platform identifiers of the platforms a, B, and C are different, so that the sent function calling instructions are different. And further, determining a target callback implementation class corresponding to the service platform sending the call instruction in the functional component E according to the call instruction sent by the time platform A, the time platform B or the time platform C which can be determined according to the service platform identification in the call instruction.
And S230, generating a callback function according to the target callback implementation class and the access parameter information.
According to the target callback implementation class and the parameter information in the call instruction, a callback function can be generated to enable the target callback implementation class to implement the corresponding function of the functional component.
Specifically, the callback function transmits the parameter information in the call instruction to the target callback implementation class, so that the target callback implementation class can call the corresponding parameter information when implementing the corresponding function. And, the callback function may include a pointer corresponding to the target service platform, so as to feed back the execution result to the corresponding service platform.
And S240, inputting the target entry parameter information into the target callback implementation class based on the callback function, and obtaining a processing result output by the target callback implementation class.
The target parameter information refers to parameter information which is obtained after parameter information in the call instruction is processed according to a format in the target callback implementation class and meets the requirement of the target callback implementation class.
Specifically, before the parameter information in the call instruction is input into the target callback implementation class, the format of the parameter information needs to be adjusted.
And processing the parameter input information into parameter input information in a target format according to the target realization class and the parameter input information, and taking the parameter input information in the target format as the target parameter input information.
Illustratively, the format of the parameter information in the call instruction is integer, and the format of the parameter information required in the target callback implementation class is character string type, at this time, the integer data in the call instruction needs to be converted into character string type so that the target callback implementation class can directly call the parameter information to execute the corresponding function of the functional component.
The target parameter information is transmitted to a target parameter-calling realizing class by the parameter-calling function, and the target parameter-calling realizing class executes a corresponding program according to the target parameter information to obtain a processing result
And S250, feeding back the processing result to a target service platform to which the call instruction belongs based on the callback function.
The callback function comprises a pointer corresponding to a target service platform to which the call instruction belongs, so that a processing result can be fed back to the target service platform, and the target service platform can realize a function corresponding to the functional component.
According to the technical scheme, the target function module is determined through the module calling identification in the calling instruction, the target callback implementation class corresponding to the target service platform identification is determined according to the target service platform identification, further, the callback function is generated, and the target callback implementation class is called based on the callback function to feed back the processing result to the target service platform, so that the problems that developers need to carry out bridging respectively and do not have unified bridging rules when different service platforms call the function components are solved, a large amount of time is consumed for bridging and bridging confusion is easily caused, the problem that the bridging method of the function components is unified in advance is solved, and therefore when the function components are called to achieve corresponding functions, convenience and efficiency of function calling can be improved.
EXAMPLE III
Fig. 3 is a schematic flow chart of a function calling method according to a third embodiment of the present invention, in which on the basis of the foregoing embodiments, before a target function module is called, each service platform is registered on each function module of a bridge layer, so that when a call instruction sent by a service platform is received, a function component can be determined from a corresponding function module based on the call instruction, thereby enabling a group of function components to achieve a technical effect of a corresponding function. Wherein explanations of the same or corresponding terms as those of the above-described embodiments are omitted.
Referring to fig. 3, the function calling method provided in this embodiment specifically includes the following steps:
and S310, receiving the registration information sent by each service platform.
The registration information is information for registering the service platform to the bridge layer. The bridge layer may include a plurality of functional modules, and each functional module is obtained by modularly dividing the implementation function of the service platform.
Specifically, before the service platform calls the functional component in the functional module, the service platform may be registered to the bridge layer.
S320, for each service platform, performing modular processing on the realization function of the current service platform based on the registration information, packaging each function into a functional component, and storing the functional component in a corresponding functional module.
Specifically, the functions that can be implemented by each service platform are loaded into the function modules based on the registration information, and the functions are classified into different function modules according to different types of the functions, so that corresponding calls can be performed according to the functions. And encapsulating the realization functions of the current service platform to obtain corresponding functional components, and storing the functional components into corresponding functional modules according to the classification. If there is no functional module matching the functional component in the existing functional modules, a functional module corresponding to the functional component may be established to store the functional component. And the functional component comprises a callback implementation class corresponding to the function.
Optionally, the function module may be divided into a common basic function module, a common service function module, a common optional function module and a service function module according to service functions.
Wherein, the common basic function module generally comprises the functional components of the common basic, such as: the service platform comprises a function component of the sharing device, a network request function component, a data transmission function component and the like, wherein the function components are usually function components contained by each service platform by default. The common service function module generally includes function modules corresponding to services, and may be a common service scene login function component, a user addition deletion function component, and the like, and these function components are generally function components that are required to be used when each service platform performs services. The common optional functional module refers to that when a certain functional component can be called by a plurality of service platforms and the functional component is not necessary, the functional component can be divided into the common optional functional module. The service function module means that when a certain functional component only needs to support the requirement of the current service platform, the functional component can be divided into the service function modules to realize corresponding functions.
Optionally, the functional modules may be divided according to functional types, for example: network communication function module, data transmission function module, multimedia function module, etc.
Further, the function division rule is stored in advance for use in classifying the functional components.
And when the registration information is received, dividing the implementation functions of the service platform into at least one category according to a preset function division rule. For example: when the service platform implements the function of sending information to the network storage space, the classified categories may be a network connection function and a data transmission function.
Illustratively, the functional classification categories are a, B, C and D, and the corresponding functional modules are a, B, C and D. When receiving the registration information sent by the service platform, the service platform implementation functions a1, AB2, C3 and D4 are divided according to the preset function division rules, that is, a1 and AB2 are divided into function class a, AB2 is divided into function class B, C3 is divided into function class C, and D4 is divided into function class D.
If one type of the function modules comprises a plurality of implementation functions, each implementation function is packaged to obtain a function component, and the function component is stored in a corresponding function module. For example: the implementation of the sorting function can use fast sorting, hill sorting, bubble sorting and other implementation functions.
Illustratively, the functional classification categories are a and B, and the corresponding functional modules are a and B. When receiving the registration information sent by the service platform, respectively encapsulating two function implementation A1 and A2 of the service platform implementation function A to obtain function components a1 and a2, and storing the function components a into the function module a.
Optionally, if one type includes multiple implementation functions, each implementation function is encapsulated, the frequency of use of each implementation function is marked, the function component and the frequency are stored in the function module correspondingly, and when a call instruction is received, the callback implementation type is determined according to the call instruction and the frequency.
Illustratively, the implementation of the sorting function may be implemented by fast sorting, hill sorting, or bubble sorting, and the three sorting functions are respectively encapsulated to obtain corresponding functional components, where the frequencies of the three functional components are all 0. Since all the three functional components can realize corresponding functions, any one of the functional components can be selected as a default component for determining the callback implementation class when receiving the call instruction.
And each time the functional component is called, adding one to the frequency corresponding to the functional component. Optionally, when the functional component corresponding to the highest frequency fails in the implementation process, the functional component corresponding to the second highest frequency may be called to implement the corresponding function, so as to avoid affecting the implementation of the function.
And S330, integrating the functional modules which realize the same function and correspond to the service platforms together to form a functional module.
The functional modules with the same function of each service platform can be integrated together and unified as a functional module, so that the storage and management of the modules are facilitated.
Illustratively, service platform A has functional modules A-O, A-P, and A-Q, and service platform B has functional modules B-M, B-N, B-O, and B-P. The functional modules A-Q, B-M and B-N can be directly stored and used, the functional modules A-O and B-O are integrated together to be used as a functional module O, and the functional modules A-P and B-P are integrated together to be used as a functional module P.
S340, establishing a corresponding relation between the service platform identification and the callback implementation class in the functional module, so that when a call instruction is received, the corresponding callback implementation class is called from the functional module.
Because each service platform needs to call the callback implementation class matched with the service platform when calling the functional component, each service platform and the callback implementation class have a corresponding relationship. In order to quickly find the callback implementation class corresponding to the service platform in the function module, a corresponding relationship between the service platform identifier and the callback implementation class needs to be established in the function module in advance.
Specifically, when a call instruction is received, the function module and the target platform identifier may be determined according to the call instruction, and further, a corresponding callback implementation class is determined in the function module according to the target platform identifier, so that the corresponding callback implementation class is called from the function module.
And S350, when a call instruction of at least one functional component is received, determining a target callback implementation class corresponding to the call instruction.
And S360, processing the access information based on the callback function corresponding to the target callback implementation class, and feeding back a processing result to the target service platform to which the call instruction belongs.
Specifically, the function call method architecture is shown in fig. 4. Registering each functional component of the service platform to the bridging layer, determining a target callback implementation class in the bridging layer when the service platform sends a call instruction for calling the functional component, and feeding back a processing result to the service platform according to a corresponding callback function so as to implement a corresponding function.
According to the technical scheme, each service platform is registered to each function module, when a function module calling instruction is received, a target callback implementation class is determined, the access information is processed according to the corresponding callback function, the processing result is fed back to the target service platform, and the function components are managed in a unified mode, namely the function modules and the function components are unified, the problems that naming is disordered when different service platforms call the function components and changing is difficult when the platforms are switched are solved, the unified calling instruction is realized to accurately call the function components, and the effect of replacing obstacles caused by different platforms is avoided.
Example four
Fig. 5 is a schematic structural diagram of a function invocation device according to a fourth embodiment of the present invention, where the device includes: a callback implementation class determination module 510 and a processing result feedback module 520.
The callback implementation class determining module 510 is configured to determine, when a call instruction of at least one functional component is received, a target callback implementation class corresponding to the call instruction; a processing result feedback module 320, configured to process the entry information based on the callback function corresponding to the target callback implementation class, and feed back the processing result to the target service platform to which the call instruction belongs; the parameter information is carried in the call instruction.
Optionally, the callback implementation class determining module 510 is further configured to determine, according to the module calling identifier in the calling instruction, a target function module corresponding to the module calling identifier from all function modules; and determining a target callback implementation class corresponding to the target service platform identification from the target function module according to the target service platform identification in the calling instruction.
Optionally, the processing result feedback module 520 is further configured to generate a callback function according to the target callback implementation class and the entry parameter information; inputting the target entry information into a target callback implementation class based on a callback function, and obtaining a processing result output by the target callback implementation class; and feeding back the processing result to a target service platform to which the call instruction belongs based on the callback function.
Optionally, the processing result feedback module 520 is further configured to process the parameter information into parameter information in a target format according to the target implementation class and the parameter information, and use the parameter information in the target format as the target parameter information.
Optionally, the apparatus further comprises:
the registration information receiving module is used for receiving the registration information sent by each service platform;
the modular processing module is used for carrying out modular processing on the realization function of the current service platform based on the registration information aiming at each service platform, packaging each function into a functional component and storing the functional component into the corresponding functional module; the function component comprises a callback implementation class corresponding to the function;
the function module integration module is used for integrating the function modules which realize the same function and correspond to each service platform together to be used as a function module;
and the corresponding relation establishing module is used for establishing the corresponding relation between the service platform identification and the callback implementation class in the functional module so as to call the corresponding callback implementation class from the functional module when receiving the call instruction.
Optionally, the modular processing module is further configured to, when receiving the registration information, classify the implementation functions of the service platform into at least one category according to a preset function classification rule; if one type of the function modules comprises a plurality of implementation functions, each implementation function is packaged to obtain a function component, and the function component is stored in a corresponding function module.
Optionally, the modular processing module is further configured to, if one type includes multiple implementation functions, encapsulate each implementation function, mark a frequency of use of each implementation function, and store the function component and the frequency into the function module, so as to determine a callback implementation type according to the call instruction and the frequency when receiving the call instruction.
According to the technical scheme, the target callback implementation class is determined by receiving the function module calling instruction, the incoming reference information is processed according to the corresponding callback function, the processing result is fed back to the target service platform, the function components are managed in a unified mode, namely, the function modules and the function components are unified, the problems that developers need to bridge and do not have unified bridging rules when different service platforms call the function components are solved, a large amount of time is consumed for bridging, and bridging confusion is easily caused are solved, the function component bridging method is unified in advance, and therefore convenience and efficiency of function calling can be improved when the function components are called to achieve corresponding functions.
The function calling device provided by the embodiment of the invention can execute the function calling method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the system are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
EXAMPLE five
Fig. 6 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. FIG. 6 illustrates a block diagram of an exemplary electronic device 60 suitable for use in implementing embodiments of the present invention. The electronic device 60 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 6, the electronic device 60 is in the form of a general purpose computing device. The components of the electronic device 60 may include, but are not limited to: one or more processors or processing units 601, a system memory 602, and a bus 603 that couples various system components including the system memory 602 and the processing unit 601.
Bus 603 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 60 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 60 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 602 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)604 and/or cache memory 605. The electronic device 60 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 606 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 603 by one or more data media interfaces. Memory 602 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 608 having a set (at least one) of program modules 607 may be stored, for example, in memory 602, such program modules 607 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. The program modules 607 generally perform the functions and/or methods of the described embodiments of the invention.
Electronic device 60 may also communicate with one or more external devices 609 (e.g., keyboard, pointing device, display 610, etc.), with one or more devices that enable a user to interact with electronic device 60, and/or with any devices (e.g., network card, modem, etc.) that enable electronic device 60 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 611. Also, the electronic device 60 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 612. As shown, the network adapter 612 communicates with the other modules of the electronic device 60 via the bus 603. It should be appreciated that although not shown in FIG. 6, other hardware and/or software modules may be used in conjunction with electronic device 60, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 601 executes various functional applications and data processing, for example, implementing a function calling method provided by an embodiment of the present invention, by running a program stored in the system memory 602.
EXAMPLE six
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a function calling method, including:
when a call instruction of at least one functional component is received, determining a target callback implementation class corresponding to the call instruction;
processing the access information based on a callback function corresponding to the target callback implementation class, and feeding back a processing result to a target platform to which the call instruction belongs; the parameter information is carried in the call instruction.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. 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 (a non-exhaustive list) of the computer readable storage medium would include the following: 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 context of this document, 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.
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, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A function calling method, comprising:
when a call instruction of at least one functional component is received, determining a target callback implementation class corresponding to the call instruction;
processing the access information based on the callback function corresponding to the target callback implementation class, and feeding back a processing result to a target service platform to which the call instruction belongs; wherein, the parameter information is carried in the call instruction.
2. The method of claim 1, wherein determining a target callback implementation class corresponding to a call instruction of at least one functional component when the call instruction is received comprises:
determining a target function module corresponding to the module calling identifier from all function modules according to the module calling identifier in the calling instruction;
and determining a target callback implementation class corresponding to the target service platform identification from the target function module according to the target service platform identification in the calling instruction.
3. The method of claim 1, wherein the processing the entry information based on the callback function corresponding to the target callback implementation class and feeding back a processing result to a target platform to which the call instruction belongs comprises:
generating the callback function according to the target callback implementation class and the access parameter information;
inputting target entry information into the target callback implementation class based on the callback function, and obtaining a processing result output by the target callback implementation class;
and feeding back the processing result to a target service platform to which the call instruction belongs based on the callback function.
4. The method of claim 3, further comprising, prior to said entering target entry information into said target callback implementation class based on said callback function and obtaining a processing result output by said target callback implementation class:
and processing the parameter input information into parameter input information in a target format according to the target implementation class and the parameter input information, and taking the parameter input information in the target format as the target parameter input information.
5. The method of claim 1, further comprising:
receiving registration information sent by each service platform;
for each service platform, performing modular processing on the realization function of the current service platform based on the registration information, and packaging each function into a functional component and storing the functional component into a corresponding functional module; the function component comprises a callback implementation class corresponding to the function;
integrating the functional modules which realize the same function and correspond to each service platform together to form a functional module;
and establishing a corresponding relation between the service platform identification and the callback implementation class in the functional module so as to call the corresponding callback implementation class from the functional module when a call instruction is received.
6. The method according to claim 5, wherein the modularizing the implementation functions of the service platform based on the registration information, and encapsulating each function as a function component and storing the function component in a corresponding function module comprises:
when the registration information is received, the implementation functions of the service platform are classified into at least one category according to a preset function classification rule;
if one type of the functional modules comprises a plurality of implementation functions, each implementation function is packaged to obtain the functional components, and the functional components are stored in the corresponding functional modules.
7. The method according to claim 6, wherein if a plurality of implementation functions are included in one category, each implementation function is encapsulated to obtain the function component, and the function component is stored in a corresponding function module, further comprising:
if one type comprises a plurality of implementation functions, each implementation function is packaged, the use frequency of each implementation function is marked, the function components and the frequency are correspondingly stored in the function module, and when a call instruction is received, a callback implementation type is determined according to the call instruction and the frequency.
8. A function calling apparatus, comprising:
the callback implementation class determining module is used for determining a target callback implementation class corresponding to a call instruction when the call instruction of at least one functional component is received;
the processing result feedback module is used for processing the access information based on the callback function corresponding to the target callback implementation class and feeding back the processing result to the target platform to which the call instruction belongs; wherein, the parameter information is carried in the call instruction.
9. An electronic device, characterized in that the electronic device comprises:
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 function call method as recited in any of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the function call method of any one of claims 1-7 when executed by a computer processor.
CN202011065967.XA 2020-09-30 2020-09-30 Function calling method and device, electronic equipment and storage medium Pending CN112181542A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011065967.XA CN112181542A (en) 2020-09-30 2020-09-30 Function calling method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011065967.XA CN112181542A (en) 2020-09-30 2020-09-30 Function calling method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112181542A true CN112181542A (en) 2021-01-05

Family

ID=73948843

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011065967.XA Pending CN112181542A (en) 2020-09-30 2020-09-30 Function calling method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112181542A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113742008A (en) * 2021-09-13 2021-12-03 挂号网(杭州)科技有限公司 Interface calling method and device, electronic equipment and storage medium
CN114500095A (en) * 2022-02-25 2022-05-13 上海富数科技有限公司 Data processing method and device, electronic equipment and storage medium
CN115866046A (en) * 2022-11-30 2023-03-28 北京安天网络安全技术有限公司 Service calling system, electronic equipment and storage medium
CN115883502A (en) * 2022-12-09 2023-03-31 江苏新致智慧科技有限公司 Message sending method and device, electronic device, storage medium
CN117348875A (en) * 2023-10-31 2024-01-05 上海中汇亿达金融信息技术有限公司 Method, device, micro front end architecture and medium for unified scheduling of cross-frame micro components
CN117950766A (en) * 2024-03-26 2024-04-30 智道网联科技(北京)有限公司 Callback processing method and device, callback processing system and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108228155A (en) * 2017-12-26 2018-06-29 江苏润和软件股份有限公司 EasyApp Mobile Developments platform and development approach
CN109597604A (en) * 2018-10-22 2019-04-09 国网新疆电力有限公司电力科学研究院 APP Modular development method, device and equipment based on iOS platform
CN109669787A (en) * 2018-12-05 2019-04-23 恒生电子股份有限公司 Data transmission method and device, storage medium, electronic equipment
CN110874236A (en) * 2019-11-13 2020-03-10 中国建设银行股份有限公司 Cross-platform application device, terminal and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108228155A (en) * 2017-12-26 2018-06-29 江苏润和软件股份有限公司 EasyApp Mobile Developments platform and development approach
CN109597604A (en) * 2018-10-22 2019-04-09 国网新疆电力有限公司电力科学研究院 APP Modular development method, device and equipment based on iOS platform
CN109669787A (en) * 2018-12-05 2019-04-23 恒生电子股份有限公司 Data transmission method and device, storage medium, electronic equipment
CN110874236A (en) * 2019-11-13 2020-03-10 中国建设银行股份有限公司 Cross-platform application device, terminal and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
微医前端团队: "如何做到四端统一桥接?微医跨平台桥接标准化方案了解一下", 《HTTPS://JUEJIN.CN/POST/6850418113314783239》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113742008A (en) * 2021-09-13 2021-12-03 挂号网(杭州)科技有限公司 Interface calling method and device, electronic equipment and storage medium
CN113742008B (en) * 2021-09-13 2024-04-02 挂号网(杭州)科技有限公司 Interface calling method and device, electronic equipment and storage medium
CN114500095A (en) * 2022-02-25 2022-05-13 上海富数科技有限公司 Data processing method and device, electronic equipment and storage medium
CN115866046A (en) * 2022-11-30 2023-03-28 北京安天网络安全技术有限公司 Service calling system, electronic equipment and storage medium
CN115883502A (en) * 2022-12-09 2023-03-31 江苏新致智慧科技有限公司 Message sending method and device, electronic device, storage medium
CN117348875A (en) * 2023-10-31 2024-01-05 上海中汇亿达金融信息技术有限公司 Method, device, micro front end architecture and medium for unified scheduling of cross-frame micro components
CN117348875B (en) * 2023-10-31 2024-08-13 上海中汇亿达金融信息技术有限公司 Method and device for uniformly scheduling cross-frame micro-component, micro front-end system and medium
CN117950766A (en) * 2024-03-26 2024-04-30 智道网联科技(北京)有限公司 Callback processing method and device, callback processing system and electronic equipment
CN117950766B (en) * 2024-03-26 2024-07-12 智道网联科技(北京)有限公司 Callback processing method and device, callback processing system and electronic equipment

Similar Documents

Publication Publication Date Title
CN112181542A (en) Function calling method and device, electronic equipment and storage medium
CN111818136B (en) Data processing method, device, electronic equipment and computer readable medium
CN113515271B (en) Service code generation method and device, electronic equipment and readable storage medium
CN109194736B (en) Message duplicate removal method and device, electronic equipment, medium and unmanned vehicle
CN113766042B (en) Container address configuration method, system, device, equipment and medium
CN114528044B (en) Interface calling method, device, equipment and medium
CN110858202A (en) Method and device for generating where clause in database query statement
CN110688096B (en) Method and device for constructing application program containing plug-in, medium and electronic equipment
CN112559095A (en) Target service execution method, system, server and storage medium
CN113626223A (en) Interface calling method and device
US12014216B2 (en) Method for platform-based scheduling of job flow
CN113076153A (en) Interface calling method and device
CN113434315A (en) Interface management method and device, storage medium and electronic equipment
CN113760318A (en) Information processing method, information processing apparatus, server, and storage medium
CN111324645B (en) Block chain data processing method and device
CN112860455A (en) Life cycle event processing method and device and electronic equipment
WO2023083071A1 (en) View interaction method and apparatus, electronic device, and computer readable medium
CN116032614A (en) Container network micro-isolation method, device, equipment and medium
EP4191407A1 (en) Method and device for generating and registering ui service package and loading ui service
CN114219643A (en) Transaction calling method, device, equipment and storage medium
CN114047922B (en) Transcoding method, device, medium and equipment for precompiled device
CN114499759B (en) Message generation method and device, electronic equipment and storage medium
CN118740456B (en) Cluster-based network isolation method, device, equipment and storage medium
CN115098077B (en) Method and platform for IT application access platform
CN113448550B (en) Method and device for realizing collection management of classes, electronic equipment and computer medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210105