WO2023143061A1 - Data access method and data access system thereof - Google Patents

Data access method and data access system thereof Download PDF

Info

Publication number
WO2023143061A1
WO2023143061A1 PCT/CN2023/071628 CN2023071628W WO2023143061A1 WO 2023143061 A1 WO2023143061 A1 WO 2023143061A1 CN 2023071628 W CN2023071628 W CN 2023071628W WO 2023143061 A1 WO2023143061 A1 WO 2023143061A1
Authority
WO
WIPO (PCT)
Prior art keywords
cloud service
service provider
key
value
key value
Prior art date
Application number
PCT/CN2023/071628
Other languages
French (fr)
Chinese (zh)
Inventor
潘浩
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023143061A1 publication Critical patent/WO2023143061A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Definitions

  • the embodiment of the present application relates to the communication field, and in particular to a data access method and a data access system thereof.
  • Key-value storage is widely used in the Internet industry. For example, most cloud services use key-value storage to support operations such as query, insertion, deletion, and modification of data. They are used to support network services, such as saving pictures, videos, and applications, and many other items have formed de facto standards.
  • the key-value storage services provided by current cloud services are mostly supported by a supplier or an open-source key-value storage project.
  • various non-relational (not only structured query language, NoSQL) databases can store key-value data, and these key-value storage services are provided by corresponding cloud service providers.
  • NoSQL structured query language
  • cloud services provide key-value storage, reliability problems are prone to occur when cloud services fail or access is abnormal.
  • This application provides a data access method and its data access system, which are applied to the application scenarios using cloud services, can support the reliability of key-value storage across cloud service providers, and can reduce the need for cross-cloud service providers to provide key-value storage The cost of reliability.
  • the first aspect of the present application provides a data access method, including:
  • the first object is obtained based on the key value, and the first object is used to support the operation corresponding to the key value.
  • the key value includes a key value and a target value corresponding to the key value;
  • the target object is obtained based on the key value and the first object, and the number of the target object is at least one;
  • the provider and the second cloud service provider are cloud service providers with the first object.
  • the first object is obtained based on the key value, and the first object is used to support the operation corresponding to the key value, and then the target object is obtained based on the key value and the first object, and then the target object is sent to the first cloud service provider and the second cloud service provider, so that the first cloud service provider and the second cloud service provider perform key-value corresponding operations based on the target object.
  • the first cloud service provider and the second cloud service provider are cloud services with the first object provider.
  • the first cloud service provider and the second cloud service provider have the first object and the target object, ensuring that different cloud service providers have the same object, that is, ensuring that different cloud service providers can provide the same key value Service, solves the reliability problem of key-value storage provided by cloud service, and reduces the operation and maintenance cost of providing key-value storage reliability across cloud service providers.
  • the key-value corresponding operation is executed through the first object and/or the target object on the second cloud service provider.
  • the execution of the key-value corresponding operation is completed through the first object and/or the target object on the second cloud service provider, ensuring that When the service provider's access is abnormal, another cloud service provider can continue to complete the operation, which reflects the reliability support of the key-value storage of this solution and ensures the real-time access and operation of the key-value storage.
  • the second object is obtained based on the key value and the first object, and the number of the second object is at least one, and then the target object is obtained by updating the second object based on the key value.
  • the second object is obtained based on the key value and the first object, and the second object is updated according to the key value, which can ensure the accuracy of the key value storage and update the key value storage more accurately and flexibly. Objects to ensure the provision of guaranteed services.
  • the first target value corresponding to at least one first key value and the first target value corresponding to at least one second key value are respectively obtained from the first cloud service provider and the second cloud service provider.
  • Two target values, the first key value and the second key value are key values of the target value to be queried.
  • the target value of the key value can be obtained from the first cloud service provider and the second cloud service provider respectively, and the query operation of multiple key values can be completed, which can reduce the workload of the cloud service provider, and can Provides productivity.
  • response information is obtained, and the response information is used to indicate that the cloud service provider that sent the response information has The target object is saved, or, in the case of an abnormality in obtaining the response information, the target object is resent to the cloud service provider whose response information is abnormal.
  • the response information is obtained and the target object is sent again when the response information is abnormal, so as to ensure that both the first cloud service provider and the second cloud service provider save the target object, and ensure that different cloud service providers have real-time
  • the same object can provide services for the same key value.
  • the key value includes at least any one of the following:
  • the key-value to be modified, the key-value to be inserted, or the key-value to be deleted is not limited.
  • a data access system has the function of implementing the method of the above-mentioned first aspect or any possible implementation manner of the first aspect.
  • This function may be implemented by hardware, or may be implemented by executing corresponding software on the hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the data access system in the second aspect of the present application executes the method described in the first aspect of the present application or any possible implementation manner of the first aspect.
  • the data access system further includes a second computer device
  • the first cloud service provider or the second cloud service provider is further configured to determine the third key by using at least one third key value value corresponding to the third target value, and send the third target value to the first computer device and/or the second computer device, and the third key value is sent to the first cloud service provider by the first computer device and/or the second computer device Or sent by the second cloud service provider.
  • the data access system supports multiple computer devices to query the key value from the first cloud service provider or the second cloud service provider, and obtain the target value corresponding to the key value, which is applicable to a wide range of network environments and improves work efficiency. efficiency.
  • the third aspect of the present application provides an information processing device, which may include a processor, the processor is coupled with a memory, wherein the memory is used to store instructions, and the processor is used to execute the instructions in the memory so that the information processing device executes the first aspect of the present application
  • the method in the first aspect or any one of the possible implementations of the first aspect, or execute the first computer device, the second computer device, the first cloud service provider or the second cloud in the data access system in the second aspect of the application Functions implemented by the service provider.
  • the fourth aspect of the embodiment of the present application provides another information processing device, including a processor, configured to execute the computer program (or computer-executable instruction) stored in the memory, when the computer program (or computer-executable instruction) is executed, Make the information processing apparatus execute the method in the first aspect or any one of the possible implementations of the first aspect, or execute the first computer device, the second computer device, and the first cloud in the data access system in the second aspect of the present application Functions implemented by the service provider or the second cloud service provider.
  • a processor configured to execute the computer program (or computer-executable instruction) stored in the memory, when the computer program (or computer-executable instruction) is executed, Make the information processing apparatus execute the method in the first aspect or any one of the possible implementations of the first aspect, or execute the first computer device, the second computer device, and the first cloud in the data access system in the second aspect of the present application Functions implemented by the service provider or the second cloud service provider.
  • processor and memory are integrated;
  • the above-mentioned memory is located outside the information processing device.
  • the information processing device also includes a communication interface, which is used for the information processing device to communicate with other devices, such as sending or receiving data and/or signals.
  • the communication interface may be a transceiver, a circuit, a bus, a module or other types of communication interfaces.
  • the fifth aspect of the present application provides a computer-readable storage medium, including computer-readable instructions.
  • the computer-readable instructions When the computer-readable instructions are run on a computer, the method is executed.
  • the sixth aspect of the present application provides a computer program product, including computer-readable instructions.
  • the computer-readable instructions When the computer-readable instructions are run on a computer, the method described in the first aspect of the present application or any possible implementation manner of the first aspect is executed. implement.
  • the seventh aspect of the present application provides a chip, the chip includes at least one processor and at least one interface circuit, the interface circuit is coupled to the processor, the at least one interface circuit is used to perform the function of sending and receiving, and send instructions to at least one Processor, at least one processor is used to run computer programs or instructions, which has the function of implementing the method in the above first aspect or any possible implementation manner of the first aspect, and this function can be realized by hardware or by software , can also be implemented by a combination of hardware and software, where the hardware or software includes one or more modules corresponding to the above functions.
  • Figure 1a is a schematic diagram of the architecture of the data access system provided by the embodiment of the present application.
  • Figure 1b is a schematic diagram of an application scenario of the data access system provided by the embodiment of the present application.
  • FIG. 2 is a schematic diagram of a data access method provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • Fig. 4 is a schematic diagram of the key-value storage structure provided by the embodiment of the present application.
  • FIG. 5 is a schematic diagram of an updated first object provided by the embodiment of the present application.
  • FIG. 6 is another schematic diagram of an updated first object provided by the embodiment of the present application.
  • Fig. 7 is a schematic diagram of the first object or the intermediate object provided by the embodiment of the present application.
  • FIG. 8 is another schematic diagram of an application scenario provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of the query key value provided by the embodiment of the present application.
  • Fig. 10a is another schematic diagram of the application scenario provided by the embodiment of the present application.
  • Fig. 10b is another schematic diagram of the application scenario provided by the embodiment of the present application.
  • FIG. 11 is a schematic diagram of the architecture of the data access system provided by the embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of an information processing device provided by an embodiment of the present application.
  • This application provides a data access method and its data access system, which are applied to the application scenarios using cloud services, can support the reliability of key-value storage across cloud service providers, and can reduce the need for cross-cloud service providers to provide key-value storage The cost of reliability.
  • Key-value storage mainly stores the mapping relationship between the key value (key) and the target value (value), which acts like a dictionary and provides operations such as key->value query, insertion, deletion, and modification.
  • key-value storage is used to save and maintain a large number of key-value mapping relationships. The specific content of these mapping relationships and value saves the internal state of the above-mentioned system.
  • the subsequent operation of the program is determined by querying, modifying, inserting or deleting these mapping relationships.
  • key-value storage can be used to store the mapping relationship between the user's logical address and the physical address of the disk where the data is actually stored.
  • the user When the user reads the data at the logical address, it needs to query and read the actual Save the physical address of the disk, and after querying the physical address, read the data from the physical address and return it to the user; if the logical address does not store data, return no corresponding mapping relationship, and inform the user that there is no data.
  • Key-value storage on cloud services can usually be provided by cloud service providers.
  • Cloud service providers such as Amazon or Google, etc.
  • key-value storage projects such as LeveIDB, RocksDB, or HBase.
  • key-value storage projects such as LeveIDB, RocksDB, or HBase.
  • the embodiment of the present application provides a data access method and a data access system thereof, and the embodiment of the present application is applied to an application scenario using cloud services, and is used to enable multiple cloud service providers to use the same key value
  • the storage method provides key-value corresponding operations, solves the reliability problem of key-value storage provided by cloud services, and can reduce the cost of providing key-value storage reliability across cloud service providers.
  • Fig. 1a is a schematic diagram of the architecture of the data access system provided by the embodiment of the present application, which specifically includes:
  • a first computer device 101 a first cloud service provider 102 and a second cloud service provider 103 .
  • the second cloud service provider 103 is a cloud service provider with the first object, and the first object is used to support operations corresponding to key values, such as querying, deleting, inserting or modifying operations of key values.
  • the first computer device 101 is configured to obtain the first object from the first cloud service provider 102 or the second cloud service provider 103 based on the key value.
  • the first computer device 101 is further configured to obtain a target object based on the above-mentioned key value and the first object, and the number of the target object is at least one.
  • the first computer device 101 is further configured to send the target object to the first cloud service provider 102 and the second cloud service provider 103 .
  • the first cloud service provider 102 and the second cloud service provider 103 are used to complete the execution of the key-value corresponding operation based on the target object.
  • the first computer device obtains the first object based on the key value, and determines the target object based on the key value and the first object, and then sends the data to the first cloud service provider and the second cloud service provider Send target object.
  • the first cloud service provider and the second cloud service provider are cloud service providers with the first object, so the first computer device sends the target object to different cloud service providers, ensuring that different cloud service providers have the same Objects can provide corresponding operations for the same key value at the same time, solve the reliability problem of key-value storage provided by cloud services, and reduce the operation and maintenance cost of providing key-value storage reliability across cloud service providers.
  • the first computer device 101 may be a terminal device with a communication function.
  • IoT Internet of Things
  • V2X Vehicle to Everything
  • WLAN wireless local area networks
  • PDA personal digital assistant
  • handheld devices with wireless communication capabilities such as mobile phones
  • computing devices or other processing devices connected to wireless modems vehicle-mounted devices
  • wearable devices also known as wearable smart devices
  • tablets or computers with wireless transceiver functions or cloud-side devices, such as cloud servers or controllers.
  • the first cloud service provider 102 and the second cloud service provider 103 may be providers of various cloud services currently on the market, or may be providers of cloud services that are also applicable to this solution in the future.
  • Figure 2 is a schematic diagram of the data access method provided by the embodiment of this application, which specifically includes:
  • the first object is acquired based on the key value, wherein the first object is used to support the operation corresponding to the key value, and the key value includes a key value and a target value corresponding to the key value.
  • FIG. 3 is a schematic diagram of an application scenario provided by the embodiment of the present application, wherein the first cloud service provider and the second cloud service provider provide cloud services with the first object Provider, in the case that the first computer device has at least one key value to be processed, the first computer device will obtain the second cloud service provider from any one of the first cloud service provider or the second cloud service provider shown in Figure 3 according to the key value
  • An object, the first object is used to support key-value corresponding operations, for example, the data interface or data structure preset in the first cloud service provider and the second cloud service provider to support key-value storage related operations, specifically support
  • the root object of the storage tree of key-value storage can also be an object that supports key-value corresponding operations in other specific forms in actual situations.
  • each cloud service provider organizes key-value data in a tree structure, and each node in the tree structure is an object of object storage, where the first The object is the root object of the tree structure, specifically a data interface for supporting operations corresponding to key values.
  • the tree structure includes at least one first object, namely the root object, and the first object has a corresponding identity document (identity document, ID), and the first computer device can obtain the first object through the ID of the first object.
  • ID identity document
  • FIG. 4 is a schematic diagram of the key-value storage structure provided by the embodiment of the present application. It can be understood that the ID of the first object can be represented by numerical values, characters, Chinese characters and various combinations thereof, which are determined according to specific requirements in actual situations, and are not specifically limited here.
  • the cost of updating an object is relatively high, when the number of key values reaches a threshold, the first object may be acquired for subsequent updating, thereby reducing the cost of modifying the object.
  • the first computer device in FIG. 3 fails to obtain the first object from the first cloud service provider, it switches to obtain the first object from the second cloud service provider, or the first computer device obtains the first object from the second cloud service provider.
  • the service provider fails to obtain the first object, it switches to obtain the first object from the first cloud service provider.
  • Fig. 3 and Fig. 4 are only examples for understanding the embodiment of the present application, and do not substantially limit the embodiment of the present application.
  • the first cloud service provider or the second cloud service Providers can obtain the first object, and can also obtain the first object from other cloud service providers with the first object, which is not limited here, and the number of cloud service providers with the first object is at least two, specifically here There is no limit.
  • the target object is obtained based on the key value and the first object, and the number of the target object is at least one.
  • the key value at least includes any one of the key value to be modified, the key value to be inserted, or the key value to be deleted.
  • the first computer device after the first computer device obtains the first object, it will update the first object according to the key value. Specifically, for example, if the key value is the key value to be inserted, then the first The computer device will first increase the key value to be inserted in the first object, and if the key value cache space of the first object does not exceed the threshold, the key value (key/value) cache in the current first object will be compared with the new The key value to be inserted is added to the record and merged and updated to obtain the target object, and the ID of the target object is consistent with the ID of the first object. Please refer to Figure 5 for details.
  • Figure 5 is a schematic diagram of updating the first object provided by the embodiment of the present application, wherein the key value key4/value is the key value to be inserted, and the inserted first object is stored in the key/value cache, namely key /value Buffer, and finally get the target object.
  • the key value to be processed is the key value to be modified
  • the first computer device stores the value 1 corresponding to the key contained in the key value to be modified in the first object. Replace it with the value 2 contained in the key value to be modified to get the updated target object.
  • Figure 6 is another schematic diagram of updating the first object provided by the embodiment of the present application.
  • the key value to be modified is key3/value 2, and the target value value 1 corresponding to key3 in the first object is modified. Get the target object for value 2.
  • the key value to be processed is the key value to be deleted.
  • the first computer device marks the key value to be deleted as deleted in the first object. Specifically, inserting a tombstone can be used. Mark the key value in a way to complete the deletion operation of the key value. It can be understood that, in actual situations, the key-value deletion operation can also be completed in other forms, which are not specifically limited here.
  • the second object is acquired based on the key value and the first object, and then the second object is updated based on the key value to obtain a target object.
  • more and more key values are stored, which will exceed the threshold of the first object to store key values, so the first object stores key values in multiple leaf objects, but as the number of leaf objects increases, it will pass a Layer or multiple layers of intermediate objects to keep the key value stored in a single object does not exceed the threshold, as shown in the example shown in Figure 4, the tree structure also includes intermediate objects and leaf objects.
  • the first object and/or the intermediate object at least include a lookup table pointing to the lower object, a key/value cache, and a version number of summary information.
  • the version number of the summary information is used to check whether the object has changed when the object is modified. It can be represented by the time when the operation occurs or by an incremental and unique integer. It is understandable that it can also be represented by characters, character combinations, Chinese characters, Chinese character combinations, numerical values, and character combinations or other forms of representation are determined according to specific needs in actual situations, and are not limited here.
  • the key/value cache is used to save newly inserted key values and modified key values.
  • the key/value cache has a threshold, which can be the number of cached key values, or the size of the memory space occupied by the cached key values. It is understandable that it can be determined according to specific needs in actual situations, specifically here No limit.
  • the threshold of the leaf object may be greater than the first object and/or the intermediate object.
  • the specific format of the key/value cache can adopt sorted array, hash table or tree structure, which is convenient for users to quickly find out whether the key belongs to the cache and find the corresponding value. It is understandable that in actual situations, the key/value cache can also be implemented in other formats, which are not limited here.
  • the object lookup table is used to record the information of the lower-level objects associated with the upper-level objects, such as the key range stored in the lower-level objects and the ID of the lower-level objects.
  • FIG. 7 is the first object or A schematic diagram of the intermediate object, where rangekey represents the key range, and the lower object represents the lower object, which can be the ID of the lower object, which is not limited here.
  • the object lookup table in the first object includes the ID of the intermediate object, and the object lookup table of each intermediate object includes the ID of the corresponding leaf object.
  • the ID of the intermediate object and the leaf object is similar to the ID of the aforementioned first object, specifically here No longer.
  • the key value stored in the first object or the intermediate object exceeds the threshold value of the key value inserted earlier
  • the key value stored in the first object and the newly inserted key value are passed through the starting key in the key range Divide into multiple groups, and then send different groups to the corresponding lower-level object storage according to the corresponding start key.
  • the threshold of the lower-level object it is still sent to the lower-level object storage of the lower-level object accordingly. Dividing the key-value group by the starting key can avoid data holes and ensure the accuracy of the data.
  • the first computer device After the first computer device obtains the first object, it determines the second object according to the key value. Specifically, for example, the key value is the key value to be inserted, in the case of exceeding the threshold of the first object cache, or the key value is the key value to be modified or the key value to be deleted, and the key in the key value does not belong to the first In the case of the key/value cache of the object, the key of the key value is found in the object lookup table to belong to the key range contained in an intermediate object, and the intermediate object is determined to be the second object.
  • the first computer device obtains the second object from the first cloud service provider or the second cloud service provider, and then updates the second object according to the key value to obtain the target object, wherein the update of the second object to obtain the target object is the same as the aforementioned update of the first object Obtaining the target object is similar, and details will not be repeated here.
  • the second object when the key value exceeds the threshold of the intermediate object and/or does not belong to the key/value cache of the intermediate object, the second object can be the leaf object in the above-mentioned figure 4, and the specific determination method is the same as The foregoing determination of the intermediate object as the second object is similar, and details are not repeated here.
  • the number of second objects may be multiple.
  • the second object is acquired based on the key value and the first object, and then the second object is updated based on the key value to obtain the target object. It can ensure the accuracy of key-value storage, update the objects of key-value storage more accurately and flexibly, and ensure the provision of guaranteed services.
  • the service provider is a cloud service provider with the first object.
  • the first computer device obtains the target object, it sends the target object to the first cloud service provider and the second cloud service provider, and then the first cloud service provider and the second cloud service provider Operations corresponding to key values can be completed according to the target object, such as insert, modify, query, or delete.
  • FIG. 3 is only used as an example to understand the embodiment of the present application, and does not substantially limit the embodiment of the present application. In actual situations, there may be three cloud service providers or four cloud service providers. Or more cloud service providers, which are not limited here.
  • the first object is obtained based on the key value
  • the target object is obtained based on the key value and the first object
  • the target object is sent to the first cloud service provider and the second cloud service provider, which can ensure that at least two Different cloud service providers have the same object, can provide services for the same key value, solve the reliability problem of key-value storage provided by cloud service, and reduce the operation and maintenance of key-value storage reliability provided by cross-cloud service providers cost.
  • response information is also obtained, and the response information is used to indicate that the cloud service provider that sent the response information has completed the update target object, or, in the case of abnormality in obtaining the response information, resend the target object to the cloud service provider whose acquisition of the response information is abnormal.
  • the abnormality of obtaining the response information includes at least one of the situations of timeout of obtaining the response information or failure of obtaining the response information. It is understandable that there are other ways to determine the abnormality of obtaining the response information in actual situations, which will not be done here. limited.
  • FIG. 8 is another schematic diagram of an application scenario provided by an embodiment of the present application.
  • the first computer device sends the target object to the first cloud service provider and the second cloud service provider, it obtains response information from the first cloud service provider and/or the second cloud service provider, and then the first computer device determines that the other party Update the first object or the second object as the target object.
  • the first computer device obtains the response information from the first cloud service provider abnormally, that is, the response information is timed out or fails to obtain the response information, and then sends the target object to the first cloud service provider again to ensure that the first cloud The facilitator replaces the first object or the second object with the target object.
  • the target object is sent to the cloud service provider whose response information is abnormal when the response information is acquired or when the response information is abnormal, so as to ensure that different cloud service providers save the target object and ensure that different cloud services provide Providers always have the same objects and can serve the same key values.
  • the first target value corresponding to at least one key value and the second target value corresponding to at least one second key value are respectively obtained from the first cloud service provider and the second cloud service provider.
  • the first key value and the second key value belong to the key value of the target value to be queried.
  • FIG. 9 is a schematic diagram of the query key value provided by the embodiment of the present application, wherein the key values that need to query the target value on the first computer device are key1, key2, key3, key4 and key5, Divide it into two groups, one group includes key1 and key2, the other group includes key3, key4 and key5, and then obtain the target values corresponding to key1 and key2 from the first cloud service provider, and obtain key3 and key4 from the second cloud service provider And the target value corresponding to key5.
  • Fig. 9 is only used to understand the embodiment of the present application, and does not substantially limit the embodiment of the present application. In actual situations, it can be divided into three or more groups, and then the Multiple cloud service providers obtain corresponding target values, which are not limited here.
  • the key value of the target value to be queried can be divided into multiple groups, and then the target value corresponding to the key value can be obtained from different cloud service providers, which can reduce the workload of the cloud service provider, And efficiently complete the query task, improve work efficiency.
  • the operation corresponding to the key value is performed through the first object and/or the target object on the second cloud service provider.
  • FIG. 10a is another schematic diagram of an application scenario provided by the embodiment of the present application.
  • the first computer equipment visits the first cloud service provider abnormally, at this time the first computer equipment can visit the second cloud service provider to obtain the first object to obtain the target object and send it to the first cloud service provider and the second cloud service provider to complete Operations such as inserting, modifying, or deleting key values, or completing key-value query through the first object and/or the target object, ensure that key-value operations can be completed smoothly in real time.
  • the first object and/or the target object on the second cloud service provider executes the operation corresponding to the key value, ensuring that in a certain cloud service
  • another cloud service provider can continue to complete the operation, which reflects the reliability support of key-value storage and ensures the real-time access and operation of key-value storage.
  • only one computer device can send the target object to the first cloud service provider and the second cloud service provider in the same time period.
  • the target object may only be updated by a fixed computer device, or the target object may be updated by a preset computer device within a defined period of time, and then sent to the first cloud service provider and the second cloud service provider. It can be understood that the target object can be determined according to specific needs in actual situations, and is not specifically limited here. It can ensure the real-time and accuracy of the objects provided by the cloud service provider.
  • the first cloud service provider or the second cloud service provider determines the third target value corresponding to the third key value through at least one third key value, and sends the corresponding first computer device and/or the second The second computer device sends the third target value, wherein the third key value is sent by the first computer device and/or the second computer device to the first cloud service provider or the second cloud service provider.
  • FIG. 10b is another schematic diagram of the application scenario provided by the embodiment of the present application, in which the first computer device and the second computer device receive from the first cloud service provider and/or the second cloud service provider Query key value.
  • three or more computer devices may query the key value from the first cloud service provider or the second cloud service provider, and the number of computer devices querying the key value is not specifically limited here.
  • Multiple computer devices querying key values from cloud service providers can adapt to a wide range of networks and improve work efficiency.
  • the first object is obtained through the key value, and the target object is obtained, and the target object is sent to different cloud service providers with the first object, so as to ensure that different cloud service providers have the same object and can be the same
  • the key-value provides corresponding operations, which solves the reliability problem of key-value storage provided by cloud services. And it reduces the operation and maintenance cost of providing key-value storage reliability across cloud service providers. In the case of an abnormal access to a certain cloud service provider, switch to another cloud service provider to complete the operation corresponding to the key value, and provide real-time key-value storage services to ensure the normal operation of the business and improve work efficiency.
  • the data processing system may include a hardware structure and/or a software module, and realize the above-mentioned functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether one of the above-mentioned functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
  • FIG. 11 is a schematic diagram of the architecture of the data access system provided by the embodiment of the present application.
  • the data access system may include one-to-one modules or units that execute the methods/operations/steps/actions in the above method embodiments, and the units may be hardware circuits, software, or It is realized by combining hardware circuit and software.
  • the data access system may include: a first computer device 1101 , a first cloud service provider 1102 and a second cloud service provider 1103 .
  • the first computer device 1101 can be used to perform the steps of obtaining the first object based on the key value and obtaining the target object as in the above method embodiment, and the step of sending the target object to the first cloud service provider and the second cloud service provider, the first The cloud service provider 1102 and the second cloud service provider 1103 may be used to perform the step of performing key-value correspondence based on the target object in the above method embodiment.
  • the data access system further includes a second computer device 1104, wherein the first cloud service provider 1102 and/or the second cloud service provider 1103 are further configured to use the third key value to determine the corresponding and send the third target value to the corresponding first computer device 1101 and/or the second computer device 1104, and the third key value is sent to the first computer device 1104 by the first computer device and/or the second computer device 1104 Cloud service provider or second cloud service provider.
  • the first computer device 1101 obtains the first object based on the key value, obtains the target object according to the key value and the first object, and sends the target object to the first cloud service provider 1102 and the second cloud service provider 1103 , and the first cloud service provider and the second cloud service provider are cloud service providers with the first object, then the first cloud service provider 1102 and the second cloud service provider 1103 perform key-value corresponding operations based on the target object.
  • different cloud service providers have the same object, and can complete the execution of corresponding operations for the same key value, which solves the reliability problem of cloud service providing key value storage. And it reduces the operation and maintenance cost of providing key-value storage reliability across cloud service providers.
  • the first computer device 1101, the first cloud service provider 1102, the second cloud service provider 1103, or the second computer device 1104 can execute various possible corresponding methods in the above method embodiments one by one.
  • the above-mentioned first computer device 1101 is also used to execute the key-value corresponding operation.
  • the above-mentioned first computer device 1101 is specifically configured to obtain the second object based on the key value and the first object;
  • the above-mentioned first computer device 1101 is further configured to respectively obtain at least one first target value corresponding to the first key value and at least one second key value from the first cloud service provider and the second cloud service provider.
  • the second target value corresponding to the key value, the first key value and the second key value are key values of the target value to be queried.
  • the key value includes at least any of the following:
  • the key-value to be modified, the key-value to be inserted, or the key-value to be deleted is not limited.
  • Figure 11 corresponds to the information interaction and execution process between modules/units in the data access system described in the embodiment, and the method embodiment corresponding to Figure 2 in this application is based on the same idea, and the specific content can be Refer to the descriptions in the foregoing method embodiments of the present application, and details are not repeated here.
  • FIG. 12 is a schematic structural diagram of the information processing device provided by the embodiment of the present application.
  • the information processing device 1200 may be the corresponding embodiment in FIG. 11 Corresponding to the first computer equipment, the second computer equipment, the first cloud service provider or the second cloud service provider, for realizing the first computer equipment, the second computer equipment, the first cloud service provider or the second cloud service in Fig.
  • the information processing device 1200 is implemented by one or more servers, and the information processing device 1200 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (central processing units, CPU) 1222 (eg, one or more central processing units) and memory 1232, and one or more storage media 1230 (eg, one or more storage devices).
  • the memory 1232 and the storage medium 1230 may be temporary storage or persistent storage.
  • the program stored in the storage medium 1230 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations for the information processing device 1200 .
  • the central processing unit 1222 may be configured to communicate with the storage medium 1230 , and execute a series of instruction operations in the storage medium 1230 on the information processing device 1200 .
  • the information processing device 1200 may also include one or more power sources 1226 , one or more wired or wireless network interfaces 1250 , and/or, one or more input/output interfaces 1258 .
  • the central processing unit 1222 is configured to execute the method in the embodiment corresponding to FIG. 2 .
  • the central processing unit 1222 can be configured to: obtain the first object based on the key value, then obtain the target object based on the key value and the first object, and then send the target object to the first cloud service provider and the second cloud service provider, so that the second cloud service provider A cloud service provider and a second cloud service provider perform key-value corresponding operations based on the target object, and the first cloud service provider and the second cloud service provider are cloud service providers with the first object.
  • the central processing unit 1222 may be configured to: acquire a target object and execute key-value corresponding operations based on the first object and/or the target object.
  • the central processing unit 1222 may be configured to: send the third key value to the first cloud service provider or the second cloud service provider to obtain a target value corresponding to the third key value.
  • central processing unit 1222 can also be used to execute any step in the method embodiment corresponding to FIG. 2 in this application. Let me repeat.
  • the embodiments of the present application also provide a computer-readable storage medium, including computer-readable instructions, which, when the computer-readable instructions are run on a computer, cause the computer to execute any one of the implementation manners shown in the foregoing method embodiments.
  • An embodiment of the present application also provides a computer program product, the computer program product includes a computer program or an instruction, and when the computer program or instruction is run on a computer, the computer is made to execute any one of the implementation manners shown in the foregoing method embodiments.
  • the present application also provides a chip or a chip system, and the chip may include a processor.
  • the chip may also include memory (or storage module) and/or transceiver (or communication module), or, the chip is coupled with memory (or storage module) and/or transceiver (or communication module), wherein the transceiver ( or communication module) can be used to support the chip for wired and/or wireless communication, the memory (or storage module) can be used to store a program or a set of instructions, and the processor calls the program or the set of instructions can be used to implement the above method embodiments, An operation performed by a terminal or a network device in any possible implementation manner of the method embodiment.
  • the system-on-a-chip may include the above-mentioned chips, and may also include the above-mentioned chips and other discrete devices, such as memory (or storage module) and/or transceiver (or communication module).
  • the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be A physical unit can be located in one place, or it can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • the connection relationship between the modules indicates that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.
  • the essence of the technical solution of this application or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a readable storage medium, such as a floppy disk of a computer , U disk, mobile hard disk, read only memory (read only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk, etc., including several instructions to make a computer device (which can be a personal A computer, a training device, or a network device, etc.) executes the methods described in various embodiments of the present application.
  • a computer device which can be a personal A computer, a training device, or a network device, etc.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transferred from a website, computer, training device, or data
  • the center transmits to another website site, computer, training device or data center via wired (eg coaxial cable, optical fiber, digital subscriber line) or wireless (eg infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be stored by a computer, or a data storage device such as a training device or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium, (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a high-density digital video disc (digital video disc, DVD)), or a semiconductor medium (for example, a solid state drive (solid state drive) , SSD)) etc.

Abstract

The present application discloses a data access method and a data access system thereof, which are applied to an application scene for providing key value storage by using a cloud service. The method comprises: acquiring a first object on the basis of a key value, wherein the first object is used for supporting an operation corresponding to the key value; then, obtaining a target object on the basis of the key value and the first object; after the target object is obtained, sending the target object to a first cloud service provider and a second cloud service provider, so that the first cloud service provider and the second cloud service provider execute, on the basis of the target object, operations corresponding to the key value, wherein the first cloud service provider and the second cloud service provider are cloud service providers having first objects. By means of to the invention, different cloud service providers are ensured to have the same object, so that different cloud service providers can provide services for the same key value, the reliability problem of key value storage provided by the cloud service is solved, and the operation and maintenance costs for providing reliability for key value storage across cloud service providers are reduced.

Description

一种数据访问方法及其数据访问系统A data access method and its data access system 技术领域technical field
本申请实施例涉及通信领域,尤其涉及一种数据访问方法及其数据访问系统。The embodiment of the present application relates to the communication field, and in particular to a data access method and a data access system thereof.
背景技术Background technique
键值存储在互联网行业被广泛采用。例如云服务大多采用键值存储的存储形式支持数据的查询、插入、删除以及修改等操作,用于支撑网络业务,例如保存图片、视频、应用程序等许多项目,已经形成了事实标准。Key-value storage is widely used in the Internet industry. For example, most cloud services use key-value storage to support operations such as query, insertion, deletion, and modification of data. They are used to support network services, such as saving pictures, videos, and applications, and many other items have formed de facto standards.
当前的云服务提供的键值存储服务,多依靠一家供应商或者开源的键值存储项目支撑。例如各种非关系型(not only structured query language,NoSQL)数据库,均可以保存键值数据,这些键值存储服务由对应的云服务提供商。但是,在当前云服务提供键值存储的方式中,在云服务发生故障或访问异常的情况下,容易出现可靠性问题。The key-value storage services provided by current cloud services are mostly supported by a supplier or an open-source key-value storage project. For example, various non-relational (not only structured query language, NoSQL) databases can store key-value data, and these key-value storage services are provided by corresponding cloud service providers. However, in the current way that cloud services provide key-value storage, reliability problems are prone to occur when cloud services fail or access is abnormal.
发明内容Contents of the invention
本申请提供了数据访问方法及其数据访问系统,应用于采用云服务的应用场景中,能够跨云服务提供商支持键值存储的可靠性问题,且能够减少跨云服务提供商提供键值存储可靠性的成本。This application provides a data access method and its data access system, which are applied to the application scenarios using cloud services, can support the reliability of key-value storage across cloud service providers, and can reduce the need for cross-cloud service providers to provide key-value storage The cost of reliability.
本申请第一方面提供了一种数据访问方法,包括:The first aspect of the present application provides a data access method, including:
基于键值获取第一对象,该第一对象用于支持键值对应的操作。其中,键值包括关键值以及与关键值对应的目标值;The first object is obtained based on the key value, and the first object is used to support the operation corresponding to the key value. Wherein, the key value includes a key value and a target value corresponding to the key value;
然后,基于键值以及第一对象得到目标对象,且目标对象的数量至少为一个;Then, the target object is obtained based on the key value and the first object, and the number of the target object is at least one;
得到目标对象后,向第一云服务商和第二云服务商发送目标对象,以使得第一云服务商和第二云服务商基于目标对象完成键值对应操作的执行,该第一云服务商和第二云服务商为具备第一对象的云服务提供商。After obtaining the target object, send the target object to the first cloud service provider and the second cloud service provider, so that the first cloud service provider and the second cloud service provider complete the execution of the key-value corresponding operation based on the target object, and the first cloud service provider The provider and the second cloud service provider are cloud service providers with the first object.
在本申请的实施方式中,基于键值获取第一对象,第一对象用于支持键值对应的操作,然后基于键值以及第一对象得到目标对象,再将目标对象发送给第一云服务商以及第二云服务商,使得第一云服务商以及第二云服务商基于目标对象执行键值对应的操作,该第一云服务商以及第二云服务商为具备第一对象的云服务提供商。其中,第一云服务商以及第二云服务商具备第一对象以及目标对象,确保了不同云服务提供商之间具备相同的对象,即确保了不同云服务提供商能为相同的键值提供服务,解决云服务提供键值存储的可靠性问题,且减少了跨云服务提供商提供键值存储可靠性的运维成本。In the implementation of this application, the first object is obtained based on the key value, and the first object is used to support the operation corresponding to the key value, and then the target object is obtained based on the key value and the first object, and then the target object is sent to the first cloud service provider and the second cloud service provider, so that the first cloud service provider and the second cloud service provider perform key-value corresponding operations based on the target object. The first cloud service provider and the second cloud service provider are cloud services with the first object provider. Among them, the first cloud service provider and the second cloud service provider have the first object and the target object, ensuring that different cloud service providers have the same object, that is, ensuring that different cloud service providers can provide the same key value Service, solves the reliability problem of key-value storage provided by cloud service, and reduces the operation and maintenance cost of providing key-value storage reliability across cloud service providers.
在第一方面的一种可能的实现方式中,在第一云服务商访问异常的情况下,通过第二云服务商上的第一对象和/或目标对象完成键值对应操作的执行。In a possible implementation manner of the first aspect, in the case of an abnormal access to the first cloud service provider, the key-value corresponding operation is executed through the first object and/or the target object on the second cloud service provider.
在本申请的实施方式中,在第一云服务商访问异常的情况下,通过第二云服务商上的第一对象和/或目标对象完成键值对应操作的执行,确保了在某个云服务提供商访问异常时,可以通过另一个云服务提供商继续完成操作,体现了本方案键值存储的可靠性支撑,保证了键值存储的实时访问以及操作。In the embodiment of this application, in the case of an abnormal access to the first cloud service provider, the execution of the key-value corresponding operation is completed through the first object and/or the target object on the second cloud service provider, ensuring that When the service provider's access is abnormal, another cloud service provider can continue to complete the operation, which reflects the reliability support of the key-value storage of this solution and ensures the real-time access and operation of the key-value storage.
在第一方面的一种可能的实现方式中,基于键值以及第一对象获取第二对象,且该第二对象的数量为至少一个,然后基于键值对第二对象更新得到目标对象。In a possible implementation manner of the first aspect, the second object is obtained based on the key value and the first object, and the number of the second object is at least one, and then the target object is obtained by updating the second object based on the key value.
在本申请的实施方式中,基于键值以及第一对象获取第二对象,并根据键值对第二对象进行更新,能确保键值存储的准确性,更精准以及灵活的更新键值存储的对象,确保提供保障性的服务。In the implementation of this application, the second object is obtained based on the key value and the first object, and the second object is updated according to the key value, which can ensure the accuracy of the key value storage and update the key value storage more accurately and flexibly. Objects to ensure the provision of guaranteed services.
在第一方面的一种可能的实现方式中,从第一云服务商以及第二云服务商分别获取至少一个第一关键值对应的第一目标值,以及至少一个第二关键值对应的第二目标值,该第一关键值以及第二关键值属于待查询目标值的关键值。In a possible implementation manner of the first aspect, the first target value corresponding to at least one first key value and the first target value corresponding to at least one second key value are respectively obtained from the first cloud service provider and the second cloud service provider. Two target values, the first key value and the second key value are key values of the target value to be queried.
在本申请的实施方式中,可以从第一云服务商以及第二云服务商分别获取关键值的目标值,完成多个键值的查询操作,能减少云服务提供商的工作负载,且能提供工作效率。In the embodiment of the present application, the target value of the key value can be obtained from the first cloud service provider and the second cloud service provider respectively, and the query operation of multiple key values can be completed, which can reduce the workload of the cloud service provider, and can Provides productivity.
在第一方面的一种可能的实现方式中,在向第一云服务商以及第二云服务商发送目标对象之后,获取应答信息,该应答信息用于表示发送应答信息的云服务提供商已经保存目标对象,或者,在获取应答信息异常的情况下,向获取应答信息异常的云服务提供商再次发送目标对象。In a possible implementation of the first aspect, after the target object is sent to the first cloud service provider and the second cloud service provider, response information is obtained, and the response information is used to indicate that the cloud service provider that sent the response information has The target object is saved, or, in the case of an abnormality in obtaining the response information, the target object is resent to the cloud service provider whose response information is abnormal.
在本申请的实施方式中,获取应答信息以及在获取应答信息异常的情况下再次发送目标对象,确保第一云服务商以及第二云服务商都保存目标对象,保证不同的云服务提供商实时具备相同的对象,均能为相同的键值提供服务。In the embodiment of this application, the response information is obtained and the target object is sent again when the response information is abnormal, so as to ensure that both the first cloud service provider and the second cloud service provider save the target object, and ensure that different cloud service providers have real-time The same object can provide services for the same key value.
在第一方面的一种可能的实现方式中,键值至少包括以下任意一种:In a possible implementation manner of the first aspect, the key value includes at least any one of the following:
待修改的键值、待插入的键值或待删除的键值。The key-value to be modified, the key-value to be inserted, or the key-value to be deleted.
在本申请的实施方式中,说明了键值的具体形式,体现了方案的可选择性、可靠性以及灵活性。In the embodiment of the present application, the specific form of the key value is described, reflecting the selectivity, reliability and flexibility of the scheme.
在本申请的第二方面提供一种数据访问系统,该数据访问系统具有实现上述第一方面或第一方面任意一种可能实现方式的方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。In the second aspect of the present application, a data access system is provided, and the data access system has the function of implementing the method of the above-mentioned first aspect or any possible implementation manner of the first aspect. This function may be implemented by hardware, or may be implemented by executing corresponding software on the hardware. The hardware or software includes one or more modules corresponding to the above functions.
本申请第二方面的数据访问系统执行本申请第一方面或第一方面任意一种可能实现方式所描述的方法。The data access system in the second aspect of the present application executes the method described in the first aspect of the present application or any possible implementation manner of the first aspect.
在第二方面的一种可能的实现方式中,该数据访问系统还包括第二计算机设备,且第一云服务商或第二云服务商还用于通过至少一个第三关键值确定第三关键值对应的第三目标值,并向第一计算机设备和/或第二计算机设备发送第三目标值,该第三关键值由第一计算机设备和/或第二计算机设备向第一云服务商或第二云服务商发送。In a possible implementation of the second aspect, the data access system further includes a second computer device, and the first cloud service provider or the second cloud service provider is further configured to determine the third key by using at least one third key value value corresponding to the third target value, and send the third target value to the first computer device and/or the second computer device, and the third key value is sent to the first cloud service provider by the first computer device and/or the second computer device Or sent by the second cloud service provider.
在本申请的实施方式中,该数据访问系统支持多个计算机设备从第一云服务商或第二云服务商查询键值,获取关键值对应的目标值,适用于广泛的网络环境,提高工作效率。In the embodiment of the present application, the data access system supports multiple computer devices to query the key value from the first cloud service provider or the second cloud service provider, and obtain the target value corresponding to the key value, which is applicable to a wide range of network environments and improves work efficiency. efficiency.
本申请第三方面提供一种信息处理装置,可以包括处理器,该处理器与存储器耦合,其中存储器用于存储指令,处理器用于执行存储器中的指令使得该信息处理装置执行本申请第一方面中第一方面或第一方面任意一种可能实现方式中的方法,或者执行本申请第二方面中数据访问系统中的第一计算机设备、第二计算机设备、第一云服务商或第二云服务商所实现的功能。The third aspect of the present application provides an information processing device, which may include a processor, the processor is coupled with a memory, wherein the memory is used to store instructions, and the processor is used to execute the instructions in the memory so that the information processing device executes the first aspect of the present application The method in the first aspect or any one of the possible implementations of the first aspect, or execute the first computer device, the second computer device, the first cloud service provider or the second cloud in the data access system in the second aspect of the application Functions implemented by the service provider.
本申请实施例第四方面提供另一种信息处理装置,包括处理器,用于执行存储器中存储的计算机程序(或计算机可执行指令),当计算机程序(或计算机可执行指令)被执行时,使得该信息处理装置执行如第一方面或第一方面任意一种可能实现方式中的方法,或者执行本申请第二方面中数据访问系统中的第一计算机设备、第二计算机设备、第一云服务商或第二云服务商所实现的功能。The fourth aspect of the embodiment of the present application provides another information processing device, including a processor, configured to execute the computer program (or computer-executable instruction) stored in the memory, when the computer program (or computer-executable instruction) is executed, Make the information processing apparatus execute the method in the first aspect or any one of the possible implementations of the first aspect, or execute the first computer device, the second computer device, and the first cloud in the data access system in the second aspect of the present application Functions implemented by the service provider or the second cloud service provider.
在一种可能的实现中,处理器和存储器集成在一起;In one possible implementation, the processor and memory are integrated;
在另一种可能的实现中,上述存储器位于该信息处理装置之外。In another possible implementation, the above-mentioned memory is located outside the information processing device.
该信息处理装置还包括通信接口,该通信接口用于该信息处理装置与其他设备进行通信,例如数据和/或信号的发送或接收。示例性的,通信接口可以是收发器、电路、总线、模块或其它类型的通信接口。The information processing device also includes a communication interface, which is used for the information processing device to communicate with other devices, such as sending or receiving data and/or signals. Exemplarily, the communication interface may be a transceiver, a circuit, a bus, a module or other types of communication interfaces.
本申请第五方面提供一种计算机可读存储介质,包括计算机可读指令,当计算机可读指令在计算机上运行时,使得本申请第一方面或第一方面任意一种可能实现方式所描述的方法被执行。The fifth aspect of the present application provides a computer-readable storage medium, including computer-readable instructions. When the computer-readable instructions are run on a computer, the method is executed.
本申请第六方面提供一种计算机程序产品,包括计算机可读指令,当计算机可读指令在计算机上运行时,使得本申请第一方面或第一方面任意一种可能实现方式所描述的方法被执行。The sixth aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are run on a computer, the method described in the first aspect of the present application or any possible implementation manner of the first aspect is executed. implement.
本申请第七方面提供了一种芯片,该芯片包括至少一个处理器和至少一个接口电路,该接口电路和该处理器耦合,至少一个接口电路用于执行收发功能,并将指令发送给至少一个处理器,至少一个处理器用于运行计算机程序或指令,其具有实现如上述第一方面或第一方面任意一种可能实现方式中的方法的功能,该功能可以通过硬件实现,也可以通过软件实现,还可以通过硬件和软件组合实现,该硬件或软件包括一个或多个与上述功能相对应的模块。The seventh aspect of the present application provides a chip, the chip includes at least one processor and at least one interface circuit, the interface circuit is coupled to the processor, the at least one interface circuit is used to perform the function of sending and receiving, and send instructions to at least one Processor, at least one processor is used to run computer programs or instructions, which has the function of implementing the method in the above first aspect or any possible implementation manner of the first aspect, and this function can be realized by hardware or by software , can also be implemented by a combination of hardware and software, where the hardware or software includes one or more modules corresponding to the above functions.
附图说明Description of drawings
图1a为本申请实施例提供的数据访问系统的一个架构示意图;Figure 1a is a schematic diagram of the architecture of the data access system provided by the embodiment of the present application;
图1b为本申请实施例提供的数据访问系统的一个应用场景示意图;Figure 1b is a schematic diagram of an application scenario of the data access system provided by the embodiment of the present application;
图2为本申请实施例提供的数据访问方法的一个示意图;FIG. 2 is a schematic diagram of a data access method provided by an embodiment of the present application;
图3为本申请实施例提供的应用场景的一个示意图;FIG. 3 is a schematic diagram of an application scenario provided by an embodiment of the present application;
图4为本申请实施例提供的键值存储结构的一个示意图;Fig. 4 is a schematic diagram of the key-value storage structure provided by the embodiment of the present application;
图5为本申请实施例提供的一个更新第一对象的一个示意图;FIG. 5 is a schematic diagram of an updated first object provided by the embodiment of the present application;
图6为本申请实施例提供的一个更新第一对象的另一个示意图;FIG. 6 is another schematic diagram of an updated first object provided by the embodiment of the present application;
图7为本申请实施例提供的第一对象或中间对象的一个示意图;Fig. 7 is a schematic diagram of the first object or the intermediate object provided by the embodiment of the present application;
图8为本申请实施例提供的应用场景的另一个示意图;FIG. 8 is another schematic diagram of an application scenario provided by an embodiment of the present application;
图9为本申请实施例提供的查询键值的一个示意图;FIG. 9 is a schematic diagram of the query key value provided by the embodiment of the present application;
图10a为本申请实施例提供的应用场景的另一个示意图;Fig. 10a is another schematic diagram of the application scenario provided by the embodiment of the present application;
图10b为本申请实施例提供的应用场景的另一个示意图;Fig. 10b is another schematic diagram of the application scenario provided by the embodiment of the present application;
图11为本申请实施例提供的数据访问系统的的一个架构示意图;FIG. 11 is a schematic diagram of the architecture of the data access system provided by the embodiment of the present application;
图12为本申请实施例提供的信息处理装置的一个结构示意图。FIG. 12 is a schematic structural diagram of an information processing device provided by an embodiment of the present application.
具体实施方式Detailed ways
本申请提供了数据访问方法及其数据访问系统,应用于采用云服务的应用场景中,能够跨云服务提供商支持键值存储的可靠性问题,且能够减少跨云服务提供商提供键值存储可靠性的成本。This application provides a data access method and its data access system, which are applied to the application scenarios using cloud services, can support the reliability of key-value storage across cloud service providers, and can reduce the need for cross-cloud service providers to provide key-value storage The cost of reliability.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,以便包含 一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。The terms "first", "second" and the like in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, and this is merely a description of the manner in which objects with the same attribute are described in the embodiments of the present application. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, product, or apparatus comprising a series of elements is not necessarily limited to those elements, but may include elements not expressly included. Other elements listed explicitly or inherent to the process, method, product, or apparatus.
在介绍本申请实施例之前,先对键值存储以及目前常见的云服务提供的键值存储进行简单的介绍,以便于后续理解本申请实施例。Before introducing the embodiment of the present application, a brief introduction is made to the key-value store and the key-value store provided by the common cloud services at present, so as to facilitate the subsequent understanding of the embodiment of the present application.
键值存储主要存储关键值(key)和目标值(value)之间的映射关系,类似字典的作用,提供key->value查询、插入、删除以及修改等操作。在存储系统、数据库系统或文件系统之中,会使用键值存储保存和维护大量的key和value的映射关系,这些映射关系和value的具体内容保存了上述系统的内部状态,在系统运行过程中通过查询、修改、插入或删除这些映射关系来决定程序的后续操作。例如,在存储系统中,可以使用键值存储保存用户的逻辑地址到实际保存数据的磁盘物理地址的映射关系,在用户读取逻辑地址的数据时,需要到键值存储中查询和读取实际保存所述的磁盘物理地址,查询到物理地址后,从物理地址读取数据返回给用户;若这个逻辑地址没有存储数据,则返回没有对应的映射关系,告知用户没有数据。Key-value storage mainly stores the mapping relationship between the key value (key) and the target value (value), which acts like a dictionary and provides operations such as key->value query, insertion, deletion, and modification. In the storage system, database system or file system, key-value storage is used to save and maintain a large number of key-value mapping relationships. The specific content of these mapping relationships and value saves the internal state of the above-mentioned system. During the operation of the system The subsequent operation of the program is determined by querying, modifying, inserting or deleting these mapping relationships. For example, in the storage system, key-value storage can be used to store the mapping relationship between the user's logical address and the physical address of the disk where the data is actually stored. When the user reads the data at the logical address, it needs to query and read the actual Save the physical address of the disk, and after querying the physical address, read the data from the physical address and return it to the user; if the logical address does not store data, return no corresponding mapping relationship, and inform the user that there is no data.
在云服务上的键值存储通常可以是由云服务提供商提供的,例如一些NoSQL数据库中使用完全托管的NoSQL数据库服务(DynamoDB)保存键值数据,或者使用分布式数据存储系统(Bigtable)保存键值数据,这些键值存储服务由对应的云服务提供商(例如亚马逊或者谷歌等)提供。Key-value storage on cloud services can usually be provided by cloud service providers. For example, some NoSQL databases use fully managed NoSQL database services (DynamoDB) to store key-value data, or use distributed data storage systems (Bigtable) to store Key-value data, these key-value storage services are provided by corresponding cloud service providers (such as Amazon or Google, etc.).
或者,在云服务上搭建和运行开源的键值存储项目,具体例如LeveIDB、RocksDB或HBase等键值存储项目,通过这些键值存储项目能够以访问的服务形式提供给用户在云服务上运行其他应用。Alternatively, build and run open source key-value storage projects on cloud services, such as key-value storage projects such as LeveIDB, RocksDB, or HBase. Through these key-value storage projects, they can be provided to users in the form of accessed services to run other projects on cloud services. application.
但是,在上述云服务提供键值存储的形式中,在云服务发生故障或访问异常的情况下,容易出现键值存储的可靠性问题,且在当前提供键值存储的方式上解决可靠性问题成本较大,实现困难。However, in the above-mentioned form of cloud service providing key-value storage, in the case of cloud service failure or abnormal access, the reliability problem of key-value storage is prone to occur, and the reliability problem is solved in the current way of providing key-value storage The cost is relatively large, and it is difficult to realize.
为解决上述所述问题,本申请实施例提供了数据访问方法及其数据访问系统,本申请实施例应用于采用云服务的应用场景中,用于使多个云服务提供商采用相同的键值存储方式提供键值对应的操作,解决云服务提供键值存储的可靠性问题,且能减少跨云服务提供商提供键值存储可靠性的成本。In order to solve the above-mentioned problems, the embodiment of the present application provides a data access method and a data access system thereof, and the embodiment of the present application is applied to an application scenario using cloud services, and is used to enable multiple cloud service providers to use the same key value The storage method provides key-value corresponding operations, solves the reliability problem of key-value storage provided by cloud services, and can reduce the cost of providing key-value storage reliability across cloud service providers.
为便于理解本申请的数据访问方法,下面结合附图,对本申请实施例应用的数据访问系统进行简单描述。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。具体请参阅图1a,图1a为本申请实施例提供的数据访问系统的一个架构示意图,具体包括:In order to facilitate the understanding of the data access method of the present application, the following briefly describes the data access system applied in the embodiment of the present application with reference to the accompanying drawings. Those of ordinary skill in the art know that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems. Please refer to Fig. 1a for details. Fig. 1a is a schematic diagram of the architecture of the data access system provided by the embodiment of the present application, which specifically includes:
第一计算机设备101、第一云服务商102以及第二云服务商103。A first computer device 101 , a first cloud service provider 102 and a second cloud service provider 103 .
为了便于理解图1a所示的数据访问系统,下面通过图1b所示的应用场景进行具体说明,图1b为本申请实施例提供的数据访问系统的一个应用场景示意图,其中第一云服务商102以及第二云服务商103为具备第一对象的云服务提供商,该第一对象用于支持键值对应的操作,例如支持键值的查询、删除、插入或修改等操作。In order to facilitate the understanding of the data access system shown in Figure 1a, the following is a specific description through the application scenario shown in Figure 1b. And the second cloud service provider 103 is a cloud service provider with the first object, and the first object is used to support operations corresponding to key values, such as querying, deleting, inserting or modifying operations of key values.
其中,第一计算机设备101用于基于键值从第一云服务商102或第二云服务商103获取第一对象。Wherein, the first computer device 101 is configured to obtain the first object from the first cloud service provider 102 or the second cloud service provider 103 based on the key value.
然后,第一计算机设备101还用于基于上述的键值以及第一对象得到目标对象,且该目标对象的数量为至少一个。Then, the first computer device 101 is further configured to obtain a target object based on the above-mentioned key value and the first object, and the number of the target object is at least one.
在得到目标对象后,第一计算机设备101还用于向第一云服务商102以及第二云服务商103发送目标对象。After obtaining the target object, the first computer device 101 is further configured to send the target object to the first cloud service provider 102 and the second cloud service provider 103 .
其中,第一云服务商102以及第二云服务商103在接收到目标对象后,用于基于该目标对象完成键值对应操作的执行。Wherein, after receiving the target object, the first cloud service provider 102 and the second cloud service provider 103 are used to complete the execution of the key-value corresponding operation based on the target object.
在本申请实施例所述的数据访问系统中,第一计算机设备基于键值获取第一对象,并基于键值以及第一对象确定目标对象,然后向第一云服务商以及第二云服务商发送目标对象。其中,第一云服务商以及第二云服务商为具备第一对象的云服务提供商,因此第一计算机设备向不同的云服务提供商发送目标对象,确保了不同云服务提供商具备相同的对象,能同时为相同的键值提供对应的操作,解决云服务提供键值存储的可靠性问题,且减少了跨云服务提供商提供键值存储可靠性的运维成本。In the data access system described in the embodiment of the present application, the first computer device obtains the first object based on the key value, and determines the target object based on the key value and the first object, and then sends the data to the first cloud service provider and the second cloud service provider Send target object. Among them, the first cloud service provider and the second cloud service provider are cloud service providers with the first object, so the first computer device sends the target object to different cloud service providers, ensuring that different cloud service providers have the same Objects can provide corresponding operations for the same key value at the same time, solve the reliability problem of key-value storage provided by cloud services, and reduce the operation and maintenance cost of providing key-value storage reliability across cloud service providers.
可选的,第一计算机设备101可以是具有通信功能的终端设备。例如物联网(internet of things,IoT)设备(例如,传感器,电表,水表等)、车联网(vehicle to everything,V2X)设备、无线局域网(wireless local area networks,WLAN)中的站点(station,ST)、个人数字处理(personal digital assistant,PDA)设备、具有无线通信功能的手持设备(如手机)、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备(也可以称为穿戴式智能设备)、平板电脑或带无线收发功能的电脑,或者为云侧设备,例如云服务器或者控制器等。Optionally, the first computer device 101 may be a terminal device with a communication function. For example, Internet of Things (IoT) devices (such as sensors, electricity meters, water meters, etc.), Vehicle to Everything (V2X) devices, and stations (stations, STs) in wireless local area networks (WLAN) ), personal digital assistant (PDA) devices, handheld devices with wireless communication capabilities (such as mobile phones), computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices (also known as wearable smart devices), tablets or computers with wireless transceiver functions, or cloud-side devices, such as cloud servers or controllers.
可选的,第一云服务商102以及第二云服务商103可以是目前市面上的各个云服务的提供商,也可以是以后同样适用于本方案的云服务的提供商。Optionally, the first cloud service provider 102 and the second cloud service provider 103 may be providers of various cloud services currently on the market, or may be providers of cloud services that are also applicable to this solution in the future.
需要说明的是,本申请实施例描述的数据访问系统是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。It should be noted that the data access system described in the embodiment of the present application is to illustrate the technical solutions of the embodiments of the present application more clearly, and does not constitute a limitation to the technical solutions provided in the embodiments of the present application. Those of ordinary skill in the art know that, With the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
下面结合附图,更直观的对本申请实施例的数据访问方法进行描述。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。具体请参阅图2,图2为本申请实施例提供的数据访问方法的一个示意图,具体包括:The data access method of the embodiment of the present application will be described more intuitively below in conjunction with the accompanying drawings. Those of ordinary skill in the art know that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems. Please refer to Figure 2 for details. Figure 2 is a schematic diagram of the data access method provided by the embodiment of this application, which specifically includes:
201、基于键值获取第一对象。201. Acquire a first object based on a key value.
基于键值获取第一对象,其中,第一对象用于支持键值对应的操作,且键值包括关键值以及与关键值对应的目标值。The first object is acquired based on the key value, wherein the first object is used to support the operation corresponding to the key value, and the key value includes a key value and a target value corresponding to the key value.
示例性的,请参阅图3的示例进行说明,图3为本申请实施例提供的应用场景的一个示意图,其中,第一云服务商以及第二云服务商为具备第一对象的云服务提供商,在第一计算机设备具备至少一个待处理的键值的情况下,第一计算机设备会根据键值从图3所示的第一云服务商或者第二云服务商任一一个获取第一对象,该第一对象用于支持键值对应的操作,例如预设在第一云服务商以及第二云服务商的用于支持键值存储相关操作的数据接口或数据结构,具体如支持键值存储的存储树的根对象,可以理解的是,实际情况中,还可以是其他的具体形式支持键值对应操作的对象。For example, please refer to the example in FIG. 3 for illustration. FIG. 3 is a schematic diagram of an application scenario provided by the embodiment of the present application, wherein the first cloud service provider and the second cloud service provider provide cloud services with the first object Provider, in the case that the first computer device has at least one key value to be processed, the first computer device will obtain the second cloud service provider from any one of the first cloud service provider or the second cloud service provider shown in Figure 3 according to the key value An object, the first object is used to support key-value corresponding operations, for example, the data interface or data structure preset in the first cloud service provider and the second cloud service provider to support key-value storage related operations, specifically support It can be understood that the root object of the storage tree of key-value storage can also be an object that supports key-value corresponding operations in other specific forms in actual situations.
为便于理解,下面以第一对象为根对象举例说明。由于对象存储是一种互联网广泛可以获得的存储服务,所以具体示例如各个云服务提供商通过树形结构组织键值数据,而树形结构中每个节点为对象存储的一个对象,其中第一对象为该树形结构的根对象,具体为用于支持键值对应的操作的数据接口。树形结构至少包含一个第一对象即根对象,且第一对象具备 对应的身份标识(identity document,ID),第一计算机设备可以通过第一对象的ID获取第一对象。树形结构的具体形式请参阅图4的示例,图4为本申请实施例提供的键值存储结构的一个示意图。可以理解的是,第一对象的ID可以由数值、字符、汉字及其各种组合表示,实际情况中根据具体需求确定,具体此处不做限定。For ease of understanding, the following uses the first object as the root object for illustration. Since object storage is a storage service widely available on the Internet, for example, each cloud service provider organizes key-value data in a tree structure, and each node in the tree structure is an object of object storage, where the first The object is the root object of the tree structure, specifically a data interface for supporting operations corresponding to key values. The tree structure includes at least one first object, namely the root object, and the first object has a corresponding identity document (identity document, ID), and the first computer device can obtain the first object through the ID of the first object. For the specific form of the tree structure, please refer to the example in FIG. 4 , which is a schematic diagram of the key-value storage structure provided by the embodiment of the present application. It can be understood that the ID of the first object can be represented by numerical values, characters, Chinese characters and various combinations thereof, which are determined according to specific requirements in actual situations, and are not specifically limited here.
可选的,由于更新对象的成本较高,所以可以在键值的数量达到阈值的情况下,再获取第一对象进行后续的更新,以此减少修改对象的成本。Optionally, since the cost of updating an object is relatively high, when the number of key values reaches a threshold, the first object may be acquired for subsequent updating, thereby reducing the cost of modifying the object.
另外,可选的,上述图3中第一计算机设备在从第一云服务商获取第一对象失败后,切换为从第二云服务商获取第一对象,或者第一计算机设备从第二云服务商获取第一对象失败后,切换为从第一云服务商获取第一对象。In addition, optionally, after the first computer device in FIG. 3 fails to obtain the first object from the first cloud service provider, it switches to obtain the first object from the second cloud service provider, or the first computer device obtains the first object from the second cloud service provider. After the service provider fails to obtain the first object, it switches to obtain the first object from the first cloud service provider.
可以理解的是,上述图3以及图4仅仅作为示例,用于理解本申请实施例,不对本申请实施例产生实质性的限定,实际情况中,除了从第一云服务商或第二云服务商获取第一对象,还可以从其他具备第一对象的云服务提供商获取第一对象,具体此处不做限定,且具备第一对象的云服务提供商的数量为至少两个,具体此处不做限定。It can be understood that the above-mentioned Fig. 3 and Fig. 4 are only examples for understanding the embodiment of the present application, and do not substantially limit the embodiment of the present application. In actual situations, except from the first cloud service provider or the second cloud service Providers can obtain the first object, and can also obtain the first object from other cloud service providers with the first object, which is not limited here, and the number of cloud service providers with the first object is at least two, specifically here There is no limit.
202、基于键值以及第一对象得到目标对象。202. Obtain a target object based on the key value and the first object.
基于键值以及第一对象得到目标对象,且目标对象的数量为至少一个。The target object is obtained based on the key value and the first object, and the number of the target object is at least one.
其中,键值至少包括待修改的键值、待插入的键值或待删除的键值中的任意一种。Wherein, the key value at least includes any one of the key value to be modified, the key value to be inserted, or the key value to be deleted.
示例性的,以上述图3继续进行说明,第一计算机设备在获取到第一对象后,会根据键值对第一对象进行更新,具体例如,键值为待插入的键值,则第一计算机设备会先在第一对象中增加记录待插入的键值,在第一对象的键值缓存空间没有超过阈值的情况下,将当前第一对象中的键值(key/value)缓存与新增加记录的待插入的键值进行合并更新得到目标对象,且该目标对象的ID与第一对象的ID一致。具体请参阅图5,图5为本申请实施例提供的一个更新第一对象的一个示意图,其中,键值key4/value为待插入的键值,插入第一对象保存在key/value缓存即key/value Buffer中,后得到目标对象。Exemplarily, continuing the description with the above-mentioned FIG. 3, after the first computer device obtains the first object, it will update the first object according to the key value. Specifically, for example, if the key value is the key value to be inserted, then the first The computer device will first increase the key value to be inserted in the first object, and if the key value cache space of the first object does not exceed the threshold, the key value (key/value) cache in the current first object will be compared with the new The key value to be inserted is added to the record and merged and updated to obtain the target object, and the ID of the target object is consistent with the ID of the first object. Please refer to Figure 5 for details. Figure 5 is a schematic diagram of updating the first object provided by the embodiment of the present application, wherein the key value key4/value is the key value to be inserted, and the inserted first object is stored in the key/value cache, namely key /value Buffer, and finally get the target object.
例如待处理的键值为待修改的键值,在待修改的键值包含的key存储在第一对象时,第一计算机设备将第一对象中待修改的键值包含的key对应的value 1替换成待修改的键值包含的value 2,得到更新后的目标对象。具体请参阅图6,图6为本申请实施例提供的一个更新第一对象的另一个示意图,待修改的键值为key3/value 2,将key3在第一对象中对应的目标值value 1修改为value 2得到目标对象。For example, the key value to be processed is the key value to be modified, and when the key contained in the key value to be modified is stored in the first object, the first computer device stores the value 1 corresponding to the key contained in the key value to be modified in the first object. Replace it with the value 2 contained in the key value to be modified to get the updated target object. Please refer to Figure 6 for details. Figure 6 is another schematic diagram of updating the first object provided by the embodiment of the present application. The key value to be modified is key3/value 2, and the target value value 1 corresponding to key3 in the first object is modified. Get the target object for value 2.
例如待处理的键值为待删除的键值,在待删除的键值存储在第一对象时,第一计算机设备在第一对象中将待删除的键值标记为删除,具体可以采用插入墓碑的方式标记键值,完成键值的删除操作。可以理解的是,在实际情况中,还能以其他形式完成键值的删除操作,具体此处不做限定。For example, the key value to be processed is the key value to be deleted. When the key value to be deleted is stored in the first object, the first computer device marks the key value to be deleted as deleted in the first object. Specifically, inserting a tombstone can be used. Mark the key value in a way to complete the deletion operation of the key value. It can be understood that, in actual situations, the key-value deletion operation can also be completed in other forms, which are not specifically limited here.
一种可能的实现方式中,基于键值以及第一对象获取第二对象,然后基于键值对第二对象更新得到目标对象。示例性的,存储的键值越来越多,会超过第一对象存储键值的阈值,因此第一对象将键值存储到多个叶子对象中,但随着叶子对象的增多,会通过一层或多层中间对象来保持单个对象存储的键值不超过阈值,如图4所示的示例,树形结构还包括中间对象以及叶子对象。在第一对象和/或中间对象中至少包括指向下层对象的查找表、key/value缓存以及汇总信息的版本号。In a possible implementation manner, the second object is acquired based on the key value and the first object, and then the second object is updated based on the key value to obtain a target object. Exemplarily, more and more key values are stored, which will exceed the threshold of the first object to store key values, so the first object stores key values in multiple leaf objects, but as the number of leaf objects increases, it will pass a Layer or multiple layers of intermediate objects to keep the key value stored in a single object does not exceed the threshold, as shown in the example shown in Figure 4, the tree structure also includes intermediate objects and leaf objects. The first object and/or the intermediate object at least include a lookup table pointing to the lower object, a key/value cache, and a version number of summary information.
其中,汇总信息的版本号用于在修改对象时检查对象是否发生了变化,可以通过操作发生时的时间或者由一个递增且唯一的整数表示,可以理解的是,也可以由字符、字符组合、 汉字、汉字组合、数值以及字符组合或其他形式表示,实际情况中根据具体需求确定,具体此处不做限定。Among them, the version number of the summary information is used to check whether the object has changed when the object is modified. It can be represented by the time when the operation occurs or by an incremental and unique integer. It is understandable that it can also be represented by characters, character combinations, Chinese characters, Chinese character combinations, numerical values, and character combinations or other forms of representation are determined according to specific needs in actual situations, and are not limited here.
key/value缓存用于保存新插入的键值以及修改的键值。可选的,key/value缓存具备一个阈值,该阈值可以是缓存的键值数量,或者缓存的键值占据的内存空间大小,可以理解的是,实际情况中可以根据具体需求确定,具体此处不做限定。另外,由于叶子对象没有指向的下层对象,所以叶子对象的阈值可以大于第一对象和/中间对象。且key/value缓存的具体格式可以采用排序数组、哈希表或树形结构,方便用户快速查找key是否属于缓存,查找对应的value。可以理解的是,实际情况中,key/value缓存还可以采用其他格式实现,具体此处不做限定。The key/value cache is used to save newly inserted key values and modified key values. Optionally, the key/value cache has a threshold, which can be the number of cached key values, or the size of the memory space occupied by the cached key values. It is understandable that it can be determined according to specific needs in actual situations, specifically here No limit. In addition, since a leaf object has no underlying objects to which it points, the threshold of the leaf object may be greater than the first object and/or the intermediate object. And the specific format of the key/value cache can adopt sorted array, hash table or tree structure, which is convenient for users to quickly find out whether the key belongs to the cache and find the corresponding value. It is understandable that in actual situations, the key/value cache can also be implemented in other formats, which are not limited here.
对象查找表用于记录上层对象关联的下层对象的信息,例如下层对象存储的key范围以及下层对象的ID,示例性的,请参阅图7,图7为本申请实施例提供的第一对象或中间对象的一个示意图,其中rangekey表示key范围,下层object表示下层对象,具体可以是下层对象的ID,具体此处不做限定。第一对象中的对象查找表包括中间对象的ID,每个中间对象的对象查找表包括对应的叶子对象的ID,另外中间对象以及叶子对象的ID与前述第一对象的ID类似,具体此处不再赘述。可选的,在第一对象或中间对象存储的键值超过先插入的键值超过阈值的情况下,第一对象将存储的键值以及新插入的键值,通过key范围内的起始key划分为多个分组,然后将不同分组根据对应的起始key发送给对应的下层对象存储。在超过下层对象的阈值的情况下,仍然依此发送给该下层对象的下层对象存储。通过起始key划分键值分组,能避免出现数据空洞,保证数据的准确性。The object lookup table is used to record the information of the lower-level objects associated with the upper-level objects, such as the key range stored in the lower-level objects and the ID of the lower-level objects. For example, please refer to FIG. 7, which is the first object or A schematic diagram of the intermediate object, where rangekey represents the key range, and the lower object represents the lower object, which can be the ID of the lower object, which is not limited here. The object lookup table in the first object includes the ID of the intermediate object, and the object lookup table of each intermediate object includes the ID of the corresponding leaf object. In addition, the ID of the intermediate object and the leaf object is similar to the ID of the aforementioned first object, specifically here No longer. Optionally, when the key value stored in the first object or the intermediate object exceeds the threshold value of the key value inserted earlier, the key value stored in the first object and the newly inserted key value are passed through the starting key in the key range Divide into multiple groups, and then send different groups to the corresponding lower-level object storage according to the corresponding start key. In the case of exceeding the threshold of the lower-level object, it is still sent to the lower-level object storage of the lower-level object accordingly. Dividing the key-value group by the starting key can avoid data holes and ensure the accuracy of the data.
下面以图3以及图4为例具体说明,在第一计算机设备获取到第一对象后,根据键值确定第二对象。具体例如,键值为待插入的键值,在超过第一对象缓存的阈值的情况下,或者键值为待修改的键值或待删除的键值,在该键值的key不属于第一对象的key/value缓存的情况下,在对象查找表中查找该键值的key属于某个中间对象包含的key范围,确定该中间对象为第二对象。然后第一计算机设备从第一云服务商或第二云服务商获取该第二对象,然后根据键值对第二对象更新得到目标对象,其中更新第二对象得到目标对象与前述更新第一对象得到目标对象类似,具体此处不再赘述。The following describes in detail by taking FIG. 3 and FIG. 4 as examples. After the first computer device obtains the first object, it determines the second object according to the key value. Specifically, for example, the key value is the key value to be inserted, in the case of exceeding the threshold of the first object cache, or the key value is the key value to be modified or the key value to be deleted, and the key in the key value does not belong to the first In the case of the key/value cache of the object, the key of the key value is found in the object lookup table to belong to the key range contained in an intermediate object, and the intermediate object is determined to be the second object. Then the first computer device obtains the second object from the first cloud service provider or the second cloud service provider, and then updates the second object according to the key value to obtain the target object, wherein the update of the second object to obtain the target object is the same as the aforementioned update of the first object Obtaining the target object is similar, and details will not be repeated here.
一种可能的实现方式中,在键值超过中间对象的阈值和/或不属于中间对象的key/value缓存的情况下,第二对象可以是上述图4中的叶子对象,具体的确定方式与上述确定中间对象为第二对象类似,具体此处不再赘述。In a possible implementation, when the key value exceeds the threshold of the intermediate object and/or does not belong to the key/value cache of the intermediate object, the second object can be the leaf object in the above-mentioned figure 4, and the specific determination method is the same as The foregoing determination of the intermediate object as the second object is similar, and details are not repeated here.
且由于不同的键值对应的第二对象可能不同,则第二对象的数量可以为多个。And because the second objects corresponding to different key values may be different, the number of second objects may be multiple.
在本申请的实施方式中,基于键值以及第一对象获取第二对象,然后再基于键值更新第二对象得到目标对象。能确保键值存储的准确性,更精准以及灵活的更新键值存储的对象,确保提供保障性的服务。In the implementation manner of the present application, the second object is acquired based on the key value and the first object, and then the second object is updated based on the key value to obtain the target object. It can ensure the accuracy of key-value storage, update the objects of key-value storage more accurately and flexibly, and ensure the provision of guaranteed services.
203、向第一云服务商和第二云服务商发送目标对象。203. Send the target object to the first cloud service provider and the second cloud service provider.
向第一云服务商和第二云服务商发送目标对象,以使得第一云服务商和第二云服务商基于目标对象完成键值对应操作的执行,且第一云服务商和第二云服务商为具备第一对象的云服务提供商。Send the target object to the first cloud service provider and the second cloud service provider, so that the first cloud service provider and the second cloud service provider complete the execution of the key-value corresponding operation based on the target object, and the first cloud service provider and the second cloud service provider The service provider is a cloud service provider with the first object.
示例性的,以图3的示例继续说明,第一计算机设备在得到目标对象后,向第一云服务商以及第二云服务商发送目标对象,然后第一云服务商以及第二云服务商可以根据目标对象完成键值对应的操作,例如插入、修改、查询或删除等。Exemplarily, continue to illustrate with the example of FIG. 3 , after the first computer device obtains the target object, it sends the target object to the first cloud service provider and the second cloud service provider, and then the first cloud service provider and the second cloud service provider Operations corresponding to key values can be completed according to the target object, such as insert, modify, query, or delete.
可以理解的是,上述图3仅仅用于示例理解本申请实施例,具体不对本申请实施例产生实质性的限定,实际情况中,还可以是三个云服务提供商、四个云服务提供商或者更多数量的云服务提供商,具体此处不做限定。It can be understood that the above-mentioned FIG. 3 is only used as an example to understand the embodiment of the present application, and does not substantially limit the embodiment of the present application. In actual situations, there may be three cloud service providers or four cloud service providers. Or more cloud service providers, which are not limited here.
在本申请实施例中,基于键值获取第一对象,然后再基于键值以及第一对象得到目标对象,再将目标对象发送给第一云服务商和第二云服务商,能确保至少两个不同的云服务提供商具备相同的对象,能为相同的键值提供服务,解决云服务提供键值存储的可靠性问题,且能减少跨云服务提供商提供键值存储可靠性的运维成本。In the embodiment of this application, the first object is obtained based on the key value, and then the target object is obtained based on the key value and the first object, and then the target object is sent to the first cloud service provider and the second cloud service provider, which can ensure that at least two Different cloud service providers have the same object, can provide services for the same key value, solve the reliability problem of key-value storage provided by cloud service, and reduce the operation and maintenance of key-value storage reliability provided by cross-cloud service providers cost.
一种可能的实现方式中,在向第一云服务商和第二云服务商发送目标对象之后,还会获取应答信息,该应答信息用于表示发送应答信息的云服务提供商已经完成更新目标对象,或者,在获取该应答信息异常的情况下,向获取该应答信息异常的云服务提供商再次发送目标对象。In a possible implementation, after the target object is sent to the first cloud service provider and the second cloud service provider, response information is also obtained, and the response information is used to indicate that the cloud service provider that sent the response information has completed the update target object, or, in the case of abnormality in obtaining the response information, resend the target object to the cloud service provider whose acquisition of the response information is abnormal.
可选的,获取应答信息异常至少包括获取应答信息超时,或获取应答信息失败中任一一种情况,可以理解的是,实际情况中还具备其他方式确定获取应答信息异常,具体此处不做限定。Optionally, the abnormality of obtaining the response information includes at least one of the situations of timeout of obtaining the response information or failure of obtaining the response information. It is understandable that there are other ways to determine the abnormality of obtaining the response information in actual situations, which will not be done here. limited.
示例性的,请参阅图8,图8为本申请实施例提供的应用场景的另一个示意图。其中,第一计算机设备在向第一云服务商以及第二云服务商发送目标对象后,从第一云服务商和/或第二云服务商获取到应答信息,然后第一计算机设备确定对方将第一对象或第二对象更新为目标对象。或者,如图8所示,第一计算机设备从第一云服务商获取应答信息异常,即获取应答信息超时或者获取应答信息失败,然后再次向第一云服务商发送目标对象,确保第一云服务商将第一对象或第二对象替换为目标对象。For example, please refer to FIG. 8 , which is another schematic diagram of an application scenario provided by an embodiment of the present application. Wherein, after the first computer device sends the target object to the first cloud service provider and the second cloud service provider, it obtains response information from the first cloud service provider and/or the second cloud service provider, and then the first computer device determines that the other party Update the first object or the second object as the target object. Or, as shown in Figure 8, the first computer device obtains the response information from the first cloud service provider abnormally, that is, the response information is timed out or fails to obtain the response information, and then sends the target object to the first cloud service provider again to ensure that the first cloud The facilitator replaces the first object or the second object with the target object.
在本申请的实施方式中,获取应答信息或者在获取应答信息异常的情况下,向获取应答信息异常的云服务提供商发送目标对象,确保不同云服务提供商都保存目标对象,保证不同云服务提供商实时具备相同的对象,能为相同的键值提供服务。In the embodiment of the present application, the target object is sent to the cloud service provider whose response information is abnormal when the response information is acquired or when the response information is abnormal, so as to ensure that different cloud service providers save the target object and ensure that different cloud services provide Providers always have the same objects and can serve the same key values.
一种可能的实现方式中,从第一云服务商和第二云服务商分别获取至少一个关键值对应的第一目标值,以及至少一个第二关键值对应的第二目标值。其中,第一关键值以及第二关键值属于待查询目标值的关键值。In a possible implementation manner, the first target value corresponding to at least one key value and the second target value corresponding to at least one second key value are respectively obtained from the first cloud service provider and the second cloud service provider. Wherein, the first key value and the second key value belong to the key value of the target value to be queried.
示例性的,请参阅图9,图9为本申请实施例提供的查询键值的一个示意图,其中,第一计算机设备上需要查询目标值的关键值为key1,key2,key3,key4以及key5,将其分为两组,一组包括key1以及key2,另一组包括key3、key4以及key5,然后从第一云服务商获取key1以及key2对应的目标值,从第二云服务商获取key3,key4以及key5对应的目标值。可以理解的是,图9作为示例,仅仅用于理解本申请实施例,不对本申请实施例产生实质性的限定,实际情况中,还能分为三组或多组,然后分别从三个或多个云服务提供商获取对应的目标值,具体此处不做限定。For example, please refer to FIG. 9. FIG. 9 is a schematic diagram of the query key value provided by the embodiment of the present application, wherein the key values that need to query the target value on the first computer device are key1, key2, key3, key4 and key5, Divide it into two groups, one group includes key1 and key2, the other group includes key3, key4 and key5, and then obtain the target values corresponding to key1 and key2 from the first cloud service provider, and obtain key3 and key4 from the second cloud service provider And the target value corresponding to key5. It can be understood that, as an example, Fig. 9 is only used to understand the embodiment of the present application, and does not substantially limit the embodiment of the present application. In actual situations, it can be divided into three or more groups, and then the Multiple cloud service providers obtain corresponding target values, which are not limited here.
在本申请的实施方式中,可以将待查询目标值的关键值分为多个组,然后分别从不同的云服务提供商获取关键值对应的目标值,能够减轻云服务提供商的工作负载,且高效完成查询任务,提高工作效率。In the embodiment of the present application, the key value of the target value to be queried can be divided into multiple groups, and then the target value corresponding to the key value can be obtained from different cloud service providers, which can reduce the workload of the cloud service provider, And efficiently complete the query task, improve work efficiency.
一种可能的实现方式中,在第一云服务商访问异常的情况下,通过第二云服务商上的第一对象和/或目标对象执行键值对应的操作。In a possible implementation manner, in the case of an abnormal access to the first cloud service provider, the operation corresponding to the key value is performed through the first object and/or the target object on the second cloud service provider.
示例性的,请参阅图10a,图10a为本申请实施例提供的应用场景的另一个示意图。其中,第一计算机设备访问第一云服务商异常,此时第一计算机设备可以访问第二云服务商获取第一对象得到目标对象并发送给第一云服务商和第二云服务商以完成键值的插入、修改或 删除等操作,或者通过第一对象和/或目标对象完成键值的查询,确保能实时顺利的完成键值操作。For example, please refer to FIG. 10a, which is another schematic diagram of an application scenario provided by the embodiment of the present application. Wherein, the first computer equipment visits the first cloud service provider abnormally, at this time the first computer equipment can visit the second cloud service provider to obtain the first object to obtain the target object and send it to the first cloud service provider and the second cloud service provider to complete Operations such as inserting, modifying, or deleting key values, or completing key-value query through the first object and/or the target object, ensure that key-value operations can be completed smoothly in real time.
在本申请的实施方式中,在第一云服务商访问异常的情况下,通过第二云服务商上的第一对象和/或目标对象执行键值对应的操作,确保了在某个云服务提供商访问异常时,可以通过另一个云服务提供商继续完成操作,体现了键值存储的可靠性支撑,保证了键值存储的实时访问以及操作。In the embodiment of the present application, in the case of an abnormal access to the first cloud service provider, the first object and/or the target object on the second cloud service provider executes the operation corresponding to the key value, ensuring that in a certain cloud service When the provider's access is abnormal, another cloud service provider can continue to complete the operation, which reflects the reliability support of key-value storage and ensures the real-time access and operation of key-value storage.
一种可能的实现方式中,同一个时间段内,只能有一个计算机设备向第一云服务商和第二云服务商发送目标对象。示例性的,可以是只由固定的计算机设备更新得到目标对象,或者是定义不同的时间段内由预设的计算机设备更新得到目标对象,然后向第一云服务商和第二云服务商发送目标对象,可以理解的是,实际情况中可以根据具体需求确定,具体此处不做限定。能够确保云服务提供商具备的对象的实时性以及准确性。In a possible implementation manner, only one computer device can send the target object to the first cloud service provider and the second cloud service provider in the same time period. Exemplarily, the target object may only be updated by a fixed computer device, or the target object may be updated by a preset computer device within a defined period of time, and then sent to the first cloud service provider and the second cloud service provider It can be understood that the target object can be determined according to specific needs in actual situations, and is not specifically limited here. It can ensure the real-time and accuracy of the objects provided by the cloud service provider.
一种可能的实现方式中,第一云服务商或第二云服务商通过至少一个第三关键值确定第三关键值对应的第三目标值,并向对应的第一计算机设备和/或第二计算机设备发送第三目标值,其中第三关键值由第一计算机设备和/或第二计算机设备向第一云服务商或第二云服务商发送。示例性的,请参阅图10b,图10b为本申请实施例提供的应用场景的另一个示意图,其中,第一计算机设备以及第二计算机设备从第一云服务商和/或第二云服务商查询键值。可以理解的是,实际情况中,还可以是三个或多个计算机设备从第一云服务商或第二云服务商查询键值,查询键值的计算机设备的数量具体此处不做限定。多个计算机设备从云服务提供商查询键值能够适应广泛的网络,提供工作效率。In a possible implementation manner, the first cloud service provider or the second cloud service provider determines the third target value corresponding to the third key value through at least one third key value, and sends the corresponding first computer device and/or the second The second computer device sends the third target value, wherein the third key value is sent by the first computer device and/or the second computer device to the first cloud service provider or the second cloud service provider. For example, please refer to FIG. 10b. FIG. 10b is another schematic diagram of the application scenario provided by the embodiment of the present application, in which the first computer device and the second computer device receive from the first cloud service provider and/or the second cloud service provider Query key value. It can be understood that, in actual situations, three or more computer devices may query the key value from the first cloud service provider or the second cloud service provider, and the number of computer devices querying the key value is not specifically limited here. Multiple computer devices querying key values from cloud service providers can adapt to a wide range of networks and improve work efficiency.
在本申请实施例中,通过键值获取第一对象,并得到目标对象,向具备第一对象的不同云服务提供商发送目标对象,以确保不同云服务提供商具备相同的对象,能为相同的键值提供对应的操作,解决了云服务提供键值存储的可靠性问题。且减少了跨云服务提供商提供键值存储可靠性的运维成本。在其中访问某个云服务提供商异常的情况下,切换为另一个云服务提供商完成键值对应的操作,能实时的提供键值存储的服务,保证业务的正常进行,提高工作效率。In the embodiment of this application, the first object is obtained through the key value, and the target object is obtained, and the target object is sent to different cloud service providers with the first object, so as to ensure that different cloud service providers have the same object and can be the same The key-value provides corresponding operations, which solves the reliability problem of key-value storage provided by cloud services. And it reduces the operation and maintenance cost of providing key-value storage reliability across cloud service providers. In the case of an abnormal access to a certain cloud service provider, switch to another cloud service provider to complete the operation corresponding to the key value, and provide real-time key-value storage services to ensure the normal operation of the business and improve work efficiency.
为了实现上述本申请实施例提供的方法中的各功能,数据处理系统均可以包括硬件结构和/或软件模块,以硬件结构、软件模块、或硬件结构加软件模块的形式来实现上述各功能。上述各功能中的某个功能以硬件结构、软件模块、还是硬件结构加软件模块的方式来执行,取决于技术方案的特定应用和设计约束条件。In order to realize the various functions in the method provided by the above embodiments of the present application, the data processing system may include a hardware structure and/or a software module, and realize the above-mentioned functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether one of the above-mentioned functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
如图11所示,本申请实施例还提供了一种数据访问系统。具体请参阅图11,图11为本申请实施例提供的数据访问系统的的一个架构示意图。一种可能的实现中,该数据访问系统可以包括执行上述方法实施例中的方法/操作/步骤/动作所一一对应的模块或单元,该单元可以是硬件电路,也可以是软件,也可以是硬件电路结合软件实现。一种可能的实现中,该数据访问系统可以包括:第一计算机设备1101、第一云服务商1102以及第二云服务商1103。第一计算机设备1101可以用于执行如上述方法实施例中基于键值获取第一对象以及得到目标对象的步骤,以及向第一云服务商和第二云服务商发送目标对象的步骤,第一云服务商1102以及第二云服务商1103可以用于执行如上述方法实施例中基于目标对象执行键值对应的操作的步骤。As shown in FIG. 11 , the embodiment of the present application also provides a data access system. Please refer to FIG. 11 for details. FIG. 11 is a schematic diagram of the architecture of the data access system provided by the embodiment of the present application. In a possible implementation, the data access system may include one-to-one modules or units that execute the methods/operations/steps/actions in the above method embodiments, and the units may be hardware circuits, software, or It is realized by combining hardware circuit and software. In a possible implementation, the data access system may include: a first computer device 1101 , a first cloud service provider 1102 and a second cloud service provider 1103 . The first computer device 1101 can be used to perform the steps of obtaining the first object based on the key value and obtaining the target object as in the above method embodiment, and the step of sending the target object to the first cloud service provider and the second cloud service provider, the first The cloud service provider 1102 and the second cloud service provider 1103 may be used to perform the step of performing key-value correspondence based on the target object in the above method embodiment.
另一种可能的设计中,数据访问系统还包括第二计算机设备1104,其中,第一云服务商1102和/或第二云服务商1103还用于通过第三关键值确定第三关键值对应的第三目标值,并 向对应的第一计算机设备1101和/或第二计算机设备1104发送第三目标值,该第三关键值由第一计算机设备和/或第二计算机设备1104向第一云服务商或第二云服务商发送。In another possible design, the data access system further includes a second computer device 1104, wherein the first cloud service provider 1102 and/or the second cloud service provider 1103 are further configured to use the third key value to determine the corresponding and send the third target value to the corresponding first computer device 1101 and/or the second computer device 1104, and the third key value is sent to the first computer device 1104 by the first computer device and/or the second computer device 1104 Cloud service provider or second cloud service provider.
在本申请实施例中,第一计算机设备1101基于键值获取第一对象,并根据键值以及第一对象得到目标对象,并向第一云服务商1102以及第二云服务商1103发送目标对象,且第一云服务商和第二云服务商为具备第一对象的云服务提供商,然后第一云服务商1102以及第二云服务商1103基于目标对象执行键值对应的操作。其中,不同云服务提供商具备相同的对象,能为相同的键值完成对应操作的执行,解决了云服务提供键值存储的可靠性问题。且减少了跨云服务提供商提供键值存储可靠性的运维成本。In the embodiment of this application, the first computer device 1101 obtains the first object based on the key value, obtains the target object according to the key value and the first object, and sends the target object to the first cloud service provider 1102 and the second cloud service provider 1103 , and the first cloud service provider and the second cloud service provider are cloud service providers with the first object, then the first cloud service provider 1102 and the second cloud service provider 1103 perform key-value corresponding operations based on the target object. Among them, different cloud service providers have the same object, and can complete the execution of corresponding operations for the same key value, which solves the reliability problem of cloud service providing key value storage. And it reduces the operation and maintenance cost of providing key-value storage reliability across cloud service providers.
在其他可能的设计中,上述第一计算机设备1101、第一云服务商1102、第二云服务商1103或第二计算机设备1104可以一一对应的执行上述方法实施例中对应的各种可能的实现方式中的方法/操作/步骤/动作。In other possible designs, the first computer device 1101, the first cloud service provider 1102, the second cloud service provider 1103, or the second computer device 1104 can execute various possible corresponding methods in the above method embodiments one by one. A method/operation/step/action in an implementation.
在一种可能的设计中,上述第一计算机设备1101,还用于在第一云服务商1102访问异常的情况下,通过第二云服务商上的第一对象和/或目标对象执行键值对应的操作。In a possible design, the above-mentioned first computer device 1101 is also used to execute the key-value corresponding operation.
在一种可能的设计中,上述第一计算机设备1101,具体用于基于键值以及第一对象获取第二对象;In a possible design, the above-mentioned first computer device 1101 is specifically configured to obtain the second object based on the key value and the first object;
还具体用于基于键值对第二对象更新得到目标对象。It is also specifically used to update the second object based on the key value to obtain the target object.
在一种可能的设计中,上述第一计算机设备1101,还用于从第一云服务商和第二云服务商分别获取至少一个第一关键值对应的第一目标值,以及至少一个第二关键值对应的第二目标值,该第一关键值以及第二关键值属于待查询目标值的关键值。In a possible design, the above-mentioned first computer device 1101 is further configured to respectively obtain at least one first target value corresponding to the first key value and at least one second key value from the first cloud service provider and the second cloud service provider. The second target value corresponding to the key value, the first key value and the second key value are key values of the target value to be queried.
在一种可能的设计中,键值至少包括以下任意一种:In a possible design, the key value includes at least any of the following:
待修改的键值、待插入的键值或待删除的键值。The key-value to be modified, the key-value to be inserted, or the key-value to be deleted.
本申请上述的各种设计的有益效果请参考上述图2中方法实施例中一一对应的各种实现方式的有益效果,具体此处不再赘述。For the beneficial effects of the above-mentioned various designs in the present application, please refer to the beneficial effects of the one-to-one corresponding various implementation modes in the above-mentioned method embodiment in FIG.
需要说明的是,图11对应实施例所述的数据访问系统中各模块/单元之间的信息交互、执行过程等内容,与本申请中图2对应的方法实施例基于同一构思,具体内容可参见本申请前述所示的方法实施例中的叙述,具体此处不再赘述。It should be noted that Figure 11 corresponds to the information interaction and execution process between modules/units in the data access system described in the embodiment, and the method embodiment corresponding to Figure 2 in this application is based on the same idea, and the specific content can be Refer to the descriptions in the foregoing method embodiments of the present application, and details are not repeated here.
接下来介绍本申请实施例提供的一种信息处理装置,请参阅图12,图12为本申请实施例提供的信息处理装置的一个结构示意图,信息处理装置1200上可以为图11中对应实施例中对应第一计算机设备、第二计算机设备、第一云服务商或第二云服务商,用于实现图11中第一计算机设备、第二计算机设备、第一云服务商或第二云服务商的功能,具体的,信息处理装置1200由一个或多个服务器实现,信息处理装置1200可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)1222(例如,一个或一个以上中央处理器)和存储器1232,一个或一个以上的存储介质1230(例如一个或一个以上存储设备)。其中,存储器1232和存储介质1230可以是短暂存储或持久存储。存储在存储介质1230的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对信息处理装置1200中的一系列指令操作。更进一步地,中央处理器1222可以设置为与存储介质1230通信,在信息处理装置1200上执行存储介质1230中的一系列指令操作。Next, an information processing device provided by the embodiment of the present application is introduced. Please refer to FIG. 12. FIG. 12 is a schematic structural diagram of the information processing device provided by the embodiment of the present application. The information processing device 1200 may be the corresponding embodiment in FIG. 11 Corresponding to the first computer equipment, the second computer equipment, the first cloud service provider or the second cloud service provider, for realizing the first computer equipment, the second computer equipment, the first cloud service provider or the second cloud service in Fig. 11 Specifically, the information processing device 1200 is implemented by one or more servers, and the information processing device 1200 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (central processing units, CPU) 1222 (eg, one or more central processing units) and memory 1232, and one or more storage media 1230 (eg, one or more storage devices). Wherein, the memory 1232 and the storage medium 1230 may be temporary storage or persistent storage. The program stored in the storage medium 1230 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations for the information processing device 1200 . Furthermore, the central processing unit 1222 may be configured to communicate with the storage medium 1230 , and execute a series of instruction operations in the storage medium 1230 on the information processing device 1200 .
信息处理装置1200还可以包括一个或一个以上电源1226,一个或一个以上有线或无线网络接口1250,和/或,一个或一个以上输入输出接口1258。The information processing device 1200 may also include one or more power sources 1226 , one or more wired or wireless network interfaces 1250 , and/or, one or more input/output interfaces 1258 .
本申请实施例中,中央处理器1222,用于执行图2对应实施例中的方法。例如,中央处理器1222可以用于:基于键值获取第一对象,然后基于键值以及第一对象得到目标对象,再 向第一云服务商和第二云服务商发送目标对象,以使得第一云服务商和第二云服务商基于目标对象执行键值对应的操作,该第一云服务商和第二云服务商为具备第一对象的云服务提供商。In the embodiment of the present application, the central processing unit 1222 is configured to execute the method in the embodiment corresponding to FIG. 2 . For example, the central processing unit 1222 can be configured to: obtain the first object based on the key value, then obtain the target object based on the key value and the first object, and then send the target object to the first cloud service provider and the second cloud service provider, so that the second cloud service provider A cloud service provider and a second cloud service provider perform key-value corresponding operations based on the target object, and the first cloud service provider and the second cloud service provider are cloud service providers with the first object.
或中央处理器1222可以用于:获取目标对象以及基于第一对象和/或目标对象完成键值对应操作的执行。Or the central processing unit 1222 may be configured to: acquire a target object and execute key-value corresponding operations based on the first object and/or the target object.
或中央处理器1222可以用于:向第一云服务商或第二云服务商发送第三关键值获取第三关键值对应的目标值。Or the central processing unit 1222 may be configured to: send the third key value to the first cloud service provider or the second cloud service provider to obtain a target value corresponding to the third key value.
需要说明的是,中央处理器1222还可以用于执行与本申请中图2对应的方法实施例中任意一个步骤,具体内容可参见本申请前述所示的方法实施例中的叙述,此处不再赘述。It should be noted that the central processing unit 1222 can also be used to execute any step in the method embodiment corresponding to FIG. 2 in this application. Let me repeat.
本申请实施例还提供一种计算机可读存储介质,包括计算机可读指令,当计算机可读指令在计算机上运行时,使得计算机执行如前述方法实施例所示任一项实现方式。The embodiments of the present application also provide a computer-readable storage medium, including computer-readable instructions, which, when the computer-readable instructions are run on a computer, cause the computer to execute any one of the implementation manners shown in the foregoing method embodiments.
本申请实施例还提供的一种计算机程序产品,计算机程序产品包括计算机程序或指令,当计算机程序或指令在计算机上运行时,使得计算机执行如前述方法实施例所示任一项实现方式。An embodiment of the present application also provides a computer program product, the computer program product includes a computer program or an instruction, and when the computer program or instruction is run on a computer, the computer is made to execute any one of the implementation manners shown in the foregoing method embodiments.
本申请还提供一种芯片或芯片系统,该芯片可包括处理器。该芯片还可包括存储器(或存储模块)和/或收发器(或通信模块),或者,该芯片与存储器(或存储模块)和/或收发器(或通信模块)耦合,其中,收发器(或通信模块)可用于支持该芯片进行有线和/或无线通信,存储器(或存储模块)可用于存储程序或一组指令,该处理器调用该程序或该组指令可用于实现上述方法实施例、方法实施例的任意一种可能的实现方式中由终端或者网络设备执行的操作。该芯片系统可包括以上芯片,也可以包含上述芯片和其他分立器件,如存储器(或存储模块)和/或收发器(或通信模块)。The present application also provides a chip or a chip system, and the chip may include a processor. The chip may also include memory (or storage module) and/or transceiver (or communication module), or, the chip is coupled with memory (or storage module) and/or transceiver (or communication module), wherein the transceiver ( or communication module) can be used to support the chip for wired and/or wireless communication, the memory (or storage module) can be used to store a program or a set of instructions, and the processor calls the program or the set of instructions can be used to implement the above method embodiments, An operation performed by a terminal or a network device in any possible implementation manner of the method embodiment. The system-on-a-chip may include the above-mentioned chips, and may also include the above-mentioned chips and other discrete devices, such as memory (or storage module) and/or transceiver (or communication module).
另外需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本申请提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。In addition, it should be noted that the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be A physical unit can be located in one place, or it can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the device embodiments provided in the present application, the connection relationship between the modules indicates that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本申请而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,训练设备,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general-purpose hardware, and of course it can also be realized by special hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, Special components, etc. to achieve. In general, all functions completed by computer programs can be easily realized by corresponding hardware, and the specific hardware structure used to realize the same function can also be varied, such as analog circuits, digital circuits or special-purpose circuit etc. However, for this application, software program implementation is a better implementation mode in most cases. Based on this understanding, the essence of the technical solution of this application or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a readable storage medium, such as a floppy disk of a computer , U disk, mobile hard disk, read only memory (read only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk, etc., including several instructions to make a computer device (which can be a personal A computer, a training device, or a network device, etc.) executes the methods described in various embodiments of the present application.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用 计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、训练设备或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、训练设备或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的训练设备、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,高密度数字视频光盘(digital video disc,DVD))、或者半导体介质(例如,固态硬盘(solid state drive,SSD))等。The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transferred from a website, computer, training device, or data The center transmits to another website site, computer, training device or data center via wired (eg coaxial cable, optical fiber, digital subscriber line) or wireless (eg infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be stored by a computer, or a data storage device such as a training device or a data center integrated with one or more available media. The available medium may be a magnetic medium, (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a high-density digital video disc (digital video disc, DVD)), or a semiconductor medium (for example, a solid state drive (solid state drive) , SSD)) etc.

