CN113468458A - WEB-based application running method - Google Patents

WEB-based application running method Download PDF

Info

Publication number
CN113468458A
CN113468458A CN202110831138.6A CN202110831138A CN113468458A CN 113468458 A CN113468458 A CN 113468458A CN 202110831138 A CN202110831138 A CN 202110831138A CN 113468458 A CN113468458 A CN 113468458A
Authority
CN
China
Prior art keywords
web
container
application
application container
web application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110831138.6A
Other languages
Chinese (zh)
Other versions
CN113468458B (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.)
Liaoning Sunflower Digital Technology Co ltd
Original Assignee
Liaoning Sunflower Education 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 Liaoning Sunflower Education Technology Co ltd filed Critical Liaoning Sunflower Education Technology Co ltd
Priority to CN202110831138.6A priority Critical patent/CN113468458B/en
Publication of CN113468458A publication Critical patent/CN113468458A/en
Application granted granted Critical
Publication of CN113468458B publication Critical patent/CN113468458B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to a WEB-based application running method, which comprises the following steps: the WEB service container is used as a running environment of WEB application to obtain a WEB application container, a WEB middleware is created according to the WEB application container, the application container engine which is pre-constructed is connected by using the WEB middleware, and when the WEB middleware is successfully connected with the application container engine, an operating system where the WEB application container is located is mirrored by using the application container engine to obtain a mirroring system; and binding the mirror image system and a bottom layer interface of the operating system, generating a WEB operating environment corresponding to the WEB application, starting the WEB application container by utilizing the WEB operating environment, and completing the operation of the WEB application. In addition, the application also provides a WEB-based application running device, electronic equipment and a computer readable storage medium. The method and the device can avoid the problem of resource waste caused by excessive consumption of hardware resources.

Description

WEB-based application running method
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and an apparatus for operating an application based on WEB, an electronic device, and a computer-readable storage medium.
Background
With the progress of science and technology, various WEB applications are developed endlessly, and the occupied system resources of the WEB applications are more and more, so that how to efficiently support the operation of the WEB applications is a technical problem which needs to be solved urgently at present.
At present, a mode of improving hardware capability, such as increasing a memory, increasing a CPU running hertz, and the like, is often used to support the problem that the WEB application occupies too many system resources, and although the mode can effectively support the WEB application running, too many hardware resources are consumed at the same time, which causes a problem of hardware resource waste.
Content of application
In order to solve the technical problems or at least partially solve the technical problems, the application provides a method, an apparatus, an electronic device and a computer-readable storage medium for running a WEB-based application, which can avoid the problem of hardware resource waste caused by excessive consumption of hardware resources.
In a first aspect, the present application provides a method for running an application based on WEB, where the method includes:
receiving a WEB operation instruction, addressing a corresponding WEB application according to the WEB operation instruction, and starting a pre-constructed WEB service container;
taking the WEB service container as the operation environment of the WEB application to obtain a WEB application container;
establishing a WEB middleware according to the WEB application container, and connecting a pre-constructed application container engine by using the WEB middleware;
when the WEB middleware is successfully connected with the application container engine, mirroring the operating system where the WEB application container is located by using the application container engine to obtain a mirroring system;
and binding the mirror image system and a bottom layer interface of the operating system, generating a WEB operating environment corresponding to the WEB application, starting the WEB application container by utilizing the WEB operating environment, and completing the operation of the WEB application.
It can be seen that, in the embodiment of the present application, an operating environment belonging to a WEB application is mainly constructed first, so as to obtain a WEB application container, but since the WEB application container and an operating system where the WEB application is located cannot perform information interaction, an application container engine pre-installed in the operating system and a WEB middleware are used as a bridge for information interaction, and a mirror system corresponding to the WEB application container is constructed at the same time, and a support is provided for the operation of the WEB application under the dual support of the mirror system and the operating system.
In a possible implementation manner of the first aspect, the creating a WEB middleware according to the WEB application container includes:
analyzing the programming language corresponding to the WEB application container to obtain an analysis language;
generating a test instruction according to the analysis language, and calling the application container engine to generate a language analysis container;
and testing the WEB application container by using the test instruction and the language analysis container, and if the test is passed, generating the WEB middleware according to the language analysis container.
In a possible implementation manner of the first aspect, the testing the WEB application container by using the test instruction and the language parsing container, and if the test is passed, generating the WEB middleware according to the language parsing container includes:
capturing the running state parameters of the WEB application container in real time;
taking the language analysis container as a carrier, and transmitting the running state parameters to the application container engine;
when the application container engine successfully receives the running state parameters, closing the WEB application container by using the test instruction within preset time, and judging whether the language analysis container can successfully release system resources of the WEB application container or not;
if the language analysis container can not release the system resources of the WEB application container, generating error reporting information to developers of the WEB application container;
and if the language analysis container can successfully release the system resources of the WEB application container, generating the WEB middleware by using the language analysis container.
In a possible implementation manner of the first aspect, the mirroring an operating system in which the WEB application container is located by using the application container engine to obtain a mirroring system includes:
acquiring system version information of an operating system in which the WEB application container is located;
generating mirror image system information by using the system version information and the application container engine;
and generating the mirror image system according to the mirror image system information and the mirror image instruction corresponding to the application container engine.
In a possible implementation manner of the first aspect, the generating, by using the system version information and the application container engine, mirrored system information includes:
performing a mirror marking and an ID marking on the system version information by using the application container engine;
indexing a version size of the system version information with the application container engine;
and generating the mirror image system information according to the version size and the marked system version information.
In a possible implementation manner of the first aspect, the building process of the pre-built WEB service container includes:
in the operating system, finding and obtaining the application container engine;
creating a namespace process using the application container engine;
and according to the operating system, the name space process is assigned to be referred to, and the WEB service container is obtained.
In a possible implementation manner of the first aspect, the assigning, according to the operating system, the namespace process to obtain the WEB service container includes:
according to the configuration file of the operating system, limiting the resource upper limit of the name space process in the operating system, and setting the priority of the name space process to obtain a resource space process;
and documenting the resource space process in the operating system to obtain the WEB service container.
In a second aspect, the present application provides a WEB-based application running apparatus, where the apparatus is applied to one master browser among multiple browsers, and includes:
the WEB service container starting module is used for receiving a WEB operation instruction, addressing the corresponding WEB application according to the WEB operation instruction and starting a pre-constructed WEB service container;
the WEB application container generating module is used for taking the WEB service container as the running environment of the WEB application to obtain a WEB application container;
the connection module is used for creating a WEB middleware according to the WEB application container and connecting a pre-constructed application container engine by using the WEB middleware;
and the WEB application running module is used for mirroring the operating system where the WEB application container is located by using the application container engine to obtain a mirroring system when the WEB middleware is successfully connected with the application container engine, binding the mirroring system and a bottom layer interface of the operating system, generating a WEB operating environment corresponding to the WEB application, and starting the WEB application container by using the WEB operating environment to finish the running of the WEB application.
In a third aspect, the present application provides an electronic device, comprising:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores computer programs executable by the at least one processor to enable the at least one processor to perform the WEB-based application execution method according to any of the first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the WEB-based application execution method according to any one of the first aspects.
It is understood that the beneficial effects of the second to fourth aspects can be seen from the description of the first aspect, and are not described herein again.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a detailed flowchart of a WEB-based application running method according to an embodiment of the present application;
fig. 2 is a schematic flowchart illustrating a step of the method for operating a WEB-based application provided in fig. 1 according to an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating another step of the method for operating a WEB-based application provided in fig. 1 according to an embodiment of the present application;
FIG. 4 is a detailed flowchart illustrating another step of the method for operating a WEB-based application provided in FIG. 1 according to an embodiment of the present application;
fig. 5 is a schematic block diagram of an application execution apparatus based on WEB according to an embodiment of the present application;
fig. 6 is a schematic internal structural diagram of an electronic device for implementing a WEB-based application running method according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
A method for running a WEB-based application according to an embodiment of the present application is described with reference to a flowchart shown in fig. 1. The method comprises the following steps:
and S1, receiving a WEB operation instruction, addressing the corresponding WEB application according to the WEB operation instruction, and starting a pre-constructed WEB service container.
In the embodiment of the application, the WEB operation instruction includes a pre-constructed graphical display button, a programming character instruction and the like, if a user wants to start a WEB application constructed based on the WEB, the user includes WEB applications such as a browser and an APP, and then directly clicks the graphical display button of the browser and the APP, so that the WEB operation instruction can be automatically generated and addressed to the WEB application corresponding to the WEB operation instruction.
Further, after the WEB operation instruction is generated, in order to ensure the security of the user using the WEB application, the WEB application is not directly started according to the operating system where the WEB application is located, but the pre-constructed WEB service container is started first. The WEB service container is constructed based on an application container engine and is a process capable of realizing independent constraint and independent modification.
In an embodiment of the present invention, referring to fig. 2, the constructing of the pre-constructed WEB service container includes:
s11, finding an application container engine in an operating system where the WEB application is located;
s12, creating a namespace process by utilizing the application container engine;
and S13, according to the operating system, assigning reference to the namespace process to obtain the WEB service container.
In the embodiment of the invention, the operating system comprises a Windows system, a Linux system and the like. The application container engine may use Docker, which is an application container engine developed based on Go language and apache2.0 protocol.
The operating system where the browser to be started is located is a Linux system, and after a Docker is installed in the Linux system, an instruction is created through a namespace of the Docker: and creating the namespace process by using the 'docker run-it busybox/bin/sh'.
Further, because the basic configuration of the operating environment of the WEB service container needs to be the same as the operating system where the WEB application is located to ensure the normal operation of the WEB application, the assigning reference to the namespace process according to the operating system to obtain the WEB service container includes:
according to the configuration file of the operating system, limiting the resource upper limit of the name space process in the operating system, and setting the priority of the name space process to obtain a resource space process;
and documenting the resource space process in the operating system to obtain the WEB service container.
For example, in the Linux operating system, the upper limit of the resources that can be used by the namespace process is limited to include a CPU, a memory, a disk, a network bandwidth, and the like, and for the convenience of user operation, the resource space process needs to be exposed, that is, the WEB service container exists in the Linux operating system in a file and directory manner.
Further, the starting of the pre-built WEB services container includes:
searching a file path where the WEB service container is located;
in the file path, a database to be mounted by the WEB service container and a configuration file of the WEB service container are specified;
and starting the WEB service container according to the database and the configuration file of the WEB service container.
If the file path of the WEB service container is/bin/sh, the database corresponding to the WEB service container is mounted in the/bin/sh by using a database mounting instruction of a Docker, a configuration file is extracted from the Docker, and the WEB service container can be started through the configuration file and the mounted database.
And S2, taking the WEB service container as the operation environment of the WEB application to obtain a WEB application container.
In the embodiment of the present invention, two WEB service containers are created at the same time, which are a first WEB service container and a second WEB service container, respectively, and the first WEB service container is used as the operating environment of the browser, and the second WEB service container is used as the operating environment of the APP, so that a browser application container and an APP application container can be obtained, respectively.
Furthermore, the WEB application containers run independently, exist independently, do not interfere with each other, and depend on the same operating system, such as the browser application container and the APP application container, which work together without interfering with each other, but depend on the Linux operating system.
And S3, creating WEB middleware according to the WEB application container, and connecting a pre-constructed application container engine by using the WEB middleware.
Since the WEB application container is generally directly interfaced with the user, receives the user operation instruction, and returns a corresponding response result in response to the user operation instruction, it can be seen from the above that, since the WEB application container is constructed based on the application container engine and depends on the operating system, the application container engine and the operating system are required to cooperate with the WEB application container to complete the response of the user operation.
Therefore, in the embodiment of the present invention, a WEB middleware needs to be further created to assist information communication between a WEB application container and an application container engine and an operating system, and in detail, referring to fig. 3, the creating a WEB middleware according to the WEB application container includes:
s31, analyzing the programming language corresponding to the WEB application container to obtain an analysis language;
s32, generating a test instruction according to the analysis language, and calling the application container engine to generate a language analysis container;
and S33, testing the WEB application container by using the test instruction and the language analysis container, and if the test is passed, generating the WEB middleware according to the language analysis container.
Because there is an information transmission obstacle between the WEB applications in different programming languages and the operating system and the application container engine, for example, the browser is constructed based on the HTML language, the APP is constructed based on the JAVA language, and the operating system and the application container engine cannot be analyzed in real time, the WEB middleware is required to analyze information in different programming languages and transmit the information to the operating system and the application container engine.
In the embodiment of the invention, the application container engine such as Docker can generate corresponding language analysis containers such as HTML language analysis containers and JAVA language analysis containers according to different programming languages.
Furthermore, after the language analysis container is generated, it is necessary to perform a test function by using the language analysis container to check whether the language analysis container has the functions of information analysis and transmission.
In detail, the testing the WEB application container by using the test instruction and the language parsing container, and if the test is passed, generating the WEB middleware according to the language parsing container includes:
capturing the running state parameters of the WEB application container in real time;
taking the language analysis container as a carrier, and transmitting the running state parameters to the application container engine;
when the application container engine successfully receives the running state parameters, closing the WEB application container by using the test instruction within preset time, and judging whether the language analysis container can successfully release system resources of the WEB application container or not;
if the language analysis container can not release the system resources of the WEB application container, generating error reporting information to developers of the WEB application container;
and if the language analysis container can successfully release the system resources of the WEB application container, generating the WEB middleware by using the language analysis container.
In the embodiment of the invention, the application container engine is pre-installed in the operating system, so that whether the information communication between the application container engine and the WEB application container is wrong or not only needs to be tested, and when the information communication between the application container engine and the WEB application container is correct, the language analysis container is the WEB middleware.
It can be understood that, after the WEB middleware is utilized to test the executable information communication between the application container engine and the WEB application container, the WEB middleware and the application container engine can be naturally and smoothly connected.
And S4, when the WEB middleware is successfully connected with the application container engine, mirroring the operating system where the WEB application container is located by using the application container engine to obtain a mirroring system.
As can be seen from the above, the WEB application container is only a WEB service container created by the application container engine, and supports the WEB application to perform data transmission, and thus the stability is poor, and therefore, a mirror system needs to be installed in the WEB application container, and the stability of the WEB application container is improved.
In detail, referring to fig. 4, the mirroring system obtained by mirroring the operating system where the WEB application container is located by using the application container engine includes:
s41, acquiring system version information of the operating system where the WEB application container is located;
s42, generating mirror image system information by using the system version information and the application container engine;
and S43, generating the mirror image system according to the mirror image system information and the mirror image instruction corresponding to the application container engine.
As described above, the operating system in which the WEB application container is located is the Linux operating system, and the corresponding system version information includes ubuntu, version number 12.04, and the like.
After obtaining the system version information, generating mirror image system information by using the system version information and the application container engine, including:
performing a mirror marking and an ID marking on the system version information by using the application container engine;
indexing a version size of the system version information with the application container engine;
and generating the mirror image system information according to the version size and the marked system version information.
Further, the mirror instruction corresponding to the application container engine is different according to the different types of the application container engines, for example, the mirror instruction of Docker includes: a sudo docker registry.
And S5, binding the mirror image system and the bottom layer interface of the operating system, generating a WEB operating environment corresponding to the WEB application, and starting the WEB application container by using the WEB operating environment to complete the operation of the WEB application.
In the embodiment of the present invention, if the operating system where the browser is located is a Linux operating system, the corresponding mirror system is also a Linux operating system, and the mirror system is bound to an underlying interface, such as a CPU, a video memory, and other interfaces, so that the mirror system can serve a WEB application, that is, the WEB operating environment is generated.
Furthermore, in the embodiment of the invention, the corresponding WEB application container can be started by utilizing the WEB operation environment, so that the support for WEB application operation is realized.
It can be seen that, in the embodiment of the present application, an operating environment belonging to a WEB application is mainly constructed first, so as to obtain a WEB application container, but since the WEB application container and an operating system where the WEB application is located cannot perform information interaction, an application container engine pre-installed in the operating system and a WEB middleware are used as a bridge for information interaction, and a mirror system corresponding to the WEB application container is constructed at the same time, and a support is provided for the operation of the WEB application under the dual support of the mirror system and the operating system.
Fig. 5 is a functional block diagram of the WEB-based application execution apparatus according to the present invention.
The WEB-based application execution apparatus 500 according to the present application may be installed in an electronic device. According to the realized functions, the WEB-based application execution device may include a WEB service container starting module 501, a WEB application container generating module 502, a connecting module 503, and a WEB application execution module 504. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the WEB service container starting module 101 is configured to receive a WEB operation instruction, address a corresponding WEB application according to the WEB operation instruction, and start a pre-constructed WEB service container;
the WEB application container generating module 102 is configured to use the WEB service container as an operating environment of the WEB application to obtain a WEB application container;
the connection module 103 is configured to create a WEB middleware according to the WEB application container, and connect a pre-constructed application container engine by using the WEB middleware;
the WEB application running module 104 is configured to, when the WEB middleware is successfully connected to the application container engine, mirror an operating system where the WEB application container is located by using the application container engine to obtain a mirror system, bind the mirror system and a bottom layer interface of the operating system, generate a WEB operating environment corresponding to the WEB application, and start the WEB application container by using the WEB operating environment to complete running of the WEB application.
In detail, when the modules in the WEB-based application running apparatus 500 in the embodiment of the present application are used, the same technical means as the WEB-based application running method described in fig. 1 and fig. 4 are used, and the same technical effect can be produced, and details are not described here again.
Fig. 6 is a schematic structural diagram of an electronic device for implementing the WEB-based application running method according to the present application.
The electronic device 6 may include a processor 60, a memory 61, a communication bus 62 and a communication interface 63, and may further include a computer program, such as a WEB-based application execution program, stored in the memory 61 and executable on the processor 60.
In some embodiments, the processor 60 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 60 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by executing or executing programs or modules (e.g., executing WEB-based application execution programs and the like) stored in the memory 61 and calling data stored in the memory 61.
The memory 61 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 61 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 61 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 61 may also include both an internal storage unit and an external storage device of the electronic device. The memory 61 may be used not only to store application software installed in the electronic device and various types of data, such as codes of WEB-based application execution programs, etc., but also to temporarily store data that has been output or is to be output.
The communication bus 62 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 61 and at least one processor 60 or the like.
The communication interface 63 is used for communication between the electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
Fig. 6 shows only an electronic device having components, and those skilled in the art will appreciate that the structure shown in fig. 6 does not constitute a limitation of the electronic device, and may include fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 60 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The WEB-based application run 62 stored in the memory 61 of the electronic device 6 is a combination of a plurality of computer programs, which when run in the processor 60, can implement:
receiving a WEB operation instruction, addressing a corresponding WEB application according to the WEB operation instruction, and starting a pre-constructed WEB service container;
taking the WEB service container as the operation environment of the WEB application to obtain a WEB application container;
establishing a WEB middleware according to the WEB application container, and connecting a pre-constructed application container engine by using the WEB middleware;
when the WEB middleware is successfully connected with the application container engine, the application container engine is used for mirroring the operating system where the WEB application container is located to obtain a mirroring system, the mirroring system and a bottom layer interface of the operating system are bound to generate a WEB operating environment corresponding to the WEB application, and the WEB application container is started by using the WEB operating environment to complete the operation of the WEB application.
Specifically, the processor 60 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the integrated modules/units of the electronic device 6, if implemented in the form of software functional units and sold or used as separate products, may be stored in a non-volatile computer-readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present application also provides a computer-readable storage medium, storing a computer program that, when executed by a processor of an electronic device, may implement:
receiving a WEB operation instruction, addressing a corresponding WEB application according to the WEB operation instruction, and starting a pre-constructed WEB service container;
taking the WEB service container as the operation environment of the WEB application to obtain a WEB application container;
establishing a WEB middleware according to the WEB application container, and connecting a pre-constructed application container engine by using the WEB middleware;
when the WEB middleware is successfully connected with the application container engine, mirroring the operating system where the WEB application container is located by using the application container engine to obtain a mirroring system;
and binding the mirror image system and a bottom layer interface of the operating system, generating a WEB operating environment corresponding to the WEB application, starting the WEB application container by utilizing the WEB operating environment, and completing the operation of the WEB application.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A WEB-based application running method is characterized by comprising the following steps:
receiving a WEB operation instruction, addressing a corresponding WEB application according to the WEB operation instruction, and starting a pre-constructed WEB service container;
taking the WEB service container as the operation environment of the WEB application to obtain a WEB application container;
establishing a WEB middleware according to the WEB application container, and connecting a pre-constructed application container engine by using the WEB middleware;
when the WEB middleware is successfully connected with the application container engine, mirroring the operating system where the WEB application container is located by using the application container engine to obtain a mirroring system;
and binding the mirror image system and a bottom layer interface of the operating system, generating a WEB operating environment corresponding to the WEB application, starting the WEB application container by utilizing the WEB operating environment, and completing the operation of the WEB application.
2. The WEB-based application execution method of claim 1, wherein the creating WEB middleware according to the WEB application container comprises:
analyzing the programming language corresponding to the WEB application container to obtain an analysis language;
generating a test instruction according to the analysis language, and calling the application container engine to generate a language analysis container;
and testing the WEB application container by using the test instruction and the language analysis container, and if the test is passed, generating the WEB middleware according to the language analysis container.
3. The WEB-based application operating method according to claim 2, wherein the testing the WEB application container by using the test instruction and the language parsing container, and if the test is passed, generating the WEB middleware according to the language parsing container includes:
capturing the running state parameters of the WEB application container in real time;
taking the language analysis container as a carrier, and transmitting the running state parameters to the application container engine;
when the application container engine successfully receives the running state parameters, closing the WEB application container by using the test instruction within preset time, and judging whether the language analysis container can successfully release system resources of the WEB application container or not;
if the language analysis container can not release the system resources of the WEB application container, generating error reporting information to developers of the WEB application container;
and if the language analysis container can successfully release the system resources of the WEB application container, generating the WEB middleware by using the language analysis container.
4. The WEB-based application execution method of claim 1, wherein the mirroring of the operating system where the WEB application container is located by using the application container engine to obtain a mirroring system comprises:
acquiring system version information of an operating system in which the WEB application container is located;
generating mirror image system information by using the system version information and the application container engine;
and generating the mirror image system according to the mirror image system information and the mirror image instruction corresponding to the application container engine.
5. The WEB-based application execution method of claim 4, wherein the generating mirrored system information using the system version information and the application container engine comprises:
performing a mirror marking and an ID marking on the system version information by using the application container engine;
indexing a version size of the system version information with the application container engine;
and generating the mirror image system information according to the version size and the marked system version information.
6. The WEB-based application execution method of any of claims 1 to 5, wherein the pre-built WEB service container building process comprises:
in the operating system, finding and obtaining the application container engine;
creating a namespace process using the application container engine;
and according to the operating system, the name space process is assigned to be referred to, and the WEB service container is obtained.
7. The WEB-based application execution method of claim 6, wherein the obtaining the WEB service container by referring to the namespace process according to the operating system comprises:
according to the configuration file of the operating system, limiting the resource upper limit of the name space process in the operating system, and setting the priority of the name space process to obtain a resource space process;
and documenting the resource space process in the operating system to obtain the WEB service container.
8. A WEB-based application execution apparatus, comprising:
the WEB service container starting module is used for receiving a WEB operation instruction, addressing the corresponding WEB application according to the WEB operation instruction and starting a pre-constructed WEB service container;
the WEB application container generating module is used for taking the WEB service container as the running environment of the WEB application to obtain a WEB application container;
the connection module is used for creating a WEB middleware according to the WEB application container and connecting a pre-constructed application container engine by using the WEB middleware;
and the WEB application running module is used for mirroring the operating system where the WEB application container is located by using the application container engine to obtain a mirroring system when the WEB middleware is successfully connected with the application container engine, binding the mirroring system and a bottom layer interface of the operating system, generating a WEB operating environment corresponding to the WEB application, and starting the WEB application container by using the WEB operating environment to finish the running of the WEB application.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform a WEB-based application execution method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the WEB-based application execution method according to any one of claims 1 to 7.
CN202110831138.6A 2021-07-22 2021-07-22 WEB-based application running method Active CN113468458B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110831138.6A CN113468458B (en) 2021-07-22 2021-07-22 WEB-based application running method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110831138.6A CN113468458B (en) 2021-07-22 2021-07-22 WEB-based application running method

