CN110597492B - Module calling method and related products - Google Patents

Module calling method and related products Download PDF

Info

Publication number
CN110597492B
CN110597492B CN201910726719.6A CN201910726719A CN110597492B CN 110597492 B CN110597492 B CN 110597492B CN 201910726719 A CN201910726719 A CN 201910726719A CN 110597492 B CN110597492 B CN 110597492B
Authority
CN
China
Prior art keywords
target operation
software development
development kit
parameter
operation instruction
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.)
Active
Application number
CN201910726719.6A
Other languages
Chinese (zh)
Other versions
CN110597492A (en
Inventor
刘均
赵涛
张秋菊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch 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 Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN201910726719.6A priority Critical patent/CN110597492B/en
Publication of CN110597492A publication Critical patent/CN110597492A/en
Application granted granted Critical
Publication of CN110597492B publication Critical patent/CN110597492B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application discloses a method for calling a module and a related product, which are applied to electronic equipment, wherein the method comprises the following steps: receiving a target operation instruction; calling a software development kit according to the received target operation instruction; and calling a target module to execute target operation according to the target operation instruction and the software development kit and a preset rule. Therefore, by implementing the technical scheme of the application, the business operation flow of software development is simplified, and the development efficiency is improved.

Description

Module calling method and related products
Technical Field
The application relates to the technical field of software development, in particular to a method for calling a module and a related product.
Background
Currently, with the rapid development of the internet, cloud computing and big data technology, more and more application software should be transported, which provides many convenience for people's life and work. In the existing software development process, when the bottom layer module of the equipment is operated, different functions are adopted to call corresponding different modules to realize corresponding functional operation.
However, with the continuous progress of information technology, the functions of devices are more and more diversified, and corresponding modules for realizing the functions are more and more. Therefore, when the operation on the bottom layer module of the device is continued in the existing manner in the process of developing software, the business process is very complicated, and the workload is very low.
Disclosure of Invention
The embodiment of the application provides a method for calling modules and related products, which enable the functions of a single module to be quickly called by packaging the calls of different modules in the same function, simplify the business operation flow of software development and facilitate the improvement of development efficiency.
In a first aspect, an embodiment of the present application provides a method for calling a module, which is applied to an electronic device, where the method includes:
receiving a target operation instruction;
calling a software development kit according to the received target operation instruction;
and calling a target module to execute target operation according to the target operation instruction and the software development kit and a preset rule.
Optionally, the calling of all modules in the electronic device is encapsulated in the same interface function of the software development kit, and the calling the target module according to the target operation instruction and the software development kit to execute the target operation according to a preset rule includes:
processing the target operation instruction according to the interface function;
and calling a target module to execute target operation according to a preset rule according to the processing result of the interface function.
Optionally, the target operation instruction includes an incoming parameter, the incoming parameter includes a first parameter, a second parameter, and a third parameter, and processing the target operation instruction according to the interface function includes:
determining a target module for executing the target operation according to the interface function through the first parameter;
determining a module action for executing the target operation according to the interface function through the second parameter;
and determining an action parameter for executing the target operation according to the third parameter by the interface function.
Optionally, the target operation instruction includes configuration information, and the calling the software development kit according to the received target operation instruction includes:
matching the configuration information in the software development kit with the configuration information in the target operation instruction;
if the matching is successful, calling the software development kit;
if the matching fails, the software development kit is abandoned.
Optionally, the matching the configuration information in the software development kit with the configuration information in the target operation instruction includes:
if the software development kit is not called for the first time, comparing all configuration items in the software development kit with all configuration items in the target operation instruction item by item;
Judging whether the number of configuration items successfully compared reaches a preset threshold value or not;
if the preset threshold is reached, the matching is successful.
Optionally, if the software development kit is invoked for the first time, the method further comprises:
comparing at least one configuration item in the software development kit item by item with all configuration items in the target operation instruction;
if any one of the at least one configuration item is inconsistent with the configuration item of the target operation instruction, the matching is failed.
Optionally, the method further comprises:
receiving an execution result of the target operation returned by the software development kit, wherein the execution result of the target operation comprises a return value of an interface function of the software development kit;
judging whether the target operation is successfully executed according to the return value;
and displaying the judging result on a display interface of the electronic equipment.
In a second aspect, an embodiment of the present application provides an apparatus for calling a module, which is applied to an electronic device, where the apparatus includes:
a receiving unit for receiving a target operation instruction;
the calling unit is used for calling the software development kit according to the received target operation instruction;
And the execution unit is used for calling a target module to execute target operation according to the target operation instruction and the software development kit and a preset rule.
Optionally, the calls of all modules in the electronic device are encapsulated in a same interface function of the software development kit, and the execution unit includes:
a processing subunit, configured to process the target operation instruction according to the interface function;
and the execution subunit is used for calling a target module to execute target operation according to a preset rule according to the result of the processing of the interface function.
Optionally, the target operation instruction includes an incoming parameter, the incoming parameter including a first parameter, a second parameter, and a third parameter, the processing subunit includes:
a first determining subunit, configured to determine, according to the interface function, a target module that performs the target operation through the first parameter;
a second determining subunit, configured to determine, according to the interface function, a module action for executing the target operation through the second parameter;
and the third determination subunit is used for determining an action parameter for executing the target operation according to the interface function through the third parameter.
Optionally, the target operation instruction includes configuration information, and the calling unit includes:
the matching subunit is used for matching the configuration information in the software development kit with the configuration information in the target operation instruction;
a calling subunit, configured to call the software development kit if the matching is successful; if the matching fails, the software development kit is abandoned.
Optionally, the matching subunit includes:
the comparison subunit is used for comparing all configuration items in the software development kit with all configuration items in the target operation instruction item by item if the software development kit is not called for the first time;
the judging subunit is used for judging whether the number of the configuration items successfully compared reaches a preset threshold value;
and the fourth determining subunit is used for successfully matching if the preset threshold value is reached.
Optionally, if the software development kit is called for the first time, the comparison subunit is further configured to compare, item by item, at least one configuration item in the software development kit with all configuration items in the target operation instruction; the fourth determining subunit is further configured to fail matching if any one of the at least one configuration item is inconsistent with the configuration item of the target operation instruction.
Optionally, the apparatus further comprises:
the receiving unit is further configured to receive an execution result of the target operation returned by the software development kit, where the execution result of the target operation includes a return value of an interface function of the software development kit;
the judging unit is used for judging whether the target operation is successfully executed according to the return value;
and the display unit is used for displaying the judging result on a display interface of the electronic equipment.
In a third aspect, an embodiment of the present application provides an electronic device, where the electronic device includes a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, where the programs include instructions for performing steps in the method of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform some or all of the steps described in the method according to the first aspect of the embodiments of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in the method of the first aspect of the embodiments of the present application, the computer program product may be a software installation package.
It can be seen that, in the technical scheme provided by the embodiment of the application, a target operation instruction is received; calling a software development kit according to the received target operation instruction; and calling a target module to execute target operation according to the target operation instruction and the software development kit and a preset rule. Therefore, by implementing the embodiment of the application, the business operation flow of software development is simplified, and the development efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a software development system according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for calling a module according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating another method for calling a module according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a service implementation flow of a method for calling a module according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating another method for calling a module according to an embodiment of the present application;
FIG. 6 is a functional block diagram of an apparatus for calling a module according to an embodiment of the present application;
fig. 7 is a schematic diagram of a physical architecture of an electronic device according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms first, second, third and the like in the description and in the claims and in the above drawings, are used for distinguishing between different objects and not necessarily for describing a particular sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that each of the embodiments described herein may be combined with other embodiments.
Referring to fig. 1, fig. 1 is a schematic diagram of a software development system according to an embodiment of the application. As shown in fig. 1, the software development system is applied to an electronic device, and the electronic device includes, but is not limited to, a device with a communication function, a smart phone, a tablet computer, a notebook computer, a desktop computer, a portable digital player, a smart bracelet, a smart watch, and the like, and the software development system includes: an application 101, a Software Development Kit (SDK) 102, and a hardware module 103.
The application 101 is an application installed on an electronic device, and the application may call the software development kit 102 through a universal asynchronous receiver Transmitter (Universal Asynchronous Receiver/Transmitter, commonly referred to as UART) according to the electronic device, and input relevant parameters into the software development kit 102. The functions of the software development kit 102 may be processed according to the received related parameters transmitted by the application program, and then execute corresponding actions on the corresponding hardware modules 103 according to the agreed rules according to the processing result, so as to implement specific functional operations. Meanwhile, the hardware module 103 may return the operation result to the software development kit 102. After that, the software 102 may return the return value of the function operation result to the application 101 through the universal asynchronous receiver transmitter, and the application 101 may determine whether the corresponding hardware module operation is successfully executed according to the return value of the function calling the software development kit 102.
Wherein the universal asynchronous receiver transmitter is an asynchronous receiver transmitter that can convert data to be transmitted between serial communication and parallel communication.
For example, the application scenario of the software development system on the electronic device is: the user clicks or touches a button or an identifier of an application installed on the electronic device, and inputs a corresponding parameter, the application installed on the electronic device calls a corresponding predefined function in the software development kit according to a function selected by the user, and one input parameter defines a function, and the predefined function operates a corresponding hardware module to execute a corresponding action according to the input parameter.
It should be noted that, the software development system shown in fig. 1 may be used to implement the method for calling modules according to other embodiments of the present application.
Referring to fig. 2, fig. 2 is a flowchart of a method for calling a module according to an embodiment of the present application, as shown in fig. 2, the method is applied to an electronic device, and the method includes:
s201, the electronic equipment receives a target operation instruction.
Wherein the target operation instruction comprises an instruction for calling a software development kit and an instruction for calling a hardware module of the software development kit, the instruction for calling the software development kit can be some configuration information related to the called software development kit, and the instruction for calling the hardware module of the software development kit can be input values or parameters of some functions.
It is understood that different target operation instructions correspond to different call operations, and the target operation instructions and the call operations correspond to each other one by one.
S202, the electronic equipment calls a software development kit according to the received target operation instruction.
The electronic equipment communicates with the software development kit through a universal asynchronous receiver transmitter, so that the software development kit can be called.
S203, the electronic equipment calls a target module to execute target operation according to the target operation instruction and the software development kit and a preset rule.
The preset rule is a parameter transmission rule agreed by functions of the electronic equipment and the software development kit. In addition, the target module is a hardware module, and the call of the hardware module needing to be operated can be packaged in the same function according to the parameter transmission rule.
The instruction in the target operation instruction for calling the software development kit to call the hardware module may include an incoming parameter, where the incoming parameter includes a first parameter, a second parameter and a third parameter. The parameter transmission rule agrees with a first parameter of the input parameters to determine a module name for executing an operation, a second parameter of the input parameters to determine an action to be executed by the module for determining the first parameter, and a third parameter of the input parameters to determine an action parameter of the action for determining the second parameter, wherein different values corresponding to the three parameters are explicitly defined in advance. Therefore, when a user needs to call different hardware modules, the user does not need to call different hardware modules by using different functions respectively, and can call the software development kit to call different modules by using the same function only by inputting different input parameters in the target operation instruction.
It can be seen that, in the technical scheme provided by the embodiment of the application, a target operation instruction is received; calling a software development kit according to the received target operation instruction; and calling a target module to execute target operation according to the target operation instruction and the software development kit and a preset rule. Therefore, by implementing the embodiment of the application, the business operation flow of software development is simplified, and the development efficiency is improved.
Referring to fig. 3, fig. 3 is a flowchart of another method for calling a module according to an embodiment of the present application, where, as shown in fig. 3, the method is applied to an electronic device, and the electronic device installs an application program, and the method includes:
s301, receiving a target operation instruction by the application program.
S302, the application program calls a software development kit according to the received target operation instruction.
S303, the call of all modules in the electronic equipment is packaged in the same interface function of the software development kit, and the application program processes the target operation instruction according to the interface function.
The target operation instruction includes an input parameter, the input parameter includes a first parameter, a second parameter, and a third parameter, and the processing, by the application program, the target operation instruction according to the interface function includes: the application program determines a target module for executing the target operation according to the first parameter through the interface function, determines a module action for executing the target operation according to the second parameter through the interface function, and determines an action parameter for executing the target operation according to the third parameter through the interface function.
It should be noted that, the application program and the software development kit agree on a function parameter transmission rule, and the call of the hardware module to be operated is packaged in the same function according to the parameter transmission rule. The method comprises the steps of determining a module name of an operation to be executed by a module, determining a first parameter of an incoming parameter, determining an action to be executed by the module determined by the first parameter by a second parameter of the incoming parameter, determining an action parameter of the action determined by the second parameter by a third parameter of the incoming parameter, and definitely defining different values corresponding to the three parameters in advance. Wherein the function format is shown in table 1 below:
TABLE 1 functional format
It can be understood that when the application program invokes the software development tool, it transmits the input parameters in the target operation instruction to the interface function of the software development tool package, where the interface function can process according to the input parameters, that is, define the operated module according to the first input parameter, execute the action according to the second input parameter, and define the action parameter according to the third input parameter.
S304, the application program calls a target module to execute the target operation according to a preset rule according to the result of the processing of the interface function.
It can be understood that, because the parameter transmission rule is preset, different parameters correspond to different module names, module actions and action parameters after the parameters are processed by the interface function. Therefore, the interface function of the software development kit operates the corresponding hardware module to execute the corresponding action according to the parameter, namely, all the hardware modules can be called by one function. For example, if the incoming parameter of the target operation instruction is (1, 0), the network module opening operation needs to be executed, and other restrictions are not made; or, if the incoming parameter of the target operation instruction is (2, 1, 100), the WiFi module needs to be executed to turn on for 100 minutes.
For example, referring to fig. 4 together with the implementation process, fig. 4 is a schematic flow chart of a service implementation of a method for calling a module according to an embodiment of the present application. As shown in fig. 4, the interface function performs an incoming action according to the incoming parameter of the target operation command, and the incoming parameter listed in fig. 4 is (1, 2, 100). Thus, the interface function operates the network module to open for 100 minutes according to the incoming parameters, and the target operating instruction opens for 100 minutes for the network module. And the network module returns the action result of executing the opening for 100 minutes to the interface function.
S305, the application program receives an execution result of the target operation returned by the software development kit, wherein the execution result of the target operation comprises a return value of the interface function.
Wherein it is understood that the return values of the interface functions include 0 and 1.
S306, the application program judges whether the target operation is successfully executed according to the return value.
Wherein the application program judging whether the target operation is successfully executed according to the return value comprises the following steps: if the return value is 0, the application program determines that the target operation is successfully executed; if the return value is 1, the application program determines that the target operation is not successfully executed.
And S307, the application program displays the judging result on a display interface of the electronic equipment.
The application program displaying the judging result on a display interface of the electronic equipment comprises the following steps: the application program judges whether the electronic equipment has a page frame template corresponding to a page accessed to the application program; the application program binds the judging result with the page framework template to generate a display page of the judging result; and the application program displays the display page of the judging result on a display interface of the electronic equipment.
If the intelligent terminal does not have the page framework template, the method further comprises the following steps: the application program obtains a corresponding field of a page accessed to the application program and a field type of the corresponding field; and the application program analyzes the corresponding field according to the field type to generate a page frame template corresponding to the page accessed to the application program.
The electronic device includes a display interface, and the application program displays the execution result of the target operation on the display surface, so that the user can perform the next operation according to the execution result of the target operation.
In addition, related terms or explanations of the embodiments of the present application may be described with reference to the above-described embodiments.
According to the technical scheme provided by the embodiment of the application, the call of all the modules in the electronic equipment is packaged in the same interface function of the software development kit, the application program call software development kit performs unified call on all the modules according to the preset parameter transmission rule, namely, the application program call software development kit can call all the hardware modules through one function, so that different functions of different modules are prevented from being called, a single function can be quickly called, the business operation flow of software development is simplified, and the efficiency of software development is improved.
Referring to fig. 5, fig. 5 is a flowchart of another method for calling a module according to an embodiment of the present application, as shown in fig. 5, the method is applied to an electronic device, and the method includes:
s501, the electronic equipment receives a target operation instruction, wherein the target operation instruction comprises configuration information.
Wherein it is understood that the configuration information may include an installation resource package and/or an installation configuration item.
S502, the electronic equipment matches the configuration information in the software development kit with the configuration information in the target operation instruction.
The electronic device matching the configuration information in the software development kit with the configuration information in the target operation instruction comprises: if the electronic equipment does not call the software development kit for the first time, the electronic equipment compares all configuration items in the software development kit with all configuration items in the target operation instruction item by item; the electronic equipment judges whether the number of configuration items successfully compared reaches a preset threshold value or not; if the preset threshold is reached, the electronic equipment determines that the matching is successful.
If the electronic device invokes the software development kit for the first time, the method further includes: the electronic equipment compares at least one configuration item in the software development kit with all configuration items in the target operation instruction item by item; and if any configuration item in the at least one configuration item is inconsistent with the configuration item of the target operation instruction, the electronic equipment determines that the matching is failed.
S503, if the matching is successful, the electronic equipment calls the software development kit.
Wherein, it can be understood that if the matching fails, the electronic device gives up calling the software development kit.
Specifically, for example, in an embodiment of the present invention, the electronic device may call the software development kit through a specific application program, and the configuration information of the target operation instruction may be configuration information of the application program. And the electronic equipment matches the configuration information in the software development kit with the configuration information of the application program, and if the configuration information in the software development kit fails to be matched with the configuration information of the application program, the software development kit can be determined to be unsuccessfully connected with the application program. That is, during the access process, the application program does not accurately configure the related configuration information, and the electronic device will prohibit the application program from invoking the software development kit, so as to avoid the occurrence of program crash phenomenon.
S504, the electronic equipment calls a target module to execute target operation according to the target operation instruction and the software development kit and a preset rule.
The preset rule is a parameter transmission rule agreed by functions of the electronic equipment and the software development kit. In addition, the target module is a hardware module, and the call of the hardware module needing to be operated can be packaged in the same function according to the parameter transmission rule.
The instruction in the target operation instruction for calling the software development kit to call the hardware module may include an incoming parameter, where the incoming parameter includes a first parameter, a second parameter and a third parameter. The parameter transmission rule agrees with a first parameter of the input parameters to determine a module name for executing an operation, a second parameter of the input parameters to determine an action to be executed by the module for determining the first parameter, and a third parameter of the input parameters to determine an action parameter of the action for determining the second parameter, wherein different values corresponding to the three parameters are explicitly defined in advance. Therefore, when a user needs to call different hardware modules, the user does not need to call different hardware modules by using different functions respectively, and can call the software development kit to call different modules by using the same function only by inputting different input parameters in the target operation instruction.
In addition, related terms or explanations of the embodiments of the present application may be described with reference to the above-described embodiments.
It can be seen that, in the technical scheme provided by the embodiment of the application, before the electronic device invokes the software development kit, the electronic device matches the configuration information in the software development kit with the configuration information in the target operation instruction, and if the matching is successful, the electronic device invokes the software development kit to invoke the corresponding module according to the target operation instruction and the preset rule to perform the target operation. Therefore, by implementing the embodiment, the method is beneficial to ensuring that the corresponding software development tool kit is correctly called and avoiding the wrong call, thereby further improving the efficiency of software development.
The foregoing description of the embodiments of the present application has been presented primarily in terms of a method-side implementation. It will be appreciated that, in order to achieve the above-described functions, the electronic device includes corresponding hardware structures and/or software elements for performing the respective functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the application can divide the functional units of the electronic device according to the method example, for example, each functional unit can be divided corresponding to each function, and two or more functions can be integrated in one processing unit. The integrated units may be implemented in hardware or in software functional units. It should be noted that, in the embodiment of the present application, the division of the units is schematic, which is merely a logic function division, and other division manners may be implemented in actual practice.
Referring to fig. 6, fig. 6 is a functional unit block diagram of an apparatus for calling a module according to an embodiment of the present application. As shown in fig. 6, the apparatus 600 for calling a module is applied to an electronic device, where an application program is installed, and the apparatus 600 includes the following logic units:
a receiving unit 601, configured to receive a target operation instruction;
a calling unit 602, configured to call a software development kit according to the received target operation instruction;
and the execution unit 603 is configured to invoke a target module to execute a target operation according to a preset rule according to the target operation instruction and the software development kit.
Optionally, the calls of all modules in the electronic device are encapsulated in the same interface function of the software development kit, and the execution unit 603 includes:
a processing subunit, configured to process the target operation instruction according to the interface function;
and the execution subunit is used for calling a target module to execute target operation according to a preset rule according to the result of the processing of the interface function.
Optionally, the target operation instruction includes an incoming parameter, the incoming parameter including a first parameter, a second parameter, and a third parameter, the processing subunit includes:
a first determining subunit, configured to determine, according to the interface function, a target module that performs the target operation through the first parameter;
a second determining subunit, configured to determine, according to the interface function, a module action for executing the target operation through the second parameter;
and the third determination subunit is used for determining an action parameter for executing the target operation according to the interface function through the third parameter.
Optionally, the target operation instruction includes configuration information, and the calling unit 602 includes:
the matching subunit is used for matching the configuration information in the software development kit with the configuration information in the target operation instruction;
A calling subunit, configured to call the software development kit if the matching is successful; if the matching fails, the software development kit is abandoned.
Optionally, the matching subunit includes:
the comparison subunit is used for comparing all configuration items in the software development kit with all configuration items in the target operation instruction item by item if the software development kit is not called for the first time;
the judging subunit is used for judging whether the number of the configuration items successfully compared reaches a preset threshold value;
and the fourth determining subunit is used for successfully matching if the preset threshold value is reached.
Optionally, if the software development kit is called for the first time, the comparison subunit is further configured to compare, item by item, at least one configuration item in the software development kit with all configuration items in the target operation instruction; the fourth determining subunit is further configured to fail matching if any one of the at least one configuration item is inconsistent with the configuration item of the target operation instruction.
Optionally, the apparatus 600 further includes:
the receiving unit is further configured to receive an execution result of the target operation returned by the software development kit, where the execution result of the target operation includes a return value of an interface function of the software development kit;
The judging unit is used for judging whether the target operation is successfully executed according to the return value;
and the display unit is used for displaying the judging result on a display interface of the electronic equipment.
It should be noted that, the logic unit in this embodiment may perform the method described in the method embodiment.
It can be seen that, in the technical scheme provided by the embodiment of the application, the device for calling the module receives the target operation instruction; calling a software development kit according to the received target operation instruction; and calling a target module to execute target operation according to the target operation instruction and the software development kit and a preset rule. Therefore, by implementing the embodiment of the application, the business operation flow of software development is simplified, and the development efficiency is improved.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the application. As shown in fig. 7, the electronic device 700 includes an application processor 710, a memory 720, a communication interface 730, and one or more programs 721, wherein the one or more programs 721 are stored in the memory 720 and configured to be executed by the application processor 710, and when the one or more programs 721 are executed, the processor 710 performs the operations of: receiving a target operation instruction; calling a software development kit according to the received target operation instruction; and calling a target module to execute target operation according to the target operation instruction and the software development kit and a preset rule.
Optionally, the calls of all modules within the electronic device are encapsulated in the same interface function of the software development kit, and the processor 710 further performs the following operations: processing the target operation instruction according to the interface function; and calling a target module to execute target operation according to a preset rule according to the processing result of the interface function.
Optionally, the target operation instruction includes an incoming parameter, the incoming parameter including a first parameter, a second parameter, and a third parameter, the processor 710 further performs the following operations: determining a target module for executing the target operation according to the interface function through the first parameter; determining a module action for executing the target operation according to the interface function through the second parameter; and determining an action parameter for executing the target operation according to the third parameter by the interface function.
Optionally, the target operation instruction includes configuration information, and the processor 710 further performs the following operations: matching the configuration information in the software development kit with the configuration information in the target operation instruction; if the matching is successful, calling the software development kit; if the matching fails, the software development kit is abandoned.
Optionally, the processor 710 further performs the following operations: if the software development kit is not called for the first time, comparing all configuration items in the software development kit with all configuration items in the target operation instruction item by item; judging whether the number of configuration items successfully compared reaches a preset threshold value or not; if the preset threshold is reached, the matching is successful.
Optionally, if the software development kit is invoked for the first time, the processor 710 further performs the following operations: comparing at least one configuration item in the software development kit item by item with all configuration items in the target operation instruction; if any one of the at least one configuration item is inconsistent with the configuration item of the target operation instruction, the matching is failed.
Optionally, the processor 710 further performs the following operations: receiving an execution result of the target operation returned by the software development kit, wherein the execution result of the target operation comprises a return value of an interface function of the software development kit; judging whether the target operation is successfully executed according to the return value; and displaying the judging result on a display interface of the electronic equipment.
It should be noted that, the electronic device according to this embodiment may perform the method described in the method embodiment.
It can be seen that, in the technical scheme provided by the embodiment of the application, the electronic device receives the target operation instruction; calling a software development kit according to the received target operation instruction; and calling a target module to execute target operation according to the target operation instruction and the software development kit and a preset rule. Therefore, by implementing the embodiment of the application, the business operation flow of software development is simplified, and the development efficiency is improved.
The embodiment of the application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program makes a computer execute part or all of the steps of any one of the above method embodiments, and the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform part or all of the steps of any one of the methods described in the method embodiments above. The computer program product may be a software installation package, said computer comprising an electronic device.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, it should be understood by those skilled in the art that the embodiments described in the specification are all preferred embodiments, and the acts and elements referred to are not necessarily required for the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, such as the above-described division of units, merely a division of logic functions, and there may be additional manners of dividing in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, or may be in electrical or other forms.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units described above, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a memory, comprising several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the above-mentioned method of the various embodiments of the present application. And the aforementioned memory includes: a U-disk, a read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the various methods of the above embodiments may be implemented by a program that instructs associated hardware, and the program may be stored in a computer readable memory, which may include: flash disk, read-Only Memory (ROM), random access Memory (RanPom Access Memory, RAM), magnetic disk or optical disk.
The foregoing has outlined rather broadly the more detailed description of embodiments of the application, wherein the principles and embodiments of the application are explained in detail using specific examples, the above examples being provided solely to facilitate the understanding of the method and core concepts of the application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (7)

1. A method of invoking modules, applied to an electronic device, the electronic device having an application installed therein, the invocation of all modules within the electronic device being encapsulated in the same interface function of a software development kit, the method comprising:
Receiving a target operation instruction; the target operation instruction comprises an incoming parameter, the incoming parameter comprising a first parameter, a second parameter and a third parameter; wherein, different incoming parameters correspond to different module names, module actions and action parameters;
calling a software development kit according to the received target operation instruction;
and calling a target module to execute target operation according to the target operation instruction and the software development kit and a preset rule, wherein the method comprises the following steps: processing the target operation instruction according to the interface function; invoking a target module to execute target operation according to a preset rule according to the processing result of the interface function;
receiving an execution result of the target operation returned by the software development kit, wherein the execution result of the target operation comprises a return value of an interface function of the software development kit;
judging whether the target operation is successfully executed according to the return value;
displaying the judging result on a display interface of the electronic equipment, wherein the judging result comprises the following steps: the application program judges whether the electronic equipment has a page frame template corresponding to a page accessed to the application program; if the judgment result exists, the application program binds the judgment result with the page framework template to generate a display page of the judgment result, and the application program displays the display page of the judgment result on a display interface of the electronic equipment; if not, the application program acquires a corresponding field of a page accessed to the application program and a field type of the corresponding field; the application program analyzes the corresponding field according to the field type to generate a page frame template corresponding to the page accessed to the application program;
Wherein the processing the target operation instruction according to the interface function includes: determining a target module for executing the target operation according to the interface function through the first parameter; determining a module action for executing the target operation according to the interface function through the second parameter; and determining an action parameter for executing the target operation according to the third parameter by the interface function.
2. The method of claim 1, wherein the target operational instructions include configuration information, and wherein invoking the software development kit based on the received target operational instructions comprises:
matching the configuration information in the software development kit with the configuration information in the target operation instruction;
if the matching is successful, calling the software development kit;
if the matching fails, the software development kit is abandoned.
3. The method of claim 2, wherein the matching configuration information in the software development kit with configuration information in the target operational instructions comprises:
if the software development kit is not called for the first time, comparing all configuration items in the software development kit with all configuration items in the target operation instruction item by item;
Judging whether the number of configuration items successfully compared reaches a preset threshold value or not;
if the preset threshold is reached, the matching is successful.
4. The method of claim 3, wherein if the software development kit is invoked for the first time, the method further comprises:
comparing at least one configuration item in the software development kit item by item with all configuration items in the target operation instruction;
if any one of the at least one configuration item is inconsistent with the configuration item of the target operation instruction, the matching is failed.
5. An apparatus for calling modules, the apparatus being applied to an electronic device, the electronic device having an application installed thereon, calls for all modules within the electronic device being encapsulated in a same interface function of a software development kit, the apparatus comprising:
a receiving unit for receiving a target operation instruction; the target operation instruction comprises an incoming parameter, the incoming parameter comprising a first parameter, a second parameter and a third parameter; wherein, different incoming parameters correspond to different module names, module actions and action parameters;
the calling unit is used for calling the software development kit according to the received target operation instruction;
The execution unit is used for calling a target module to execute target operation according to the target operation instruction and the software development kit and a preset rule, and comprises the following steps: processing the target operation instruction according to the interface function; invoking a target module to execute target operation according to a preset rule according to the processing result of the interface function; wherein the processing the target operation instruction according to the interface function includes: determining a target module for executing the target operation according to the interface function through the first parameter; determining a module action for executing the target operation according to the interface function through the second parameter; determining an action parameter for executing the target operation according to the interface function through the third parameter;
the receiving unit is further configured to receive an execution result of the target operation returned by the software development kit, where the execution result of the target operation includes a return value of an interface function of the software development kit;
the judging unit is used for judging whether the target operation is successfully executed according to the return value;
a display unit, configured to display the determination result on a display interface of the electronic device, including: the application program judges whether the electronic equipment has a page frame template corresponding to a page accessed to the application program; if the judgment result exists, the application program binds the judgment result with the page framework template to generate a display page of the judgment result, and the application program displays the display page of the judgment result on a display interface of the electronic equipment; if not, the application program acquires a corresponding field of a page accessed to the application program and a field type of the corresponding field; and the application program analyzes the corresponding field according to the field type to generate a page frame template corresponding to the page accessed to the application program.
6. An electronic device comprising a processor and a memory, the processor being configured to implement the steps of the method according to any of claims 1-4 when executing a computer program stored in the memory.
7. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any of claims 1-4.
CN201910726719.6A 2019-08-07 2019-08-07 Module calling method and related products Active CN110597492B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910726719.6A CN110597492B (en) 2019-08-07 2019-08-07 Module calling method and related products

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910726719.6A CN110597492B (en) 2019-08-07 2019-08-07 Module calling method and related products

Publications (2)

Publication Number Publication Date
CN110597492A CN110597492A (en) 2019-12-20
CN110597492B true CN110597492B (en) 2023-12-08

Family

ID=68853687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910726719.6A Active CN110597492B (en) 2019-08-07 2019-08-07 Module calling method and related products

Country Status (1)

Country Link
CN (1) CN110597492B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113084802B (en) * 2021-03-30 2023-01-31 京东科技信息技术有限公司 Robot control method, device, electronic device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107704334A (en) * 2017-10-13 2018-02-16 维沃移动通信有限公司 A kind of SDK processing method and mobile terminal
CN107729063A (en) * 2017-10-25 2018-02-23 武汉斗鱼网络科技有限公司 Call method, device and the terminal of SDK
CN108804158A (en) * 2018-06-05 2018-11-13 珠海市魅族科技有限公司 Application call method, the control method of terminal device, terminal device and computer readable storage medium
CN109445845A (en) * 2018-09-10 2019-03-08 深圳市智美达科技股份有限公司 Interface call method, device, computer equipment and storage medium
CN109558202A (en) * 2018-12-14 2019-04-02 平安城市建设科技(深圳)有限公司 Original list development approach, device, equipment and storage medium based on small routine
CN109634570A (en) * 2018-12-15 2019-04-16 中国平安人寿保险股份有限公司 Front and back end integrated development method, device, equipment and computer readable storage medium
CN109710340A (en) * 2019-01-18 2019-05-03 北京顺丰同城科技有限公司 Software tool call method and device, software tool packaging method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107329742B (en) * 2017-06-14 2021-01-29 北京小米移动软件有限公司 Software development kit calling method and device
US10691426B2 (en) * 2017-10-26 2020-06-23 Saudi Arabian Oil Company Building flexible relationships between reusable software components and data objects

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107704334A (en) * 2017-10-13 2018-02-16 维沃移动通信有限公司 A kind of SDK processing method and mobile terminal
CN107729063A (en) * 2017-10-25 2018-02-23 武汉斗鱼网络科技有限公司 Call method, device and the terminal of SDK
CN108804158A (en) * 2018-06-05 2018-11-13 珠海市魅族科技有限公司 Application call method, the control method of terminal device, terminal device and computer readable storage medium
CN109445845A (en) * 2018-09-10 2019-03-08 深圳市智美达科技股份有限公司 Interface call method, device, computer equipment and storage medium
CN109558202A (en) * 2018-12-14 2019-04-02 平安城市建设科技(深圳)有限公司 Original list development approach, device, equipment and storage medium based on small routine
CN109634570A (en) * 2018-12-15 2019-04-16 中国平安人寿保险股份有限公司 Front and back end integrated development method, device, equipment and computer readable storage medium
CN109710340A (en) * 2019-01-18 2019-05-03 北京顺丰同城科技有限公司 Software tool call method and device, software tool packaging method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Controlling Linux kerner module through user application;Manish Laddha 等;IBM developer;第1-7节 *
基于ARM-Core4x嵌入式软件平台的实现方法;王永刚等;《计算机测量与控制》;20170525(第05期);第148-151页 *

Also Published As

Publication number Publication date
CN110597492A (en) 2019-12-20

Similar Documents

Publication Publication Date Title
US20180046606A1 (en) Form Checking Method and Apparatus
CN104808983B (en) A kind of method for pushing and server of application program
US8755771B2 (en) System, method, and program for generating screen
CN106406947B (en) The method and device that prevents system service process from restarting, mobile terminal
KR102203130B1 (en) Method for controlling an use of sim card and an electronic device thereof
CN111651140B (en) Service method and device based on workflow
CN111078316B (en) Layout file loading method and device, storage medium and electronic equipment
CN108924030A (en) Electronic device, the method for dynamically configuration message exhibition method and storage medium
CN109240573A (en) A kind of folder management method thereof, terminal device and computer readable storage medium
CN110597492B (en) Module calling method and related products
CN106850838A (en) The control method and system of mobile terminal cloud application
CN106487887A (en) A kind of method realizing quick registration and terminal
CN111124613B (en) Method, device, equipment and storage medium for realizing service of virtualized resources
CN112929254A (en) Message processing method and device and electronic equipment
CN104951325B (en) A kind of information display method and electronic equipment
CN114374703B (en) Cloud mobile phone information acquisition method, device, equipment and storage medium
CN111783643B (en) Face recognition method and device, electronic equipment and storage medium
CN115794386A (en) Resource calling method and device of virtual machine and storage medium
CN106469080B (en) The method and device that prevents system service process from restarting, mobile terminal
WO2023066258A1 (en) Data processing method and apparatus for private data, computer device and medium
CN109062476A (en) Menu treating method, mobile terminal and the computer readable storage medium of application
CN110971696B (en) System and method for realizing virtual electronic card communication
CN110881001B (en) Electronic red packet detection method, system and terminal equipment
WO2021252058A1 (en) Systems and methods for viewing incompatible web pages via remote browser instances
CN106131307A (en) The method to set up of mobile terminal topic, device and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant