Localization processing method of multimedia file and related equipment
By combining encryption and storage strategies with an offline authentication mechanism, the problems of inconsistent versions, poor security, and strong network dependence in multimedia file management are solved, achieving efficient, secure management and consistent display on terminal devices.
Patent Information
- Application Number
- CN202511251711.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-03
- Publication Date
- 2026-02-24
AI Technical Summary
Existing multimedia file management solutions suffer from problems such as chaotic version management, non-standard storage paths, low retrieval efficiency, poor data security, and strong network dependence. They are particularly unusable in weak or offline network scenarios, resulting in insufficient display clarity.
Multimedia files are managed locally using preset encryption and storage strategies. Combined with offline authentication and update mechanisms, file version consistency and security are ensured. The offline retrieval and update mechanism allows for normal use in weak network or offline environments.
It enables efficient and secure management of multimedia files on terminal devices, ensures file version consistency, improves retrieval speed and data security, reduces network dependence, and supports normal use in weak network or offline scenarios.
Smart Images

Figure CN121560841A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method and related equipment for localizing multimedia files. Background Technology
[0002] In industries such as venue rental, event planning, and exhibition services, sales personnel need to present brand and store-related information to customers during in-store sales interactions to facilitate transactions.
[0003] For multimedia files held by business personnel, management solutions relying on local terminal devices generally have the following shortcomings: 1) Version management is rather chaotic. The version of the materials held by business personnel may be different from the latest version of the company, and the versions of the materials held by different business personnel may also be different. 2) The storage paths of materials on the device are chaotic, resulting in low retrieval efficiency; 3) The materials are distributed directly to business personnel in the form of files. The loss of business personnel may lead to the leakage or theft of materials, and data security cannot be guaranteed. Management solutions based on online sales negotiation systems generally require a constant network connection to retrieve data, which has the following drawbacks: 1) It is highly dependent on the network. In some weak network scenarios (such as in a large banquet hall) or when the network is down, the materials cannot be accessed, which leads to the interruption of communication for business personnel. 2) In order to shorten the time required to download materials online, it is usually necessary to reduce the resolution of the materials to compress the file size, resulting in poor resolution of the final displayed materials.
[0004] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention
[0005] The main objective of this application is to propose a method and related equipment for localizing multimedia files, which can achieve efficient and secure localized management of multimedia files and ensure, to a certain extent, that the file version held by the user is the latest version and that the file versions held by each user are consistent.
[0006] To achieve the above objectives, one aspect of this application proposes a method for localizing multimedia files, the method comprising: For the first time the terminal is started, the system is initialized, the user account database and the full set of multimedia files are obtained from the cloud resource pool, and the user account database and the multimedia files are encrypted and stored in the local database of the terminal according to the preset encryption strategy and the preset storage strategy. Obtain the login information entered by the user, and perform offline authentication of the user's login request based on the login information and the user account database; Obtain the user-input call information, retrieve the material file from the local database according to the call information and the preset search strategy, and decrypt, render and display the material file; Obtain the user's network status information, and determine whether the local database needs to be updated based on the network status information and preset update rules; When it is necessary to update the local database, the data of the local database and the cloud resource pool are compared to obtain the comparison result, and the local database is updated according to the comparison result.
[0007] In some embodiments, the preset encryption strategy includes: Obtain the first key created during system initialization, and generate a salt value based on the multimedia file; Determine the file encryption key based on the first key and the salt value; The multimedia file is encrypted in blocks according to the file encryption key.
[0008] In some embodiments, the preset storage strategy includes: The filename of the multimedia file in the cloud resource pool is encrypted to obtain a first encryption result; The storage location of the corresponding multimedia file in the local database is determined based on the file type of the multimedia file and the first encryption result.
[0009] In some embodiments, the login information includes input account information and input password information. The step of obtaining the user-input login information and performing offline authentication of the user's login request based on the login information and the user account database includes: Obtain the user account table and user password hash values from the user account database; Determine whether the entered account information is valid based on the user account table; If the input account information is valid, calculate the hash value of the input password information to obtain the input password hash value; Determine whether the input password hash value and the user password hash value are consistent; If the input password hash value and the user password hash value are the same, it is determined that the user's login request has passed offline authentication.
[0010] In some embodiments, the preset retrieval strategy includes: The request file format type and request file name are obtained based on the call information; Determine the top-level directory of the target file based on the requested file format type; The requested file name is encrypted to obtain a second encryption result; The second-level directory of the target file is determined based on the second encryption result; Determine whether the target file's subdirectory contains the material file corresponding to the requested file name; If the media file does not exist, a media loading error message is returned to the terminal. When the material file exists, it is decrypted and rendered for display based on the encryption salt key of the material file.
[0011] In some embodiments, determining whether the local database needs to be updated based on the network status information and preset update rules includes: Determine whether the user is in a stable network condition based on the network status information; When the user has a stable network connection, it is determined that the local database needs to be updated.
[0012] In some embodiments, the comparison result includes a list of expired materials and a list of materials to be updated, and updating the local database based on the comparison result includes: Delete expired materials from the local database according to the expired material list; Update the old version materials in the local database according to the list of materials to be updated; The missing materials in the local database are incrementally downloaded based on the list of materials to be updated.
[0013] To achieve the above objectives, another aspect of this application provides a multimedia file localization processing apparatus, the apparatus comprising: The initialization and encrypted storage module is used to perform system initialization on the terminal upon first startup, obtain the user account database and the full set of multimedia files from the cloud resource pool, and encrypt and store the user account database and the multimedia files in the local database of the terminal according to the preset encryption strategy and the preset storage strategy. The offline authentication module is used to obtain the login information entered by the user and perform offline authentication on the user's login request based on the login information and the user account database. The offline invocation module is used to obtain invocation information input by the user, retrieve material files from the local database according to the invocation information and a preset retrieval strategy, and decrypt, render, and display the material files; The update condition judgment module is used to obtain the user's network status information and, based on the network status information and preset update rules, determine whether the local database needs to be updated. The local database update module is used to compare the data of the local database and the cloud resource pool when it is necessary to update the local database, obtain the comparison result, and update the local database according to the comparison result.
[0014] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the methods described above.
[0015] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods described above.
[0016] To achieve the above objectives, another aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the methods described above. The embodiments of this application include at least the following beneficial effects: This application provides a method and related equipment for localizing multimedia files. This solution encrypts and stores the user account database and all multimedia files obtained from the cloud resource pool through a preset encryption strategy and a preset storage strategy. The storage strategy optimizes the storage structure, ensuring that files are stored in an orderly manner on the terminal device, facilitating management, location, retrieval, and compatibility expansion. The encryption strategy effectively restricts users' unauthorized operations on multimedia files, reducing the security risk of data leakage. Offline authentication is achieved through user-input login information and the user account database, which reduces the solution's dependence on the network and supports weak network and offline network scenarios. The system enables normal retrieval, retrieval, and display of media materials. It retrieves multimedia files from the local database based on user-inputted information and retrieval strategies. Combined with the storage optimization strategies implemented in previous steps, it can quickly retrieve target files from the local media library based on user input, effectively improving retrieval speed. Based on network status information and preset update rules, it determines whether the local database needs updating, quickly responding to update instructions from the cloud to ensure that multimedia files on user terminals are the latest versions and that file versions remain consistent across all user terminals. Updates to the local database based on comparison results allow for processing only the parts requiring updating, improving update efficiency. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the steps of a multimedia file localization method provided in an embodiment of this application. Figure 2This is a schematic diagram of the workflow of a multimedia file localization processing method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a multimedia file localization processing device provided in an embodiment of this application; Figure 4 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0020] The concept of the present invention will now be explained in conjunction with the background art.
[0021] Taking the wedding banquet hotel / wedding venue industry as an example, the customer lifecycle includes: initial online understanding, in-depth on-site visit, signing of contract, pre-planning services, and services on the wedding day. Among these, the "in-depth on-site visit" is the core scenario for sales conversion. During this process, sales staff need to show customers brand and store-related materials (including multimedia files such as pictures, videos, and documents).
[0022] To ensure that clients have a clear understanding and full confidence in the expected results of the service, it is necessary to ensure that sales personnel have sufficient and consistent materials, without any missing, outdated, or inconsistent versions; before presenting materials, they should be able to quickly locate and retrieve the target materials; when presenting materials, they should be able to load multimedia files such as images and videos smoothly, with the resolution meeting the requirements and the picture being clear and without lag.
[0023] Currently, the industry primarily employs the following two solutions to manage multimedia files held by sales personnel: 1) Store all multimedia files directly on the sales personnel's terminal devices (such as the local folder of a tablet computer). Remind the sales personnel to update the data on their terminals through update instructions issued by headquarters. The sales personnel should manually update and delete outdated or invalid data.
[0024] 2) By using sales negotiation systems available on the market, remote management and access to multimedia files can be achieved. When sales personnel need to present materials, the system connects to the network to read the data and downloads the multimedia files to the local machine for presentation.
[0025] The above solutions each have the following problems: 1) Version management is chaotic. The version of materials held by business personnel may be different from the latest version of the company, and the versions of materials held by different business personnel may also be different; the storage path of materials on devices is chaotic, resulting in low retrieval efficiency; materials are directly distributed to business personnel in the form of files, and the loss of business personnel may lead to leakage or theft of materials, and data security cannot be guaranteed. 2) It is highly dependent on the network. In some weak network scenarios (such as in a large banquet hall) or when the network is down, the materials cannot be accessed, which leads to the interruption of communication between business personnel. In order to shorten the time required to download materials online, it is usually necessary to reduce the resolution of the materials to compress the file size, resulting in poor resolution of the final displayed materials.
[0026] In view of this, the main objective of this application is to propose a method and related device for localizing multimedia files. Through preset encryption strategies, storage strategies, offline authentication mechanisms, offline calling mechanisms, and file update mechanisms, it can achieve efficient and secure localized management of multimedia files, and can ensure to a certain extent that the file version held by the user is the latest version and that the file versions held by each user are consistent.
[0027] This application provides a method for localizing multimedia files, relating to the field of information technology. This method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or in-vehicle terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application implementing a method for localizing multimedia files, but is not limited to the above forms.
[0028] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0029] Figure 1 This is an optional flowchart of a multimedia file localization processing method provided in an embodiment of this application. Figure 1 The method may include, but is not limited to, steps S101 to S105.
[0030] S101. Initialize the system for the terminal that is started for the first time, obtain the user account database and the full set of multimedia files from the cloud resource pool, and encrypt and store the user account database and multimedia files in the local database of the terminal according to the preset encryption policy and the preset storage policy. In some embodiments, the preset encryption strategy includes: S1011. Obtain the first key created during system initialization and generate a salt value based on the multimedia file; S1012. Determine the file encryption key based on the first key and the salt value; S1013. Encrypt the multimedia file in blocks according to the file encryption key.
[0031] In some embodiments, the preset storage strategy includes: S1014. Encrypt the filename of the multimedia file in the cloud resource pool to obtain the first encryption result; S1015. Determine the storage location of the corresponding multimedia file in the local database based on the file type of the multimedia file and the first encryption result.
[0032] Specifically, in this embodiment, the local database stored in the terminal is asynchronous with the current cloud resource pool, and the content of the local database is the same as the full set of files in the cloud at the time of the last update. The cloud resource pool uses a distributed file system to store the current full set of multimedia files. The company headquarters updates the resource pool at any time through internal management software. Newly uploaded resources are automatically watermarked with a tiled watermark, and facial recognition technology is used to avoid watermarking faces. In the cloud resource pool, frequently accessed material sections are marked, and these materials are prioritized for updating during subsequent incremental updates.
[0033] For example, refer to Figure 2 System initialization requires an internet connection. The actual operation sequence is as follows: First, install the relevant software on the terminal. After opening the software for the first time, create the application's external storage directory, root directory, and first-level directories for each file type (i.e., divide the first-level directories by file type). Then, generate an encryption salt key (i.e., the first key) corresponding to the software to prepare for subsequent encrypted storage of multimedia files. Finally, download all files from the cloud resource pool (including user account database and multimedia files, etc.) to the terminal and encrypt and store them in the local database. If the current terminal is offline or other special circumstances prevent the local database from being downloaded, the software system will display an error message and the application will not be able to be accessed temporarily.
[0034] In this embodiment, the specific content of the encryption strategy is as follows: generate a salt value based on the content of the file to be encrypted, combine the salt value and the first key to form a file encryption key, and use the file encryption key to encrypt the file in blocks.
[0035] The specific content of the storage strategy is as follows: 256 second-level directories are built under each first-level directory. The names of the second-level directories are 00-FF in hexadecimal. The names of the files to be stored in the cloud resource pool are MD5 encrypted to obtain the hexadecimal encryption result. The first two characters of the encryption result (such as "10") are taken and the file to be stored is stored in the corresponding second-level directory. In this way, a large number of files are evenly distributed among the 256 subdirectories.
[0036] It can be recognized that the encryption strategy adopted in this embodiment has the following beneficial effects: 1) Encrypting files stored on the terminal by combining the file content and the first key can effectively prevent unauthorized access outside the application and reduce the risk of image / video materials being leaked and stolen by others.
[0037] The storage strategy adopted in this embodiment has the following beneficial effects: 1) The storage structure is optimized by using efficient sharding, which avoids slow retrieval caused by too many files in a single folder and effectively improves file read and write efficiency.
[0038] 2) By combining the original filename with the MD5 prefix to form a unique storage path, the storage location can be quickly deduced from the filename, and the system can easily index and migrate files in batches (which can be used for incremental updates in subsequent steps), thus improving the efficiency of locating, calling and updating.
[0039] 3) The fragmentation rules are simple and unified, which can be seamlessly connected to the distributed storage system, support the dynamic expansion of massive files, adapt to application scenarios with large material size (such as when the total material size is more than 60G), and have low post-maintenance costs.
[0040] S102. Obtain the login information entered by the user, and perform offline authentication of the user's login request based on the login information and the user account database; In some embodiments, obtaining login information input by the user and performing offline authentication of the user's login request based on the login information and a user account database includes: S1021. Obtain the user account table and user password hash value from the user account database; S1022. Determine whether the entered account information is valid based on the user account table; S1023. When the entered account information is valid, calculate the hash value of the entered password information to obtain the hash value of the entered password; S1024. Determine whether the hash value of the input password and the hash value of the user password are consistent; S1025. When the input password hash value matches the user password hash value, it is determined that the user's login request has passed offline authentication.
[0041] Specifically, in this embodiment, an offline verifiable mechanism that allows login even when the network is disconnected is implemented based on a locally stored user account database. During the system initialization step, the user account database obtained from the cloud resource pool contains an encrypted user account table and user password hash values. The user password hash values are stored locally in non-plaintext format and used as an inner-layer additional key.
[0042] For example, the steps for implementing offline authentication in this embodiment are as follows: First, the validity of the account is determined based on whether the account entered by the user exists in the encrypted user account table and whether the account status is normal; second, after the account passes the validity verification, the correctness of the user password is determined based on whether the hash value of the password entered by the user matches the hash value of the user password stored locally; finally, when the account entered by the user is valid and the password matches, the user's offline login request is considered to have passed offline authentication, and the user enters the login state, and can manage, call and display the files stored in the local database.
[0043] S103. Obtain the call information input by the user, retrieve the material file from the local database according to the call information and the preset search strategy, and decrypt, render and display the material file; In some embodiments, the preset retrieval strategy includes: S1031. Obtain the requested file format type and requested file name based on the call information; S1032. Determine the top-level directory of the target file based on the requested file format type; S1033. Encrypt the requested file name to obtain the second encryption result; S1034. Determine the second-level directory of the target file based on the second encryption result; S1035. Determine if a material file corresponding to the requested file name exists in the second-level directory of the target file; S1036. If the media file does not exist, return a media loading error message to the terminal; S1037. When the source file exists, decrypt and render the source file according to the encryption salt key of the source file.
[0044] Specifically, in this embodiment, the process for a user to access multimedia materials locally is as follows: First, the user's access information is obtained through the terminal, and the requested file format type and file name are extracted from the access information; then, the corresponding first-level directory is searched based on the requested file format type; next, the corresponding second-level directory is searched based on the first two characters of the MD5 encrypted file name; finally, the existence of a file with the current file name is checked in the corresponding second-level directory. If no material file is found, it is displayed as an icon placeholder to remind the user that the material loading is abnormal. If the material exists normally, it is decrypted and rendered according to the encryption salt key of the material file.
[0045] S104. Obtain the user's network status information, and determine whether the local database needs to be updated based on the network status information and the preset update rules. In some embodiments, determining whether the local database needs to be updated based on network status information and preset update rules includes: S1041. Determine whether the user is in a stable network state based on network status information; S1042. When the user is in a stable network condition, determine that the local database needs to be updated.
[0046] Specifically, in this embodiment, it is determined whether the material needs to be updated based on the user's network status and preset update rules.
[0047] For example, in this embodiment, the user's network status can be automatically detected every hour. The network status is determined by a timeout detection method, specifically: a request is sent to the target server. If no response is received within a preset time (i.e., timeout), the network connection is considered abnormal; otherwise, the network is considered to be unobstructed. When the network is abnormal, no update is performed, and the existing local data is maintained. When the network is unobstructed, it is determined that the local data update process needs to be performed.
[0048] S105. When it is necessary to update the local database, compare the data between the local database and the cloud resource pool, obtain the comparison results, and update the local database according to the comparison results.
[0049] In some embodiments, the comparison results include a list of expired materials and a list of materials to be updated. Updating the local database based on the comparison results includes: S1051. Delete expired materials from the local database based on the list of expired materials; S1052. Update the old version materials in the local database according to the list of materials to be updated; S1053. Download missing materials from the local database incrementally based on the list of materials to be updated.
[0050] Specifically, in this embodiment, when the update conditions are met, the update can be automatically executed in the background. The update process includes: first, comparing data between the cloud resource pool and the local database to obtain a list of expired materials and a list of materials to be updated; then, selectively deleting unnecessary files (such as old version materials and obsolete case studies) from the local storage based on the list of expired materials; and finally, downloading missing or outdated material files (such as newly added case study videos and optimized images) from the local storage based on the list of materials to be updated.
[0051] It can be recognized that this embodiment updates the local database based on the data comparison results, which can selectively delete invalid files, reduce storage space usage, and download only the content that needs to be updated, thereby reducing the total size of the files that need to be downloaded. This facilitates rapid synchronization between the terminal storage layer and the cloud resource pool, and improves update efficiency.
[0052] Please see Figure 3 This application also provides a multimedia file localization processing apparatus that can implement the above-described method. The apparatus includes: The initialization and encrypted storage module is used to perform system initialization on the terminal upon first startup, obtain the user account database and the full set of multimedia files from the cloud resource pool, and encrypt and store the user account database and multimedia files in the terminal's local database according to the preset encryption and storage policies. The offline authentication module is used to obtain the login information entered by the user and perform offline authentication on the user's login request based on the login information and the user account database. The offline invocation module is used to obtain the invocation information input by the user, retrieve the material files from the local database according to the invocation information and the preset retrieval strategy, and decrypt, render and display the material files; The update condition judgment module is used to obtain the user's network status information and, based on the network status information and preset update rules, determine whether the local database needs to be updated. The local database update module is used to compare data between the local database and the cloud resource pool when an update is needed, obtain the comparison results, and update the local database based on the comparison results.
[0053] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0054] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0055] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0056] Please see Figure 4 , Figure 4 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 902 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 902 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called and executed by the processor 901 using the methods described in the embodiments of this application. The input / output interface 903 is used to implement information input and output; The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904); The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.
[0057] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0058] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0059] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0060] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0061] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0062] This application provides a method and related equipment for localizing multimedia files. The method involves encrypting and storing a user account database and all multimedia files obtained from a cloud resource pool using preset encryption and storage strategies. The storage strategy optimizes the storage structure, ensuring files are stored orderly on the terminal device, facilitating management, location, retrieval, and compatibility. The encryption strategy effectively restricts unauthorized user operations on multimedia files, reducing the risk of data leakage. Offline authentication is achieved using user-input login information and the user account database, reducing the solution's reliance on the network and supporting weak network conditions. In network scenarios, the system enables normal retrieval, retrieval, and display of media materials. It retrieves multimedia files from the local database based on user-inputted information and retrieval strategies. Combined with the storage optimization strategies implemented in previous steps, it can quickly retrieve target files from the local media library based on user input, effectively improving retrieval speed. Based on network status information and preset update rules, it determines whether the local database needs updating, quickly responding to update instructions from the cloud to ensure that multimedia files on user terminals are the latest versions and that file versions across all user terminals are consistent. Based on comparison results, it updates the local database, processing only the parts that need updating, thus improving update efficiency.
[0063] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0064] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0065] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0066] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0067] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0068] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0069] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0070] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0071] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0072] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0073] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for localizing multimedia files, characterized in that, include: For the first time the terminal is started, the system is initialized, the user account database and the full set of multimedia files are obtained from the cloud resource pool, and the user account database and the multimedia files are encrypted and stored in the local database of the terminal according to the preset encryption strategy and the preset storage strategy. Obtain the login information entered by the user, and perform offline authentication of the user's login request based on the login information and the user account database; Obtain the user-input call information, retrieve the material file from the local database according to the call information and the preset search strategy, and decrypt, render and display the material file; Obtain the user's network status information, and determine whether the local database needs to be updated based on the network status information and preset update rules; When it is necessary to update the local database, the data of the local database and the cloud resource pool are compared to obtain the comparison result, and the local database is updated according to the comparison result.
2. The method for localizing multimedia files according to claim 1, characterized in that, The preset encryption strategy includes: Obtain the first key created during system initialization, and generate a salt value based on the multimedia file; Determine the file encryption key based on the first key and the salt value; The multimedia file is encrypted in blocks according to the file encryption key.
3. The method for localizing multimedia files according to claim 1, characterized in that, The preset storage strategy includes: The filename of the multimedia file in the cloud resource pool is encrypted to obtain a first encryption result; The storage location of the corresponding multimedia file in the local database is determined based on the file type of the multimedia file and the first encryption result.
4. The method for localizing multimedia files according to claim 1, characterized in that, The login information includes input account information and input password information. The step of obtaining the user's input login information and performing offline authentication of the user's login request based on the login information and the user account database includes: Obtain the user account table and user password hash values from the user account database; Determine whether the entered account information is valid based on the user account table; If the input account information is valid, calculate the hash value of the input password information to obtain the input password hash value; Determine whether the input password hash value and the user password hash value are consistent; If the input password hash value and the user password hash value are the same, it is determined that the user's login request has passed offline authentication.
5. The method for localizing multimedia files according to claim 1, characterized in that, The preset retrieval strategy includes: The request file format type and request file name are obtained based on the call information; Determine the top-level directory of the target file based on the requested file format type; The requested file name is encrypted to obtain a second encryption result; The second-level directory of the target file is determined based on the second encryption result; Determine whether the target file's subdirectory contains the material file corresponding to the requested file name; If the media file does not exist, a media loading error message is returned to the terminal. When the material file exists, it is decrypted and rendered for display based on the encryption salt key of the material file.
6. The method for localizing multimedia files according to claim 1, characterized in that, The step of determining whether the local database needs to be updated based on the network status information and preset update rules includes: Determine whether the user is in a stable network condition based on the network status information; When the user has a stable network connection, it is determined that the local database needs to be updated.
7. The method for localizing multimedia files according to claim 1, characterized in that, The comparison results include a list of expired materials and a list of materials to be updated. Updating the local database based on the comparison results includes: Delete expired materials from the local database according to the expired material list; Update the old version materials in the local database according to the list of materials to be updated; The missing materials in the local database are incrementally downloaded based on the list of materials to be updated.
8. A multimedia file localization processing device, characterized in that, The device includes: The initialization and encrypted storage module is used to perform system initialization on the terminal upon first startup, obtain the user account database and the full set of multimedia files from the cloud resource pool, and encrypt and store the user account database and the multimedia files in the local database of the terminal according to the preset encryption strategy and the preset storage strategy. The offline authentication module is used to obtain the login information entered by the user and perform offline authentication on the user's login request based on the login information and the user account database. The offline invocation module is used to obtain invocation information input by the user, retrieve material files from the local database according to the invocation information and a preset retrieval strategy, and decrypt, render, and display the material files. The update condition judgment module is used to obtain the user's network status information and, based on the network status information and preset update rules, determine whether the local database needs to be updated. The local database update module is used to compare the data between the local database and the cloud resource pool when an update is needed, obtain the comparison result, and update the local database according to the comparison result.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Data encryption method and device, computer equipment and storage medium
CN114553556A
Mobile terminal login method and device, equipment and storage medium
CN114611079A
Data transmission security system of cloud service and a providing method thereof
KR101971225B1
Portable computer accounts
US20080034091A1
Data synchronization
US20160239556A1