CN111221512B - Function module mixed use method, electronic device and storage medium - Google Patents

Function module mixed use method, electronic device and storage medium Download PDF

Info

Publication number
CN111221512B
CN111221512B CN202010003938.4A CN202010003938A CN111221512B CN 111221512 B CN111221512 B CN 111221512B CN 202010003938 A CN202010003938 A CN 202010003938A CN 111221512 B CN111221512 B CN 111221512B
Authority
CN
China
Prior art keywords
functional module
function
module
modules
functional
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010003938.4A
Other languages
Chinese (zh)
Other versions
CN111221512A (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.)
Hangzhou Tuya Information Technology Co Ltd
Original Assignee
Hangzhou Tuya 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 Hangzhou Tuya Information Technology Co Ltd filed Critical Hangzhou Tuya Information Technology Co Ltd
Priority to CN202010003938.4A priority Critical patent/CN111221512B/en
Publication of CN111221512A publication Critical patent/CN111221512A/en
Application granted granted Critical
Publication of CN111221512B publication Critical patent/CN111221512B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

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

Abstract

The present disclosure relates to a functional module mix method, an electronic device, and a storage medium, the method including: under the condition of calling a first method of a first functional module, responding to the first functional module not realizing the first method, and calling a second functional module based on a message forwarding mechanism, wherein the second functional module comprises the first method; and realizing the first method through the second functional module to obtain an execution result of the first method. The embodiment of the disclosure can realize the mixed use of the functional modules.

Description

