CN112130850A - Method and device for realizing functions in application program - Google Patents

Method and device for realizing functions in application program Download PDF

Info

Publication number
CN112130850A
CN112130850A CN202010883975.9A CN202010883975A CN112130850A CN 112130850 A CN112130850 A CN 112130850A CN 202010883975 A CN202010883975 A CN 202010883975A CN 112130850 A CN112130850 A CN 112130850A
Authority
CN
China
Prior art keywords
function
functions
sample
preset
interface
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
CN202010883975.9A
Other languages
Chinese (zh)
Inventor
朱文成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010883975.9A priority Critical patent/CN112130850A/en
Publication of CN112130850A publication Critical patent/CN112130850A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse

Landscapes

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

Abstract

The present disclosure relates to a method and a device for implementing functions in an application program, and relates to the technical field of computers, and the disclosed technical scheme is as follows: acquiring a plurality of functions corresponding to the application program; matching a plurality of functions with preset sample functions, wherein the sample functions are preset with corresponding calling interfaces of sample function functions in a preset function component platform; when a first function successfully matched with the sample function exists in the plurality of functions, determining a target calling interface corresponding to the first function; the target call interface is associated with the first function to provide a functional service of the first function according to the target call interface when the first function is called. Therefore, for some sample functions in the application program, the preset function functions in the preset function component platform can be directly multiplexed, so that the service efficiency of the application program is improved, and the development cost of the application program is reduced.

Description

