CN112000386A - Application implementation method and device - Google Patents

Application implementation method and device Download PDF

Info

Publication number
CN112000386A
CN112000386A CN201910381680.9A CN201910381680A CN112000386A CN 112000386 A CN112000386 A CN 112000386A CN 201910381680 A CN201910381680 A CN 201910381680A CN 112000386 A CN112000386 A CN 112000386A
Authority
CN
China
Prior art keywords
plug
application
request
configuring
ins
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910381680.9A
Other languages
Chinese (zh)
Inventor
董文新
梁全存
范双
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201910381680.9A priority Critical patent/CN112000386A/en
Publication of CN112000386A publication Critical patent/CN112000386A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • 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

Abstract

The invention discloses an application implementation method and device. The method comprises the following steps: receiving an editing request for an application through a front-end page; generating a topology containing application nodes according to the editing request, wherein each node is respectively deployed with one or more plug-ins, and each plug-in is respectively used for executing one or more service functions of the application; and when the application runs, calling each plug-in according to the application node topology to execute the service function of the application. The technical scheme has the advantages that the visualization visual angle presented in the form of the topological graph is provided through the modular design, so that the logic relation among all functions of the program can be observed and examined conveniently through the global visual angle. The method has the advantages that the program editing process is clear at a glance, the design of service logic is facilitated to be perfected, and the whole program does not need to be tested or modified when the program is tested or newly added with functions, so that the program development efficiency is greatly improved, and the application expandability and stability are improved.

Description

Application implementation method and device
Technical Field
The invention relates to the field of programming development, in particular to an application implementation method and device.
Background
The computer application program can be stably put into use only by means of a plurality of stages of encoding, debugging and the like in the early stage. Subsequently, if the program needs to be tested or the code needs to be modified to add a function, the whole program needs to be tested or modified, the development process is complex, and the logic between the functions of the program is not easy to observe in a global view. The function expansibility and stability of the application program are poor, and the development efficiency is low. Therefore, a development solution capable of improving the extensibility and stability of the application program is needed.
Disclosure of Invention
In view of the above, the present invention has been made to provide an implementation method and apparatus for an application that overcomes or at least partially solves the above problems.
According to an aspect of the present invention, there is provided an application implementation method, including:
receiving an editing request for an application through a front-end page;
generating a topology containing application nodes according to the editing request, wherein each node is respectively deployed with one or more plug-ins, and each plug-in is respectively used for executing one or more service functions of the application;
and when the application runs, calling each plug-in according to the application node topology to execute the service function of the application.
Optionally, the edit request includes one or more of:
and generating a request of a corresponding plug-in according to the input code, and selecting a request of a specified plug-in, a plug-in configuration request, an application configuration request and a node connection request from a plug-in library.
Optionally, the plug-in configuration request includes one or more of:
a request for configuring the name of the plug-in, a request for configuring the version number of the plug-in, a request for configuring the description information of the plug-in, a request for configuring the saved address of the plug-in, and a request for configuring the component on which the plug-in depends.
Optionally, the application configuration request includes one or more of:
a request for configuring an application name, a request for configuring an application version number, a request for configuring an item to which an application belongs, and a request for configuring resource dependency information of an application.
Optionally, the method further comprises:
saving at least a portion of the one or more plug-ins to a plug-in library.
Optionally, the method further comprises:
receiving user authority verification information through the front-end page;
and determining editable applications and/or plug-ins according to the user right verification information.
Optionally, the invoking each plug-in according to the application node topology to execute the service function of the application includes:
starting a working process corresponding to the application;
and analyzing the topology of the application node by the working process, and starting the plug-in processes corresponding to the plug-ins.
Optionally, the method further comprises:
and in the application running process, respectively monitoring the resource consumption, the working process state and the process state of each plug-in.
Optionally, the plug-ins communicate with each other through a message queue.
Optionally, the invoking each plug-in according to the application node topology to execute the service function of the application includes:
and when the length of the message queue of one plug-in reaches a corresponding preset threshold value, performing forward feedback according to the topology of the application node so as to enable the relevant plug-in to suspend execution.
Optionally, the method further comprises:
and collecting and summarizing execution logs of all the plug-ins, wherein the execution logs contain task identifiers of executed tasks.
Optionally, the method further comprises:
and respectively performing unit test on each plug-in.
According to another aspect of the present invention, an apparatus for implementing an application is provided, including:
the system comprises an editing unit, a service processing unit and a service processing unit, wherein the editing unit is suitable for receiving an editing request for an application through a front-end page and generating a topology containing application nodes according to the editing request, one or more plug-ins are respectively deployed on each node, and each plug-in is respectively used for executing one or more service functions of the application;
and the calling unit is suitable for calling each plug-in according to the application node topology to execute the service function of the application when the application runs.
Optionally, the edit request includes one or more of:
and generating a request of a corresponding plug-in according to the input code, and selecting a request of a specified plug-in, a plug-in configuration request, an application configuration request and a node connection request from a plug-in library.
Optionally, the plug-in configuration request includes one or more of:
a request for configuring the name of the plug-in, a request for configuring the version number of the plug-in, a request for configuring the description information of the plug-in, a request for configuring the saved address of the plug-in, and a request for configuring the component on which the plug-in depends.
Optionally, the application configuration request includes one or more of:
a request for configuring an application name, a request for configuring an application version number, a request for configuring an item to which an application belongs, and a request for configuring resource dependency information of an application.
Optionally, the editing unit is further adapted to save at least part of the one or more plug-ins to a plug-in library.
Optionally, the editing unit is further adapted to receive user right verification information through the front end page; and determining editable applications and/or plug-ins according to the user right verification information.
Optionally, the calling unit is adapted to start a work process corresponding to the application; and analyzing the topology of the application node by the working process, and starting the plug-in processes corresponding to the plug-ins.
Optionally, the apparatus further comprises:
and the monitoring unit is used for respectively monitoring the resource consumption, the working process state and the process state of each plug-in the application running process.
Optionally, the plug-ins communicate with each other through a message queue.
Optionally, the invoking unit is adapted to perform forward feedback according to the topology of the application node when the length of the message queue of one plug-in reaches a corresponding preset threshold, so as to suspend execution of the relevant plug-in.
Optionally, the apparatus further comprises:
and the log collecting and recording unit is suitable for collecting and summarizing the execution logs of all the plug-ins, and the execution logs contain task identifiers of executed tasks.
Optionally, the apparatus further comprises:
and the test unit is suitable for respectively performing unit test on each plug-in.
In accordance with still another aspect of the present invention, there is provided an electronic apparatus including: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to perform a method as any one of the above.
According to a further aspect of the invention, there is provided a computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement a method as any one of the above.
In view of the above, in the technical scheme of the present invention, an edit request for an application is received through a front-end page; generating a topology containing application nodes according to the editing request, wherein each node is respectively deployed with one or more plug-ins, and each plug-in is respectively used for executing one or more service functions of the application; and when the application runs, calling each plug-in according to the application node topology to execute the service function of the application. The technical scheme has the advantages that the visualization visual angle presented in the form of the topological graph is provided through the modular design, so that the logic relation among all functions of the program can be observed and examined conveniently through the global visual angle. The method has the advantages that the program editing process is clear at a glance, the design of service logic is facilitated to be perfected, and the whole program does not need to be tested or modified when the program is tested or newly added with functions, so that the program development efficiency is greatly improved, and the application expandability and stability are improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
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 refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow diagram illustrating a method for implementing an application according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an implementation apparatus for an application according to an embodiment of the present invention;
FIG. 3 shows a schematic structural diagram of an electronic device according to one embodiment of the invention;
fig. 4 shows a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure 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 disclosure to those skilled in the art.
Fig. 1 shows an implementation method of an application according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
in step S110, an edit request for an application is received through a front-end page.
For example, in the process of program development through the platform, a corresponding unit or module or the like is provided by the front-end page to receive an edit request for the application. When a program with a downloading function needs to be written, a request can be made to a corresponding front-end page of the platform, and the front-end page responds after receiving the request, so that preparation is made for starting program editing.
Step S120, generating a topology containing application nodes according to the editing request, wherein each node is respectively deployed with one or more plug-ins, and each plug-in is respectively used for executing one or more service functions of the application.
For example, a topology map composed of several nodes is generated according to a request for writing a download program. These nodes contain a number of plug-ins with corresponding functions. Meanwhile, the platform can also store plug-ins with corresponding functions, and the plug-ins stored by the platform can be directly called when the program is edited, so that the working efficiency is improved.
Step S130, when the application runs, calling each plug-in according to the topology of the application node to execute the service function of the application.
For example, when a downloading program is edited on a platform to prepare for starting an application, corresponding plug-ins of each part are called according to the formed topology of the application node, and finally, all functions of the application are completely realized.
That is, the running of the application is realized by the plug-ins in each application node, and each plug-in can be realized by an independent process.
It can be seen that the method shown in fig. 1 provides a visualization view presented in the form of a topological graph through a modular design, so that the logical relationship between the functions of the program can be observed and examined conveniently in a global view. The method has the advantages that the program editing process is clear at a glance, the design of service logic is facilitated to be perfected, and the whole program does not need to be tested or modified when the program is tested or newly added with functions, so that the program development efficiency is greatly improved, and the application expandability and stability are improved.
In an embodiment of the present invention, in the above method, the edit request includes one or more of the following: and generating a request of a corresponding plug-in according to the input code, and selecting a request of a specified plug-in, a plug-in configuration request, an application configuration request and a node connection request from a plug-in library.
For example, through a download program editing request received by the front end of the page, it is possible to generate a functional plug-in with connection to the download source server according to an input code, select a functional plug-in with recombination on downloaded fragments from a plug-in library, configure selected plug-ins, configure download applications, determine how nodes corresponding to the plug-ins are connected, and the like.
Specifically, in an embodiment of the present invention, in the method, the plug-in configuration request includes one or more of the following: a request for configuring the name of the plug-in, a request for configuring the version number of the plug-in, a request for configuring the description information of the plug-in, a request for configuring the saved address of the plug-in, and a request for configuring the component on which the plug-in depends. In an embodiment of the present invention, in the above method, the application configuration request includes one or more of the following: a request for configuring an application name, a request for configuring an application version number, a request for configuring an item to which an application belongs, and a request for configuring resource dependency information of an application.
In a specific service scenario, it can be determined in which dimensions the plug-in or the application needs to be configured according to actual requirements. In the above example, the plug-in name and the application name may be used to identify the plug-in and the application, or other types of unique identifiers may be used to achieve corresponding effects; to facilitate version management, the version number may be set accordingly; the plug-in description information may include plug-in parameters, several output branches of the plug-in, version update descriptions, and so on. Many plug-ins need to rely on other components such as library files, need to be saved in a plug-in library, and the like, and can be configured according to actual situations.
From an application perspective, an application tends to belong to an item, e.g., a transcoding application may belong to a video item. The resource-dependent configuration information of the application may include hardware resources such as a CPU and a memory that are preset to be consumed, or software environment resources such as a Linux environment.
In one embodiment of the invention, the method further comprises: at least a portion of the one or more plug-ins are saved to a plug-in library.
The plug-in used by the application can be written by the user or can be called from a plug-in library. The user can also store a plurality of edited plug-ins in the platform plug-in library, and can be convenient for other users of the platform to call and use by editing the configuration of the plug-ins, for example, if the plug-ins are set to be private, only the user can use the plug-ins; if the plug-in is public in a certain project, only developers of the project can use the plug-in, and developers of other projects cannot use the plug-in; and the system is completely public, so that all personnel who can access the front-end page for development can use the system. The method is beneficial to realizing platform sharing of the plug-in, so that the workload is saved, the expandability of the application program is improved, and meanwhile, the writing efficiency is improved.
In one embodiment of the invention, the method further comprises: receiving user authority verification information through a front-end page; and determining an editable application and/or plug-in according to the user right verification information.
The identity of the user is verified through the information received by the front-end page, and then the application and/or the plug-in which the user can edit are determined according to different permissions of the user. Rewriting of plug-ins and/or applications by non-plug-in holders and/or application writers can be prevented, and plug-in and application stability and writer rights protection can be facilitated.
In an embodiment of the present invention, in the method, invoking each plug-in according to the topology of the application node to execute the service function of the application includes: starting a working process corresponding to the application; and analyzing the topology of the application nodes by the working process, and starting the plug-in processes corresponding to the plug-ins.
For example, plug-ins are called according to the downloader application node topology to perform the business functions of the downloaded application. The work process of the downloaded program application is independent of each plug-in process and is called respectively. The application work process and the plug-in process are independent respectively, and the method has the advantages that the application process and the plug-in process are called respectively, so that the program compiling is more flexible. But also facilitates debugging and maintenance work of the editing process.
In one embodiment of the invention, the method further comprises: and in the application running process, respectively monitoring the resource consumption, the working process state and the process state of each plug-in.
For example, when the downloading application runs, the resource consumption, the downloading work process state and the process state of each plug-in unit in the running process are respectively monitored, so that the information of the resource use condition, the work process state, the process state of each plug-in unit and the like can be mastered in real time.
In an embodiment of the present invention, in the above method, the plug-ins communicate with each other through a message queue.
A message queue is a container that holds messages during their transmission. Because the plug-ins are independent and are matched with each other to realize the function of the application, the plug-ins need to be interacted, and information can be transmitted in a message queue mode. The format of the message may be a specified format, for example JSON format, and the message is standardized and simple to parse. The message may include a task identifier, an application identifier, a creation time, a processing time, various parameters of the message, and the like, and the parameters may be implemented in a key/value manner.
In an embodiment of the present invention, in the method, invoking each plug-in according to the topology of the application node to execute the service function of the application includes: and when the length of the message queue of one plug-in reaches a corresponding preset threshold value, performing forward feedback according to the topology of the application node so as to enable the relevant plug-in to suspend execution.
In the application, all plug-ins cooperate with each other to realize the function of the application, and certain dependency relationship exists among the plug-ins. For example, a transcoding application, the specific implementation logic includes downloading, screenshot, resolution conversion, face recognition, and the like, and these are implemented by using one plug-in respectively. The file obtained by downloading the plug-in needs to be transferred to the screenshot plug-in for processing, and the file is transferred to the resolution conversion plug-in and the face recognition plug-in after the screenshot is obtained, and the like.
In summary, it can be understood that the processing result of the A plug-in is transferred to the B plug-in as the processing object of the B plug-in.
Thus, when the execution efficiency of the A plug-in and the B plug-in is different, if the efficiency of the A plug-in is higher, the messages in the corresponding message queue can be accumulated, and finally the threshold value is reached. At this time, it is stated that the B plug-in cannot process the accumulated messages in time, and even if the a plug-in continues to execute, the efficiency of the application is not improved, but resources are wasted. Therefore, the A plug-in can be suspended by the forward feedback, and the A plug-in can continue to execute after the B plug-in can process a part of accumulated messages.
In one embodiment of the invention, the method further comprises: and collecting and summarizing execution logs of all the plug-ins, wherein the execution logs contain task identifiers of executed tasks.
For a general application, the log can be executed to check when the application crashes. Because the application is realized in a plug-in mode in the technical scheme of the application, the whole execution log of the application is directly collected, on one hand, the realization is difficult, and on the other hand, which plug-in the problem appears in is difficult to determine. By collecting the execution logs of the plug-ins respectively, the execution process of the plug-ins can be known, and the plug-ins with problems can be quickly positioned when the application has problems.
Since the execution process of the application is divided into a plurality of processes for one task and executed by different plug-ins, in order to accurately record the execution logs of different tasks, the execution logs are distinguished by the task identifiers of the executed tasks.
In one embodiment of the invention, the method further comprises: and respectively performing unit test on each plug-in.
Unit testing is an important component of software testing, and generally refers to checking and verifying the smallest unit that can be tested in software. Because the embodiment of the invention is realized by the way of plug-in, each plug-in naturally forms a functional unit, so the unit test can be realized by directly testing the plug-in, which is very convenient.
Fig. 2 shows an implementation apparatus of an application according to an embodiment of the present invention, and as shown in fig. 2, the implementation apparatus 200 of the application includes:
the editing unit 210 is adapted to receive an editing request for an application through a front-end page, and generate a topology including application nodes according to the editing request, where each node is respectively deployed with one or more plug-ins, and each plug-in is respectively used to execute one or more service functions of the application.
For example, in the process of program development through the platform, a corresponding unit or module or the like is provided by the front-end page to receive an edit request for the application. When a program with a downloading function needs to be written, a request can be made to a corresponding front-end page of the platform, and the front-end page responds after receiving the request, so that preparation is made for starting program editing.
And generating a topological graph consisting of a plurality of nodes according to the request of writing the downloading program. These nodes contain a number of plug-ins with corresponding functions. Meanwhile, the platform can also store plug-ins with corresponding functions, and the plug-ins stored by the platform can be directly called when the program is edited, so that the working efficiency is improved.
The invoking unit 220 is adapted to invoke each plug-in according to the topology of the application node to execute the service function of the application when the application runs.
For example, when a downloading program is edited on a platform to prepare for starting an application, corresponding plug-ins of each part are called according to the formed topology of the application node, and finally, all functions of the application are completely realized.
That is, the running of the application is realized by the plug-ins in each application node, and each plug-in can be realized by an independent process.
It can be seen that the apparatus shown in fig. 2 provides a visualization view presented in the form of a topological graph through a modular design, so as to facilitate observing and reviewing the logical relationship between the functions of the program in a global view. The method has the advantages that the program editing process is clear at a glance, the design of service logic is facilitated to be perfected, and the whole program does not need to be tested or modified when the program is tested or newly added with functions, so that the program development efficiency is greatly improved, and the application expandability and stability are improved.
In an embodiment of the present invention, in the above apparatus, the edit request includes one or more of the following: and generating a request of a corresponding plug-in according to the input code, and selecting a request of a specified plug-in, a plug-in configuration request, an application configuration request and a node connection request from a plug-in library.
For example, through a download program editing request received by the front end of the page, it is possible to generate a functional plug-in with connection to the download source server according to an input code, select a functional plug-in with recombination on downloaded fragments from a plug-in library, configure selected plug-ins, configure download applications, determine how nodes corresponding to the plug-ins are connected, and the like.
Specifically, in an embodiment of the present invention, in the apparatus, the plug-in configuration request includes one or more of the following: a request for configuring the name of the plug-in, a request for configuring the version number of the plug-in, a request for configuring the description information of the plug-in, a request for configuring the saved address of the plug-in, and a request for configuring the component on which the plug-in depends.
In an embodiment of the present invention, in the above apparatus, the application configuration request includes one or more of the following: a request for configuring an application name, a request for configuring an application version number, a request for configuring an item to which an application belongs, and a request for configuring resource dependency information of an application.
In a specific service scenario, it can be determined in which dimensions the plug-in or the application needs to be configured according to actual requirements. In the above example, the plug-in name and the application name may be used to identify the plug-in and the application, or other types of unique identifiers may be used to achieve corresponding effects; to facilitate version management, the version number may be set accordingly; the plug-in description information may include plug-in parameters, several output branches of the plug-in, version update descriptions, and so on. Many plug-ins need to rely on other components such as library files, need to be saved in a plug-in library, and the like, and can be configured according to actual situations.
From an application perspective, an application tends to belong to an item, e.g., a transcoding application may belong to a video item. The resource-dependent configuration information of the application may include hardware resources such as a CPU and a memory that are preset to be consumed, or software environment resources such as a Linux environment.
In an embodiment of the present invention, in the above apparatus, the editing unit 210 is further adapted to save at least part of the one or more plug-ins to the plug-in library.
The plug-in used by the application can be written by the user or can be called from a plug-in library. The user can also store a plurality of edited plug-ins in the platform plug-in library, and can be convenient for other users of the platform to call and use by editing the configuration of the plug-ins, for example, if the plug-ins are set to be private, only the user can use the plug-ins; if the plug-in is public in a certain project, only developers of the project can use the plug-in, and developers of other projects cannot use the plug-in; and the system is completely public, so that all personnel who can access the front-end page for development can use the system. The method is beneficial to realizing platform sharing of the plug-in, so that the workload is saved, the expandability of the application program is improved, and meanwhile, the writing efficiency is improved.
In an embodiment of the present invention, in the above apparatus, the editing unit 210 is further adapted to receive user right verification information through a front end page; and determining an editable application and/or plug-in according to the user right verification information.
The identity of the user is verified through the information received by the front-end page, and then the application and/or the plug-in which the user can edit are determined according to different permissions of the user. Rewriting of plug-ins and/or applications by non-plug-in holders and/or application writers can be prevented, and plug-in and application stability and writer rights protection can be facilitated.
In an embodiment of the present invention, in the above apparatus, the invoking unit 220 is adapted to start a work process corresponding to an application; and analyzing the topology of the application nodes by the working process, and starting the plug-in processes corresponding to the plug-ins.
For example, plug-ins are called according to the downloader application node topology to perform the business functions of the downloaded application. The work process of the downloaded program application is independent of each plug-in process and is called respectively. The application work process and the plug-in process are independent respectively, and the method has the advantages that the application process and the plug-in process are called respectively, so that the program compiling is more flexible. But also facilitates debugging and maintenance work of the editing process.
In an embodiment of the present invention, the apparatus further includes: and the monitoring unit is used for respectively monitoring the resource consumption, the working process state and the process state of each plug-in the application running process.
For example, when the downloading application runs, the resource consumption, the downloading work process state and the process state of each plug-in unit in the running process are respectively monitored, so that the information of the resource use condition, the work process state, the process state of each plug-in unit and the like can be mastered in real time.
In an embodiment of the present invention, in the above apparatus, the plug-ins communicate with each other through a message queue.
A message queue is a container that holds messages during their transmission. Because the plug-ins are independent and are matched with each other to realize the function of the application, the plug-ins need to be interacted, and information can be transmitted in a message queue mode. The format of the message may be a specified format, for example JSON format, and the message is standardized and simple to parse. The message may include a task identifier, an application identifier, a creation time, a processing time, various parameters of the message, and the like, and the parameters may be implemented in a key/value manner.
In an embodiment of the present invention, in the above apparatus, the invoking unit 220 is adapted to perform forward feedback according to the topology of the application node when the length of the message queue of one plug-in reaches a corresponding preset threshold, so as to suspend the execution of the relevant plug-in.
In the application, all plug-ins cooperate with each other to realize the function of the application, and certain dependency relationship exists among the plug-ins. For example, a transcoding application, the specific implementation logic includes downloading, screenshot, resolution conversion, face recognition, and the like, and these are implemented by using one plug-in respectively. The file obtained by downloading the plug-in needs to be transferred to the screenshot plug-in for processing, and the file is transferred to the resolution conversion plug-in and the face recognition plug-in after the screenshot is obtained, and the like.
In summary, it can be understood that the processing result of the A plug-in is transferred to the B plug-in as the processing object of the B plug-in.
Thus, when the execution efficiency of the A plug-in and the B plug-in is different, if the efficiency of the A plug-in is higher, the messages in the corresponding message queue can be accumulated, and finally the threshold value is reached. At this time, it is stated that the B plug-in cannot process the accumulated messages in time, and even if the a plug-in continues to execute, the efficiency of the application is not improved, but resources are wasted. Therefore, the A plug-in can be suspended by the forward feedback, and the A plug-in can continue to execute after the B plug-in can process a part of accumulated messages.
In an embodiment of the present invention, the apparatus further includes: and the log collection unit is suitable for collecting and summarizing the execution logs of all the plug-ins, and the execution logs contain task identifiers of executed tasks.
For a general application, the log can be executed to check when the application crashes. Because the application is realized in a plug-in mode in the technical scheme of the application, the whole execution log of the application is directly collected, on one hand, the realization is difficult, and on the other hand, which plug-in the problem appears in is difficult to determine. By collecting the execution logs of the plug-ins respectively, the execution process of the plug-ins can be known, and the plug-ins with problems can be quickly positioned when the application has problems.
Since the execution process of the application is divided into a plurality of processes for one task and executed by different plug-ins, in order to accurately record the execution logs of different tasks, the execution logs are distinguished by the task identifiers of the executed tasks.
In an embodiment of the present invention, the apparatus further includes: and the test unit is suitable for respectively performing unit test on each plug-in.
Unit testing is an important component of software testing, and generally refers to checking and verifying the smallest unit that can be tested in software. Because the embodiment of the invention is realized by the way of plug-in, each plug-in naturally forms a functional unit, so the unit test can be realized by directly testing the plug-in, which is very convenient.
In summary, in the technical solution of the present invention, an edit request for an application is received through a front-end page; generating a topology containing application nodes according to the editing request, wherein each node is respectively deployed with one or more plug-ins, and each plug-in is respectively used for executing one or more service functions of the application; and when the application runs, calling each plug-in according to the application node topology to execute the service function of the application. The technical scheme has the advantages that the visualization visual angle presented in the form of the topological graph is provided through the modular design, so that the logic relation among all functions of the program can be observed and examined conveniently through the global visual angle. The method has the advantages that the program editing process is clear at a glance, the design of service logic is facilitated to be perfected, and the whole program does not need to be tested or modified when the program is tested or newly added with functions, so that the program development efficiency is greatly improved, and the application expandability and stability are improved.
It should be noted that:
the algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose devices may be used with the teachings herein. The required structure for constructing such a device will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, 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 foregoing description of exemplary embodiments of the invention, various features 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 interpreted as reflecting an intention that: that the invention as claimed 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 device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. 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. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements 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 described herein include some features included in other embodiments, rather than other features, 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 may be used in any combination.
The 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 a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in an implementation device in accordance with an application of an embodiment of the invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
For example, fig. 3 shows a schematic structural diagram of an electronic device according to an embodiment of the invention. The electronic device 300 comprises a processor 310 and a memory 320 arranged to store computer executable instructions (computer readable program code). The memory 320 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. The memory 320 has a storage space 330 storing computer readable program code 331 for performing any of the method steps described above. For example, the storage space 330 for storing the computer readable program code may comprise respective computer readable program codes 331 for respectively implementing various steps in the above method. The computer readable program code 331 may be read from or written to one or more computer program products. These computer program products comprise a program code carrier such as a hard disk, a Compact Disc (CD), a memory card or a floppy disk. Such a computer program product is typically a computer readable storage medium such as described in fig. 4. Fig. 4 shows a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention. The computer readable storage medium 400 has stored thereon a computer readable program code 331 for performing the steps of the method according to the invention, readable by a processor 310 of the electronic device 300, which computer readable program code 331, when executed by the electronic device 300, causes the electronic device 300 to perform the steps of the method described above, in particular the computer readable program code 331 stored on the computer readable storage medium may perform the method shown in any of the embodiments described above. The computer readable program code 331 may be compressed in a suitable 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 usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The embodiment of the invention discloses A1 and an application implementation method, which comprises the following steps:
receiving an editing request for an application through a front-end page;
generating a topology containing application nodes according to the editing request, wherein each node is respectively deployed with one or more plug-ins, and each plug-in is respectively used for executing one or more service functions of the application;
and when the application runs, calling each plug-in according to the application node topology to execute the service function of the application.
A2, the method of A1, wherein the edit request includes one or more of:
and generating a request of a corresponding plug-in according to the input code, and selecting a request of a specified plug-in, a plug-in configuration request, an application configuration request and a node connection request from a plug-in library.
A3, the method of A2, wherein the plug-in configuration request includes one or more of:
a request for configuring the name of the plug-in, a request for configuring the version number of the plug-in, a request for configuring the description information of the plug-in, a request for configuring the saved address of the plug-in, and a request for configuring the component on which the plug-in depends.
A4, the method of A2, wherein the application configuration request includes one or more of:
a request for configuring an application name, a request for configuring an application version number, a request for configuring an item to which an application belongs, and a request for configuring resource dependency information of an application.
A5, the method of a1, wherein the method further comprises:
saving at least a portion of the one or more plug-ins to a plug-in library.
A6, the method of a1, wherein the method further comprises:
receiving user authority verification information through the front-end page;
and determining editable applications and/or plug-ins according to the user right verification information.
A7, the method as in A1, wherein the invoking plug-ins to perform business functions of the application according to the application node topology comprises:
starting a working process corresponding to the application;
and analyzing the topology of the application node by the working process, and starting the plug-in processes corresponding to the plug-ins.
A8, the method of a7, wherein the method further comprises:
and in the application running process, respectively monitoring the resource consumption, the working process state and the process state of each plug-in.
A9, the method of A1, wherein the plugins communicate with each other via a message queue.
A10, the method as in A9, wherein the invoking plug-ins to perform business functions of the application according to the application node topology comprises:
and when the length of the message queue of one plug-in reaches a corresponding preset threshold value, performing forward feedback according to the topology of the application node so as to enable the relevant plug-in to suspend execution.
A11, the method of a1, wherein the method further comprises:
and collecting and summarizing execution logs of all the plug-ins, wherein the execution logs contain task identifiers of executed tasks.
A12, the method of a1, wherein the method further comprises:
and respectively performing unit test on each plug-in.
The embodiment of the invention discloses B13 and an application implementation device, which comprises:
the system comprises an editing unit, a service processing unit and a service processing unit, wherein the editing unit is suitable for receiving an editing request for an application through a front-end page and generating a topology containing application nodes according to the editing request, one or more plug-ins are respectively deployed on each node, and each plug-in is respectively used for executing one or more service functions of the application;
and the calling unit is suitable for calling each plug-in according to the application node topology to execute the service function of the application when the application runs.
B14, the apparatus of B13, wherein the edit request includes one or more of:
and generating a request of a corresponding plug-in according to the input code, and selecting a request of a specified plug-in, a plug-in configuration request, an application configuration request and a node connection request from a plug-in library.
B15, the apparatus of B14, wherein the plug-in configuration request includes one or more of:
a request for configuring the name of the plug-in, a request for configuring the version number of the plug-in, a request for configuring the description information of the plug-in, a request for configuring the saved address of the plug-in, and a request for configuring the component on which the plug-in depends.
B16, the apparatus of B14, wherein the application configuration request includes one or more of:
a request for configuring an application name, a request for configuring an application version number, a request for configuring an item to which an application belongs, and a request for configuring resource dependency information of an application.
B17, the device of B13, wherein,
the editing unit is further adapted to save at least part of the one or more plug-ins to a plug-in library.
B18, the apparatus of B13, wherein the apparatus further comprises:
the editing unit is also suitable for receiving user authority verification information through the front-end page; and determining editable applications and/or plug-ins according to the user right verification information.
B19, the device of B13, wherein,
the calling unit is suitable for starting a working process corresponding to the application; and analyzing the topology of the application node by the working process, and starting the plug-in processes corresponding to the plug-ins.
B20, the apparatus of B19, wherein the apparatus further comprises:
and the monitoring unit is used for respectively monitoring the resource consumption, the working process state and the process state of each plug-in the application running process.
B21, the device as in B13, wherein the plug-ins communicate with each other through a message queue.
B22, the device of B21, wherein,
and the calling unit is suitable for performing forward feedback according to the topology of the application node when the length of the message queue of one plug-in reaches a corresponding preset threshold value so as to enable the relevant plug-in to suspend execution.
B23, the apparatus of B13, wherein the apparatus further comprises:
and the log collection unit is suitable for collecting and summarizing execution logs of all the plug-ins, and the execution logs contain task identifiers of executed tasks.
B24, the apparatus of B13, wherein the apparatus further comprises:
and the test unit is suitable for respectively performing unit test on each plug-in.
The embodiment of the invention also discloses C25 and electronic equipment, wherein the electronic equipment comprises: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to perform the method of any one of a1-a 12.
Embodiments of the invention also disclose D26, a computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method as any one of a1-a 12.

Claims (10)

1. An implementation method of an application comprises the following steps:
receiving an editing request for an application through a front-end page;
generating a topology containing application nodes according to the editing request, wherein each node is respectively deployed with one or more plug-ins, and each plug-in is respectively used for executing one or more service functions of the application;
and when the application runs, calling each plug-in according to the application node topology to execute the service function of the application.
2. The method of claim 1, wherein the edit request comprises one or more of:
and generating a request of a corresponding plug-in according to the input code, and selecting a request of a specified plug-in, a plug-in configuration request, an application configuration request and a node connection request from a plug-in library.
3. The method of claim 2, wherein the plug-in configuration request includes one or more of:
a request for configuring the name of the plug-in, a request for configuring the version number of the plug-in, a request for configuring the description information of the plug-in, a request for configuring the saved address of the plug-in, and a request for configuring the component on which the plug-in depends.
4. The method of claim 2, wherein the application configuration request includes one or more of:
a request for configuring an application name, a request for configuring an application version number, a request for configuring an item to which an application belongs, and a request for configuring resource dependency information of an application.
5. An apparatus for implementing an application, comprising:
the system comprises an editing unit, a service processing unit and a service processing unit, wherein the editing unit is suitable for receiving an editing request for an application through a front-end page and generating a topology containing application nodes according to the editing request, one or more plug-ins are respectively deployed on each node, and each plug-in is respectively used for executing one or more service functions of the application;
and the calling unit is suitable for calling each plug-in according to the application node topology to execute the service function of the application when the application runs.
6. The apparatus of claim 5, wherein the edit request comprises one or more of:
and generating a request of a corresponding plug-in according to the input code, and selecting a request of a specified plug-in, a plug-in configuration request, an application configuration request and a node connection request from a plug-in library.
7. The apparatus of claim 6, wherein the plug-in configuration request comprises one or more of:
a request for configuring the name of the plug-in, a request for configuring the version number of the plug-in, a request for configuring the description information of the plug-in, a request for configuring the saved address of the plug-in, and a request for configuring the component on which the plug-in depends.
8. The apparatus of claim 6, wherein the application configuration request comprises one or more of:
a request for configuring an application name, a request for configuring an application version number, a request for configuring an item to which an application belongs, and a request for configuring resource dependency information of an application.
9. An electronic device, wherein the electronic device comprises: a processor; and a memory arranged to store computer-executable instructions that, when executed, cause the processor to perform the method of any one of claims 1-4.
10. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 1-4.
CN201910381680.9A 2019-05-08 2019-05-08 Application implementation method and device Pending CN112000386A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910381680.9A CN112000386A (en) 2019-05-08 2019-05-08 Application implementation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910381680.9A CN112000386A (en) 2019-05-08 2019-05-08 Application implementation method and device