Function module mixed use method, electronic device and storage medium
Technical Field
The disclosure relates to the technical field of intelligent devices, and in particular relates to a functional module mixed use method, electronic equipment and a storage medium.
Background
Modularization refers to the process of dividing a system into several modules layer by layer from top to bottom when solving a complex problem. Modern software development often utilizes modules as a unit of synthesis, each module can be independently operated and maintained, modules with the same function can be replaced with each other, and even if a single module fails, the work of other modules is not affected.
Most mobile end application technology OEMs (original equipment soundfield providers) offer modular development solutions to customers who need only develop a single module and replace the same functional module of the technology provider to fully produce their own branded applications.
However, the existing modularized scheme cannot support simultaneous operation of a plurality of modules with the same function, that is, only one module with a specific function in one application can exist, and the modules with the same function can only be replaced with each other and cannot be used in a mixed mode.
Disclosure of Invention
The disclosure provides a method for mixing functional modules, electronic equipment and a storage medium, which can realize the mixed use of a plurality of functional modules and reduce the development cost.
According to an aspect of the present disclosure, there is provided a method for mixing functional modules, including:
under the condition of calling a first method of a first functional module, responding to the first functional module not realizing the first method, and calling a second functional module based on a message forwarding mechanism, wherein the second functional module comprises the first method;
and realizing the first method through the second functional module to obtain an execution result of the first method.
In some possible implementations, determining that the first functional module does not implement the first method includes at least one of:
under the condition of calling a first method of the first functional module, determining that the first functional module does not realize the first method in response to the fact that an identification value, in which the first method is realized, is not received within a preset time range;
in the process of calling a first method of the first functional module, the method is not found;
detecting that a first method of the first functional module is being invoked;
and receiving a notification of an execution error of the first method under the condition that the first method of the first functional module is called.
In some possible embodiments, the method further comprises:
under the condition of starting an application program, acquiring a configuration file, wherein the configuration file comprises a function mixed relation among all function modules of an application;
and determining a second functional module capable of realizing the first method based on the configuration file.
In some possible embodiments, the determining, based on the configuration file, a second functional module capable of implementing the first method includes:
and searching a second functional module which has the same function as the first functional module in a configuration file, and/or searching a second functional module which can realize the first method in the configuration file according to the first method.
In some possible embodiments, the calling the second functional module based on the message forwarding mechanism includes:
and executing a message forwarding method, wherein the object of the message forwarding method is the second functional module.
In some possible implementations, the calling the second functional module based on the message forwarding mechanism further includes:
in response to determining the plurality of second function modules, selecting any one of the second function modules in a preset manner;
and executing a message forwarding method, and calling the selected second functional module.
In some possible embodiments, in response to determining the plurality of second functional modules, selecting any second functional module in a preset manner includes:
detecting an unoccupied second function module of the plurality of second function modules;
one of the unoccupied second functional modules is selected.
According to a second aspect of the present disclosure, there is provided an electronic device comprising:
a plurality of functional modules;
the determining module is used for calling a second functional module based on a message forwarding mechanism in response to the fact that the first functional module does not realize the first method under the condition of calling the first method of the first functional module, wherein the second functional module comprises the first method;
and the execution module is used for realizing the first method through the second functional module and obtaining an execution result of the first method.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the instructions stored in the memory to perform the method of any of the first aspects.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method of any one of the first aspects.
In the embodiment of the disclosure, the second function module capable of realizing the first method can be forwarded and called based on the message forwarding mechanism under the condition that the first function module can not successfully realize the first method, so that on one hand, the success rate of method call can be improved, on the other hand, the mixed use among the function modules can be realized conveniently, the function replacement of the function modules can be realized instead of the mode of only replacing the function modules, and the development cost 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.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the technical aspects of the disclosure.
FIG. 1 illustrates a flow chart of a method of functional module blending in accordance with an embodiment of the present disclosure;
FIG. 2 illustrates a flow chart of a second functional module that determines that the first method can be implemented in accordance with an embodiment of the present disclosure;
FIG. 3 illustrates a flow chart for invoking the second functional module based on a message forwarding mechanism according to an embodiment of the present disclosure;
FIG. 4 illustrates a timing diagram of a method of functional module blending in accordance with an embodiment of the present disclosure;
FIG. 5 illustrates a block diagram of an electronic device according to an embodiment of the present disclosure;
fig. 6 illustrates a block diagram of an electronic device 800, according to an embodiment of the disclosure;
fig. 7 illustrates a block diagram of an electronic device 1900 in accordance with an embodiment of the disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the disclosure will be described in detail below with reference to the drawings. In the drawings, like reference numbers indicate identical or functionally similar elements. Although various aspects of the embodiments are illustrated in the accompanying drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, numerous specific details are set forth in the following detailed description in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements, and circuits well known to those skilled in the art have not been described in detail in order not to obscure the present disclosure.
The method for mixing the functional modules can be applied to any application program to realize the mixing of the functional modules in the application program. The main execution body of the function module mixing method may be any electronic device, for example, the module mixing method may be executed by a terminal device or a server or other processing device, where the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, or the like. In some possible implementations, the door function module blending method may also be implemented by a processor invoking computer readable instructions stored in a memory.
FIG. 1 illustrates a flow chart of a method of functional module blending in accordance with an embodiment of the present disclosure; as shown in fig. 1, the method for mixing functional modules may include:
s10: under the condition of calling a first method of a first functional module, responding to the first functional module not realizing the first method, and calling a second functional module based on a message forwarding mechanism, wherein the second functional module comprises the first method;
s20: and realizing the first method through the second functional module to obtain an execution result of the first method.
In the embodiment of the disclosure, the method for mixing the functional modules can be applied to any application program, and in the process of realizing each function of the application program, the functional module of the corresponding function can be called. Each functional module may include at least one method, and corresponding information may be obtained by calling the method, or corresponding method functions may be implemented. The type of method and the functions implemented by the embodiments of the present disclosure are not particularly limited. In addition, the application may include a plurality of functional modules, and methods in different functional modules may be the same, partially the same, or completely different.
In the process of executing the application program, if a first method in the first functional module needs to be called, the first method can be directly called through the first functional module at the moment, and if the first method can be successfully operated, the first method can be realized, and at the moment, the corresponding function can be realized directly through the calling of the first method in the first functional module. However, in the actual application process, when the first method cannot be implemented by the first functional module, other second functional modules meeting the conditions may be called to implement the first method by the embodiment of the present disclosure.
In the embodiment of the disclosure, in the case of calling the first method in the first functional module, it may be determined whether the first functional module implements the first method by at least one of the following manners:
a) Under the condition of calling a first method of the first functional module, determining that the first functional module does not realize the first method in response to the fact that an identification value, in which the first method is realized, is not received within a preset time range;
in some possible embodiments, in the process of executing the application program, if the first method in the first functional module is called, but an identification value for which the first method is implemented is not received within a preset time range for calling the first method, it may be determined that the first method is not implemented. The first method is implemented, that is, the first method is successfully executed, and after the first method is successfully executed, an identification value of an execution result is returned (for example, 1 indicates that the first method is successfully executed and 0 indicates that the first method is not successfully executed), so that when an identification value indicating that the first method is successfully executed (implemented) is received, it can be determined that the first method in the first functional module is implemented. Conversely, if the identification value indicating that the first method is successfully executed (implemented) is not received within the preset time range during the execution of the first method within the functional module, it may be determined that the first method is not implemented.
B) In the process of calling a first method of the first functional module, the method is not found;
in some possible embodiments, during the process of calling the method in the first functional module, there may be no called method in the first functional module, i.e. there may not be a called first method in the first functional module, at which point the first method cannot be implemented.
In the embodiment of the disclosure, information of a method included in each functional module may be stored in a database, and in the case of calling a first method of a first functional module, whether the first method called exists in the first functional module may be determined based on the information stored in the database, and in the case that the first method does not exist, it is determined that the first method cannot be implemented.
C) Detecting that a first method of the first functional module is being invoked;
in some possible embodiments, since different instructions may be executed simultaneously in an application, the method in the functional module may be called by different instructions. In the embodiment of the disclosure, when the first method of the first functional module is called, it may be first determined whether the first method is currently being called, if the first method is being called, it may be determined that the first method cannot be currently implemented at this time, and then by calling the first method in other functional modules, the conflict that the same method in the same module is called by a plurality of instructions is reduced, and meanwhile, the running time of the program may also be reduced.
D) And receiving a notification of an execution error of the first method under the condition that the first method of the first functional module is called.
In some possible embodiments, during the execution of the first method, the first method may not be successfully executed due to problems of program memory, system configuration, etc., and an error occurs in an intermediate process, where it may be determined that the first method in the first functional module is not implemented.
With the above configuration, it is possible to determine whether the first function module can implement the judgment of the first method, and in the case where it is determined that the first function module does not implement the first method, it is possible to determine other function modules that can implement the first method, and call the function module (second function module) that can implement the first method based on the message forwarding mechanism.
In the embodiment of the disclosure, a configuration file related to the relationship of each functional module is configured, and the configuration file includes the function mix relationship between each functional module in the application program. The function mix relation includes correspondence relation between functions of the respective function modules, whether the functions are identical, or partially identical, or completely different, and methods of realizing the same functions. For example, the configuration file may include a method of whether there is a function mix between any two function modules and a correspondence relation of methods capable of executing the function mix, and by this configuration, the function mix between the function modules may be executed conveniently.
According to the embodiment of the disclosure, when an application program is started or before a method of a first functional module is called, a configuration file of a mixed use relation between the functional modules can be obtained, and then the corresponding relation of the mixed use functions between the functional modules can be determined. Fig. 2 illustrates a flowchart of determining a second functional module capable of implementing a first method in an embodiment of the present disclosure, where the determining the second functional module capable of implementing the first method, as illustrated in fig. 2, includes:
s1: under the condition of starting an application program, acquiring a configuration file, wherein the configuration file comprises a function mixed relation among all function modules of an application;
s2: and determining a second functional module capable of realizing the first method based on the configuration file.
That is, when an application is run or started, the embodiments of the present disclosure may load each function module and obtain a configuration file, so as to obtain a function module capable of implementing the same function in the configuration file, thereby, when a first method of a first function module is executed, if the first method cannot be implemented, at this time, a functional second function module that implements the same first method as the first function module may be simply, conveniently and quickly determined.
The two identical functional modules in the configuration file are allocated with first identifiers, and may be allocated with second identifiers for two functional modules with the same partial functions, and the corresponding identifiers may include identifiers of methods with the same functions, such as method names, parameters, and the like. It is also possible to assign a third identity to two functional modules that are functionally distinct. Wherein the first identifier, the second identifier and the third identifier are different and can be respectively formed by at least one character, and the disclosure is not particularly limited. In the determining process of executing the second function module corresponding to the first method in the first function modules, the second function module with the same first identifier as the first function module can be queried from the configuration file. Or the first method may be queried from the second function modules having the same second identifier as the first function module according to the identifier information such as the name and the parameter of the first method, so that the second function module capable of implementing the first method may be determined.
In case a second functional module is determined that is capable of implementing the first method, the first method in the second functional module may be invoked based on the message forwarding mechanism. The message forwarding mechanism refers to adding a message forwarding method in the functional module, and calling a method object in other functional modules, that is, the message forwarding method can be called through the message forwarding mechanism, and calling information is forwarded to other modules with the same function.
That is, in the case that the first function module does not implement the first method, the embodiment of the disclosure may call other second function modules capable of implementing the first method through the message forwarding mechanism. The information of calling the first method can be forwarded to the second functional module, so that the first method is realized.
In addition, in the case that only one second functional module capable of realizing the first method is determined, the second functional module is directly called through a message forwarding mechanism. In the application process, a plurality of second functional modules capable of implementing the first method may be included, in which case, embodiments of the disclosure may determine that one of the second functional modules implements the first method in a preset manner.
Fig. 3 illustrates a flow chart for invoking the second functional module based on a message forwarding mechanism, where invoking the second functional module based on the message forwarding mechanism includes:
s11: in response to determining the plurality of second function modules, invoking any of the second function modules in a preset manner;
s12: and executing a message forwarding method, and calling the selected second functional module.
In some possible embodiments, in case there are a plurality of second function modules having the same function (function of the first method) as the first function module, one second function module may be selectively called in a preset manner. Wherein an unoccupied second function module of the plurality of second function modules may be detected, and one of the unoccupied second function modules may be selected. For example, one of the unoccupied second function modules may be randomly selected to be invoked. Where occupied refers to the case where the second functional module is called or used.
In some possible embodiments, in the case of determining the selected second function module, call information may be sent to the second function module based on the message forwarding method, and the call of the first method in the second function module is performed, where the function of the first method is performed by the second function module, and if the second function module can successfully call the first method, the return value of the first method, that is, the execution result, may be directly obtained. Alternatively, in case the determined second functional module is also unable to implement the first method, one of the other second functional modules may be selected to implement the first method by the message forwarding mechanism until the first method is implemented.
Fig. 4 shows a timing diagram of a functional module mix method according to an embodiment of the present disclosure. When the application program is started, the embodiment of the disclosure can load each functional module in the program, load the configuration file (the configuration file for mixed use of the modules), and add a message forwarding method for the functional module, wherein the target object of the message forwarding method is other functional modules with the same function. When the method m in the module A needs to be called in the application program (when the calling party needs to call the method m in the module A), it is determined that the module A does not realize the method A, a message forwarding mechanism can be triggered at this time, the module B is determined to be a second functional module (forwarding target), at this time, the module B can be called to execute the method m, an execution result of the method m is obtained, and the execution result is returned to the calling party.
Through the configuration, the mutual calling and the mixed use among the functional modules with the same functions can be realized. Wherein, the client application records all the same functional modules and the mutual hierarchical relationship (mixed relationship) to the module mixed configuration file when packaging. When the application is started, each functional module can be loaded, and the modules with the same functions can be found out through the mixed configuration file. And a message forwarding method can be added through the module, and the binding target object is determined to be a module with the same function. If a method of one functional module is called, if the module does not implement the method, a message forwarding mechanism is triggered, through which the call message is forwarded to other modules of the same function. In addition, the embodiment of the disclosure can also call other methods of modules with the same functions through specific keywords. In addition, in the embodiment of the disclosure, the calling codes among the same functional modules are only actually generated when the application runs, and specific details of other modules are not required to be defined in the development process, so that the risk of leakage of business secrets is reduced. The functional module can actively call the method of the module with the same function through the key words, and no coupling is generated.
It will be appreciated by those skilled in the art that in the above-described method of the specific embodiments, the written order of steps is not meant to imply a strict order of execution but rather should be construed according to the function and possibly inherent logic of the steps.
It will be appreciated that the above-mentioned method embodiments of the present disclosure may be combined with each other to form a combined embodiment without departing from the principle logic, and are limited to the description of the present disclosure.
In addition, the disclosure further provides an electronic device, a computer readable storage medium, and a program, where the foregoing may be used to implement any one of the methods for mixing functional modules provided in the disclosure, and the corresponding technical schemes and descriptions and corresponding descriptions referring to the method parts are not repeated.
Fig. 5 shows a block diagram of an electronic device, as shown in fig. 5, according to an embodiment of the disclosure, the electronic device comprising:
a plurality of functional modules 10;
a determining module 20, in the case of calling the first method of the first functional module, in response to the first functional module not implementing the first method, calling a second functional module based on a message forwarding mechanism, wherein the second functional module includes the first method;
and the execution module 30 is used for realizing the first method through the second functional module and obtaining an execution result of the first method.
In some embodiments, functions or modules included in an apparatus provided by the embodiments of the present disclosure may be used to perform a method described in the foregoing method embodiments, and specific implementations thereof may refer to descriptions of the foregoing method embodiments, which are not repeated herein for brevity.
The disclosed embodiments also provide a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method. The computer readable storage medium may be a non-volatile computer readable storage medium.
The embodiment of the disclosure also provides an electronic device, which comprises: a processor; a memory for storing processor-executable instructions; wherein the processor is configured as the method described above.
The electronic device may be provided as a terminal, server or other form of device.
Fig. 6 shows a block diagram of an electronic device 800, according to an embodiment of the disclosure. For example, electronic device 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 6, an electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen between the electronic device 800 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operational mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the electronic device 800. For example, the sensor assembly 814 may detect an on/off state of the electronic device 800, a relative positioning of the components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in position of the electronic device 800 or a component of the electronic device 800, the presence or absence of a user's contact with the electronic device 800, an orientation or acceleration/deceleration of the electronic device 800, and a change in temperature of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the electronic device 800 and other devices, either wired or wireless. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 804 including computer program instructions executable by processor 820 of electronic device 800 to perform the above-described methods.
Fig. 7 illustrates a block diagram of an electronic device 1900 in accordance with an embodiment of the disclosure. For example, electronic device 1900 may be provided as a server. Referring to FIG. 7, electronic device 1900 includes a processing component 1922 that further includes one or more processors and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by processing component 1922. The application programs stored in memory 1932 may include one or more modules each corresponding to a set of instructions. Further, processing component 1922 is configured to execute instructions to perform the methods described above.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 1932, including computer program instructions executable by processing component 1922 of electronic device 1900 to perform the methods described above.
The present disclosure may be a system, method, and/or computer program product. The computer program product may include a computer readable storage medium having computer readable program instructions embodied thereon for causing a processor to implement aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: portable computer disks, hard disks, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static Random Access Memory (SRAM), portable compact disk read-only memory (CD-ROM), digital Versatile Disks (DVD), memory sticks, floppy disks, mechanical coding devices, punch cards or in-groove structures such as punch cards or grooves having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media, as used herein, are not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., optical pulses through fiber optic cables), or electrical signals transmitted through wires.
The computer readable program instructions described herein may be downloaded from a computer readable storage medium to a respective computing/processing device or to an external computer or external storage device over a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers and/or edge servers. The network interface card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium in the respective computing/processing device.
Computer program instructions for performing the operations of the present disclosure can be assembly instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, c++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions may be executed entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present disclosure are implemented by personalizing electronic circuitry, such as programmable logic circuitry, field Programmable Gate Arrays (FPGAs), or Programmable Logic Arrays (PLAs), with state information of computer readable program instructions, which can execute the computer readable program instructions.
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable medium having the instructions stored therein includes an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The foregoing description of the embodiments of the present disclosure has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the technical improvement of the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (8)

