File processing method and device, electronic equipment and storage medium

By verifying the matching relationship between object identification and storage path in file storage requests and pre-configured specification information in distributed file systems, the problem of messy file storage is solved, the standardized management of file storage is realized and the storage specification is improved sex.

CN119166601AInactive Publication Date: 2024-12-20MASHANG CONSUMER FINANCE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410757707.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-12-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In a distributed file system, due to the large number of file storage parties and the large variety of files, the file storage is disordered and standardized management of files cannot be achieved.

Method used

After receiving the file storage request, the object identification and storage path in the file storage request is obtained, and the pre-configured specification storage information is checked whether there is a matching specification object identification and storage path, and whether there is a binding relationship, only in Perform file storage operation when the verification is passed.

Benefits of technology

It realizes standardized management of file storage, improves the standardization of file storage, and ensures that files are stored in accordance with preset specifications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166601A_ABST
    Figure CN119166601A_ABST
Patent Text Reader

Abstract

The invention provides a file processing method and device, electronic equipment and a storage medium, and the method comprises the steps: responding to a received file storage request, and obtaining a first object identifier and a first storage path contained in the file storage request; if a first standard storage path matched with the first storage path and a first standard object identifier matched with the first object identifier exist in pre-configured standard storage information, and a binding relationship exists between the first standard storage path and the first standard object identifier, determining that the first standard storage path is matched with the first standard object identifier; according to the method, the first object identifier and the first storage path are subjected to standardized verification according to the pre-configured standard storage information, and the file storage operation corresponding to the file storage request is executed only when the verification is passed, so that the file storage operation corresponding to the file storage request is executed only when the verification is passed. Therefore, the standardized management of the file storage can be realized according to the standardized storage information, and the standardization of the file storage is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a file processing method, device, electronic device and storage medium. Background Art

[0002] In the file storage scenario, each file storage party writes the files to be stored into a distributed file system, thereby achieving effective storage of the files.

[0003] However, due to the large number of file storage parties and the large number of types of files to be stored, the files stored in the distributed file system are in a messy state, making it impossible to achieve standardized management of the various stored files. Summary of the invention

[0004] The present disclosure provides a file storage method, device, electronic device, and computer-readable storage medium.

[0005] In a first aspect, the present disclosure provides a file processing method, comprising:

[0006] In response to the received file storage request, obtaining a first object identifier and a first storage path included in the file storage request;

[0007] If the pre-configured standard storage information contains a first standard storage path that matches the first storage path and a first standard object identifier that matches the first object identifier, and there is a binding relationship between the first standard storage path and the first standard object identifier, then a file storage operation corresponding to the file storage request is executed.

[0008] In a second aspect, the present disclosure provides a file processing device, comprising:

[0009] An acquisition module, configured to, in response to a received file storage request, acquire a first object identifier and a first storage path included in the file storage request;

[0010] A storage module is used to execute a file storage operation corresponding to the file storage request if there is a first canonical storage path matching the first storage path and a first canonical object identifier matching the first object identifier in the pre-configured canonical storage information, and there is a binding relationship between the first canonical storage path and the first canonical object identifier.

[0011] In a third aspect, the present disclosure provides an electronic device, including:

[0012] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, and the one or more computer programs are executed by the at least one processor so that the at least one processor can execute the above-mentioned file processing method.

[0013] In a fourth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned file processing method when executed by a processor.

[0014] In a fifth aspect, the present disclosure provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned file processing method.

[0015] The file processing method provided by the embodiment of the present disclosure does not directly execute the corresponding file storage operation after receiving the file storage request, but performs a standardized verification on the first object identifier and the first storage path in the file storage request according to the pre-configured standardized storage information. On the one hand, it verifies whether there is a matching first standardized storage path and first standardized object identifier in the standardized storage information, and on the other hand, it verifies whether the first standardized storage path and the first standardized object identifier have a binding relationship. Only when the verification passes will the file storage operation corresponding to the file storage request be executed, thereby ensuring that standardized management of file storage can be achieved according to the standardized storage information, thereby improving the standardization of file storage.

[0016] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings, in which:

[0018] Figure 1 A flowchart of a file processing method provided by an embodiment of the present disclosure;

[0019] Figure 2 A flowchart of a file processing method provided for an example of the present disclosure;

[0020] Figure 3 A block diagram of a file processing device provided by an embodiment of the present disclosure;

[0021] Figure 4 A block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0023] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0024] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0025] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "including" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded. "Connected" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0026] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.

[0027] In the technical solution disclosed in this disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution complies with relevant national laws and regulations (for example, the "Information Security Technology Personal Information Security Specification", etc.). For example: corresponding prescribed measures are taken for personal information access control; prescribed restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; when using personal information, clear identity orientation is eliminated to avoid precise positioning of specific individuals.

[0028] In the related art, each file storage party calls a file writing service to write the file to be stored into a custom file storage path in the distributed file system, thereby realizing effective storage of the file. Due to the large number of file storage parties and the large number of types of storage files involved, the various files stored in the distributed file system are in a messy state, and it is impossible to realize the standardized management of each storage file. In order to solve the above problem, in the present application, after receiving the file storage request, the file storage request operation is not directly executed, but the first object identifier and the first storage path contained in the file storage request are obtained, and then it is determined from the pre-configured standard storage information whether there is a first standard object identifier and a first standard storage path that match it, and whether there is a binding relationship between the first standard object identifier and the first standard storage path, so that the corresponding file storage operation will be executed only when the verification is passed. It can be seen that this method can realize the standardized management of file storage, thereby realizing the standardized storage of each storage file.

[0029] The file storage method according to the embodiment of the present disclosure can be executed by an electronic device such as a terminal device or a server, and the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The server can be an independent physical server, a server cluster composed of multiple physical servers, or a cloud server capable of cloud computing. The method can be implemented by a processor calling a computer-readable program instruction stored in a memory.

[0030] Figure 1 A flowchart of a file processing method provided by an embodiment of the present disclosure. Figure 1 , the method comprising:

[0031] Step S110: In response to the received file storage request, obtain a first object identifier and a first storage path included in the file storage request.

[0032] Among them, the file storage request is a storage request sent by the data storage party according to the file storage needs. The file storage request may include relevant information required for file storage, such as the first object identifier, the first storage path, the address of the file to be stored, the name of the file to be stored, etc.

