CN111125007A - Application packaging method, device and readable storage medium - Google Patents

Application packaging method, device and readable storage medium Download PDF

Info

Publication number
CN111125007A
CN111125007A CN201911323655.1A CN201911323655A CN111125007A CN 111125007 A CN111125007 A CN 111125007A CN 201911323655 A CN201911323655 A CN 201911323655A CN 111125007 A CN111125007 A CN 111125007A
Authority
CN
China
Prior art keywords
file
virtual
file system
request
type
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
CN201911323655.1A
Other languages
Chinese (zh)
Other versions
CN111125007B (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.)
Peng Cheng Laboratory
Original Assignee
Peng Cheng Laboratory
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 Peng Cheng Laboratory filed Critical Peng Cheng Laboratory
Priority to CN201911323655.1A priority Critical patent/CN111125007B/en
Publication of CN111125007A publication Critical patent/CN111125007A/en
Application granted granted Critical
Publication of CN111125007B publication Critical patent/CN111125007B/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/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an application packaging method, equipment and a readable storage medium, wherein the application packaging method can provide a data storage directory unified with a universal file system for overtravel by establishing a virtual stack file system based on a universal file system service framework; the virtual stacking file system can forward the file access request as required by calling the virtual stacking system to perform corresponding operation according to different file access types, so that the target file can be accessed according to a conventional access mode; and uploading the access result of the file access request by the preset overtravel control module, so that when the process list of the virtual system environment where the overtravel is located is inquired, the returned result only contains the process information belonging to the corresponding overtravel. According to the invention, when the overtravel is started, the root file system is dynamically switched to the virtual stack system, and the file access requests of all processes in the overtravel are redirected to the virtual stack system, so that the system-level isolation of the files is realized.

Description

