CN111221512A - Function module mixing method, electronic device, and storage medium - Google Patents

Function module mixing method, electronic device, and storage medium Download PDF

Info

Publication number
CN111221512A
CN111221512A CN202010003938.4A CN202010003938A CN111221512A CN 111221512 A CN111221512 A CN 111221512A CN 202010003938 A CN202010003938 A CN 202010003938A CN 111221512 A CN111221512 A CN 111221512A
Authority
CN
China
Prior art keywords
functional module
module
functional
modules
calling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010003938.4A
Other languages
Chinese (zh)
Other versions
CN111221512B (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

Images

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 method for mixing functional modules, an electronic device, and a storage medium, the method including: under the condition of calling a first method of a first functional module, in response to the first functional module not realizing the first method, 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, and obtaining the execution result of the first method. The embodiment of the disclosure can realize the mixed use of the functional modules.

Description

Function module mixing method, electronic device, and storage medium
Technical Field
The present disclosure relates to the field of smart device technologies, and in particular, to a method for mixing functional modules, an electronic device, and a storage medium.
Background
Modularization refers to a process of dividing a system into a plurality of modules layer by layer from top to bottom when a complex problem is solved. Modern software development often utilizes modules as a unit of synthesis, each module can operate independently and maintain independently, modules with the same function can be replaced mutually, and even if a single module fails, the work of other modules is not influenced.
Most mobile end application technology OEMs (original equipment sound vendors) provide modular development schemes for customers, and OEM customers can completely produce self-branded applications by only developing a certain independent module and replacing the same functional module of the technology provider.
However, the existing modular scheme cannot support a plurality of modules with the same function to work simultaneously, that is, a module with a specific function in one application can only exist in one application, and the modules with the same function can only be replaced with each other and cannot be used in a mixed manner.
Disclosure of Invention
The disclosure provides a function module mixed use method, an electronic device and a storage medium, which can realize mixed use of various function modules and reduce development cost.
According to an aspect of the present disclosure, there is provided a function module mixing method including:
under the condition of calling a first method of a first functional module, in response to the first functional module not realizing the first method, 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, and obtaining the execution result of the first method.
In some possible embodiments, 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, in response to not receiving an identification value that the first method is realized within a preset time range, determining that the first method is not realized by the first functional module;
in the process of calling the 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;
in the event that a first method of the first functional module is invoked, a notification of an execution error of the first method is received.
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 mixing relation among all function modules of the application;
determining a second functional module capable of implementing 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 with the same function as the first functional module in a configuration file, and/or searching a second functional module capable of realizing the first method in the configuration file according to the first method.
In some possible embodiments, the invoking 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 embodiments, the invoking the second functional module based on the message forwarding mechanism further includes:
in response to determining the plurality of second functional modules, selecting any one of the second functional modules according to a preset mode;
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 one of the second functional modules in a preset manner includes:
detecting an unoccupied second functional module of the plurality of second functional modules;
selecting one of the unoccupied second functional modules.
According to a second aspect of the present disclosure, there is provided an electronic device comprising:
a plurality of functional modules;
the system comprises a determining module, a first module and a second module, wherein the determining module responds to that the first module does not realize a first method under the condition of calling the first method of the first functional module, and calls the second functional module based on a message forwarding mechanism, and 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 the 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 memory-stored instructions 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, a second function module capable of implementing the first method can be forwarded and called based on a message forwarding mechanism under the condition that the first function module cannot successfully implement the first method, so that on one hand, the success rate of method calling can be improved, on the other hand, the function replacement of the function module can be conveniently implemented instead of only the function module replacement, 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 present disclosure and, together with the description, serve to explain the principles of the disclosure.
FIG. 1 illustrates a flow diagram of a method for functional module mixing in accordance with an embodiment of the present disclosure;
FIG. 2 illustrates a flow diagram of determining a second functional module capable of implementing the first method in accordance with an embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating 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 functional module blending method according to an embodiment of the present disclosure;
FIG. 5 shows a block diagram of an electronic device according to an embodiment of the disclosure;
FIG. 6 illustrates a block diagram of an electronic device 800 in accordance with 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 present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively 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" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, 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, in the following detailed description, numerous specific details are set forth 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 that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
The function module mixing method of the embodiment of the disclosure can be applied to any application program, and realizes mixing of each function module in the application program. The main body of the execution 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 (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like. In some possible implementations, the gate function module mixing method may also be implemented by a processor calling computer readable instructions stored in a memory.
FIG. 1 illustrates a flow diagram of a method for functional module mixing 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, in response to the first functional module not realizing the first method, 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, and obtaining the execution result of the first method.
In the embodiment of the present disclosure, the method for mixing functional modules may be applied to any application program, and in the process of implementing each function of the application program, the functional module of the corresponding function may 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 embodiments of the present disclosure do not specifically limit the types of methods and functions implemented. In addition, the application program may include a plurality of functional modules, and methods in different functional modules may be the same, may be partially the same, or may be completely different.
In the process of executing the application program, if the first method in the first functional module needs to be called, the first method can be directly called through the first functional module, if the first method can be successfully operated, the first method is realized, and at this time, the corresponding function can be directly realized through the calling of the first method in the first functional module. However, in an actual application process, when there is a case that the first functional module cannot implement the first method, other second functional modules meeting the conditions may be called by the embodiment of the present disclosure to implement the first method.
In the embodiment of the present disclosure, in the case of calling the first method in the first functional module, it may be determined whether the first method is implemented by the first functional module by at least one of the following manners:
A) under the condition of calling a first method of the first functional module, in response to not receiving an identification value that the first method is realized within a preset time range, determining that the first method is not realized by the first functional module;
in some possible embodiments, during the execution of the application program, if the first method in the first functional module is called, but the identification value that the first method is implemented is not received within a preset time range of calling the first method, it may be determined that the first method is not implemented. 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, in the case of receiving the identification value indicating that the first method is successfully executed (implemented), it may be determined that the first method in the first functional module is implemented. In contrast, if an identification value indicating that the first method is successfully executed (implemented) is not received within a preset time range during 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 the 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 a method that is not called in the first functional module, that is, there may not be a called first method in the first functional module, and at this time, the first method cannot be implemented.
In the embodiment of the present disclosure, information of a method included in each functional module may be stored in the database, and in a case where a first method of a first functional module is called, it may be determined whether the first functional module has the called first method based on the information stored in the database, and in a case where 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, the method in the functional module may be called by different instructions, since different instructions may be executed simultaneously in the application. In the embodiment of the disclosure, when a first method of a first functional module is called, it may be determined whether the first method is currently being called, and if the first method is being called, it may be determined that the first method is currently not being implemented, and then by calling the first methods in other functional modules, conflicts that the same method in the same module is called by multiple instructions may be reduced, and at the same time, the running time of a program may also be reduced.
D) In the event that a first method of the first functional module is invoked, a notification of an execution error of the first method is received.
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, and the like, and an error occurs in an intermediate process, at which time 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 or not the first functional module can implement the first method, and in a case where it is determined that the first functional module does not implement the first method, it is possible to determine other functional modules that can implement the first method, and call a functional module (second functional module) that can implement the first method based on the message forwarding mechanism.
In the embodiment of the present disclosure, a configuration file regarding the relationship of each functional module is configured, and the configuration file includes a function mixture relationship between the functional modules in the application program. The function mixing relationship includes whether functions among the functional modules are the same, partially the same, or completely different, and a corresponding relationship among methods for realizing the same functions. For example, the configuration file may include a method of whether function mixing exists between any two function modules and a correspondence relationship between methods capable of executing function mixing, and the mixing between the function modules may be conveniently executed by the configuration.
According to the embodiment of the disclosure, when the application program is started or before the method of the first functional module is called, the configuration file of the blending relationship between the functional modules may be acquired, and then the corresponding relationship of the blending function between each functional module may be determined. Fig. 2 shows a flowchart for determining a second functional module capable of implementing the first method according to an embodiment of the present disclosure, where as shown in fig. 2, the determining the second functional module capable of implementing the first method includes:
s1: under the condition of starting an application program, acquiring a configuration file, wherein the configuration file comprises a function mixing relation among all function modules of the application;
s2: determining a second functional module capable of implementing the first method based on the configuration file.
That is to say, in the embodiment of the present disclosure, when the application program is run or started, each function module may be loaded, and the configuration file may be acquired, so as to obtain the function module capable of implementing the same function in the configuration file, so that when the first method of the first function module is executed, if the first method cannot be implemented, the second function module capable of implementing the same function as the first function module may be determined simply, conveniently, and quickly.
The two completely same functional modules in the configuration file may be assigned with a first identifier, the two partially same functional modules may be assigned with a second identifier, and the corresponding identifiers may include identifiers of methods with the same function, such as information of method names, parameters, and the like. A third identity may also be assigned to two functional modules with completely different functions. The first mark, the second mark and the third mark are different and may be respectively formed by at least one character, which is not specifically limited by the present disclosure. In the determination process of executing the second functional module corresponding to the first method in the first functional module, the second functional module having the same first identifier as the first functional module may be queried from the configuration file. Alternatively, the first method may be queried from a second functional module having a second identifier identical to the first functional module, based on identification information such as a name and a parameter of the first method, so that the second functional module capable of implementing the first method may be determined.
In the case where a second functional module capable of implementing the first method is determined, the first method in the second functional module may be invoked based on a message forwarding mechanism. The message forwarding mechanism is to add a message forwarding method in a functional module and call method objects in other functional modules, that is, the message forwarding method can be called through the message forwarding mechanism, and call information is forwarded to other modules with the same function.
That is to say, in the embodiment of the present disclosure, when a first functional module does not implement a first method, other second functional modules that can implement the first method may be called through a message forwarding mechanism. The information for calling the first method can be forwarded to the second functional module, so that the first method is realized.
In addition, under the condition that only one second functional module capable of realizing the first method is determined, the second functional module is called directly 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, the embodiment of the present disclosure may determine, according to a preset manner, one of the second functional modules to implement the first method.
Fig. 3 is a flowchart illustrating a process of invoking the second functional module based on a message forwarding mechanism according to an embodiment of the present disclosure, where invoking the second functional module based on the message forwarding mechanism includes:
s11: in response to determining the plurality of second functional modules, calling any one of the second functional modules in a preset manner;
s12: and executing a message forwarding method and calling the selected second functional module.
In some possible embodiments, in the case that 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 selected to be called in a preset manner. The unoccupied second functional module of the plurality of second functional modules may be detected, and one of the unoccupied second functional modules may be selected. For example, a random selection may be made to call one of the unoccupied second functional modules. Wherein 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, based on the message forwarding method, the call information may be sent to the second function module, the call of the first method in the second function module may be executed, and the function of the first method may be executed by the second function module. Or, in the case that the determined second functional module cannot implement the first method, one of the other second functional modules may be selected by the message forwarding mechanism to implement the first method until the first method is implemented.
Fig. 4 illustrates a timing diagram of a functional module mixing method according to an embodiment of the present disclosure. The embodiment of the present disclosure may load each functional module in the program, load a configuration file (module-mixed configuration file), and add a message forwarding method to the functional module when the application program is started, where a target object of the message forwarding method is another functional module having the same function. When the method m in the module a needs to be called in the application program (when the caller needs to call the method m in the module a), it is determined that the module a does not implement the method a, at this time, a message forwarding mechanism can be triggered, it is determined that the module B is a second functional module (forwarding target), at this time, the module B can be called to execute the method m, and an execution result of the method m is obtained, and the execution result is returned to the caller.
By the above configuration, mutual calling and mixed use between functional modules having the same function can be realized. The client application records all the modules with the same functions and the mutual hierarchical relationship (mixed relationship) to the module mixed configuration file during packaging. When the application is started, each functional module can be loaded, and the modules with the same function can be found out through the mixed configuration file. And a message forwarding method can be added through the modules, and the binding target object is determined to be the module with the same function. If the method of a functional module is called, if the module does not realize the method, a message forwarding mechanism is triggered, and the calling message is forwarded to other modules with the same function through the mechanism. In addition, the embodiment of the disclosure can also call methods of other modules with the same function 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 the specific details of other modules are not required to be clarified in the development process, so that the risk of leakage of business secrets is reduced. The function module can actively call a method of a module having the same function through a keyword without generating coupling.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
It is understood that the above-mentioned method embodiments of the present disclosure can be combined with each other to form a combined embodiment without departing from the logic of the principle, which is limited by the space, and the detailed description of the present disclosure is omitted.
In addition, the present disclosure also provides an electronic device, a computer-readable storage medium, and a program, which can be used to implement any one of the methods for mixing functional modules provided by the present disclosure, and the descriptions and corresponding descriptions of the corresponding technical solutions and the corresponding descriptions of the method portions are omitted for brevity.
Fig. 5 shows a block diagram of an electronic device according to an embodiment of the present disclosure, which, as shown in fig. 5, includes:
a plurality of functional modules 10;
a determining module 20, configured to, in a case that a first method of a first functional module is called, in response to that the first functional module does not implement the first method, call a second functional module based on a message forwarding mechanism, where 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 the execution result of the first method.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
Embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the above-mentioned method. The computer readable storage medium may be a non-volatile computer readable storage medium.
An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured as the above method.
The electronic device may be provided as a terminal, server, or other form of device.
Fig. 6 illustrates a block diagram of an electronic device 800 in accordance with an embodiment of the disclosure. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like terminal.
Referring to fig. 6, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and 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 components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction 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 non-volatile 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 disks.
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 supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. 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 an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
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 further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also 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 keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the electronic device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object 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 gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. 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 an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an 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, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the 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, the electronic device 1900 may be provided as a server. Referring to fig. 7, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
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, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the electronic device 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory 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: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical 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 via 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 transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter 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.
The computer program instructions for carrying out operations of the present disclosure may be assembler 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 execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
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 storing the instructions comprises 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 flowchart 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.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A method for mixing functional modules, comprising:
under the condition of calling a first method of a first functional module, in response to the first functional module not realizing the first method, 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, and obtaining the 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, in response to not receiving an identification value that the first method is realized within a preset time range, determining that the first method is not realized by the first functional module;
in the process of calling the 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;
in the event that a first method of the first functional module is invoked, a notification of an execution error of the first method is received.
3. The method of claim 1, further comprising:
under the condition of starting an application program, acquiring a configuration file, wherein the configuration file comprises a function mixing relation among all function modules of the application;
determining a second functional module capable of implementing the first method based on the configuration file.
4. The method of claim 3, wherein determining, based on the configuration file, a second functional module that can implement the first method comprises:
and searching a second functional module with the same function as the first functional module in a configuration file, and/or searching a second functional module capable of realizing the first method in the configuration file according to the first method.
5. The method of claim 1, wherein invoking the second functional module based on the 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.
6. The method according to claim 1 or 5, wherein the invoking the second functional module based on the message forwarding mechanism further comprises:
in response to determining the plurality of second functional modules, selecting any one of the second functional modules according to a preset mode;
and executing a message forwarding method and calling the selected second functional module.
7. The method of claim 6, wherein selecting any of the second functional modules in a predetermined manner in response to determining the plurality of second functional modules comprises:
detecting an unoccupied second functional module of the plurality of second functional modules;
selecting one of the unoccupied second functional modules.
8. An electronic device, comprising:
a plurality of functional modules;
the system comprises a determining module, a first module and a second module, wherein the determining module responds to that the first module does not realize a first method under the condition of calling the first method of the first functional module, and calls the second functional module based on a message forwarding mechanism, and 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 the execution result of the first method.
9. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the memory-stored instructions to perform the method of any of claims 1-7.
10. A computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the method of any of claims 1-7.
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 true CN111221512A (en) 2020-06-02
CN111221512B 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)