Publications (2)

Publication Number Publication Date
CN113468458A true CN113468458A (en) 2021-10-01
CN113468458B CN113468458B (en) 2022-03-01

Family

ID=77881818

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110831138.6A Active CN113468458B (en) 2021-07-22 2021-07-22 WEB-based application running method

Country Status (1)

Country Link
CN (1) CN113468458B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114489850A (en) * 2022-01-20 2022-05-13 中广核工程有限公司 Calling method and device of design software, computer equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005083983A2 (en) * 2004-02-26 2005-09-09 Research In Motion Limited Apparatus and method for aggregating web services
CN107329800A (en) * 2017-06-29 2017-11-07 北京北信源软件股份有限公司 A kind of middleware application management-control method and device based on Docker platforms
CN108737548A (en) * 2018-05-24 2018-11-02 南京邮电大学 Distributed WEB micro services container aggregated structure system and its implementation
CN111352692A (en) * 2018-12-21 2020-06-30 中国科学院声学研究所 Method and system for realizing container mirror image by adopting web language
CN112272234A (en) * 2020-10-23 2021-01-26 杭州卷积云科技有限公司 Platform management system and method for realizing edge cloud collaborative intelligent service
CN112416512A (en) * 2020-11-03 2021-02-26 南京南瑞继保电气有限公司 Mirror image construction method, server, client, storage medium and system
CN112799778A (en) * 2020-12-31 2021-05-14 山东浪潮通软信息科技有限公司 Container application starting method, device and medium
US11029943B1 (en) * 2020-06-26 2021-06-08 Sap Se Processing framework for in-system programming in a containerized environment
CN113010206A (en) * 2021-02-26 2021-06-22 山东英信计算机技术有限公司 Containerization method, system and device for WEB application system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005083983A2 (en) * 2004-02-26 2005-09-09 Research In Motion Limited Apparatus and method for aggregating web services
CN107329800A (en) * 2017-06-29 2017-11-07 北京北信源软件股份有限公司 A kind of middleware application management-control method and device based on Docker platforms
CN108737548A (en) * 2018-05-24 2018-11-02 南京邮电大学 Distributed WEB micro services container aggregated structure system and its implementation
CN111352692A (en) * 2018-12-21 2020-06-30 中国科学院声学研究所 Method and system for realizing container mirror image by adopting web language
US11029943B1 (en) * 2020-06-26 2021-06-08 Sap Se Processing framework for in-system programming in a containerized environment
CN112272234A (en) * 2020-10-23 2021-01-26 杭州卷积云科技有限公司 Platform management system and method for realizing edge cloud collaborative intelligent service
CN112416512A (en) * 2020-11-03 2021-02-26 南京南瑞继保电气有限公司 Mirror image construction method, server, client, storage medium and system
CN112799778A (en) * 2020-12-31 2021-05-14 山东浪潮通软信息科技有限公司 Container application starting method, device and medium
CN113010206A (en) * 2021-02-26 2021-06-22 山东英信计算机技术有限公司 Containerization method, system and device for WEB application system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
PAWEŁ CZARNUL ET AL.: "BeesyBees – Efficient and Reliable Execution of Service-based Workflow Applications for BeesyCluster using Distributed Agents", 《PROCEEDINGS OF THE INTERNATIONAL MULTICONFERENCE ON COMPUTER SCIENCE AND INFORMATION TECHNOLOGY》 *
刘辉扬: "基于Docker的容器监控和调度的研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
谷瑞军: "基于Docker容器的轻量级大数据实验平台构建研究", 《金陵科技学院学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114489850A (en) * 2022-01-20 2022-05-13 中广核工程有限公司 Calling method and device of design software, computer equipment and storage medium
CN114489850B (en) * 2022-01-20 2023-08-22 中广核工程有限公司 Calling method and device of design software, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113468458B (en) 2022-03-01