Application packaging method, device and readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an application encapsulation method, an application encapsulation device, and a readable storage medium.
Background
In a conventional operating system, an application is composed of a group of closely coupled, interdependent and cooperative programs, and each program is linked by a group of code libraries and is scheduled to run in units of processes. In a traditional operating system, a large number of code libraries which are shared are existed, so that once the code library upgrading brought by application upgrading improvement involves the shared libraries, the generated influence can spread to other applications on the whole dependency chain, and even other applications which depend on the shared libraries before upgrading cannot normally run, so that the application upgrading is difficult. Meanwhile, due to the limitation of the dynamic link technology, the communication between the code libraries is in a tight coupling mode, and the system support libraries are shared. Tightly coupled interprocess communication means that failure of one application can easily lead to failure of other applications running on the same system. Thereby causing the technical problem of too large an influence field caused by applying tight coupling.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide an application packaging method, aiming at solving the technical problem of overlarge influence domain caused by tight coupling of applications.
In order to achieve the above object, the present invention provides an application packaging method, which is applied to an application packaging device, and includes the following steps:
receiving a file access request for accessing a preset virtual stack file system, and judging the request type of the file access request, wherein the virtual stack file system stacks files in the overtravel and manages the files based on a virtual system environment and a general file system service framework;
calling the virtual stack file system to perform corresponding operation based on the request type, and acquiring a return result of the file access request;
and sending the return result to an upper-layer application based on a preset overtravel control module so as to redirect the file access operation of all processes in the overtravel to the virtual stack file system.
Optionally, the step of receiving a file access request for accessing a preset virtual stack file system includes:
receiving a file access request sent based on a preset aggregation directory view, wherein the preset aggregation directory view is a visual logic view corresponding to the virtual stack file system.
Optionally, before the step of receiving a file access request for accessing a preset virtual stack file system and determining a request type of the file access request, the method further includes:
and adding a virtual network card and a virtual network card bridge required by the virtual stack file system to provide network connection for over travel.
Optionally, the step of invoking the virtual stack file system to perform corresponding operations based on the request type, and obtaining a return result of the file access request includes:
when the request type is a file retrieval type, calling file retrieval operation records of the virtual stack file system layer by layer from back to front;
obtaining a return result of the file access request based on the file retrieval operation record to determine a target file;
and when the request type is an editing request type, calling the virtual stacking file system to perform corresponding operation on the target file determined based on the file retrieval request, and acquiring a return result of the file access request of the editing request type, wherein the editing request type comprises a file reading type, a file writing type and a file deleting type.
Optionally, the step of obtaining the returned result of the file access request based on the file retrieval operation record includes:
judging whether the target file exists in the virtual stack file system or not based on the file retrieval operation record;
if the target file exists in the virtual stack file system, taking the label information corresponding to the target file as the return result to determine the target file;
and if the target file does not exist in the virtual stack file system, generating state information without file existence as the return information.
Optionally, when the request type is an edit request type, the step of invoking the virtual stack file system to perform a corresponding operation on the target file determined based on the file retrieval request, and obtaining a return result of the file access request of the edit request type includes:
when the request type is the file writing type or the file deleting type, judging whether the target file exists in the last layer in the virtual stack file system;
if the target file exists in the last layer of the virtual stack file system, transmitting the file access request to the target file;
and calling the virtual stack file system to write or delete the target file and generating a corresponding return result.
Optionally, when the request type is an edit request type, the step of invoking the virtual stack file system to perform a corresponding operation on the target file determined based on the file retrieval request, and obtaining a return result of the file access request of the edit request type includes:
and when the request type is the file reading type, transmitting the file access request to the target file, and calling the virtual stack file system to execute reading operation on the target file.
Optionally, the step of invoking the virtual stack file system to perform corresponding operations based on the request type, and obtaining a return result of the file access request includes:
when the request type is a file traversal type, calling file traversal operation of the virtual stack file system layer by layer from back to front according to the stacking sequence of the virtual stack file system;
and aggregating the file traversal results of all layers based on the file deletion operation records of all layers, and taking the aggregated traversal results as the return results.
In addition, to achieve the above object, the present invention also provides an application packaging apparatus, including: the application packaging method comprises the following steps of a memory, a processor and an application packaging program which is stored on the memory and can run on the processor, wherein when the application packaging program is executed by the processor, the steps of the application packaging method are realized.
In addition, to achieve the above object, the present invention also provides a computer readable storage medium, on which an application wrapper program is stored, and the application wrapper program, when executed by a processor, implements the steps of the application wrapper method as described above.
The invention provides an application packaging method, application packaging equipment and a computer readable storage medium. The application packaging method comprises the steps of receiving a file access request for accessing a preset virtual stack file system and judging the request type of the file access request, wherein the virtual stack file system is managed after overlapping files in the overtravel based on a virtual system environment and a universal file system service framework; calling the virtual stack file system to perform corresponding operation based on the request type, and acquiring a return result of the file access request; and sending the return result to an upper-layer application based on a preset overtravel control module so as to redirect the file access operation of all processes in the overtravel to the virtual stack file system. Through the mode, the virtual stack file system is established based on the universal file system service framework, and a data storage directory unified with the universal file system can be provided for overtravel; the virtual stacking file system can forward the file access request as required by calling the virtual stacking system to perform corresponding operation according to different file access types, so that the target file can be accessed according to a conventional access mode; and uploading the access result of the file access request by the preset overtravel control module, so that when the process list of the virtual system environment where the overtravel is located is inquired, the returned result only contains the process information belonging to the corresponding overtravel. According to the invention, when the overtravel is started, the root file system is dynamically switched to the virtual stack system, and the file access requests of all processes in the overtravel are redirected to the virtual stack system, so that the system-level isolation of files is realized, and the technical problem of overlarge influence domain caused by tight coupling of applications is solved.
Drawings
FIG. 1 is a schematic diagram of an apparatus architecture of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of an application packaging method according to the present invention;
FIG. 3 is a schematic diagram of an aggregation directory oriented to an over-the-range package according to the encapsulation method of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a PC, and can also be a mobile terminal device with a display function, such as a smart phone, a tablet computer, an electronic book reader, an MP3(Moving Picture Experts Group Audio Layer III, dynamic video Experts compress standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, dynamic video Experts compress standard Audio Layer 3) player, a portable computer, and the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a memory device separate from the processor 1001 described above.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the mobile terminal is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of the mobile terminal; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an application wrapper.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to invoke an application wrapper program stored in the memory 1005 and perform the following operations:
receiving a file access request for accessing a preset virtual stack file system, and judging the request type of the file access request, wherein the virtual stack file system stacks files in the overtravel and manages the files based on a virtual system environment and a general file system service framework;
calling the virtual stack file system to perform corresponding operation based on the request type, and acquiring a return result of the file access request;
and sending the return result to an upper-layer application based on a preset overtravel control module so as to redirect the file access operation of all processes in the overtravel to the virtual stack file system.
Further, the processor 1001 may call the application wrapper program stored in the memory 1005, and also perform the following operations:
receiving a file access request sent based on a preset aggregation directory view, wherein the preset aggregation directory view is a visual logic view corresponding to the virtual stack file system.
Further, the processor 1001 may call the application wrapper program stored in the memory 1005, and also perform the following operations:
and adding a virtual network card and a virtual network card bridge required by the virtual stack file system to provide network connection for over travel.
Further, the processor 1001 may call the application wrapper program stored in the memory 1005, and also perform the following operations:
when the request type is a file retrieval type, calling file retrieval operation records of the virtual stack file system layer by layer from back to front;
obtaining a return result of the file access request based on the file retrieval operation record to determine a target file;
and when the request type is an editing request type, calling the virtual stacking file system to perform corresponding operation on the target file determined based on the file retrieval request, and acquiring a return result of the file access request of the editing request type, wherein the editing request type comprises a file reading type, a file writing type and a file deleting type.
Further, the processor 1001 may call the application wrapper program stored in the memory 1005, and also perform the following operations:
judging whether the target file exists in the virtual stack file system or not based on the file retrieval operation record;
if the target file exists in the virtual stack file system, taking the label information corresponding to the target file as the return result to determine the target file;
and if the target file does not exist in the virtual stack file system, generating state information without file existence as the return information.
Further, the processor 1001 may call the application wrapper program stored in the memory 1005, and also perform the following operations:
when the request type is the file writing type or the file deleting type, judging whether the target file exists in the last layer in the virtual stack file system;
if the target file exists in the last layer of the virtual stack file system, transmitting the file access request to the target file;
and calling the virtual stack file system to write or delete the target file and generating a corresponding return result.
Further, the processor 1001 may call the application wrapper program stored in the memory 1005, and also perform the following operations:
and when the request type is the file reading type, transmitting the file access request to the target file, and calling the virtual stack file system to execute reading operation on the target file.
Further, the processor 1001 may call the application wrapper program stored in the memory 1005, and also perform the following operations:
when the request type is a file traversal type, calling file traversal operation of the virtual stack file system layer by layer from back to front according to the stacking sequence of the virtual stack file system;
and aggregating the file traversal results of all layers based on the file deletion operation records of all layers, and taking the aggregated traversal results as the return results.
Based on the hardware structure, various embodiments of the application packaging method of the invention are provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of an application encapsulation method.
A first embodiment of the present invention provides an application packaging method, including the steps of:
in a conventional operating system, an application is composed of a group of closely coupled, interdependent and cooperative programs, and each program is linked by a group of code libraries and is scheduled to run in units of processes. In a traditional operating system, a large number of code libraries which are shared are existed, so that once the code library upgrading brought by application upgrading improvement involves the shared libraries, the generated influence can spread to other applications on the whole dependency chain, and even other applications which depend on the shared libraries before upgrading cannot normally run, so that the application upgrading is difficult. Meanwhile, due to the limitation of the dynamic link technology, the communication between the code libraries is in a tight coupling mode, and the system support libraries are shared. Tightly coupled interprocess communication means that failure of one application can easily lead to failure of other applications running on the same system. Thereby causing the technical problem of too large an influence field caused by applying tight coupling.
In this embodiment, to solve the above problems, the present invention provides an application encapsulation method, that is, a virtual stack file system is established based on a universal file system service framework, and a data storage directory unified with the universal file system can be provided for overrun; the virtual stacking file system can forward the file access request as required by calling the virtual stacking system to perform corresponding operation according to different file access types, so that the target file can be accessed according to a conventional access mode; and uploading the access result of the file access request by the preset overtravel control module, so that when the process list of the virtual system environment where the overtravel is located is inquired, the returned result only contains the process information belonging to the corresponding overtravel. According to the invention, when the overtravel is started, the root file system is dynamically switched to the virtual stack system, and the file access requests of all processes in the overtravel are redirected to the virtual stack system, so that the system-level isolation of files is realized, and the technical problem of overlarge influence domain caused by tight coupling of applications is solved. The application packaging method is applied to the terminal.
Step S10, receiving a file access request for accessing a preset virtual stack file system, and determining the request type of the file access request, wherein the virtual stack file system stacks files in the overtravel and manages the files based on a virtual system environment and a universal file system service framework;
in this embodiment, it should be noted that, in order to solve the problem of an excessively large impact domain caused by tight coupling of applications based on a conventional virtualization technology, generally, the applications are encapsulated in virtual machines, the applications are scheduled to run in the virtual machines by using the virtualization technology, and isolation between the virtual machines is used to implement isolation of the applications. However, the design goal of the conventional virtualization technology is to virtualize the whole hardware environment for the virtual machine, and multiple operating systems such as Windows, Mac OSX, and Linux can be supported in the virtual machine. In order to achieve good universality, the performance and resource overhead of the conventional virtualization technology are relatively high, so that the performance loss of applications running in the virtual machines is relatively high, and the number of the virtual machines which can be simultaneously run and supported by the system is limited. The invention provides an overtravel-based application encapsulation method in a virtual system environment, which considers that an application running on a customized operating system does not have the requirement of running other operating systems, and the main requirement is to realize the isolation of the application. The overtravel is a dynamic execution process of an application with a certain independent function on a resource set, is a minimum unit when an operating system schedules and runs the application, and consists of the application, a supporting library on which the application depends, and other necessary running environments and system resources.
The terminal can establish a virtual stack file system in a virtual system environment based on a general file system service framework to store data in the overtravel package in a layered mode. When a user sends a file access request for accessing a file in the overtravel currently, a virtual stack file system on the terminal receives the file access request and identifies the type of the file access request.
Step S20, calling the virtual stack file system to perform corresponding operation based on the request type, and obtaining the return result of the file access request;
the request type can be file traversal, file retrieval, file creation, file deletion, file reading, file writing and the like.
In this embodiment, according to the specific access type of the current file access request, the terminal invokes the virtual stack file system to perform a corresponding operation, and obtains a corresponding return result. In a specific embodiment, if the access type is file traversal, the file traversal operation of the file system is called layer by layer from back to front according to the corresponding stacking sequence in the virtual stack file system, the file deletion operation records of each layer are combined, the traversal results of each layer are aggregated, and the aggregated traversal result is used as the return result of the file access request. And if the access type of the current file access request is a file traversal type, the terminal calls the file retrieval operation of the file system layer by layer from back to front according to the corresponding stacking sequence in the virtual stacking file system. And the terminal further judges whether the target file exists in the virtual stack file system by judging whether the file name of the target file exists in the file retrieval record according to the file retrieval operation record called layer by layer. And if the target file exists in a certain layer of the virtual stack file system, taking the target file as a return result of the file retrieval operation. If the file deletion operation record of a certain layer in the virtual stack file system includes a deletion operation for the target file name, or the file name of the target file is not searched out in each layer, the state that the file does not exist is taken as the return result of the file search operation. And if the terminal judges that the current request type is the file writing type, further judging whether the target file exists in the last layer of the virtual stack file system. And if the target file exists in the last layer, directly transmitting the file access request to the target file, calling the virtual stack file system to execute file writing operation on the target file, and taking the information of whether the file writing operation is successfully executed as a return result of the file writing request. It should be noted that, in a specific implementation code, if a write operation is successful, a return value is provided, and if the write operation is unsuccessful, exception information is returned. If the target file does not exist in the last layer, the target file is copied to the last layer, the file retrieval result is replaced and points to the target file in the last layer, the file access request is directly transmitted to the target file in the last layer, the virtual stack file system is called to execute the file writing operation, and the information of whether the file writing operation is successfully executed is used as the return result of the file writing request. If the terminal judges that the current request type is the file deletion type, the file name in the file deletion request is recorded into the file deletion operation record of the last layer, and whether the target file determined by file retrieval is also located in the last layer is judged. If the target file determined by the file retrieval is also located in the last layer, the virtual stack file system is called to synchronously delete the target file, and the information of whether the file deletion operation is successfully executed is used as the return result of the file deletion request. In a specific implementation code, if the write operation is successful, a return value is provided, and if the write operation is unsuccessful, exception information is returned. If the target file determined by the file retrieval does not exist in the last layer, the deletion request is directly transmitted to the target file, a file system is called to execute file deletion operation on the target file, and information about whether the file deletion operation is successfully executed is used as a return result of the file deletion request.
And step S30, sending the return result to the upper application based on the preset over-range control module so as to redirect the file access operation of all the processes in the over-range to the virtual stack file system.
The preset overtravel control module is used for describing overtravel of the process.
In this embodiment, a group of references of the over-travel control module may be added to the process control module of the terminal in advance, so that when the process list of the virtual system environment where the over-travel is located is queried, the returned result only includes the process belonging to the corresponding over-travel. And when the terminal acquires the return result of the file access request, uploading the return result only containing the process information of the overtravel to an upper application based on a preset overtravel control module.
The invention provides an application packaging method. The application packaging method comprises the steps of receiving a file access request for accessing a preset virtual stack file system and judging the request type of the file access request, wherein the virtual stack file system is managed after overlapping files in the overtravel based on a virtual system environment and a universal file system service framework; calling the virtual stack file system to perform corresponding operation based on the request type, and acquiring a return result of the file access request; and sending the return result to an upper-layer application based on a preset overtravel control module so as to redirect the file access operation of all processes in the overtravel to the virtual stack file system. Through the mode, the virtual stack file system is established based on the universal file system service framework, and a data storage directory unified with the universal file system can be provided for overtravel; the virtual stacking file system can forward the file access request as required by calling the virtual stacking system to perform corresponding operation according to different file access types, so that the target file can be accessed according to a conventional access mode; and uploading the access result of the file access request by the preset overtravel control module, so that when the process list of the virtual system environment where the overtravel is located is inquired, the returned result only contains the process information belonging to the corresponding overtravel. According to the invention, when the overtravel is started, the root file system is dynamically switched to the virtual stack system, and the file access requests of all processes in the overtravel are redirected to the virtual stack system, so that the system-level isolation of files is realized, and the technical problem of overlarge influence domain caused by tight coupling of applications is solved.
Not shown, a second embodiment of the encapsulation method applied in the present invention is provided based on the first embodiment shown in fig. 2. In the present embodiment, step S10 includes:
step a, receiving a file access request sent based on a preset aggregation directory view, wherein the preset aggregation directory view is a visual logic view corresponding to the virtual stacked file system.
In the present embodiment, it can be understood. Before step a, a user may sequentially stack multiple directory views of the original enterprise-level file system together, aggregating to form a single directory view through which the user may access file data. As shown in fig. 3, the aggregated directory view can be divided into a read-only layer and a read-write layer, wherein the read-only layer is a system resource bound to the over-travel, such as a CPU, a memory, a disk, a network, and the like, and a dynamic link shared library required by the running of the application program, and the read-write layer is a supporting library on which the application depends. The aggregated directory view is a visual logical representation of a directory-granular virtual stacked file system. Based on this logical representation, the user may send a file access request to the virtual stack file system.
Further, in this embodiment, before step S10, the method further includes:
and b, adding a virtual network card and a virtual network card bridge required by the virtual stack file system to provide network connection for over travel.
In this embodiment, different virtual network cards can be allocated for the over-travel by adding the virtual network card in the kernel of the operating system of the terminal, so that it is ensured that different over-travel can only operate different network interfaces. Meanwhile, by designing a virtual network card bridge, the virtual network card in the overtravel is connected to the physical network of the node as required, so that actual network connection is provided for the overtravel.
The invention provides an application packaging method. The application packaging method further provides a visual logic representation, namely an aggregated directory view, corresponding to the virtual stacking system for the user, so that the sight line operates the virtual directory according to the access mode of the common directory, and the user experience is improved; the virtual network card and the virtual network card bridge corresponding to the overtravel are independently arranged, so that different network interfaces can be operated only by different overtravels, and actual network connection is provided for the overtravel.
Not shown, a third embodiment of the encapsulation method applied in the present invention is proposed based on the first embodiment shown in fig. 2. In the present embodiment, step S20 includes:
step c, when the request type is a file retrieval type, calling file retrieval operation records of the virtual stack file system layer by layer from back to front;
in this embodiment, if it is determined that the access type of the current file access request is a file traversal type, the terminal will call the file retrieval operation of the file system layer by layer from back to front according to the corresponding stacking sequence in the virtual stack file system.
D, acquiring a return result of the file access request based on the file retrieval operation record to determine a target file;
in this embodiment, the terminal determines whether the identification information of the target file exists in the currently obtained file retrieval operation record. And when the identification information of the target file exists in the file retrieval operation record, acquiring the identification information so as to determine the target file of the pair according to the identification information.
And e, when the request type is an editing request type, calling the virtual stacking file system to perform corresponding operation on the target file determined based on the file retrieval request, and acquiring a return result of the file access request of the editing request type, wherein the editing request type comprises a file reading type, a file writing type and a file deleting type.
In this embodiment, if the terminal determines that the current request type is the file reading type, the access request is directly transmitted to the target file determined during file retrieval. And the terminal calls the virtual stack file system to execute reading operation on the target file and takes the content of the target file as a return result of the file access request. And if the terminal judges that the target file to be written or deleted exists in the last layer of the readable and writable layer in the virtual stack file system, calling the virtual stack file system to write or delete the target file, and taking the information of whether the operation is successful as the return result of the request.
Further, in this embodiment, step d includes:
f, judging whether the target file exists in the virtual stack file system or not based on the file retrieval operation record;
in this embodiment, the terminal further determines whether the target file exists in the virtual stack file system by determining whether the file name of the target file exists in the file retrieval record according to the file retrieval operation record called layer by layer.
Step g, if the target file exists in the virtual stack file system, taking the label information corresponding to the target file as the return result to determine the target file;
the tag information may be information such as a file name and a physical address of the target file.
In this embodiment, if the terminal determines that the tag information of the target file exists in a certain layer of the virtual stack file system, it may further determine that the target file exists, and use the tag information of the target file as a return result of the file retrieval operation.
And h, if the target file does not exist in the virtual stack file system, generating state information without a file as the return information.
In this embodiment, if the terminal determines that the file deletion operation record of a certain layer in the virtual stack file system includes a deletion operation for the target file name, or that the file name of the target file is not retrieved for each layer, the file is not present and the result of the file retrieval operation is returned.
Further, in this embodiment, step e includes:
step i, when the request type is the file writing type or the file deleting type, judging whether the target file exists in the last layer in the virtual stack file system;
in this embodiment, when the terminal determines that the request type of the current file access request is a file write type or a file delete type, it is determined whether a target file corresponding to the request exists in a last layer of a readable and writable layer in the virtual stack file system.
Step j, if the target file exists in the last layer of the virtual stack file system, transmitting the file access request to the target file;
and step k, calling the virtual stacking file system to write or delete the target file and generating a corresponding return result.
In this embodiment, if the terminal determines that the current request type is a file write type, it further determines whether the target file exists in the last layer of the virtual stack file system. And if the target file exists in the last layer, directly transmitting the file access request to the target file, calling the virtual stack file system to execute file writing operation on the target file, and taking the information of whether the file writing operation is successfully executed as a return result of the file writing request. It should be noted that, in a specific implementation code, if a write operation is successful, a return value is provided, and if the write operation is unsuccessful, exception information is returned. If the target file does not exist in the last layer, the target file is copied to the last layer, the file retrieval result is replaced and points to the target file in the last layer, the file access request is directly transmitted to the target file in the last layer, the virtual stack file system is called to execute the file writing operation, and the information of whether the file writing operation is successfully executed is used as the return result of the file writing request.
If the terminal judges that the current request type is the file deletion type, the file name in the file deletion request is recorded into the file deletion operation record of the last layer, and whether the target file determined by file retrieval is also located in the last layer is judged. If the target file determined by the file retrieval is also located in the last layer, the virtual stack file system is called to synchronously delete the target file, and the information of whether the file deletion operation is successfully executed is used as the return result of the file deletion request. In a specific implementation code, if the write operation is successful, a return value is provided, and if the write operation is unsuccessful, exception information is returned. If the target file determined by the file retrieval does not exist in the last layer, the deletion request is directly transmitted to the target file, a file system is called to execute file deletion operation on the target file, and information about whether the file deletion operation is successfully executed is used as a return result of the file deletion request.
Further, in this embodiment, step e further includes:
and step l, when the request type is the file reading type, transmitting the file access request to the target file, and calling the virtual stack file system to execute reading operation on the target file.
In this embodiment, if the terminal determines that the current request type is a file reading type, the terminal directly transmits the access request to the target file determined during file retrieval. And the terminal calls the virtual stack file system to execute reading operation on the target file and takes the content of the target file as a return result of the file access request.
Further, step S20 further includes:
step m, when the request type is a file traversal type, calling file traversal operation of the virtual stack file system layer by layer from back to front according to the stacking sequence of the virtual stack file system;
in this embodiment, if the terminal determines that the access type is file traversal, the file traversal operation of the file system is called layer by layer from back to front according to the visual logical representation corresponding to the virtual stacked file system, that is, the stacking order of the aggregated directory view.
And n, aggregating the file traversal results of all layers based on the file deletion operation records of all layers, and taking the aggregated traversal results as the return results.
In this embodiment, the terminal aggregates the traversal results of each layer in combination with the file deletion operation record of each layer, and uses the aggregated traversal result as the return result of the file access request.
The invention provides an application packaging method. The application packaging method further enables the virtual stacking system to realize processing functions of file traversal, retrieval, deletion, reading and writing again based on a general file system service framework through a processing mode of request types of file traversal, file retrieval, file deletion, file reading and file writing, and can forward file access requests as required, so that the virtual directory can be operated according to an access mode of a common directory.
The invention also provides application packaging equipment.
The application packaging device comprises a processor, a memory and an application packaging program stored on the memory and capable of running on the processor, wherein the application packaging program realizes the steps of the application packaging method when being executed by the processor.
The method implemented when the application packaging program is executed may refer to each embodiment of the application packaging method of the present invention, and details are not described herein.
The invention also provides a computer readable storage medium.
The computer readable storage medium of the present invention has stored thereon an application wrapper program, which when executed by a processor implements the steps of the application wrapper method as described above.
The method implemented when the application packaging program is executed may refer to each embodiment of the application packaging method of the present invention, and details are not described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1.一种应用封装方法,其特征在于,所述应用封装方法包括:1. an application encapsulation method, is characterized in that, described application encapsulation method comprises: 接收用于访问预设虚拟堆叠文件系统的文件访问请求,并判定所述文件访问请求的请求类型,其中,所述虚拟堆叠文件系统基于虚拟系统环境与通用文件系统服务框架将超程中的文件层叠后进行管理;Receive a file access request for accessing a preset virtual stack file system, and determine the request type of the file access request, wherein the virtual stack file system based on the virtual system environment and the general file system service framework. Manage after cascading; 调用所述虚拟堆叠文件系统基于所述请求类型进行相应操作,获取所述文件访问请求的返回结果;Invoke the virtual stack file system to perform a corresponding operation based on the request type, and obtain the return result of the file access request; 基于预设超程控制模块将所述返回结果发送至上层应用,以将超程内所有进程的文件访问操作重定向至所述虚拟堆叠文件系统。Based on the preset overrun control module, the returned result is sent to the upper-layer application, so as to redirect the file access operations of all processes in the overrun to the virtual stack file system. 2.如权利要求1所述的应用封装方法,其特征在于,所述接收用于访问预设虚拟堆叠文件系统的文件访问请求的步骤包括:2. The application packaging method according to claim 1, wherein the step of receiving a file access request for accessing a preset virtual stack file system comprises: 接收基于预设聚合目录视图发送的文件访问请求,其中,所述预设聚合目录视图为所述虚拟堆叠文件系统对应的可视化逻辑视图。A file access request sent based on a preset aggregated directory view is received, wherein the preset aggregated directory view is a visualized logical view corresponding to the virtual stacked file system. 3.如权利要求1所述的应用封装方法,其特征在于,所述接收用于访问预设虚拟堆叠文件系统的文件访问请求,并判定所述文件访问请求的请求类型的步骤之前,还包括:3. The application packaging method according to claim 1, wherein before the step of receiving a file access request for accessing a preset virtual stack file system and determining a request type of the file access request, the method further comprises: : 添加所述虚拟堆叠文件系统所需的虚拟网卡与虚拟网卡桥接器,以为超程提供网络连接。The virtual network card and virtual network card bridge required by the virtual stack file system are added to provide network connection for overtravel. 4.如权利要求1所述的应用封装方法,其特征在于,所述调用所述虚拟堆叠文件系统基于所述请求类型进行相应操作,获取所述文件访问请求的返回结果的步骤包括:4. The application encapsulation method according to claim 1, wherein the step of invoking the virtual stacked file system to perform a corresponding operation based on the request type, and acquiring the return result of the file access request comprises: 在所述请求类型为文件检索类型时,从后至前逐层调用所述虚拟堆叠文件系统的文件检索操作记录;When the request type is a file retrieval type, calling the file retrieval operation record of the virtual stack file system layer by layer from back to front; 基于所述文件检索操作记录获取所述文件访问请求的返回结果,以确定目标文件;Obtain the return result of the file access request based on the file retrieval operation record to determine the target file; 在所述请求类型为编辑请求类型时,调用所述虚拟堆叠文件系统对基于文件检索请求确定的所述目标文件进行相应操作,并获取编辑请求类型的文件访问请求的返回结果,其中,所述编辑请求类型包括文件读取类型、文件写入类型与文件删除类型。When the request type is an edit request type, the virtual stack file system is invoked to perform a corresponding operation on the target file determined based on the file retrieval request, and a return result of the file access request of the edit request type is obtained, wherein the Edit request types include file read type, file write type, and file delete type. 5.如权利要求4所述的应用封装方法,其特征在于,所述基于所述文件检索操作记录获取所述文件访问请求的返回结果的步骤包括:5. The application packaging method according to claim 4, wherein the step of obtaining the return result of the file access request based on the file retrieval operation record comprises: 基于所述文件检索操作记录判断所述虚拟堆叠文件系统中是否存在所述目标文件;Determine whether the target file exists in the virtual stack file system based on the file retrieval operation record; 若所述虚拟堆叠文件系统中存在所述目标文件,则将所述目标文件对应的标签信息作为所述返回结果,以确定所述目标文件;If the target file exists in the virtual stack file system, the label information corresponding to the target file is used as the returned result to determine the target file; 若所述虚拟堆叠文件系统中不存在所述目标文件,则生成文件不存在的状态信息,作为所述返回信息。If the target file does not exist in the virtual stack file system, the status information that the file does not exist is generated as the return information. 6.如权利要求5所述的应用封装方法,其特征在于,所述在所述请求类型为编辑请求类型时,调用所述虚拟堆叠文件系统对基于文件检索请求确定的所述目标文件进行相应操作,并获取编辑请求类型的文件访问请求的返回结果的步骤包括:6 . The application packaging method according to claim 5 , wherein when the request type is an edit request type, the virtual stack file system is called to perform corresponding processing on the target file determined based on the file retrieval request. 7 . The steps for obtaining the return result of the file access request of the edit request type include: 在所述请求类型为所述文件写入类型或所述文件删除类型时,判断所述目标文件是否存在于所述虚拟堆叠文件系统中的最后一层;When the request type is the file writing type or the file deletion type, judging whether the target file exists in the last layer of the virtual stack file system; 若所述目标文件存在于所述虚拟堆叠文件系统中的最后一层,则将所述文件访问请求传递至所述目标文件;If the target file exists in the last layer in the virtual stack file system, passing the file access request to the target file; 调用所述虚拟堆叠文件系统对所述目标文件进行写入或删除操作,并生成相应的返回结果。The virtual stack file system is called to write or delete the target file, and a corresponding return result is generated. 7.如权利要求6所述的应用封装方法,其特征在于,所述在所述请求类型为编辑请求类型时,调用所述虚拟堆叠文件系统对基于文件检索请求确定的所述目标文件进行相应操作,并获取编辑请求类型的文件访问请求的返回结果的步骤包括:7 . The application packaging method according to claim 6 , wherein when the request type is an edit request type, the virtual stack file system is called to perform corresponding processing on the target file determined based on the file retrieval request. 8 . The steps for obtaining the return result of the file access request of the edit request type include: 在所述请求类型为所述文件读取类型时,将所述文件访问请求传递至所述目标文件,调用所述虚拟堆叠文件系统对所述目标文件执行读取操作。When the request type is the file read type, the file access request is transmitted to the target file, and the virtual stack file system is invoked to perform a read operation on the target file. 8.如权利要求1所述的应用封装方法,其特征在于,所述调用所述虚拟堆叠文件系统基于所述请求类型进行相应操作,获取所述文件访问请求的返回结果的步骤包括:8. The application packaging method according to claim 1, wherein the step of invoking the virtual stacked file system to perform a corresponding operation based on the request type, and acquiring a return result of the file access request comprises: 在所述请求类型为文件遍历类型时,根据所述虚拟堆叠文件系统的层叠顺序,从后至前逐层调用所述虚拟堆叠文件系统的文件遍历操作;When the request type is a file traversal type, according to the stacking sequence of the virtual stacked file system, the file traversal operation of the virtual stacked file system is called layer by layer from back to front; 基于各层的文件删除操作记录,聚合各层的文件遍历结果,以将聚合后的遍历结果作为所述返回结果。Based on the file deletion operation records of each layer, the file traversal results of each layer are aggregated, and the aggregated traversal result is used as the returned result. 9.一种应用封装设备,其特征在于,所述应用封装设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的应用封装程序,所述应用封装程序被所述处理器执行时实现如权利要求1至8中任一项所述的应用封装方法的步骤。9. An application packaging device, characterized in that the application packaging device comprises: a memory, a processor, and an application packaging program stored on the memory and running on the processor, the application packaging program being The processor implements the steps of the application packaging method according to any one of claims 1 to 8 when executed. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有应用封装程序,所述应用封装程序被处理器执行时实现如权利要求1至8中任一项所述的应用封装方法的步骤。10. A computer-readable storage medium, characterized in that, an application package program is stored on the computer-readable storage medium, and when the application package program is executed by a processor, any one of claims 1 to 8 is implemented. The steps of applying the encapsulation method described above.
CN201911323655.1A 2019-12-18 2019-12-18 Application packaging method, device and readable storage medium Active CN111125007B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911323655.1A CN111125007B (en) 2019-12-18 2019-12-18 Application packaging method, device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911323655.1A CN111125007B (en) 2019-12-18 2019-12-18 Application packaging method, device and readable storage medium

