CN114168227B - Program call processing method, electronic device and computer storage medium - Google Patents
Program call processing method, electronic device and computer storage medium Download PDFInfo
- Publication number
- CN114168227B CN114168227B CN202111508681.9A CN202111508681A CN114168227B CN 114168227 B CN114168227 B CN 114168227B CN 202111508681 A CN202111508681 A CN 202111508681A CN 114168227 B CN114168227 B CN 114168227B
- Authority
- CN
- China
- Prior art keywords
- engineering
- main
- main engineering
- object instance
- container
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 13
- 238000000034 method Methods 0.000 claims abstract description 378
- 238000012407 engineering method Methods 0.000 claims abstract description 263
- 238000004891 communication Methods 0.000 claims description 16
- 238000012545 processing Methods 0.000 claims description 14
- 230000007547 defect Effects 0.000 abstract description 10
- 230000006870 function Effects 0.000 description 5
- 238000011161 development Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000004590 computer program Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000015556 catabolic process Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000011022 operating instruction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a program call processing method, electronic equipment and a computer storage medium. The method comprises the following steps: the main engineering aims at any pair of externally exposed main engineering methods, and a method object instance corresponding to the main engineering method is created; the main project loads each method object instance into a method container; the plug-in engineering searches a method object instance corresponding to the main engineering method called by the plug-in engineering in the method container, and executes the searched method object instance. In the scheme, when the plug-in engineering calls the main engineering method, the calling of the main engineering method can be realized without identifying the main engineering version corresponding to the main engineering method. Therefore, on one hand, the calling efficiency of calling the main engineering method by the plug-in engineering is improved, and on the other hand, the technical defect of calling errors caused by disordered versions of the main engineering in the prior art is avoided.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method for processing program call, an electronic device, and a computer storage medium.
Background
With the continuous development of technology and society, applications can provide more and more functions. In order to improve the development and execution efficiency of applications, many applications employ multiple process modes. In the multi-process mode, the application includes a main project and a plug-in project. Wherein the main engineering is used for providing basic functions of the application program, and the plug-in engineering is used for providing some additional functions or some additional functions. In many applications, plug-in engineering generally requires calling a main engineering method in main engineering to implement a plug-in function.
However, the inventors found in practice that the following drawbacks exist in the prior art: because the main engineering methods contained in the main engineering of different versions have differences, for example, the main engineering of version 1 contains the main engineering method A which can be called by the plug-in engineering, and the main engineering of version 2 contains the main engineering method B which can be called by the plug-in engineering. When a plug-in engineering in the prior art calls a main engineering method, a main engineering version corresponding to the called main engineering method needs to be determined in advance. However, under the conditions of parallel development of the main engineering and the like, the condition of disordered versions of the main engineering is very easy to occur, so that the determined condition of error of the version of the main engineering corresponding to the main engineering calling method is caused, and then execution error of the plug-in engineering is caused.
Disclosure of Invention
The present invention has been made in view of the above problems, and has as its object to provide a processing method of program call, an electronic device, and a computer storage medium that overcome or at least partially solve the above problems.
According to a first aspect of the present invention, there is provided a method of processing a program call, comprising:
the main engineering aims at any pair of externally exposed main engineering methods, and a method object instance corresponding to the main engineering method is created;
the main project loads each method object instance into a method container;
And the plug-in engineering searches a method object instance corresponding to the main engineering method called by the plug-in engineering in the method container, and executes the searched method object instance.
According to a second aspect of the present invention, there is provided a method of processing a program call, the method comprising:
Creating a method object instance corresponding to any pair of externally exposed main engineering methods;
and loading each method object instance into a method container so that plug-in engineering searches the method object instance corresponding to the main engineering method called by the plug-in engineering in the method container and executes the searched method object instance.
According to a third aspect of the present invention, there is provided a method of processing a program call, the method comprising:
Searching a method object instance corresponding to the called main engineering method in a method container;
and executing the searched method object instance.
According to a fourth aspect of the present invention, there is provided a main engineering client comprising at least one executable instruction that causes a processor to:
Creating a method object instance corresponding to any pair of externally exposed main engineering methods;
and loading each method object instance into a method container so that plug-in engineering searches the method object instance corresponding to the main engineering method called by the plug-in engineering in the method container and executes the searched method object instance.
According to a fifth aspect of the present invention, there is provided a plug-in engineering client comprising at least one executable instruction that causes a processor to:
Searching a method object instance corresponding to the called main engineering method in a method container;
and executing the searched method object instance.
According to a sixth aspect of the present invention, there is provided an application client, including the above-mentioned main engineering client and the above-mentioned plug-in engineering client.
According to a seventh aspect of the present invention, there is provided an electronic device comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
The memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the processing method called by the program.
According to an eighth aspect of the present invention, there is provided a computer storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to a processing method as called by the above-described program.
The invention discloses a processing method for program call, electronic equipment and a computer storage medium, wherein the processing method comprises the following steps: the main engineering aims at any pair of externally exposed main engineering methods, and a method object instance corresponding to the main engineering method is created; the main project loads each method object instance into a method container; the plug-in engineering searches a method object instance corresponding to the main engineering method called by the plug-in engineering in the method container, and executes the searched method object instance. In the scheme, when the plug-in engineering calls the main engineering method, the calling of the main engineering method can be realized without identifying the main engineering version corresponding to the main engineering method. Therefore, on one hand, the calling efficiency of calling the main engineering method by the plug-in engineering is improved, and on the other hand, the technical defect of calling errors caused by disordered versions of the main engineering in the prior art is avoided.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
Fig. 1 is a schematic flow chart of a method for processing a program call according to a first embodiment of the present invention;
Fig. 2 is a flow chart of a method for processing a program call according to a second embodiment of the present invention;
Fig. 3 is a schematic flow chart of a method for processing a program call according to a third embodiment of the present invention;
FIG. 4 is a schematic diagram of an application client according to a sixth embodiment of the present invention;
fig. 5 shows a schematic structural diagram of an electronic device according to a seventh embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Example 1
Fig. 1 is a schematic flow chart of a method for processing a program call according to an embodiment of the present invention. The processing method for program call provided by the embodiment of the invention can be applied to any application program with multiple program modes, and the method provided by the embodiment of the invention can be executed by the terminal equipment where the application program is located.
As shown in fig. 1, the method comprises the steps of:
step S110, the main project aims at any pair of externally exposed main project methods to create a method object instance corresponding to the main project method.
The main engineering comprises an in-pair main engineering method and an externally exposed main engineering method. The main engineering method in the pair cannot be called by the plug-in engineering, and the main engineering method exposed to the outside can be called by the plug-in engineering.
The embodiment of the invention aims at any pair of externally exposed main engineering methods, abstracts the main engineering methods into method objects, and generates a method object instance corresponding to the main engineering methods through instantiation of the method objects. The embodiment of the present invention is not limited to a specific embodiment. For example, a method object instance may be created by deserializing a Class through the readObject () method of ObjectInputStream, using a new operator, invoking the NEWINSTANCE () method of a Class object, invoking the clone () method, and so on.
In an alternative implementation manner, in order to improve accuracy of execution results of calling the main engineering method by the plug-in engineering, the embodiment of the invention classifies the main engineering methods exposed to the outside. The method type of the main engineering method exposed to the outside comprises one of the following types: no parameter no return value type, no parameter return value type, and parameter return value type. The plug-in engineering does not provide parameters for the main engineering method without the parameter and the return value, and the main engineering method without the parameter and the return value does not return the return value to the plug-in engineering, for example, the main engineering method without the parameter and the return value can be a book counting method, book counting is executed by the main engineering method, 1 is added, and a counting result is not returned; the plug-in engineering does not provide parameters for the main engineering method without the parameter with the return value type, but the main engineering method without the parameter with the return value type returns corresponding return values to the plug-in engineering, for example, the main engineering method without the parameter with the return value type can be a user counting method, namely, the main engineering method is used for executing user counting and adding 1, and a counting result is returned; the plug-in engineering provides parameters for a main engineering method with a parameter no-return value type, but the main engineering method with the parameter no-return value type does not return corresponding return values to the plug-in engineering, for example, the main engineering method with the parameter no-return value type can be a cost statistics method, namely the plug-in engineering transmits cost parameters, and the main engineering method calculates total cost through the transmitted cost parameters and does not return a total cost result to the plug-in engineering; the plug-in engineering provides parameters for the main engineering method with the parameter type with the return value, and the main engineering method with the parameter type with the return value returns corresponding return values to the plug-in engineering, for example, the main engineering method with the parameter type with the return value can be a book adding bookshelf method, namely the plug-in engineering transmits book parameters, and the main engineering method adds books corresponding to the transmitted book parameters to a bookshelf and returns successfully added return values to the plug-in engineering. The method types provided by the embodiments of the present invention are not limited to the above four types, for example, the method types may be further divided according to whether the parameter is plural and/or whether the return value is plural, and then the obtained method types include at least one of the following types: no parameter no return value type, no parameter single return value type, no parameter multiple return value type, single parameter no return value type, multiple parameter no return value type, single parameter single return value type, single parameter multiple return value type, multiple parameter single return value type, and the like.
Further, the main engineering determines the type of the method affiliated to the main engineering method aiming at any pair of externally exposed main engineering methods; and then, creating a method object instance corresponding to the main engineering method according to the method type affiliated by the main engineering method, so that the method object instance carries the method type information of the main engineering method.
In a further alternative embodiment, in order to facilitate improving the searching efficiency and searching precision of the object instance of the subsequent plug-in engineering searching method, the main engineering obtains the method name of the main engineering method aiming at any pair of externally exposed main engineering methods; and creating a method object instance corresponding to the main engineering method, so that the attribute of the method object instance contains the method name of the main engineering method.
In yet another alternative embodiment, the main project creates, at the time of initialization, a method object instance corresponding to the main project method for any pair of externally exposed main project methods in the supported at least one main project version. It can be seen that the main engineering method corresponding to the created method object instance may correspond to the same main engineering version, or may correspond to different main engineering versions, etc. And the main engineering methods corresponding to the created method object examples are all methods in the version supported by the current main engineering, so that the created method object examples can be normally executed.
Further alternatively, the same main engineering method exposed to the outside can exist in a plurality of main engineering versions at the same time, so as to save resources and further simplify the method calling process of plug-in engineering.
In step S120, the main project loads each method object instance into the method container.
The main project loads each method object instance created in step S110 into a method container. The method container can be a opened memory space and the like. It should be understood that, if the exposed main engineering method is directly loaded into the method container, the disadvantage that the stored main engineering method is a character string and cannot be executed is caused. Therefore, the embodiment of the invention can allocate the memory for the main engineering method by creating the method object instance corresponding to the main engineering method, thereby enabling the method object instance to be successfully executed subsequently.
In an alternative embodiment, when the main project is initialized, the method container corresponding to the main project is loaded, so that each method object instance is loaded into the method container. And releasing the method container when the main project exits, thereby realizing the dynamic creation of the method container. By adopting the mode, the requirement of calling the main engineering method by the plug-in engineering is met, and system resources can be saved.
In yet another alternative embodiment, to avoid a plugin engineering call error, when main projects of a plurality of application programs are all in an operating state, method containers corresponding to the main projects are loaded respectively, and a main project identifier is allocated to each method container. And then the subsequent plug-in engineering determines a corresponding method container according to the main engineering identifier, and then searches a corresponding method object instance in the method container.
Step S130, the plug-in engineering searches a method object instance corresponding to the main engineering method called by the plug-in engineering in the method container.
Unlike the prior art, when the plug-in engineering of the embodiment of the invention calls the main engineering method in the main engineering, the method object instance corresponding to the main engineering method called by the plug-in engineering is searched in the method container corresponding to the main engineering without searching the main engineering version corresponding to the called main engineering method.
In an alternative embodiment, the plug-in engineering specifically determines the method name of the called main engineering method, and then the plug-in engineering searches for a method object instance corresponding to the main engineering method called by the plug-in engineering in the method container according to the method name of the called main engineering method. The method name attribute of the method object instance corresponding to the main engineering method called by the plug-in engineering is consistent with the method name of the main engineering method called by the plug-in engineering.
Step S140, the plug-in engineering executes the searched method object instance.
If the method object instance corresponding to the main engineering method called by the plug-in engineering can be searched in the method container, executing the searched method object instance, thereby realizing the calling of the main engineering method.
In an alternative embodiment, if a method object instance corresponding to a main engineering method called by a plug-in engineering cannot be found in a method container, corresponding call failure prompting information is fed back to the plug-in engineering to prompt that the current call of the plug-in engineering has errors. Further optionally, to improve the failure resolution efficiency, a corresponding failure work order may be generated, where a main engineering identifier, a plug-in engineering identifier, a calling error main engineering method name, and the like are recorded in the work order. And then the fault work order can be distributed to a development end or a maintenance end corresponding to the plug-in engineering or the main engineering in a mode of mail, short messages, information in a system and the like, so that a developer or a maintainer of the plug-in engineering or the main engineering can repair the fault in time. Because the method object instance corresponding to the main engineering method called by the plug-in engineering is not searched in the method container, the calling of the main engineering method is not further executed, thereby avoiding obtaining the wrong calling result; and the defect of program breakdown caused by executing the main engineering method in the error version in the prior art can be avoided.
In the embodiment of the invention, the main engineering creates the method object examples corresponding to the main engineering method exposed to the outside, and loads each created method object example in the method container. When the plug-in engineering calls the main engineering method, the calling of the main engineering method can be realized by only searching a method object instance corresponding to the main engineering method called by the plug-in engineering in a method container and executing the searched method object instance without identifying the main engineering version corresponding to the main engineering method. Therefore, on one hand, the calling efficiency of calling the main engineering method by the plug-in engineering is improved, and on the other hand, the technical defect of calling errors caused by disordered versions of the main engineering in the prior art is avoided.
Example two
Fig. 2 is a flow chart illustrating a method for processing a program call according to a second embodiment of the present invention. The processing method for program call provided by the embodiment of the invention can be applied to any application program with multiple working modes, and the method provided by the embodiment of the invention can be executed by a main engineering client.
As shown in fig. 2, the method comprises the steps of:
Step S210, for any pair of externally exposed main engineering methods, creating a method object instance corresponding to the main engineering method.
Step S220, each method object instance is loaded into a method container, so that the plug-in engineering searches the method object instance corresponding to the main engineering method called by the plug-in engineering in the method container, and executes the searched method object instance.
In an optional implementation manner, the creating, for any pair of externally exposed main engineering methods, a method object instance corresponding to the main engineering method further includes: determining the type of a method affiliated to the main engineering method aiming at any pair of externally exposed main engineering methods; and creating a method object instance corresponding to the main engineering method according to the method type affiliated by the main engineering method.
In an alternative embodiment, the method type includes one of the following types:
no parameter no return value type, no parameter return value type, and parameter return value type.
In an optional implementation manner, the creating, for any pair of externally exposed main engineering methods, a method object instance corresponding to the main engineering method further includes:
Aiming at any pair of externally exposed main engineering methods, obtaining the method name of the main engineering method;
and creating a method object instance corresponding to the main engineering method, so that the attribute of the method object instance contains the method name of the main engineering method.
In an optional implementation manner, the creating, for any pair of externally exposed main engineering methods, a method object instance corresponding to the main engineering method further includes: when initializing, for any pair of externally exposed main engineering methods in at least one supported main engineering version, creating a method object instance corresponding to the main engineering method.
In an alternative embodiment, before loading each method object instance into the method container, the method further comprises: and loading a method container corresponding to the main project during initialization.
The specific implementation process of the embodiment of the present invention may refer to the description of the corresponding portion in the first embodiment, which is not repeated herein.
Therefore, the embodiment of the invention creates the method object examples corresponding to the main engineering method exposed to the outside, and loads each created method object example in the method container, so that when the main engineering method is called by the plug-in engineering, the calling of the main engineering method can be realized without identifying the main engineering version corresponding to the main engineering method. Therefore, on one hand, the calling efficiency of calling the main engineering method by the plug-in engineering is improved, and on the other hand, the technical defect of calling errors caused by disordered versions of the main engineering in the prior art is avoided.
Example III
Fig. 3 is a schematic flow chart of a method for processing a program call according to a third embodiment of the present invention. The processing method for program call provided by the embodiment of the invention can be applied to any application program with multiple working modes, and the method provided by the embodiment of the invention can be executed by a plug-in engineering client.
As shown in fig. 3, the method comprises the steps of:
step S310, searching a method object instance corresponding to the called main engineering method in the method container.
Step S320, executing the found method object instance.
In an optional embodiment, the searching the method object instance corresponding to the invoked main engineering method in the method container further includes: determining the name of a called main engineering method; and searching a method object instance corresponding to the called main engineering method in the method container according to the method name of the called main engineering method.
The specific implementation process of the embodiment of the present invention may refer to the description of the corresponding portion in the first embodiment, which is not repeated herein.
Therefore, when the plug-in engineering of the embodiment of the invention calls the main engineering method, the calling of the main engineering method can be realized without identifying the main engineering version corresponding to the main engineering method. Therefore, on one hand, the calling efficiency of calling the main engineering method by the plug-in engineering is improved, and on the other hand, the technical defect of calling errors caused by disordered versions of the main engineering in the prior art is avoided.
Example IV
The fourth embodiment of the present invention provides a main engineering client, where the main engineering client includes at least one executable instruction, and the executable instruction causes a processor to perform the following operations:
Creating a method object instance corresponding to any pair of externally exposed main engineering methods;
and loading each method object instance into a method container so that plug-in engineering searches the method object instance corresponding to the main engineering method called by the plug-in engineering in the method container and executes the searched method object instance.
In an alternative embodiment, the executable instructions cause the processor to perform the following:
determining the type of a method affiliated to the main engineering method aiming at any pair of externally exposed main engineering methods;
And creating a method object instance corresponding to the main engineering method according to the method type affiliated by the main engineering method.
In an alternative embodiment, the method type includes one of the following types:
no parameter no return value type, no parameter return value type, and parameter return value type.
In an alternative embodiment, the executable instructions cause the processor to perform the following:
Aiming at any pair of externally exposed main engineering methods, obtaining the method name of the main engineering method;
and creating a method object instance corresponding to the main engineering method, so that the attribute of the method object instance contains the method name of the main engineering method.
In an alternative embodiment, the executable instructions cause the processor to perform the following:
when initializing, for any pair of externally exposed main engineering methods in at least one supported main engineering version, creating a method object instance corresponding to the main engineering method.
In an alternative embodiment, the executable instructions cause the processor to perform the following:
before each method object instance is loaded into the method container, the method container corresponding to the main project is loaded during initialization.
Therefore, the embodiment of the invention can realize the calling of the main engineering method without identifying the main engineering version corresponding to the main engineering method when the plug-in engineering calls the main engineering method. Therefore, on one hand, the calling efficiency of calling the main engineering method by the plug-in engineering is improved, and on the other hand, the technical defect of calling errors caused by disordered versions of the main engineering in the prior art is avoided.
Example five
The fifth embodiment of the invention provides a plug-in engineering client, which comprises at least one executable instruction, wherein the executable instruction causes a processor to execute the following operations:
Searching a method object instance corresponding to the called main engineering method in a method container;
and executing the searched method object instance.
In an alternative embodiment, the executable instructions cause the processor to perform the following:
determining the name of a called main engineering method;
and searching a method object instance corresponding to the called main engineering method in the method container according to the method name of the called main engineering method.
Therefore, when the main engineering method is called, the embodiment of the invention can realize the calling of the main engineering method without identifying the main engineering version corresponding to the main engineering method. Therefore, on one hand, the calling efficiency of calling the main engineering method by the plug-in engineering is improved, and on the other hand, the technical defect of calling errors caused by disordered versions of the main engineering in the prior art is avoided.
Example six
Fig. 4 shows a schematic diagram of an application client according to a sixth embodiment of the present invention. As shown in fig. 4, the application client 400 includes the above-described main engineering client 410 and the above-described plug-in engineering client 420.
Example seven
Fig. 5 shows a schematic structural diagram of an electronic device according to a seventh embodiment of the present invention. The specific embodiments of the present invention are not limited to specific implementations of electronic devices.
As shown in fig. 5, the electronic device may include: a processor 502, a communication interface (Communications Interface) 504, a memory 506, and a communication bus 508.
Wherein: processor 502, communication interface 504, and memory 506 communicate with each other via communication bus 508. A communication interface 504 for communicating with network elements of other devices, such as clients or other servers. The processor 502 is configured to execute the program 510, and may specifically perform relevant steps in the above-described processing method embodiment for program call.
In particular, program 510 may include program code including computer-operating instructions.
The processor 502 may be a central processing unit CPU, or an Application-specific integrated Circuit ASIC (Application SPECIFIC INTEGRATED Circuit), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in the electronic device may be the same type of processor, such as one or more CPUs; but may also be different types of processors such as one or more CPUs and one or more ASICs.
A memory 506 for storing a program 510. Memory 506 may comprise high-speed RAM memory or may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 510 may be specifically operable to cause the processor 502 to:
Creating a method object instance corresponding to any pair of externally exposed main engineering methods;
and loading each method object instance into a method container so that plug-in engineering searches the method object instance corresponding to the main engineering method called by the plug-in engineering in the method container and executes the searched method object instance.
In an alternative embodiment, program 510 may be specifically configured to cause processor 502 to:
determining the type of a method affiliated to the main engineering method aiming at any pair of externally exposed main engineering methods;
And creating a method object instance corresponding to the main engineering method according to the method type affiliated by the main engineering method.
In an alternative embodiment, the method type includes one of the following types:
no parameter no return value type, no parameter return value type, and parameter return value type.
In an alternative embodiment, program 510 may be specifically configured to cause processor 502 to:
Aiming at any pair of externally exposed main engineering methods, obtaining the method name of the main engineering method;
and creating a method object instance corresponding to the main engineering method, so that the attribute of the method object instance contains the method name of the main engineering method.
In an alternative embodiment, program 510 may be specifically configured to cause processor 502 to:
when initializing, for any pair of externally exposed main engineering methods in at least one supported main engineering version, creating a method object instance corresponding to the main engineering method.
In an alternative embodiment, program 510 may be specifically configured to cause processor 502 to:
before each method object instance is loaded into the method container, the method container corresponding to the main project is loaded during initialization.
In an alternative embodiment, program 510 may be specifically configured to cause processor 502 to:
searching a method object instance corresponding to the called main engineering method in a method container; and executing the searched method object instance.
In an alternative embodiment, program 510 may be specifically configured to cause processor 502 to:
determining the name of a called main engineering method;
and searching a method object instance corresponding to the called main engineering method in the method container according to the method name of the called main engineering method.
In the embodiment of the invention, the main engineering creates the method object examples corresponding to the main engineering method exposed to the outside, and loads each created method object example in the method container. When the plug-in engineering calls the main engineering method, the calling of the main engineering method can be realized by only searching a method object instance corresponding to the main engineering method called by the plug-in engineering in a method container and executing the searched method object instance without identifying the main engineering version corresponding to the main engineering method. Therefore, on one hand, the calling efficiency of calling the main engineering method by the plug-in engineering is improved, and on the other hand, the technical defect of calling errors caused by disordered versions of the main engineering in the prior art is avoided.
Example eight
An eighth embodiment of the present invention provides a non-volatile computer storage medium storing at least one executable instruction for performing the method of any of the above-described method embodiments.
The executable instructions may be particularly useful for causing a processor to:
Creating a method object instance corresponding to any pair of externally exposed main engineering methods;
and loading each method object instance into a method container so that plug-in engineering searches the method object instance corresponding to the main engineering method called by the plug-in engineering in the method container and executes the searched method object instance.
In an alternative embodiment, the executable instructions may be specifically configured to cause a processor to:
determining the type of a method affiliated to the main engineering method aiming at any pair of externally exposed main engineering methods;
And creating a method object instance corresponding to the main engineering method according to the method type affiliated by the main engineering method.
In an alternative embodiment, the method type includes one of the following types:
no parameter no return value type, no parameter return value type, and parameter return value type.
In an alternative embodiment, the executable instructions may be specifically configured to cause a processor to:
Aiming at any pair of externally exposed main engineering methods, obtaining the method name of the main engineering method;
and creating a method object instance corresponding to the main engineering method, so that the attribute of the method object instance contains the method name of the main engineering method.
In an alternative embodiment, the executable instructions may be specifically configured to cause a processor to:
when initializing, for any pair of externally exposed main engineering methods in at least one supported main engineering version, creating a method object instance corresponding to the main engineering method.
In an alternative embodiment, the executable instructions may be specifically configured to cause a processor to:
before each method object instance is loaded into the method container, the method container corresponding to the main project is loaded during initialization.
In an alternative embodiment, the executable instructions may be specifically configured to cause a processor to:
searching a method object instance corresponding to the called main engineering method in a method container; and executing the searched method object instance.
In an alternative embodiment, the executable instructions may be specifically configured to cause a processor to:
determining the name of a called main engineering method;
and searching a method object instance corresponding to the called main engineering method in the method container according to the method name of the called main engineering method.
In the embodiment of the invention, the main engineering creates the method object examples corresponding to the main engineering method exposed to the outside, and loads each created method object example in the method container. When the plug-in engineering calls the main engineering method, the calling of the main engineering method can be realized by only searching a method object instance corresponding to the main engineering method called by the plug-in engineering in a method container and executing the searched method object instance without identifying the main engineering version corresponding to the main engineering method. Therefore, on one hand, the calling efficiency of calling the main engineering method by the plug-in engineering is improved, and on the other hand, the technical defect of calling errors caused by disordered versions of the main engineering in the prior art is avoided.
The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with the teachings herein. The required structure for a construction of such a system is apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It will be appreciated that the teachings of the present invention described herein may be implemented in a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the present invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the above description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
Various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functionality of some or all of the components according to embodiments of the present invention may be implemented in practice using a microprocessor or Digital Signal Processor (DSP). The present invention can also be implemented as an apparatus or device program (e.g., a computer program and a computer program product) for performing a portion or all of the methods described herein. Such a program embodying the present invention may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specifically stated.
Claims (26)
1. A method of processing a program call, comprising:
the main engineering aims at any pair of externally exposed main engineering methods, and a method object instance corresponding to the main engineering method is created; for the main engineering methods exposed to the outside, which exist in a plurality of main engineering versions at the same time, only a method object instance corresponding to the main engineering method in the latest main engineering version is created;
The main project loads each method object instance into a method container; the method has the advantages that the container is a opened memory space;
And the plug-in engineering searches a method object instance corresponding to the main engineering method called by the plug-in engineering in the method container, and executes the searched method object instance.
2. The method of claim 1, wherein the main engineering for any pair of externally exposed main engineering methods, creating a method object instance corresponding to the main engineering method further comprises:
the main engineering determines the type of the method affiliated to the main engineering method aiming at any pair of externally exposed main engineering methods;
And creating a method object instance corresponding to the main engineering method according to the method type affiliated by the main engineering method.
3. The method of claim 2, wherein the method type comprises one of the following types:
no parameter no return value type, no parameter return value type, and parameter return value type.
4. A method according to any one of claims 1-3, wherein the main project for any pair of externally exposed main project methods, creating a method object instance corresponding to the main project method further comprises:
The main engineering aims at any pair of externally exposed main engineering methods to acquire the method name of the main engineering method;
and creating a method object instance corresponding to the main engineering method, so that the attribute of the method object instance contains the method name of the main engineering method.
5. The method of claim 4, wherein the plug-in engineering looking up in the method container a method object instance corresponding to the plug-in engineering invoked main engineering method further comprises:
The plug-in engineering determines the method name of the called main engineering method;
And the plug-in engineering searches for a method object instance corresponding to the main engineering method called by the plug-in engineering in the method container according to the method name of the main engineering method called by the plug-in engineering.
6. A method according to any one of claims 1-3, wherein the main project for any pair of externally exposed main project methods, creating a method object instance corresponding to the main project method further comprises:
when the main engineering is initialized, the main engineering aims at any pair of externally exposed main engineering methods in at least one supported main engineering version, and a method object instance corresponding to the main engineering method is created.
7. A method according to any of claims 1-3, wherein, before the main project loads the respective method object instance into a method container, the method further comprises:
and loading a method container corresponding to the main project when the main project is initialized.
8. A method of processing a program call, the method comprising:
Creating a method object instance corresponding to any pair of externally exposed main engineering methods; for the main engineering methods exposed to the outside, which exist in a plurality of main engineering versions at the same time, only a method object instance corresponding to the main engineering method in the latest main engineering version is created;
loading each method object instance into a method container, so that plug-in engineering searches the method object instance corresponding to the main engineering method called by the plug-in engineering in the method container, and executes the searched method object instance; the method is characterized in that the container is a opened memory space.
9. The method of claim 8, wherein creating a method object instance corresponding to the main engineering method for any pair of externally exposed main engineering methods further comprises:
determining the type of a method affiliated to the main engineering method aiming at any pair of externally exposed main engineering methods;
And creating a method object instance corresponding to the main engineering method according to the method type affiliated by the main engineering method.
10. The method of claim 9, wherein the method type comprises one of the following types:
no parameter no return value type, no parameter return value type, and parameter return value type.
11. The method of any of claims 8-10, wherein creating a method object instance corresponding to a main engineering method for any pair of externally exposed main engineering methods further comprises:
Aiming at any pair of externally exposed main engineering methods, obtaining the method name of the main engineering method;
and creating a method object instance corresponding to the main engineering method, so that the attribute of the method object instance contains the method name of the main engineering method.
12. The method of any of claims 8-10, wherein creating a method object instance corresponding to a main engineering method for any pair of externally exposed main engineering methods further comprises:
when initializing, for any pair of externally exposed main engineering methods in at least one supported main engineering version, creating a method object instance corresponding to the main engineering method.
13. The method of any of claims 8-10, wherein prior to the loading of the respective method object instance into a method container, the method further comprises:
And loading a method container corresponding to the main project during initialization.
14. A method of processing a program call, the method comprising:
Searching a method object instance corresponding to the called main engineering method in a method container; for the main engineering methods exposed to the outside, which exist in a plurality of main engineering versions at the same time, only a method object instance corresponding to the main engineering method in the latest main engineering version is created; the method has the advantages that the container is a opened memory space;
and executing the searched method object instance.
15. The method of claim 14, wherein the looking up in the method container a method object instance corresponding to the invoked main engineering method further comprises:
determining the name of a called main engineering method;
and searching a method object instance corresponding to the called main engineering method in the method container according to the method name of the called main engineering method.
16. A main engineering client comprising at least one executable instruction that causes a processor to:
Creating a method object instance corresponding to any pair of externally exposed main engineering methods; for the main engineering methods exposed to the outside, which exist in a plurality of main engineering versions at the same time, only a method object instance corresponding to the main engineering method in the latest main engineering version is created;
loading each method object instance into a method container, so that plug-in engineering searches the method object instance corresponding to the main engineering method called by the plug-in engineering in the method container, and executes the searched method object instance; the method is characterized in that the container is a opened memory space.
17. The main engineering client of claim 16, wherein the executable instructions cause a processor to:
determining the type of a method affiliated to the main engineering method aiming at any pair of externally exposed main engineering methods;
And creating a method object instance corresponding to the main engineering method according to the method type affiliated by the main engineering method.
18. The main engineering client of claim 17, wherein the method type comprises one of the following types:
no parameter no return value type, no parameter return value type, and parameter return value type.
19. The main engineering client of any one of claims 16-18, wherein the executable instructions cause a processor to:
Aiming at any pair of externally exposed main engineering methods, obtaining the method name of the main engineering method;
and creating a method object instance corresponding to the main engineering method, so that the attribute of the method object instance contains the method name of the main engineering method.
20. The main engineering client of any one of claims 16-18, wherein the executable instructions cause a processor to:
when initializing, for any pair of externally exposed main engineering methods in at least one supported main engineering version, creating a method object instance corresponding to the main engineering method.
21. The main engineering client of any one of claims 16-18, wherein the executable instructions cause a processor to:
And loading a method container corresponding to the main project during initialization.
22. A plug-in engineering client comprising at least one executable instruction that causes a processor to:
Searching a method object instance corresponding to the called main engineering method in a method container; for the main engineering methods exposed to the outside, which exist in a plurality of main engineering versions at the same time, only a method object instance corresponding to the main engineering method in the latest main engineering version is created; the method has the advantages that the container is a opened memory space;
and executing the searched method object instance.
23. The plug-in engineering client of claim 22, wherein the executable instructions cause a processor to:
determining the name of a called main engineering method;
and searching a method object instance corresponding to the called main engineering method in the method container according to the method name of the called main engineering method.
24. An application client comprising a main engineering client according to any one of claims 16-21 and a plug-in engineering client according to claim 22 or 23.
25. An electronic device, comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
The memory is configured to store at least one executable instruction, where the executable instruction causes the processor to perform operations corresponding to the processing method called by the program according to any one of claims 8 to 15.
26. A computer storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to the method of processing a program call according to any one of claims 8-15.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111508681.9A CN114168227B (en) | 2021-12-10 | 2021-12-10 | Program call processing method, electronic device and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111508681.9A CN114168227B (en) | 2021-12-10 | 2021-12-10 | Program call processing method, electronic device and computer storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114168227A CN114168227A (en) | 2022-03-11 |
CN114168227B true CN114168227B (en) | 2024-08-06 |
Family
ID=80485852
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111508681.9A Active CN114168227B (en) | 2021-12-10 | 2021-12-10 | Program call processing method, electronic device and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114168227B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107577483A (en) * | 2017-08-31 | 2018-01-12 | 武汉斗鱼网络科技有限公司 | Component engineering calls method, storage medium, equipment and the system of main works code |
CN110244990A (en) * | 2019-04-29 | 2019-09-17 | 五八有限公司 | Application component call method, device, electronic equipment and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107092494B (en) * | 2016-02-18 | 2020-09-01 | 腾讯科技(深圳)有限公司 | Method and device for accessing APK (android Package) resource |
-
2021
- 2021-12-10 CN CN202111508681.9A patent/CN114168227B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107577483A (en) * | 2017-08-31 | 2018-01-12 | 武汉斗鱼网络科技有限公司 | Component engineering calls method, storage medium, equipment and the system of main works code |
CN110244990A (en) * | 2019-04-29 | 2019-09-17 | 五八有限公司 | Application component call method, device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114168227A (en) | 2022-03-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20090210862A1 (en) | Intelligent computer program debugger, and system and method for implementing the same | |
CN111813385B (en) | Page plug-in method, device and equipment based on Web application | |
CN109933350B (en) | Method and device for embedding codes in application and electronic equipment | |
CN111464380A (en) | Method, device and system for parallel testing of multiple service items | |
CN108614696B (en) | Application making method, static library generation method and device | |
CN111966597B (en) | Test data generation method and device | |
CN111736923A (en) | Data processing method and device, electronic equipment and readable storage medium | |
CN111290996A (en) | Document format conversion method, device, equipment and readable storage medium | |
US9262142B2 (en) | Web application development tool | |
CN112769706A (en) | Componentized routing method and system | |
CN111949513A (en) | Configuration file loading method and device, electronic equipment and readable storage device | |
CN115599359A (en) | Code generation method, device, equipment and medium | |
CN114168227B (en) | Program call processing method, electronic device and computer storage medium | |
CN115629951B (en) | Task full-link tracking method, first node, link system and medium | |
CN116450165A (en) | Method, system, terminal and storage medium for quickly building environment and deploying program | |
CN111756682B (en) | Game data determining method, game data acquiring method and game data acquiring device | |
CN110399161B (en) | Mapping relation generation method, calling method and device | |
CN111581578A (en) | Interface request processing method and device | |
CN112817813B (en) | Data collection method, device and equipment based on reaction hops | |
CN111694596A (en) | Packing method and packing device for entry paths in webpack environment | |
CN106570143B (en) | Method and device for sending response object | |
CN111367796A (en) | Application program debugging method and device | |
CN110688430A (en) | Method and device for obtaining data bypass and electronic equipment | |
CN112486714A (en) | Database exception capture processing method and device and computer equipment | |
CN113010218B (en) | Plug-in loading method, device, computing equipment and computer 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 |