Media resource processing method and device, electronic equipment and computer readable storage medium
The server obtains media resources based on non-mount mode and returns them to the client. Combined with remote procedure calls and two-layer cache, the performance and stability problems of media resource playback under the NFS protocol are solved, and efficient and stable media resource playback is achieved.
Patent Information
- Application Number
- CN202510287138.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-07-08
AI Technical Summary
When playing media resources through the Network File System (NFS) protocol, there are poor performance, resulting in black screen and frequent loading problems, affecting user experience and stability.
The server acquires media resources based on non-mount mode and returns them to the client. The client does not need to rely on the server kernel, and uses remote procedure calls and two-layer caching mechanisms for data access and caching.
It improves the playback performance and stability of media resources, solves the problems of black screen and frequent loading, and achieves stable and high-performance media resource playback.
Smart Images

Figure CN120281934A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to a method, apparatus, electronic device, and computer-readable storage medium for processing media resources. Background Art
[0002] The performance of the system media center in playing media resources through the Network File System (NFS) protocol has an obvious impact on the user experience. When the client plays media resources through the NFS protocol, it depends on the server kernel and directly reads the system disk of the server through the NFS protocol to obtain the media resources in the server. When the performance is poor, smooth playback cannot be achieved, and stability and compatibility will be affected. Therefore, when playing media resources through the NFS protocol, problems such as black screens and frequent loading often occur. Summary of the Invention
[0003] The embodiments of the present application provide a method, apparatus, electronic device, and computer-readable storage medium for processing media resources, which can play media resources stably and with high performance.
[0004] In a first aspect, the embodiments of the present application provide a method for processing media resources, which is applied to a server. The method includes:
[0005] When receiving an NFS access initiated by a client, determining the media resource corresponding to the NFS access;
[0006] Obtaining the media resource based on a non-mount mode; and
[0007] Returning the media resource to the client.
[0008] In a second aspect, the embodiments of the present application provide a method for processing media resources, which is applied to a client. The method includes:
[0009] Initiating an NFS access to a server; and
[0010] Obtaining the media resource returned by the server; the media resource is the media resource corresponding to the NFS access obtained by the server based on the non-mount mode.
[0011] In one embodiment, the initiating an NFS access to the server includes:
[0012] Initiating the NFS access to the server based on a remote procedure call.
[0013] In one embodiment, after obtaining the media resource returned by the server, the method further includes:
[0014] Perform two - layer caching on the media resource.
[0015] In one embodiment, the two - layer caching of the media resource includes:
[0016] Cache the media resource into the normal cache space;
[0017] When performing a jump operation on the media resource, obtain the target media resource corresponding to the jump operation from the media resource;
[0018] Cache the target media resource into the jump cache space.
[0019] In one embodiment, the initiating a Network File System (NFS) access to the server includes:
[0020] Query whether the media resource is included in the jump cache space;
[0021] When the media resource is not included in the jump cache space, query whether the media resource is included in the normal cache space;
[0022] When the media resource is not included in the normal cache space, initiate the NFS access to the server.
[0023] In a third aspect, an embodiment of the present application provides a media resource processing device, which is applied to a server. The device includes:
[0024] A determination module, configured to determine the media resource corresponding to the NFS access when receiving an NFS access initiated by a client;
[0025] An acquisition module, configured to acquire the media resource based on a non - mounting mode; and
[0026] A return module, configured to return the media resource to the client.
[0027] In a fourth aspect, an embodiment of the present application provides a media resource processing device, which is applied to a client. The device includes:
[0028] An initiating access module, configured to initiate an NFS access to a server; and
[0029] A resource acquisition module, configured to acquire the media resource returned by the server; the media resource is the media resource corresponding to the NFS access that the server acquires based on a non - mounting mode.
[0030] In one embodiment, the initiating access module includes:
[0031] An access initiation unit, configured to initiate the NFS access to the server based on a remote procedure call.
[0032] In one embodiment, after obtaining the media resource returned by the server, the device further includes:
[0033] A two - layer caching module, configured to perform two - layer caching on the media resource.
[0034] In one embodiment, the two - layer caching module includes:
[0035] A normal caching unit, configured to cache the media resource into a normal caching space;
[0036] A target acquisition unit, configured to, when performing a jump operation on the media resource, acquire the target media resource corresponding to the jump operation from the media resource;
[0037] A jump caching unit, configured to cache the target media resource into a jump caching space.
[0038] In one embodiment, the access initiation module includes:
[0039] A first query unit, configured to query whether the media resource is included in the jump caching space;
[0040] A second query unit, configured to, when the media resource is not included in the jump caching space, query whether the media resource is included in the normal caching space;
[0041] An access initiation unit, configured to, when the media resource is not included in the normal caching space, initiate the NFS access to the server.
[0042] In a fifth aspect, an embodiment of the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps in the above - mentioned media resource processing method are implemented.
[0043] In a sixth aspect, an embodiment of the present application further provides a computer - readable storage medium, on which a computer program is stored. When the computer program is executed by the processor, the steps in the above - mentioned media resource processing method are implemented.
[0044] In a seventh aspect, an embodiment of the present application further provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the various alternative implementations described in the embodiments of the present application.
[0045] In summary, in the embodiments of the present application, when a client initiates a Network File System (NFS) access, the server obtains media resources based on a non-mounting mode and returns the media resources to the client. In this way, the client does not need to rely on the server kernel and does not need to read the system disk of the server. Instead, the server obtains the media resources based on the non-mounting mode and transmits them to the client. Therefore, relatively high performance can be achieved, stability can be improved, compatibility problems can be solved, and the problems of black screens and frequent loading can be solved, thereby achieving stable and high-performance playback of media resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the present application, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those skilled in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0047] Figure 1 is a schematic diagram of the steps of a media resource processing method provided by an embodiment of the present application;
[0048] Figure 2 is a schematic diagram of the steps of another media resource processing method provided by an embodiment of the present application;
[0049] Figure 3 is a flowchart of a media resource processing method provided by an embodiment of the present application;
[0050] Figure 4 is a schematic diagram of the structure of a media resource processing device provided by an embodiment of the present application;
[0051] Figure 5 is a schematic diagram of the structure of another media resource processing device provided by an embodiment of the present application;
[0052] Figure 6 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0053] The technical solutions in the present application will be clearly and completely described below with reference to the accompanying drawings in the present application. Apparently, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present invention.
[0054] In one embodiment, as Figure 1 shown, a media resource processing method is provided. Although the logical order is shown in the step schematic diagram, in some cases, the steps shown or described may be executed in a different order from that shown in the drawings. Specifically, the media resource processing method can be applied to a server, where the server can be a physical server or a cloud server providing various cloud services. It should be noted that the present application does not limit the number of terminals or servers. According to the implementation requirements, there can be any number of terminals or servers. For example, the server can be a single server or a server cluster composed of multiple servers, etc. The following will be described in detail respectively. It should be noted that the description order of the following embodiments does not limit the priority order of the embodiments.
[0055] According to Figure 1 the media resource processing method shown, the method at least includes steps S110 to S130, which are introduced in detail as follows:
[0056] In step S110, when receiving a Network File System (NFS) access initiated by a client, determine the media resource corresponding to the NFS access.
[0057] The Network File System (NFS) access refers to an access or request through the NFS protocol. When the client initiates an NFS access to the server for a media resource, the server responds to the received NFS access initiated by the client and determines the media resource to be accessed by the NFS access. The media resource can be a resource for playback, such as video data.
[0058] NFS is a distributed file system protocol mainly used for remote file access and data sharing. NFS data transmission depends on Remote Procedure Call (RPC). The NFS access is initiated by the client to the server based on remote procedure call.
[0059] In step S120, obtain the media resource based on a non-mount mode.
[0060] Mounting refers to associating a storage device (such as a hard disk partition, a USB storage device, a network shared storage, etc.) or a file system (such as an NFS file system, a CIFS file system, etc.) to a specific directory. In this way, users can access the files in the storage device or file system by accessing this directory.
[0061] In the related art, when a client initiates an NFS access to a server, it can directly access the system disk of the server through the mounting mode and obtain media resources from the system disk.
[0062] Non - mounting refers to the state where the above - mentioned mounting operation is not performed. In this state, although the storage device or file system physically exists, their contents cannot be accessed through the regular mount point directory. For an unmounted hard disk partition, the system does not automatically recognize the file system structure and file contents in it. From the user's perspective, the files in this partition cannot be seen in the file manager, nor can it be accessed like a normal folder. For a network file system, if the mounting operation is not performed, the system cannot obtain the files in it through the corresponding mount point path, and operations such as file reading and writing cannot be performed.
[0063] In an embodiment of the present application, when there is no mounting operation on the system disk in the server, the client cannot access the system disk of the server based on the mounting mode. The server will actively obtain the media resources corresponding to the NFS access based on the non - mounting mode.
[0064] In step S130, return the media resources to the client.
[0065] The server returns the media resources corresponding to the actively obtained NFS access to the client.
[0066] The processing of the media resources obtained by the client can be referred to later.
[0067] Adopting the technical solution of the embodiment of the present application, when the client initiates an NFS access to the network file system, the server obtains the media resources based on the non - mounting mode and returns the media resources to the client. In this way, the client does not need to rely on the server kernel and does not need to read the system disk of the server. Instead, the server obtains the media resources based on the non - mounting mode and transmits them to the client. Therefore, it can achieve higher performance, improve stability and solve compatibility problems, solve the problems of black screen and frequent loading, and thus realize stable and high - performance playback of media resources.
[0068] In one embodiment, as Figure 2As shown, a media resource processing method is provided. Although the logical order is shown in the step schematic diagram, in some cases, the steps shown or described can be executed in an order different from that shown in the accompanying drawings. Specifically, the media resource processing method can be applied to a client, where the client can include, but is not limited to, one or more of a smart phone, a tablet computer, a portable computer, a desktop computer, and a vehicle-mounted computer. The following will be described in detail respectively. It should be noted that the description order of the following embodiments does not limit the priority order of the embodiments.
[0069] According to Figure 2 the media resource processing method shown, the method at least includes steps S210 to S220, which are introduced in detail as follows:
[0070] In step S210, initiate a Network File System (NFS) access to the server.
[0071] In step S220, obtain the media resource returned by the server; the media resource is the media resource corresponding to the NFS access obtained by the server based on the non-mount mode.
[0072] When the client initiates a Network File System (NFS) access to the server for a media resource, the server responds to the received NFS access initiated by the client and determines the media resource to be accessed by the NFS access. The media resource can be a resource for playback, such as video data.
[0073] If the server does not perform a mount operation on the system disk, the client cannot access the server's system disk based on the mount mode. The server will actively obtain the media resource corresponding to the NFS access based on the non-mount mode. The server returns the media resource corresponding to the actively obtained NFS access to the client. The client receives the media resource returned by the server.
[0074] Adopting the technical solution of the embodiment of the present application, when the client initiates a Network File System (NFS) access, the server obtains the media resource based on the non-mount mode and returns the media resource to the client. In this way, the client does not need to rely on the server kernel and does not need to read the server's system disk. Instead, the server obtains the media resource based on the non-mount mode and transmits it to the client. Therefore, relatively high performance can be achieved, stability can be improved, compatibility problems can be solved, and problems such as black screens and frequent loading can be solved, thereby realizing stable and high-performance playback of media resources.
[0075] Based on the above technical solution, as an embodiment, the initiating a Network File System (NFS) access to the server may include: initiating the NFS access to the server based on a Remote Procedure Call (RPC).
[0076] NFS is a distributed file system protocol mainly used for remote file access and data sharing. NFS data transfer relies on remote procedure calls. This NFS access is initiated by the client to the server based on remote procedure calls. Remote procedure calls provide a standardized interface for NFS, enabling the client to access the server as if it were calling a local function.
[0077] Remote procedure calls allow NFS to perform asynchronous operations. After the client initiates a request, it can continue to execute other operations without waiting for the server's response. The server will return the result to the client after processing the request. Therefore, system resources can be fully utilized, and the system's concurrent processing ability can be improved. Especially when dealing with a large number of file operations, the overall performance can be significantly enhanced.
[0078] Both remote procedure calls and NFS have good cross-platform characteristics. Whether the NFS server runs on a Linux, UNIX, or Windows system, as long as both the client and the server support the corresponding remote procedure call and NFS protocol versions, the client can access the NFS service through the remote procedure call mechanism.
[0079] Remote procedure calls support a data caching mechanism in NFS access. The client can cache the data read from the server. When the same data needs to be accessed again, it can be directly obtained from the cache, reducing network transmission overhead and improving access speed.
[0080] Based on the above technical solution, as an embodiment, after obtaining the media resource returned by the server, the method may further include: performing two-layer caching on the media resource.
[0081] After the client receives the media resource returned by the server, it can perform two-layer caching on the media resource. The two-layer caching includes ordinary caching and jump (seek) caching. Performing ordinary caching on the media resource means caching the media resource in the ordinary cache space, and performing jump caching on the media resource means caching the media resource in the jump cache space.
[0082] Adopting the technical solution of the embodiment of the present application, when the client needs to access the same media resource again, it can directly obtain the media resource from the two-layer cache of the client, reducing network transmission overhead and improving access speed.
[0083] Based on the above technical solution, as an embodiment, performing two-layer caching on the media resource may include: caching the media resource in the ordinary cache space; when performing a jump operation on the media resource, obtaining the target media resource corresponding to the jump operation from the media resource; caching the target media resource in the jump cache space.
[0084] The first - level cache in the two - level cache for media resources can be that when a seek operation is performed on the media resource, the target media resource corresponding to the seek operation is obtained from the media resource, and the target media resource is cached in the seek cache space. The second - level cache in the two - level cache for media resources can be that the media resource is cached in the normal cache space.
[0085] Among them, the seek cache space has an extremely fast access speed and can quickly respond to requests. The caching speed of the normal cache space is slightly slower than that of the seek cache space, but its capacity is larger.
[0086] A seek operation refers to an operation of moving the read - write position in data structures such as files or streams. In the playback of media resources such as audio and video, a seek operation means that a user or a program quickly moves the playback position to any time point in the media file. Corresponding to the specific implementation, it is to position the playback pointer to the position in the media file corresponding to that time point. The seek operation is the basis for implementing functions such as fast - forward, rewind, and jumping to a specified time in media playback. Through precise control of the seek operation, the media player can provide users with a flexible playback experience and meet the playback needs of different users in different scenarios. For example, when watching a video tutorial, if you have already understood the previous part, you can use the seek operation to quickly jump to the key content part later.
[0087] The target media resource is a subset of the media resource. The target media resource corresponding to the seek operation refers to the resources near the time point when the playback position is moved to any time point in the media file. For example, when the user drags the progress bar of the playing video to the 10th minute, the video segments from the 9th to the 11th minute near the 10th minute can be the target media resource.
[0088] When a seek operation is performed on the media resource, the client can obtain the target media resource corresponding to the seek operation from the media resource and cache the target media resource in the seek cache space.
[0089] When the client needs to access the same media resource again, it can first obtain the media resource from the seek cache space; when the media resource cannot be obtained from the seek cache space, it can obtain the media resource from the normal cache space; when the media resource cannot be obtained from the normal cache space, it then initiates an NFS access to the server.
[0090] The data cached in the seek cache space is the most likely to be used data determined according to the recent access pattern; the normal cache space prefetches data from a wider data source to supplement the deficiencies of the first - level cache.
[0091] With the technical solution of the embodiment of the present application, when the jump cache space is not hit, the ordinary cache space can be used as a supplement to provide relatively fast data access, reduce the time to obtain data from the server, and overall improve the data access efficiency.
[0092] Based on the above technical solution, as an embodiment, the initiating of the Network File System (NFS) access to the server may include: querying whether the media resource is included in the jump cache space; when the media resource is not included in the jump cache space, querying whether the media resource is included in the ordinary cache space; and when the media resource is not included in the ordinary cache space, initiating the NFS access to the server.
[0093] Before the client initiates an NFS access to the server, it can first query whether the media resource requested for access is included in the jump cache space. When the media resource requested for access is not included in the jump cache space, it can then query whether the media resource requested for access is included in the ordinary cache space. When the media resource requested for access is not included in the ordinary cache space either, the NFS access to the server is initiated.
[0094] With the technical solution of the embodiment of the present application, by first querying whether there is a media resource in the two-layer cache on the client side, it is possible to avoid downloading repeatedly from the server, save bandwidth, reduce the number of requests received by the server, and reduce the pressure on the server to process requests and transmit data.
[0095] Figure 3 It is a schematic flowchart of a media resource processing method provided by an embodiment of the present application. In step S1, URL parsing. The client can obtain the server address, determine the resource path, and construct a request through URL parsing. In step S2, establish Remote Procedure Call (RPC) and NFS. The client can establish RPC and NFS with the server. In step S3, perform NFS protocol interaction. In step S4, perform resource caching. In step S5, perform two-layer caching. In step S6, read the resource. In step S7, play the resource. In step S8, preload the resource based on the non-mounted mode. In step S9, request the server.
[0096] By adopting the technical solution of the embodiment of the present application, the NFS file access to the system is optimized in terms of performance, stability and compatibility. It does not depend on the kernel, adds NFS protocol support in the Android MediaServer, increases the non-mounting mode based on the underlying RPC without mounting the system disk, manages files using ordinary caches, and at the same time adds jump caches in a two-layer cache mode to ensure that the file seek reading performance is maximized, supports the playback of files with a bit rate of 130 Mbps. At the same time, the NFS support protocol versions V2 / V3 / V4 make the compatibility with the NFS service node better, and the non-mounting mode solves the stability problem.
[0097] To facilitate the better implementation of the media resource processing method of the present application, the present application also provides a media resource processing device based on the above media resource processing method. The meanings of the nouns are the same as those in the above media resource processing method, and the specific implementation details can be referred to the description in the method embodiment.
[0098] Please refer to Figure 4 , Figure 4 FIG. is a schematic structural diagram of the media resource processing device provided by the embodiment of the present application, where the media resource processing device is applied to a server, and the media resource processing device includes:
[0099] A determination module 401, configured to determine the media resource corresponding to the NFS access when receiving an NFS access initiated by a client;
[0100] An acquisition module 402, configured to acquire the media resource based on a non-mounting mode; and
[0101] A return module 403, configured to return the media resource to the client.
[0102] By adopting the technical solution of the embodiment of the present application, when a client initiates an NFS access to a network file system, the server acquires a media resource based on a non-mounting mode and returns the media resource to the client. In this way, the client does not need to depend on the server kernel and does not need to read the system disk of the server. Instead, the server acquires the media resource based on the non-mounting mode and transmits it to the client. Therefore, relatively high performance can be achieved, stability can be improved, compatibility problems can be solved, and the problems of black screen and frequent loading can be solved, so as to achieve stable and high-performance playback of media resources.
[0103] Please refer to Figure 5 , Figure 5 FIG. is a schematic structural diagram of the media resource processing device provided by the embodiment of the present application, where the media resource processing device is applied to a client, and the media resource processing device includes:
[0104] An access initiation module 501 for initiating a Network File System (NFS) access to a server; and
[0105] A resource acquisition module 502 for acquiring media resources returned by the server; the media resources are the media resources corresponding to the NFS access obtained by the server based on a non-mount mode.
[0106] In one embodiment, the access initiation module 501 includes:
[0107] An access initiation unit for initiating the NFS access to the server based on a Remote Procedure Call (RPC).
[0108] In one embodiment, after acquiring the media resources returned by the server, the apparatus further includes:
[0109] A two-level caching module for performing two-level caching on the media resources.
[0110] In one embodiment, the two-level caching module includes:
[0111] A normal caching unit for caching the media resources into a normal caching space;
[0112] A target acquisition unit for acquiring, when a jump operation is performed on the media resources, target media resources corresponding to the jump operation from the media resources;
[0113] A jump caching unit for caching the target media resources into a jump caching space.
[0114] In one embodiment, the access initiation module 501 includes:
[0115] A first query unit for querying whether the jump caching space includes the media resources;
[0116] A second query unit for querying whether the normal caching space includes the media resources when the jump caching space does not include the media resources;
[0117] An access initiation unit for initiating the NFS access to the server when the normal caching space does not include the media resources.
[0118] Adopting the technical solution of the embodiment of the present application, when the client initiates a Network File System (NFS) access, the server obtains the media resource based on the non-mount mode and returns the media resource to the client. In this way, the client does not need to rely on the server kernel and does not need to read the system disk of the server. Instead, the server obtains the media resource based on the non-mount mode and transmits it to the client. Therefore, relatively high performance can be achieved, stability can be improved, compatibility problems can be solved, and the problems of black screen and frequent loading can be solved, so as to realize stable and high-performance playback of media resources.
[0119] For the specific limitations of the media resource processing device, reference can be made to the limitations on the media resource processing method in the above text, which will not be elaborated here. Each module in the above media resource processing device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in hardware form or be independent of it, or be stored in the memory in the computer device in software form, so that the processor can call and execute the operations corresponding to the above respective modules.
[0120] In addition, the present application also provides an electronic device, as Figure 6 shown, which shows the structural schematic diagram of the electronic device involved in the present application. Specifically:
[0121] The electronic device may include components such as a processor 601 with one or more processing cores and a memory 602 with one or more computer-readable storage media. Those skilled in the art can understand that Figure 6 the structure of the electronic device shown in
[0122] does not constitute a limitation on the electronic device, and it may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Among them:
[0123] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the electronic device. In addition, the memory 602 can include high-speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 602 can also include a memory controller to provide the processor 601 with access to the memory 602.
[0124] In one embodiment, the electronic device further includes a power supply 603 for supplying power to each component. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 603 can also include any components such as one or more DC or AC power supplies, a recharge system, a power device debugging circuit, a power converter or inverter, and a power status indicator.
[0125] In one embodiment, the electronic device may further include an input unit 604, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
[0126] Although not shown, the electronic device may further include a display unit, etc., which will not be elaborated here. Specifically, in this embodiment, the processor 601 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 601 will run the application programs stored in the memory 602, so as to implement the steps in any of the media resource processing methods provided by the embodiments of the present application.
[0127] Those skilled in the art can understand that Figure 6 the structure shown in
[0128] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0129] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in any embodiment of the present application is implemented.
[0130] In some embodiments, a computer program product is further proposed, including a computer program or instruction. When the computer program or instruction is executed by a processor, the method described in any embodiment of the present application is implemented.
[0131] For the specific implementation of each of the above operations, reference may be made to the previous embodiments and will not be elaborated here.
[0132] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0133] Therefore, the present application provides a computer-readable storage medium, on which a computer program is stored. The computer program can be loaded by a processor to execute the steps in any of the media resource processing methods provided by the present application.
[0134] For the specific implementation of each of the above operations, reference may be made to the previous embodiments and will not be elaborated here.
[0135] Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.
[0136] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the media resource processing methods provided by the present application, the beneficial effects achievable by any of the media resource processing methods provided by the present application can be achieved. For details, reference may be made to the previous embodiments and will not be elaborated here.
[0137] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the existence of additional identical elements in the process, method, article or terminal device comprising the said element.
[0138] The above has introduced in detail a media resource processing method, apparatus, electronic device and computer-readable storage medium provided by the present application. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A media resource processing method, characterized in that, Applied to a server, the method includes: When receiving a Network File System (NFS) access initiated by a client, determining the media resource corresponding to the NFS access; Obtaining the media resource based on a non-mount mode; and Returning the media resource to the client.
2. A media resource processing method, characterized in that, Applied to a client, the method includes: Initiating a Network File System (NFS) access to a server; and Obtaining the media resource returned by the server; the media resource is the media resource corresponding to the NFS access obtained by the server based on a non-mount mode.
3. The method according to claim 2, wherein The initiating a Network File System (NFS) access to the server includes: Initiating the NFS access to the server based on a Remote Procedure Call (RPC).
4. The method according to claim 2, wherein After obtaining the media resource returned by the server, the method further includes: Performing two-layer caching on the media resource.
5. The method according to claim 4, wherein The performing two-layer caching on the media resource includes: Caching the media resource in a normal cache space; When performing a jump operation on the media resource, obtaining the target media resource corresponding to the jump operation from the media resource; Caching the target media resource in a jump cache space.
6. The method according to claim 5, wherein The initiating a Network File System (NFS) access to the server includes: Querying whether the jump cache space includes the media resource; When the jump cache space does not include the media resource, querying whether the normal cache space includes the media resource; When the normal cache space does not include the media resource, initiating the NFS access to the server.
7. A media resource processing device, characterized in that, Applied to a server, the apparatus includes: A determination module, configured to determine the media resource corresponding to the NFS access when receiving a Network File System (NFS) access initiated by a client; An obtaining module, configured to obtain the media resource based on a non-mount mode; and A returning module, configured to return the media resource to the client.
8. A media resource processing device, characterized in that, Applied to a client, the apparatus includes: An initiating access module, configured to initiate a Network File System (NFS) access to a server; and A resource obtaining module, configured to obtain the media resource returned by the server; the media resource is the media resource corresponding to the NFS access obtained by the server based on a non-mount mode.
9. An electronic device, characterized in that, Including a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, the steps in the media resource processing method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium, characterized in that, A computer program is stored on a computer-readable storage medium, and when the computer program is executed by a processor, the steps in the media resource processing method according to any one of claims 1 to 6 are implemented.