Object storage method and device, electronic device, and computer-readable storage medium
By utilizing the combination of distributed version control system and relational database in the object storage method, the problem of poor reusability of different object storage solutions is solved, efficient object storage and management is achieved, and development costs and communication resource occupation are reduced.
Patent Information
- Application Number
- CN202211195482.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-28
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-09-28
AI Technical Summary
In the prior art, different storage and management solutions are required for different objects, the reusability of object storage and management solutions is poor, the development cost is high, and Git takes up more communication resources when looking for specific files, which cannot meet the performance requirements.
By receiving object storage requests, obtaining the configuration information and object content of the objects to be stored, verifying according to the preset object specifications, creating an object collection using a distributed version control system, and storing it in a relational database to realize access to individual objects.
It improves the efficiency of object storage and management, reduces resource consumption, avoids the reusability problem of different objects requiring different storage solutions, and reduces the use of communication resources.
Smart Images

Figure CN115421779B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology and the field of fintech, and more particularly, to an object storage method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the development of computer technology, a distributed version control system, namely Git, is usually used to manage project versions. The distributed version control system can regenerate new objects on the basis of the original object versions to directly record snapshots, and since most operations are performed locally, version management of the project can still be carried out locally after the network is disconnected.
[0003] In the process of implementing the concept of the present disclosure, the inventors found that there are at least the following problems in the related art: Since different storage and management schemes need to be used for different objects, the reusability of the object storage and management schemes is poor, and the development cost is high. Summary of the Invention
[0004] In view of this, the present disclosure provides an object storage method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
[0005] According to one aspect of the present disclosure, there is provided an object storage method, including:
[0006] In response to receiving an object storage request, according to the object storage request, obtain the object information of each of at least one object to be stored, where the object storage request includes the at least one object to be stored, and the object information of each of the at least one object to be stored includes configuration information and object content;
[0007] Verify the configuration information and object content of each of the at least one object to be stored respectively according to a preset object specification corresponding to the configuration information, and obtain a verification result;
[0008] When the verification result indicates that the configuration information and object content of each of the at least one object to be stored pass the verification, create at least one object set by using a distributed version control system, where the at least one object set is used to store the object information of each of the at least one object to be stored having an association relationship; and
[0009] Store the at least one object set into a relational database.
[0010] According to an embodiment of the present disclosure, the above-mentioned preset object specification includes at least one permission format information and an input object specification. The above-mentioned input object specification includes at least one permission system name information and at least one permission system version information. The above-mentioned configuration information includes format information, system name information, and system version information.
[0011] According to an embodiment of the present disclosure, based on the above-mentioned preset object specification corresponding to the above-mentioned configuration information, the configuration information and object content of each of the above-mentioned at least one object to be stored are respectively verified, and the obtained verification result includes:
[0012] Based on the above-mentioned preset object specification, the configuration information of each of the above-mentioned at least one object to be stored is verified to obtain an initial verification result; and
[0013] When the above-mentioned initial verification result indicates that the configuration information of each of the above-mentioned at least one object to be stored passes the verification, the object content is verified to obtain the above-mentioned verification result.
[0014] According to an embodiment of the present disclosure, based on the above-mentioned preset object specification, the configuration information of each of the above-mentioned at least one object to be stored is verified to obtain an initial verification result, including:
[0015] Based on the above-mentioned at least one permission format information, the format information is verified to obtain a first verification result;
[0016] When the above-mentioned first verification result indicates that the format information passes the verification, based on the above-mentioned at least one permission system name information, the system name information is verified to obtain a second verification result; and
[0017] When the above-mentioned second verification result indicates that the system name information passes the verification, based on the above-mentioned at least one permission system version information, the system version information is verified to obtain the above-mentioned initial verification result.
[0018] According to an embodiment of the present disclosure, when the above-mentioned initial verification result indicates that the configuration information of each of the above-mentioned at least one object to be stored passes the verification, the object content is verified to obtain the above-mentioned verification result, including:
[0019] Based on the above-mentioned system name information, a verification tool corresponding to the above-mentioned system name information is determined, where the above-mentioned verification tool includes a quality verification rule and a style verification rule; and
[0020] The above-mentioned verification tool is called to verify the above-mentioned object content to obtain the above-mentioned verification result.
[0021] According to an embodiment of the present disclosure, when the verification results indicate that the configuration information and object content of each of the at least one object to be stored have passed the verification, creating at least one object set by using a distributed version control system includes:
[0022] Determining the number of systems according to the system name information of each of the at least one object to be stored;
[0023] According to the number of systems, creating at least one version control branch corresponding to the number of systems by using the distributed version control system; and
[0024] Using the distributed version control system, creating object sets respectively under each of the at least one version control branch, wherein the system name information, the version control branch, and the object set correspond to each other one by one.
[0025] According to an embodiment of the present disclosure, the configuration information of each of the at least one object to be stored further includes association relationship information, and the association relationship information is used to represent the association relationship of the at least one object to be stored corresponding to the system name information.
[0026] According to an embodiment of the present disclosure, the method further includes, before storing the at least one object set into a relational database:
[0027] Performing redundancy check on the at least one object to be stored corresponding to the system name information to obtain a redundancy check result;
[0028] When the redundancy check result indicates that the check fails, processing the at least one object to be stored corresponding to the system name information according to the redundancy check result; and
[0029] When the redundancy check result indicates that the check passes, storing the at least one object to be stored corresponding to the system name information into the corresponding object set respectively.
[0030] According to an embodiment of the present disclosure, performing redundancy check on the at least one object to be stored corresponding to the system name information to obtain a redundancy check result includes:
[0031] Invoking a check instruction in the distributed version control system to perform redundancy check on every two of the at least one object to be stored corresponding to the system name information respectively to obtain the redundancy check result.
[0032] According to an embodiment of the present disclosure, performing redundancy check on the at least one object to be stored corresponding to the system name information to obtain a redundancy check result includes:
[0033] Generate check codes corresponding to each of the at least one object to be stored according to the respective configuration information of the at least one object to be stored; and
[0034] Perform redundancy check on at least one object to be stored corresponding to the system name information according to the check codes corresponding to each of the at least one object to be stored, and obtain the redundancy check result.
[0035] According to an embodiment of the present disclosure, the object information of each of the at least one object to be stored further includes user information and an object identifier, and the object identifier is determined according to the user information and the configuration information.
[0036] According to an embodiment of the present disclosure, storing the at least one object set into a relational database includes:
[0037] Determine the object set identifier of each of the at least one object set according to the system name information of each of the at least one object to be stored; and
[0038] Associatively store the object set identifier and the corresponding object identifier into the relational database.
[0039] According to an embodiment of the present disclosure, the method further includes:
[0040] In response to detecting a change operation on the content of the target object within a predetermined time period, determine the target object identifier corresponding to the content of the target object and the changed content of the target object, where the change operation includes at least one of an addition operation, a deletion operation, and a modification operation; and
[0041] Invoke the commit instruction in the distributed version control system, and submit the changed content of the target object to the distributed version control system according to the target object identifier.
[0042] According to another aspect of the present disclosure, there is provided an object storage device, including:
[0043] An acquisition module, configured to, in response to receiving an object storage request, acquire the object information of each of at least one object to be stored according to the object storage request, where the object storage request includes the at least one object to be stored, and the object information of each of the at least one object to be stored includes configuration information and object content;
[0044] A verification module, configured to respectively verify the configuration information and the object content of each of the at least one object to be stored according to a preset object specification corresponding to the configuration information, and obtain a verification result;
[0045] A creation module, configured to, when the verification results indicate that the configuration information and object content of each of the at least one object to be stored have passed the verification, create at least one object set by using a distributed version control system, where the at least one object set is used to store the object information of each of the at least one object to be stored having an association relationship; and
[0046] A storage module, configured to store the at least one object set into a relational database.
[0047] According to another aspect of the present disclosure, there is provided an electronic device, including:
[0048] One or more processors;
[0049] A memory, configured to store one or more instructions,
[0050] wherein, when the one or more instructions are executed by the one or more processors, the one or more processors are caused to implement the method as described above.
[0051] According to another aspect of the present disclosure, there is provided a computer-readable storage medium, on which executable instructions are stored, and when the executable instructions are executed by a processor, the processor is caused to implement the method as described above.
[0052] According to another aspect of the present disclosure, there is provided a computer program product, where the computer program product includes computer-executable instructions, and the computer-executable instructions are used to implement the method as described above when executed.
[0053] According to the embodiments of the present disclosure, since the object information is obtained according to an object storage request including at least one object to be stored, and the preset object specification corresponds to the configuration information in the object information, when the verification results indicate that the verification of the configuration information and object content of each of the at least one object to be stored has passed, by creating at least one object set by using a distributed version control system and storing the at least one object set into a relational database, since the access to individual objects can be realized, the technical problems in the related art that due to the need to use different storage and management schemes for different objects, the reusability of the object storage and management schemes is poor and the development cost is high are avoided, the consumption of resources is reduced, and the efficiency of object storage and management is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, the above and other objects, features and advantages of the present disclosure will become clearer. In the drawings:
[0055] Figure 1 Schematically shows a system architecture to which an object storage method according to an embodiment of the present disclosure can be applied;
[0056] Figure 2 Schematically shows a flowchart of an object storage method according to an embodiment of the present disclosure;
[0057] Figure 3 Schematically shows a flowchart of a method for obtaining a verification result according to an embodiment of the present disclosure;
[0058] Figure 4 Schematically shows an example diagram of a process for obtaining a verification result according to an embodiment of the present disclosure;
[0059] Figure 5 Schematically shows an example diagram of an object storage process according to an embodiment of the present disclosure;
[0060] Figure 6 Schematically shows a block diagram of an object storage device according to an embodiment of the present disclosure; and
[0061] Figure 7 Schematically shows a block diagram of an electronic device suitable for implementing an object storage method according to an embodiment of the present disclosure. Detailed implementation manners
[0062] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the following detailed description, for the sake of explanation, many specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure. However, it is obvious that one or more embodiments can be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts of the present disclosure.
[0063] The terms used herein are merely for describing specific embodiments and are not intended to limit the present disclosure. The terms "including", "comprising", etc. used herein indicate the presence of the described features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0064] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those of ordinary skill in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0065] In the case of using expressions such as "at least one of A, B, and C, etc.", generally, it should be interpreted according to the meaning that those skilled in the art usually understand this expression (for example, "a system having at least one of A, B, and C" should include but not be limited to a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", generally, it should be interpreted according to the meaning that those skilled in the art usually understand this expression (for example, "a system having at least one of A, B, or C" should include but not be limited to a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).
[0066] In the technical solutions of the present disclosure, the acquisition, storage, and application of the user's personal information involved, etc., all comply with the provisions of relevant laws and regulations, adopt necessary confidentiality measures, and do not violate public order and good customs.
[0067] In the technical solutions of the present disclosure, before obtaining or collecting the user's personal information, the authorization or consent of the user has been obtained.
[0068] Most operations in Git only need to access local files and resources and generally do not need to access other information on the network. Therefore, Git can still manage the project version locally after disconnecting from the network. It only needs to synchronize the records of local modifications to the cloud server after connecting to the network.
[0069] However, in the prior art, since Git is usually used based on code management of objects, that is, different storage and management schemes need to be used for different objects, the reusability of the object storage and management scheme is poor, and the development cost is high.
[0070] In addition, due to the zero-deposit and lump-withdrawal feature of Git, when searching for a specific file, it is necessary to obtain all files first and then find the target file through a filter, resulting in the occupation of communication resources and being unable to meet the performance requirements.
[0071] To at least partially solve the technical problems existing in the related art, the present disclosure provides an object storage method and apparatus, an electronic device, and a computer-readable storage medium, which can be applied to the fields of computer technology and fintech. The object storage method includes: in response to receiving an object storage request, obtaining the object information of each of at least one object to be stored according to the object storage request, where the object storage request includes at least one object to be stored, and the object information of each of the at least one object to be stored includes configuration information and object content; respectively verifying the configuration information and object content of each of the at least one object to be stored according to a preset object specification corresponding to the configuration information to obtain a verification result; in the case where the verification result indicates that the configuration information and object content of each of the at least one object to be stored pass the verification, creating at least one object set by using a distributed version control system, where the at least one object set is used to store the object information of each of the at least one object to be stored having an association relationship; and storing the at least one object set in a relational database.
[0072] It should be noted that the object storage method and apparatus provided in the embodiments of the present disclosure can be used in the fields of computer technology and fintech, for example, applied to the Internet field. The object storage method and apparatus provided in the embodiments of the present disclosure can also be used in any field other than the fields of computer technology and fintech, for example, applied to the information processing field. The application fields of the object storage method and apparatus provided in the embodiments of the present disclosure are not limited.
[0073] Figure 1 Schematically shows a system architecture to which the object storage method according to an embodiment of the present disclosure can be applied. It should be noted that Figure 1 The shown is only an example of the system architecture to which the embodiments of the present disclosure can be applied, to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0074] As Figure 1 shown, the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, a server 105, and a database 106. The network 104 is used to provide a communication link medium between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105, and between the server 105 and the database 106. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0075] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 and the database 106 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (for example only).
[0076] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop computers, and desktop computers, etc.
[0077] The server 105 can be a server that provides various services, such as a background management server that supports the websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (for example only). The background management server can analyze and process data such as received user requests, and feedback the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0078] The database 106 can be stored in a single server or a server cluster, and it can include one or more databases. The database 106 can include relational databases, such as Oracle, SQLServer, Sybase, Informix, access, DB2, or mysql, etc. The database 106 can also be a non-relational database, such as Hbase, Cassandra, SimpleDB, CouchDB, MongoDB, or Redis, etc.
[0079] It should be noted that the object storage method provided by the embodiments of the present disclosure can generally be executed by the server 105. Correspondingly, the object storage device provided by the embodiments of the present disclosure can generally be set in the server 105. The object storage method provided by the embodiments of the present disclosure can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105. Correspondingly, the object storage device provided by the embodiments of the present disclosure can also be set in a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105.
[0080] Alternatively, the object storage method provided by the embodiments of the present disclosure may also be executed by the first terminal device 101, the second terminal device 102, the third terminal device 103, or may also be executed by other terminal devices different from the first terminal device 101, the second terminal device 102, and the third terminal device 103. Correspondingly, the object storage device provided by the embodiments of the present disclosure may also be disposed in the first terminal device 101, the second terminal device 102, the third terminal device 103, or in other terminal devices different from the first terminal device 101, the second terminal device 102, and the third terminal device 103.
[0081] For example, the object information may originally be stored in any one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 (for example, the first terminal device 101, but not limited thereto), or stored on an external storage device and can be imported into the first terminal device 101. Then, the first terminal device 101 may execute the object storage method provided by the embodiments of the present disclosure locally, or send the object information to other terminal devices, servers, or server clusters, and the other terminal devices, servers, or server clusters that receive the object information execute the object storage method provided by the embodiments of the present disclosure.
[0082] It should be understood that Figure 1 the numbers of terminal devices, networks, servers, and databases in
[0083] are merely illustrative. According to actual needs, there may be any number of terminal devices, networks, servers, and databases.
[0084] Figure 2 Schematically shown is a flowchart of an object storage method according to an embodiment of the present disclosure.
[0085] As Figure 2 shown, the object storage method 200 may include operations S210 to S240.
[0086] In operation S210, in response to receiving an object storage request, according to the object storage request, obtain the object information of each of at least one object to be stored, where the object storage request includes at least one object to be stored, and the object information of each of the at least one object to be stored includes configuration information and object content.
[0087] In operation S220, according to a preset object specification corresponding to the configuration information, respectively verify the configuration information and the object content of each of the at least one object to be stored to obtain a verification result.
[0088] In operation S230, when the verification result indicates that the configuration information and object content of each of at least one object to be stored are both verified, at least one object set is created by using a distributed version control system, where the at least one object set is used to store the object information of each of at least one object to be stored having an association relationship.
[0089] In operation S240, the at least one object set is stored in a relational database.
[0090] According to an embodiment of the present disclosure, when object storage is required, a user can run a script capable of generating an object storage request through a terminal device, and can send the generated object storage request message to a server, so that the server stores the object information of each of at least one object to be stored according to the object storage request message.
[0091] According to an embodiment of the present disclosure, the object to be stored may include a source file, an executable program (EXE), a plug-in, a software package, etc. In the embodiment of the present disclosure, a distributed version control system and a relational database can be used to store the object to be stored.
[0092] According to an embodiment of the present disclosure, after receiving an object storage request, the object information of each of at least one object to be stored can be obtained. The object information of each of at least one object to be stored may include configuration information, object content, user information, and an object identifier. The configuration information may include format information, system name information, system version information, and association relationship information. The object content may include source code information of the object to be stored. The user information may include a user name, the creation time and modification time of the object to be stored, etc. The object identifier can be determined according to the user information and the configuration information, and the object identifier can be used to identify the object to be stored.
[0093] According to an embodiment of the present disclosure, after obtaining the object information of each of at least one object to be stored, a preset object specification can be determined according to the configuration information in the object information. After determining the preset object specification, the configuration information of each of at least one object to be stored can be verified according to the preset object specification. When it is determined that the configuration information of each of at least one object to be stored is verified, the object content of each of at least one object to be stored can be verified to obtain a verification result. The verification result can be used to indicate whether the configuration information and object content of each of at least one object to be stored are both verified.
[0094] According to an embodiment of the present disclosure, while a distributed version control system (Git) implements local object management, it can also be synchronized to a remote code repository. Through the branch management and change records of the distributed version control system, the entire process of object storage can be traced, and branches can also be created and merged through the distributed version control system to protect the development versions of objects.
[0095] According to an embodiment of the present disclosure, when both are verified successfully, at least one version control branch can be created using the distributed version control system. After creating at least one version control branch, using the distributed version control system, under each version control branch of the at least one version control branch, an object set for storing object information with an association relationship can be created respectively.
[0096] According to an embodiment of the present disclosure, after creating at least one object set, the at least one object set can be stored in a relational database. The relational database can include Oracle, SQLServer, Sybase, Informix, ElasticSearch, Access, DB2, or Mysql, etc.
[0097] According to an embodiment of the present disclosure, since the object information is obtained according to an object storage request including at least one object to be stored, and the preset object specification corresponds to the configuration information in the object information, when the verification result indicates that the verification of the configuration information and object content of each of the at least one object to be stored has passed, by using the distributed version control system to create at least one object set and storing the at least one object set in a relational database, since the access to individual objects can be realized, the technical problems in the related art that due to the need to use different storage and management schemes for different objects, the reusability of the object storage and management schemes is poor and the development cost is high are avoided, the consumption of resources is reduced, and the efficiency of object storage and management is improved.
[0098] Next, with reference to Figures 3 to 5 , the object storage method 200 according to an embodiment of the present invention will be further described.
[0099] Figure 3 A method flowchart for obtaining a verification result according to an embodiment of the present disclosure is schematically shown.
[0100] As Figure 3 shown, the method 320 for obtaining a verification result may include operations S321 to S322.
[0101] In operation S321, according to the preset object specification, the configuration information of each of the at least one object to be stored is verified to obtain an initial verification result.
[0102] In operation S322, when the initial verification result indicates that the configuration information of each of at least one object to be stored passes the verification, the object content is verified to obtain a verification result.
[0103] According to an embodiment of the present disclosure, the initial verification result can be used to indicate whether the configuration information of each of at least one object to be stored passes the verification. The verification result can be used to indicate whether both the configuration information and the object content of each of at least one object to be stored pass the verification.
[0104] According to an embodiment of the present disclosure, first, the configuration information of each of at least one object to be stored can be verified according to a preset object specification, and then, when the configuration information of each of at least one object to be stored passes the verification, the object content is verified.
[0105] According to an embodiment of the present disclosure, the preset object specification includes at least one permitted format information and an input object specification. The input object specification includes at least one permitted system name information and at least one permitted system version information. The configuration information includes format information, system name information, and system version information.
[0106] According to an embodiment of the present disclosure, the system name information can include the application system of the object to be stored. The system version information can include the version of the application system of the object to be stored. The format information can include the format of the object information of each of the objects to be stored. For example, the format information can include the text document format supported by Git, and the text document format can include.txt files or.readme files, etc.
[0107] According to an embodiment of the present disclosure, operation S321 can include the following operations.
[0108] Verify the format information according to at least one permitted format information to obtain a first verification result. When the first verification result indicates that the format information passes the verification, verify the system name information according to at least one permitted system name information to obtain a second verification result. When the second verification result indicates that the system name information passes the verification, verify the system version information according to at least one permitted system version information to obtain an initial verification result.
[0109] According to an embodiment of the present disclosure, the user can set the configuration information according to the actual requirements such as the file characteristics of the object to be stored. The preset object specification can be used to indicate the permitted selection range of each field. For example, the format information in the configuration information can be verified by enumeration according to the permitted format information in the preset object specification.
[0110] According to an embodiment of the present disclosure, the preset object specification may further include an output object specification. For example, the output object specification may be an output help file for a shell file. Alternatively, the output object specification may also be a log file at a specified level, etc.
[0111] According to an embodiment of the present disclosure, operation S322 may include the following operations.
[0112] Determine a verification tool corresponding to the system name information according to the system name information, where the verification tool includes a quality verification rule and a style verification rule. Invoke the verification tool to verify the object content to obtain a verification result.
[0113] According to an embodiment of the present disclosure, the verification of the object content can be implemented by invoking a verification tool (i.e., a linter checker) integrated in a programming framework to obtain a verification result. For example, the linter of a shell file, i.e., shellcheck, can be invoked to achieve automated deployment by means of packaging. The verification tool may include a quality verification rule and a style verification rule. The quality verification rule can be used to verify potential problems in the code. The style verification rule can be used to verify whether the code is easy to read.
[0114] According to an embodiment of the present disclosure, the verification of the object content can also be implemented by using an independently installed intermediate component to obtain a verification result. For example, an object content validator can be installed to implement the verification of the object content.
[0115] According to an embodiment of the present disclosure, since the initial verification result is obtained by verifying the configuration information of each of at least one object to be stored according to the preset object specification, and the verification result is obtained by verifying the object content when the initial verification result indicates that the configuration information of each of at least one object to be stored passes the verification, by verifying the configuration information and the object content of the object to be stored respectively, the stability and availability of the object to be stored can be ensured.
[0116] Figure 4 Schematically shows an example diagram of the process of obtaining a verification result according to an embodiment of the present disclosure.
[0117] As Figure 4 shown, in response to receiving an object storage request 401, at least one object information 402 of each object to be stored can be obtained according to the object storage request 401. The object information 402 of each of at least one object to be stored includes configuration information 402_1 and object content 402_2. The configuration information 402_1 may include format information 402_11, system name information 402_12, and system version information 402_13.
[0118] The preset object specification 403 corresponding to the configuration information 402_1 can be determined according to the configuration information 402_1. The preset object specification 403 may include at least one license format information 403_1, at least one license system name information 403_2, and at least one license system version information 403_3.
[0119] The format information 402_11 can be verified according to at least one license format information 403_1 to obtain a first verification result 404. In the case where the first verification result 404 indicates that the format information 404_11 passes the verification, the system name information 402_12 can be verified according to at least one license system name information 403_2 to obtain a second verification result 405. In the case where the second verification result 405 indicates that the system name information 402_12 passes the verification, the system version information 402_13 can be verified according to at least one license system version information 403_3 to obtain an initial verification result 406.
[0120] In the case where the initial verification result 406 indicates that the configuration information 402_1 of each of at least one object to be stored passes the verification, the verification tool 407 corresponding to the system name information 402_12 can be determined according to the system name information 402_12. The verification tool 407 can be called to verify the object content 402_2 to obtain a verification result 408.
[0121] According to an embodiment of the present disclosure, operation S230 may include the following operations.
[0122] The number of systems is determined according to the system name information of each of at least one object to be stored. According to the number of systems, at least one version control branch corresponding to the number of systems is created by using a distributed version control system. Using the distributed version control system, an object set is created respectively under each version control branch of at least one version control branch, wherein the system name information, the version control branch, and the object set correspond one by one.
[0123] According to an embodiment of the present disclosure, each version control branch in the distributed version control system can be stored on a specific path, and the user can perform operations of modifying or merging a certain branch on different paths for project version management.
[0124] According to an embodiment of the present disclosure, for example, the system name information of the first object to be stored is System A, the system name information of the second object to be stored is System B, and the system name information of the third object to be stored is System A. Then, it can be determined that the number of systems is two, namely System A and System B. In this case, a distributed version control system can be used to create a first object set for storing the objects to be stored applied to System A and a second object set for storing the objects to be stored applied to System B, respectively.
[0125] According to an embodiment of the present disclosure, the object storage method 200 may further include the following operations.
[0126] Perform redundancy check on at least one object to be stored corresponding to the system name information to obtain a redundancy check result. In the case where the redundancy check result indicates that the check fails, process at least one object to be stored corresponding to the system name information according to the redundancy check result. In the case where the redundancy check result indicates that the check passes, store at least one object to be stored corresponding to the system name information into the corresponding object set, respectively.
[0127] According to an embodiment of the present disclosure, the configuration information of each of the at least one object to be stored may further include association relationship information. The association relationship information may be used to characterize the association relationship of at least one object to be stored corresponding to the system name information.
[0128] According to an embodiment of the present disclosure, in the case where the configuration information and the object content of each of the at least one object to be stored are both verified to pass, redundancy check may be performed on at least one object to be stored corresponding to the system name information to ensure that there are no redundant files with different names but the same content in the same object set.
[0129] According to an embodiment of the present disclosure, redundancy check on at least one object to be stored corresponding to the system name information may be implemented by calling a check instruction in the distributed version control system. Alternatively, redundancy check on at least one object to be stored corresponding to the system name information may also be implemented by generating check codes corresponding to each of the at least one object to be stored according to the configuration information.
[0130] According to an embodiment of the present disclosure, performing redundancy check on at least one object to be stored corresponding to the system name information to obtain a redundancy check result may include the following operations.
[0131] Call a check instruction in the distributed version control system to perform redundancy check on every two of the at least one object to be stored corresponding to the system name information, respectively, to obtain a redundancy check result.
[0132] According to an embodiment of the present disclosure, a verification instruction in a distributed version control system, i.e., a DIFF instruction, can be invoked to compare each two of at least one object to be stored corresponding to the system name information, so as to detect whether there is consistency between each two objects to be stored. In the case where inconsistent information exists between each two objects to be stored, a redundancy verification result indicating that the verification passes can be obtained. In the case where a certain two objects to be stored are consistent, a redundancy verification result indicating that the verification fails can be obtained.
[0133] According to an embodiment of the present disclosure, performing redundancy verification on at least one object to be stored corresponding to the system name information and obtaining a redundancy verification result may further include the following operations.
[0134] Verification codes corresponding to at least one object to be stored are generated according to the respective configuration information of at least one object to be stored. Redundancy verification is performed on at least one object to be stored corresponding to the system name information according to the verification codes corresponding to at least one object to be stored, and a redundancy verification result is obtained.
[0135] According to an embodiment of the present disclosure, based on the MD5 information digest algorithm (MD5 Message-Digest Algorithm), verification codes corresponding to at least one object to be stored, i.e., MD5 strings, can be generated according to the respective configuration information of at least one object to be stored, so as to implement uniqueness authentication of object content. In the case where the MD5 strings of each two objects to be stored are all inconsistent, a redundancy verification result indicating that the verification passes can be obtained. In the case where the MD5 strings of a certain two objects to be stored are consistent, a redundancy verification result indicating that the verification fails can be obtained.
[0136] According to an embodiment of the present disclosure, operation S240 may include the following operations.
[0137] Object set identifiers of at least one object set are determined according to the respective system name information of at least one object to be stored. The object set identifier and the corresponding object identifier are associated and stored in a relational database.
[0138] According to an embodiment of the present disclosure, the object information of at least one object to be stored further includes user information and an object identifier, and the object identifier is determined according to the user information and the configuration information. An object identifier for identifying an object to be stored can be generated based on the respective configuration information and user information of at least one object to be stored. The object identifier can be, for example, a Universally Unique Identifier (UUID).
[0139] According to an embodiment of the present disclosure, the localization storage of an object to be stored can be achieved by setting an absolute path in the configuration information. When the redundancy check result indicates that the check passes, the object set identifier of each of at least one object set can be determined according to the system name information of each of the at least one object to be stored, and the at least one object to be stored corresponding to the system name information can be respectively stored in the corresponding object set.
[0140] According to an embodiment of the present disclosure, the object set identifier and the corresponding object identifier can be associated and stored in a relational database. According to the object identifier and the object set identifier, the object to be stored can be associated and stored between the distributed version control system and the relational database.
[0141] According to an embodiment of the present disclosure, since the object set is created by using the distributed version control system when the verification result indicates that the configuration information and the object content of each of at least one object to be stored pass the verification, by performing a redundancy check on the at least one object to be stored corresponding to the system name information, and when the redundancy check passes, associating and storing the object set identifier and the corresponding object identifier in the relational database, by using the relational database to manage the object set, the access of individual objects based on the distributed version control system is realized, thereby avoiding the technical problem of needing to obtain all objects to find a specific object in the distributed version control system, and improving the efficiency and accuracy of object management.
[0142] According to an embodiment of the present disclosure, the object storage method 200 may further include the following operations.
[0143] In response to detecting a change operation on the target object content within a predetermined time period, determine the target object identifier corresponding to the target object content and the changed target object content, where the change operation includes at least one of an addition operation, a deletion operation, and a modification operation. Invoke the commit instruction in the distributed version control system, and submit the changed target object content to the distributed version control system according to the target object identifier.
[0144] According to an embodiment of the present disclosure, in response to detecting an addition operation on the target object content within a predetermined time period, the target object identifier corresponding to the target object content and the added object content can be determined. Optionally, in response to detecting a deletion operation on the target object content within a predetermined time period, the target object identifier corresponding to the target object content and the deleted object content can be determined. Optionally, in response to detecting a modification operation on the target object content within a predetermined time period, the target object identifier corresponding to the target object content and the modified object content can be determined. The specific value of the predetermined time period can be set by those skilled in the art according to actual needs, and the embodiments of the present disclosure do not limit this.
[0145] According to an embodiment of the present disclosure, a commit instruction of a distributed version control system can be invoked to perform a commit to the distributed version control system for each operation. This can be achieved through programming with a development framework, such as Spring Boot. Alternatively, after object storage is completed, the distributed version control system can also be used to store the object locally, and after connecting to the network, it can be pushed to a remote repository for backup.
[0146] According to an embodiment of the present disclosure, by invoking the commit instruction and submitting the content of the changed target object to the distributed version control system according to the target object identifier, it is possible to automatically detect change operations such as add operations, delete operations, and modify operations, realizing real-time updates of the objects stored in the distributed version control system and improving the accuracy of object storage.
[0147] Figure 5 A schematic example diagram of an object storage process according to an embodiment of the present disclosure is shown.
[0148] As Figure 5 shown, in response to receiving an object storage request 501, at least one object information 502 of each object to be stored can be obtained according to the object storage request 501. The object storage request 501 may include at least one object to be stored 501_1. The object information 502 of each of the at least one object to be stored includes configuration information 502_1 and an object identifier 502_2.
[0149] The preset object specification 503 corresponding to the configuration information 502_1 can be determined according to the configuration information 502_1. According to the preset object specification 503 corresponding to the configuration information 502_1, the configuration information 502_1 and the object content of each of the at least one object to be stored can be respectively verified to obtain a verification result 504.
[0150] In the case where the verification result 504 indicates that the configuration information 502_1 and the object content of each of the at least one object to be stored are both verified to pass, the system quantity 505 can be determined according to the system name information of each of the at least one object to be stored.
[0151] At least one version control branch 506 corresponding to the system quantity 505 can be created by using the distributed version control system according to the system quantity 505. An object set 507 can be created respectively under each version control branch in the at least one version control branch 506 by using the distributed version control system.
[0152] Redundancy checks can be performed on at least one object to be stored 501_1 corresponding to the system name information, and a redundancy check result 508 is obtained. When the redundancy check result 508 indicates that the check has passed, at least one object to be stored 501_1 corresponding to the system name information can be stored in the corresponding object set 507 respectively.
[0153] Based on the system name information of at least one object to be stored respectively, the object set identifiers 509 of at least one object set 507 can be determined respectively. The object set identifier 509 and the corresponding object identifier 502_2 can be stored in the relational database 510 in an associated manner.
[0154] The above are only exemplary embodiments, but not limited thereto. Other object storage methods known in the art can also be included, as long as the storage of the object to be stored can be realized.
[0155] Figure 6 A block diagram of an object storage device according to an embodiment of the present disclosure is schematically shown.
[0156] As Figure 6 shown, the object storage device 600 may include an acquisition module 601, a verification module 602, a creation module 603, and a first storage module 604.
[0157] The acquisition module 601 is configured to, in response to receiving an object storage request, obtain the object information of at least one object to be stored respectively according to the object storage request, where the object storage request includes at least one object to be stored, and the object information of at least one object to be stored respectively includes configuration information and object content.
[0158] The verification module 602 is configured to verify the configuration information and object content of at least one object to be stored respectively according to a preset object specification corresponding to the configuration information, and obtain a verification result.
[0159] The creation module 603 is configured to, when the verification result indicates that the configuration information and object content of at least one object to be stored respectively pass the verification, create at least one object set by using a distributed version control system, where at least one object set is used to store the object information of at least one object to be stored having an association relationship respectively.
[0160] The first storage module 604 is configured to store at least one object set in a relational database.
[0161] According to an embodiment of the present disclosure, the preset object specification includes at least one permission format information and an input object specification, the input object specification includes at least one permission system name information and at least one permission system version information, and the configuration information includes format information, system name information, and system version information.
[0162] According to an embodiment of the present disclosure, the verification module 602 may include a first verification unit and a second verification unit.
[0163] The first verification unit is configured to verify the configuration information of each of at least one object to be stored according to a preset object specification, and obtain an initial verification result.
[0164] The second verification unit is configured to verify the object content to obtain a verification result when the initial verification result indicates that the configuration information of each of at least one object to be stored passes the verification.
[0165] According to an embodiment of the present disclosure, the first verification unit may include a first verification subunit, a second verification subunit, and a third verification subunit.
[0166] The first verification subunit is configured to verify the format information according to at least one permitted format information, and obtain a first verification result.
[0167] The second verification subunit is configured to verify the system name information according to at least one permitted system name information to obtain a second verification result when the first verification result indicates that the format information passes the verification.
[0168] The third verification subunit is configured to verify the system version information according to at least one permitted system version information to obtain an initial verification result when the second verification result indicates that the system name information passes the verification.
[0169] According to an embodiment of the present disclosure, the second verification unit may include a determination subunit and a fourth verification subunit.
[0170] The determination subunit is configured to determine a verification tool corresponding to the system name information according to the system name information, where the verification tool includes a quality verification rule and a style verification rule.
[0171] The fourth verification subunit is configured to call the verification tool to verify the object content to obtain a verification result.
[0172] According to an embodiment of the present disclosure, the creation module 603 may include a first determination unit, a first creation unit, and a second creation unit.
[0173] The first determination unit is configured to determine the number of systems according to the system name information of each of at least one object to be stored.
[0174] The first creation unit is configured to create at least one version control branch corresponding to the number of systems by using a distributed version control system according to the number of systems.
[0175] A second creation unit is configured to use a distributed version control system to separately create a set of objects under each version control branch in at least one version control branch, where the system name information, the version control branch, and the set of objects are in one-to-one correspondence.
[0176] According to an embodiment of the present disclosure, the configuration information of each of the at least one object to be stored further includes association relationship information, and the association relationship information is used to characterize the association relationships of the at least one object to be stored corresponding to the system name information.
[0177] According to an embodiment of the present disclosure, the object storage device 600 may further include a verification module, a processing module, and a second storage module.
[0178] The verification module is configured to perform redundancy verification on at least one object to be stored corresponding to the system name information to obtain a redundancy verification result.
[0179] The processing module is configured to, when the redundancy verification result indicates that the verification fails, process at least one object to be stored corresponding to the system name information according to the redundancy verification result.
[0180] The second storage module is configured to, when the redundancy verification result indicates that the verification passes, store at least one object to be stored corresponding to the system name information into the corresponding set of objects respectively.
[0181] According to an embodiment of the present disclosure, the verification module may include a first verification unit.
[0182] The first verification unit is configured to call a verification instruction in the distributed version control system to perform redundancy verification on every two of the at least one object to be stored corresponding to the system name information respectively to obtain a redundancy verification result.
[0183] According to an embodiment of the present disclosure, the verification module may further include a generation unit and a second verification unit.
[0184] The generation unit is configured to generate a verification code corresponding to each of the at least one object to be stored according to the configuration information of each of the at least one object to be stored.
[0185] The second verification unit is configured to perform redundancy verification on at least one object to be stored corresponding to the system name information according to the verification codes corresponding to each of the at least one object to be stored to obtain a redundancy verification result.
[0186] According to an embodiment of the present disclosure, the object information of each of the at least one object to be stored further includes user information and an object identifier, and the object identifier is determined according to the user information and the configuration information.
[0187] According to an embodiment of the present disclosure, the first storage module 604 may include a second determination unit and a storage unit.
[0188] The second determination unit is configured to determine the object set identifier of each of at least one object set according to the system name information of each of at least one object to be stored.
[0189] The storage unit is configured to associate and store the object set identifier and the corresponding object identifier in a relational database.
[0190] According to an embodiment of the present disclosure, the object storage device 600 may further include a determination module and a submission module.
[0191] The determination module is configured to, in response to detecting a change operation on the target object content within a predetermined period, determine the target object identifier corresponding to the target object content and the changed target object content, where the change operation includes at least one of an addition operation, a deletion operation, and a modification operation.
[0192] The submission module is configured to call a commit instruction in a distributed version control system and submit the changed target object content to the distributed version control system according to the target object identifier.
[0193] According to an embodiment of the present disclosure, any multiple of the modules, sub-modules, units, and sub-units, or at least part of the functions of any multiple of them, may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to an embodiment of the present disclosure may be split into multiple modules for implementation. Any one or more of the modules, sub-modules, units, and sub-units according to an embodiment of the present disclosure may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or may be implemented by any other reasonable manner of integrating or packaging circuits in hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. Alternatively, one or more of the modules, sub-modules, units, and sub-units according to an embodiment of the present disclosure may be at least partially implemented as a computer program module, and when the computer program module is run, it may execute the corresponding function.
[0194] For example, any combination of the obtaining module 601, the verifying module 602, the creating module 603, and the first storage module 604 can be integrated and implemented in one module / unit / sub-unit, or any one of the modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the functions of one or more of these modules / units / sub-units can be combined with at least part of the functions of other modules / units / sub-units and implemented in one module / unit / sub-unit. According to an embodiment of the present disclosure, at least one of the obtaining module 601, the verifying module 602, the creating module 603, and the first storage module 604 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on substrate, a system on package, an application specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging circuits, etc., in hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. Alternatively, at least one of the obtaining module 601, the verifying module 602, the creating module 603, and the first storage module 604 can be at least partially implemented as a computer program module, and when the computer program module is run, it can execute corresponding functions.
[0195] It should be noted that the object storage device part in the embodiments of the present disclosure corresponds to the object storage method part in the embodiments of the present disclosure. For the description of the object storage device part, please refer to the object storage method part specifically, and details are not described herein again.
[0196] Figure 7 A block diagram of an electronic device suitable for implementing the object storage method according to an embodiment of the present disclosure is schematically shown. Figure 7 The shown electronic device is only an example, and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.
[0197] As Figure 7 shown, the computer electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 709 into a random access memory (RAM) 703. The processor 701 can include, for example, a general microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application specific integrated circuit (ASIC)), etc. The processor 701 can also include on-board memory for caching purposes. The processor 701 can include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0198] In the RAM 703, various programs and data required for the operation of the electronic device 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. The processor 701 performs various operations of the method flow according to the embodiments of the present disclosure by executing the programs in the ROM 702 and / or the RAM 703. It should be noted that the programs may also be stored in one or more memories other than the ROM 702 and the RAM 703. The processor 701 may also perform various operations of the method flow according to the embodiments of the present disclosure by executing the programs stored in the one or more memories.
[0199] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, and the input / output (I / O) interface 705 is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed so that a computer program read therefrom is installed into the storage portion 708 as needed.
[0200] According to an embodiment of the present disclosure, the method flow according to the embodiments of the present disclosure may be implemented as a computer software program. For example, the embodiments of the present disclosure include a computer program product that includes a computer program carried on a computer-readable storage medium, and the computer program includes program codes for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above functions defined in the system according to the embodiments of the present disclosure are performed. According to an embodiment of the present disclosure, the above-described systems, devices, apparatuses, modules, units, etc. may be implemented by computer program modules.
[0201] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist separately without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of the present disclosure is implemented.
[0202] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0203] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include one or more memories other than the above-described ROM 702 and / or RAM 703 and / or ROM 702 and RAM 703.
[0204] An embodiment of the present disclosure also includes a computer program product, which includes a computer program. The computer program includes program code for executing the method provided by the embodiment of the present disclosure. When the computer program product runs on an electronic device, the program code is used to cause the electronic device to implement the object storage method provided by the embodiment of the present disclosure.
[0205] When the computer program is executed by the processor 701, the above functions defined in the system / apparatus of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the above-described systems, apparatuses, modules, units, etc. may be implemented by computer program modules.
[0206] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices and magnetic storage devices. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and be downloaded and installed through the communication part 709, and / or be installed from the removable medium 711. The program code included in the computer program may be transmitted by any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0207] In accordance with embodiments of the present disclosure, program code for executing the computer programs provided by the embodiments of the present disclosure may be written in any combination of one or more programming languages. Specifically, these computing programs may be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, such as Java, C++, Python, the "C" language, or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., by connecting through the Internet using an Internet service provider).
[0208] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features described in the various embodiments and / or claims of the present disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of the present disclosure.
[0209] The above describes the embodiments of the present disclosure. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in each embodiment cannot be used advantageously in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art can make various substitutions and modifications, and all such substitutions and modifications should fall within the scope of the present disclosure.
Claims
1. An object storage method, comprising: In response to receiving an object storage request, according to the object storage request, obtaining object information of each of at least one object to be stored, wherein the object storage request includes the at least one object to be stored, and the object information of each of the at least one object to be stored includes configuration information and object content; According to a preset object specification corresponding to the configuration information, respectively verifying the configuration information and object content of each of the at least one object to be stored to obtain a verification result, wherein the preset object specification includes at least one permitted format information and an input object specification, the input object specification includes at least one permitted system name information and at least one permitted system version information, and the configuration information includes format information, system name information, and system version information; Determining the number of systems according to the system name information of each of the at least one object to be stored; According to the number of systems, using a distributed version control system to create at least one version control branch corresponding to the number of systems; Using the distributed version control system, respectively creating object sets under each of the at least one version control branch, wherein the system name information, the version control branch, and the object set are in one-to-one correspondence, and the at least one object set is used to store the object information of each of the at least one object to be stored having an association relationship; and Storing the at least one object set into a relational database.
2. The method according to claim 1, wherein The respectively verifying the configuration information and object content of each of the at least one object to be stored according to a preset object specification corresponding to the configuration information to obtain a verification result includes: Verifying the configuration information of each of the at least one object to be stored according to the preset object specification to obtain an initial verification result; and When the initial verification result indicates that the configuration information of each of the at least one object to be stored passes the verification, verifying the object content to obtain the verification result.
3. The method according to claim 2, wherein, The verifying the configuration information of each of the at least one object to be stored according to the preset object specification to obtain an initial verification result includes: Verifying the format information according to the at least one permitted format information to obtain a first verification result; When the first verification result indicates that the format information passes the verification, verifying the system name information according to the at least one permitted system name information to obtain a second verification result; and When the second verification result indicates that the system name information passes the verification, verifying the system version information according to the at least one permitted system version information to obtain the initial verification result.
4. The method according to claim 2 or 3, wherein The when the initial verification result indicates that the configuration information of each of the at least one object to be stored passes the verification, verifying the object content to obtain the verification result includes: Determining a verification tool corresponding to the system name information according to the system name information, wherein the verification tool includes a quality verification rule and a style verification rule; and Invoke the verification tool to verify the object content and obtain the verification result.
5. The method according to claim 1, wherein, The configuration information of each of the at least one object to be stored further includes association relationship information, and the association relationship information is used to characterize the association relationship of the at least one object to be stored corresponding to the system name information; The method further includes, before storing the at least one object set into the relational database: Perform redundancy verification on the at least one object to be stored corresponding to the system name information to obtain a redundancy verification result; In the case where the redundancy verification result indicates that the verification fails, process the at least one object to be stored corresponding to the system name information according to the redundancy verification result; And In the case where the redundancy verification result indicates that the verification passes, store the at least one object to be stored corresponding to the system name information into the corresponding object set respectively.
6. The method according to claim 5, wherein The performing redundancy verification on the at least one object to be stored corresponding to the system name information to obtain a redundancy verification result includes: Invoke the verification instruction in the distributed version control system to perform redundancy verification on every two of the at least one object to be stored corresponding to the system name information respectively to obtain the redundancy verification result.
7. The method according to claim 5, wherein the performing redundancy verification on the at least one object to be stored corresponding to the system name information to obtain a redundancy verification result includes: Generate a check code corresponding to each of the at least one object to be stored according to the configuration information of each of the at least one object to be stored; And Perform redundancy verification on the at least one object to be stored corresponding to the system name information according to the check code corresponding to each of the at least one object to be stored to obtain the redundancy verification result.
8. The method according to claim 1, wherein The object information of each of the at least one object to be stored further includes user information and an object identifier, and the object identifier is determined according to the user information and the configuration information; The storing the at least one object set into the relational database includes: Determine the object set identifier of each of the at least one object set according to the system name information of each of the at least one object to be stored; And Associatively store the object set identifier and the corresponding object identifier into the relational database.
9. The method according to claim 1, further includes: In response to detecting a change operation on the target object content within a predetermined time period, determine the target object identifier and the changed target object content corresponding to the target object content, where the change operation includes at least one of an addition operation, a deletion operation, and a modification operation; and Invoke the commit instruction in the distributed version control system and submit the changed target object content to the distributed version control system according to the target object identifier.
10. An object storage device, comprising: An acquisition module, configured to, in response to receiving an object storage request, acquire object information of each of at least one object to be stored according to the object storage request, where the object storage request includes the at least one object to be stored, and the object information of each of the at least one object to be stored includes configuration information and object content; A verification module, configured to verify the configuration information and object content of each of the at least one object to be stored respectively according to a preset object specification corresponding to the configuration information, to obtain a verification result, where the preset object specification includes at least one permitted format information and an input object specification, the input object specification includes at least one permitted system name information and at least one permitted system version information, and the configuration information includes format information, system name information, and system version information; A first determination unit, configured to determine the number of systems according to the system name information of each of the at least one object to be stored; A first creation unit, configured to create at least one version control branch corresponding to the number of systems by using a distributed version control system according to the number of systems; A second creation unit, configured to use the distributed version control system to respectively create an object set under each of the at least one version control branches, where the system name information, the version control branch, and the object set are in one-to-one correspondence, and the at least one object set is used to store the object information of each of the at least one object to be stored having an association relationship; and A first storage module, configured to store the at least one object set into a relational database.
11. An electronic device, comprising: One or more processors; A memory, configured to store one or more instructions, wherein when the one or more instructions are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, on which executable instructions are stored, and when the executable instructions are executed by a processor, the processor implements the method according to any one of claims 1 to 9.
13. A computer program product, the computer program product includes computer-executable instructions, and the computer-executable instructions are used to implement the method according to any one of claims 1 to 9 when executed.
Citation Information
Patent Citations
Data processing method, device and system of distributed version control system
CN103647850A
Data storage method and device, electronic equipment and computer readable storage medium
CN110134670A