A file access system and method across operating systems

By mounting the deployment directory of each node into the file manager of the domain manager, the flexibility of file access in multiple nodes and multiple operating systems is solved, file access and management across operating systems is realized, and file operations are improved efficiency and flexibility.

CN118445000BActive Publication Date: 2024-11-05成都谐盈科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410904154.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-11-05
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

In the case of multi-node and multi-operation systems, it is difficult for application software to flexibly call standard library functions of different operating systems, resulting in inefficient file access and management.

Method used

By mounting each node's deployment directory as a file system and mounting it into the file manager of the domain manager, the application software can access files of different nodes in a unified manner and call the operating system's standard library through the file manager Functions operate. The specific steps include initializing the file system, mounting the file system, creating file components, and calling the operating system's standard library functions through the interfaces of the device manager and file manager.

Benefits of technology

It realizes that in a multi-node and multi-operating system environment, application software can flexibly select and call functions of different operating systems, improving the efficiency and flexibility of file access and management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118445000B_ABST
    Figure CN118445000B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of communication technology, and more specifically, relates to a cross-operating system file access system and method, comprising application software, a domain manager, a file system and an operating system; each node uses a file system to manage the node's deployment directory, and the file system used by each node specifies a corresponding operating system, and the file system is mounted on the file manager of the domain manager; the application software accesses files under different nodes through the file manager and operates the files; the deployment directory of each node is mapped to a file system, and the file system is mounted in the file manager of the domain manager, so that the application software can access files under different nodes through the same file manager and operate the files; thus, in the case of multiple nodes and multiple operating systems, according to the selection of the application software, the functions of different operating systems can be flexibly called.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of communication technology, and more specifically, relates to a cross-operating system file access system and method. Background Art

[0002] In SCA, the file manager, file system and file component are important components of the core framework; the file component is the logical proxy of the physical files existing on the actual file system; the file system component abstracts the physical file system into a logical file system, and the file manager component can manage multiple file system components by mounting; the application software only needs to use the file manager of the domain manager to operate the files under all mounted file systems to achieve cross-node access; the file and file system components complete the creation, opening, reading and writing of files by calling the standard functions of the operating system; in the case of multiple nodes and multiple operating systems, the standard library functions of different operating systems are different. How to flexibly call different functions according to the choice of application software is a technical problem that needs to be solved. Summary of the invention

[0003] The present invention provides a cross-operating system file access system and method, which is intended to solve the technical problem of how to flexibly call different functions according to the selection of application software in the case of multiple nodes and multiple operating systems.

[0004] A cross-operating system file access system, comprising application software, a domain manager, a file system and an operating system;

[0005] The file system includes multiple files, each node uses a file system to manage the deployment directory of the node, and the file system used by each node specifies a corresponding operating system, and the file system is mounted on the file manager of the domain manager;

[0006] The application software accesses files under different nodes through the file manager and operates the files, and at the same time calls the standard library functions of the operating system based on the files to complete the corresponding operations.

[0007] The present invention uses the deployment directory of each node as a file system, and mounts the file system in the file manager of the domain manager, so that application software can access files under different nodes through the same file manager and operate on the files, and at the same time call the standard library functions of the operating system based on the files to complete the corresponding operations; thus, in the case of multiple nodes and multiple operating systems, the functions of different operating systems can be flexibly called according to the selection of application software.

[0008] Preferably, the deployment directory is obtained based on a device manager in each node, and then the interface of the file system is called by the device manager, and the deployment path is passed in by the device manager to create and initialize the file system.

[0009] A cross-operating system file access method comprises the following steps:

[0010] Initialization: Get the deployment directory of the current platform through the device manager in each node; then call the file system interface based on the device manager, pass in the path, and create and initialize the file system;

[0011] Mount: The device manager calls the interface of the file manager of the domain manager to mount the file system to the file manager, and the file manager retains the mounting information;

[0012] Create a file component: The file system calls the file interface function and passes in the file pointer returned by the standard library function to create and initialize the file component;