Citations (17)

* 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
US20160085515A1 (en) * 2014-09-23 2016-03-24 Quixey, Inc. Entity-Based External Functionality for Software Developers
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

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160085515A1 (en) * 2014-09-23 2016-03-24 Quixey, Inc. Entity-Based External Functionality for Software Developers
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
CN111221512B (en) 2023-12-05

Similar Documents

Publication Publication Date Title
CN107370772B (en) account login method and device and computer readable storage medium
EP3418885A2 (en) Method and device for calling software development kit
EP3076646B1 (en) Methods and devices for labeling a number
RU2645282C2 (en) Method and device for calling via cloud-cards
CN108495168B (en) Bullet screen information display method and device
CN107147815B (en) Call processing method and device based on taxi taking
CN108011990B (en) Contact management method and device
CN107463372B (en) Data-driven page updating method and device
CN112463418A (en) Cross-device information sharing method, device, medium and electronic device
EP2985697A1 (en) Method and device for controlling router plug-in
CN107656616B (en) Input interface display method and device and electronic equipment
CN106506808B (en) Method and device for prompting communication message
CN110221813B (en) Application data connection establishment method and device, storage medium and electronic equipment
CN109522286B (en) Processing method and device of file system
CN111221593A (en) Dynamic loading method and device
CN107885464B (en) Data storage method, device and computer readable storage medium
CN111221512B (en) Function module mixed use method, electronic device and storage medium
CN110457084B (en) Loading method and device
US10812465B2 (en) Method for logging into account on mobile device, mobile device, and non-transitory computer readable storage medium
CN108549570B (en) User interface updating method and device
CN111414179A (en) Data updating method and device, electronic equipment and storage medium
CN107241432B (en) Message receiving method and device, electronic equipment and computer storage medium
CN106484261B (en) Information acquisition method and device, information transmission method and device, and terminal
US9703662B2 (en) Method for controlling plug-in by a router and the router thereof
CN111767249B (en) Method and device for determining self-running time of function

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