Similar Documents

Publication Publication Date Title
CN108399072B (en) Application page updating method and device
US8285662B2 (en) Framework for delta analysis during automated builds
CN110955409B (en) Method and device for creating resources on cloud platform
CN113238929B (en) Code testing method and device based on Mock data, electronic equipment and storage medium
CN113419729A (en) Front-end page building method, device, equipment and storage medium based on modularization
CN113468458B (en) WEB-based application running method
CN112527664A (en) Method and device for generating test case, electronic equipment and storage medium
CN111641706A (en) Micro service system creating method and device, electronic equipment and storage medium
CN114006885A (en) Data acquisition method and device based on intelligent equipment and electronic equipment
CN108874384B (en) Terminal device, server, web page data processing method, and computer storage medium
CN114356530A (en) Task scheduling method and device, electronic equipment and storage medium
CN113360139A (en) Integration method and device of front-end frame, electronic equipment and storage medium
CN111158777B (en) Component calling method, device and computer readable storage medium
CN113360379A (en) Program testing method and program testing device
CN112579475A (en) Code testing method, device, equipment and readable storage medium
CN115080899A (en) Interactive sub-web page starting method, device, equipment and storage medium
CN111831277B (en) Virtual data generation method, system, device and computer readable storage medium
CN115174541A (en) H5 resource loading method and device, electronic equipment and storage medium
CN114020414A (en) Symbiotic method and device of Android system and bottom layer Linux, electronic equipment and storage medium
CN114461531A (en) Platform adaptability test method, device, equipment and storage medium of test case
CN113961191A (en) Method and device for automatically registering hierarchical code and storage medium
CN112947974B (en) Desktop icon updating method, device and equipment and computer readable storage medium
CN114676034B (en) Test method and device and computer equipment
CN114564413A (en) Synchronous equipment testing method and device
CN111290749B (en) Data processing method, intelligent terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211220