[0033] Among them, the first storage path is the requested storage location of the file to be stored. The first object identifier is used to identify the storage object with file storage requirements. The first object identifier can be adaptively set according to the relevant attributes of the storage object. For example, when the storage object with file storage requirements is a company, the first object identifier can be the company name. For another example, when the storage object with file storage requirements is a specific department under a company, the first object identifier can be the company name and the department name. In short, the first object identifier and the first storage path can be adaptively set according to actual storage requirements and storage scenarios, and the embodiments of the present disclosure are not limited to this.

[0034] In some possible implementations, different storage objects may have association relationships between them. To facilitate standardized file storage management for all storage objects having association relationships, the first object identifier may include a user identifier and a category identifier.

[0035] The user identifier is used to identify a storage object having a file storage requirement. Specifically, the user identifier may be an identifier of a user terminal that triggers a file storage request.

[0036] It should be noted that, in actual applications, since different storage objects may have associations, the user ID can also be set as a unified ID for different storage objects with file storage requirements. That is, for the storage object corresponding to the user ID, different storage objects all have an affiliation relationship with it. For example, when the storage objects with file storage requirements are different employees of a company, the company name can be used as the user ID.

[0037] Among them, the category identifier is used to characterize the specific file storage content of different storage objects. Since in actual scenarios, different storage objects correspond to different stored file contents, different category identifiers can be used to standardize the management of different storage files according to storage types. For example, when the storage content is to store department files of various departments under a company, the department identifier of the department can be used as the category identifier. For another example, when the storage content is to store multiple product files under a certain brand, the product identifiers of different products can be used as category identifiers.

[0038] It should be noted that due to the diversity of stored content, the category identifier can be determined as multiple classification sub-identifiers based on the actual stored content. Accordingly, the category identifier includes: multiple classification sub-identifiers determined according to the system organizational structure, the source of file data, and / or the type of file content. Among them, the system organizational structure can be an organizational structure corresponding to an institution or organization. For example, if a company has multiple departments under its organizational structure, the department names can be determined as multiple classification sub-identifiers. The file data source can be the information provider corresponding to the file data. For example, if a project is completed by multiple participants, the participant identifier can be determined as a content classification identifier to identify that the storage file is provided by the corresponding participant. The file content type can be the content type corresponding to the file content. For example, for storage files related to product A, product B, and product C, product A, product B, and product C can be used as corresponding classification sub-identifiers.

[0039] It should also be noted that, in actual applications, the category identifier can be further subdivided according to actual storage needs, so that under the category identifier, it is divided into multiple classification sub-identifiers of different types and levels. For example, for a certain category identifier of electronic products, the multiple classification sub-identifiers under it can include mobile phone products, laptop products, tablet products, etc., and mobile phone products can be divided into different models of mobile phone products, such as model A, model B, model C, etc. For example, for a certain category identifier of a subsidiary, the classification sub-identifier under it can include multiple business departments, and for a certain business department classification sub-identifier, it can include multiple business group classification sub-identifiers. In short, the corresponding category identifier can be determined according to the type of storage content and the association between the storage contents in the actual storage needs, and the embodiments of the present disclosure are not limited to this.

[0040] Accordingly, in order to facilitate user operation and achieve standardized management of storage paths, in some possible implementations, the directory structure of the first storage path needs to have a corresponding relationship with the content of the first object identifier. For example, the directory structure of different levels of the first storage path is determined based on the user identifier and the category identifier of the first object identifier. Specifically, when the first object identifier is (product, product A, model A), then the first storage path can be constructed as / product / product A / model A / based on the first object identifier.

[0041] Step S120: If the pre-configured standard storage information contains a first standard storage path that matches the first storage path and a first standard object identifier that matches the first object identifier, and there is a binding relationship between the first standard storage path and the first standard object identifier, then a file storage operation corresponding to the file storage request is executed.

[0042] The pre-configured standard storage information is storage information including a standard object identifier, a standard storage path and a binding relationship thereof. The standard object identifier is a preset storage object identifier, and the standard storage path is a preset storage path for storing storage object file data.

[0043] The first canonical object identifier and the first canonical storage path are respectively the canonical object identifier contained in the canonical storage information and matching the first storage path, and the canonical storage path matching the first object identifier.

[0044] Wherein, when the first object identifier and the standard object identifier are exactly matched, that is, when the first object identifier and the first standard object identifier are completely consistent, the standard object identifier is determined to be the first standard object identifier that matches the first object identifier.

[0045] Under the condition of meeting the storage specification, the canonical object identifier and the first object identifier must follow the same construction rule, so that the first object identifier can be accurately matched with the canonical object identifier. Therefore, in some possible implementations, when pre-constructing the canonical object identifier, it can also be constructed in the form of a composite identifier of a user identifier and a category identifier. In this case, the canonical object identifier includes the user identifier and the category identifier.

[0046] Similarly, the directory structure of the canonical storage path may also have a corresponding relationship with the content of the canonical object identifier. For example, the directory structure of different levels of the canonical storage path is determined according to the user identifier and the category identifier of the canonical object identifier. Specifically, when the canonical object identifier is (identifier 1, identifier 2), the canonical storage path constructed according to the canonical object identifier may include / identifier 1 / identifier 2 / .

[0047] It should be noted that the above-mentioned method for constructing the standard object identifier and the standard storage path is only for illustration. In actual application, corresponding standard object identifiers and standard storage paths can also be formulated according to storage requirements, and the embodiments of the present disclosure do not limit this.

[0048] Among them, the binding relationship between the standard object identifier and the standard storage path can be set to a one-to-one relationship, a one-to-many relationship, or a many-to-many relationship according to actual storage requirements.

[0049] For example, for a certain standard object identifier (Company A, Department A), the corresponding standard storage path is set to: / Company A / Department A / and / Company A / ; for a certain standard object identifier (Company A, Department B), the corresponding storage path is set to: / Company A / Department B / and / Company A / . It can be seen that at this time, the standard object identifier (Company A, Department A) corresponds to multiple standard storage paths, and the standard storage path / Company A / corresponds to multiple standard object identifiers.