1. A method of blending functional modules, comprising:
under the condition of calling a first method of a first functional module, responding to the first functional module not realizing the first method, and calling a second functional module based on a message forwarding mechanism, wherein the second functional module comprises the first method;
under the condition of starting an application program, acquiring a configuration file, wherein the configuration file comprises a function mixed relation among all function modules of an application;
determining, based on the configuration file, a second functional module capable of implementing the first method, including:
searching a second function module with the same function as the first function module in a configuration file, and/or searching a second function module capable of realizing the first method in the configuration file according to the first method;
and realizing the first method through the second functional module to obtain an execution result of the first method.
2. The method of claim 1, wherein determining that the first functional module does not implement the first method comprises at least one of:
under the condition of calling a first method of the first functional module, determining that the first functional module does not realize the first method in response to the fact that an identification value, in which the first method is realized, is not received within a preset time range;
in the process of calling a first method of the first functional module, the method is not found;
detecting that a first method of the first functional module is being invoked;
and receiving a notification of an execution error of the first method under the condition that the first method of the first functional module is called.
3. The method of claim 1, wherein the invoking the second functional module based on a message forwarding mechanism comprises:
and executing a message forwarding method, and calling the second functional module, wherein the object of the message forwarding method is the second functional module.
4. A method according to claim 1 or 3, wherein said invoking said second functional module based on a message forwarding mechanism, further comprises:
in response to determining the plurality of second function modules, selecting any one of the second function modules in a preset manner;
and executing a message forwarding method, and calling the selected second functional module.
5. The method of claim 4, wherein selecting any one of the second function modules in a preset manner in response to determining the plurality of second function modules comprises:
detecting an unoccupied second function module of the plurality of second function modules;
one of the unoccupied second functional modules is selected.
6. An electronic device, comprising:
a plurality of functional modules;
the determining module is used for calling a second functional module based on a message forwarding mechanism in response to the fact that the first functional module does not realize the first method under the condition of calling the first method of the first functional module, wherein the second functional module comprises the first method; under the condition of starting an application program, acquiring a configuration file, wherein the configuration file comprises a function mixed relation among all function modules of an application;
determining, based on the configuration file, a second functional module capable of implementing the first method, including:
searching a second function module with the same function as the first function module in a configuration file, and/or searching a second function module capable of realizing the first method in the configuration file according to the first method;
and the execution module is used for realizing the first method through the second functional module and obtaining an execution result of the first method.
7. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the instructions stored in the memory to perform the method of any of claims 1-5.
8. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of any of claims 1-5.
CN202010003938.4A 2020-01-03 2020-01-03 Function module mixed use method, electronic device and storage medium Active CN111221512B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010003938.4A CN111221512B (en) 2020-01-03 2020-01-03 Function module mixed use method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010003938.4A CN111221512B (en) 2020-01-03 2020-01-03 Function module mixed use method, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN111221512A CN111221512A (en) 2020-06-02
CN111221512B true CN111221512B (en) 2023-12-05