Claims (14)

  1. 一种数据访问方法,其特征在于,包括:A data access method, characterized in that, comprising:
    基于键值获取第一对象,所述第一对象用于支持键值对应的操作;Acquiring a first object based on the key value, where the first object is used to support operations corresponding to the key value;
    基于所述键值以及所述第一对象得到目标对象;obtaining a target object based on the key value and the first object;
    向第一云服务商和第二云服务商发送所述目标对象,以使得所述第一云服务商和所述第二云服务商基于所述目标对象完成所述键值对应操作的执行,所述第一云服务商和所述第二云服务商为具备所述第一对象的云服务提供商。sending the target object to the first cloud service provider and the second cloud service provider, so that the first cloud service provider and the second cloud service provider complete the execution of the key-value corresponding operation based on the target object, The first cloud service provider and the second cloud service provider are cloud service providers with the first object.
  2. 根据权利要求1所述的方法,其特征在于,在所述第一云服务商访问异常的情况下,所述方法还包括:The method according to claim 1, wherein in the case of an abnormal access to the first cloud service provider, the method further comprises:
    通过所述第二云服务商上的所述第一对象和/或所述目标对象完成所述键值对应操作的执行。The execution of the key-value corresponding operation is completed through the first object and/or the target object on the second cloud service provider.
  3. 根据权利要求1或2中任一项所述的方法,其特征在于,所述基于所述键值以及所述第一对象得到目标对象包括:The method according to any one of claims 1 or 2, wherein said obtaining the target object based on said key value and said first object comprises:
    基于所述键值以及所述第一对象获取第二对象;obtaining a second object based on the key value and the first object;
    基于所述键值对所述第二对象更新得到所述目标对象。updating the second object based on the key value to obtain the target object.
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-3, further comprising:
    从所述第一云服务商以及所述第二云服务商分别获取至少一个第一关键值对应的第一目标值,以及至少一个第二关键值对应的第二目标值,所述第一关键值以及所述第二关键值属于待查询目标值的关键值。Obtain a first target value corresponding to at least one first key value and a second target value corresponding to at least one second key value from the first cloud service provider and the second cloud service provider respectively, and the first key value and the second key value belong to the key value of the target value to be queried.
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述键值至少包括以下任意一种:The method according to any one of claims 1-4, wherein the key value includes at least any of the following:
    待修改的键值、待插入的键值或待删除的键值。The key-value to be modified, the key-value to be inserted, or the key-value to be deleted.
  6. 一种数据访问系统,其特征在于,包括:A data access system, characterized in that it comprises:
    第一计算机设备、第一云服务商以及第二云服务商,所述第一云服务商以及所述第二云服务商为具备第一对象的云服务提供商,所述第一对象用于支持键值对应的操作;The first computer equipment, the first cloud service provider, and the second cloud service provider, the first cloud service provider and the second cloud service provider are cloud service providers with a first object, and the first object is used for Support key-value corresponding operations;
    所述第一计算机设备,用于基于所述键值从所述第一云服务商或第二云服务商获取所述第一对象;The first computer device is configured to obtain the first object from the first cloud service provider or the second cloud service provider based on the key value;
    所述第一计算机设备,还用于基于所述键值以及所述第一对象得到目标对象;The first computer device is further configured to obtain a target object based on the key value and the first object;
    所述第一计算机设备,还用于向所述第一云服务商以及所述第二云服务商发送所述目标对象;The first computer device is further configured to send the target object to the first cloud service provider and the second cloud service provider;
    所述第一云服务商以及所述第二云服务商,用于基于所述目标对象完成所述键值对应操作的执行。The first cloud service provider and the second cloud service provider are configured to execute the key-value corresponding operation based on the target object.
  7. 根据权利要求6所述的数据访问系统,其特征在于,在所述第一云服务商访问异常的情况下,所述第一计算机设备,还用于通过所述第二云服务商上的所述第一对象和/或目标对象完成所述键值对应操作的执行。The data access system according to claim 6, wherein when the access of the first cloud service provider is abnormal, the first computer device is further configured to The first object and/or the target object completes the execution of the operation corresponding to the key value.
  8. 根据权利要求6或7所述的数据访问系统,其特征在于,所述第一计算机设备,具体用于基于所述键值以及所述第一对象获取第二对象;The data access system according to claim 6 or 7, wherein the first computer device is specifically configured to acquire a second object based on the key value and the first object;
    并具体用于基于所述键值对所述第二对象更新得到所述目标对象。And it is specifically used to update the second object based on the key value to obtain the target object.
  9. 根据权利要求6-8中任一项所述的数据访问系统,其特征在于,所述第一计算机设备,还用于从所述第一云服务商以及所述第二云服务商分别获取至少一个第一关键值对应的第一目标值,以及至少一个第二关键值对应的第二目标值,所述第一关键值以及所述第二关键值 属于待查询目标值的关键值。The data access system according to any one of claims 6-8, wherein the first computer device is further configured to obtain at least A first target value corresponding to a first key value, and a second target value corresponding to at least one second key value, the first key value and the second key value are key values of the target value to be queried.
  10. 根据权利要求6-9中任一项所述的数据访问系统,其特征在于,所述数据访问系统还包括第二计算机设备,其中,所述第一云服务商或所述第二云服务商,还用于通过至少一个第三关键值确定所述第三关键值对应的第三目标值,并向所述第一计算机设备和/或所述第二计算机设备发送所述第三目标值,所述第三关键值由所述第一计算机设备和/或所述第二计算机设备向所述第一云服务商或所述第二云服务商发送。The data access system according to any one of claims 6-9, wherein the data access system further comprises a second computer device, wherein the first cloud service provider or the second cloud service provider is further configured to use at least one third key value to determine a third target value corresponding to the third key value, and send the third target value to the first computer device and/or the second computer device, The third key value is sent by the first computer device and/or the second computer device to the first cloud service provider or the second cloud service provider.
  11. 根据权利要求6-10中任一项所述的数据访问系统,其特征在于,所述键值至少包括以下任意一种:The data access system according to any one of claims 6-10, wherein the key value includes at least any of the following:
    待修改的键值、待插入的键值或待删除的键值。The key-value to be modified, the key-value to be inserted, or the key-value to be deleted.
  12. 一种数据访问系统,其特征在于,包括:处理器,所述处理器与存储器耦合,所述存储器存储指令,所述处理器用于执行所述指令,使得所述数据访问系统执行权利要求1至5中任意一项所述的方法。A data access system, characterized by comprising: a processor, the processor is coupled to a memory, and the memory stores instructions, and the processor is used to execute the instructions, so that the data access system performs claims 1 to The method described in any one of 5.
  13. 一种计算机可读存储介质,包括计算机可读指令,其特征在于,当所述计算机可读指令在计算机上运行时,使得如权利要求1-5中任一项所述的方法被执行。A computer-readable storage medium, comprising computer-readable instructions, characterized in that, when the computer-readable instructions are run on a computer, the method according to any one of claims 1-5 is executed.
  14. 一种计算机程序产品,包括计算机可读指令,其特征在于,当所述计算机可读指令在计算机上运行时,使得如权利要求1-5中任一项所述的方法被执行。A computer program product, comprising computer-readable instructions, characterized in that, when the computer-readable instructions are run on a computer, the method according to any one of claims 1-5 is executed.