[0050] When determining the first canonical storage path that matches the first storage path, in order to meet the actual matching requirements, in some possible implementations, different levels of matching rules can be set to determine the first canonical storage path that matches the first storage path. Accordingly, the matching rules may include a first matching rule and a second matching rule. Among them, the first matching rule is a fuzzy matching rule, that is, only some fields of the canonical storage path need to be consistent with all fields of the first storage path to meet the matching condition, and the second matching rule is an exact matching rule, which requires the first storage path to be completely consistent with the canonical storage path to meet the matching condition.

[0051] In the case where the matching rule is the first matching rule, in response to the fact that all field information of the first storage path is consistent with part of the field information of the canonical storage path, the canonical storage path is determined to be the first canonical storage path that matches the first storage path. In the case where the matching rule is the second matching rule, in response to the fact that the field information of the first storage path is completely consistent with the field information of the canonical storage path, the canonical storage path is determined to be the first canonical storage path that matches the first storage path.

[0052] Exemplarily, in order to facilitate user operation, the first storage path may only contain a portion of the relative path. In this case, based on the first matching rule, the first canonical storage path that matches the first storage path can be determined in the pre-configured canonical storage information. For example, if the first storage path is / AA / BB / , then based on the first matching rule, the canonical storage paths / A / AA / BB / and / A / AA / BB / C are all first canonical storage paths that match it. In other words, based on the implementation of the first matching rule, the first storage path input by the user may not be a complete path. For example, the user can only enter part of the fields in the path, so as to perform fuzzy matching through the first matching rule.

[0053] It should be noted that, based on the first matching rule, a large number of first standard storage paths that match the first storage path may be generated. On this basis, in order to achieve effective screening of the first standard storage path, the first storage path can be set to be the complete absolute path of the file storage. At this time, based on the second matching rule, only the standard storage path that completely matches the first storage path can be screened out as the first standard storage path.

[0054] By determining whether there is a first canonical object identifier and a first canonical storage path that match the first object identifier and the first storage path in the canonical storage information, it can be determined whether there is a preset storage specification related to the file storage request.

[0055] When there exists a first standard object identifier and a first standard storage path that match the first object identifier and the first storage path in the standard storage information, it is also necessary to determine whether the two have a binding relationship. Only when the two have a binding relationship can it be determined that the first standard object identifier and the first standard storage path are corresponding.

[0056] Specifically, binding relationships between different standard object identifiers and standard storage paths are pre-set in the standard storage information. For example, the standard object identifier (Company A, Department A) has a binding relationship with the standard storage paths / Company A / Department A / and / Company A / , and the standard storage path / Company A / has a binding relationship with the standard object identifiers Company A, (Company A, Department A), and (Company A, Department B). At this time, by querying the standard storage path corresponding to the first standard object identifier in the standard storage information, or by querying the standard object identifier corresponding to the first standard storage path, it can be determined whether there is a binding relationship between the first standard storage path and the first standard object identifier.

[0057] It should be noted that when the first matching rule is adopted, multiple first standard storage paths that match the first storage path may be found in the standard storage information. At this time, as long as there is at least one first standard storage path that has a binding relationship with the first standard object identifier, the file storage operation corresponding to the file storage request can be executed.

[0058] When there is a binding relationship between the first standard storage path and the first standard object identifier, it means that the file storage request is a standardized storage according to the standard storage information. At this time, the file storage operation corresponding to the file storage request can be executed to store the file in the first storage path.

[0059] In some optional implementations, the first storage path may be a relative path or an absolute path. When executing a file storage operation corresponding to the file storage request, the corresponding file storage operation may be executed according to the type of the first storage path.

[0060] It should be noted that, when the first storage path is a relative path, the path can be filled according to the first standard storage path that matches it, so as to convert the first storage path into a standard file storage path to perform file storage operations. For example, if the first storage path is / AA / , and the first standard storage paths that match it are / A / B / AA / AB / and / A / B / AA / , then the missing path information of the first storage path, i.e. / A / B, is searched in the first standard storage path, so as to concatenate it with the first storage path, and the complete first storage path / A / B / AA / can be obtained.

[0061] If multiple different path information missing from the first storage path can be found in the first standard storage path, the path information can be fed back to the user, and the file storage operation is performed after the user selects the corresponding path information.

[0062] It should also be noted that, when the first storage path is an absolute path, if the first storage path is inconsistent with the matching first standard storage path, for example, the first storage path is / AA / BB / , and the first standard storage path is / AA / BB / CC. At this time, the file needs to be written to the corresponding location according to the first storage path, and the standard storage information can be updated according to the first storage path, for example, the first object identifier is bound to the first storage path to generate new standard storage information.

[0063] According to an embodiment of the present disclosure, when a file storage request is received, the corresponding file storage operation is not performed directly, but the first object identifier and the first storage path contained in the file storage request are obtained, so that the file storage operation is performed only after it is determined that there is a matching first standard object identifier and a first standard storage path in the pre-configured standard storage information and that a binding relationship exists between the first standard object identifier and the first standard storage path, thereby ensuring that standardized management of file storage can be achieved according to the standard storage information, thereby improving the standardization of file storage.

[0064] In addition, those skilled in the art may also make various modifications and variations to the method in this application:

[0065] In some possible implementations, in order to realize the dynamic configuration of the canonical storage information of the file by the distributed file system, a service interface for generating the canonical storage information and a storage space for storing the canonical storage information can be configured in the distributed file system, and a storage configuration request can be received through the configuration service interface, thereby generating corresponding canonical storage information according to the storage configuration request, and storing the storage canonical information in the configuration storage space. Accordingly, the file storage method of the embodiment of the present disclosure is applied to a distributed storage system, and the distributed storage system includes: a configuration service interface and a configuration storage space; receiving a storage configuration request through the configuration service interface, obtaining a second canonical storage path and a second canonical object identifier included in the storage configuration request; binding the second canonical storage path with the second canonical object identifier to obtain the first canonical storage information, and storing the first canonical storage information in the configuration storage space, and the canonical storage information stored in the configuration storage space allows dynamic updates.

[0066] The second standard storage path and the second standard object identifier are standard storage paths and standard storage identifiers of the binding relationship to be configured. The first standard storage information is standard storage information storing the binding relationship of the second standard storage path and the second standard object identifier.