[0013] Access: When the application software accesses the file manager for operation, it passes the relative path of the file or directory in the file system to the file manager; the file manager obtains the object reference of the corresponding file system or the object reference of the file component according to the relative path passed by the application software and the mount information saved by itself;

[0014] The file manager calls the corresponding file system interface function based on the object reference; and then calls the standard library function of the operating system through the file system to complete the operation on the file.

[0015] Preferably, when mounting the file system to the file manager, the object reference and the mount point of the file system are passed in through the device manager, and the file system is mounted to the file manager;

[0016] The file manager associates and stores the mount point with the object reference of the file system.

[0017] Preferably, the mount point of the file system needs to map the deployment path to a domain name plus a node name according to the domain and node where the file system is located.

[0018] Preferably, when the file manager calls the corresponding file system interface function based on the object reference, the corresponding file system interface function is called through the invoke method of eorb.

[0019] The beneficial effects of the present invention include at least:

[0020] The present invention uses the deployment directory of each node as a file system, and mounts the file system in the file manager of the domain manager, so that application software can access files under different nodes through the same file manager and operate on the files, and at the same time call the standard library functions of the operating system based on the files to complete the corresponding operations; thus, in the case of multiple nodes and multiple operating systems, the functions of different operating systems can be flexibly called according to the selection of application software. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0022] Figure 1 It is the relationship between the domain manager and the nodes and the composition of the nodes.

[0023] Figure 2 It is a file management process across nodes and operating systems.

[0024] Figure 3 The present invention is based on the process of implementing the operation file. DETAILED DESCRIPTION

[0025] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0026] See also Figure 1 and Figure 2 As shown, a cross-operating system file access system includes application software, a domain manager, a file system and an operating system;

[0027] The file system includes multiple files, each node uses a file system to manage the deployment directory of the node, and the file system used by each node specifies a corresponding operating system, and the file system is mounted on the file manager of the domain manager;

[0028] The application software accesses files under different nodes through the file manager and operates the files, and at the same time calls the standard library functions of the operating system based on the files to complete the corresponding operations.

[0029] The present invention uses the deployment directory of each node as a file system, and mounts the file system in the file manager of the domain manager, so that application software can access files under different nodes through the same file manager and operate on the files, and at the same time call the standard library functions of the operating system based on the files to complete the corresponding operations; thus, in the case of multiple nodes and multiple operating systems, the functions of different operating systems can be flexibly called according to the selection of application software.

[0030] Preferably, the deployment directory is obtained based on a device manager in each node, and then the interface of the file system is called by the device manager, and the deployment path is passed in by the device manager to create and initialize the file system.

[0031] A cross-operating system file access method comprises the following steps:

[0032] Initialization: Get the deployment directory of the current platform through the device manager in each node; then call the file system interface based on the device manager, pass in the path, and create and initialize the file system;

[0033] Mounting: The device manager calls the interface of the file manager of the domain manager, and inputs the mount name of the file system and the object reference of the file system. The file manager associates and saves the mount point and the object reference of the file system; the file system is mounted to the file manager, and the file manager retains the mount information;

[0034] Create a file component: The file system calls the file interface function and passes in the file pointer returned by the standard library function to create and initialize the file component;

[0035] Access: When the application software accesses the file manager for operation, it passes the relative path of the file or directory in the file system to the file manager (the deployment directory is / sdcard / root / , the mount point of the file system is / dmfs, the file path is / sdcard / root / test.txt, and the passed file path is / dmfs / test.txt (replace the deployment directory with the mount point)). The file manager obtains the object reference of the corresponding file system or the object reference of the file component based on the relative path passed by the application software and the mount information saved by itself;

[0036] The object reference of the file component is obtained as follows:

[0037] When mounting a file system, the mount name and object reference of the file system are passed in. The file manager saves these two pieces of information and can later find the object reference of the corresponding file system based on the mount name.

[0038] The file manager calls the corresponding file system interface function based on the object reference; and then calls the standard library function of the operating system through the file system to complete the operation on the file.

[0039] Preferably, the mount point of the file system needs to map the deployment path to the domain name plus the node name according to the domain and node where the file system is located (the deployment directory is / sdcard / root / platform, the domain name is myDomain, the node name is SCANode, so the mount point of the file system is / myDomain / SCANode).

[0040] Preferably, when the file manager calls the corresponding file system interface function based on the object reference, the corresponding file system interface function is called through the invoke method of eorb.

[0041] See also Figure 3 As shown, the specific implementation process of this embodiment is as follows:

[0042] Create a file system: When the platform is started, the device manager in each node obtains the deployment directory of the current platform, and then calls the interface of the file system component, passing in the path to create and initialize the file system.

[0043] Mounting: The device manager calls the interface of the file manager of the domain manager, passes in the file system object reference and mount point, and mounts the file system to the file manager. The file manager associates the mount point and the file system object reference and saves them. In order to facilitate the application software to locate which node the mounted file system belongs to, the file system mount point needs to follow the principle of mapping the path to the domain name and node name according to the domain and node.

[0044] Access the file manager: The application software accesses the file manager and inputs the domain name, node name, and file name to be accessed, or inputs the domain name, node name, directory name, and file name to be accessed.

[0045] The file manager compares the mapping path (domain name, node name and file name, or the domain name, node name, directory name and file name to be accessed) with the mount information it has saved to determine whether the mapping path exists. If not, the process ends; if so, the file system interface is called.

[0046] Call the file system interface: The file manager calls the corresponding file system interface function through the eorb invoke method based on the file system object reference.

[0047] Calling standard library functions: The file system calls the standard library functions of the operating system to complete operations such as creating, opening, deleting, and determining whether a file exists.

[0048] Create a file component: The file system calls the file interface function and passes in the file pointer returned by the standard library function to create and initialize the file component.

[0049] Calling the file interface: The application software opens the file through the file manager and obtains the object reference of the file component (the logical proxy of the physical file existing on the actual file system), and calls the corresponding file interface function through the eorb invoke method.

[0050] Calling standard library functions: The file calls the standard library functions of the operating system to complete operations such as reading, writing, closing, and obtaining the size of the file.

[0051] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A cross-operating system file access method, characterized in that: The steps include: Initialization: Get the deployment directory of the current platform through the device manager in each node; then call the file system interface based on the device manager, pass in the path, and create and initialize the file system; Mount: The device manager calls the interface of the file manager of the domain manager to mount the file system to the file manager, and the file manager retains the mounting information; Create a file component: The file system calls the file interface function and passes in the file pointer returned by the standard library function to create and initialize the file component; Access: When the application software accesses the file manager for operation, it passes the relative path of the file or directory in the file system to the file manager; the file manager obtains the object reference of the corresponding file system or the object reference of the file component according to the relative path passed by the application software and the mount information saved by itself; The file manager calls the corresponding file system interface function based on the object reference; and then calls the standard library function of the operating system through the file system to complete the operation of the file; When mounting the file system to the file manager, the object reference and the mount point of the file system are passed in through the device manager, and the file system is mounted to the file manager; The file manager associates and saves the mount point and the object reference of the file system; The mount point of the file system maps the deployment path to a domain name plus a node name according to the domain and node where the file system is located.

2. A cross-operating system file access method according to claim 1, characterized in that: When the file manager calls the corresponding file system interface function based on the object reference, the corresponding file system interface function is called through the invoke method of eorb.

3. A cross-operating system file access system, characterized in that: A method for implementing a cross-operating system file access method as claimed in claim 1 or 2, comprising application software, a domain manager, a file system and an operating system; The file system includes multiple files, each node uses a file system to manage the deployment directory of the node, and the file system used by each node specifies a corresponding operating system, and the file system is mounted on the file manager of the domain manager; The application software accesses files under different nodes through the file manager and operates the files, and at the same time calls the standard library functions of the operating system based on the files to complete the corresponding operations.

4. A cross-operating system file access system according to claim 3, characterized in that: The deployment directory is obtained based on the device manager in each node, and then the interface of the file system is called through the device manager, and the deployment path is passed in by the device manager to create and initialize the file system.