Method for processing oracle region cache electronic device, and storage medium
AssigneeBeijing Baidu Netcom Science Technology Co., Ltd.
InventorsChenchang Zhu, Jialin Feng
Life of this patent
Estimating the term…
Abstract
Provided is a method for processing an oracle region cache, an electronic device and a storage medium, relating to the field of data processing technology, and in particular to the fields of big data, cloud computing, distributed database, intelligent search and other technologies. The method includes: obtaining a benefit parameter of a region to be processed, wherein the benefit parameter is used to represent a difference between benefit and cost of setting the region to be processed in the oracle region cache; and selecting the region to be processed to update the oracle region cache when the benefit parameter of the region to be processed meets a target condition.
Claims20
A method for processing an Oracle Region Cache (OR cache), applicable to cache elimination of a distributed database, comprising:
- obtaining a benefit parameter of each region to be processed in a set of regions to be screened, comprising:
- calculating a benefit of setting the region to be processed in the OR cache, based on a first-type parameter of the region to be processed;
- wherein the first-type parameter reflects that the region to be processed is valuable to set in the OR cache, and comprises at least one of selectivity, reading frequency, or data region size;
- calculating a cost of setting the region to be processed in the OR cache, based on a second-type parameter of the region to be processed;
- wherein the second-type parameter reflects resource cost required for setting the region to be processed in the OR cache, and comprises location data, performance evaluation and network evaluation;
- wherein the location data is a number between 0 and 1, is a ratio of amount of data in the region to be processed that is stored in a local machine to total amount of data in the region to be processed, and is positively correlated with the amount of the data in the region to be processed that is stored in the local machine and negatively correlated with data that needs to be read over a network;
- the performance evaluation is a transmission flow required to obtain the data in the region to be processed that is stored in the local machine;
- and the network evaluation is transmission flow required to obtain data of the region to be processed from other devices;
- and
- determining the benefit parameter of the region to be processed, based on the benefit of setting the region to be processed in the OR cache and the cost of setting the region to be processed in the OR cache, wherein the benefit parameter is used to represent a difference between the benefit and cost of setting the region to be processed in the OR cache;
- and
- setting a target region to be processed in the OR cache, to update the OR cache, wherein a benefit parameter of the target region to be processed is a maximum value among benefit parameters of respective regions to be processed in the set of regions to be screened.
An electronic device, comprising:
- at least one processor;
- and
- a memory connected in communication with the at least one processor;
- wherein the memory stores an instruction executable by the at least one processor, and the instruction, when executed by the at least one processor, enables the at least one processor to execute:
- obtaining a benefit parameter of each region to be processed in a set of regions to be screened, by:
- calculating a benefit of setting the region to be processed in the OR cache, based on a first-type parameter of the region to be processed, wherein the first-type parameter reflects that the region to be processed is valuable to set in the OR cache, and comprises at least one of selectivity, reading frequency, or data region size;
- calculating a cost of setting the region to be processed in the OR cache, based on a second-type parameter of the region to be processed;
- wherein the second-type parameter reflects resource cost required for setting the region to be processed in the OR cache, and comprises location data, performance evaluation and network evaluation;
- wherein the location data is a number between 0 and 1, is a ratio of amount of data in the region to be processed that is stored in a local machine to total amount of data in the region to be processed, and is positively correlated with the amount of the data in the region to be processed that is stored in the local machine and negatively correlated with data that needs to be read over a network;
- the performance evaluation is a transmission flow required to obtain the data in the region to be processed that is stored in the local machine;
- and the network evaluation is transmission flow required to obtain data of the region to be processed from other devices;
- and
- determining the benefit parameter of the region to be processed, based on the benefit of setting the region to be processed in the OR cache and the cost of setting the region to be processed in the OR cache, wherein the benefit parameter is used to represent a difference between the benefit and cost of setting the region to be processed in the OR cache;
- and
- setting a target region to be processed in the OR cache, to update the OR cache, wherein a benefit parameter of the target region to be processed is a maximum value among benefit parameters of respective regions to be processed.
A non-transitory computer-readable storage medium storing a computer instruction thereon, wherein the computer instruction is used to cause a computer to execute:
- obtaining a benefit parameter of each region to be processed in a set of regions to be screened, by:
- calculating a benefit of setting the region to be processed in the OR cache, based on a first-type parameter of the region to be processed;
- wherein the first-type parameter reflects that the region to be processed is valuable to set in the OR cache, and comprises at least one of selectivity, reading frequency, or data region size;
- calculating a cost of setting the region to be processed in the OR cache, based on a second-type parameter of the region to be processed;
- wherein the second-type parameter reflects resource cost required for setting the region to be processed in the OR cache, and comprises location data, performance evaluation and network evaluation;
- wherein the location data is a number between 0 and 1, is a ratio of amount of data in the region to be processed that is stored in a local machine to total amount of data in the region to be processed, and is positively correlated with the amount of the data in the region to be processed that is stored in the local machine and negatively correlated with data that needs to be read over a network;
- the performance evaluation is a transmission flow required to obtain the data in the region to be processed that is stored in the local machine;
- and the network evaluation is transmission flow required to obtain data of the region to be processed from other devices;
- and
- determining the benefit parameter of the region to be processed, based on the benefit of setting the region to be processed in the OR cache and the cost of setting the region to be processed in the OR cache, wherein the benefit parameter is used to represent a difference between the benefit and cost of setting the region to be processed in the OR cache;
- and
- setting a target region to be processed in the OR cache, to update the OR cache, wherein a benefit parameter of the target region to be processed is a maximum value among benefit parameters of respective regions to be processed in the set of regions to be screened.
Dependencies are inferred from the claim text.