PCT/CN2023/071628 2022-01-27 2023-01-10 Data access method and data access system thereof WO2023143061A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210103374.0 2022-01-27
CN202210103374.0A CN116561203A (en) 2022-01-27 2022-01-27 Data access method and data access system thereof

Publications (1)

Publication Number Publication Date
WO2023143061A1 true WO2023143061A1 (en) 2023-08-03

Family

ID=87470433

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/071628 WO2023143061A1 (en) 2022-01-27 2023-01-10 Data access method and data access system thereof

Country Status (2)

Country Link
CN (1) CN116561203A (en)
WO (1) WO2023143061A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102882927A (en) * 2012-08-29 2013-01-16 华南理工大学 Cloud storage data synchronizing framework and implementing method thereof
CN103268318A (en) * 2013-04-16 2013-08-28 华中科技大学 Distributed key value database system with strong consistency and read-write method thereof
US10291488B1 (en) * 2012-09-27 2019-05-14 EMC IP Holding Company LLC Workload management in multi cloud environment
CN113704261A (en) * 2021-08-26 2021-11-26 平凯星辰(北京)科技有限公司 Key value storage system based on cloud storage

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102882927A (en) * 2012-08-29 2013-01-16 华南理工大学 Cloud storage data synchronizing framework and implementing method thereof
US10291488B1 (en) * 2012-09-27 2019-05-14 EMC IP Holding Company LLC Workload management in multi cloud environment
CN103268318A (en) * 2013-04-16 2013-08-28 华中科技大学 Distributed key value database system with strong consistency and read-write method thereof
CN113704261A (en) * 2021-08-26 2021-11-26 平凯星辰(北京)科技有限公司 Key value storage system based on cloud storage