[0067] The configuration storage space is used to store multiple pieces of first specification storage information dynamically configured through the configuration service interface.

[0068] It can be seen from this that by configuring the service interface in the distributed file system, the second storage specification path and the second specification object identifier contained in the storage configuration request can be bound and the first specification storage information can be generated, and finally the first specification storage information can be stored in the configuration storage space to realize the dynamic generation and storage of specification storage information.

[0069] It should be noted that the first standard storage information can be dynamically configured according to actual needs. For example, when the storage demand changes, the storage standard path corresponding to the standard object identifier in the first standard storage information can be updated in the configuration storage space according to the storage configuration request.

[0070] It should also be noted that the configuration storage space may be a dedicated database for storing data, or may be a dedicated storage space for storing standardized storage information in a distributed file system.

[0071] Exemplarily, the distributed storage system receives a storage configuration request and establishes a binding relationship between the second standard storage path and the second standard object identifier in the storage configuration request, thereby generating corresponding first standard storage information. For example, for a certain first standard storage information, it records the binding relationship between the standard object identifier (such as identifier A) and the standard storage path (such as path A).

[0072] In the disclosed embodiment, by setting a configuration service interface and a configuration storage space in a distributed file system, the standard storage information stored in the configuration storage space can be updated according to the received storage configuration request, thereby realizing dynamic configuration of the standard storage information.

[0073] In some possible implementations, since there is only a file writing service in the distributed file system, it is impossible to implement standardized verification of the file storage path. Therefore, in order to enable the distributed file system to implement standardized verification of the storage path, a storage verification interface can be configured in the distributed file system, so that the standardized storage information stored in the configuration storage space can be queried according to the storage verification interface, and then the standardized verification of the storage path can be implemented when there is a binding relationship between the standardized object identifier and the standardized storage path. Correspondingly, the distributed storage system also includes: a storage verification interface, the storage verification interface has access rights to the configuration storage space; querying the standardized storage information stored in the configuration storage space through the storage verification interface; if the standardized storage path and the standardized object identifier belong to the same standardized storage information; then determining that there is a binding relationship between the standardized storage path and the standardized object identifier.

[0074] For example, by setting up a storage verification interface in a distributed storage system, and the storage verification interface has access rights to the configuration space, the canonical storage path corresponding to the canonical object identifier is queried through the storage verification interface, and the canonical storage path is compared with the queried canonical storage path that matches the first storage path. If the comparison is successful, it means that the first canonical storage path that matches the first storage path is associated with the first canonical object identifier and stored in the same canonical storage information, that is, there is a binding relationship between the canonical storage path and the canonical object identifier.

[0075] In the embodiment of the present disclosure, by setting a storage verification interface in the distributed file system, the distributed file system can perform a storage path standardization verification function during file storage, thereby achieving standardized management of file storage by the distributed file system.

[0076] In some possible implementations, the preset standard storage path and standard object identifier cannot adapt to complex storage requirements. For example, when there are many types of stored files and many storage parties involved, it is impossible to achieve orderly storage of multiple types of stored files. Therefore, the standard object identifier and the first object identifier can be set to include a user identifier and a category identifier, and the user identifier corresponds to the primary storage path, and the category identifier corresponds to the secondary storage path. Correspondingly, the first object identifier includes: a first user identifier for representing the user terminal that triggers the file storage request, and a first category identifier for representing the content classification of the information to be stored; the standard object identifier includes: a second user identifier for identifying a pre-configured standard user terminal, and a second category identifier for identifying a pre-configured standard content classification; the first storage path includes: a primary target storage path corresponding to the first user identifier, and a secondary target storage path corresponding to the first category identifier; the standard storage path includes: a primary standard storage path corresponding to the second user identifier, and a secondary standard storage path corresponding to the second category identifier.

[0077] The first user identifier is used to identify a storage object with a file storage requirement, and the second user identifier is used to identify a standard storage object with a standard storage permission.

[0078] The category identifier includes: a plurality of classification sub-identifiers determined according to the system organizational structure, the file data source, and / or the file content type, and the storage path includes: a plurality of storage directory levels corresponding to the plurality of classification sub-identifiers.

[0079] Exemplarily, the category identifier can be configured with multiple classification sub-identifiers according to the business type, that is, the category identifier is the total identifier of different classification sub-identifiers. For example, the category identifier is set to product 1, which can be divided into multiple first-level classification sub-identifiers according to the product type, such as product A, product B, and for product A, it can be divided into multiple second-level classification sub-identifiers product A1 and product A2 according to different product iteration times. At this time, the standard object identifier can be a composite identifier composed of a user identifier, a category identifier and a category sub-identifier, such as (company A, product 1, product A). Similarly, the standard storage path can be adaptively generated according to the standard storage identifier and its hierarchical relationship. For example, the standard storage path can include: / company A / product 1 / , / company A / product 1 / product A / , / company A / product 1 / product A / product A1 / , / company A / product 1 / product A / product A2 / . Correspondingly, the first object identifier in the file storage request is also a composite identifier composed of a user identifier, a category identifier and a classification sub-identifier, and the first storage path is a first-level, second-level or multi-level storage path corresponding to the first object identifier.

[0080] In the embodiments of the present disclosure, fine-grained file storage classification can be performed according to actual storage needs, so that the first object identifier or the standard object identifier is set to a composite identifier composed of a user identifier and a category identifier, and based on the first object identifier or the standard object identifier, first storage paths or standard storage paths of different levels are set, thereby realizing multi-level classified storage of files.

[0081] In some possible implementations, in order to adapt to the file storage space requirements of different storage objects, the corresponding standard capacity can be set in the configuration request, so as to pre-allocate storage space for the storage object according to the standard storage capacity, and check whether the storage capacity required by the file storage request exceeds the standard storage capacity to achieve standardized storage of files. Correspondingly, the standard storage information stored in the configuration storage space also includes the standard storage capacity, which is used to represent the maximum storage capacity under the standard storage path included in the standard storage information; executing the file storage operation corresponding to the file storage request includes: determining the target storage capacity corresponding to the file storage request, and executing the file storage operation corresponding to the file storage request when the target storage capacity does not exceed the standard storage capacity corresponding to the first standard storage path.

[0082] The standard storage capacity may be determined based on the system organizational structure, the file data source, and / or the attribute information corresponding to the file content type.