Publications (1)

Publication Number Publication Date
CN112000386A true CN112000386A (en) 2020-11-27

Family

ID=73461224

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910381680.9A Pending CN112000386A (en) 2019-05-08 2019-05-08 Application implementation method and device

Country Status (1)

Country Link
CN (1) CN112000386A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114756302A (en) * 2022-04-25 2022-07-15 中国建设银行股份有限公司 Information processing method, device, equipment and medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1404264A (en) * 2001-09-04 2003-03-19 三星电子株式会社 Unified intra-process communication
CN102279888A (en) * 2011-08-24 2011-12-14 北京新媒传信科技有限公司 Method and system for scheduling tasks
CN103309674A (en) * 2013-06-25 2013-09-18 深圳中兴网信科技有限公司 Software architecture system
CN103544013A (en) * 2013-10-25 2014-01-29 优视科技有限公司 Plug-in system and plug-in management method
CN104767654A (en) * 2015-02-28 2015-07-08 山东中创软件商用中间件股份有限公司 Update method and device for topological graph of monitoring system
CN105099739A (en) * 2014-05-15 2015-11-25 中国移动通信集团公司 Plug-in type software deployment method and apparatus, and application server
CN105930203A (en) * 2015-12-29 2016-09-07 中国银联股份有限公司 Method and apparatus for controlling message distribution
CN106648859A (en) * 2016-12-01 2017-05-10 北京奇虎科技有限公司 Task scheduling method and device
CN107590070A (en) * 2017-08-18 2018-01-16 深圳怡化电脑股份有限公司 A kind of service flow debugging method and device
CN107678941A (en) * 2017-08-31 2018-02-09 深圳市小牛在线互联网信息咨询有限公司 Method and device, storage medium and the computer equipment of Application testing
CN107870787A (en) * 2016-09-26 2018-04-03 平安科技(深圳)有限公司 Application plug loading method and system
CN108255467A (en) * 2016-12-27 2018-07-06 北京京东尚科信息技术有限公司 The method, apparatus and system of service are performed according to workflow sequence
CN108595203A (en) * 2018-04-28 2018-09-28 努比亚技术有限公司 Application function executes method, mobile terminal and computer readable storage medium
CN108984284A (en) * 2018-06-26 2018-12-11 杭州比智科技有限公司 DAG method for scheduling task and device based on off-line calculation platform

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1404264A (en) * 2001-09-04 2003-03-19 三星电子株式会社 Unified intra-process communication
CN102279888A (en) * 2011-08-24 2011-12-14 北京新媒传信科技有限公司 Method and system for scheduling tasks
CN103309674A (en) * 2013-06-25 2013-09-18 深圳中兴网信科技有限公司 Software architecture system
CN103544013A (en) * 2013-10-25 2014-01-29 优视科技有限公司 Plug-in system and plug-in management method
CN105099739A (en) * 2014-05-15 2015-11-25 中国移动通信集团公司 Plug-in type software deployment method and apparatus, and application server
CN104767654A (en) * 2015-02-28 2015-07-08 山东中创软件商用中间件股份有限公司 Update method and device for topological graph of monitoring system
CN105930203A (en) * 2015-12-29 2016-09-07 中国银联股份有限公司 Method and apparatus for controlling message distribution
CN107870787A (en) * 2016-09-26 2018-04-03 平安科技(深圳)有限公司 Application plug loading method and system
CN106648859A (en) * 2016-12-01 2017-05-10 北京奇虎科技有限公司 Task scheduling method and device
CN108255467A (en) * 2016-12-27 2018-07-06 北京京东尚科信息技术有限公司 The method, apparatus and system of service are performed according to workflow sequence
CN107590070A (en) * 2017-08-18 2018-01-16 深圳怡化电脑股份有限公司 A kind of service flow debugging method and device
CN107678941A (en) * 2017-08-31 2018-02-09 深圳市小牛在线互联网信息咨询有限公司 Method and device, storage medium and the computer equipment of Application testing
CN108595203A (en) * 2018-04-28 2018-09-28 努比亚技术有限公司 Application function executes method, mobile terminal and computer readable storage medium
CN108984284A (en) * 2018-06-26 2018-12-11 杭州比智科技有限公司 DAG method for scheduling task and device based on off-line calculation platform

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114756302A (en) * 2022-04-25 2022-07-15 中国建设银行股份有限公司 Information processing method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US8074204B2 (en) Test automation for business applications
US20110185339A1 (en) Automating the creation of an application provisioning model
US9823991B2 (en) Concurrent workload simulation for application performance testing
US8918762B2 (en) Generating test plans and test cases from service-oriented architecture and process models
CN108459962A (en) Code specification detection method, device, terminal device and storage medium
US11200048B2 (en) Modification of codified infrastructure for orchestration in a multi-cloud environment
US20130283296A1 (en) Method and system for generating a service definition based on service activity events
CN108595187A (en) Method, device and the storage medium of Android installation kit integrated software development kit
JP6142705B2 (en) Iterative generation of symbolic test drivers for object-oriented languages
CN110287696A (en) A kind of detection method, device and the equipment of the shell process that rebounds
CN114546738B (en) Universal test method, system, terminal and storage medium for server
CN114115838A (en) Data interaction method and system based on distributed components and cloud platform
CN106293687B (en) A kind of control method and device being packaged process
US20150339219A1 (en) Resilient mock object creation for unit testing
CN112000386A (en) Application implementation method and device
CN111221721A (en) Automatic recording and executing method and device for unit test cases
CN116578282A (en) Code generation method, device, electronic equipment and medium
US11640281B2 (en) Tool for introspection in object-oriented source code
CN115686467A (en) Type inference in dynamic languages
CN111045891B (en) Monitoring method, device, equipment and storage medium based on java multithreading
CN114115982A (en) Code issuing method, device, equipment and storage medium
CN114691496A (en) Unit testing method, unit testing device, computing equipment and medium
CN112000341A (en) Application implementation method and device
CN114785847B (en) Network control software development configuration method, terminal and storage medium
Quante Online construction of dynamic object process graphs

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