Method and device for reading object, electronic equipment and readable medium
By storing massive objects in multi-level object sets of different dimensions, and choosing a set of high object attributes prior to reading, the problem of difficulty in globally and efficiently reading large-scale data in the prior art is solved, and more accurate data basic support is achieved.
Patent Information
- Application Number
- CN202311799508.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2025-06-27
AI Technical Summary
The existing technology is difficult to efficiently read objects from the global when facing large-scale data (such as 10 billion videos), resulting in the inaccurate data basis of subsequent operations (such as object recommendations).
By storing massive objects in multi-level object sets with different dimensions, the objects are read from the first-level object set of high-object properties first-level object sets, and remediate readings are ensured to the reading of global high-object properties when failure.
It realizes object reading with global high object attributes in large-scale data scenarios, ensuring that the data foundation of subsequent operations (such as object recommendations) is more accurate and reliable.
Smart Images

Figure CN120216541A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing, and particularly to a method, apparatus, electronic device, and readable medium for reading objects. Background Art
[0002] From a large number of generated objects, screening and reading out some objects that are valuable for subsequent operations (such as object recommendation) can be referred to as object recall or object reading. In order to provide a good data basis for subsequent operations of object recall, a variety of recall algorithms and recall models have emerged. In the current object recall solutions, in the face of scenarios with a large amount of data (such as tens of billions of videos), only local object recall can be performed, and global object reading cannot be achieved. Summary of the Invention
[0003] To solve the above technical problems, the present application provides a method, apparatus, electronic device, and readable medium for reading objects, which can ensure global reading of objects with high object attributes on the basis of hierarchical storage of a large number of objects.
[0004] To achieve the above object, the technical solutions provided by the present application are as follows:
[0005] In a first aspect, the present application provides a method for reading objects, including:
[0006] In response to a task of reading an object, obtaining a first object from first-level object sets corresponding to different dimensions respectively, where each first-level object set corresponding to each dimension in the different dimensions is used to store objects whose object attributes in this dimension meet a first condition, and the object attributes of an object in this dimension are determined based on the attribute value of the object in this dimension;
[0007] If the operation of obtaining a first object from the first-level object set corresponding to any one of the different dimensions fails, obtaining a second object from the i-level object set corresponding to this dimension, where i is an integer greater than or equal to 2, and each i-level object set corresponding to each dimension in the different dimensions is used to store objects whose object attributes in this dimension meet the i-th condition, and the object attributes indicated by the (i - 1)-th condition corresponding to the same dimension are higher than the object attributes indicated by the i-th condition;
[0008] Determining a reading result corresponding to the task of reading the object according to the first object and the second object.
[0009] In some implementation manners, the determining a reading result corresponding to the task of reading the object according to the first object and the second object includes:
[0010] If the operations of obtaining the first object from the first-level object sets corresponding to different dimensions are all successful, then determine the reading result corresponding to the task of reading the object according to the first object.
[0011] In some implementation manners, obtaining the second object from the i-th level object set corresponding to this dimension includes:
[0012] Obtain the second object from the second-level object set corresponding to this dimension;
[0013] Or,
[0014] If the operation of obtaining the second object from the second-level object set corresponding to this dimension fails, then obtain the second object from the third object set.
[0015] In some implementation manners, the method further includes:
[0016] In response to the save operation of the third object, based on the attribute value of the target dimension of the third object among the different dimensions, execute the following save process:
[0017] If the attribute value of the third object in the target dimension satisfies the first condition of the first-level object set corresponding to the target dimension, then save the third object in the first-level object set corresponding to the target dimension;
[0018] If the attribute value of the third object in the target dimension does not satisfy the first condition of the first-level object set corresponding to the target dimension, then randomly determine a first object subset for the third object in the second-level object set corresponding to the target dimension;
[0019] If the attribute value of the third object in the target dimension satisfies the second condition corresponding to the first object subset, then save the third object in the first object subset;
[0020] If the attribute value of the third object in the target dimension does not satisfy the second condition corresponding to the first object subset and there is no third-level object set corresponding to the target dimension, then save the third object in the candidate resource set;
[0021] Or,
[0022] If the attribute value of the third object in the target dimension does not satisfy the second condition corresponding to the first object subset and there is a third-level object set corresponding to the target dimension, then randomly determine a second object subset for the third object in the third-level object set;
[0023] If the attribute value of the third object in the target dimension satisfies the third condition corresponding to the second object subset, then save the third object in the second object subset;
[0024] If the attribute value of the third object in the target dimension does not satisfy the third condition corresponding to the second object subset, then save the third object in the candidate resource set.
[0025] In some implementation manners, the method further includes:
[0026] If the number of objects saved in the i-th level object set corresponding to any one of the different dimensions is less than the preset quantity threshold, then obtain a fourth object from the candidate resource set, and supplement the fourth object to the i-th level object set corresponding to this dimension.
[0027] In some implementation manners, if the task of reading objects includes the total number of objects to be read, the obtaining first objects from the first-level object sets corresponding to different dimensions respectively includes:
[0028] Respectively obtain the first quantity of objects with the highest object attributes in this dimension from the first-level object sets corresponding to each of the different dimensions as the first objects corresponding to this dimension, where the first quantity is determined based on the total number and the number of dimensions included in the different dimensions.
[0029] In some implementation manners, if the task of reading objects includes the total number of objects to be read, the obtaining second objects from the i-th level object set corresponding to this dimension includes:
[0030] Respectively obtain the second quantity of candidate objects with the highest object attributes in this dimension from multiple object subsets in the i-th level object set corresponding to this dimension, where the product of the second quantity and the number of object subsets included in the multiple object subsets is greater than or equal to the first quantity, and the first quantity is determined based on the total number and the number of dimensions included in the different dimensions;
[0031] Obtain the first quantity of objects with the highest object attributes in this dimension from the candidate objects, and denote them as the second objects.
[0032] In some implementation manners, the method further includes:
[0033] Perform object recommendation based on the reading result;
[0034] Or, perform object transcoding based on the reading result.
[0035] In a second aspect, the present application further provides a device for reading objects, including:
[0036] A first acquisition unit, configured to, in response to a task of reading an object, respectively acquire a first object from first-level object sets corresponding to different dimensions, where each first-level object set corresponding to a dimension among the different dimensions is used to store objects whose object attributes in this dimension meet a first condition, and the object attributes of an object in this dimension are determined based on the attribute value of the object in this dimension;
[0037] A second acquisition unit, configured to, if the operation of acquiring the first object from the first-level object set corresponding to any one of the different dimensions fails, acquire a second object from the i-th level object set corresponding to this dimension, where i is an integer greater than or equal to 2, and each i-th level object set corresponding to a dimension among the different dimensions is used to store objects whose object attributes in this dimension meet an i-th condition, and the object attributes indicated by the (i - 1)-th condition corresponding to the same dimension are higher than the object attributes indicated by the i-th condition;
[0038] A determination unit, configured to determine a reading result corresponding to the task of reading the object according to the first object and the second object.
[0039] In some implementation manners, the determination unit is specifically configured to:
[0040] If the operations of respectively acquiring the first objects from the first-level object sets corresponding to different dimensions are all successful, determine the reading result corresponding to the task of reading the object according to the first object.
[0041] In some implementation manners, the second acquisition unit is specifically configured to:
[0042] Acquire the second object from the second-level object set corresponding to this dimension;
[0043] Or,
[0044] If the operation of acquiring the second object from the second-level object set corresponding to this dimension fails, acquire the second object from a third object set.
[0045] In some implementation manners, the apparatus further includes:
[0046] A saving unit, configured to, in response to a saving operation of a third object, perform the saving of the third object based on the attribute value of the third object in a target dimension among the different dimensions;
[0047] The saving unit includes:
[0048] A first saving subunit, configured to, if the attribute value of the third object in the target dimension meets the first condition of the first-level object set corresponding to the target dimension, save the third object in the first-level object set corresponding to the target dimension;
[0049] A first determination subunit, configured to randomly determine a first object subset for a third object in a second-level object set corresponding to the target dimension if an attribute value of the third object in the target dimension does not meet the first condition of a first-level object set corresponding to the target dimension;
[0050] A second storage subunit, configured to store the third object in the first object subset if the attribute value of the third object in the target dimension meets the second condition corresponding to the first object subset;
[0051] A third storage subunit, configured to store the third object in a candidate resource set if the attribute value of the third object in the target dimension does not meet the second condition corresponding to the first object subset and there is no third-level object set corresponding to the target dimension;
[0052] Or,
[0053] A second determination subunit, configured to randomly determine a second object subset for the third object in the third-level object set corresponding to the target dimension if the attribute value of the third object in the target dimension does not meet the second condition corresponding to the first object subset and there is a third-level object set corresponding to the target dimension;
[0054] A fourth storage subunit, configured to store the third object in the second object subset if the attribute value of the third object in the target dimension meets the third condition corresponding to the second object subset;
[0055] A fifth storage subunit, configured to store the third object in the candidate resource set if the attribute value of the third object in the target dimension does not meet the third condition corresponding to the second object subset.
[0056] In some implementation manners, the apparatus further includes:
[0057] A supplement unit, configured to obtain a fourth object from the candidate resource set and supplement the fourth object to an i-th level object set corresponding to the dimension if the number of objects stored in the i-th level object set corresponding to any one of the different dimensions is less than a preset number threshold.
[0058] In some implementation manners, if the task of reading an object includes the total number of objects to be read, the first obtaining unit is specifically configured to:
[0059] From the set of first-level objects corresponding to each of the different dimensions, respectively obtain the first number of objects with the highest object attributes in that dimension as the first object corresponding to that dimension, where the first number is determined based on the total number and the number of dimensions included in the different dimensions.
[0060] In some implementation manners, if the task of reading objects includes the total number of objects to be read, the second obtaining unit includes:
[0061] A first obtaining subunit, configured to respectively obtain the second number of candidate objects with the highest object attributes in that dimension from multiple object subsets in the set of i-level objects corresponding to that dimension, where the product of the second number and the number of object subsets included in the multiple object subsets is greater than or equal to the first number, and the first number is determined based on the total number and the number of dimensions included in the different dimensions;
[0062] A second obtaining subunit, configured to obtain the first number of objects with the highest object attributes in that dimension from the candidate objects, denoted as the second object.
[0063] In some implementation manners, the apparatus further includes:
[0064] A recommendation unit, configured to perform object recommendation based on the reading result;
[0065] Alternatively, a transcoding unit, configured to perform object transcoding based on the reading result.
[0066] It should be noted that for the specific implementation manner and the achieved technical effect of this apparatus, reference may be made to the relevant descriptions of the method provided in the first aspect or any one implementation manner of the first aspect.
[0067] In a third aspect, the present application further provides an electronic device, where the electronic device includes: a processor and a memory;
[0068] The memory is configured to store instructions or programs;
[0069] The processor is configured to execute the instructions or programs in the memory so that the electronic device executes the method provided in the above-mentioned target aspect or any one implementation manner of the target aspect.
[0070] In a fourth aspect, the present application further provides a readable medium, where instructions or programs are stored in the readable medium, and when the instructions or programs run on a processor, the processor is caused to execute the method provided in the above-mentioned target aspect or any one implementation manner of the target aspect.
[0071] Compared with the prior art, the embodiments of the present application at least have the following advantages:
[0072] In the technical solution provided by this application, objects are respectively stored in multi-level object sets corresponding to different dimensions. The objects stored in the first-level object set corresponding to a certain dimension have higher object attributes in this dimension than the objects stored in the second-level object set corresponding to this dimension. The object attributes of an object in a certain dimension are determined based on the attribute values of the object in the corresponding dimension. If a task of reading an object occurs on the device for reading the object, indicating the implementation of the object reading, then, in response to this task of reading the object, the device for reading the object can first obtain first objects from the first-level object sets corresponding to different dimensions respectively; if the operation of obtaining the first object from the first-level object set corresponding to any one of the different dimensions fails, then obtain a second object from the i-th level object set corresponding to this dimension; then, determine the reading result corresponding to this task of reading the object according to the first object and the second object. In this way, on the basis of storing objects in multi-level object sets according to the object attributes of objects in different dimensions, the object attributes of the objects in the (i-1)-th level object set in the same dimension are higher than those of the objects in the i-th level object set, where i is an integer greater than or equal to 2. Through the object reading mechanism of first reading objects from the object set with higher object attributes and then using the object reading of other object sets with lower object attributes as a remedial measure, it is possible to achieve the object reading with globally high object attributes. Especially in the scenario of a large amount of data (such as tens of billions of videos), the object reading with globally high object attributes is very important. For example, it can ensure that the data basis for subsequent operations (such as object recommendation) of the reading is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] In order to more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0074] Figure 1 It is a schematic diagram of a data storage space adapted to the method provided by the embodiment of this application;
[0075] Figure 2 It is a schematic flow chart of a method for reading an object provided by the embodiment of this application;
[0076] Figure 3 It is an exemplary schematic diagram of a first-level object set provided by the embodiment of this application;
[0077] Figure 4 It is an exemplary schematic diagram of a second-level object set provided by the embodiment of this application;
[0078] Figure 5 The structural schematic diagram of a device 500 for reading an object provided by an embodiment of the present application;
[0079] Figure 6 The structural schematic diagram of an electronic device 600 provided by an embodiment of the present application. Detailed implementation manners
[0080] As the data volume of an object continuously increases, in order to reduce the database to be processed in subsequent operations, some valuable objects can be recalled (i.e., read) from a large number of objects first, and then the recalled objects with a smaller data volume are subjected to subsequent operations, so as to reduce the data volume faced by subsequent operations. Among them, the object can be, for example, a video or an audio, and the subsequent operations can include, for example: recommendation of the object or complex transcoding of the object. Taking the object as a video as an example, the number of videos on a video playback platform is increasing, and the video quality is uneven. In one scenario, in order to improve the playback effect of high-value videos and also considering the limitation of the transcoding ability of the video playback platform, the video playback platform needs to first mine and recall high-value videos from a large number of videos, and then perform complex transcoding on the high-value videos to improve the performance such as clarity and smoothness of the high-value videos, so as to improve the playback effect of playing high-value videos for users; in another scenario, in order to recommend more high-value videos to users, the video playback platform needs to first mine and recall high-value videos from a large number of videos, and then obtain the videos to be recommended for the high-value videos according to a recommendation algorithm or a recommendation model, and recommend the videos to be recommended to users, so as to improve the experience of users using the video playback platform to watch videos. However, the current various recall algorithms or recall models cannot be applied to recall objects globally in a scenario with a large data volume, and thus cannot provide a comprehensive and accurate data basis for subsequent operations such as object transcoding or object recommendation.
[0081] Based on this, an embodiment of the present application provides a method for reading an object. A large number of objects are pre-stored in multi-level object sets corresponding to different dimensions respectively. The objects stored in the (i-1)-th level object set corresponding to a certain dimension have higher object attributes in this dimension than the objects stored in the i-th level object set corresponding to this dimension, where i is an integer greater than or equal to 2. Then, the method for reading an object provided by the embodiment of the present application may include, for example: If a task of reading an object occurs on the device for reading an object, indicating to perform the reading of the object. Then, in response to this task of reading an object, the device for reading an object may first obtain first objects from the first-level object sets corresponding to different dimensions respectively. The first-level object set corresponding to each dimension in different dimensions is used to store objects whose object attributes in this dimension meet the first condition, and the object attributes of an object in this dimension are determined based on the attribute value of the object in this dimension; If the operation of obtaining the first object from the first-level object set corresponding to any one of the different dimensions fails, then obtain a second object from the i-th level object set corresponding to this dimension. The i-th level object set corresponding to each dimension in different dimensions is used to store objects whose object attributes in this dimension meet the i-th condition, and the object attributes indicated by the (i-1)-th condition corresponding to the same dimension are higher than the object attributes indicated by the i-th condition; Then, determine the reading result corresponding to the task of reading an object according to the first object and the second object.
[0082] In this way, in this method, on the basis of storing a large number of objects in multi-level object sets according to the object attributes (which can be understood as object quality) of the objects in different dimensions, through an object reading mechanism that first reads objects from the object set of the higher object attribute level and then uses the object reading of other lower object attribute level object sets as a remedial measure, it is possible to achieve the reading of objects with high global object attributes. Especially in the scenario of a large amount of data (such as tens of billions of videos), the reading of objects with high global object attributes is very important. For example, it can ensure that the data basis for subsequent operations (such as object recommendation) of the reading is more accurate.
[0083] Among them, the level of the object attribute of an object in a certain dimension can be determined by the size of the attribute value of the object in this dimension. The object attribute of an object in a certain dimension can represent the quality of the object in this dimension. Here, the "quality" can be understood as the popularity or the degree of attention. In one case, the larger the attribute value of the object in a dimension, the higher the object attribute of the object in this dimension. For example, the larger the attribute value of a video in the dimension of the number of play times, the more popular the video is, that is, the higher the object attribute of the video. In another case. The smaller the attribute value of the object in a dimension, the higher the object attribute of the object in this dimension. For example, the smaller the attribute value of a video in the dimension of the number of "not interested" times, the fewer viewers who dislike the video, that is, the higher the object attribute of the video.
[0084] Before introducing the method for reading an object provided by the embodiments of the present application, for the sake of clarity, first, in combination with Figure 1 the storage method of objects in the embodiments of the present application will be described.
[0085] As Figure 1 shown, for a large number of objects, in the data storage space 10, it may include: a preferred group 11, a candidate group 12, and a candidate resource set 13. Among them, the preferred group 11 can include, according to different dimensions of the object: the first-level object set (which can also be called the preferred set) 111 corresponding to dimension 1, the first-level object set 112 corresponding to dimension 2,... Then, the candidate group 12 can correspondingly include: the second-level object set (which can also be called the candidate set) 121 corresponding to dimension 1, the second-level object set 122 corresponding to dimension 2,... Taking dimension 1 as an example, the optimal object under dimension 1 is stored in the preferred set 111, the object eliminated from the preferred set 111 automatically enters the candidate set 121, and the object that fails to enter the candidate set 121 successfully is placed in the candidate resource set 13. During the process of reading an object, when the number of objects stored in a certain candidate set in the candidate group 12 is insufficient, the objects in the candidate resource set 13 can be supplemented to this candidate set, so that an object can be read every time an object is read. In this way, through the distribution control strategy of the object, a large number of objects can be hierarchically stored in the data storage space 10, preparing for the object reading solution provided by the embodiments of the present application.
[0086] It should be noted that in addition to including multiple first-level object sets in the preferred group 11 and multiple second-level object sets in the candidate group 12 in the data storage space 10, it may also include multiple levels of object sets respectively corresponding to any number of other groups. Figure 1 Here, only the case where the data storage space 10 includes two levels of object sets is used as an example for illustration, which does not constitute a limitation on the object storage method in the embodiments of the present application.
[0087] It can be understood that the dimension of an object can refer to different indicators or variables for measuring the object attributes of the object. Under the same dimension, the attribute values of the same object are constantly changing. Taking the object as a video as an example, the dimension may include at least one of the following dimensions: the number of plays, the number of the author's fans, the creation time, the number of likes, the number of collections, the number of forwards, or the number of "not interested". As time changes, the attribute value (i.e., the value) of each dimension of the same video is constantly changing. For example, the number of plays of the video is constantly changing over time. The specific number of plays, such as 200 times, is the attribute value of the dimension of "the number of plays", and this attribute value can reflect how many times the video has been played by users, thus reflecting the popularity of the video.
[0088] It should be noted that the main body implementing the method for reading an object can be the device for reading an object provided in the embodiments of the present application. The device for reading an object can be carried on an electronic device or a functional module of an electronic device. The device for reading an object can be integrated into an object processing system. For example, after reading an object, subsequent operations include object recommendation. Then, the device for reading an object can be integrated into a recommendation system for object recommendation as an implementation module for the preamble preparation work (i.e., object reading) of object recommendation. Another example is that after reading an object, subsequent operations include object transcoding. Then, the device for reading an object can be integrated into a processing system for processing operations such as object transcoding as an implementation module for the preamble preparation work (i.e., object reading) of object processing.
[0089] Figure 2 It is a schematic flowchart of a method for reading an object provided in the embodiments of the present application. This method can be applied to the device for reading an object. The device for reading an object can be, for example, Figure 5 the device 500 for reading an object shown below.
[0090] As Figure 2 shown, this method can include the following S101 to S103, for example:
[0091] S101, in response to a task of reading an object, respectively obtain first objects from first-level object sets corresponding to different dimensions. Each first-level object set corresponding to each dimension among different dimensions is used to store objects whose object attributes in this dimension meet a first condition, and the object attributes of an object in this dimension are determined based on the attribute value of the object in this dimension.
[0092] Among them, the device for reading an object implementing the embodiments of the present application can have a functional module (such as a control) for triggering the task of reading an object, or the device for reading an object is connected to a functional module having the function of triggering the task of reading an object. The device for reading an object can identify and respond to the task of reading an object.
[0093] Among them, the object attributes of the objects saved in each first-level object set corresponding to each dimension among different dimensions are higher than the object attributes of the objects saved in the second-level object set corresponding to this dimension. Therefore, the first-level object set can be understood as a preferred set within a preferred group, and the second-level object set can be understood as a candidate set within a candidate group. In order to read objects with higher object attributes as much as possible, object reading can be preferentially performed from the first-level object set, and object reading from the second-level object set can be used as a remedial measure.
[0094] It should be noted that in the object storage method, in addition to including the first-level object set and the second-level object set, in order to improve the accuracy and flexibility of object storage and reading, more levels of object sets can also be included. Taking the object storage method including the first-level object set, the second-level object set, and the third-level object set as an example, the objects saved in the first-level object set corresponding to each dimension in different dimensions have object attributes in this dimension higher than those of the objects saved in the second-level object set corresponding to this dimension; the objects saved in the second-level object set corresponding to each dimension in different dimensions have object attributes in this dimension higher than those of the objects saved in the third-level object set corresponding to this dimension. In order to read objects with higher object attributes as much as possible, object reading can be preferentially performed from the first-level object set, object reading from the second-level object set can be used as a preferred remedial measure, and object reading from the third-level object set can be used as a sub-optimal remedial measure.
[0095] Before introducing S101, the object storage method provided in the embodiments of the present application will be described first.
[0096] As an example, for each object, the saving process executed in each dimension is the same. Taking the saving of the third object in the target dimension (which can be understood as any one of different dimensions) as an example, the method may further include: S100. In response to the saving operation of the third object, based on the attribute value of the third object in the target dimension among different dimensions, execute the following saving process: S100a. Determine whether the attribute value of the third object in the target dimension meets the first condition of the first-level object set corresponding to the target dimension. If it meets, execute S100b; otherwise, execute S100c to S100d; S100b. Save the third object in the first-level object set corresponding to the target dimension; S100c. Randomly determine a first object subset for the third object in the second-level object set corresponding to the target dimension; S100d. Determine whether the attribute value of the third object in the target dimension meets the second condition corresponding to the first object subset. If so, execute S100e; otherwise, execute S100f; S100e. Save the third object in the first object subset; S100f. Determine whether there is a third-level object set corresponding to the target dimension. If there is, execute S100g to S100h; otherwise, execute S100j; S100g. Randomly determine a second object subset for the third object in the third-level object set; S100h. Determine whether the attribute value of the third object in the target dimension meets the third condition corresponding to the second object subset. If it meets, execute S100i; otherwise, execute S100j; S100i. Save the third object in the second object subset; S100j. Save the third object in the candidate resource set. In this way, through the object distribution control strategy provided by the embodiments of the present application, it is possible to realize hierarchical storage of a large number of objects in different spaces, preparing for the object reading solution provided by the embodiments of the present application.
[0097] It should be noted that the objects in both the first-level object set and the second-level object set will be arranged in an orderly manner according to the attribute values of the objects in the corresponding dimension. For example, if the first-level object set in a certain dimension stores object 1, object 2, and object 3, and the attribute values of object 1, object 2, and object 3 in this dimension are 12, 5, and 9 respectively, then the order of storing objects in this first-level object set can be {object 1, object 3, and object 2}.
[0098] For S100a, the attribute value of the third object in the target dimension satisfies the first condition of the first-level object set corresponding to the target dimension. For example, it can be that the object attribute represented by the attribute value of the third object in the target dimension is higher than the lowest object attribute among the objects already saved in the first-level object set corresponding to the target dimension. Taking the third object as a video and the target dimension as the number of plays as an example, assume that the first-level object set corresponding to the number of plays includes object 1 and object 2, the number of plays of object 1 and object 2 are 100 and 150 respectively, and the number of plays of the third object is 120. Then, based on 100 and 150, it is determined that the object with the lowest object attribute in the first-level object set corresponding to this dimension is object 1 corresponding to 100. Since 120 is greater than 100, it means that the object attribute of the third object is higher than the object attribute of object 1. Therefore, it is determined that the object attribute represented by the attribute value of the third object in the dimension of the number of plays is higher than the lowest object attribute among the objects already saved in the first-level object set corresponding to the target dimension, that is, the attribute value of the third object in the target dimension satisfies the first condition of the first-level object set corresponding to the target dimension. Similarly, for S100d, the attribute value of the third object in the target dimension satisfies the second condition corresponding to the first object subset. For example, it can be that the object attribute represented by the attribute value of the third object in the target dimension is higher than the lowest object attribute among the objects already saved in the second-level object set corresponding to the target dimension in the first object set. Similarly, for S100h, the attribute value of the third object in the target dimension satisfies the third condition corresponding to the second object subset. For example, it can be that the object attribute represented by the attribute value of the third object in the target dimension is higher than the lowest object attribute among the objects already saved in the third-level object set corresponding to the target dimension in the second object set.
[0099] For example, as Figure 3 shown, taking video A, video B, and video C as examples, assume that the number of plays of video A is 10 and the number of author fans is 100, the number of plays of video B is 50 and the number of author fans is 26, and the number of plays of video C is 5 and the number of author fans is 120. The storage space can include the first-level object set 1 corresponding to the number of plays and the first-level object set 2 corresponding to the number of author fans. Then, the order in which the first-level object set 1 saves the videos can be {video B, video A, and video C}, and the order in which the first-level object set 2 saves the videos can be {video C, video A, and video B}.
[0100] It can be understood that, due to the limited capacity of each first-level object set, in order to increase the capacity of the second-level object set corresponding to each dimension, multiple candidate subsets (i.e., the object subsets mentioned above) with a capacity close to or the same as that of the first-level object set can be designed in each second-level object set. For example, if the capacity of the first-level object set and each candidate subset is 100,000 objects, then, according to the capacity requirements of each second-level object set, the number of candidate subsets included in the second-level object set can be designed flexibly and dynamically. For example, each second-level object set includes 20 candidate subsets, and the capacity of each second-level object set is 10 * 20 = 2 million objects. The objects in each second-level object set can be randomly divided into the candidate subsets included in this second-level object set. Among them, the random division method can, for example, adopt the hash algorithm, that is, perform a hash operation on each object, and determine the candidate subset in which the object should be stored based on the obtained hash result. It should be noted that, except for the first-level object set, the design and the way of storing objects of other-level object sets can all refer to the above relevant description of the second-level object set.
[0101] For example, as Figure 4 shown, still taking Figure 3 Video A, Video B, and Video C in
[0102] Taking an object as a video as an example, the saving process of the video may include, for example: First, write the video into the first-level object set in each dimension, and compare the video with other videos in the first-level object set in terms of the dimension corresponding to the first-level object set. If the object attribute of the video is higher than that of other videos in the first-level object set in a certain dimension, then write the video into the first-level object set formally, and eliminate the video with the worst object attribute in the first-level object set of this dimension to the second-level object set in this dimension; if the object attribute of the video is lower than that of other videos in the first-level object set in a certain dimension, then eliminate the video to the second-level object set in this dimension. Then, if the video finds a suitable position in the second-level object set, the video can be formally written into the above-mentioned suitable position in the second-level object set. Otherwise, in one case, if there is still a third-level object set, then eliminate the video to the third-level object set in this dimension. If the video finds a suitable position in the third-level object set, the video can be formally written into the above-mentioned suitable position in the third-level object set. Otherwise, eliminate the video to the fourth-level object set or the candidate resource set in this dimension; in another case, if there is no third-level object set, then directly put the video into the candidate resource set.
[0103] Among them, the above-mentioned "the video finds a suitable position in the second-level object set" may mean that the video is assigned to a certain candidate subset of the second-level object set, and the candidate subset does not reach the capacity limit (it can also be understood that the candidate subset is not full), or the candidate subset reaches the capacity limit and the object attribute of the video in the dimension corresponding to the second-level object set is higher than that of the video with the worst object attribute in this dimension in this candidate subset. Similarly, the above-mentioned "the video finds a suitable position in the third-level object set" may mean that the video is assigned to a certain candidate subset of the third-level object set, and the candidate subset does not reach the capacity limit (it can also be understood that the candidate subset is not full), or the candidate subset reaches the capacity limit and the object attribute of the video in the dimension corresponding to the third-level object set is higher than that of the video with the worst object attribute in this dimension in this candidate subset.
[0104] It should be noted that the attribute values of each object in the storage space in different dimensions are dynamically changing. Therefore, for the objects in the first-level object set and the second-level object set, it is necessary to update the sorting or update the attribute values in real time or periodically based on the latest attribute values of each object in this dimension to ensure that objects with truly high object attributes can be recalled as much as possible during the process of reading objects.
[0105] It should be noted that as the number of objects continuously increases, the storage data volume of the preferred group in the storage space is much smaller than that of the candidate group, and the storage data volume of the candidate group is much smaller than that of the candidate resource set. For example, the storage data volume of the preferred group can be in the millions, the storage data volume of the candidate group can be in the tens of millions, and the storage data volume of the preferred resource pool can be in the hundreds of millions. In this way, embedding the device for reading objects into the system of subsequent operations can solve the problem of object reading at the scale of extremely large data volumes (such as tens of billions), and combined with the relevant algorithms of subsequent operations, it makes it possible for subsequent operations to provide a globally optimal solution.
[0106] As an example, if the task of reading objects includes the total number of objects to be read, then the device for reading objects can determine the number of objects to be read in each dimension (hereinafter referred to as the first number) based on this total number. For example, if the number of objects read in each dimension is the same, the device for reading objects can determine the first number in each dimension based on this total number and the number of dimensions involved in the storage space (i.e., the number of the first-level object sets). Another example is that if the proportion of objects read in each dimension is preset, the device for reading objects can determine the first number in each dimension based on this total number and the proportion of objects read in each dimension.
[0107] In this example, obtaining the first object from the first-level object sets corresponding to different dimensions in S101 may include: obtaining the first number of objects with the highest object attributes in the dimension from the first-level object sets corresponding to each dimension among different dimensions as the first object corresponding to this dimension.
[0108] As another example, if the task of reading objects includes the target dimension to which the objects belong, then obtaining the first object from the first-level object sets corresponding to different dimensions in S101 may include: obtaining the first object corresponding to this dimension from the first-level object sets corresponding to each dimension in the target dimension.
[0109] As yet another example, if the task of reading objects includes the target dimension to which the objects belong and the number of objects to be read in each target dimension (hereinafter referred to as the second number), or if the task of reading objects includes the target dimension to which the objects belong and the total number of objects to be read, then obtaining the first object from the first-level object sets corresponding to different dimensions in S101 may include: obtaining the second number of objects with the highest object attributes in the dimension from the first-level object sets corresponding to each dimension in the target dimension as the first object corresponding to this dimension. Among them, the second number can be directly obtained from the task of reading objects or calculated from the total number in the task of reading objects and the number of target dimensions.
[0110] For example, still referring to the above Figure 3 illustrated embodiment, the video B and video C with the highest object attributes can be obtained from the first-level object set 1 and the first-level object set 2 respectively, and both are denoted as the first object.
[0111] If the writing speed of writing an object in the preferred group is greater than the recall speed, the elimination speed of eliminating objects from the preferred group will be accelerated. Then, a relatively sufficient number of objects will be maintained in each first-level object set in the preferred group, so that the operation of reading the first object from the first-level object set during the execution of S101 will not fail due to insufficient number of objects in the first-level object set.
[0112] If the writing speed of writing an object in the preferred group is less than the recall speed, as the recall time increases, the objects in the preferred group are very likely to be consumed. When the objects in the first-level object set corresponding to a certain dimension in the preferred group are consumed, the operation of respectively obtaining the first object from the first-level object sets corresponding to different dimensions in S101 will fail, and the device for reading the object can execute S102. In this case, if the number of objects in the second-level object set of a certain dimension is less than the preset quantity threshold (such as 10,000), the candidate resource set will automatically supplement the objects for the second-level object set. The candidate resource set is used to obtain an object from the candidate resource set and supplement the object to the second-level object set corresponding to this dimension during the recall process if the number of objects saved in the second-level object set corresponding to a certain dimension is less than the preset quantity threshold (such as 10,000), so as to ensure that there are always sufficient objects in the second-level object set, thereby ensuring that there are always sufficient objects that can be read in the method for reading an object provided by the embodiments of the present application.
[0113] It can be seen that during the response process of the task of reading an object, objects with higher object attributes are preferentially read from the first-level object set, providing a better data basis for the subsequent operations of the operation of reading the object.
[0114] It should be noted that the reading operations of each dimension in S101 are independent. The operation of obtaining the first object from the first-level object set corresponding to any dimension may succeed or fail. If the reading operation of any dimension in S101 fails, S102 can be executed to continue the reading step with a fallback remedy measure.
[0115] S102. If the operation of obtaining the first object from the first-level object set corresponding to any one of different dimensions fails, then obtain the second object from the i-level object set corresponding to that dimension, where i is an integer greater than or equal to 2. The i-level object set corresponding to each dimension in different dimensions is used to store objects whose object attributes in that dimension satisfy the i-th condition, and the object attributes indicated by the (i - 1)-th condition corresponding to the same dimension are higher than the object attributes indicated by the i-th condition.
[0116] Among them, the operation of obtaining the first object from the first-level object set corresponding to a certain dimension in S101 fails. For example, it may be caused by the fact that there are not enough objects in the first-level object set corresponding to that dimension that can be read, or it may also be caused by other problems such as programs that cause the operation of reading objects from the first-level object set corresponding to that dimension to fail.
[0117] As an example, in the object storage method, if i = 2, then "obtain the second object from the i-level object set corresponding to that dimension" in S102 means obtaining the second object from the second-level object set corresponding to that dimension. Among them, "the i-level object set corresponding to each dimension in different dimensions is used to store objects whose object attributes in that dimension satisfy the i-th condition, and the object attributes indicated by the (i - 1)-th condition corresponding to the same dimension are higher than the object attributes indicated by the i-th condition" can mean that the second-level object set corresponding to each dimension in different dimensions is used to store objects whose object attributes in that dimension satisfy the second condition, and the object attributes indicated by the first condition corresponding to the same dimension are higher than the object attributes indicated by the second condition.
[0118] As another example, in the object storage method, if i is an integer greater than 2, taking i = 3 as an example, then "obtain the second object from the i-level object set corresponding to that dimension" in S102 may include: first obtain the second object from the second-level object set corresponding to that dimension. If the operation of obtaining the second object from the second-level object set corresponding to that dimension fails, then obtain the second object from the third-level object set corresponding to that dimension. Among them, "the i-level object set corresponding to each dimension in different dimensions is used to store objects whose object attributes in that dimension satisfy the i-th condition, and the object attributes indicated by the (i - 1)-th condition corresponding to the same dimension are higher than the object attributes indicated by the i-th condition" may include: on the one hand, the second-level object set corresponding to each dimension in different dimensions is used to store objects whose object attributes in that dimension satisfy the second condition, and the object attributes indicated by the first condition corresponding to the same dimension are higher than the object attributes indicated by the second condition; on the other hand, the third-level object set corresponding to each dimension in different dimensions is used to store objects whose object attributes in that dimension satisfy the third condition, and the object attributes indicated by the second condition corresponding to the same dimension are higher than the object attributes indicated by the third condition.
[0119] Taking the number of objects to be read from each dimension as the first quantity, and only including the first-level object set and the second-level object set as an example, assuming that the operation of obtaining the first object from the first-level object set corresponding to the first dimension among different dimensions fails, S102 may include, for example: First, obtain the third quantity of candidate objects with the highest object attributes in the first dimension from multiple object subsets (i.e., the candidate subsets mentioned above) in the second-level object set corresponding to the first dimension; then, obtain the first quantity of objects with the highest object attributes in the first dimension from the candidate objects, denoted as the second object. Among them, the product of the third quantity and the number of multiple object subsets in the second-level object set corresponding to the first dimension is greater than or equal to the first quantity. For example, if the first quantity is 20, and the second-level object set corresponding to the first dimension includes 5 object subsets, then the third quantity should be greater than or equal to 4 (i.e., 20 / 5), that is, at least 4 candidate objects with the highest object attributes in the first dimension are respectively obtained from each object subset in the second-level object set corresponding to the first dimension, and a total of (5 * 4) = 20 candidate objects are obtained. Among them, after obtaining the candidate objects, sorting methods such as merge can also be used to sort the candidate objects according to the object attributes in the first dimension, so as to obtain the first quantity of objects with the highest object attributes in the first dimension from the sorted candidate objects.
[0120] For example, still referring to the above Figure 4 shown embodiment, if the first dimension corresponds to the number of playbacks, then the video B and video C with the highest object attributes can be respectively obtained from the candidate subset 11 and candidate subset 12 of the second-level object set 1, both denoted as candidate objects, and then from the candidate objects video B and video C, select the video B with higher object attributes according to the number of playbacks as the second object. If the first dimension corresponds to the number of author fans, then the video A and video C with the highest object attributes can be respectively obtained from the candidate subset 21 and candidate subset 22 of the second-level object set 2, both denoted as candidate objects, and then from the candidate objects video A and video C, select the video C with higher object attributes according to the number of author fans as the second object. If both the two dimensions of the number of playbacks and the number of author fans belong to the dimensions where the operation of obtaining the first object from the first-level object set fails, then in S102, the second object videos B and C can be obtained respectively according to the number of playbacks and the number of author fans, and both the video B and video C are used as the second object.
[0121] It should be noted that the operations of obtaining the second object through S102 for multiple dimensions where the operation of obtaining the first object from the first-level object set fails are independent and do not affect each other. Therefore, if there are partial or complete repetitions among the second objects determined under multiple dimensions, it is a normal phenomenon. For the repeatedly read objects, the read result can be obtained after deduplication in S103.
[0122] It can be seen that during the response process of the task of reading objects, objects with higher object attributes are preferentially recalled from the first-level object set. If the recall operation from the first-level object set of a certain dimension fails, objects with slightly worse object attributes than those in the first-level object set can still be recalled from the i-level object set in the order of decreasing object attributes, providing a reasonable mechanism for the complete and sequential implementation of the recall operation.
[0123] S103. Determine the read result corresponding to the task of reading the object according to the first object and the second object.
[0124] As an example, if the operations of obtaining the first object from the first-level object sets corresponding to different dimensions are all successful, the read result corresponding to the task of reading the object is determined according to the first objects corresponding to each dimension.
[0125] As another example, if the operations of obtaining the first object from the first-level object sets corresponding to different dimensions are partially successful, the read result corresponding to the task of reading the object is determined according to the first objects corresponding to each dimension in the successful dimensions and the second objects corresponding to each dimension in the failed dimensions.
[0126] As yet another example, if the operations of obtaining the first object from the first-level object sets corresponding to different dimensions are all failed, the read result corresponding to the task of reading the object is determined according to the second objects corresponding to each dimension.
[0127] In some implementation manners, after S103, subsequent operations on the object can be performed based on the read result. For example, after S103, the method may further include: making recommendations for the object based on the read result, or processing the object based on the read result, such as transcoding the object.
[0128] Taking the object as a video as an example, after S103, the method may further include: making video recommendations based on the read result, or performing video transcoding based on the read result.
[0129] It can be seen that through this method, on the basis of storing a large number of objects in a multi-level object set according to the object attributes of the objects in different dimensions, by first reading the objects from the first-level object set with higher object attributes and then using the object reading of the i-th level object set as a remedial measure, the object reading with high global object attributes can be realized. Especially in the scenario with a large amount of data, the object reading with high global object attributes is very important. For example, it can ensure that the data basis for the subsequent operations of the read object is more accurate.
[0130] Correspondingly, an embodiment of the present application further provides a device 500 for reading an object, as Figure 5 shown. The device 500 may include, for example:
[0131] A first acquisition unit 501, configured to, in response to a task of reading an object, respectively acquire a first object from the first-level object sets corresponding to different dimensions, where the first-level object sets corresponding to each dimension in the different dimensions are used to store objects whose object attributes in this dimension meet a first condition, and the object attribute of the object in this dimension is determined based on the attribute value of the object in this dimension;
[0132] A second acquisition unit 502, configured to, if the operation of acquiring the first object from the first-level object set corresponding to any one of the different dimensions fails, acquire a second object from the i-th level object set corresponding to this dimension, where i is an integer greater than or equal to 2, and the i-th level object sets corresponding to each dimension in the different dimensions are used to store objects whose object attributes in this dimension meet the i-th condition, and the object attribute indicated by the (i - 1)-th condition corresponding to the same dimension is higher than the object attribute indicated by the i-th condition;
[0133] A determination unit 503, configured to determine a read result corresponding to the task of reading the object according to the first object and the second object.
[0134] In some implementation manners, the determination unit 503 is specifically configured to:
[0135] If the operations of respectively acquiring the first objects from the first-level object sets corresponding to different dimensions are all successful, determine a read result corresponding to the task of reading the object according to the first object.
[0136] In some implementation manners, the second acquisition unit 502 is specifically configured to:
[0137] Acquire the second object from the second-level object set corresponding to this dimension;
[0138] Or,
[0139] If the operation of obtaining the second object from the second-level object set corresponding to the dimension fails, obtain the second object from the third object set.
[0140] In some implementations, the apparatus 500 further includes:
[0141] A saving unit, configured to, in response to a saving operation on a third object, perform saving of the third object based on an attribute value of the target dimension of the third object among the different dimensions;
[0142] The saving unit includes:
[0143] A first saving subunit, configured to save the third object in the first-level object set corresponding to the target dimension if the attribute value of the third object in the target dimension satisfies the first condition of the first-level object set corresponding to the target dimension;
[0144] A first determining subunit, configured to randomly determine a first object subset for the third object in the second-level object set corresponding to the target dimension if the attribute value of the third object in the target dimension does not satisfy the first condition of the first-level object set corresponding to the target dimension;
[0145] A second saving subunit, configured to save the third object in the first object subset if the attribute value of the third object in the target dimension satisfies the second condition corresponding to the first object subset;
[0146] A third saving subunit, configured to save the third object in the candidate resource set if the attribute value of the third object in the target dimension does not satisfy the second condition corresponding to the first object subset and there is no third-level object set corresponding to the target dimension;
[0147] Or,
[0148] A second determining subunit, configured to randomly determine a second object subset for the third object in the third-level object set if the attribute value of the third object in the target dimension does not satisfy the second condition corresponding to the first object subset and there is a third-level object set corresponding to the target dimension;
[0149] A fourth saving subunit, configured to save the third object in the second object subset if the attribute value of the third object in the target dimension satisfies the third condition corresponding to the second object subset;
[0150] A fifth saving subunit, configured to save the third object in the candidate resource set if the attribute value of the third object in the target dimension does not satisfy the third condition corresponding to the second object subset.
[0151] In some implementations, the apparatus 500 further includes:
[0152] A supplement unit, configured to, if the number of objects stored in the set of level-i objects corresponding to any one of the different dimensions is less than a preset quantity threshold, obtain a fourth object from the candidate resource set and supplement the fourth object to the set of level-i objects corresponding to this dimension.
[0153] In some implementations, if the task of reading objects includes the total number of objects to be read, the first obtaining unit 501 is specifically configured to:
[0154] Obtain, from the set of level-1 objects corresponding to each of the different dimensions, the first quantity of objects with the highest object attributes under this dimension as the first object corresponding to this dimension, where the first quantity is determined based on the total quantity and the number of dimensions included in the different dimensions.
[0155] In some implementations, if the task of reading objects includes the total number of objects to be read, the second obtaining unit 502 includes:
[0156] A first obtaining subunit, configured to obtain, from multiple object subsets in the set of level-i objects corresponding to this dimension, the second quantity of candidate objects with the highest object attributes under this dimension, where the product of the second quantity and the number of object subsets included in the multiple object subsets is greater than or equal to the first quantity, and the first quantity is determined based on the total quantity and the number of dimensions included in the different dimensions;
[0157] A second obtaining subunit, configured to obtain, from the candidate objects, the first quantity of objects with the highest object attributes under this dimension, denoted as the second object.
[0158] In some implementations, the apparatus 500 further includes:
[0159] A recommendation unit, configured to perform object recommendation based on the reading result;
[0160] Or, a transcoding unit, configured to perform object transcoding based on the reading result.
[0161] It should be noted that for the specific implementation manner and the achieved technical effects of the apparatus 500, reference may be made to Figure 2 the relevant descriptions of the method shown.
[0162] In addition, an embodiment of the present application further provides an electronic device, which includes a processor and a memory: the memory is used to store instructions or computer programs; the processor is used to execute the instructions or computer programs in the memory, so that the electronic device executes any implementation manner of the method provided by the embodiment of the present application.
[0163] Refer to Figure 6 , which shows a schematic structural diagram of an electronic device 600 suitable for implementing the embodiments of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.
[0164] As Figure 6 shown, the electronic device 600 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which may execute various appropriate actions and processes according to the programs stored in the read-only memory (ROM) 602 or the programs loaded from the storage device 608 into the random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The input / output (I / O) interface 605 is also connected to the bus 604.
[0165] Generally, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 6 shows the electronic device 600 having various devices, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had.
[0166] In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above functions defined in the methods of the embodiments of the present disclosure are executed.
[0167] The electronic device provided by the embodiment of the present disclosure and the method provided by the above embodiment belong to the same inventive concept. Technical details not described in detail in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0168] An embodiment of the present application further provides a computer-readable medium, in which instructions or a computer program are stored. When the instructions or the computer program run on a device, the device is enabled to execute any implementation manner of the method provided by the embodiment of the present application.
[0169] It should be noted that the computer-readable medium described above can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0170] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (Hyper Text Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0171] The above computer-readable medium can be included in the above electronic device; or it can exist separately without being assembled into the electronic device.
[0172] The above computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device can execute the above method.
[0173] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0174] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0175] The units involved in the embodiments described in the present disclosure may be implemented in software or in hardware. Among them, the name of the unit / module does not, in some cases, constitute a limitation on the unit itself.
[0176] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, by way of non-limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), system on a chip (SOC), complex programmable logic devices (CPLD), and so on.
[0177] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0178] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other. For the systems or apparatuses disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and reference can be made to the method part for the relevant parts.
[0179] It should be understood that in this application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist simultaneously. Here, A and B can be singular or plural. The character " / " generally indicates an "or" relationship between the associated objects before and after. "At least one (one) of the following" or its similar expressions refer to any combination of these items, including any combination of single items (ones) or plural items (ones). For example, at least one (one) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0180] It should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the said element.
[0181] The steps of the methods or algorithms described in connection with the embodiments disclosed herein can be implemented directly in hardware, software modules executed by a processor, or a combination of both. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0182] It should be noted that in the embodiments of the present application, user-sensitive information is not involved, and user-related information is obtained, used and determined only after user authorization. In one example, before obtaining user-related information, a prompt message related to obtaining authorization for data use is displayed on the corresponding interface, and this prompt message informs the user of the type, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure in a proper manner in accordance with relevant laws and regulations, so that the user can determine whether to agree to the authorization based on this prompt message. It can be understood that the above process of notification and obtaining user authorization is only illustrative and does not constitute a limitation on the implementation manner of the present disclosure, and other ways that meet relevant laws and regulations can also be applied to the implementation manner of the present disclosure.
[0183] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for reading an object, characterized in that, Including: In response to a task of reading an object, obtaining first objects respectively from first-level object sets corresponding to different dimensions, where each first-level object set corresponding to a dimension among the different dimensions is used to store objects whose object attributes in this dimension meet a first condition, and the object attributes of an object in this dimension are determined based on the attribute value of the object in this dimension; If the operation of obtaining a first object from the first-level object set corresponding to any one of the different dimensions fails, then obtaining a second object from the i-th level object set corresponding to this dimension, where i is an integer greater than or equal to 2, and each i-th level object set corresponding to a dimension among the different dimensions is used to store objects whose object attributes in this dimension meet the i-th condition, and the object attributes indicated by the (i - 1)-th condition corresponding to the same dimension are higher than the object attributes indicated by the i-th condition; Determining a reading result corresponding to the task of reading the object according to the first object and the second object.
2. The method according to claim 1, wherein The obtaining the second object from the i-th level object set corresponding to this dimension includes: Obtaining the second object from the second-level object set corresponding to this dimension; Or, If the operation of obtaining the second object from the second-level object set corresponding to this dimension fails, then obtaining the second object from a third object set.
3. The method according to claim 1 or 2, characterized in that, The method further includes: In response to a save operation on a third object, based on the attribute value of the third object in a target dimension among the different dimensions, performing the following save process: If the attribute value of the third object in the target dimension meets the first condition of the first-level object set corresponding to the target dimension, then saving the third object in the first-level object set corresponding to the target dimension; If the attribute value of the third object in the target dimension does not meet the first condition of the first-level object set corresponding to the target dimension, then randomly determining a first object subset for the third object in the second-level object set corresponding to the target dimension; If the attribute value of the third object in the target dimension meets the second condition corresponding to the first object subset, then saving the third object in the first object subset; If the attribute value of the third object in the target dimension does not meet the second condition corresponding to the first object subset and there is no third-level object set corresponding to the target dimension, then saving the third object in a candidate resource set; Or, If the attribute value of the third object in the target dimension does not meet the second condition corresponding to the first object subset and there is a third-level object set corresponding to the target dimension, then randomly determining a second object subset for the third object in the third-level object set; If the attribute value of the third object in the target dimension meets the third condition corresponding to the second object subset, then saving the third object in the second object subset; If the attribute value of the third object in the target dimension does not meet the third condition corresponding to the second object subset, then saving the third object in a candidate resource set.
4. The method according to claim 3, characterized in that, The method further includes: If the number of objects stored in the set of objects at the i-th level corresponding to any one of the different dimensions is less than a preset quantity threshold, obtain a fourth object from the candidate resource set and supplement the fourth object to the set of objects at the i-th level corresponding to this dimension.
5. The method according to any one of claims 1 to 4, characterized in that, If the task of reading objects includes the total number of objects to be read, the obtaining, from the sets of first-level objects corresponding to different dimensions respectively, of first objects includes: From each set of first-level objects corresponding to each of the different dimensions, respectively obtain the first quantity of objects with the highest object attributes in this dimension as the first objects corresponding to this dimension, where the first quantity is determined based on the total number and the number of dimensions included in the different dimensions.
6. The method according to any one of claims 1-5, characterized in that, If the task of reading objects includes the total number of objects to be read, the obtaining, from the set of objects at the i-th level corresponding to this dimension, of second objects includes: From multiple object subsets in the set of objects at the i-th level corresponding to this dimension, respectively obtain the second quantity of candidate objects with the highest object attributes in this dimension, where the product of the second quantity and the number of object subsets included in the multiple object subsets is greater than or equal to the first quantity, and the first quantity is determined based on the total number and the number of dimensions included in the different dimensions; From the candidate objects, obtain the first quantity of objects with the highest object attributes in this dimension, denoted as the second objects.
7. The method according to any one of claims 1-6, characterized in that, The method further includes: Performing object recommendation based on the reading result; Or, performing object transcoding based on the reading result.
8. A device for reading an object, characterized in that, Includes: A first obtaining unit, configured to, in response to a task of reading objects, obtain first objects from the sets of first-level objects corresponding to different dimensions respectively, where each set of first-level objects corresponding to each of the different dimensions is used to store objects whose object attributes in this dimension satisfy a first condition, and the object attributes of an object in this dimension are determined based on the attribute value of the object in this dimension; A second obtaining unit, configured to, if the operation of obtaining a first object from the set of first-level objects corresponding to any one of the different dimensions fails, obtain second objects from the set of objects at the i-th level corresponding to this dimension, where i is an integer greater than or equal to 2, and each set of objects at the i-th level corresponding to each of the different dimensions is used to store objects whose object attributes in this dimension satisfy an i-th condition, and the object attributes indicated by the (i - 1)-th condition corresponding to the same dimension are higher than the object attributes indicated by the i-th condition; A determining unit, configured to determine a reading result corresponding to the task of reading objects according to the first objects and the second objects.
9. An electronic device, characterized in that, The electronic device includes: a processor and a memory; The memory is configured to store instructions or programs; The processor is configured to execute the instructions or programs in the memory so that the electronic device executes the method according to any one of claims 1 - 7.
10. A readable medium, characterized in that, Instructions or programs are stored in the readable medium, and when the instructions or programs run on a processor, the processor is caused to execute the method according to any one of claims 1 - 7.