Address after: 261000 No. 1010, Taihua business building, 360 Dongfeng East Street, Kuiwen District, Weifang City, Shandong Province

Applicant after: Weifang Anxin Intelligent Technology Co.,Ltd.

Applicant after: LIAONING SUNFLOWER EDUCATION TECHNOLOGY Co.,Ltd.

Address before: Room c418, 860-1, shangshengou village, Dongling District, Shenyang City, Liaoning Province, 110000

Applicant before: LIAONING SUNFLOWER EDUCATION TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220129

Address after: Room c418, 860-1, shangshengou village, Dongling District, Shenyang City, Liaoning Province, 110000

Applicant after: LIAONING SUNFLOWER EDUCATION TECHNOLOGY Co.,Ltd.

Address before: 261000 No. 1010, Taihua business building, 360 Dongfeng East Street, Kuiwen District, Weifang City, Shandong Province

Applicant before: Weifang Anxin Intelligent Technology Co.,Ltd.

Applicant before: LIAONING SUNFLOWER EDUCATION TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A WEB-based application running method

Effective date of registration: 20220817

Granted publication date: 20220301

Pledgee: Shenyang Science and Technology Venture Capital Co.,Ltd.

Pledgor: LIAONING SUNFLOWER EDUCATION TECHNOLOGY Co.,Ltd.

