CN112558985B - Sub-application deployment method and device - Google Patents

Sub-application deployment method and device Download PDF

Info

Publication number
CN112558985B
CN112558985B CN202110199214.6A CN202110199214A CN112558985B CN 112558985 B CN112558985 B CN 112558985B CN 202110199214 A CN202110199214 A CN 202110199214A CN 112558985 B CN112558985 B CN 112558985B
Authority
CN
China
Prior art keywords
application
sub
information
main
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110199214.6A
Other languages
Chinese (zh)
Other versions
CN112558985A (en
Inventor
王新建
赵甜甜
李凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Luban Beijing Electronic Commerce Technology Co ltd
Original Assignee
Luban Beijing Electronic Commerce 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 Luban Beijing Electronic Commerce Technology Co ltd filed Critical Luban Beijing Electronic Commerce Technology Co ltd
Priority to CN202110199214.6A priority Critical patent/CN112558985B/en
Publication of CN112558985A publication Critical patent/CN112558985A/en
Application granted granted Critical
Publication of CN112558985B publication Critical patent/CN112558985B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

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

Abstract

The invention provides a sub-application deployment method, a sub-application deployment device, electronic equipment and a computer-readable storage medium, and solves the problem that the existing application deployment mode is low in efficiency. The application deployment method comprises the following steps: deploying the sub-application to at least one designated server; maintaining application information of the sub-applications in a database, wherein the application information comprises network addresses of designated servers to which the sub-applications are deployed and attribute information of the sub-applications; when the main application receives an operation interface calling instruction, calling application information of the sub-application from a database corresponding to the main application, and rendering an operation interface of the main application according to attribute information in the called application information; and when receiving an operation instruction for the sub-application, calling the sub-application according to the network address in the application information of the sub-application.

Description

Sub-application deployment method and device
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a sub-application deployment method and apparatus, an electronic device, and a computer-readable storage medium.
Background
When a network communication system is developed, because the functions of different modules are independent, when a certain functional module is upgraded, the normal use of other functional modules can be influenced, and the incremental upgrade of new functions can be influenced. In the current network communication, when a new application needs to be online, a main application code is often modified and a deployment address of a sub-application of the main application is told, so that the main application is redeployed and can only be deployed to a specified environment at one time, and each construction process is quite time-consuming; since different micro applications need to establish a long connection with a back-end master application for communication, which may greatly affect system performance, a solution is needed to solve such problems.
Disclosure of Invention
The invention aims to solve the problem that the existing application deployment mode is low in efficiency.
To solve the foregoing technical problem, an embodiment of the present invention provides a method for deploying a sub-application, including: deploying the sub-application to at least one designated server; maintaining application information of the sub-applications in a database, wherein the application information comprises network addresses of designated servers to which the sub-applications are deployed and attribute information of the sub-applications; when the main application receives an operation interface calling instruction, calling application information of the sub-application from a database corresponding to the main application, and rendering an operation interface of the main application according to attribute information in the called application information; and when receiving an operation instruction for the sub-application, calling the sub-application according to the network address in the application information of the sub-application.
In an embodiment of the invention, deploying the sub-application onto the at least one designated server comprises: compiling application code of the sub-application according to the network address of the at least one designated server; constructing a network engineering static file according to the application codes of the sub-applications; and modifying the access address in the network engineering static file according to the network address of the at least one designated server so as to deploy the sub-application to the at least one designated server.
In an embodiment of the present invention, constructing the network engineering static file according to the application code of the sub-application includes: pulling the application code of the sub-application to a computing node where the engineering compiling module is located; and constructing and outputting a network engineering static file at a computing node where the engineering compiling module is located according to the application codes of the sub-applications.
In the embodiment of the present invention, when the main application receives an operation interface call instruction, the invoking of the application information of the sub-application from the database includes: when the main application receives an operation interface calling instruction, sending a loading instruction for loading sub-application information to a background server; the background server reads the application information of the sub-application from the database; and the background server sends the application information to the main application.
In an embodiment of the invention, the method further comprises: when the background server has the service message to be fed back to the sub-application, the background server sends the service message to the main application; the main application distributes the service information to a network address in the application information of the sub-application included in the database; the sub-application feeds back the service information to the observation application; and adjusting the interface elements of the sub-applications by subscribing to the received service information of the viewing application.
In the embodiment of the invention, the background server sends the service message to the main application through long connection; and/or the main application distributes the service information to the network address in the application information of the sub-application included in the database through the hook function.
In an embodiment of the present invention, the attribute information of the sub-application includes name information of the sub-application.
An embodiment of the present invention further provides a sub-application deployment apparatus, including: a deployment module configured to deploy the sub-application to at least one designated server; the maintenance module is configured to maintain application information of the sub-application in a database, wherein the application information comprises a network address of a designated server to which the sub-application is deployed and attribute information of the sub-application; the rendering module is configured to call application information of the sub-application from a database corresponding to the main application when the main application receives an operation interface calling instruction, and render an operation interface of the main application according to attribute information in the called application information; and the calling module is configured to call the sub-application according to the network address in the application information of the sub-application when receiving the operation instruction for the sub-application.
In an embodiment of the invention, the deployment module comprises: a compiling unit configured to compile application codes of the sub-applications according to a network address of the at least one designated server; the construction unit is configured to construct a network engineering static file according to the application codes of the sub-applications; and the modifying unit is configured to modify the access address in the network engineering static file according to the network address of the at least one specified server so as to deploy the sub-application to the at least one specified server.
In an embodiment of the invention, the construction unit is further configured to: pulling the application code of the sub-application to a computing node where the engineering compiling module is located; and constructing and outputting a network engineering static file at a computing node where the engineering compiling module is located according to the application codes of the sub-applications.
In an embodiment of the invention, the calling module is further configured to: when the main application receives an operation interface calling instruction, sending a loading instruction for loading sub-application information to a background server; the background server reads the application information of the sub-application from the database; and the background server sends the application information to the main application.
In an embodiment of the present invention, the sub-application deployment apparatus further includes: the sending module is configured to send the service message to the main application when the background server has the service message to be fed back to the sub-application; a distribution module configured to distribute the service information to a network address in application information of the sub-application included in the database by the main application; the feedback module is configured to feed back the service information to the observation application by the sub-application; and a subscription update module configured to adjust the interface elements of the sub-applications by subscribing to the received service information of the observation application.
In the embodiment of the invention, the background server sends the service message to the main application through long connection; and/or the main application distributes the service information to the network address in the application information of the sub-application included in the database through the hook function.
In an embodiment of the present invention, the attribute information of the sub-application includes name information of the sub-application.
An embodiment of the present invention further provides an electronic device, including: a processor; a memory; and computer program instructions stored in the memory, which when executed by the processor, cause the processor to perform the sub-application deployment method as described above.
Embodiments of the present invention also provide a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform the sub-application deployment method as described above.
Embodiments of the present invention also provide a computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform the sub-application deployment method as described above.
The technical scheme of the invention has the following beneficial effects:
in the above scheme, by maintaining the application information of the sub-application in the database corresponding to the main application, the real-time rendering of the operation interface of the main application can be realized by calling the attribute information of the sub-application in real time, and meanwhile, as the network address of the designated server to which the sub-application is deployed is also maintained in the database, when the user wants to operate the sub-application, the network address can be called to directly realize the operation on the sub-application. More importantly, when a new sub-application associated with the main application is developed, the real-time updating of the operation interface of the main application can be realized by calling the attribute information of the newly developed sub-application in real time, and a user can also directly operate the newly developed sub-application, so that the quick deployment and upgrade of the sub-application are realized, and the normal use of other existing sub-applications is not influenced.
Drawings
Fig. 1 is a schematic flow chart of a sub-application deployment method according to the present invention.
Fig. 2 is a schematic flow chart of a process of calling application information of a sub-application in the sub-application deployment method according to the present invention.
Fig. 3 is a schematic diagram of an operation interface rendered in a sub-application deployment method according to the present invention.
FIG. 4 is a schematic diagram of an operation interface rendered in a sub-application deployment method according to the present invention.
Fig. 5 is a schematic flow chart illustrating a process of deploying a sub-application to a specific server according to the sub-application deployment method of the present invention.
FIG. 6 is a schematic diagram of a seed application deployment method of the present invention.
Fig. 7 is a flowchart illustrating updating a browser page at a user end in a sub-application deployment method according to the present invention.
Fig. 8 is a schematic diagram illustrating a principle of updating a browser page at a user side in the sub-application deployment method according to the present invention.
Fig. 9 is a schematic structural diagram of a sub-application deployment apparatus according to the present invention.
Fig. 10 is a schematic structural diagram of a sub-application deployment apparatus according to the present invention.
Fig. 11 is a schematic structural diagram of an electronic device according to the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments.
The invention provides a sub-application deployment method, a sub-application deployment device, electronic equipment and a computer-readable storage medium, aiming at the problem that the existing application deployment mode is low in efficiency.
Exemplary sub-application deployment method
Fig. 1 is a schematic flow chart of a sub-application deployment method according to the present invention. As shown in fig. 1, the sub-application deployment method of the embodiment of the present invention includes the following steps.
101, deploying the sub-application to at least one designated server.
The sub-application is an application program which cannot independently run and needs to run depending on the main application. For example, the micro application of the wechat platform can be regarded as a sub application, which is generally applied to a mobile terminal, the corresponding main application is the wechat, the micro application needs to run depending on the wechat, and a user needs to call the micro application on an operation interface of the wechat to meet various requirements. The sub-applications also need to be deployed to a specified server to run using computing resources and/or storage resources on the specified server.
It should be understood that, depending on the application scenario, a sub-application may be deployed on one or more designated servers, and that this deployment is actually a server cluster deployment when the same sub-application is deployed on multiple designated servers. However, the number of designated servers to which the sub-application is deployed is not strictly limited by the present invention.
And 102, maintaining application information of the sub-application in a database, wherein the application information comprises a network address of a specified server to which the sub-application is deployed and attribute information of the sub-application.
When the sub-application is deployed on at least one designated server, the application information of the sub-application may include a network address of the designated server to which the sub-application is deployed and attribute information of the sub-application. The network address of the designated server is used for finding the network address to which the sub-application is actually deployed in the subsequent process of running in cooperation with the main application. The attribute information is used for rendering the attribute information related to the sub-application on the operation interface of the main application (for example, the name information of the sub-application is presented through an icon, a menu option and the like) when the main application renders the operation interface, so that a user can operate the sub-application.
103, when the main application receives the operation interface calling instruction, calling the application information of the sub-application from the database corresponding to the main application, and rendering the operation interface of the main application according to the attribute information in the called application information.
When the operation interface of the main application is called by the user, the user needs to operate the sub-application associated with the main application, at this time, the application information of the sub-application can be called from the database corresponding to the main application, and the operation interface of the main application is rendered according to the attribute information in the called application information.
In an embodiment of the present invention, as shown in fig. 2, the process of calling the application information of the sub-application may be implemented by a background server. Specifically, when the main application receives an operation interface calling instruction, a loading instruction for loading sub-application information is sent to the background server, the background server reads the application information of the sub-application from the database, and then the background server sends the application information to the main application.
For example, the host application is actually a user management system, and the host application is deployed on 10.154.192.111 servers; and correspondingly, the two sub-applications are distributed into an organization management module and a department management module, wherein the organization management module is deployed at 10.154.192.112, and the department management module is deployed at 10.154.192.113. The application information of both sub-applications is maintained in the corresponding database of the user management system. When the user accesses http://10.154.192.111/usermanage, it is equivalent to issue an operation interface call instruction, at this time, the request menu interface will obtain two menu data, and render the operation interface including the organization management module and the department management module, as shown in fig. 3.
When a new sub-application is developed, the real-time rendering of the new sub-application can be realized through step 103. For example, when a new sub-application is developed: the sub-application is deployed 10.154.192.114 at the personnel management module. Then, the application information (sub-application name, network address corresponding to the designated server, etc.) of the staff management module is configured into the database, and then when the user sends an operation interface call instruction, the menu push task is triggered, the staff management module pushes the menu push task to the browser at the user side, and at this time, "staff management" is automatically displayed in the browser, as shown in fig. 4.
104, when receiving the operation instruction for the sub-application, calling the sub-application according to the network address in the application information of the sub-application.
Because the information of the sub-application is rendered on the operation interface of the main application in real time, when the user needs to operate the sub-application, the sub-application can be called according to the network address in the application information of the sub-application so as to complete the function corresponding to the sub-application. For example, as shown in fig. 4, when the user clicks "person management", an interface for person management is automatically rendered according to the network address of the designated server corresponding to the person management module, so that the user can further operate on the sub-application.
Therefore, according to the sub-application deployment method provided by the embodiment of the invention, the application information of the sub-application is maintained in the database corresponding to the main application, the real-time rendering of the operation interface of the main application can be realized by calling the attribute information of the sub-application in real time, and meanwhile, as the network address of the designated server to which the sub-application is deployed is also maintained in the database, when a user wants to operate the sub-application, the network address can be called to directly realize the operation on the sub-application. More importantly, when a new sub-application associated with the main application is developed, the real-time updating of the operation interface of the main application can be realized by calling the attribute information of the newly developed sub-application in real time, and a user can also directly operate the newly developed sub-application, so that the quick deployment and upgrade of the sub-application are realized, and the normal use of other existing sub-applications is not influenced.
Fig. 5 is a schematic flow chart of a sub-application deployment method of the present invention, in which a sub-application is deployed to a designated server, and fig. 6 is a schematic diagram of a principle of a sub-application deployment method of the present invention. As shown in fig. 5 and 6, the process of deploying the sub-application to at least one designated server may specifically include the following steps.
The application code of the sub-application is compiled 501 from the network address of at least one designated server.
In an actual application scenario, there may be multiple user groups, the same set of system (including the deployed main application and the corresponding sub-application) is deployed on multiple specified servers (each server corresponds to one user group), when a new sub-application is developed and needs to be deployed online, the multiple specified servers need to be deployed simultaneously, and firstly, the application code of the sub-application needs to be compiled.
And 502, constructing a network engineering static file according to the application codes of the sub-applications.
After the application codes of the sub-applications are compiled, a network engineering static file needs to be constructed to be deployed to a server to run. Specifically, the application code of the sub-application may be pulled to the computing node where the engineering compiling module is located, and then the network engineering static file may be constructed and output according to the application code of the sub-application at the computing node where the engineering compiling module is located. For example, the git command can be executed through jenkins, the application codes of the sub-applications are pulled to the terminal where the jenkins are located, and then the jenkins construct the application codes of the sub-applications into a network engineering static file which can be deployed and run.
And 503, modifying the access address in the static file of the network engineering according to the network address of the at least one specified server so as to deploy the sub-application to the at least one specified server.
Specifically, the network address of the designated server of the deployment environment needs to be specified during compiling, so the compiled network engineering static file can be deployed to only one designated server, and the access address in the network engineering static file needs to be modified after the constructed network engineering static file is placed on the server. For example, the constructed project can be pulled to a specified server through the infrastructure, and then the main page file is modified through the infrastructure, and the internal reference script address is modified. Static files are built by Jenkins, corresponding deployment tasks are created for different environments by using the infrastructure, and the access addresses of the compiled files are dynamically modified before deployment, so that the consistency of codes of different environments can be ensured.
Fig. 7 is a schematic flowchart of updating a browser page at a user end in a sub-application deployment method according to the present invention, and fig. 8 is a schematic diagram of updating a browser page at a user end in a sub-application deployment method according to the present invention. As shown in fig. 7 and 8, the process of updating the browser page at the user end may include the following steps.
701, when the background server has a service message to be fed back to the sub-application, the background server sends the service message to the main application.
In embodiments of the invention, the backend server may send the service message to the primary application over the long connection. The long connection can ensure that the communication connection between the background server and the main application is not interrupted, and the background server can transmit the new message to the main application in real time when the background server has the new message.
The master application distributes the service information to the network address in the application information of the sub-application included in the database 702.
As shown in fig. 8, the main application may distribute service information to a network address in application information of a sub-application included in the database through a hook function.
703, the sub-application feeds back the service information to the observation application.
The interface elements of the sub-applications are adjusted by subscribing to the received service information of the viewing application 704.
Therefore, the long connection is established through the main application, the observation application is established through the sub-applications, the interface elements of the sub-applications can update the interface elements through the subscription observation application, the long connection with the background server does not need to be repeatedly established for each sub-application, the main application receives the message and then distributes the message to the sub-applications, each sub-interface of each sub-application can be adjusted according to the background data in real time, and the whole communication framework is simpler and has higher efficiency.
Exemplary sub-application deployment apparatus
Fig. 9 is a schematic structural diagram of a sub-application deployment apparatus according to the present invention. As shown in fig. 9, the sub-application deployment apparatus 90 includes:
a deployment module 901 configured to deploy the sub-application to at least one designated server;
a maintenance module 902 configured to maintain application information of the sub-application in a database, wherein the application information includes a network address of a designated server to which the sub-application is deployed and attribute information of the sub-application;
the rendering module 903 is configured to, when the primary application receives an operation interface calling instruction, call application information of the secondary application from a database corresponding to the primary application, and render an operation interface of the primary application according to attribute information in the called application information; and
and the calling module 904 is configured to call the sub-application according to the network address in the application information of the sub-application when receiving the operation instruction for the sub-application.
Therefore, according to the sub-application deployment device provided by the embodiment of the invention, the application information of the sub-application is maintained in the database corresponding to the main application, the real-time rendering of the operation interface of the main application can be realized by calling the attribute information of the sub-application in real time, and meanwhile, as the network address of the designated server to which the sub-application is deployed is also maintained in the database, when a user wants to operate the sub-application, the network address can be called to directly realize the operation on the sub-application. More importantly, when a new sub-application associated with the main application is developed, the real-time updating of the operation interface of the main application can be realized by calling the attribute information of the newly developed sub-application in real time, and a user can also directly operate the newly developed sub-application, so that the quick deployment and upgrade of the sub-application are realized, and the normal use of other existing sub-applications is not influenced.
In an embodiment of the present invention, as shown in fig. 10, the deployment module 901 includes:
a compiling unit 9011 configured to compile an application code of the sub-application according to a network address of the at least one specified server;
the building unit 9012 is configured to build a network engineering static file according to the application code of the sub-application; and
and the modifying unit 9013 is configured to modify the access address in the network engineering static file according to the network address of the at least one specified server, so as to deploy the sub-application to the at least one specified server.
In an embodiment of the present invention, the constructing unit 9012 is further configured to: pulling the application code of the sub-application to a computing node where the engineering compiling module is located; and constructing and outputting a network engineering static file at a computing node where the engineering compiling module is located according to the application codes of the sub-applications.
In an embodiment of the invention, the invoking module 904 is further configured to: when the main application receives an operation interface calling instruction, sending a loading instruction for loading sub-application information to a background server; the background server reads the application information of the sub-application from the database; and the background server sends the application information to the main application.
In an embodiment of the present invention, as shown in fig. 10, the sub-application deployment apparatus 100 further includes:
a sending module 905, configured to send the service message to the main application by the background server when the background server has the service message to be fed back to the sub-application;
a distribution module 906 configured to distribute the service information to a network address in the application information of the sub-application included in the database by the main application;
a feedback module 907 configured to feed back the service information to the observation application by the sub-application; and
a subscription update module 908 configured to adjust interface elements of the sub-application by subscribing to the received service information of the observation application.
In the embodiment of the invention, the background server sends the service message to the main application through long connection; and/or the presence of a gas in the gas,
the main application distributes the service information to the network address in the application information of the sub-application included in the database through the hook function.
In an embodiment of the present invention, the attribute information of the sub-application includes name information of the sub-application.
The specific functions and operations of the respective modules in the sub-application deployment apparatus 90 have been described in detail in the sub-application deployment method described above with reference to fig. 1 to 8, and therefore, repeated descriptions thereof will be omitted here.
It should be noted that the sub-application deployment apparatus 90 according to the embodiment of the present invention may be integrated into the electronic device 100 as a software module and/or a hardware module, in other words, the electronic device 100 may include the sub-application deployment apparatus 90. For example, the sub-application deployment apparatus 90 may be a software module in the operating system of the electronic device 100, or may be an application program developed for it; of course, the sub-application deployment apparatus 90 can also be one of many hardware modules of the electronic device 100.
In another embodiment of the present invention, the sub-application deployment apparatus 90 and the electronic device 100 may also be separate devices (e.g., servers), and the sub-application deployment apparatus 90 may be connected to the electronic device 100 through a wired and/or wireless network and transmit the interaction information according to an agreed data format.
Exemplary electronic device
Fig. 11 is a schematic structural diagram of an electronic device according to the present invention. As shown in fig. 11, the electronic apparatus 100 includes: one or more processors 1001 and memory 1002; and computer program instructions stored in the memory 1002 which, when executed by the processor 1001, cause the processor 1001 to perform a sub-application deployment method as in any of the embodiments described above.
The processor 1001 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
Memory 1002 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory can include, for example, Random Access Memory (RAM), cache memory (or the like). The non-volatile memory may include, for example, Read Only Memory (ROM), a hard disk, flash memory, and the like. One or more computer program instructions may be stored on a computer readable storage medium and executed by the processor 1001 to implement the steps of the sub-application deployment method of the various embodiments of the present invention described above and/or other desired functions. Information such as light intensity, compensation light intensity, position of the filter, etc. may also be stored in the computer readable storage medium.
In one example, the electronic device 100 may further include: an input device 1003 and an output device 1004, which are interconnected by a bus system and/or other form of connection mechanism (not shown in fig. 11).
For example, when the electronic device is a robot in an industrial production line, the input device 1003 may be a camera for capturing the position of the part to be processed. When the electronic device is a stand-alone device, the input device 1003 may be a communication network connector for receiving the collected input signal from an external mobile device. The input device 1003 may include, for example, a keyboard, a mouse, a microphone, and the like.
The output device 1004 may output various information to the outside, and may include, for example, a display, a speaker, a printer, and a communication network and a remote output apparatus connected thereto.
Of course, for the sake of simplicity, only some of the components of the electronic apparatus 100 related to the present invention are shown in fig. 11, and components such as a bus, an input device/output interface, and the like are omitted. In addition, electronic device 100 may include any other suitable components depending on the particular application.
Exemplary computer program product and computer-readable storage Medium
In addition to the above-described methods and apparatus, embodiments of the present invention may also be a computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform the steps of the sub-application deployment method of any of the above-described embodiments.
The computer program product may write program code for carrying out operations for embodiments of the present invention in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present invention may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform the steps in the sub-application deployment method according to various embodiments of the present invention described in the "exemplary sub-application deployment method" section above in this specification.
A computer-readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory ((RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The basic principles of the present invention have been described above with reference to specific embodiments, but it should be noted that the advantages, effects, etc. mentioned in the present invention are only examples and are not limiting, and the advantages, effects, etc. must not be considered to be possessed by various embodiments of the present invention. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the invention is not limited to the specific details described above.
The block diagrams of devices, apparatuses, systems involved in the present invention are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
It should also be noted that in the apparatus, devices and methods of the present invention, the components or steps may be broken down and/or re-combined. These decompositions and/or recombinations are to be regarded as equivalents of the present invention.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the invention. Thus, the present invention is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, the description is not intended to limit embodiments of the invention to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (6)

1. A method for deploying a sub-application, comprising:
deploying the sub-application to at least one designated server; the sub-application is an application program which cannot independently run and needs to run depending on the main application;
maintaining application information of the sub-application in a database, wherein the application information includes a network address of the designated server to which the sub-application is deployed and attribute information of the sub-application; when the main application renders the operation interface, the attribute information is used for rendering the attribute information related to the sub-application on the operation interface of the main application;
when a main application receives an operation interface calling instruction, calling the application information of the sub-application from the database corresponding to the main application, and rendering an operation interface of the main application according to the attribute information in the called application information; and
when an operation instruction for the sub-application is received, calling the sub-application according to the network address in the application information of the sub-application;
when the main application receives an operation interface calling instruction, the calling the application information of the sub-application from the database comprises:
when the main application receives an operation interface calling instruction, sending a loading instruction for loading sub-application information to a background server; and
the background server reads the application information of the sub-application from the database; and
the background server sends the application information to the main application;
wherein the deploying the sub-application to the at least one designated server comprises:
compiling application codes of the sub-applications according to the network address of the at least one designated server;
constructing a network engineering static file according to the application codes of the sub-applications; and
modifying the access address in the network engineering static file according to the network address of the at least one designated server so as to deploy the sub-application to the at least one designated server;
wherein the constructing of the network engineering static file according to the application code of the sub-application comprises:
pulling the application code of the sub-application to a computing node where an engineering compiling module is located; and
at a computing node where the engineering compiling module is located, constructing and outputting the network engineering static file according to the application codes of the sub-applications;
wherein, further include:
when the background server has a service message to be fed back to the sub-application, the background server sends the service message to the main application;
the master application distributing the service information to the network address in the application information of the sub-application included in the database;
the sub-application feeds the service information back to the observation application; and
adjusting interface elements of a sub-application by subscribing to the received service information of the viewing application.
2. The method of claim 1, wherein the backend server sends the service message to the primary application over a long connection; and/or the presence of a gas in the gas,
the main application distributes the service information to the network address in the application information of the sub-application included in the database through a hook function.
3. The method according to claim 1, wherein the attribute information of the sub-application includes name information of the sub-application.
4. A sub-application deployment apparatus, comprising:
a deployment module configured to deploy the sub-application to at least one designated server; the sub-application is an application program which cannot independently run and needs to run depending on the main application;
a maintenance module configured to maintain application information of the sub-application in a database, wherein the application information includes a network address of the designated server to which the sub-application is deployed and attribute information of the sub-application; when the main application renders the operation interface, the attribute information is used for rendering the attribute information related to the sub-application on the operation interface of the main application;
the rendering module is configured to retrieve the application information of the sub-application from the database corresponding to the main application when the main application receives an operation interface calling instruction, and render an operation interface of the main application according to the attribute information in the retrieved application information; and
the calling module is configured to call the sub-application according to the network address in the application information of the sub-application when an operation instruction for the sub-application is received;
wherein the calling module is further configured to:
when the main application receives an operation interface calling instruction, sending a loading instruction for loading sub-application information to a background server; and
the background server reads the application information of the sub-application from the database; and
the background server sends the application information to the main application;
wherein, the deployment module includes: a compiling unit configured to compile application codes of the sub-applications according to a network address of the at least one designated server; the construction unit is configured to construct a network engineering static file according to the application codes of the sub-applications; the modification unit is configured to modify the access address in the network engineering static file according to the network address of the at least one designated server so as to deploy the sub-application to the at least one designated server;
wherein the construction unit is further configured to: pulling the application code of the sub-application to a computing node where the engineering compiling module is located; constructing and outputting a network engineering static file according to the application code of the sub-application at the computing node where the engineering compiling module is located;
wherein, the sub-application deployment device further comprises: the sending module is configured to send the service message to the main application when the background server has the service message to be fed back to the sub-application; a distribution module configured to distribute the service information to a network address in application information of the sub-application included in the database by the main application; the feedback module is configured to feed back the service information to the observation application by the sub-application; and a subscription update module configured to adjust the interface elements of the sub-applications by subscribing to the received service information of the observation application.
5. A computer-readable storage medium storing a computer program for executing the sub-application deployment method of any one of claims 1 to 3.
6. An electronic device, the electronic device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor configured to perform the sub-application deployment method of any one of the preceding claims 1 to 3.
CN202110199214.6A 2021-02-23 2021-02-23 Sub-application deployment method and device Active CN112558985B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110199214.6A CN112558985B (en) 2021-02-23 2021-02-23 Sub-application deployment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110199214.6A CN112558985B (en) 2021-02-23 2021-02-23 Sub-application deployment method and device

Publications (2)

Publication Number Publication Date
CN112558985A CN112558985A (en) 2021-03-26
CN112558985B true CN112558985B (en) 2021-08-27

Family

ID=75034554

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110199214.6A Active CN112558985B (en) 2021-02-23 2021-02-23 Sub-application deployment method and device

Country Status (1)

Country Link
CN (1) CN112558985B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008021333A2 (en) * 2006-08-11 2008-02-21 Fox Interactive Media Labs System and method for placing a widget onto a desktop
CN102073507A (en) * 2009-11-20 2011-05-25 华为技术有限公司 Method, device and system for calling widget
CN104035804A (en) * 2014-06-26 2014-09-10 北京中电普华信息技术有限公司 Application integrating method and application integrating device
CN111008019A (en) * 2019-12-06 2020-04-14 北京百度网讯科技有限公司 Web running method, device, equipment and medium of small program
CN111142884A (en) * 2019-12-12 2020-05-12 北京达佳互联信息技术有限公司 Applet version deployment method and device, electronic equipment and storage medium
CN111176752A (en) * 2019-12-20 2020-05-19 汪佐怀 Method and device for embedding window applet in browser page
CN111478956A (en) * 2020-04-01 2020-07-31 百度在线网络技术(北京)有限公司 Deployment and preview method and device of small program package

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008021333A2 (en) * 2006-08-11 2008-02-21 Fox Interactive Media Labs System and method for placing a widget onto a desktop
CN102073507A (en) * 2009-11-20 2011-05-25 华为技术有限公司 Method, device and system for calling widget
CN104035804A (en) * 2014-06-26 2014-09-10 北京中电普华信息技术有限公司 Application integrating method and application integrating device
CN111008019A (en) * 2019-12-06 2020-04-14 北京百度网讯科技有限公司 Web running method, device, equipment and medium of small program
CN111142884A (en) * 2019-12-12 2020-05-12 北京达佳互联信息技术有限公司 Applet version deployment method and device, electronic equipment and storage medium
CN111176752A (en) * 2019-12-20 2020-05-19 汪佐怀 Method and device for embedding window applet in browser page
CN111478956A (en) * 2020-04-01 2020-07-31 百度在线网络技术(北京)有限公司 Deployment and preview method and device of small program package

Also Published As

Publication number Publication date
CN112558985A (en) 2021-03-26

Similar Documents

Publication Publication Date Title
CN108205442B (en) Edge computing platform
CN110851253B (en) Remote operation and maintenance method, system, storage medium and electronic equipment
US10404568B2 (en) Agent manager for distributed transaction monitoring system
CN103092599A (en) Software develop kit
US20140282478A1 (en) Tcp server bootloader
CN112433788A (en) Applet running method and device, electronic equipment and storage medium
JP2023027042A (en) Business data processing method, device, electronic apparatus, storage medium, and computer program
CN112068847B (en) Computing environment deployment method and device based on kubernets platform
CN112564989A (en) Application deployment method and device
CN113821352A (en) Remote service calling method and device
CN111831461A (en) Method and device for processing business process
WO2023116425A1 (en) Wireless mesh network upgrade method and apparatus, and main node and storage medium
CN111694620A (en) Interaction method, device and equipment of third-party service and computer storage medium
CN113360160A (en) Method and device for deploying application, electronic equipment and storage medium
CN117112122A (en) Cluster deployment method and device
US10365873B2 (en) Information processing system, image forming apparatus, and information processing method
CN113094125B (en) Business process processing method, device, server and storage medium
CN112558985B (en) Sub-application deployment method and device
CN106095886B (en) Data processing method and device
CN114579206B (en) Method, device, equipment and medium for dynamically loading application program
CN113779122B (en) Method and device for exporting data
WO2021243665A1 (en) Compilation method, compilation apparatus, compilation system, storage medium, and electronic device
CN113326052A (en) Method and device for upgrading service component, computer equipment and storage medium
JP2023519774A (en) Automated test method, apparatus, electronic device, storage medium, and program
CN112579447A (en) Browser testing method and device

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