[0083] For example, for a storage configuration request, it is determined that the required standard storage capacity is 200G according to the file type to be stored. Then, after receiving the storage configuration request, a storage space of 200G can be allocated in advance for the storage object in the storage space, and a corresponding standard storage path can be established on the storage space. Thus, the file storage operation corresponding to the file storage request is executed only when it is determined that the target storage capacity corresponding to the file storage request does not exceed the standard storage capacity.

[0084] In the embodiments of the present disclosure, by pre-setting the storage capacity required for the storage object, effective use of the storage space is achieved, avoiding storage space conflicts when executing file storage operations for multiple storage objects and storage failures caused by excessively large storage files.

[0085] In some possible implementations, as storage requirements change, pre-configured standard storage information may not be able to adapt to existing file storage requirements. Therefore, the user may be prompted to dynamically configure the standard storage information, and after the dynamic configuration is completed, the file storage operation is performed. Accordingly, if there is no standard storage path matching the first storage path and a standard object identifier matching the first object identifier in the pre-configured standard storage information, a prompt message indicating storage failure is displayed; wherein the prompt message includes: a first type of prompt information including a modification entry, wherein the modification entry is used to modify the first storage path; and a second type of prompt information including a configuration entry, wherein the configuration entry is used to configure the standard storage path corresponding to the first storage path.

[0086] For example, in the standard storage information, the standard storage path corresponding to the standard object identifier A is storage path A, and the first storage path corresponding to the first object identifier A in the file storage request sent by the user is storage path B. Therefore, the user can be prompted to modify the first storage path to storage path A, or the corresponding standard storage path can be added as storage path B through the configuration entry. After the configuration is completed, the file storage operation can be performed.

[0087] In addition, the user may also add a new directory structure under the original standard storage path according to changes in storage requirements. For example, the standard storage path corresponding to the standard object identifier AA is / AA / , and the requested first storage path is / AA / BB / . In this case, the user can be prompted to add a new standard storage path / AA / BB / through the configuration entry, thereby binding the first object identifier AA with the first storage path / AA / BB / to generate new standard storage information, and adding a new first object identifier (AA, BB) so that the first object identifier corresponds to the directory structure of the first storage path, and binding the updated first object identifier (AA, BB) with the first storage path / AA / BB / to generate new standard storage information.

[0088] In the embodiment of the present disclosure, when a user needs to store a file in a new path, a prompt message is sent to the user, so that the user can dynamically configure the standardized storage information.

[0089] In some possible implementations, in order to better adapt to dynamically changing file storage requirements, the storage architecture information of the storage object can be monitored, so that when the storage architecture information changes, the standard storage information can be dynamically updated according to the changes in the storage architecture information. Accordingly, the standard storage information can be dynamically updated, and the standard storage information is dynamically updated in the following manner: monitoring the storage architecture information of the storage object corresponding to the standard object identifier according to a preset interface, wherein the storage architecture information includes storage object information and the hierarchical relationship between the storage object information, the storage object information corresponds to the directory name on the standard storage path, and the hierarchical relationship between the storage object information corresponds to the hierarchical relationship between different directories of the standard storage path; in response to changes in the storage architecture information, updating the standard storage information according to the storage object information of the storage architecture information and the change results of the hierarchical relationship between the storage object information.

[0090] For example, for a certain standard object identifier company A, its original storage architecture information is that company A is divided into subsidiaries A1, subsidiary A2, and subsidiary A3. Then, when the storage architecture information is monitored to change, for example, a new subsidiary A4 is divided under the standard object identifier company A, a new standard object identifier (A, A4) can be created, and according to the updated standard object identifier and the hierarchical relationship, its corresponding standard storage path is set to / A / A4 / , thereby generating new standard storage information. For another example, when it is monitored that subsidiary A3 in the storage architecture information is deleted, the standard storage information corresponding to subsidiary A3 can also be deleted to achieve dynamic update of the standard storage information.

[0091] In the disclosed embodiment, the storage architecture information corresponding to the standard object identifier is monitored through a preset interface, so that when the storage architecture information changes, the standard storage information can be modified accordingly, thereby realizing dynamic updating of the standard storage information.

[0092] In some possible implementations, the user may forget the storage path of a certain storage file, and thus cannot quickly query the storage file. The user can search for a matching storage path in the standard storage information according to the object identifier corresponding to the storage file, thereby quickly searching for the file. Accordingly, the file processing method of the disclosed embodiment also includes: in response to the received file query request, obtaining the second object identifier contained in the file query request; determining a third standard object identifier matching the second object identifier according to the pre-configured standard storage information; determining a third standard storage path pre-bound to the third standard object identifier; and querying the files stored under the third standard storage path.

[0093] The file query request is used to search for storage files under the storage path corresponding to the second object identifier. When the user forgets the corresponding storage path of a storage file, the corresponding storage file can be found according to the second object identifier by sending the file query request.

[0094] Among them, the matching rules between the second object identifier and the standard object identifier can be determined according to the actual query needs. For example, when the second object identifier is completely consistent with the standard object identifier, the standard object identifier is a third standard object identifier that matches the second object identifier. For another example, when the second object identifier and the standard object identifier have overlapping identifiers, the standard object identifier is determined to be a third standard object identifier that matches the second object identifier, and the embodiments of the present disclosure do not limit this.

[0095] It should be noted that, since there may be multiple third standard storage paths pre-bound to the third standard object identifier, the third standard storage path pre-bound to the third standard object identifier can be displayed to enable the user to determine the standard storage path of the file to be searched. Thus, the file stored in the standard storage path can be searched according to the standard storage path.

[0096] In the disclosed embodiment, when a user needs to find a certain storage file, a file query request can be sent, so that the second object identifier contained in the file query request can quickly query the canonical storage path bound to it, and then accurately query the file according to the canonical storage path. Since the canonical object identifier and its corresponding canonical storage path have been pre-configured in the canonical storage information, there is no need for the user to remember the storage path of each storage file separately. The corresponding path information can be determined in the configuration result directly according to the first object identifier, so as to query the file of the path information, which improves the convenience of file query. For ease of understanding, the technical implementation details of the above embodiment are described in detail below, taking a specific example as an example:

