Image processing method, system and device based on FUSE file system

By configuring the image processing module in the user space of the Fuse file system, the problem of processing burden on mobile devices after saving pictures is solved, and the effect of reducing development pressure and performance consumption is achieved.

CN114780496BActive Publication Date: 2025-08-08SPREADTRUM SEMICON (NANJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210426091.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-21
Publication Date
2025-08-08
Estimated Expiration
2042-04-21

AI Technical Summary

Technical Problem

After saving pictures, mobile devices further process the problem of excessive development burden through applications.

Method used

The image processing module is configured in the user space of the Fuse file system. When the image management process receives the image saving instruction, the image processing module is called to obtain the image processing information and store the information.

Benefits of technology

Reduces application development pressure, reduces performance consumption and memory usage, and simplifies application development process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114780496B_ABST
    Figure CN114780496B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system, device, and medium for image processing based on a Fuse file system. The method comprises the following steps: configuring an image processing module in user space; in response to receiving an image save instruction, the VFS sends the image save instruction to an image management process; the image management process calls the image processing module and inputs the image to be processed into the image processing module to obtain image processing information; and storing the image processing information. By configuring the image processing module in the user space of the Fuse file system, the present invention can obtain image processing information while saving the image when receiving the image save instruction. By storing the image processing information, the application can directly use the image processing information when needed, eliminating the need to develop image processing functions in the application, reducing application development pressure, and effectively reducing application performance consumption and memory usage when the application is in use.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to an image processing method, system, device and storage medium based on a Fuse file system. Background Art

[0002] With the continuous development of artificial intelligence technology, more and more scenarios are using artificial intelligence related technologies. The field of computer vision is no exception. Computer vision has realized many artificial intelligence technologies through deep learning, such as image recognition, image classification, image detection, etc.

[0003] Currently, mobile devices generally use applications to further process saved images after saving them, which puts a great burden on application development and also affects. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to overcome the defect in the prior art that after saving the picture, the mobile device further processes the picture through the application, thereby causing a great burden on the development of the application. A method, system, device and storage medium for image processing based on the Fuse (Filesystem in Userspace) file system are provided.

[0005] The present invention solves the above technical problems through the following technical solutions:

[0006] The present invention provides an image processing method based on a Fuse file system. The Fuse file system includes a user space and a kernel space. The kernel space includes a VFS (virtual file system). The image processing method includes the following steps:

[0007] Configuring an image processing module in the user space;

[0008] In response to receiving the picture saving instruction, the VFS sends the picture saving instruction to the picture management process;

[0009] The picture management process calls the picture processing module and inputs the picture to be processed into the picture processing module to obtain picture processing information;

[0010] The image processing information is stored.

[0011] Preferably, the user space includes the image management process and a first communication interface, the kernel space includes a second communication interface, and the step of the VFS sending the image save instruction to the image management process includes:

[0012] The VFS sends the image saving instruction to the Fuse driver module;

[0013] The Fuse driver module sends the picture saving instruction to the first communication interface through the second communication interface;

[0014] The picture management process receives the picture saving instruction.

[0015] Preferably, the image management process includes a FuseDaemon process (a process in the Fuse file system located in the user space for controlling file saving permissions).

[0016] Preferably, the step of storing the image processing information includes:

[0017] sending the image processing information to the second communication interface through the first communication interface;

[0018] The image processing information is stored in the underlying file system.

[0019] Preferably, the image processing module includes an image classification algorithm, and the image processing information includes image classification information.

[0020] Preferably, the image classification algorithm is an algorithm based on Tensorflow Lite (a deep learning framework) model training.

[0021] Preferably, the step of storing the image processing information in the underlying file system includes:

[0022] If there is a path corresponding to the image classification information in the underlying file system, the image to be processed is stored in the corresponding path;

[0023] If the path corresponding to the image classification information does not exist in the underlying file system, a corresponding path is generated, and the image to be processed is stored in the corresponding path.

[0024] Preferably, after the step of storing the image to be processed in the corresponding path, the step further includes:

[0025] Get the target image;

[0026] Obtain image classification information according to the path corresponding to the target image.

[0027] The present invention also provides an image processing system based on the Fuse file system, wherein the Fuse file system includes a user space and a kernel space, the kernel space includes VFS, and the image processing system includes: a configuration module, an instruction sending module, an image processing module, and an information storage module;

[0028] The configuration module is used to configure the image processing module in the user space;

[0029] The instruction sending module is used for, in response to receiving the picture saving instruction, the VFS sending the picture saving instruction to the picture management process;

[0030] The image processing module is used to call the image processing module through the image management process, and input the image to be processed into the image processing module to obtain image processing information;

[0031] The information storage module is used to store the image processing information.

[0032] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-described image processing method based on the Fuse file system when executing the computer program.

[0033] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-mentioned image processing method based on the Fuse file system.

[0034] The positive progressive effect of the present invention is that: the present invention is equipped with a Fuse file system, and an image processing module is configured in the user space of the Fuse file system. When a picture saving instruction is received, the picture can be saved while the picture is called by the picture processing module through the picture management process to obtain picture processing information. By storing the picture processing information, the application can directly use the picture processing information when needed, and there is no need to develop the picture processing function in the application, which reduces the development pressure of the application. It can also effectively reduce the performance consumption and memory usage of the application when the application is used. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 This is a flowchart of the image processing method based on the Fuse file system in Example 1 of the present invention.

[0036] Figure 2 This is a flowchart of a specific implementation of step 102 in Example 1 of the present invention.

[0037] Figure 3 This is a flowchart of a specific implementation of step 104 in Example 1 of the present invention.

[0038] Figure 4 This is a flowchart of obtaining image classification information of a target image in Example 1 of the present invention.

[0039] Figure 5This is a flowchart of saving the first image in Example 1 of the present invention.

[0040] Figure 6 This is a flowchart of saving the second image in Example 1 of the present invention.

[0041] Figure 7 This is a module diagram of the image processing method based on the Fuse file system in Example 2 of the present invention.

[0042] Figure 8 This is a module diagram of the electronic device in Example 3 of the present invention. DETAILED DESCRIPTION

[0043] For ease of understanding, the following explains the terms that frequently appear in the embodiments:

[0044] [Definition of including] As used herein, the terms "having", "may have", "including" or "may include" indicate the existence of the corresponding functions, operations, elements, etc. of the present disclosure, and do not limit the existence of one or more other functions, operations, elements, etc. In addition, it should be understood that as used herein, the terms "including" or "having" indicate the existence of the features, numbers, steps, operations, elements, parts or their combination described in the specification, and do not exclude the existence or addition of one or more other features, numbers, steps, operations, elements, parts or their combination.

[0045] [Definition of and / or] As used herein, the terms "A or B", "at least one of A and / or B", or "one or more of A and / or B" include any and all combinations of the words listed therewith. For example, "A or B", "at least one of A and B", or "at least one of A or B" means (1) including at least one A, (2) including at least one B, or (3) including at least one A and at least one B.

[0046] [Definition of First and Second] The terms "first," "second," and so on, appearing in the embodiments of this application are for illustration and distinction purposes only. They are not in any order, do not represent a specific limit on the number of devices in the embodiments of this application, and do not constitute any limitation on the embodiments of this application. For example, a first element could be referred to as a second element without departing from the scope of this disclosure. Similarly, a second element could be referred to as a first element.

[0047] [Definition of connection] It will be understood that when an element (e.g., a first element) is “connected to” or “(operably or communicatively) coupled to” another element (e.g., a second element), the element can be directly connected or coupled to the other element, and there can be an intervening element (e.g., a third element) between the element and the other element. Conversely, it will be understood that when an element (e.g., a first element) is “directly connected to” or “directly coupled to” another element (e.g., a second element), there are no intervening elements (e.g., a third element) between the element and the other element.

[0048] [Meaning of configuration] The expression "configured to (or set to)" as used herein may be replaced by "suitable for", "capable of", "designed to", "adapted to", "formed to", or "capable of", depending on the circumstances. The term "configured to (set to)" does not necessarily mean "specially designed to" at the hardware level. On the contrary, the expression "the device is configured to..." may mean that the device is "capable" of performing A, B, and C together with other devices or components in certain circumstances. For example, a "processor configured to (set to) perform A, B, and C" may be a dedicated processor such as an embedded processor for performing the corresponding operations, or a general-purpose processor such as a central processing unit (CPU) or an application processor (AP) that can perform the corresponding operations by running one or more software programs stored in a storage device.

[0049] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.

[0050] Example 1

[0051] This embodiment provides an image processing method based on the Fuse file system. The Fuse file system includes user space and kernel space. The kernel space is connected to the VFS (Virtual File System) layer in the kernel, and the user-state basic logic processing library is connected to the user space. Figure 1 As shown, the image processing method includes the following steps:

[0052] Step 101: Configure an image processing module in user space.

[0053] In some specific embodiments, the image processing module includes an image classification algorithm, such as an algorithm based on Tensorflow Lite model training. Specifically, a number of image samples are obtained, each image sample is marked to obtain image classification information, these image samples are used as input to the Tensorflow Lite model, and the corresponding image classification information is used as output to perform model training, thereby obtaining an image classification algorithm.

[0054] Step 102: In response to receiving the picture saving instruction, the VFS sends the picture saving instruction to the picture management process.

[0055] When receiving an image save instruction (such as during the download or copy process), the process enters kernel space from user space and sends the image save instruction to the image management process through VFS. The image management process can be either a user space image management process or a user space image management process. In this embodiment, the user space image management process (such as the FuseDaemon process) is preferred to facilitate debugging. The following uses the user space image management process as an example to facilitate the description of this embodiment.

[0056] Specifically, the user space includes an image management process and a first communication interface, and the kernel space includes a second communication interface, wherein the first communication interface communicates with the second communication interface so that the user space and the kernel space can interact, such as Figure 2 As shown, in this embodiment, step 102 specifically includes the following steps:

[0057] Step 1021: VFS sends the image save instruction to the Fuse driver module;

[0058] Step 1022: The Fuse driver module sends the image saving instruction to the first communication interface through the second communication interface.

[0059] Step 1023: The picture management process receives a picture saving instruction.

[0060] In this embodiment, through the interaction between the first communication interface and the second communication interface, the Fuse driver module can upload the image saving instruction sent by the VFS to the image management process running in the user space. The image management process further sends the image to be processed to the image processing module, which is convenient for debugging the image management process in the user space and can also realize the processing of the image while saving the image.

[0061] Step 103: The image management process calls the image processing module and inputs the image to be processed into the image processing module to obtain image processing information;

[0062] Step 104: Store the image processing information.

[0063] In some specific implementations, such as Figure 3 As shown, step 104 specifically includes the following steps:

[0064] Step 1041: Send the image processing information to the second communication interface through the first communication interface;

[0065] Step 1042: Store the image processing information in the underlying file system.

[0066] In this embodiment, by saving the image processing information to the underlying file system, subsequent applications can directly use the image processing information.

[0067] In some preferred embodiments, step 1042 specifically includes the following steps:

[0068] If there is a path corresponding to the image classification information in the underlying file system, the image to be processed is stored in the corresponding path;

[0069] If the path corresponding to the image classification information does not exist in the underlying file system, a corresponding path is generated and the image to be processed is stored in the corresponding path.

[0070] In this embodiment, different storage paths are established based on the classification information of the images. Different image classification information is stored in different paths, such as buildings are stored in a building folder, flowers are stored in a flowers folder, etc. If the image classification information is obtained for the first time, a new path is established based on the image classification information to facilitate the storage of different types of images.

[0071] In this embodiment, when an application needs to use a picture, there is no need to classify the application, but the picture classification information corresponding to the picture can be directly obtained. Specifically, Figure 4 As shown, step 1042 includes the following steps:

[0072] Step 105: Obtain the target image;

[0073] Step 106: Obtain image classification information according to the path corresponding to the target image.

[0074] Since current image classification is generally performed by multimedia software such as applications, which increases the processing flow of the application itself, classification processing based on the application itself will increase the memory usage and performance consumption to a certain extent.

[0075] In this embodiment, a file system is installed and an image processing module is configured in the user space of the Fuse file system. When an image save instruction is received, the image processing module can be called through the image management process to obtain image processing information (such as image classification information) while saving the image. By storing the image classification information, the application can directly use the image classification information when needed, and there is no need to develop the image classification function in the application, which reduces the development pressure of the application. It can also effectively reduce the performance consumption and memory usage of the application when using the application.

[0076] In order to better understand this embodiment, the overall process of this embodiment is described below through a specific example:

[0077] Figure 5 The image saving process in the prior art is schematically shown. Figure 6 The process of saving pictures in this embodiment is schematically shown.

[0078] like Figure 5 As shown, generally speaking, when receiving the image saving instruction, the image to be processed is obtained, and the image to be processed is directly stored in the underlying file system (such as Vfat / exfat / f2fs) through VFS, and then the image is saved to the physical disk through the device driver (Devicedriver), and the image is saved.

[0079] like Figure 6 As shown, in this embodiment, a Fuse file system is built on the target device and mounted on a disk. An image classification algorithm, such as TensorFlow Lite, is then deployed in the user space program of the Fuse file system. Upon receiving an image save instruction, the VFS obtains the image to be processed. The VFS sends the image save instruction to the Fuse driver module (Fusedriver). This instruction is communicated with the first communication interface (libfuse) in the user space via the second communication interface ( / dev / fuse) in the memory space, thereby reporting the image save instruction to the FuseDaemon. The FuseDaemon calls the image processing module and inputs the image to be processed into the image processing module to obtain the image classification algorithm. The image classification algorithm then sends the image to the image classification algorithm. The image classification algorithm's reasoning and computation process yields a classification result (i.e., image classification information). The FuseDaemon then transmits this image classification information to the underlying file system in the kernel space via the first communication interface (libfuse). Specifically, different types of images are placed into corresponding folders, such as people, buildings, business cards, clothing, food, and transportation. When an application needs to obtain a picture from a device, it can obtain the corresponding picture classification information according to the corresponding folder while obtaining the picture.

[0080] Example 2

[0081] This embodiment provides an image processing system based on the Fuse file system. The Fuse file system includes user space and kernel space. Figure 7 As shown, the image processing system includes: a configuration module 201 , an instruction sending module 202 , an image processing module 203 and an information storage module 204 .

[0082] The configuration module 201 is used to configure the image processing module in the user space;

[0083] The instruction sending module 202 is used for, in response to receiving the picture saving instruction, the VFS sends the picture saving instruction to the picture management process;

[0084] The image processing module 203 is used to call the image processing module through the image management process and input the image to be processed into the image processing module to obtain image processing information;

[0085] The information storage module 204 is used to store image processing information.

[0086] In this embodiment, by carrying a file system, the configuration module configures the image processing module in the user space of the Fuse file system. When the instruction sending module receives the image saving instruction, the information storage module can use the image management process to call the image processing module to obtain image processing information when saving the image. By storing the image processing information, the application can directly use the image processing information when needed, without the need to develop image processing functions in the application, reducing the development pressure of the application, and can also effectively reduce the performance consumption and memory usage of the application when using the application.

[0087] Example 3

[0088] This embodiment provides an electronic device, which can be expressed in the form of a computing device (for example, a server device), including a memory, a processor, and a computer program stored in the memory and run on the processor, wherein when the processor executes the computer program, it can implement the image processing method based on the Fuse file system in the embodiment.

[0089] Figure 8 The hardware structure diagram of this embodiment is shown in FIG. Figure 8 As shown, the electronic device 9 specifically includes:

[0090] At least one processor 91, at least one memory 92, and a bus 93 for connecting different system components (including the processor 91 and the memory 92), wherein:

[0091] The bus 93 includes a data bus, an address bus, and a control bus.

[0092] The memory 92 includes a volatile memory, such as a random access memory (RAM) 921 and / or a cache memory 922 , and may further include a read-only memory (ROM) 923 .

[0093] Memory 92 also includes a program / utility 925 having a set (at least one) of program modules 924, such program modules 924 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0094] The processor 91 executes various functional applications and data processing by running computer programs stored in the memory 92, such as the image processing method based on the Fuse file system in Example 1 of the present invention.