Method and device for realizing functions in application program
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for implementing functions in an application.
Background
With the development of computers, functions of application programs are becoming more diversified, and in the related art, developers are relied on to manually develop various functions of application programs.
However, in the related art, developers are relied on to manually develop corresponding applications, which results in higher development efficiency of the applications and higher cost.
Disclosure of Invention
The present disclosure provides a method and an apparatus for implementing functions in an application program, so as to at least solve the technical problems of low development efficiency and high development cost of the application program in the related art.
The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, a method for implementing functions in an application program is provided, including: acquiring a plurality of functions corresponding to the application program; matching the plurality of functions with preset sample functions, wherein the sample functions are preset with calling interfaces of corresponding sample function functions in a preset function component platform; when a first function successfully matched with the sample function exists in the plurality of functions, determining a target calling interface corresponding to the first function; associating the target call interface with the first function to provide a functional service of the first function according to the target call interface when the first function is called.
In addition, the method for implementing functions in the application program of the embodiment of the present disclosure further includes the following additional technical features:
in one embodiment of the present disclosure, the matching the plurality of functions with a preset sample function includes: respectively acquiring a function identifier of each function in the plurality of functions; acquiring a sample function identifier of the preset sample function; matching the function identification with the sample function identification.
In one embodiment of the present disclosure, the associating the target call interface with the first function includes: determining a first calling function corresponding to the target calling interface, wherein the first calling function comprises attribute definition information of a first input parameter in the target calling interface; generating a first execution code corresponding to the first function according to the first calling function and the target calling interface; associating the first executing code with the first function.
In one embodiment of the present disclosure, the providing a function service of the first function according to the target call interface when the first function is called includes: obtaining input data for the first function; and when the input data meets the attribute definition information of the first input parameter, executing the first execution code to control the target calling interface to provide the function service of the first function according to the input data.
In one embodiment of the present disclosure, further comprising: when a second function which does not match with the sample function exists in the plurality of functions, acquiring a second execution code corresponding to the second function; associating the second execution code with the second function in the application to execute the second execution code to provide a functional service of the second function when the second function is invoked.
In an embodiment of the present disclosure, before the obtaining of the second execution code corresponding to the second function, the method further includes: setting an extension calling interface of a function corresponding to the second function on an interface layer of the preset function component platform; the obtaining of the second execution code corresponding to the second function includes: determining a second calling function corresponding to the extension calling interface; generating a second execution code corresponding to the first function according to the second calling function and the extended calling interface; associating the second executing code with the second function.
In one embodiment of the disclosure, the obtaining of the second execution code corresponding to the second function includes: receiving the second execution code developed by the user on a preset development platform; and storing the second execution code in an installation package of the application program after associating the second execution code with the second function.
In one embodiment of the present disclosure, further comprising: controlling the preset functional component platform to provide a broadcast signaling interface for the application program; acquiring user operation data corresponding to the second execution code in the application program; and sending the user operation data to a background server of the application program through the broadcast signaling interface.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for implementing a function in an application, including: the device comprises a first acquisition module, a second acquisition module and a control module, wherein the first acquisition module is configured to acquire a plurality of functions corresponding to application programs; the matching module is configured to match the plurality of functions with preset sample functions, wherein the sample functions are preset with calling interfaces of corresponding sample function functions in a preset function component platform; the determining module is configured to determine a target calling interface corresponding to a first function when the first function successfully matched with the sample function exists in the plurality of functions; a first function implementation module configured to associate the target call interface with the first function to provide a functional service of the first function according to the target call interface when the first function is called.
In addition, the apparatus for implementing functions in an application according to the embodiment of the present disclosure further includes the following additional technical features:
in an embodiment of the present disclosure, the matching module is specifically configured to: respectively acquiring a function identifier of each function in the plurality of functions; acquiring a sample function identifier of the preset sample function; matching the function identification with the sample function identification.
In an embodiment of the disclosure, the first function implementation module is specifically configured to: determining a first calling function corresponding to the target calling interface, wherein the first calling function comprises attribute definition information of a first input parameter in the target calling interface; generating a first execution code corresponding to the first function according to the first calling function and the target calling interface; associating the first executing code with the first function.
In an embodiment of the disclosure, the first function implementation module is specifically configured to: obtaining input data for the first function; and when the input data meets the attribute definition information of the first input parameter, executing the first execution code to control the target calling interface to provide the function service of the first function according to the input data.
In one embodiment of the present disclosure, further comprising: a second obtaining module configured to obtain, when there is a second function that does not match the sample function among the plurality of functions, a second execution code corresponding to the second function; a second function implementation module configured to associate the second execution code with the second function in the application program to execute the second execution code to provide a functional service of the second function when the second function is called.
In one embodiment of the present disclosure, further comprising:
the setting module is configured to set an extension calling interface of a function corresponding to the second function on an interface layer of the preset function component platform; the second obtaining module is specifically configured to determine a second calling function corresponding to the extended calling interface; generating a second execution code corresponding to the first function according to the second calling function and the extended calling interface; associating the second executing code with the second function.
In an embodiment of the disclosure, the second obtaining module is specifically configured to: receiving the second execution code developed by the user on a preset development platform; and storing the second execution code in an installation package of the application program after associating the second execution code with the second function.
In one embodiment of the present disclosure, further comprising: a control module configured to control the preset functional component platform to provide a broadcast signaling interface to the application program; a third obtaining module configured to obtain user operation data corresponding to the second execution code in the application program; a sending module configured to send the user operation data to a background server of the application program through the broadcast signaling interface.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the implementation method of the functions in the application program.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a storage medium, wherein instructions of the storage medium, when executed by a processor of an electronic device, enable the electronic device to execute the implementation method of the functions in the application program.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product, which, when executed by a processor of an electronic device, enables the electronic device to perform the implementation method of the functions in the application program as described above.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
after a plurality of functions corresponding to the application program are obtained, the functions are matched with preset sample functions, wherein the sample functions are preset with calling interfaces of corresponding sample function functions in a preset function component platform, furthermore, when a first function successfully matched with the sample functions exists in the functions, a target calling interface corresponding to the first function is determined, and finally, the target calling interface is associated with the first function so as to provide function services of the first function according to the target calling interface when the first function is called. Therefore, for some sample functions in the application program, the preset function functions in the preset function component platform can be directly multiplexed, so that the service efficiency of the application program is improved, and the development cost of the application program is reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a flowchart of a method for implementing functions in an application according to one embodiment of the present disclosure.
FIG. 2 is an illustration of an implementation interface for functionality in an application, according to an example embodiment.
Fig. 3 is a flowchart of a method for implementing functions in an application according to another embodiment of the present disclosure.
Fig. 4 is a flowchart of a method for implementing functions in an application according to yet another embodiment of the present disclosure.
Fig. 5 is a schematic view of an implementation scenario of functions in an application according to an embodiment of the present disclosure.
Fig. 6 is a schematic structural diagram of an apparatus for implementing functions in an application according to an embodiment of the present disclosure.
Fig. 7 is a schematic structural diagram of an apparatus for implementing functions in an application according to yet another embodiment of the present disclosure.
Fig. 8 is a schematic structural diagram of an apparatus for implementing functions in an application according to yet another embodiment of the present disclosure.
Fig. 9 is a schematic structural diagram of an apparatus for implementing functions in an application according to yet another embodiment of the present disclosure.
Fig. 10 is a schematic structural diagram of an electronic device according to an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings 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 disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In view of the above-mentioned problem in the background art, the present disclosure provides a method for implementing functions of an application program based on a preset function component platform, where the preset function component platform can be understood as corresponding to a foreground and a background, which means a set of shared middleware (such as a middle station) in some systems.
Specifically, fig. 1 is a flowchart of a method for implementing a function in an application according to an embodiment of the present disclosure, where an execution subject of the method for implementing a function in an application according to the embodiment of the present disclosure may be an implementation device of a function in an application in this embodiment, and the implementation device of a function in an application may be disposed in any electronic device, and the like.
As shown in fig. 1, the method for implementing functions in the application program includes:
in step 101, a plurality of functions corresponding to the application program are acquired.
In this embodiment, a plurality of functions to be implemented by the application program are obtained, and for the live application program, the plurality of functions may include a comment function, a gift delivery function, and the like.
In different applications, the manner of obtaining the plurality of functions corresponding to the applications is different, and the following example is given:
example one:
in this example, as shown in fig. 2, a function input interface is displayed on a development interface of a development application, where the function input interface includes a plurality of candidate function controls and a custom input box, and a user may trigger to select a corresponding function control in the plurality of candidate function boxes, or may input a corresponding function in the custom input box.
Example two:
in this example, an application type of an application program may be obtained, where the application type may be a live type, a social type, and the like, and then a preset database is queried according to the application type, a candidate function corresponding to the application type is determined, and then the candidate function is displayed to a corresponding development user, and a function is determined in the candidate function according to a selection of the user.
In step 102, the plurality of functions are matched with a preset sample function, wherein the sample function is preset with a calling interface of a corresponding sample function in a preset functional component platform.
As mentioned above, a call interface of a sample function is stored in advance in the preset functional component platform, and the sample function is used for implementing a corresponding live broadcast function, and can be understood as a common interface function and the like. The calling interface includes an execution method abstracted in the corresponding function, for example, a calling interface SendMessage (·); the function is a function for sending messages, and the user can directly realize the function for sending messages through the calling interface without knowing a specific execution source code.
In an embodiment of the present disclosure, when the sample function is stored, a sample function identifier of the sample function is stored in advance, and the sample function identifier may be in a text form, or may also be information of a unique identification function such as a digital code, so as to query a preset corresponding relationship, obtain a function identifier of each function in the plurality of functions, respectively, match the function identifier with the sample function identifier, and determine the first function in the functions according to a matching result.
In another embodiment of the present disclosure, the function of the application may be a less standard word input by the developer, for example, for the sample function "comment" function, the function of the application may be expressed as: "function that can be commented on by the user", therefore, in the present embodiment, each of the plurality of functions may be keyword-matched with the sample function, and it is determined whether the function of the application includes the sample function according to the keyword matching result.
In step 103, when there is a first function successfully matched with the sample function in the plurality of functions, a target call interface corresponding to the first function is determined.
It can be understood that, when there is a first function that is successfully matched with the sample function in the plurality of functions, the first function is considered to belong to a function with stronger commonality, and at this time, real-time encoding and the like are not performed for the first function, but a call interface of a target function corresponding to the first function is called.
In step 104, a target call interface is associated with the first function to provide a function service of the first function according to the target call interface when the first function is called.
It should be understood that the target call interface is associated with the first function, which means that once the first function provides a service, the target call interface is called, and a method function corresponding to the target call interface is executed to implement the corresponding function, where the manner of associating the target call interface with the first function may be to associate the target call interface with a call event of the first function, where the call event may be a trigger event of a corresponding control, an open page of a corresponding page, or the like.
It should be noted that, in different application scenarios, the manner of associating the target call interface with the first function is different, and the following example is given:
example one:
in this example, as shown in FIG. 3, the step of associating the target call interface with the first function comprises:
step 201, a first calling function corresponding to the target calling interface is determined, wherein the first calling function includes attribute definition information of a first input parameter in the target calling interface.
It should be understood that the first calling function is a function used to call a method function corresponding to the target call interface. For example, the target call interface is the above-mentioned "message sending function", because the interface function needs to define a method when executing, the first call function may be understood as a "message sending function" which redefines the method, and the method of redefining the target call interface in this embodiment may include attribute definition information of a first input parameter in the target call interface, the first input parameter may be understood as an input parameter related to the target call interface, for example, when the target call interface corresponds to a comment function in a live broadcast, the first input parameter may be an upper word count limit of the comment, for example, when the target call interface corresponds to a gift display function in a live broadcast, the first input parameter may be a number of gifts displayed by a gift slot, and the upper word count limit mentioned above, the number of gift slots, and the like may be understood as attribute definition information of the first input parameter, for displaying the number of first input parameters, etc.
Step 202, generating a first execution code corresponding to the first function according to the first calling function and the target calling interface.
The first execution code can be understood as a customized target call interface, and the first execution code defines attribute definition information of the first input parameter, so that high customization of the first function is realized.
Step 203, associate the first execution code with the first function.
In this embodiment, the first execution code is associated with the first function, so that after the input data for the first function is acquired, for example, when the first function is a comment function, the corresponding input data is comment information of a user, and further, when the input data satisfies the attribute definition information of the first input parameter, for example, whether the word count of the comment information exceeds a preset upper limit or not, the first execution code is executed to control the target call interface to provide the function service of the first function according to the input data.
In another embodiment of the present disclosure, if the input data does not satisfy the attribute definition information of the first input parameter, a prompt message is displayed in a pop-up window, and the prompt message includes attribute information that the input data should satisfy, so as to prompt the user to re-input the data.
Example two:
in this example, the method further includes displaying, on the development interface, an attribute definition box of the first input parameter corresponding to the target call interface, and acquiring attribute definition information input by a corresponding developer in the attribute definition box to implement redefinition of the target call interface.
In summary, according to the method for implementing functions in an application program of the embodiment of the present disclosure, after obtaining a plurality of functions corresponding to the application program, the plurality of functions are matched with a preset sample function, where the sample function is preset with a call interface of a corresponding sample function in a preset function component platform, and further, when a first function successfully matched with the sample function exists in the plurality of functions, a target call interface corresponding to the first function is determined, and finally, the target call interface is associated with the first function, so as to provide a function service of the first function according to the target call interface when the first function is called. Therefore, for some sample functions in the application program, the preset function functions in the preset function component platform can be directly multiplexed, so that the service efficiency of the application program is improved, and the development cost of the application program is reduced.
Based on the above embodiment, in an actual development process, the application program may also include some special custom functions, for example, for the live application program a, it may include a voting function, and the like.
In an embodiment of the present disclosure, as shown in fig. 4, the method for implementing functions in the application program further includes:
in step 301, when there is a second function that does not match the sample function among the plurality of functions, a second execution code corresponding to the second function is acquired.
In this embodiment, when there is a second function that does not match the sample function, a second executable code corresponding to the second function is obtained, where in different application scenarios, the manner of obtaining the second executable code corresponding to the second function is different, which is exemplified as follows:
example one:
in this example, the interface layer of the preset functional component platform is provided with the extended call interface of the functional function corresponding to the second function, that is, in the interface layer of the live broadcast preset functional component platform, in addition to the call interface including the first function, some extension fields, such as JSON extension fields, are provided for the service side to self-define the corresponding second function, and this way of retaining the extension fields to satisfy the self-definition of the extended call interface is convenient for mining some other sample functions with higher reusability, for example, when the call application program of the extension fields is greater than a preset threshold, the extended call interface corresponding to the corresponding extension fields is determined as the call interface of the corresponding general call function.
In this embodiment, a second calling function corresponding to the extension interface may be determined, a second execution code corresponding to the first function may be generated according to the second calling function and the extension calling interface, the second calling function is redefined to generate the second execution code in the same manner as the first execution code, and the second execution code is further associated with the second function, for example, the second execution code is associated with a calling event of the second function.
In this embodiment, in order to facilitate implementation of the second function, a plug-in related to the extension call interface corresponding to the second function may also be determined, and the corresponding plug-in is introduced in an implementation layer of a preset functional component platform.
Example two:
in this example, after acquiring the function requirement of the second function, the development user may develop a corresponding second execution code on a preset development platform, and further, after associating the second execution code with the second function, store the second execution code in the installation package of the application program, which may achieve that the function of the application program is not leaked,
in this embodiment, as shown in fig. 5, in consideration that in a scenario of a preset functional component platform, a foreground cannot directly communicate with a background, and in order to satisfy a requirement that a corresponding function can implement a closed loop, the preset functional component platform is controlled to provide a broadcast signaling interface to an application program, and user operation data corresponding to a second execution code in the application program is obtained, where the user operation data may be comment information input by a user, voting data of the user, and the like, and the user operation data is sent to a background server of the application program through the broadcast signaling interface, that is, the preset functional component platform is used as a communication bridge between the foreground and the background.
In step 302, the second execution code is associated with a second function in the application program to execute the second execution code to provide a functional service of the second function when the second function is called.
In this embodiment, the second execution code is associated with the second function in the application program, so as to execute the second execution code to provide the functional service of the second function when the second function is called.
In summary, the method for implementing functions in an application program according to the embodiment of the disclosure satisfies implementation of personalized functions of the application program, and is high in practicability.
In order to implement the foregoing embodiments, an implementation apparatus for functions in an application program is further provided in the embodiments of the present disclosure. Fig. 6 is a schematic structural diagram of an apparatus for implementing functions in an application according to an embodiment of the present disclosure, and as shown in fig. 6, the apparatus for implementing functions in an application includes: a first obtaining module 610, a matching module 620, a determining module 630, and a first function implementing module 640, wherein,
a first obtaining module 610 configured to obtain a plurality of functions corresponding to the application program;
a matching module 620 configured to match the plurality of functions with a preset sample function, wherein the sample function is preset with a calling interface of a corresponding sample function in a preset functional component platform;
a determining module 630, configured to determine, when there is a first function that is successfully matched with the sample function in the plurality of functions, a target call interface corresponding to the first function;
a first function implementation module 640 configured to associate the target call interface with the first function to provide a function service of the first function according to the target call interface when the first function is called.
In one embodiment of the present disclosure, the matching module 620 is specifically configured to: respectively acquiring a function identifier of each function in the plurality of functions;
acquiring a sample function identifier of the preset sample function;
matching the function identification with the sample function identification.
In an embodiment of the present disclosure, the first function implementation module 640 is specifically configured to:
determining a first calling function corresponding to the target calling interface, wherein the first calling function comprises attribute definition information of a first input parameter in the target calling interface;
generating a first execution code corresponding to the first function according to the first calling function and the target calling interface;
associating the first executing code with the first function.
In this embodiment, the first function implementing module 640 is specifically configured to:
obtaining input data for the first function;
and when the input data meets the attribute definition information of the first input parameter, executing the first execution code to control the target calling interface to provide the function service of the first function according to the input data.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In summary, the apparatus for implementing functions in an application according to the embodiment of the present disclosure, after obtaining a plurality of functions corresponding to the application, matches the plurality of functions with a preset sample function, where the sample function presets a call interface of a corresponding sample function in a preset function component platform, further, when a first function successfully matched with the sample function exists in the plurality of functions, a target call interface corresponding to the first function is determined, and finally, the target call interface is associated with the first function, so as to provide a function service of the first function according to the target call interface when the first function is called. Therefore, for some sample functions in the application program, the preset function functions in the preset function component platform can be directly multiplexed, so that the service efficiency of the application program is improved, and the development cost of the application program is reduced.
Based on the above embodiment, in an actual development process, the application program may also include some special custom functions, for example, for the live application program a, it may include a voting function, and the like.
In one embodiment of the present disclosure, as shown in fig. 7, on the basis as shown in fig. 6, the apparatus further includes: a second obtaining module 650 and a second function implementing module 660, wherein the second obtaining module 650 is configured to obtain a second execution code corresponding to a second function when the second function that does not match the sample function exists in the plurality of functions;
a second function implementation module 660 configured to associate the second execution code with the second function in the application program to execute the second execution code to provide a functional service of the second function when the second function is called.
In one embodiment of the present disclosure, as shown in fig. 8, on the basis of that shown in fig. 7, the apparatus further includes: a module 670 is provided in which, among other things,
a setting module 670 configured to set an extension call interface of a function corresponding to the second function at an interface layer of the preset functional component platform;
a second obtaining module 650 specifically configured to determine a second calling function corresponding to the extended calling interface;
generating a second execution code corresponding to the first function according to the second calling function and the extended calling interface;
the second executing code is associated with a second function.
In an embodiment of the present disclosure, the second obtaining module 650 is specifically configured to:
receiving a second execution code developed by a user on a preset development platform;
and storing the second execution code in an installation package of the application program after the second execution code is associated with the second function.
In one embodiment of the present disclosure, as shown in fig. 9, on the basis of that shown in fig. 8, the apparatus further includes: a control module 680, a third acquisition module 690, and a sending module 6100, wherein,
a control module 680 configured to control the preset functional component platform to provide a broadcast signaling interface to the application program;
a third obtaining module 690, configured to obtain user operation data corresponding to the second execution code in the application program;
a sending module 6100 configured to send the user operation data to the background server of the application program through the broadcast signaling interface.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In summary, the device for implementing functions in an application program according to the embodiment of the present disclosure satisfies the implementation of personalized functions of the application program, and has high practicability.
In order to realize the above embodiment, the present disclosure further provides an electronic device. Fig. 10 is a block diagram of an electronic device proposed in accordance with the present disclosure.
As shown in fig. 10, the electronic device 200 includes:
a memory 210 and a processor 220, a bus 230 connecting different components (including the memory 210 and the processor 220), wherein the memory 210 stores computer programs, and when the processor 220 executes the programs, the implementation method of the functions in the application programs of the embodiment of the disclosure is realized.
Bus 230 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 200 typically includes a variety of electronic device readable media. Such media may be any available media that is accessible by electronic device 200 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 210 may also include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)240 and/or cache memory 250. The electronic device 200 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 260 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 10, and commonly referred to as a "hard drive"). Although not shown in FIG. 10, 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 bus 230 by one or more data media interfaces. Memory 210 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 disclosure.
A program/utility 280 having a set (at least one) of program modules 270, including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may comprise an implementation of a network environment, may be stored in, for example, the memory 210. The program modules 270 generally perform the functions and/or methodologies of the embodiments described in this disclosure.
Electronic device 200 may also communicate with one or more external devices 290 (e.g., keyboard, pointing device, display 291, etc.), with one or more devices that enable a user to interact with electronic device 200, and/or with any devices (e.g., network card, modem, etc.) that enable electronic device 200 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 292. Also, the electronic device 200 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 293. As shown in FIG. 10, the network adapter 293 communicates with the other modules of the electronic device 200 via the bus 230. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 200, 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 processor 220 executes various functional applications and data processing by executing programs stored in the memory 210.
It should be noted that, for the implementation process and the technical principle of the electronic device of the embodiment, reference is made to the foregoing explanation of the implementation method of the function in the application program of the embodiment of the present disclosure, and details are not described here again.
In summary, in the electronic device according to the embodiment of the disclosure, after obtaining a plurality of functions corresponding to an application program, the plurality of functions are matched with a preset sample function, where the sample function is preset with a call interface of a corresponding sample function in a preset function component platform, and further, when a first function successfully matched with the sample function exists in the plurality of functions, a target call interface corresponding to the first function is determined, and finally, the target call interface is associated with the first function, so as to provide a function service of the first function according to the target call interface when the first function is called. Therefore, for some sample functions in the application program, the preset function functions in the preset function component platform can be directly multiplexed, so that the service efficiency of the application program is improved, and the development cost of the application program is reduced.
In order to implement the above embodiments, the present disclosure also provides a storage medium.
Wherein the instructions in the storage medium, when executed by the processor of the electronic device, enable the electronic device to perform the implementation method of the functions in the application program as described above.
In order to implement the above embodiments, the present disclosure also provides a computer program product, which when executed by a processor of an electronic device, enables the electronic device to execute the implementation method of the functions in the application program as described above.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for implementing functions in an application program is characterized by comprising the following steps:
acquiring a plurality of functions corresponding to the application program;
matching the plurality of functions with a preset sample function, wherein the sample function is preset with a calling interface of a corresponding sample function in a preset function component platform;
when a first function successfully matched with the sample function exists in the plurality of functions, determining a target calling interface corresponding to the first function;
associating the target call interface with the first function to provide a functional service of the first function according to the target call interface when the first function is called.
2. The method of claim 1, wherein said matching said plurality of functions to a preset sample function comprises:
respectively acquiring a function identifier of each function in the plurality of functions;
acquiring a sample function identifier of the preset sample function;
matching the function identification with the sample function identification.
3. The method of claim 1, wherein said associating the target call interface with the first function comprises:
determining a first calling function corresponding to the target calling interface, wherein the first calling function comprises attribute definition information of a first input parameter in the target calling interface;
generating a first execution code corresponding to the first function according to the first calling function and the target calling interface;
associating the first executing code with the first function.
4. The method of claim 3, wherein providing the function service of the first function according to the target call interface when the first function is called comprises:
obtaining input data for the first function;
and when the input data meets the attribute definition information of the first input parameter, executing the first execution code to control the target calling interface to provide the function service of the first function according to the input data.
5. The method of claim 1, further comprising:
when a second function which does not match with the sample function exists in the plurality of functions, acquiring a second execution code corresponding to the second function;
associating the second execution code with the second function in the application to execute the second execution code to provide a functional service of the second function when the second function is invoked.
6. The method of claim 5, wherein prior to said obtaining second execution code corresponding to said second function, further comprising:
setting an extension calling interface of a function corresponding to the second function on an interface layer of the preset function component platform;
the obtaining of the second execution code corresponding to the second function includes:
determining a second calling function corresponding to the extension calling interface;
generating a second execution code corresponding to the first function according to the second calling function and the extended calling interface;
associating the second executing code with the second function.
7. The method of claim 5, wherein said obtaining a second execution code corresponding to the second function comprises:
receiving the second execution code developed by the user on a preset development platform;
and storing the second execution code in an installation package of the application program after associating the second execution code with the second function.
8. An apparatus for implementing functions in an application program, comprising:
the device comprises a first acquisition module, a second acquisition module and a control module, wherein the first acquisition module is configured to acquire a plurality of functions corresponding to application programs;
the matching module is configured to match the plurality of functions with preset sample functions, wherein the sample functions are preset with calling interfaces of corresponding sample function functions in a preset function component platform;
the determining module is configured to determine a target calling interface corresponding to a first function when the first function successfully matched with the sample function exists in the plurality of functions;
a first function implementation module configured to associate the target call interface with the first function to provide a functional service of the first function according to the target call interface when the first function is called.
9. An electronic device, comprising:
a processor;
a memory configured to store the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of implementing the functions in the application program according to any one of claims 1 to 7.
10. A storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform a method of implementing functions in an application as claimed in any one of claims 1 to 7.
CN202010883975.9A 2020-08-28 2020-08-28 Method and device for realizing functions in application program Pending CN112130850A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010883975.9A CN112130850A (en) 2020-08-28 2020-08-28 Method and device for realizing functions in application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010883975.9A CN112130850A (en) 2020-08-28 2020-08-28 Method and device for realizing functions in application program

