Method, apparatus and storage medium for retrieving data
By using a combination of feature vectors and retrieval algorithms in unstructured data retrieval, and optimizing the retrieval algorithm and operating parameters, the inefficiency problem in existing technologies is solved, and efficient data retrieval is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
- Filing Date
- 2023-01-03
- Publication Date
- 2026-07-10
AI Technical Summary
Existing technologies are inefficient when retrieving unstructured data, and traditional text-based detection methods cannot meet the requirements.
By combining feature vectors and retrieval algorithms, unstructured data is retrieved from corresponding relationships, and the retrieval algorithm and running parameters are optimized to improve retrieval efficiency.
It improves the efficiency of unstructured data retrieval, enabling users to quickly and accurately find the data they need.
Smart Images

Figure CN116069990B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and in particular to a method, apparatus and storage medium for retrieving data. Background Technology
[0002] As the internet environment becomes increasingly complex, data includes not only structured data such as text, but also unstructured data such as images, videos, and user behavior logs. Servers can store large amounts of data, allowing users to retrieve the information they need from this vast database.
[0003] For structured data, traditional text-based detection methods can be used to retrieve the data the user needs from the structured data stored on the server. For unstructured data, traditional text-based detection methods are no longer applicable, and related technologies employ alternative retrieval methods to retrieve the data the user needs from the unstructured data stored on the server.
[0004] However, the retrieval methods used in these technologies for retrieving unstructured data have poor performance, resulting in low efficiency in data retrieval. Summary of the Invention
[0005] This application provides a method, apparatus, and storage medium for retrieving data, thereby improving the efficiency of data retrieval. The technical solution is as follows:
[0006] Firstly, this application provides a method for retrieving data. In this method, a retrieval request is received, comprising n first feature vectors, where the n first feature vectors are feature vectors of first unstructured data to be retrieved, and n is an integer greater than or equal to 1. A first retrieval algorithm is obtained based on n, wherein the performance of retrieving data using the n first feature vectors satisfies a first condition. Based on the n first feature vectors, at least one piece of second unstructured data is retrieved from a first correspondence using the first retrieval algorithm. The first correspondence is used to store the correspondence between the second unstructured data and the second feature vectors of the second unstructured data.
[0007] Since the first retrieval algorithm obtained is a retrieval algorithm whose performance in retrieving data using the n first feature vectors meets the first condition, based on the n first feature vectors, at least one second unstructured data can be retrieved in the first correspondence through the first retrieval algorithm, thereby improving the efficiency of data retrieval.
[0008] In one possible implementation, a first set of operating parameters is obtained based on n. These parameters are the operating parameters used when the performance of the first retrieval algorithm in retrieving data meets a first condition. Based on these n first feature vectors and the first operating parameters, at least one second unstructured data point is retrieved from the first correspondence using the first retrieval algorithm. Since the first operating parameters are the operating parameters used when the performance of the first retrieval algorithm in retrieving data meets the first condition, retrieving at least one second unstructured data point from the first correspondence using the first retrieval algorithm based on these n first feature vectors and the first operating parameters improves the efficiency of data retrieval.
[0009] In another possible implementation, a first retrieval algorithm and first operating parameters are obtained based on a second correspondence between n and a second correspondence, where the second correspondence includes n, the first retrieval algorithm, and the first operating parameters. In this way, a first retrieval algorithm whose performance in retrieving data meets a first condition and its first operating parameters when the performance of the first retrieval algorithm in retrieving data meets the first condition can be obtained.
[0010] In another possible implementation, n third feature vectors of the third unstructured data are obtained. Based on these n third feature vectors, the data retrieval performance of each of a plurality of retrieval algorithms is obtained. n is then associated with a first retrieval algorithm, which is the retrieval algorithm whose data retrieval performance among the plurality of retrieval algorithms satisfies a first condition. This allows the first retrieval algorithm to be quickly obtained based on n during data retrieval, thereby improving data retrieval performance.
[0011] In another possible implementation, based on n third feature vectors, data is retrieved from the first correspondence using a first retrieval algorithm, thus obtaining the data retrieval performance of the first retrieval algorithm. The first retrieval algorithm is one of the multiple retrieval algorithms, thereby obtaining the data retrieval performance of each retrieval algorithm.
[0012] In another possible implementation, multiple operating parameters are obtained; based on n third feature vectors, the performance of the first retrieval algorithm in retrieving data using each of the multiple operating parameters is obtained. The first operating parameters are then associated with n, the first operating parameters being the operating parameters used by the first retrieval algorithm when its data retrieval performance is optimal. This allows for the rapid acquisition of the first retrieval algorithm and the first operating parameters based on n during data retrieval, improving data retrieval performance.
[0013] In another possible implementation, based on n third feature vectors and first operating parameters, data is retrieved from the first correspondence using a first retrieval algorithm, thus obtaining the performance of the first retrieval algorithm in retrieving data using the first operating parameters. These multiple operating parameters include the first operating parameters, thereby obtaining the performance of the first retrieval algorithm in retrieving data using each of the multiple operating parameters.
[0014] In another possible implementation, the first operating parameters include one or more of the following: the number of resource blocks used by the first retrieval algorithm, the number of threads included in the resource blocks, or the size of shared memory used by the resource blocks.
[0015] Secondly, this application provides an apparatus for retrieving data, used to perform the method in the first aspect or any possible implementation thereof. Specifically, the apparatus includes units for performing the method in the first aspect or any possible implementation thereof.
[0016] Thirdly, this application provides an apparatus for retrieving data, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to enable the apparatus to implement the method in the first aspect or any possible implementation of the first aspect.
[0017] Fourthly, this application provides a computer program product comprising a computer program stored in a computer-readable storage medium, wherein the computer program is loaded by a processor to implement the method described in the first aspect or any possible implementation thereof.
[0018] Fifthly, this application provides a computer-readable storage medium for storing a computer program, which is loaded by a computer to execute the method described in the first aspect or any possible implementation thereof.
[0019] In a sixth aspect, this application provides a chip including a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to retrieve and execute the computer instructions from the memory to perform the method described in the first aspect or any possible implementation thereof. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of a network architecture provided in an embodiment of this application;
[0021] Figure 2 This is a schematic diagram of another network architecture provided in an embodiment of this application;
[0022] Figure 3 This is a flowchart of a method for establishing a second correspondence provided in an embodiment of this application;
[0023] Figure 4 This is a schematic diagram of a resource block retrieval data provided in an embodiment of this application;
[0024] Figure 5 This is a flowchart of a data retrieval method provided in an embodiment of this application;
[0025] Figure 6 This is a schematic diagram of a data retrieval device provided in an embodiment of this application;
[0026] Figure 7 This is a schematic diagram of the structure of a retrieval device provided in an embodiment of this application. Detailed Implementation
[0027] The embodiments of this application will now be described in further detail with reference to the accompanying drawings.
[0028] Unstructured data can include images, videos, audio, or user behavior logs, and unstructured data retrieval technology has been widely applied in various technical fields. For example, unstructured data retrieval technology can be used in image search engines to retrieve images. As another example, in music websites, unstructured data retrieval technology can be used to find the song to which an audio clip belongs.
[0029] See Figure 1 This application provides a network architecture 100 for implementing unstructured data retrieval technology. The network architecture 100 includes multiple first devices 101 and multiple retrieval clusters 102, with each first device 101 communicating with each retrieval cluster 102.
[0030] For any one of the plurality of first devices 101, the first device 101 receives a first retrieval request from a user, the first retrieval request including first unstructured data to be retrieved. The first device 101 obtains n first feature vectors based on the first unstructured data, where n is an integer greater than or equal to 1. Each first feature vector includes D features of the first unstructured data, where D is an integer greater than 1, and each first feature vector is different. The first device 101 sends a second retrieval request to each retrieval cluster 102, the second retrieval request including the n first feature vectors.
[0031] For any retrieval cluster 102, the retrieval cluster 102 includes a first correspondence 1021 and at least one retrieval device 1022. The first correspondence 1021 is used to store the correspondence between the second unstructured feature data and the second feature vector of the second unstructured feature data.
[0032] For any record in the first correspondence 1021, the record includes a second unstructured data and a second feature vector of the second unstructured data, the second feature vector of the second unstructured data including D features of the second unstructured data. Each retrieval device 1022 in the retrieval cluster 102 can access the first correspondence 1021. The first correspondences in each retrieval cluster 102 are different, and there is no overlap between the first correspondences in each retrieval cluster 102.
[0033] For any retrieval cluster 102, one retrieval device 1022 in the retrieval cluster 102 is used to retrieve second unstructured data from the first correspondence 1021 in the retrieval cluster 102. For the other retrieval devices in the retrieval cluster 102, the other retrieval devices are used for disaster recovery of the retrieval device 1022. That is, when the retrieval device 1022 fails, the other retrieval devices are used to retrieve the second unstructured data from the first correspondence 1021 in the retrieval cluster 102.
[0034] For any retrieval cluster 102, the first device 101 sends a second retrieval request to one of the retrieval devices 1022 in that retrieval cluster 102. The retrieval device 1022 receives the second retrieval request and, based on the n first feature vectors included in the second retrieval request, retrieves K second unstructured data items from the first correspondence 1021 included in the retrieval cluster 102, where K is an integer greater than or equal to 1. The retrieval device 1022 sends a second retrieval response to the first device 101, the second retrieval response including the K second unstructured data items and the distance between the second feature vector of each of the K second unstructured data items and the n first feature vectors.
[0035] In the first correspondence 1021 of the retrieval cluster 102, the distance between the second feature vector of each of the K second unstructured data and the n first feature vectors is minimized. The smaller the distance between the second feature vector of a certain second unstructured data and the n first feature vectors, the more similar the second feature vector of the second unstructured data is to the n first feature vectors; conversely, the larger the distance between the second feature vector of the second unstructured data and the n first feature vectors, the greater the difference between the second feature vector of the second unstructured data and the n first feature vectors.
[0036] The first device 101 receives a second retrieval response from the retrieval device 1022 in each retrieval cluster 102. Each second retrieval response from the retrieval device 1022 in each retrieval cluster 102 includes K second unstructured data points and the distance between the second feature vector of each of the K second unstructured data points and the n first feature vectors. Specifically, the first device 101 receives a total of Q*K second unstructured data points and the distance between the second feature vector of each of the Q*K second unstructured data points and the n first feature vectors, where Q is the number of retrieval clusters 102 included in the network architecture 100, and * represents a multiplication operation.
[0037] The first device 101 selects L second unstructured data from the Q*K second unstructured data, where the distance between the second feature vector and the n first feature vectors is the smallest, and L is an integer greater than or equal to 1 and less than or equal to K, and sends a first retrieval response to the user. The first retrieval response includes the L second unstructured data.
[0038] For any retrieval device 1022 in any retrieval cluster 102, the retrieval device 1022 includes multiple retrieval algorithms. For any retrieval algorithm, the retrieval algorithm is used to retrieve second unstructured data in the first correspondence 1021 of the retrieval cluster 102 using at least one first feature vector.
[0039] Two retrieval algorithms may use different numbers of first feature vectors to achieve the performance requirement of retrieving data while meeting the first condition. For example, some retrieval algorithms may use x first feature vectors to achieve the performance requirement of retrieving second unstructured data in the first correspondence 1021 of the retrieval cluster 102, where x is an integer greater than or equal to 1. Other retrieval algorithms may use y first feature vectors to achieve the performance requirement of retrieving second unstructured data in the first correspondence 1021 of the retrieval cluster 102, where y is an integer greater than or equal to 1, and x is not equal to y.
[0040] In some embodiments, the first condition may be optimal performance, meaning that the number of first feature vectors used by any two retrieval algorithms when retrieving data with optimal performance may differ. Alternatively, the first condition may be that the performance of retrieving data exceeds a performance threshold, meaning that the number of first feature vectors used by any two retrieval algorithms when retrieving data with optimal performance may differ.
[0041] Therefore, to improve the efficiency of data retrieval, for the retrieval device 1022 receiving the second retrieval request in the retrieval cluster 102, since the second retrieval request includes n first feature vectors, the retrieval device 1022 obtains a first retrieval algorithm based on n. The plurality of retrieval algorithms includes the first retrieval algorithm, and the first retrieval algorithm is a retrieval algorithm whose performance satisfies a first condition when retrieving data using n first feature vectors. Based on the n first feature vectors, the retrieval device 1022 retrieves K pieces of second unstructured data in the first correspondence 1021 of the retrieval cluster 102 using the first retrieval algorithm, thereby improving the efficiency of retrieving the K pieces of second unstructured data.
[0042] In some embodiments, the retrieval device 1022 may include a second correspondence, which stores the correspondence between the number of first feature vectors and retrieval algorithms. Each record in the second correspondence includes a number and a retrieval algorithm, indicating that the performance of the retrieval algorithm when retrieving data using that number of first feature vectors meets a first condition. Thus, when the retrieval device 1022 receives a second retrieval request, it retrieves the corresponding retrieval algorithm from the first correspondence based on n, using it as the first retrieval algorithm.
[0043] For any given retrieval algorithm, the algorithm retrieves second unstructured data in the first correspondence 1021 of the retrieval cluster 102 based on its operating parameters. The performance of the retrieval algorithm varies depending on the operating parameters used.
[0044] In some embodiments, the second correspondence is used to store the correspondence between the number of first feature vectors, the running parameters, and the retrieval algorithm. Each record in the second correspondence includes a number, a running parameter, and a retrieval algorithm, and this record indicates that the performance of the retrieval algorithm when retrieving data using the specified number of first feature vectors and the specified running parameter meets the first condition.
[0045] Thus, when the retrieval device 1022 receives a second retrieval request, it retrieves the corresponding retrieval algorithm from the second correspondence 1021 based on n, as the first retrieval algorithm, and retrieves the corresponding operating parameters as the first operating parameters. The first retrieval algorithm is the retrieval algorithm whose performance meets the first condition when retrieving data using n first feature vectors. The first operating parameters are the operating parameters used by the first retrieval algorithm when the performance of the retrieved data meets the first condition. Based on the n first feature vectors and the first operating parameters, the retrieval device 1022 retrieves K pieces of second unstructured data in the first correspondence 1021 of the retrieval cluster 102 using the first retrieval algorithm, which can improve the efficiency of retrieving the K pieces of second unstructured data.
[0046] In some embodiments, see Figure 2The network architecture 100 also includes a load balancer 103, which can communicate with each of the plurality of first devices 101.
[0047] The load balancing device 101 is used to receive a first search request from a user, select a first device 101 from the plurality of first devices 101 based on a load balancing strategy, and send the first search request to the selected first device 101.
[0048] In some embodiments, the first operating parameters include one or more of the following: the number of resource blocks used by the first retrieval algorithm, the number of threads included in the resource block, or the size of shared memory used by the resource block.
[0049] The first retrieval algorithm uses at least one resource block ("block"), meaning it uses at least one resource block to retrieve data. Each resource block includes at least one thread, and the number of threads in each resource block is equal to "thread". Threads in each resource block can read and write shared memory, the size of which is equal to "memory".
[0050] See Figure 3 This application provides a method 300 for establishing a second correspondence, which is applied to... Figure 1 or Figure 2 The network architecture 100 shown can be implemented by a retrieval device within the network architecture 100. The method 300 includes the following steps 301 to 304.
[0051] Step 301: The retrieval device obtains m third feature vectors of the third unstructured data to be detected, each third feature vector including D features of the third unstructured data.
[0052] D can also be called the dimension of the third eigenvector.
[0053] m can be an integer selected from a range of values greater than or equal to 1 and less than or equal to M, where M is an integer greater than 1. Optionally, M can be a value such as 16, 32, or 64.
[0054] In step 301, the detection device can acquire m third feature vectors of the third unstructured data using various methods. Two methods are listed below: Method 1 and Method 2.
[0055] Method 1: The retrieval device obtains the third unstructured data to be detected, inputs the third unstructured data into the feature vector acquisition model, and the feature vector acquisition model obtains m third feature vectors of the third unstructured data based on the third unstructured data. The feature vector acquisition model outputs m third feature vectors of the third unstructured data.
[0056] In some embodiments, the third unstructured data is data generated by the retrieval device, or data downloaded by the retrieval device from the network, etc.
[0057] Method 2: The retrieval device receives a retrieval request, which includes m third feature vectors of the third unstructured data.
[0058] In some embodiments, the retrieval request is a retrieval request received by the retrieval device from any of the first devices.
[0059] Step 302: Based on the m third feature vectors, the retrieval device obtains the performance of the target retrieval algorithm in retrieving data using each of the multiple operating parameters. The target retrieval algorithm is any one of the multiple retrieval algorithms.
[0060] Each of these multiple retrieval algorithms uses a feature vector with a dimension of D in the retrieved data. Optionally, these multiple retrieval algorithms are pre-defined retrieval algorithms.
[0061] In some embodiments, the retrieval device includes a third correspondence, which stores the correspondence between the dimensions of feature vectors and retrieval algorithms. Any record in the third correspondence includes one dimension and multiple retrieval algorithms, wherein the dimension of the feature vector used by each of the multiple retrieval algorithms when retrieving data is equal to the dimension included in the record.
[0062] In some embodiments, before performing step 302, multiple retrieval algorithms can be obtained from the third correspondence based on the dimension D of the third feature vector, and one retrieval algorithm can be selected from these multiple retrieval algorithms as the target retrieval algorithm.
[0063] In step 302, the retrieval device acquires multiple operating parameters, selects one as the target operating parameter, and retrieves data from the first correspondence using the m third feature vectors and the target operating parameter. This yields the performance of the target retrieval algorithm using the target operating parameter. Then, for the other operating parameters, the same processing method as for the target operating parameter is applied to obtain the performance of the target retrieval algorithm using the target operating parameter. Thus, the performance of the target retrieval algorithm using each operating parameter is obtained.
[0064] In some embodiments, the retrieval device may enumerate multiple operating parameters, each including the number of resource blocks "block", the number of threads included in the resource block "thread", and / or the size of shared memory used by the resource block "memory", etc.
[0065] For example, referring to Table 1 below, assume that the retrieval device enumerates multiple operating parameters as shown in Table 1, with each row of Table 1 representing one operating parameter. Optionally, when enumerating the number of resource blocks "blocks", each enumerated "block" may be a multiple of 16. For example, as shown in Table 1 below, the number of resource blocks "blocks" enumerated can be 16, 32, or 64, etc.
[0066] When the retrieval device enumerates the number of threads "thread" included in each resource block, each enumerated "thread" may be a multiple of 16. For example, as shown in Table 1 below, the number of threads "thread" included in each resource block can be 16, 32, 64 or 128, etc.
[0067] When the retrieval device enumerates the shared memory size "memory" that each thread can use within a resource block, each enumerated "memory" may be a multiple of 16. For example, as shown in Table 1 below, each enumerated "memory" may be a value such as 16k, 32k, or 64k.
[0068] Table 1
[0069] Serial Number The number of resource blocks. Number of threads Shared memory size "memory" 1 16 16 16k 2 16 32 16k 3 16 64 16k 4 16 128 16k 5 32 16 32k 6 32 32 32k 7 32 64 32k 8 32 128 32k 9 64 16 64k 10 64 32 64k 11 64 64 64k 12 64 128 64k …… …… …… ……
[0070] In some embodiments, the performance of the target retrieval algorithm in retrieving data using target operating parameters includes the latency required for the target retrieval algorithm to retrieve data using target operating parameters. Optionally, in implementation,
[0071] Based on the m third feature vectors and target operating parameters, the retrieval device calculates the distance between the second feature vector of each second unstructured data in the first correspondence and the m third feature vectors using a target retrieval algorithm. It then selects the K second unstructured data from the first correspondence that have the smallest distance to the m third feature vectors. These K second unstructured data are the data retrieved by the retrieval device. The retrieval device times the process of retrieving these K second unstructured data using the m third feature vectors and target operating parameters to obtain the time delay required for the target retrieval algorithm to retrieve the data using the target operating parameters.
[0072] In some embodiments, the retrieval device includes a graphics processing unit (GPU), which includes at least one smart media card (SM).
[0073] In some embodiments, the target operating parameters include the number of resource blocks "block1", the number of threads included in the resource blocks "thread1", and / or the size of shared memory used by the resource blocks "memory1", etc. The process by which the retrieval device retrieves the K pieces of second unstructured data is as follows:
[0074] The retrieval device allocates "block1" resource blocks and shared memory for each resource block based on target operating parameters. Each resource block in "block1" includes "thread1" threads, and the size of the shared memory allocated to each resource block is equal to "memory1". Each resource block in "block1" corresponds to a portion of records in a first correspondence, and the records corresponding to each resource block are different. For any given resource block, the threads in that resource block are used in the target retrieval algorithm, enabling the threads in the resource block to calculate the distances between the m third feature vectors and the second feature vectors of the second unstructured data in each record corresponding to that resource block. The shared memory corresponding to that resource block is used to store the distances calculated by the threads in that resource block. Thus, the distances calculated by the threads in each resource block are the distances between the m third feature vectors and the second feature vectors of each second unstructured data in the first correspondence. The retrieval device selects the K second unstructured data whose second feature vectors have the smallest distances to the m third feature vectors from the first correspondence.
[0075] For example, see Figure 4 Assuming the target operating parameters have a resource block count of 4, the retrieval device allocates 4 resource blocks: resource block A, resource block B, resource block C, and resource block D. Resource block A corresponds to records in rows 0-31, 128-159, 256-278, ... in the first correspondence. Resource block B corresponds to records in rows 32-63, 160-191, 288-319, ... in the first correspondence. Resource block C corresponds to records in rows 64-95, 192-223, 320-351, ... in the first correspondence. Resource block D corresponds to records in rows 96-127, 224-255, 352-383, ... in the first correspondence. In this way, resource blocks A, B, C, and D can calculate their distances in parallel, thereby improving the efficiency of data retrieval.
[0076] In some embodiments, for any given resource block, the threads within that resource block run on a Single Message Module (SM) of the GPU in the retrieval device. Alternatively, for any SM in the GPU, the SM may run threads from one or more resource blocks, thereby effectively utilizing the parallel architecture of the GPU's multiple SMs and improving the efficiency of data retrieval.
[0077] Step 303: The retrieval device obtains the first operating parameters of the target retrieval algorithm and the optimal performance of the retrieval data. The first operating parameters are the operating parameters used by the target retrieval algorithm when the performance of the retrieval data is optimal among the multiple operating parameters.
[0078] Since the retrieval device has obtained the performance of the target retrieval algorithm in retrieving data using each running parameter, the retrieval device selects the best performance from the performance of the retrieved data corresponding to each running parameter, and uses the running parameter corresponding to the best performance as the first running parameter of the target retrieval algorithm.
[0079] The target retrieval algorithm is one of the multiple retrieval algorithms. For each of the other retrieval algorithms, each of the other retrieval algorithms is used as the target retrieval algorithm, and the operations of steps 302 and 303 above are executed respectively. This obtains the first running parameters and the optimal performance of the retrieval data for each of the multiple retrieval algorithms. Then, step 304 is executed.
[0080] Step 304: The retrieval device selects the retrieval algorithm whose performance satisfies the first condition from the multiple retrieval algorithms as the first retrieval algorithm, and stores m, the first retrieval algorithm and the first running parameters of the first retrieval algorithm in the second correspondence relationship.
[0081] In step 304, the retrieval device selects the retrieval algorithm with the best performance in retrieving data from the plurality of retrieval algorithms as the first retrieval algorithm, or selects the retrieval algorithm with the best performance in retrieving data exceeding a performance threshold from the plurality of retrieval algorithms as the first retrieval algorithm.
[0082] For a numerical range greater than or equal to 1 and less than or equal to M, select an integer from the unselected integers in the range as m, and then repeat steps 301-304 above. After each integer in the data range is selected, the second correspondence stores the first retrieval algorithm and the first running parameters corresponding to each integer in the numerical range.
[0083] In some embodiments, in step 304, the retrieval device may also store the correspondence between m and the first retrieval algorithm in a second correspondence.
[0084] In this embodiment, the retrieval device selects an integer m, obtains m third feature vectors, and based on these m third feature vectors, obtains the best performance of each of a plurality of retrieval algorithms in retrieving data. It then selects the retrieval algorithm whose best performance satisfies a first condition from among the plurality of retrieval algorithms as the first retrieval algorithm, and stores m and the first retrieval algorithm in a second correspondence. Thus, when the retrieval device receives a retrieval request including n feature vectors, it obtains the first retrieval algorithm from the second correspondence based on n, whose performance in retrieving data using these n feature vectors satisfies the first condition, and uses the first retrieval algorithm to retrieve data, thereby improving the efficiency of data retrieval.
[0085] See Figure 5 This application provides a method 500 for retrieving data, which is applied to... Figure 1 or Figure 2 The network architecture 100 is shown. The method 500 includes the following steps 501 to 509.
[0086] Step 501: The equalization device receives a first search request, which includes the first unstructured data to be searched.
[0087] When a user needs to retrieve data using the first unstructured data, the user can send a first retrieval request to the equalization device using the terminal device. The first retrieval request includes the first unstructured data.
[0088] The first type of unstructured data may be images, videos, audio, or user logs.
[0089] Step 502: The equalization device sends a first search request to the first device.
[0090] In step 502, the load balancing device selects one first device from multiple first devices based on the load balancing strategy and sends a first retrieval request to the selected first device.
[0091] Step 503: The first device receives the first retrieval request and obtains n first feature vectors based on the first unstructured data included in the first retrieval request, where n is an integer greater than or equal to 1.
[0092] Each of the n first feature vectors includes D features of the first unstructured data.
[0093] In step 503, the first device receives a first retrieval request, inputs the first unstructured data included in the first retrieval request into the feature vector acquisition model, so that the feature vector acquisition model acquires n first feature vectors of the first unstructured data based on the first unstructured data, and acquires the n first feature vectors of the first unstructured data output by the feature vector acquisition model.
[0094] Step 504: The first device sends a second retrieval request to each of the Q retrieval clusters. The second retrieval request includes the n first feature vectors, where Q is an integer greater than 1.
[0095] In some embodiments, the first retrieval request sent by the terminal device to the equalization device may include n first feature vectors of the first unstructured data. Therefore, step 503 is an optional step. When the first retrieval request includes the n first feature vectors, after receiving the first retrieval request, the first device sends a second retrieval request to each retrieval cluster, and the second retrieval request includes the n first feature vectors.
[0096] For any one of the Q retrieval clusters, the retrieval cluster includes at least one retrieval device, and one of the retrieval devices in the retrieval cluster is a master device. The retrieval devices in the retrieval cluster that are identified as the master device will receive a second retrieval request. That is, in any retrieval cluster, one retrieval device will perform the operation in step 505 below.
[0097] Step 505: The retrieval device receives the second retrieval request and obtains the first retrieval algorithm based on n. The first retrieval algorithm is a retrieval algorithm whose performance in retrieving data using the n first feature vectors meets the first condition.
[0098] In some embodiments, the retrieval device may also obtain a first operating parameter based on n, which is the operating parameter used when the performance of the first retrieval algorithm in retrieving data is optimal.
[0099] In step 505, based on n, the first retrieval algorithm and the first running parameters corresponding to n are obtained from the second correspondence.
[0100] Since the first retrieval algorithm is the retrieval algorithm whose performance in retrieving data using the n first feature vectors meets the first condition, it means that the first retrieval algorithm is the best performing retrieval algorithm using the n first feature vectors, or that the first retrieval algorithm exceeds the performance threshold when retrieving data using the n first feature vectors. Therefore, using the first retrieval algorithm to retrieve data can significantly improve the efficiency of data retrieval.
[0101] The second correspondence may be adopted. Figure 3 The method shown is 300.
[0102] Step 506: Based on the n first feature vectors, the retrieval device retrieves K second unstructured data from the first correspondence using the first retrieval algorithm.
[0103] The first correspondence is used to store the correspondence between the second unstructured data and the second feature vector of the second unstructured data. The retrieval cluster to which the retrieval device belongs includes the first correspondence, which can be shared by each retrieval device in the retrieval cluster.
[0104] In step 506, the retrieval device, based on the n first feature vectors and the second feature vector of each second unstructured data in the first correspondence, calculates the distance between the second feature vector of each second unstructured data in the first correspondence and the n first feature vectors using a first retrieval algorithm. From the first correspondence, the K second unstructured data with the smallest distance between their second feature vectors and the n first feature vectors are selected.
[0105] In step 506, the retrieval device may also retrieve K second unstructured data from the first correspondence based on the n first feature vectors and the first operating parameters using the first retrieval algorithm.
[0106] The first running parameters include one or more of the following: the number of resource blocks used by the first retrieval algorithm "block2", the number of threads included in the resource block "thread2", or the size of shared memory used by the resource block "memory2".
[0107] In step 506, the retrieval device allocates "block2" resource blocks and shared memory for each resource block based on the first operating parameters. Each of the "block2" resource blocks includes "thread2" threads, and the size of the shared memory allocated to each resource block is equal to "memory2". For each of the "block2" resource blocks, each resource block corresponds to a portion of the records in the first correspondence, and the records corresponding to each resource block are different. For any given resource block, the threads in that resource block run the first retrieval algorithm, enabling the threads in that resource block to calculate the distance between the second feature vector of the second unstructured data in each record corresponding to that resource block and the n first feature vectors. The shared memory corresponding to that resource block is used to store the distances calculated by the threads in that resource block. Thus, the distances calculated by the threads in each resource block are the distances between the n first feature vectors and the second feature vectors of each second unstructured data in the first correspondence. The retrieval device selects the K second unstructured data from the first correspondence whose second feature vectors have the smallest distances to the n third feature vectors.
[0108] Step 507: The retrieval device sends a second retrieval response to the first device, the second retrieval response including the K second unstructured data.
[0109] In some embodiments, the second retrieval response may further include the distance between the second feature vector of each of the K second unstructured data and the n first feature vectors.
[0110] When a retrieval device in each of the Q retrieval clusters retrieves K pieces of second unstructured data, it sends a second retrieval response to the first device.
[0111] Step 508: The first device receives a second retrieval response from the retrieval device in each of the Q retrieval clusters, and selects L second unstructured data from the second unstructured data included in the Q second retrieval responses, where L is an integer greater than or equal to 1 and less than or equal to K.
[0112] In step 508, the first device receives a total of Q second retrieval responses, each second retrieval response including K second unstructured data, and the distance between the n first feature vectors and the second feature vector of each of the K second unstructured data. Therefore, the first device receives a total of Q*K second unstructured data and the distance between the second feature vector of each of the Q*K second unstructured data and the n first feature vectors. The first device then selects L second unstructured data from the Q*K second unstructured data whose second feature vectors have the smallest distances to the n first feature vectors.
[0113] Step 509: The first device sends a first search response, which includes the L second unstructured data.
[0114] In step 509, the first device sends a first search response to the terminal device corresponding to the user. The first search response includes the L second unstructured data.
[0115] The feature vector acquisition model described above is trained based on at least one training sample. Each training sample includes an unstructured data and at least one feature vector. Each feature vector includes D features of the unstructured data.
[0116] In some embodiments, the process of training the feature vector to obtain the model includes the following operations (1)-(3).
[0117] (1): Based on the feature vector to be trained, obtain the model and the unstructured data in each training sample, and obtain at least one feature vector corresponding to each training sample.
[0118] For each training sample, at least one feature vector corresponding to the training sample is the feature vector output by the model for obtaining the feature vector of the training sample after processing the unstructured data in the training sample.
[0119] The traffic type identification models to be trained include convolutional neural networks, random forest algorithms, logistic regression algorithms, or support vector machines (SVMs).
[0120] In operation (1), the unstructured data in each training sample is input into the feature vector acquisition model to be trained, so that the feature vector acquisition model to be trained can acquire at least one feature vector corresponding to each training sample based on the unstructured data in each training sample, and acquire at least one feature vector corresponding to each training sample output by the feature vector acquisition module to be trained.
[0121] (2): Based on at least one feature vector in each training sample and at least one feature vector corresponding to each training sample, calculate the loss value through the loss function, and adjust the feature vector to be trained based on the loss value to obtain the parameters of the model.
[0122] (3): If it is determined to continue training the model for obtaining feature vectors to be trained, return to operation (1). If it is determined not to continue training the model for obtaining feature vectors to be trained, use the model for obtaining feature vectors to be trained as the model for obtaining feature vectors.
[0123] In some embodiments, when the training iterations of the feature vector acquisition model reach a specified number, it is determined that training of the feature vector acquisition model will cease. Alternatively,
[0124] The model obtains feature vectors using multiple validation samples, and its accuracy in acquiring feature vectors is used. If this accuracy exceeds a specified threshold, training the model to acquire feature vectors is discontinued. In implementation:
[0125] Multiple validation samples are obtained, each consisting of unstructured data and at least one feature vector. Based on the unstructured data in each validation sample and the feature vector to be trained, a model is acquired, and a corresponding feature vector is obtained for each validation sample. Based on at least one feature vector in each validation sample and the corresponding feature vector, the accuracy of the acquired feature vectors is calculated. If the accuracy does not exceed a specified accuracy threshold, training of the feature vector acquisition model continues; if the accuracy exceeds the specified accuracy threshold, training of the feature vector acquisition model is discontinued.
[0126] In this embodiment, the retrieval device receives a second retrieval request, which includes n first feature vectors of the first unstructured data to be retrieved. Based on n, a first retrieval algorithm is obtained that satisfies a first condition regarding the performance of retrieving data using the n first feature vectors. Thus, based on the n first feature vectors, the first retrieval algorithm retrieves K pieces of second unstructured data from the first correspondence, thereby improving the efficiency of data retrieval.
[0127] See Figure 6 This application provides a data retrieval device 600, which can be deployed in... Figure 1 or Figure 2 The device 600 can be deployed on the retrieval device in the network architecture 100 shown, or on... Figure 3 The method 300 or Figure 5 The retrieval device in the method 500. The device 600 includes:
[0128] The receiving unit 601 is used to receive a retrieval request, which includes n first feature vectors, the n first feature vectors being feature vectors of the first unstructured data to be retrieved, where n is an integer greater than or equal to 1;
[0129] Processing unit 602 is used to obtain a first retrieval algorithm based on n. The first retrieval algorithm is a retrieval algorithm whose performance in retrieving data using the n first feature vectors satisfies a first condition.
[0130] The processing unit 602 is further configured to retrieve at least one second unstructured data from the first correspondence relationship based on the n first feature vectors using a first retrieval algorithm. The first correspondence relationship is used to store the correspondence between the second unstructured data and the second feature vector of the second unstructured data.
[0131] Optionally, for details of the implementation process of receiving the retrieval request by the receiving unit 601, please refer to [link to relevant documentation]. Figure 5 The details of step 505 in method 500 shown will not be explained in detail here.
[0132] Optionally, for the detailed implementation process of the first retrieval algorithm obtained by the processing unit 602, please refer to [link / reference]. Figure 5 The details of step 505 in method 500 shown will not be explained in detail here.
[0133] Optionally, for details of the implementation process of processing unit 602 retrieving at least one second unstructured data, see [link to relevant documentation]. Figure 5 The details of step 506 in method 500 shown will not be explained in detail here.
[0134] Optionally, the processing unit 602 is used for:
[0135] The first running parameters are obtained based on n. The first running parameters are the running parameters used when the performance of the first retrieval algorithm in retrieving data meets the first condition.
[0136] Based on n first feature vectors and first operating parameters, at least one second unstructured data is retrieved from the first correspondence using a first retrieval algorithm.
[0137] Optionally, for details of how processing unit 602 obtains the first operating parameter, please refer to [link to relevant documentation]. Figure 5 The details of step 505 in method 500 shown will not be explained in detail here.
[0138] Optionally, for details of the processing unit 602 retrieving at least one second unstructured data based on n first feature vectors and first operating parameters, please refer to [link to relevant documentation]. Figure 5 The details of step 506 in method 500 shown will not be explained in detail here.
[0139] Optionally, the processing unit 602 is used to obtain a first retrieval algorithm and a first operating parameter based on n and a second correspondence, wherein the second correspondence includes n, the first retrieval algorithm, and the first operating parameter.
[0140] Optionally, for details of the implementation process of the processing unit 602 obtaining the first retrieval algorithm and the first operating parameters based on n and the second correspondence, please refer to [link to relevant documentation]. Figure 5 The details of step 505 in method 500 shown will not be explained in detail here.
[0141] Optionally, the processing unit 602 is further configured to:
[0142] Obtain the n third feature vectors of the third unstructured data;
[0143] Based on these n third feature vectors, the data retrieval performance of each of the multiple retrieval algorithms is obtained;
[0144] The association n is with the first retrieval algorithm, which is the retrieval algorithm whose data retrieval performance satisfies the first condition among the multiple retrieval algorithms.
[0145] Optionally, for details on how processing unit 602 acquires n third feature vectors, please refer to [link to relevant documentation]. Figure 3 The details of step 301 of method 300 shown will not be explained in detail here.
[0146] Optionally, for details on the implementation process of the processing unit 602 obtaining the performance of each retrieval algorithm in retrieving data, please refer to [link to relevant documentation]. Figure 3 The details of step 302 in method 300 shown will not be explained in detail here.
[0147] Optionally, for a detailed implementation of the association between processing unit 602 and the first retrieval algorithm, please refer to [link to relevant documentation]. Figure 3 The details of step 304 in method 300 shown will not be explained in detail here.
[0148] Optionally, the processing unit 602 is used to retrieve data in the first correspondence based on n third feature vectors using a first retrieval algorithm, and to obtain the performance of the first retrieval algorithm in retrieving data.
[0149] Optionally, for a detailed implementation process of the processing unit 602 obtaining the performance of the first retrieval algorithm in retrieving data based on n third feature vectors, please refer to [link to relevant documentation]. Figure 3 The details of step 303 in method 300 shown will not be explained in detail here.
[0150] Optionally, the processing unit 602 is further configured to:
[0151] Obtain multiple runtime parameters;
[0152] Based on n third feature vectors, the performance of the first retrieval algorithm in retrieving data using each of the multiple running parameters is obtained;
[0153] The association is n, the first running parameters, and the first retrieval algorithm. The first running parameters are the running parameters used by the first retrieval algorithm when the performance of retrieving data is optimal.
[0154] Optionally, for details on how processing unit 602 acquires multiple operating parameters, please refer to [link to relevant documentation]. Figure 3 The details of step 302 in method 300 shown will not be explained in detail here.
[0155] Optionally, for the detailed implementation process of the processing unit 602 obtaining the performance of the first retrieval algorithm in retrieving data using each of the multiple operating parameters, see [link to relevant documentation]. Figure 3 The details of step 302 in method 300 shown will not be explained in detail here.
[0156] Optionally, for a detailed implementation of the association between processing unit 602 and n, the first operating parameters, and the first retrieval algorithm, please refer to [link to relevant documentation]. Figure 3 The details of step 304 in method 300 shown will not be explained in detail here.
[0157] Optionally, the processing unit 602 is used to retrieve data in the first correspondence based on n third feature vectors and first operating parameters using a first retrieval algorithm, and to obtain the performance of the first retrieval algorithm in retrieving data using the first operating parameters.
[0158] Optionally, the processing unit 602 obtains the performance of the first retrieval algorithm based on n third feature vectors and the first operating parameters. For a detailed implementation process of the performance of the first retrieval algorithm using the first operating parameters, please refer to [link to relevant documentation]. Figure 3 The details of step 302 in method 300 shown will not be explained in detail here.
[0159] Optionally, the first running parameters include one or more of the following: the number of resource blocks used by the first retrieval algorithm, the number of threads included in the resource block, or the size of shared memory used by the resource block.
[0160] In this embodiment, the processing unit obtains a first retrieval algorithm based on n. The first retrieval algorithm is a retrieval algorithm whose performance in retrieving data using the n first feature vectors satisfies a first condition. Based on the n first feature vectors, at least one second unstructured data is retrieved from the first correspondence using the first retrieval algorithm. Since the first retrieval algorithm obtained by the processing unit is a retrieval algorithm whose performance in retrieving data using the n first feature vectors satisfies the first condition, the efficiency of data retrieval can be improved by retrieving at least one second unstructured data from the first correspondence using the first retrieval algorithm based on the n first feature vectors.
[0161] See Figure 7 This application provides a retrieval device 700, which can be... Figure 1 or Figure 2 The retrieval device in the network architecture 100 shown, or the retrieval device 700 may be... Figure 3 The method 300 or Figure 5 The retrieval device 700 in method 500 includes at least one processor 701, internal connections 702, a memory 703, and at least one transceiver 704.
[0162] The retrieval device 700 is a hardware-structured device.
[0163] In some embodiments, it can be used to implement Figure 6 The functional modules in the device 600. For example, those skilled in the art will conceive of them. Figure 6 The processing unit 602 in the illustrated device 600 can be implemented by the at least one processor 701 calling code in the memory 703. Figure 6 The receiving unit 601 in the illustrated device 600 can be implemented by the at least one transceiver 704.
[0164] Optionally, the processor 701 described above may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present application.
[0165] The aforementioned internal connection 702 may include a pathway for transmitting information between the aforementioned components. Optionally, the internal connection 702 may be a single board or a bus, etc.
[0166] The transceiver 704 described above is used to communicate with other nodes or communication networks.
[0167] The aforementioned memory 703 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor.
[0168] The memory 703 stores the application code that executes the solution of this application, and its execution is controlled by the processor 701. The processor 701 executes the application code stored in the memory 703, and cooperates with at least one transceiver 704, thereby enabling the retrieval device 700 to perform the functions of the method of this patent.
[0169] In a specific implementation, as one example, the processor 701 may include one or more CPUs, for example... Figure 7 CPU0 and CPU1 in the CPU.
[0170] In a specific implementation, as one example, the retrieval device 700 may include multiple processors, for example... Figure 7Processors 701 and 707 are mentioned. Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor here can refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).
[0171] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0172] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for retrieving data, characterized in that, The method includes: Receive a retrieval request, the retrieval request including n first feature vectors, the n first feature vectors are feature vectors of the first unstructured data to be retrieved, and n is an integer greater than or equal to 1; The first retrieval algorithm is obtained based on n and the second correspondence. The first retrieval algorithm is a retrieval algorithm whose performance in retrieving data using the n first feature vectors meets the first condition. The second correspondence is used to store the correspondence between n and the retrieval algorithm. Based on the n first feature vectors, at least one second unstructured data is retrieved from the first correspondence using the first retrieval algorithm. The first correspondence is used to store the correspondence between the second unstructured data and the second feature vector of the second unstructured data.
2. The method as described in claim 1, characterized in that, The method further includes: The first operating parameter is obtained based on n. The first operating parameter is the operating parameter used when the performance of the first retrieval algorithm in retrieving data meets the first condition. The step of retrieving at least one second unstructured data from the first correspondence relationship based on the n first feature vectors using the first retrieval algorithm includes: Based on the n first feature vectors and the first operating parameters, the first retrieval algorithm retrieves at least one second unstructured data in the first correspondence.
3. The method as described in claim 2, characterized in that, The step of obtaining the first retrieval algorithm and the first running parameters based on n includes: The first retrieval algorithm and the first running parameters are obtained based on n and the second correspondence, wherein the second correspondence includes n, the first retrieval algorithm and the first running parameters.
4. The method according to any one of claims 1-3, characterized in that, The method further includes: Obtain the n third feature vectors of the third unstructured data; Based on the n third feature vectors, the data retrieval performance of each of the multiple retrieval algorithms is obtained; The association n is with the first retrieval algorithm, where the first retrieval algorithm is the retrieval algorithm whose data retrieval performance satisfies the first condition among the plurality of retrieval algorithms.
5. The method as described in claim 4, characterized in that, The process of obtaining the data retrieval performance of each of the multiple retrieval algorithms based on the n third feature vectors includes: Based on the n third feature vectors, data is retrieved from the first correspondence using the first retrieval algorithm, and the performance of the first retrieval algorithm in retrieving data is obtained.
6. The method as described in claim 4, characterized in that, The method further includes: Obtain multiple runtime parameters; Based on the n third feature vectors, the performance of the first retrieval algorithm in retrieving data using each of the multiple running parameters is obtained; The first running parameter is associated with n, the first running parameter and the first retrieval algorithm. The first running parameter is the running parameter used by the first retrieval algorithm when the performance of retrieving data is optimal.
7. The method as described in claim 6, characterized in that, The step of obtaining the performance of the first retrieval algorithm in retrieving data using each of the plurality of operating parameters based on the n third feature vectors includes: Based on the n third feature vectors and the first operating parameters, data is retrieved from the first correspondence using the first retrieval algorithm, and the performance of the first retrieval algorithm in retrieving data using the first operating parameters is obtained.
8. The method as described in claim 2, 3, 6 or 7, characterized in that, The first operating parameters include one or more of the following: the number of resource blocks used by the first retrieval algorithm, the number of threads included in the resource block, or the size of shared memory used by the resource block.
9. A device for retrieving data, characterized in that, The device includes: A receiving unit is configured to receive a retrieval request, the retrieval request including n first feature vectors, the n first feature vectors being feature vectors of the first unstructured data to be retrieved, where n is an integer greater than or equal to 1; The processing unit is used to obtain a first retrieval algorithm based on n and a second correspondence. The first retrieval algorithm is a retrieval algorithm whose performance in retrieving data using the n first feature vectors meets a first condition. The second correspondence is used to store the correspondence between n and the retrieval algorithm. The processing unit is further configured to retrieve at least one second unstructured data from the first correspondence relationship based on the n first feature vectors using the first retrieval algorithm. The first correspondence relationship is used to store the correspondence between the second unstructured data and the second feature vector of the second unstructured data.
10. The apparatus as claimed in claim 9, characterized in that, The processing unit is used for: The first operating parameter is obtained based on n. The first operating parameter is the operating parameter used when the performance of the first retrieval algorithm in retrieving data meets the first condition. Based on the n first feature vectors and the first operating parameters, the first retrieval algorithm retrieves at least one second unstructured data in the first correspondence.
11. The apparatus as claimed in claim 10, characterized in that, The processing unit is used to obtain the first retrieval algorithm and the first operating parameters based on n and the second correspondence relationship, wherein the second correspondence relationship includes n, the first retrieval algorithm and the first operating parameters.
12. The apparatus according to any one of claims 9-11, characterized in that, The processing unit is further configured to: Obtain the n third feature vectors of the third unstructured data; Based on the n third feature vectors, the data retrieval performance of each of the multiple retrieval algorithms is obtained; The association n is with the first retrieval algorithm, where the first retrieval algorithm is the retrieval algorithm whose data retrieval performance satisfies the first condition among the plurality of retrieval algorithms.
13. The apparatus as claimed in claim 12, characterized in that, The processing unit is used to retrieve data in the first correspondence based on the n third feature vectors using the first retrieval algorithm, and to obtain the performance of the first retrieval algorithm in retrieving data.
14. The apparatus as claimed in claim 12, characterized in that, The processing unit is further configured to: Obtain multiple runtime parameters; Based on the n third feature vectors, the performance of the first retrieval algorithm in retrieving data using each of the multiple running parameters is obtained; The first running parameter is associated with n, the first running parameter and the first retrieval algorithm. The first running parameter is the running parameter used by the first retrieval algorithm when the performance of retrieving data is optimal.
15. The apparatus as claimed in claim 14, characterized in that, The processing unit is used to retrieve data in the first correspondence based on the n third feature vectors and the first running parameters using the first retrieval algorithm, and to obtain the performance of the first retrieval algorithm in retrieving data using the first running parameters.
16. The apparatus as claimed in claim 10, 11, 14 or 15, characterized in that, The first operating parameters include one or more of the following: the number of resource blocks used by the first retrieval algorithm, the number of threads included in the resource block, or the size of shared memory used by the resource block.
17. A device for retrieving data, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to cause the device to perform the method as described in any one of claims 1-8.
18. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-8.
19. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-8.