[0095] The electronic device 9 can further communicate with one or more external devices 94 (e.g., a keyboard, pointing device, etc.). Such communication can be performed via an input / output (I / O) interface 95. Furthermore, the electronic device 9 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 96. The network adapter 96 communicates with other modules of the electronic device 9 via a bus 93. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the electronic device 9, including but not limited to microcode, device drivers, redundant processors, external disk drive arrays, RAID (RAID) systems, tape drives, and data backup storage systems.

[0096] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, depending on the embodiment of the present application, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.

[0097] Example 4

[0098] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the image processing method based on the Fuse file system in Embodiment 1 is implemented.

[0099] Specifically, the readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0100] In a possible implementation, the present invention can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to enable the terminal device to execute the image processing method based on the Fuse file system in Example 1.

[0101] The program code for executing the present invention may be written in any combination of one or more programming languages, and may be executed entirely on the user device, partially on the user device, as an independent software package, partially on the user device and partially on a remote device, or entirely on the remote device.

[0102] Although specific embodiments of the present invention have been described above, those skilled in the art will appreciate that these are merely illustrative and that the scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, and such changes and modifications are intended to fall within the scope of the present invention.

Claims

1. A method for image processing based on the Fuse file system, characterized in that: The Fuse file system includes a user space and a kernel space, and the image processing method includes the following steps: Configuring an image processing module in the user space; the image processing module includes an image classification algorithm; In response to receiving the picture saving instruction, the VFS sends the picture saving instruction to the picture management process; The image management process calls the image processing module and inputs the image to be processed into the image processing module to obtain image processing information; the image processing information includes image classification information; storing the image processing information; The user space includes the image management process and a first communication interface, the kernel space includes a second communication interface, and the step of the VFS sending the image save instruction to the image management process includes: The VFS sends the image saving instruction to the Fuse driver module; The Fuse driver module sends the picture saving instruction to the first communication interface through the second communication interface; The picture management process receives the picture saving instruction.