Publications (1)

Publication Number Publication Date
CN112130850A true CN112130850A (en) 2020-12-25

Family

ID=73847699

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010883975.9A Pending CN112130850A (en) 2020-08-28 2020-08-28 Method and device for realizing functions in application program

Country Status (1)

Country Link
CN (1) CN112130850A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472903A (en) * 2021-09-02 2021-10-01 腾讯科技(深圳)有限公司 Data processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9823909B1 (en) * 2014-05-02 2017-11-21 Amazon Technologies, Inc. Program code conversion for cross-platform compatibility
CN109558325A (en) * 2018-12-03 2019-04-02 浪潮电子信息产业股份有限公司 Time delay statistical method and device and computer readable storage medium
CN110007902A (en) * 2019-03-12 2019-07-12 中国平安财产保险股份有限公司 The method and device of business processing flow configuration
CN110377325A (en) * 2019-06-17 2019-10-25 中国平安人寿保险股份有限公司 Interface allocation method, interface call method, device, equipment and storage medium
CN111290806A (en) * 2020-02-10 2020-06-16 广州虎牙科技有限公司 Calling method and device of application program interface, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9823909B1 (en) * 2014-05-02 2017-11-21 Amazon Technologies, Inc. Program code conversion for cross-platform compatibility
CN109558325A (en) * 2018-12-03 2019-04-02 浪潮电子信息产业股份有限公司 Time delay statistical method and device and computer readable storage medium
CN110007902A (en) * 2019-03-12 2019-07-12 中国平安财产保险股份有限公司 The method and device of business processing flow configuration
CN110377325A (en) * 2019-06-17 2019-10-25 中国平安人寿保险股份有限公司 Interface allocation method, interface call method, device, equipment and storage medium
CN111290806A (en) * 2020-02-10 2020-06-16 广州虎牙科技有限公司 Calling method and device of application program interface, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472903A (en) * 2021-09-02 2021-10-01 腾讯科技(深圳)有限公司 Data processing method and device