Also Published As

Publication number Publication date
CN116561203A (en) 2023-08-08

Similar Documents

Publication Publication Date Title
US20230014098A1 (en) Method and system for accelerating reading of information of field replace unit, device, and medium
CN110413845B (en) Resource storage method and device based on Internet of things operating system
CN103246659A (en) Method and device for key value data query
CN107103011B (en) Method and device for realizing terminal data search
CN110765165B (en) Method, device and system for synchronously processing cross-system data
US20230030856A1 (en) Distributed table storage processing method, device and system
JP2022550401A (en) Data upload method, system, device and electronic device
WO2024041022A1 (en) Database table alteration method and apparatus, device and storage medium
CN111444278A (en) Data synchronization method and device and transfer server
WO2023143061A1 (en) Data access method and data access system thereof
US20230045914A1 (en) Method and apparatus for controlling device in internet of things, and gateway device and storage medium
WO2023029485A1 (en) Data processing method and apparatus, computer device, and computer-readable storage medium
WO2022206170A1 (en) Data processing method, server and system
CN113051244B (en) Data access method and device, and data acquisition method and device
US10114864B1 (en) List element query support and processing
CN115374078A (en) Data storage and reading system and working method thereof
CN113742050B (en) Method, device, computing equipment and storage medium for operating data object
EP4086781A1 (en) Data reading method and terminal
CN113468275A (en) Data importing method and device of graph database, storage medium and electronic equipment
CN112231405A (en) Data storage device
CN110968267A (en) Data management method, device, server and system
CN116594848B (en) Task monitoring method, device, equipment, terminal equipment and storage medium
CN112764666B (en) Method, apparatus and computer program product for storage management
CN116561106B (en) Configuration item data management method and system
CN114866594B (en) Device connection management method, device, system, server and readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23745944

Country of ref document: EP

Kind code of ref document: A1