2. The image processing method based on the Fuse file system according to claim 1, characterized in that: The image management process includes a FuseDaemon process; and / or, The step of storing the image processing information includes: sending the image processing information to the second communication interface through the first communication interface; The image processing information is stored in the underlying file system.

3. The image processing method based on the Fuse file system according to claim 1, characterized in that: The image classification algorithm is an algorithm based on Tensorflow Lite model training.

4. The image processing method based on the Fuse file system according to claim 1, wherein: The step of storing the image processing information in the underlying file system includes: If there is a path corresponding to the image classification information in the underlying file system, the image to be processed is stored in the corresponding path; If the path corresponding to the image classification information does not exist in the underlying file system, a corresponding path is generated, and the image to be processed is stored in the corresponding path.

5. The image processing method based on the Fuse file system according to claim 4, characterized in that: After the step of storing the image to be processed in the corresponding path, the following step is further included: Get the target image; Obtain image classification information according to the path corresponding to the target image.

6. A picture processing system based on the Fuse file system, characterized in that: The Fuse file system includes a user space and a kernel space, and the image processing system includes: a configuration module, an instruction sending module, an image processing module and an information storage module; The configuration module is used to configure the image processing module in the user space; the image processing module includes an image classification algorithm; The instruction sending module is used for responding to receiving the picture saving instruction, and the VFS sends the picture saving instruction to the picture management process; The user space includes the image management process and the first communication interface, and the kernel space includes the second communication interface. The instruction sending module is further configured to, in response to receiving the image saving instruction, cause the VFS to send the image saving instruction to the Fuse driver module; the Fuse driver module sends the image saving instruction to the first communication interface via the second communication interface; and the image management process receives the image saving instruction; The image processing module is used to call the image processing module through the image management process, and input the image to be processed into the image processing module to obtain image processing information; the image processing information includes image classification information; The information storage module is used to store the image processing information.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the image processing method based on the Fuse file system according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the image processing method based on the Fuse file system according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Picture processing method, device, system, medium and program

    CN111507257A

  • Data sharing method and terminal equipment

    CN113938890A