[0097] In the related art, when the storage party stores files in a distributed file system, the file is stored in the corresponding storage path of the distributed file system by calling the file write service interface and setting the file storage path in the service interface. For example, for a certain file storage usage scenario, a company, team, or application needs to store the hello.txt file in the direct1 path of the distributed file system (HDFS). In the existing technical solution, the company, team, or application needs to develop a file storage service and call the HDFS file write service interface before the file can be written to the HDFS system. For example, the file write interface is as follows:

[0098] public class WriteFileOnHDFS{

[0099] @Test

[0100] public void write1()throws Exception{

[0101] / / Create a configuration object

[0102] Configuration conf=new Configuration();

[0103] / / Define the uri string

[0104] String uri="hdfs: / / master:9000";

[0105] / / Create a file system object

[0106] FileSystem fs=FileSystem.get(new URI(uri),conf);

[0107] / / Create a path object (file or directory)

[0108] Path path=new Path(uri+" / direct1 / hello.txt");

[0109] / / Create a file output stream

[0110] FSDataOutputStream out=fs.create(path);

[0111] / / Write data

[0112] out.write("hello hadoop world".getBytes());

[0113] / / Prompt the user to write the file successfully

[0114] System.out.println("File ["+path+"] written successfully!");

[0115] / / Refresh the output stream

[0116] out.flush();

[0117] / / Close the output stream

[0118] out.flush();

[0119] / / Close the file

[0120] fs.close();

[0121] }

[0122] }

[0123] By calling the file writing interface, the result of file writing is as follows: the storage party writes the local file hello.txt to the HDFS system hdfs: / / master:9000 / direct1 / hello.txt.

[0124] However, as storage needs continue to increase, the number of storage parties and the types of stored files are also increasing. Therefore, a large number of file types and storage files are often stored in distributed file systems. The storage paths of these storage files are customized by the storage party. If there are no certain storage specifications and management methods to constrain the file storage party, as the file system continues to run, the files in the distributed file system are also in a messy state, which affects subsequent file queries and uses. For example, it is impossible to accurately find a certain type or a certain file, and many different types of files are stored in the same folder. It can be seen that the existing file storage method cannot achieve standardized management of file storage.

[0125] In a related technology, in order to improve the management effectiveness of the distributed file system, file storage specifications can be formulated in advance, that is, before accessing the distributed file system, the storage party needs to define a distributed file storage specification document, and define the detailed access specifications of the file storage party in the document. For example, set a specific write storage path ( / test / file name) for a certain type of file of a certain storage party, so as to perform refined classification storage of the stored files for subsequent file query and use.

[0126] However, by pre-establishing storage specification documents, it is necessary to consider the diverse situations of various types of files in advance and to formulate a clear storage path for each type of file in detail. During use, many storage parties are also required to query, update and maintain the document according to their own storage needs. In this way, not only is it difficult to update, maintain and query the document, but also when storing files, the file storage party can still use the form of calling the file writing service interface to store its files in a custom path, which cannot guarantee the standardized effect of file storage.

[0127] Therefore, the above file storage method only stores according to the storage information of the file writing service, that is, based on the storage path, file name and other information defined by the storage party in the file writing service, so as to realize file storage, and cannot realize the standardized management of file storage.

[0128] In order to solve the above problems, a file storage method is proposed in this example to achieve standardized management of file storage.

[0129] Figure 2 FIG. 2 shows a flow chart of the file processing method in this example. Figure 2 As shown, the example includes the following steps:

[0130] Step S201: receiving a storage configuration request through a configuration service interface, and obtaining a standard storage path and a standard object identifier included in the storage configuration request.

[0131] Among them, the standard object identifier may include a user identifier and a category identifier, and the category identifier is used to identify the pre-configured standard content classification. Similarly, the category identifier can also be divided into multiple levels of classification sub-identifiers according to storage needs. Exemplarily, the name of a company is company, the user identifier is set to company, the category identifier is direct1, and the classification sub-identifier corresponding to direct1 is direct2. Therefore, standard object identifiers such as company, (company, direct1), (company, direct1, direct2) can be obtained. Correspondingly, it is necessary to set a corresponding standard storage path for the standard object identifier. For example, the standard storage path corresponding to the standard object identifier (company, direct1) can be / company / direct1 / , the standard storage path corresponding to the standard object identifier (company, direct1, direct2) can be / company / direct1 / direct2 / , and the standard storage paths corresponding to the standard object identifier company are / company / , / company / direct1 / , / company / direct1 / direct2 / .

[0132] Among them, the canonical storage path corresponding to the canonical object identifier can also be generated by defining the storage factor in the storage configuration request. Correspondingly, the storage configuration request can include the canonical object identifier and the storage factor. Among them, the storage factor represents a directory at a certain level of the file storage path. When generating the canonical storage path corresponding to the canonical object identifier based on the storage factor, the corresponding canonical storage path can be generated based on the name of the storage factor and the hierarchical relationship between the storage factors.

[0133] For example, the storage configuration request includes storage factor 1 (indicating the first-level directory of the file storage path, such as company), storage factor 2 (indicating the second-level directory of the file storage path, such as direct1), and storage factor 3 (indicating the third-level directory of the file storage path, such as direct2). The final standard storage path generated based on multiple storage factors may be / company / direct1 / direct2 / . The standard storage path corresponding to the standard object identifier company can be set according to actual storage needs. For example, it can only store files in the path / company / direct1 / direct2 / , or it can store files in any path of / company / direct1 / direct2 / , that is, the standard storage path is set to / company / , / company / direct1 / , / company / direct1 / direct2 / .

[0134] It should be noted that the storage factor of the current directory level can correspond to the storage factors of multiple lower directory levels. For example, storage factor 1 includes direct1 and direct2, and the storage factor 2 corresponding to direct1 includes direct11 and direct12. On this basis, multiple corresponding standard storage paths can be generated: / direct1 / direct11, / direct1 / direct12, / direct2.

[0135] By defining storage factors in the storage configuration request, the corresponding standard storage path can be generated according to the name and hierarchical relationship of the storage factor. While facilitating user configuration, it avoids the omission of the standard storage path and ensures the integrity of the standard storage path.

[0136] The storage configuration request may also include a standard storage capacity, which is used to identify the storage space size required for storage, for example, setting the storage capacity size to 100 GB.