Family

ID=70830989

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010003938.4A Active CN111221512B (en) 2020-01-03 2020-01-03 Function module mixed use method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN111221512B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113805856A (en) * 2021-01-18 2021-12-17 北京沃东天骏信息技术有限公司 Function module intercommunication method and device, readable storage medium and electronic equipment

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834555A (en) * 2015-03-30 2015-08-12 百度在线网络技术(北京)有限公司 Method for invoking functional module, related device and device repairing method
CN105354037A (en) * 2015-11-30 2016-02-24 用友优普信息技术有限公司 Modularized software developing method and software developing device
CN106126204A (en) * 2016-06-15 2016-11-16 中邮建技术有限公司 A kind of iterative regarded as output controlling method of information system based on modularized design
CN107203419A (en) * 2016-03-17 2017-09-26 阿里巴巴集团控股有限公司 Intermodule call method, apparatus and system in application program
CN107479940A (en) * 2017-08-23 2017-12-15 绵阳美菱软件技术有限公司 A kind of method and device for realizing Internet of Things module
CN107632823A (en) * 2017-08-18 2018-01-26 深圳怡化电脑股份有限公司 A kind of software development methodology and device
CN107820701A (en) * 2015-05-01 2018-03-20 三星电子株式会社 Developer's exchange system
CN107861719A (en) * 2017-12-18 2018-03-30 广东阿拉丁网络科技服务有限公司 A kind of modular software development methodology
CN108829378A (en) * 2018-05-24 2018-11-16 北京顺丰同城科技有限公司 A kind of development approach of application software, device and electronic equipment
CN109032815A (en) * 2018-07-18 2018-12-18 武汉斗鱼网络科技有限公司 Information interacting method, device, equipment and storage medium between functional module
CN109388388A (en) * 2018-09-30 2019-02-26 武汉斗鱼网络科技有限公司 Information interacting method, device, equipment and storage medium between functional module
CN109460250A (en) * 2018-09-25 2019-03-12 平安科技(深圳)有限公司 A kind of generation method and equipment of application program
CN110275701A (en) * 2019-06-19 2019-09-24 网易传媒科技(北京)有限公司 Data processing method, device, medium and calculating equipment
CN110286887A (en) * 2019-06-28 2019-09-27 新奥数能科技有限公司 The development approach and device of energy detecting software
CN110362364A (en) * 2019-07-23 2019-10-22 深圳市元征科技股份有限公司 Software Development Kit funcall method, system and electronic equipment and medium
CN110399181A (en) * 2019-07-23 2019-11-01 深圳市元征科技股份有限公司 Software Development Kit funcall method, system and electronic equipment and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9613095B2 (en) * 2014-09-23 2017-04-04 Quixey, Inc. Entity-based external functionality for software developers

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834555A (en) * 2015-03-30 2015-08-12 百度在线网络技术(北京)有限公司 Method for invoking functional module, related device and device repairing method
CN107820701A (en) * 2015-05-01 2018-03-20 三星电子株式会社 Developer's exchange system
CN105354037A (en) * 2015-11-30 2016-02-24 用友优普信息技术有限公司 Modularized software developing method and software developing device
CN107203419A (en) * 2016-03-17 2017-09-26 阿里巴巴集团控股有限公司 Intermodule call method, apparatus and system in application program
CN106126204A (en) * 2016-06-15 2016-11-16 中邮建技术有限公司 A kind of iterative regarded as output controlling method of information system based on modularized design
CN107632823A (en) * 2017-08-18 2018-01-26 深圳怡化电脑股份有限公司 A kind of software development methodology and device
CN107479940A (en) * 2017-08-23 2017-12-15 绵阳美菱软件技术有限公司 A kind of method and device for realizing Internet of Things module
CN107861719A (en) * 2017-12-18 2018-03-30 广东阿拉丁网络科技服务有限公司 A kind of modular software development methodology
CN108829378A (en) * 2018-05-24 2018-11-16 北京顺丰同城科技有限公司 A kind of development approach of application software, device and electronic equipment
CN109032815A (en) * 2018-07-18 2018-12-18 武汉斗鱼网络科技有限公司 Information interacting method, device, equipment and storage medium between functional module
CN109460250A (en) * 2018-09-25 2019-03-12 平安科技(深圳)有限公司 A kind of generation method and equipment of application program
CN109388388A (en) * 2018-09-30 2019-02-26 武汉斗鱼网络科技有限公司 Information interacting method, device, equipment and storage medium between functional module
CN110275701A (en) * 2019-06-19 2019-09-24 网易传媒科技(北京)有限公司 Data processing method, device, medium and calculating equipment
CN110286887A (en) * 2019-06-28 2019-09-27 新奥数能科技有限公司 The development approach and device of energy detecting software
CN110362364A (en) * 2019-07-23 2019-10-22 深圳市元征科技股份有限公司 Software Development Kit funcall method, system and electronic equipment and medium
CN110399181A (en) * 2019-07-23 2019-11-01 深圳市元征科技股份有限公司 Software Development Kit funcall method, system and electronic equipment and medium

Also Published As

Publication number Publication date
CN111221512A (en) 2020-06-02

Similar Documents

Publication Publication Date Title
CN107370772B (en) account login method and device and computer readable storage medium
CN109521918B (en) Information sharing method and device, electronic equipment and storage medium
CN106126025B (en) Interactive method and device for copying and pasting
CN106775202B (en) Information transmission method and device
CN107094094B (en) Application networking method and device and terminal
CN105426094B (en) Information pasting method and device
CN112463418A (en) Cross-device information sharing method, device, medium and electronic device
CN108011990B (en) Contact management method and device
CN107463372B (en) Data-driven page updating method and device
CN106453982A (en) Method and apparatus for dialing telephone number, fixed telephone and mobile terminal
CN104951522B (en) Method and device for searching
CN107295167B (en) Information display method and device
EP2985697A1 (en) Method and device for controlling router plug-in
CN111221512B (en) Function module mixed use method, electronic device and storage medium
CN106447747B (en) Image processing method and device
CN106506808B (en) Method and device for prompting communication message
CN105101121A (en) Information transmitting method and device
CN107885464B (en) Data storage method, device and computer readable storage medium
CN107241432B (en) Message receiving method and device, electronic equipment and computer storage medium
CN106648392B (en) The method and device of pasting data
CN106020699B (en) A kind of input method switching method, device and terminal
CN104317480B (en) Character keys display methods, device and terminal
CN110457084B (en) Loading method and device
CN108549570B (en) User interface updating method and device
US10812465B2 (en) Method for logging into account on mobile device, mobile device, and non-transitory computer readable storage medium

Legal Events

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