Registration number: Y2022210000115

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230203

Granted publication date: 20220301

Pledgee: Shenyang Science and Technology Venture Capital Co.,Ltd.

Pledgor: LIAONING SUNFLOWER EDUCATION TECHNOLOGY Co.,Ltd.

Registration number: Y2022210000115

PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A WEB based application running method

Effective date of registration: 20230315

Granted publication date: 20220301

Pledgee: Bank of China Limited Shenyang Zhongshan Sub-branch

Pledgor: LIAONING SUNFLOWER EDUCATION TECHNOLOGY Co.,Ltd.

Registration number: Y2023210000038

PE01 Entry into force of the registration of the contract for pledge of patent right
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: No. 868-3, Shangshengou Village, Hunnan District, Shenyang City, Liaoning Province, 110000 (101, 201)

Patentee after: Liaoning Sunflower Digital Technology Co.,Ltd.

Address before: Room c418, 860-1, shangshengou village, Dongling District, Shenyang City, Liaoning Province, 110000

Patentee before: LIAONING SUNFLOWER EDUCATION TECHNOLOGY Co.,Ltd.

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Granted publication date: 20220301

Pledgee: Bank of China Limited Shenyang Zhongshan Sub-branch

Pledgor: Liaoning Sunflower Digital Technology Co.,Ltd.

Registration number: Y2023210000038

PM01 Change of the registration of the contract for pledge of patent right
PM01 Change of the registration of the contract for pledge of patent right

Change date: 20240122

Registration number: Y2023210000038

Pledgor after: Liaoning Sunflower Digital Technology Co.,Ltd.

Pledgor before: LIAONING SUNFLOWER EDUCATION TECHNOLOGY Co.,Ltd.

PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A web-based application running method

Granted publication date: 20220301

Pledgee: Bank of China Limited Shenyang Zhongshan Sub-branch

Pledgor: Liaoning Sunflower Digital Technology Co.,Ltd.

Registration number: Y2024210000008

PE01 Entry into force of the registration of the contract for pledge of patent right