[0137] Step S202: Bind the canonical storage path with the canonical object identifier to obtain canonical storage information, and store the canonical storage information in the configuration storage space. The canonical storage information stored in the configuration storage space allows dynamic update.

[0138] In this step, it is necessary to establish a binding relationship between the standard storage path and the standard object identifier based on the correspondence between the standard storage path and the standard object identifier, so as to generate standard storage information based on the binding relationship between the standard storage path and the standard object identifier and store it in the configuration storage space.

[0139] Step S203: In response to the received file storage request, obtain the first object identifier and the first storage path included in the file storage request.

[0140] According to the file storage requirements, in addition to the first object identifier and the first storage path, the file storage request may also include the name of the file to be stored, the file address and other related information. For example, in a file storage request, the first object identifier is company, the first storage path is / XXX / YYY / ZZZ, and the name of the file to be stored is text.aa.

[0141] Among them, the first object identifier indicates the storage object in this file storage request. The first object identifier must use the same construction standard as the standard object identifier. For example, when the standard object identifier uses a composite identifier of a user identifier and a category identifier, the first object identifier in the file storage request must also use a composite identifier of a user identifier and a category identifier. For example, the first object identifier is set to (company, direct1, direct2). The first storage path is the storage path requested for storing files. When there is a corresponding relationship between the object identifier and the directory structure of the storage path, the first storage path must be set according to the identifier name and the association relationship of the first object identifier. For example, the first storage path is set to / company / direct1 / direct2 / .

[0142] Step S204: If the pre-configured standard storage information contains a first standard storage path that matches the first storage path and a first standard object identifier that matches the first object identifier, and there is a binding relationship between the first standard storage path and the first standard object identifier, then a file storage operation corresponding to the file storage request is executed.

[0143] In this step, it is necessary to query whether there is a first canonical storage path that matches the first storage path, and a first canonical object identifier that matches the first object identifier in the pre-configured canonical storage information. When there is a first object identifier and a canonical storage path that match them, it means that there is a corresponding configuration in the canonical storage information.

[0144] Among them, when querying the first canonical object identifier that matches the first object identifier, only when the first object identifier is completely consistent with the canonical object identifier can the matching condition be determined to be satisfied. When querying the canonical storage path that matches the first storage path, corresponding matching rules can be set according to actual matching requirements. For example, when some field information of the canonical storage path is consistent with all field information of the first storage path, it can be determined that the first storage path matches the canonical storage path. For another example, only when the canonical storage path is completely consistent with the first storage path can the first storage path be determined to match the canonical storage path.

[0145] For example, for the first storage path (such as / XXX / YYY / ZZZ) and the first object identifier "company", obtain the canonical storage information in the configuration storage space (such as a database), and verify whether there is a first canonical object identifier that matches the first object identifier "company", and whether there is a first canonical storage path that matches the current first storage path / XXX / YYY / ZZZ.

[0146] Among them, when judging whether the standard storage path matches the first storage path, there can be two matching rules, fuzzy matching rule and precise matching rule. In the case of fuzzy matching rule, as long as all the field contents of the first storage path overlap with some field contents of the standard storage path, the two are judged to match. For example, the standard storage path is: / direct1 / direct2 / direct3 / direct4. In actual use, the storage party needs to store the file in the direct3 directory, and the first storage path is set to / direct3. The fuzzy matching rule can be used to find the matching standard storage path / direct1 / direct2 / direct3 / direct4.

[0147] In the case of an exact matching rule, only when the first storage path is completely consistent with the standard storage path can it be determined that the two match.

[0148] If the pre-configured standard storage information does not contain a standard storage path that matches the first storage path and a standard object identifier that matches the first object identifier, prompt information indicating storage failure is displayed.

[0149] The prompt information can be used to prompt the user to update the standard storage information, or to prompt the user to use the standard storage path for file storage. Accordingly, the prompt information may include: a first type of prompt information including a modification entry, wherein the modification entry is used to modify the first storage path; a second type of prompt information including a configuration entry, wherein the configuration entry is used to configure the standard storage path corresponding to the first storage path.

[0150] Among them, when there is a binding relationship between the first standard storage path and the first standard object identifier, it means that the file storage request meets the storage specification, and the file storage operation corresponding to the file storage request can be executed, that is, the file to be stored is stored in the first storage path, otherwise the file storage operation is not allowed to be executed.

[0151] It should be noted that, when the first storage path is not a complete storage path, the first storage path may be filled according to the matched standard storage path, and the file to be stored may be stored in the filled first storage path.

[0152] In summary, in the related art, files can only be stored in a custom storage path according to the storage party's custom storage path. Due to the large number of storage parties and the complex types of stored files, the stored files are in a chaotic and disordered state, and standardized storage of files cannot be achieved. This example pre-configures standardized storage information and stores it in the configured storage space. After receiving a file storage request, the file storage operation is not performed directly. Instead, the first object identifier and the first storage path in the file storage request are standardized and the binding relationship is verified according to the standardized storage information. Only after the verification is passed will the corresponding file storage operation be performed, thereby achieving standardized management of file storage.

[0153] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.

[0154] In addition, the present disclosure also provides a file processing device for implementing any one of the file processing methods provided by the present disclosure. An electronic device and a computer-readable storage medium are used to implement any one of the file processing methods provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method part and will not be repeated here.

[0155] Figure 3 A block diagram of a file processing device provided in an embodiment of the present disclosure.

[0156] Reference Figure 3 , the embodiment of the present disclosure provides a file processing device 30, the file storage device comprising:

[0157] An acquisition module 31 is used to obtain, in response to a received file storage request, a first object identifier and a first storage path included in the file storage request;

[0158] The storage module 32 is used to execute the file storage operation corresponding to the file storage request if there is a first canonical storage path matching the first storage path and a first canonical object identifier matching the first object identifier in the pre-configured canonical storage information, and there is a binding relationship between the first canonical storage path and the first canonical object identifier.

[0159] In an optional implementation, the file processing device is applied to a distributed storage system, and the distributed storage system includes: a configuration service interface and a configuration storage space; the device is also used to receive a storage configuration request through the configuration service interface, obtain a second standard storage path and a second standard object identifier included in the storage configuration request; bind the second standard storage path with the second standard object identifier to obtain first standard storage information, and store the first standard storage information in the configuration storage space, and the standard storage information stored in the configuration storage space allows dynamic update.