Similar Documents

Publication Publication Date Title
CN108073429B (en) Payment mode configuration method, device, equipment and storage medium
CN110032568B (en) Data structure reading and updating method and device, and electronic equipment
CN113127050B (en) Application resource packaging process monitoring method, device, equipment and medium
CN107025145B (en) Error code analysis method and device
CN110737425B (en) Method and device for establishing application program of charging platform system
CN109218393B (en) Push implementation method, device, equipment and computer storage medium
CN111857712A (en) Form processing method, device, terminal and medium
CN107172110A (en) A kind of application APP resource loading method, business function implementation method and device
CN111241803A (en) Method and device for generating text file, computer equipment and readable storage medium
CN111046640A (en) Dynamic generation method and device of certification document
CN110888972A (en) Sensitive content identification method and device based on Spark Streaming
CN112130850A (en) Method and device for realizing functions in application program
CN114218908A (en) Information pushing method and device and electronic equipment
CN114637672A (en) Automatic data testing method and device, computer equipment and storage medium
CN110266610B (en) Traffic identification method and device and electronic equipment
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
CN112667441A (en) Service module scheduling method, system and storage medium based on fault-tolerant function
CN107609871B (en) Payment track reproduction method, device, system, electronic equipment and storage medium
CN112131611A (en) Data correctness verification method, device, equipment, system and storage medium
CN110648219A (en) Method and device for standardizing input area of bank transaction system
CN113504836B (en) Information input method and electronic equipment
CN115484149B (en) Network switching method, network switching device, electronic equipment and storage medium
CN111291644B (en) Method and apparatus for processing information
CN113127051B (en) Application resource packaging process monitoring method, device, equipment and medium
CN109376023B (en) Method and equipment for generating calling information and issuing return code group

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