Publications (2)

Publication Number Publication Date
CN111125007A true CN111125007A (en) 2020-05-08
CN111125007B CN111125007B (en) 2023-06-20

Family

ID=70500501

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911323655.1A Active CN111125007B (en) 2019-12-18 2019-12-18 Application packaging method, device and readable storage medium

Country Status (1)

Country Link
CN (1) CN111125007B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1436333A (en) * 2000-06-09 2003-08-13 摩托罗拉公司 Integrated processor platform supporting wireless handheld multimedia devices
US20100042719A1 (en) * 2008-08-12 2010-02-18 Junji Kinoshita Content access to virtual machine resource
CN102520994A (en) * 2011-12-06 2012-06-27 北京航空航天大学 Method and system for steaming loading virtual files
CN103067507A (en) * 2012-12-28 2013-04-24 国家计算机网络与信息安全管理中心 Internet cloud computing resource virtualization packaging system and method
CN103150402A (en) * 2013-03-27 2013-06-12 网宿科技股份有限公司 Index-code-based virtual file system, establishment method and access method
CN105573801A (en) * 2015-12-23 2016-05-11 迈普通信技术股份有限公司 Method for realizing software upgrading in stacking system as well as device and system
CN105579950A (en) * 2013-07-02 2016-05-11 日立数据系统工程英国有限公司 Method and apparatus for migration of virtualized file system, data storage system for migration of virtualized file system, and file server for use in data storage system
CN105593804A (en) * 2013-07-02 2016-05-18 日立数据系统工程英国有限公司 Method and apparatus for virtualization of file system, data storage system for virtualization of file system, and file server for use in data storage system
CN105830059A (en) * 2014-11-28 2016-08-03 华为技术有限公司 Fine pitch connector socket
CN110018859A (en) * 2019-04-15 2019-07-16 珠海全志科技股份有限公司 Equipment starting method, device, computer equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1436333A (en) * 2000-06-09 2003-08-13 摩托罗拉公司 Integrated processor platform supporting wireless handheld multimedia devices
US20100042719A1 (en) * 2008-08-12 2010-02-18 Junji Kinoshita Content access to virtual machine resource
CN102520994A (en) * 2011-12-06 2012-06-27 北京航空航天大学 Method and system for steaming loading virtual files
CN103067507A (en) * 2012-12-28 2013-04-24 国家计算机网络与信息安全管理中心 Internet cloud computing resource virtualization packaging system and method
CN103150402A (en) * 2013-03-27 2013-06-12 网宿科技股份有限公司 Index-code-based virtual file system, establishment method and access method
CN105579950A (en) * 2013-07-02 2016-05-11 日立数据系统工程英国有限公司 Method and apparatus for migration of virtualized file system, data storage system for migration of virtualized file system, and file server for use in data storage system
CN105593804A (en) * 2013-07-02 2016-05-18 日立数据系统工程英国有限公司 Method and apparatus for virtualization of file system, data storage system for virtualization of file system, and file server for use in data storage system
CN105830059A (en) * 2014-11-28 2016-08-03 华为技术有限公司 Fine pitch connector socket
CN105573801A (en) * 2015-12-23 2016-05-11 迈普通信技术股份有限公司 Method for realizing software upgrading in stacking system as well as device and system
CN110018859A (en) * 2019-04-15 2019-07-16 珠海全志科技股份有限公司 Equipment starting method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111125007B (en) 2023-06-20

Similar Documents

Publication Publication Date Title
US20240095043A1 (en) Execution of sub-application processes within application program
CN107291497B (en) Multi-firmware upgrading method and system and readable storage medium
JP6258494B2 (en) Move instance of virtual computer processing
CN114077462B (en) Method, device, equipment and medium for software operating system to call Android HIDL interface
US9032423B2 (en) Dependency based configuration package activation
US20130227085A1 (en) Terminal and method for using cloud services
CN112100552B (en) Page rendering method, device, equipment and computer readable storage medium
US20140067879A1 (en) Application management for a terminal
US10078609B1 (en) Virtualizing a non-USB device as a USB device
CN104516885A (en) Implementation method and device of browse program double-kernel assembly
CN107577472B (en) Software installation method and device and computer readable storage medium
CN109814863A (en) A processing method, device, computer equipment and computer storage medium for requesting returned data
KR20200042798A (en) Method for controlling the execution of different operating systems, electronic device and storage medium therefor
CN115248721A (en) Starting method of container application, mirror image management method and related equipment
CN110908958B (en) File processing method, device, terminal and storage medium
EP4044058A1 (en) Capability management method and computer device
KR101512296B1 (en) File associated with application processing terminal and processing method of file associated with application
US20210026807A1 (en) Method for managing data associated with application and electronic device therefor
CN113222174B (en) Model management method and device
TWI726236B (en) Personal cloud system and related localization method
CN111125007B (en) Application packaging method, device and readable storage medium
CN114090083A (en) A visual component configuration method, device, device and storage medium
CN117692416A (en) Network message processing method, device, computer equipment and storage medium
WO2022227997A1 (en) Memory request method and related device
CN112052377A (en) Resource recommendation method, device, server 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
GR01 Patent grant
GR01 Patent grant