[0160] In an optional implementation, the standard storage information stored in the configuration storage space also includes a standard storage capacity, and the standard storage capacity is used to characterize the maximum storage capacity under the standard storage path included in the standard storage information; the execution of the file storage operation corresponding to the file storage request includes: determining the target storage capacity corresponding to the file storage request; and executing the file storage operation corresponding to the file storage request when the target storage capacity does not exceed the standard storage capacity corresponding to the first standard storage path.

[0161] In an optional implementation, the first object identifier includes: a first user identifier for characterizing a user terminal that triggers the file storage request, and a first category identifier for characterizing a content classification of information to be stored; the standard object identifier includes: a second user identifier for identifying a pre-configured standard user terminal, and a second category identifier for identifying a pre-configured standard content classification; the first storage path includes: a first-level target storage path corresponding to the first user identifier, and a second-level target storage path corresponding to the first category identifier; the standard storage path includes: a first-level standard storage path corresponding to the second user identifier, and a second-level standard storage path corresponding to the second category identifier.

[0162] In an optional implementation, if there is no canonical storage path that matches the first storage path and no canonical object identifier that matches the first object identifier in the pre-configured canonical storage information, prompt information is displayed to indicate storage failure; wherein the prompt information includes: a first type of prompt information including a modification entry, wherein the modification entry is used to modify the first storage path; and a second type of prompt information including a configuration entry, wherein the configuration entry is used to configure the canonical storage path corresponding to the first storage path.

[0163] In an optional implementation, the file processing device is also used to: in response to a received file query request, obtain a second object identifier contained in the file query request; determine a third standard object identifier that matches the second object identifier based on pre-configured standard storage information; determine a third standard storage path that is pre-bound to the third standard object identifier; and query files stored under the third standard storage path.

[0164] Each module in the above-mentioned file processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.

[0165] Figure 4 A block diagram of an electronic device provided in an embodiment of the present disclosure.

[0166] Reference Figure 4 An embodiment of the present disclosure provides an electronic device, which includes: at least one processor 401; at least one memory 402, and one or more I / O interfaces 403, connected between the processor 401 and the memory 402; wherein the memory 402 stores one or more computer programs that can be executed by the at least one processor 401, and the one or more computer programs are executed by the at least one processor 401 so that the at least one processor 401 can execute the above-mentioned file processing method.

[0167] Each module in the above electronic device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0168] The present disclosure also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program implements the above-mentioned file processing method when executed by a processor / processing core. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.

[0169] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned file processing method.

[0170] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).

[0171] As is known to those of ordinary skill in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is known to those of ordinary skill in the art that communication media typically contain computer-readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.

[0172] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0173] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0174] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.

[0175] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0176] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0177] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0178] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0179] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A file processing method, characterized in that: include: In response to the received file storage request, obtaining a first object identifier and a first storage path included in the file storage request; If the pre-configured standard storage information contains a first standard storage path that matches the first storage path and a first standard object identifier that matches the first object identifier, and there is a binding relationship between the first standard storage path and the first standard object identifier, then a file storage operation corresponding to the file storage request is executed.

2. The method according to claim 1, characterized in that Applied to a distributed storage system, the distributed storage system includes: configuring a service interface and configuring a storage space; the method also includes: Receiving a storage configuration request through the configuration service interface, and acquiring a second standard storage path and a second standard object identifier included in the storage configuration request; The second standard storage path is bound to the second standard object identifier to obtain first standard storage information, and the first standard storage information is stored in the configuration storage space. The standard storage information stored in the configuration storage space allows dynamic update.

3. The method according to claim 2, characterized in that The standard storage information stored in the configuration storage space also includes a standard storage capacity, and the standard storage capacity is used to represent the maximum storage capacity under the standard storage path included in the standard storage information; The performing of the file storage operation corresponding to the file storage request comprises: determining a target storage capacity corresponding to the file storage request; In a case where the target storage capacity does not exceed the standard storage capacity corresponding to the first standard storage path, a file storage operation corresponding to the file storage request is performed.

4. The method according to claim 1, characterized in that: The first object identifier includes: a first user identifier for representing a user terminal that triggers the file storage request, and a first category identifier for representing a content classification of the information to be stored; The standard object identifier includes: a second user identifier for identifying a pre-configured standard user terminal, and a second category identifier for identifying a pre-configured standard content classification; The first storage path includes: a primary target storage path corresponding to the first user identifier, and a secondary target storage path corresponding to the first category identifier; The standard storage path includes: a primary standard storage path corresponding to the second user identifier, and a secondary standard storage path corresponding to the second category identifier.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: If there is no canonical storage path matching the first storage path and no canonical object identifier matching the first object identifier in the pre-configured canonical storage information, displaying prompt information for prompting storage failure; The prompt information includes: A first type of prompt information including a modification entry; wherein the modification entry is used to modify the first storage path; The second type of prompt information includes a configuration entry; wherein the configuration entry is used to configure a standard storage path corresponding to the first storage path.

6. The method according to claim 1, characterized in that The method further comprises: In response to the received file query request, obtaining a second object identifier included in the file query request; Determining, according to pre-configured standard storage information, a third standard object identifier that matches the second object identifier; Determining a third canonical storage path pre-bound to the third canonical object identifier; Query the files stored in the third standard storage path.

7. A file processing device, characterized in that: include: An acquisition module, configured to, in response to a received file storage request, acquire a first object identifier and a first storage path included in the file storage request; A storage module is used to execute a file storage operation corresponding to the file storage request if there is a first canonical storage path matching the first storage path and a first canonical object identifier matching the first object identifier in the pre-configured canonical storage information, and there is a binding relationship between the first canonical storage path and the first canonical object identifier.

8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs executable by the at least one processor, and the one or more computer programs are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The invention comprises a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the method as claimed in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Object storage method and device, electronic equipment and computer readable storage medium

    CN115421779A

  • File path checking method and device, electronic equipment and readable storage medium

    CN117453630A

  • File processing method and apparatus, electronic device, and storage medium

    EP4075269A1

  • File server search and recommendation system

    US20130091157A1

  • File system for efficient object fragment access

    US20160063008A1