CN117194298A - Control method, device, equipment and storage medium - Google Patents

Control method, device, equipment and storage medium Download PDF

Info

Publication number
CN117194298A
CN117194298A CN202311204138.9A CN202311204138A CN117194298A CN 117194298 A CN117194298 A CN 117194298A CN 202311204138 A CN202311204138 A CN 202311204138A CN 117194298 A CN117194298 A CN 117194298A
Authority
CN
China
Prior art keywords
interface
target
data
storage object
storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311204138.9A
Other languages
Chinese (zh)
Other versions
CN117194298B (en
Inventor
陈月
李政
罗永秀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Hongyi Software Technology Co ltd
Original Assignee
Shanghai Hongyi Software Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Hongyi Software Technology Co ltd filed Critical Shanghai Hongyi Software Technology Co ltd
Priority to CN202311204138.9A priority Critical patent/CN117194298B/en
Publication of CN117194298A publication Critical patent/CN117194298A/en
Application granted granted Critical
Publication of CN117194298B publication Critical patent/CN117194298B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a control method, a control device, control equipment and a storage medium. The method comprises the following steps: generating a proxy object corresponding to the target storage object according to the configuration information of the target storage object; searching a storage implementation class corresponding to the target storage object; receiving identification information of a target interface and interface parameters of the target interface; and executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameters of the target interface and the storage implementation class corresponding to the target storage object. And the function of the storage object with single function is expanded, so that more scenes are satisfied.

Description

Control method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a control method, a control device and a storage medium.
Background
In view of the development of Storage technologies, currently popular Storage types, such as hard disks, NAS, object Storage, and the like, are not replaced by a substitution, but rather are an extension of a scene, and are widely deployed in a corresponding scene.
There are many object-only stores, such as the ali OSS store, the chinese OBS store, the gold mountain KS3 store, the hundred degrees BOS store, the microsoft Azure store, the AWS S3 store, the shift store of Openstack, and many other proprietary storage types. The diversity of storage objects faces the problems of high development cost, long lead time, low multiplexing rate and poor expansibility for the system.
The access modes or protocols of different storage objects are different, and even if the same protocol, such as object storage of the S3 protocol, different S3 cloud storage providers have own characteristics. In the scene of higher security, the storage encryption technology is also involved, if the system is to adapt to the storage, a great deal of research and development resources are required, developers need to know and learn the interface specifications, the docking modes and the processing of returned data of various storages, a long time is input in the link of adapting to the storage, and the online time of the system is prolonged. If another storage object needs to be adapted, the cycle from learning to development, docking and debugging is involved.
Even if the adaptation is completed, because the storage objects and the service are deeply coupled, the storage objects and the service lack of generality, when a plurality of systems need to adapt to the same storage object, the storage objects cannot be multiplexed, and the storage objects need to be re-developed.
Disclosure of Invention
The embodiment of the invention provides a control method, a control device, control equipment and a control storage medium, wherein a unified call interface is exposed to the outside and decoupled with service functions, so that the universality of a storage object is improved. And the function of the storage object with single function is expanded, so that more scenes are satisfied.
According to an aspect of the present invention, there is provided a control method including:
generating a proxy object corresponding to the target storage object according to the configuration information of the target storage object;
searching a storage implementation class corresponding to the target storage object;
receiving identification information of a target interface and interface parameters of the target interface;
and executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameters of the target interface and the storage implementation class corresponding to the target storage object.
According to another aspect of the present invention, there is provided a control apparatus including:
the proxy object generation module is used for generating a proxy object corresponding to the target storage object according to the configuration information of the target storage object;
the storage realization class query module is used for searching the storage realization class corresponding to the target storage object;
The receiving module is used for receiving the identification information of the target interface and the interface parameters of the target interface;
and the execution module is used for executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameters of the target interface and the storage implementation class corresponding to the target storage object.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the control method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a control method according to any one of the embodiments of the present invention.
According to the embodiment of the invention, the proxy object corresponding to the target storage object is generated according to the configuration information of the target storage object; searching a storage implementation class corresponding to the target storage object; receiving identification information of a target interface and interface parameters of the target interface; and executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameters of the target interface and the storage implementation class corresponding to the target storage object, exposing a uniform calling interface to the outside, and decoupling the service function, thereby improving the universality of the storage object. And the function of the storage object with single function is expanded, so that more scenes are satisfied.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a control method in an embodiment of the invention;
FIG. 2 is a schematic diagram of a control device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device in an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
Example 1
Fig. 1 is a flowchart of a control method provided in an embodiment of the present invention, where the embodiment is applicable to a case of controlling a storage object, the method may be performed by a control device in the embodiment of the present invention, and the device may be implemented in a software and/or hardware manner, as shown in fig. 1, and the method specifically includes the following steps:
S110, generating a proxy object corresponding to the target storage object according to the configuration information of the target storage object.
The configuration information of the target storage object comprises: the address, IP, key, etc. of the target storage object.
Specifically, the method for generating the proxy object corresponding to the target storage object according to the configuration information of the target storage object may be: and acquiring configuration information of a target storage object to be accessed, which is input by a user according to a preset data format, and generating a proxy object corresponding to the target storage object through a construction method and the configuration information, namely operating and accessing the target storage object through the proxy object corresponding to the target storage object.
S120, searching a storage implementation class corresponding to the target storage object.
It should be noted that each storage object corresponds to one storage implementation class. And the class external exposure interfaces (interfaces such as writing, reading, deleting, copying, updating, inquiring, calculating and the like) are realized through the storage for calling by a calling party. The storage implementation class may also directly expose the WriteStream implementation class and/or the ReadStream implementation class for calling by the caller.
Specifically, the manner of searching the storage implementation class corresponding to the target storage object may be: and querying a database through the identification information of the target storage object to obtain a storage implementation class corresponding to the target storage object.
S130, receiving the identification information of the target interface and the interface parameters of the target interface.
When the caller needs to call the target interface, the caller needs to input the identification information of the target interface and the interface parameters of the target interface.
Wherein the target interface comprises: at least one of a query interface, a copy interface, a delete interface, a write interface, a read interface, a calculate MD5 feature value interface, and an update interface.
The interface parameter of the target interface is related to an interface type of the target interface, for example, if the target interface is a query interface, the interface parameter of the query interface includes: any one of identification information of data to be queried, identification information of storage attributes to be queried, and identification information of data written into a storage object. If the target interface is a duplicate interface, the interface parameters of the duplicate interface include: identification information of the data to be copied, or identification information of the data to be copied and a proxy object corresponding to the first storage object. If the target interface is a write interface, the interface parameters of the write interface include: data is to be written. If the target interface is a read interface, interface parameters of the read interface include: identification information of data to be read. If the target interface is a deletion interface, the interface parameters of the deletion interface include: identification information of the data to be deleted. If the target interface is the MD5 eigenvalue calculation interface, the interface parameters of the MD5 eigenvalue interface include: identification information of the target file. If the target interface is an update interface, the interface parameters of the update interface include: identification information and difference data of data to be updated.
And S140, executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameters of the target interface and the storage implementation class corresponding to the target storage object.
Specifically, the method for executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object may be: and determining the interface type of the target interface according to the identification information of the target interface, and executing the target operation corresponding to the target interface according to the interface type of the target interface, the interface parameters of the target interface and the storage implementation class corresponding to the target storage object. For example, if the interface type of the target interface is a query interface, querying the target storage object through the storage implementation class corresponding to the target storage object to obtain attribute information corresponding to the interface parameter of the target interface. If the interface type of the target interface is a first type interface, determining data to be processed according to the interface parameters of the target interface, and calling a Stream implementation class corresponding to the first type interface through a storage implementation class corresponding to a target storage object to process the data to be processed. If the interface type of the target interface is a first type interface and the blocking operation is determined to be required according to the interface parameters of the target interface, the Stream implementation class corresponding to the target interface is called by the storage implementation class corresponding to the target storage object to block the data to be processed, and then the data to be processed after the blocking is processed. If the interface type of the target interface is a first type interface and it is determined that the data to be processed needs to be encrypted or decrypted according to the configuration information of the target storage object, the Stream implementation class corresponding to the target interface is called through the storage implementation class corresponding to the target storage object to encrypt or decrypt the data to be processed, and then the encrypted or decrypted data to be processed is processed. If the target interface is determined to be the copy interface according to the identification information of the target interface, determining the data to be copied according to the interface parameters of the copy interface, creating copy data corresponding to the data to be copied through a storage implementation class corresponding to the target storage object, and writing the copy data into the target storage object.
When the user invokes the proxy object corresponding to the target storage object, the storage implementation class (storage provider implementation class) corresponding to the storage to be accessed is found according to the configuration information of the proxy object corresponding to the target storage object, and is provided for the internal use of the proxy object corresponding to the target storage object. The user does not need to care which storage provider implementation class is providing storage access functionality.
Optionally, executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object includes:
if the target interface is determined to be a query interface according to the identification information of the target interface, querying the target storage object through a storage implementation class corresponding to the target storage object to obtain attribute information corresponding to interface parameters of the target interface, wherein the interface parameters of the query interface comprise: any one of identification information of data to be queried, identification information of storage attribute to be queried and identification information of data written into a storage object, wherein the attribute information comprises: any one of data attribute information, storage attribute information, and a data amount of a written storage object, the storage attribute information including: the available space of the target storage object and/or the total space of the target storage object.
Wherein the query interface comprises: the system comprises a data attribute information query interface, a storage attribute information query interface and a data volume query interface of a written storage object. If the query interface is a data attribute information query interface, the interface parameters of the query interface are identification information of the data to be queried. If the query interface is a storage attribute information query interface, the interface parameters of the query interface are identification information of the storage attribute to be queried. If the query interface is a data volume query interface of the written storage object, the interface parameter of the query interface is the identification information of the data of the written storage object.
It should be noted that, if the query interface is a data attribute information query interface, the attribute information is data attribute information. If the query interface is a storage attribute information query interface, the attribute information is storage attribute information. If the query interface is a data volume query interface of the written storage object, the attribute information is the data volume of the written storage object.
Optionally, the query interface may further include: designating a file query interface, wherein the interface parameters of the designated file query interface comprise: identification information of a specified file, the attribute information including: if yes or no, for example, if the query result is that the specified file exists in the target storage object, yes is returned, and if the query result is that the specified file does not exist in the target storage object, no is returned.
Optionally, executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object includes:
if the target interface is determined to be a data attribute information query interface according to the identification information of the target interface, querying the target storage object through a storage implementation class corresponding to the target storage object to obtain data attribute information corresponding to an interface parameter of the target interface, wherein the interface parameter of the data attribute information query interface comprises: identification information of data to be queried.
It should be noted that, the data attribute information of the data to be queried can be obtained by querying the target storage object through the data attribute information query interface.
Optionally, executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object includes:
if the target interface is determined to be a storage attribute information query interface according to the identification information of the target interface, querying the target storage object through a storage implementation class corresponding to the target storage object to obtain storage attribute information corresponding to an interface parameter of the target interface, wherein the interface parameter of the storage attribute information query interface comprises: identifying information of a storage attribute to be queried, wherein the storage attribute information comprises: the available space of the storage object and/or the total space of the storage object.
If the available space of the storage object is to be queried, the identification information of the storage attribute to be queried is the identification information corresponding to the query of the available space. If the total space of the storage object is to be queried, the identification information of the storage attribute to be queried is the identification information corresponding to the total space query.
It should be noted that, the query on the available space and the total space of the target storage object may be implemented through the storage attribute information query interface.
Optionally, executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object includes:
if the target interface is determined to be the data volume query interface of the written storage object according to the identification information of the target interface, querying the target storage object through a storage implementation class corresponding to the target storage object to obtain the data volume of the written storage object corresponding to the interface parameter of the target interface, wherein the interface parameters of the data volume query interface of the written storage object include: identification information of data of the storage object has been written.
It should be noted that, the data volume of the written storage object corresponding to the interface parameter of the target interface may be obtained by querying the target storage object through the data volume query interface of the written storage object.
Optionally, executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object includes:
if the target interface is determined to be a copy interface according to the identification information of the target interface, determining data to be copied according to interface parameters of the copy interface, creating copy data corresponding to the data to be copied through a storage implementation class corresponding to the target storage object, and writing the copy data into the target storage object, wherein the interface parameters of the copy interface comprise: identification information of the data to be copied.
It should be noted that, if the interface parameter of the copy interface includes only the identification information of the data to be copied, the description is the copy of the same storage object.
In a specific example, if the target interface is a replication interface, determining the data to be replicated according to the identification information of the data to be replicated, creating replication data corresponding to the data to be replicated through a storage implementation class corresponding to the target storage object, and writing the replication data into the target storage object.
Optionally, executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object includes:
If the target interface is determined to be a copy interface according to the identification information of the target interface, determining data to be copied according to interface parameters of the copy interface, creating copy data corresponding to the data to be copied through a storage implementation class corresponding to the target storage object, writing the copy data into a proxy object corresponding to the first storage object according to the interface parameters of the target interface, and writing the copy data into the first storage object through the proxy object corresponding to the first storage object, wherein the interface parameters of the copy interface include: the identification information of the data to be copied and the proxy object corresponding to the first storage object.
It should be noted that, if the interface parameters of the duplicate interface include: the identification information of the data to be copied and the proxy object corresponding to the first storage object describe cross-storage copying, namely copying the data to be copied from the target storage object to the first storage object.
In a specific example, if the target interface is a replication interface, determining that the replication data corresponding to the replication data is created by the storage implementation class corresponding to the target storage object according to the identification information of the replication data, writing the replication data into the proxy object corresponding to the first storage object, and writing the replication data into the first storage object by the proxy object corresponding to the first storage object.
Optionally, executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object includes:
if the target interface is determined to be a first type interface according to the identification information of the target interface, determining data to be processed according to the interface parameters of the target interface, and calling a Stream implementation class corresponding to the first type interface to process the data to be processed through a storage implementation class corresponding to a target storage object, wherein the first type interface comprises: a write interface and a read interface.
Specifically, if the first type interface is a write interface, determining data to be written according to interface parameters of the write interface, and calling a WriteStream implementation class corresponding to the write interface through a storage implementation class corresponding to the target storage object to write the data to be written into the target storage object. If the first type interface is a reading interface, determining data to be read according to interface parameters of the reading interface, and calling a ReadStream implementation class corresponding to the reading interface to read the data to be read in the target storage object through the storage implementation class corresponding to the target storage object.
Optionally, if the target interface is determined to be the first type interface according to the identification information of the target interface, determining data to be processed according to the interface parameter of the target interface, and calling a Stream implementation class corresponding to the first type interface to process the data to be processed through a storage implementation class corresponding to the target storage object, including:
if the target interface is determined to be a first type interface according to the identification information of the target interface and the processing type is determined to be block processing according to the interface parameters of the target interface, the Stream realization class corresponding to the first type interface is called through the storage realization class corresponding to the target storage object to block the data to be processed, and then the data to be processed after the block processing is performed.
Specifically, if the target interface is a writing interface and the writing type is determined to be block writing according to the interface parameters of the writing interface, the write stream implementation class is called through the storage implementation class corresponding to the target storage object to block the data to be written, and the data after the block is written into the target storage object in sequence. If the target interface is a reading interface and the reading type is determined to be block reading according to the interface parameters of the reading interface, calling a ReadStream implementation class through a storage implementation class corresponding to the target storage object to block data to be read, and sequentially reading the data to be read after the blocks in the target storage object.
Optionally, if the target interface is determined to be the first type interface according to the identification information of the target interface, determining data to be processed according to the interface parameter of the target interface, and calling a Stream implementation class corresponding to the first type interface to process the data to be processed through a storage implementation class corresponding to the target storage object, including:
if the target interface is determined to be a first type interface according to the identification information of the target interface, and the type of the target storage object is determined to be a mounting type according to the configuration information of the target storage object, determining a target HASH value according to the attribute information of the data to be processed;
and calling a Stream implementation class corresponding to the first type interface through a storage implementation class corresponding to the target storage object, and processing the data to be processed according to the target HASH value.
Specifically, if the target interface is a write interface and the type of the target storage object is determined to be a mounting type according to the configuration information of the target storage object, determining a target HASH value according to the attribute information of the data to be written; generating a target folder according to the target HASH value; and calling a WriteStream implementation class through a storage implementation class corresponding to the target storage object to write the data to be written into the target folder. If the target interface is a reading interface and the type of the target storage object is determined to be a mounting type according to the configuration information of the target storage object, determining a target HASH value according to the attribute information of the data to be read; and calling a WriteStream realization class to read the data to be read in the target folder corresponding to the target HASH value through the storage realization class corresponding to the target storage object.
Optionally, if the target interface is determined to be the first type interface according to the identification information of the target interface, determining data to be processed according to the interface parameter of the target interface, and calling a Stream implementation class corresponding to the first type interface to process the data to be processed through a storage implementation class corresponding to the target storage object, including:
if the target interface is determined to be a first type interface according to the identification information of the target interface, and the data to be processed is determined to be encrypted or decrypted according to the configuration information of the target storage object, the data to be processed is encrypted or decrypted by calling a Stream implementation class corresponding to the first type interface through a storage implementation class corresponding to the target storage object, and then the encrypted or decrypted data to be processed is processed.
Specifically, if the target interface is a write interface and it is determined that data to be written needs to be encrypted according to configuration information of the target storage object, the data to be written is encrypted by calling a WriteStream implementation class through a storage implementation class corresponding to the target storage object, and the interface corresponding to the target storage object is accessed to write the encrypted data into the target storage object. If the target interface is a reading interface and it is determined that the data to be read needs to be decrypted according to the configuration information of the target storage object, the ReadStream implementation class is called through the storage implementation class corresponding to the target storage object to decrypt the data to be read, and the interface corresponding to the target storage object is accessed to read the data to be read in the target storage object.
Optionally, executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object includes:
if the target interface is determined to be a writing interface according to the identification information of the target interface and the writing type is determined to be block writing according to the interface parameters of the writing interface, calling a WriteStream implementation class through the storage implementation class corresponding to the target storage object to block the data to be written, and writing the data after the block division into the target storage object in sequence;
if the target interface is determined to be a writing interface according to the identification information of the target interface and the writing type is determined to be all writing according to the interface parameters of the writing interface, the data to be written is written into the target storage object by calling a WriteStream implementation class through a storage implementation class corresponding to the target storage object, wherein the interface parameters of the writing interface comprise: data is to be written.
It should be noted that, the interface parameters of the write interface may further include: and (5) partitioning rules. For example, the interface parameters of the write interface may further include: the size of each data block or the number of blocks.
Specifically, the method of calling the WriteStream implementation class through the storage implementation class corresponding to the target storage object to block the data to be written, and writing the data after the blocking into the target storage object in sequence may be as follows: determining a partitioning rule according to interface parameters of a writing interface, calling a WriteStream implementation class through a storage implementation class corresponding to the target storage object, partitioning data to be written according to the partitioning rule, and sequentially writing the partitioned data into the target storage object.
In a specific example, if the data to be written is 16M in total, according to the partitioning rule, the data to be written may be divided into: 5M data, 1M data. And writing 5M data, 5M data and 1M data into the target storage object in sequence.
It should be noted that, if the interface parameters of the write interface include: and determining the writing type as block writing if the block identifier is not contained in the interface parameters of the writing interface, and determining the writing type as all writing.
Optionally, if the target interface is determined to be a write interface according to the identification information of the target interface and the write type is determined to be all write according to the interface parameter of the write interface, the writing of the data to be written into the target storage object is performed by calling a WriteStream implementation class through a storage implementation class corresponding to the target storage object, including
If the target interface is determined to be a writing interface according to the identification information of the target interface, the writing type is determined to be all writing according to the interface parameters of the writing interface, and the data to be written is determined to be encrypted according to the configuration information of the target storage object, the data to be written is encrypted by calling a WriteStream implementation class through a storage implementation class corresponding to the target storage object, and the interface corresponding to the target storage object is accessed to write the encrypted data into the target storage object.
Specifically, the manner of encrypting the data to be written by calling the WriteStream implementation class through the storage implementation class corresponding to the target storage object may be: and calling a WriteStream realization class trigger data encryption module through a storage realization class corresponding to the target storage object to encrypt the data to be written.
The data may be encrypted using the AES-256 algorithm in embodiments of the present invention. When the user needs to encrypt data, when generating the proxy object corresponding to the target storage object, the encrypted key can be transmitted into the construction method of the proxy object corresponding to the target storage object, or can be stored in the configuration information, the WriteStream implementation class and the data encryption module communicate, and the encrypted file data is written into the target storage object.
Optionally, if the target interface is determined to be a write interface according to the identification information of the target interface and the write type is determined to be all write according to the interface parameter of the write interface, the writing of the data to be written into the target storage pair by calling a WriteStream implementation class through a storage implementation class corresponding to the target storage object includes:
if the target interface is determined to be a writing interface according to the identification information of the target interface, determining that the writing type is all writing according to the interface parameters of the writing interface, and determining that the type of the target storage object is a mounting type according to the configuration information of the target storage object, determining a target HASH value according to the attribute information of the data to be written;
generating a target folder according to the target HASH value;
and calling a WriteStream implementation class through a storage implementation class corresponding to the target storage object to write the data to be written into the target folder.
When the target storage object is a storage object of a mounting type such as NAS, CIFS and the like, the storage provider realizes a method for acquiring file write Stream, and the method can be communicated with a mixed storage HASH addressing module, so that the mixed storage HASH addressing module randomly generates a hierarchical directory and file HASH mixed storage according to HASH values generated by algorithms according to necessary information such as attributes of files and the like. By the mode, the file can be ensured to be positioned only through the service system, and the safety is enhanced.
Optionally, executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object includes:
if the target interface is determined to be a reading interface according to the identification information of the target interface and the reading type is determined to be block reading according to the interface parameters of the reading interface, calling a ReadStream implementation class through a storage implementation class corresponding to the target storage object to block data to be read, and sequentially reading the data to be read after the blocks in the target storage object;
if the target interface is determined to be a read interface according to the identification information of the target interface and the read type is determined to be all read according to the interface parameters of the read interface, calling a ReadStream implementation class through a storage implementation class corresponding to the target storage object to read the data to be read in the target storage object, wherein the interface parameters of the read interface include: identification information of data to be read.
It should be noted that, the interface parameters of the read interface may further include: and (5) partitioning rules. For example, the interface parameters of the read interface may further include: the size of each data block or the number of blocks.
Specifically, the method for calling the ReadStream implementation class to block the data to be read through the storage implementation class corresponding to the target storage object and sequentially reading the data to be read after the blocking in the target storage object may be: and determining a blocking rule according to interface parameters of a reading interface, calling a ReadStream implementation class through a storage implementation class corresponding to the target storage object to block data to be read according to the blocking rule, and sequentially reading the data to be read after blocking in the target storage object.
In a specific example, if the data to be read is 16M in total, according to the partitioning rule, the data to be read may be divided into: 5M data, 1M data. And sequentially reading 5M data, 5M data and 1M data in the target storage object until all the data to be read are read.
It should be noted that, if the interface parameters of the read interface include: and determining that the reading type is the block reading if the block identifier is not contained in the interface parameters of the reading interface, and determining that the reading type is all the reading.
Optionally, if the target interface is determined to be a read interface according to the identification information of the target interface and the read type is determined to be all reads according to the interface parameter of the read interface, the ReadStream implementation class is called through the storage implementation class corresponding to the target storage object to read the data to be read in the target storage object, including:
if the target interface is determined to be a read interface according to the identification information of the target interface, the read type is determined to be all read according to the interface parameters of the read interface, and the data to be read is determined to be required to be decrypted according to the configuration information of the target storage object, the data to be read is decrypted by calling a ReadStream implementation class through a storage implementation class corresponding to the target storage object, and the interface corresponding to the target storage object is accessed to read the data to be read in the target storage object.
Specifically, the manner of calling the ReadStream implementation class to decrypt the data to be read through the storage implementation class corresponding to the target storage object may be: and calling a ReadStream realization class trigger data decryption module through a storage realization class corresponding to the target storage object to decrypt the data to be read.
In the embodiment of the invention, the encryption file is automatically decrypted and returned to the user by communicating the ReadStream implementation class with the data decryption module.
Optionally, if the target interface is determined to be a read interface according to the identification information of the target interface and the read type is determined to be all reads according to the interface parameter of the read interface, the ReadStream implementation class is called through the storage implementation class corresponding to the target storage object to read the data to be read in the target storage object, including
If the target interface is determined to be a read interface according to the identification information of the target interface, the read type is determined to be all read according to the interface parameters of the read interface, and the type of the target storage object is determined to be a mounting type according to the configuration information of the target storage object, the target HASH value is determined according to the attribute information of the data to be read;
and calling a WriteStream realization class to read the data to be read in the target folder corresponding to the target HASH value through the storage realization class corresponding to the target storage object.
When the method for acquiring the file to read the Stream of the storage provider implementation class needs to access the file, the HASH value generated by the same algorithm is used for addressing and searching the file, and the data to be read is obtained. By the mode, the file can be ensured to be positioned only through the service system, and the safety is enhanced. The method for acquiring the file read Stream by the StorageProvider provides the function of I/O read files for users, and the method for acquiring the file write Stream by the StorageProvider provides the function of I/O write files for users. Each store corresponds to a ReadStream implementation class and a WriteStream implementation class, which inherit from the Stream parent class and rewrite the usual methods of acquiring length, acquiring/setting Stream location, reading, writing, opening, closing, etc. I/O.
Optionally, executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object includes:
if the target interface is determined to be a deletion interface according to the identification information of the target interface, determining data to be deleted according to interface parameters of the deletion interface, and deleting the data to be deleted in the target storage object through a storage implementation class corresponding to the target storage object, wherein the interface parameters of the deletion interface comprise: identification information of the data to be deleted.
Optionally, executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object includes:
if the target interface is determined to be the MD5 characteristic value calculating interface according to the identification information of the target interface, and the storage implementation class corresponding to the target storage object is determined to have the MD5 characteristic value obtaining function according to the configuration information of the target storage object, the MD5 characteristic value corresponding to the interface parameter of the target interface is obtained through the storage implementation class corresponding to the target storage object;
If it is determined that the target interface is an MD5 feature value calculating interface according to the identification information of the target interface, and it is determined that the storage implementation class corresponding to the target storage object does not have the function of acquiring the MD5 feature value according to the configuration information of the target storage object, then the ReadStream implementation class is called by the storage implementation class corresponding to the target storage object to read part of the data in the target file, and the MD5 feature value of the read data is calculated until the MD5 feature value of all the data in the target file is obtained, where the interface parameters of the MD5 feature value interface include: identification information of the target file.
Specifically, the manner of determining, according to the configuration information of the target storage object, that the storage implementation class corresponding to the target storage object has the function of obtaining the MD5 feature value may be: if the configuration information of the target storage object comprises the MD5 computing identifier, determining that the storage implementation class corresponding to the target storage object has the function of acquiring the MD5 characteristic value, and if the configuration information of the target storage object does not comprise the MD5 computing identifier, determining that the storage implementation class corresponding to the target storage object does not have the function of acquiring the MD5 characteristic value. It should be noted that, if the storage implementation class corresponding to the target storage object has the function of acquiring the MD5 feature value, the MD5 feature value may be directly acquired, and if the storage implementation class corresponding to the target storage object does not have the function of acquiring the MD5 feature value, the ReadStream implementation class needs to be called to read the data in the target file, and the MD5 feature value is calculated.
Specifically, the storage implementation class corresponding to the target storage object calls the ReadStream implementation class to read part of the data in the target file, and calculates the MD5 characteristic value of the read data until the MD5 characteristic value of all the data in the target file is obtained, for example, if the target file includes: data a, data a comprising: data a1, data a2, data a3. Calling the ReadStream implementation class to read the data a1 in the target file through the storage implementation class corresponding to the target storage object, and calculating the MD5 characteristic value of the data a 1; calling the ReadStream implementation class to read the data a2 in the target file through the storage implementation class corresponding to the target storage object, and calculating the MD5 characteristic value of the data a 2; and calling the ReadStream implementation class to read the data a3 in the target file through the storage implementation class corresponding to the target storage object, calculating the MD5 characteristic value of the data a3, and determining the MD5 characteristic value of all the data in the target file according to the MD5 characteristic value of a1, the MD5 characteristic value of a2 and the MD5 characteristic value of a3.
Optionally, executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object includes:
If the target interface is determined to be an updating interface according to the identification information of the target interface, acquiring the identification information and the difference data of the data to be updated in the interface parameters of the updating interface;
and combining the data to be updated corresponding to the identification information of the data to be updated in the target storage object with the difference data through the storage implementation class corresponding to the target storage object to obtain updated data, and writing the updated data into the target storage object.
Wherein the difference data is the difference data of the data to be updated and the updated data.
The target storage object may be NAS, CIFS, alioss storage, OBS storage, gold mountain KS3 storage, hundred degrees BOS storage, microsoft Azure storage, AWS 3 storage, shift storage of Openstack, messenger COS, ceph storage, minio, and other storage supporting S3 protocol.
If new storage needs to be adapted, only the corresponding storage provider implementation class, the ReadStream implementation class and the Writestream implementation class need to be newly added, and an internal method is realized. The user only needs to input the configuration information of the target storage object for generating the proxy object corresponding to the target storage object.
According to the technical scheme of the embodiment, the proxy object corresponding to the target storage object is generated according to the configuration information of the target storage object; searching a storage implementation class corresponding to the target storage object; receiving identification information of a target interface and interface parameters of the target interface; and executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameters of the target interface and the storage implementation class corresponding to the target storage object, exposing a uniform calling interface to the outside, and decoupling the service function, thereby improving the universality of the storage object. And the function of the storage object with single function is expanded, so that more scenes are satisfied.
Example two
Fig. 2 is a schematic structural diagram of a control device according to an embodiment of the present invention. The present embodiment may be applicable to a control case, and the apparatus may be implemented in software and/or hardware, and the apparatus may be integrated in any device that provides a control function, as shown in fig. 2, where the control apparatus specifically includes: proxy object generation module 210, storage implementation class query module 220, receiving module 230, and executing module 240.
The proxy object generation module is used for generating a proxy object corresponding to the target storage object according to the configuration information of the target storage object;
The storage realization class query module is used for searching the storage realization class corresponding to the target storage object;
the receiving module is used for receiving the identification information of the target interface and the interface parameters of the target interface;
and the execution module is used for executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameters of the target interface and the storage implementation class corresponding to the target storage object.
The product can execute the method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example III
Fig. 3 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 3, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the respective methods and processes described above, for example, control methods.
In some embodiments, the control method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the control method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the control method in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (16)

1. A control method, characterized by comprising:
generating a proxy object corresponding to the target storage object according to the configuration information of the target storage object;
searching a storage implementation class corresponding to the target storage object;
receiving identification information of a target interface and interface parameters of the target interface;
and executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameters of the target interface and the storage implementation class corresponding to the target storage object.
2. The method of claim 1, wherein executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object comprises:
if the target interface is determined to be a query interface according to the identification information of the target interface, querying the target storage object through a storage implementation class corresponding to the target storage object to obtain attribute information corresponding to interface parameters of the target interface, wherein the interface parameters of the query interface comprise: any one of identification information of data to be queried, identification information of storage attribute to be queried and identification information of data written into a storage object, wherein the attribute information comprises: any one of data attribute information, storage attribute information, and a data amount of a written storage object, the storage attribute information including: the available space of the target storage object and/or the total space of the target storage object.
3. The method of claim 1, wherein executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object comprises:
If the target interface is determined to be a copy interface according to the identification information of the target interface, determining data to be copied according to interface parameters of the copy interface, creating copy data corresponding to the data to be copied through a storage implementation class corresponding to the target storage object, and writing the copy data into the target storage object, wherein the interface parameters of the copy interface comprise: identification information of the data to be copied.
4. The method of claim 1, wherein executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object comprises:
if the target interface is determined to be a copy interface according to the identification information of the target interface, determining data to be copied according to interface parameters of the copy interface, creating copy data corresponding to the data to be copied through a storage implementation class corresponding to the target storage object, writing the copy data into a proxy object corresponding to a first storage object according to the interface parameters of the target interface, and writing the copy data into the first storage object through the proxy object corresponding to the first storage object, wherein the interface parameters of the copy interface include: the identification information of the data to be copied and the proxy object corresponding to the first storage object.
5. The method of claim 1, wherein executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object comprises:
if the target interface is determined to be a writing interface according to the identification information of the target interface and the writing type is determined to be block writing according to the interface parameters of the writing interface, calling a WriteStream implementation class through the storage implementation class corresponding to the target storage object to block the data to be written, and writing the data after the block division into the target storage object in sequence;
if the target interface is determined to be a writing interface according to the identification information of the target interface and the writing type is determined to be all writing according to the interface parameters of the writing interface, the data to be written is written into the target storage object by calling a WriteStream implementation class through a storage implementation class corresponding to the target storage object, wherein the interface parameters of the writing interface comprise: data is to be written.
6. The method according to claim 5, wherein if the target interface is determined to be a write interface according to the identification information of the target interface and the write type is determined to be all writes according to the interface parameters of the write interface, then calling a WriteStream implementation class to write the data to be written into the target memory object through the memory implementation class corresponding to the target memory object, including
If the target interface is determined to be a writing interface according to the identification information of the target interface, the writing type is determined to be all writing according to the interface parameters of the writing interface, and the data to be written is determined to be encrypted according to the configuration information of the target storage object, the data to be written is encrypted by calling a WriteStream implementation class through a storage implementation class corresponding to the target storage object, and the interface corresponding to the target storage object is accessed to write the encrypted data into the target storage object.
7. The method according to claim 5, wherein if it is determined that the target interface is a write interface according to the identification information of the target interface and it is determined that the write type is all writes according to the interface parameter of the write interface, then calling a WriteStream implementation class through a storage implementation class corresponding to the target storage object to write the data to be written into the target storage pair includes:
if the target interface is determined to be a writing interface according to the identification information of the target interface, determining that the writing type is all writing according to the interface parameters of the writing interface, and determining that the type of the target storage object is a mounting type according to the configuration information of the target storage object, determining a target HASH value according to the attribute information of the data to be written;
Generating a target folder according to the target HASH value;
and calling a WriteStream implementation class through a storage implementation class corresponding to the target storage object to write the data to be written into the target folder.
8. The method of claim 1, wherein executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object comprises:
if the target interface is determined to be a reading interface according to the identification information of the target interface and the reading type is determined to be block reading according to the interface parameters of the reading interface, calling a ReadStream implementation class through a storage implementation class corresponding to the target storage object to block data to be read, and sequentially reading the data to be read after the blocks in the target storage object;
if the target interface is determined to be a read interface according to the identification information of the target interface and the read type is determined to be all read according to the interface parameters of the read interface, calling a ReadStream implementation class through a storage implementation class corresponding to the target storage object to read the data to be read in the target storage object, wherein the interface parameters of the read interface include: identification information of data to be read.
9. The method according to claim 8, wherein if the target interface is determined to be a read interface according to the identification information of the target interface and the read type is determined to be all reads according to the interface parameter of the read interface, the reading the data to be read in the target storage object by calling a ReadStream implementation class through the storage implementation class corresponding to the target storage object includes:
if the target interface is determined to be a read interface according to the identification information of the target interface, the read type is determined to be all read according to the interface parameters of the read interface, and the data to be read is determined to be required to be decrypted according to the configuration information of the target storage object, the data to be read is decrypted by calling a ReadStream implementation class through a storage implementation class corresponding to the target storage object, and the interface corresponding to the target storage object is accessed to read the data to be read in the target storage object.
10. The method according to claim 8, wherein if the target interface is determined to be a read interface according to the identification information of the target interface and the read type is determined to be all reads according to the interface parameters of the read interface, the method for reading the data to be read in the target storage object by calling a ReadStream implementation class through the storage implementation class corresponding to the target storage object includes
If the target interface is determined to be a read interface according to the identification information of the target interface, the read type is determined to be all read according to the interface parameters of the read interface, and the type of the target storage object is determined to be a mounting type according to the configuration information of the target storage object, the target HASH value is determined according to the attribute information of the data to be read;
and calling a WriteStream realization class to read the data to be read in the target folder corresponding to the target HASH value through the storage realization class corresponding to the target storage object.
11. The method of claim 1, wherein executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object comprises:
if the target interface is determined to be a deletion interface according to the identification information of the target interface, determining data to be deleted according to interface parameters of the deletion interface, and deleting the data to be deleted in the target storage object through a storage implementation class corresponding to the target storage object, wherein the interface parameters of the deletion interface comprise: identification information of the data to be deleted.
12. The method of claim 1, wherein executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object comprises:
if the target interface is determined to be the MD5 characteristic value calculating interface according to the identification information of the target interface, and the storage implementation class corresponding to the target storage object is determined to have the MD5 characteristic value obtaining function according to the configuration information of the target storage object, the MD5 characteristic value corresponding to the interface parameter of the target interface is obtained through the storage implementation class corresponding to the target storage object;
if it is determined that the target interface is an MD5 feature value calculating interface according to the identification information of the target interface, and it is determined that the storage implementation class corresponding to the target storage object does not have the function of acquiring the MD5 feature value according to the configuration information of the target storage object, then the ReadStream implementation class is called by the storage implementation class corresponding to the target storage object to read part of the data in the target file, and the MD5 feature value of the read data is calculated until the MD5 feature value of all the data in the target file is obtained, where the interface parameters of the MD5 feature value interface include: identification information of the target file.
13. The method of claim 1, wherein executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameter of the target interface, and the storage implementation class corresponding to the target storage object comprises:
if the target interface is determined to be an updating interface according to the identification information of the target interface, acquiring the identification information and the difference data of the data to be updated in the interface parameters of the updating interface;
and combining the data to be updated corresponding to the identification information of the data to be updated in the target storage object with the difference data through the storage implementation class corresponding to the target storage object to obtain updated data, and writing the updated data into the target storage object.
14. A control apparatus, characterized by comprising:
the proxy object generation module is used for generating a proxy object corresponding to the target storage object according to the configuration information of the target storage object;
the storage realization class query module is used for searching the storage realization class corresponding to the target storage object;
the receiving module is used for receiving the identification information of the target interface and the interface parameters of the target interface;
and the execution module is used for executing the target operation corresponding to the target interface according to the identification information of the target interface, the interface parameters of the target interface and the storage implementation class corresponding to the target storage object.
15. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the control method of any one of claims 1-13.
16. A computer readable storage medium, characterized in that the computer readable storage medium stores computer instructions for causing a processor to implement the control method of any one of claims 1-13 when executed.
CN202311204138.9A 2023-09-18 2023-09-18 Control method, device, equipment and storage medium Active CN117194298B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311204138.9A CN117194298B (en) 2023-09-18 2023-09-18 Control method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311204138.9A CN117194298B (en) 2023-09-18 2023-09-18 Control method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117194298A true CN117194298A (en) 2023-12-08
CN117194298B CN117194298B (en) 2024-05-31

Family

ID=88986763

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311204138.9A Active CN117194298B (en) 2023-09-18 2023-09-18 Control method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117194298B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103353867A (en) * 2005-12-29 2013-10-16 亚马逊科技公司 Distributed replica storage system with web services interface
CN104221042A (en) * 2012-03-27 2014-12-17 锡克拜控股有限公司 Managing objects in a supply chain using a secure identifier
CN107786638A (en) * 2017-09-27 2018-03-09 华为技术有限公司 A kind of data processing method, apparatus and system
CN110764700A (en) * 2019-10-12 2020-02-07 上海陆家嘴国际金融资产交易市场股份有限公司 Data storage method and device, computer equipment and storage medium
CN112559095A (en) * 2020-12-16 2021-03-26 微医云(杭州)控股有限公司 Target service execution method, system, server and storage medium
CN112965767A (en) * 2021-03-08 2021-06-15 北京金山云网络技术有限公司 Job processing method and apparatus, electronic device, and storage medium
CN113868720A (en) * 2021-09-27 2021-12-31 北京金山云网络技术有限公司 Data processing method and device
CN116107657A (en) * 2023-01-03 2023-05-12 广州市玄武无线科技股份有限公司 Application storage method, device and equipment based on qiankun and computer storage medium
US20230244406A1 (en) * 2020-11-04 2023-08-03 Samsung Electronics Co., Ltd. Electronic device and storage management method using same
CN116680295A (en) * 2023-06-02 2023-09-01 中国电信股份有限公司 Method, system and device for processing data by multiple databases

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103353867A (en) * 2005-12-29 2013-10-16 亚马逊科技公司 Distributed replica storage system with web services interface
CN104221042A (en) * 2012-03-27 2014-12-17 锡克拜控股有限公司 Managing objects in a supply chain using a secure identifier
CN107786638A (en) * 2017-09-27 2018-03-09 华为技术有限公司 A kind of data processing method, apparatus and system
CN110764700A (en) * 2019-10-12 2020-02-07 上海陆家嘴国际金融资产交易市场股份有限公司 Data storage method and device, computer equipment and storage medium
US20230244406A1 (en) * 2020-11-04 2023-08-03 Samsung Electronics Co., Ltd. Electronic device and storage management method using same
CN112559095A (en) * 2020-12-16 2021-03-26 微医云(杭州)控股有限公司 Target service execution method, system, server and storage medium
CN112965767A (en) * 2021-03-08 2021-06-15 北京金山云网络技术有限公司 Job processing method and apparatus, electronic device, and storage medium
CN113868720A (en) * 2021-09-27 2021-12-31 北京金山云网络技术有限公司 Data processing method and device
CN116107657A (en) * 2023-01-03 2023-05-12 广州市玄武无线科技股份有限公司 Application storage method, device and equipment based on qiankun and computer storage medium
CN116680295A (en) * 2023-06-02 2023-09-01 中国电信股份有限公司 Method, system and device for processing data by multiple databases

Also Published As

Publication number Publication date
CN117194298B (en) 2024-05-31

Similar Documents

Publication Publication Date Title
US11755530B2 (en) Method and system for applying data retention policies in a computing platform
WO2019136800A1 (en) Service processing method, apparatus and device, and computer-readable storage medium
CN110943961A (en) Data processing method, device and storage medium
WO2019051948A1 (en) Method, apparatus, server, and storage medium for processing monitoring data
US12034728B2 (en) Dynamic access control in service mesh with service broker
CN110795741A (en) Method and device for carrying out security processing on data
WO2024125108A1 (en) On-demand enabling method and apparatus for security aspect of mobile terminal
CN112100689A (en) Trusted data processing method, device and equipment
CN112115500A (en) Method, device and system for accessing file
CN117194298B (en) Control method, device, equipment and storage medium
CN116244682A (en) Database access method, device, equipment and storage medium
CN116126380A (en) Firmware upgrading method and device, electronic equipment and storage medium
CN114040381B (en) Encryption method, decryption device and electronic equipment
CN107085681B (en) Robust computing device identification framework
CN114327404A (en) File processing method and device, electronic equipment and computer readable medium
CN113726885A (en) Method and device for adjusting flow quota
CN111680003B (en) File center system and file management method based on distribution
CN114944964B (en) Network security event processing method and device
WO2023082032A1 (en) Cloud platform parameter adaptation method and apparatus, terminal device, and storage medium
WO2024109388A1 (en) Feature synchronization method and apparatus, and computer device, storage medium and program product
CN110262756B (en) Method and device for caching data
CN115834917A (en) Live broadcast room dynamic non-homogeneous token management method and device and server
CN115794165A (en) Application upgrading method and device, EPS and medium
CN117435237A (en) Storage configuration method, device, terminal equipment and medium based on low-code platform
CN118484797A (en) Method, apparatus, electronic device, and medium for accessing application program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant