Method, device, electronic device and readable storage medium for searching target items
By using the target knowledge base to determine the probability of target items in each to-select area and searching in order from high to low, the problem of low robot search efficiency in the existing technology is solved, and more efficient item search and improved user experience is achieved.
Patent Information
- Application Number
- CN202210090141.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-25
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-01-25
AI Technical Summary
Existing robots are inefficient and lack targeting when finding targeted items.
By obtaining the search request, use the target knowledge base to determine the target probability of the target item in each to be selected, and find the target item in the corresponding area in the order of probability from high to low.
It improves the efficiency of the search for target items, enhances the user experience, and enhances the product competitiveness of the robot.
Smart Images

Figure CN114443729B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics, and in particular to a method, device, electronic device and readable storage medium for searching a target object. Background Art
[0002] With the advancement of technology, robots are gradually entering people's daily lives. Users may have the need to ask robots to find target objects. The current way for robots to find objects is: the robot determines an environment map containing multiple areas, and then searches for objects one by one in each area in the environment map. However, this method does not have a targeted search, resulting in low search efficiency. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a method, device, electronic device and readable storage medium for searching a target object, so as to solve the problem of low efficiency in searching for an object. The specific technical solution is as follows:
[0004] In a first aspect, a method for searching a target object is provided, the method comprising:
[0005] Obtaining a search request, wherein the search request is used to request to search for a target item;
[0006] According to the search request, determining the target probability that the target object is located in each to-be-selected area through a target knowledge base, wherein the target knowledge base contains a preset probability that each type of to-be-selected object is located in each to-be-selected area;
[0007] According to the order of the target probability from high to low, the target object is searched in the corresponding candidate areas in turn.
[0008] Optionally, before obtaining the search request, the method further includes:
[0009] Acquire a priori knowledge base, wherein the priori knowledge base pre-stores a priori probability that each type of to-be-selected item is located in part of the to-be-selected area;
[0010] Determine multiple sets of feature value sets according to the feature dimensions of the to-be-selected items and the to-be-selected areas, wherein each set of feature value sets includes a feature value of each feature corresponding to each to-be-selected area and a feature value of each feature corresponding to each type of to-be-selected items, and the values of the feature values are randomly generated;
[0011] According to the eigenvalues in each set of eigenvalues, the estimated probability of each type of candidate item being located in each candidate area is obtained;
[0012] Selecting a target feature value set from the multiple sets of feature value sets according to the similarity between the prior probability and the estimated probability;
[0013] A target knowledge base is generated according to the target feature values in the target feature value set, wherein the number of preset probabilities included in the target knowledge base is greater than the number of prior probabilities included in the prior knowledge base.
[0014] Optionally, determining a plurality of sets of feature value sets according to feature dimensions of the to-be-selected items and the to-be-selected areas includes:
[0015] Determine a target feature dimension, wherein the target feature dimension is used to indicate the number of features, and both the to-be-selected object and the to-be-selected area correspond to the target feature dimension;
[0016] Generate a plurality of feature values of random values according to the target feature dimension corresponding to each type of to-be-selected items and the target feature dimension corresponding to each to-be-selected area;
[0017] Each set of feature values is composed of the feature values of the multiple random values.
[0018] Optionally, obtaining the estimated probability of each type of to-be-selected item being located in each to-be-selected area according to the feature values in each set of feature values includes:
[0019] Determining a priori regions and a priori items corresponding to the priori probabilities contained in the priori knowledge base;
[0020] In each set of the feature value sets, determining a region feature value of each feature corresponding to the prior region and an item feature value of each feature corresponding to the prior item;
[0021] Determine the product of the region feature value and the item feature value corresponding to the same feature;
[0022] The products corresponding to different features are summed to obtain the estimated probability that the priori object is located in the priori area.
[0023] Optionally, selecting a target feature value set from the multiple sets of feature value sets according to the similarity between the prior probability and the estimated probability includes:
[0024] For each set of feature value sets, the following operations are performed: according to the estimated probability corresponding to each prior probability in the prior knowledge base, multiple pairs of prior probabilities and estimated probabilities are obtained; the difference between each pair of prior probabilities and estimated probabilities is determined; and the sum of each pair of differences is determined;
[0025] Find a target feature value set with the smallest sum value from the multiple sets of feature value sets.
[0026] Optionally, generating a target knowledge base according to the target feature value in the target feature value set includes:
[0027] Determine any missing prior probability in the prior knowledge base, and the preset area and preset item corresponding to the missing prior probability;
[0028] In the target feature value set, determine the preset area feature value of each feature corresponding to the preset area and the preset item feature value of each feature corresponding to the preset item;
[0029] Determine the product of the preset region feature value and the preset item feature value corresponding to the same feature;
[0030] The products of different features are summed to obtain the preset probability that the preset object is located in the preset area;
[0031] The preset probability is filled into the prior knowledge base to obtain the target knowledge base.
[0032] Optionally, according to the search request, determining the target probability that the target object is located in each candidate area through a target knowledge base includes:
[0033] Determining a target item category of the target item according to the search request;
[0034] The target probability that an object of the target object category is located in each candidate area is determined through the target knowledge base.
[0035] In a second aspect, a device for searching a target object is provided, the device comprising:
[0036] An acquisition module, used to acquire a search request, wherein the search request is used to request to search for a target item;
[0037] A determination module, configured to determine, according to the search request, a target probability that the target object is located in each to-be-selected area through a target knowledge base, wherein the target knowledge base contains a preset probability that each type of to-be-selected object is located in each to-be-selected area;
[0038] The search module is used to search for the target object in the corresponding candidate area in order of the target probability from high to low.
[0039] In a third aspect, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0040] Memory, used to store computer programs;
[0041] The processor is used to implement any of the steps of the method for searching for a target object when executing a program stored in the memory.
[0042] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the steps of the method for searching for a target item is implemented.
[0043] Beneficial effects of the embodiments of the present application:
[0044] An embodiment of the present application provides a method for searching for a target object. The robot obtains a search request, and based on the search request, determines the target probability that the target object is located in each candidate area through a target knowledge base, and then searches for the target object in the corresponding candidate areas in order of target probability from high to low.
[0045] In the present application, the robot can search for the target object in the corresponding candidate area in order from high to low target probability. The greater the target probability, the greater the chance of finding the target object, which improves the efficiency of finding the target object, enhances the user experience, and improves the product competitiveness of the robot.
[0046] Of course, implementing any product or method of the present application does not necessarily require achieving all of the above advantages at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0048] Figure 1 A flow chart of a method for searching a target object provided in an embodiment of the present application;
[0049] Figure 2 A flow chart of a method for generating a target knowledge base provided in an embodiment of the present application;
[0050] Figure 3 A schematic diagram of the structure of a target object search device provided in an embodiment of the present application;
[0051] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0053] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application and have no specific meaning. Therefore, "module" and "component" can be used interchangeably.
[0054] An embodiment of the present application provides a method for searching a target object, which can be applied to a robot to search for a target object.
[0055] The following will describe in detail a method for searching a target object provided by an embodiment of the present application in combination with a specific implementation method. Figure 1 As shown, the specific steps are as follows:
[0056] Step 101: Get a search request.
[0057] The search request is used to request to search for a target item.
[0058] The robot obtains a search request for finding a target object, wherein the obtaining method includes but is not limited to obtaining instructions from a display screen of the robot, obtaining instructions sent by a mobile terminal, and obtaining instructions sent by a remote control.
[0059] Step 102: According to the search request, the target probability that the target object is located in each candidate area is determined through the target knowledge base.
[0060] The target knowledge base contains the preset probability that each type of to-be-selected object is located in each to-be-selected area.
[0061] The robot obtains a target knowledge base, which contains the preset probability that each type of candidate item is located in each candidate area. According to the search request, the robot determines the target item among the candidate items through the target knowledge base, and then determines the target probability that the target item is located in each candidate area.
[0062] Among them, each category of to-be-selected items in the target knowledge base may include one to-be-selected item or multiple to-be-selected items. If it is one to-be-selected item, the preset probability is the probability of the to-be-selected item in each to-be-selected area; if it is a category of to-be-selected items, the preset probability is the probability of the category of to-be-selected items in each to-be-selected area.
[0063] If each category of candidate items in the target knowledge base includes multiple candidate items, after obtaining the search request, the robot must first determine the target item category of the target item, and then determine the target probability that the item corresponding to the target item category is located in each candidate area based on the target knowledge base.
[0064] The method for constructing the prior knowledge base may be any of the following: designed by engineers; constructed by robots through patrolling; constructed by robots through interaction with users; constructed by robots through querying data.
[0065] Step 103: Determine to search for target objects in the corresponding candidate areas in order of target probability from high to low.
[0066] The robot obtains the current environment map and current position. The current environment map is a distribution map of multiple candidate areas. The robot plans paths for multiple candidate areas according to the current environment map in order of target probability from high to low, and then starts from the current position and searches for the target object in the corresponding candidate areas in turn.
[0067] If the robot finds the target object in the candidate area before the last candidate area, there is no need to search the subsequent candidate areas. If the robot does not find the target object in each candidate area, a warning message is issued, indicating that the target object does not exist in the current environment map.
[0068] In the present application, the robot can search for the target object in the corresponding candidate area in order from high to low target probability. The greater the target probability, the greater the chance of finding the target object, which improves the efficiency of finding the target object, enhances the user experience, and improves the product competitiveness of the robot.
[0069] As an optional implementation, before obtaining the search request, such as Figure 2 As shown, the method also includes:
[0070] Step 201: Acquire a priori knowledge base, wherein the priori knowledge base pre-stores a priori probability that each type of to-be-selected object is located in a portion of the to-be-selected area;
[0071] In the embodiment of the present application, the robot obtains a priori knowledge base, which includes a plurality of prior probabilities, which are the probabilities that each type of to-be-selected item is located in a portion of the to-be-selected area. A schematic diagram of the priori knowledge base is shown in Table 1.
[0072] Table 1
[0073] Prior probability Area to be selected 1 Area to be selected 2 Area to be selected 3 Area 4 Area to be selected 5 Item 1 0.5 0.5 Item 2 0.24 0.2 0.2 Item 3 0.5 0.3 0.2 Item 4 0.76 0.19
[0074] It can be seen that each category of selected items has multiple prior probabilities, which correspond to some of the selected areas respectively, and the prior probability represents the probability that the selected items exist in the selected area. Among them, the sum of the prior probabilities of multiple selected areas corresponding to the same category of selected items should be less than or equal to 1.
[0075] Exemplarily, item 1 has two prior probabilities, one of which is located in the to-be-selected area 2 and the other is located in the to-be-selected area 4, indicating that the prior probability of item 1 existing in the to-be-selected area 2 is 0.5, and the probability of item 1 existing in the to-be-selected area 4 is 0.5.
[0076] Step 202: Determine multiple sets of feature value sets based on the feature dimensions of the items to be selected and the areas to be selected.
[0077] Each set of feature value sets includes the feature value of each feature corresponding to each to-be-selected area and the feature value of each feature corresponding to each type of to-be-selected item, and the values of the feature values are randomly generated.
[0078] The robot determines the characteristic dimensions of the items to be selected and the areas to be selected, the characteristic dimensions are used to determine the number of characteristics, and the robot generates multiple sets of characteristic value sets according to the characteristic dimensions, wherein each set of characteristic value sets includes multiple characteristic values, and the values of the characteristic values are randomly generated;
[0079] A set of feature value sets includes the feature value of each feature corresponding to each area to be selected, as shown in Table 2, and a set of feature value sets also includes the feature value of each feature corresponding to each type of item to be selected, as shown in Table 3. Table 2 is a schematic diagram of the feature values of the area to be selected in a set of feature value sets. Table 3 is a schematic diagram of the feature values of the item to be selected in a set of feature value sets.
[0080] Table 2
[0081]
[0082] Table 3
[0083]
[0084] in, and The feature values of the first features of the to-be-selected region i and the to-be-selected object j respectively; and The feature values of the second feature of the to-be-selected area i and the to-be-selected item j respectively represent the feature values of the second feature of the to-be-selected area i and the to-be-selected item j, and so on.
[0085] Step 203: According to the feature values in each set of feature values, the estimated probability of each type of to-be-selected item being located in each to-be-selected area is obtained.
[0086] Each set of feature values includes the feature value of each feature corresponding to each to-be-selected area and the feature value of each feature corresponding to each category of to-be-selected items. The robot can obtain the estimated probability that each category of to-be-selected items is located in each to-be-selected area based on the feature value of each feature corresponding to a to-be-selected area and the feature value of each feature corresponding to a category of to-be-selected items.
[0087] Step 204: Select a target feature value set from multiple sets of feature value sets based on the similarity between the prior probability and the estimated probability.
[0088] A set of feature value sets includes multiple categories of items to be selected and multiple areas to be selected. One category of items to be selected and one area to be selected together correspond to an estimated probability. The robot determines the prior probability in the prior knowledge base, and then searches for the corresponding estimated probability in the feature value set. The robot uses the difference between the prior probability and the corresponding estimated probability as the similarity between the prior probability and the estimated probability, and then selects the target feature value set with the largest similarity from the multiple sets of feature value sets.
[0089] Step 205: Generate a target knowledge base according to the target feature values in the target feature value set, wherein the number of preset probabilities included in the target knowledge base is greater than the number of prior probabilities included in the prior knowledge base.
[0090] After the robot determines the target feature value set, it determines the target feature value in the target feature value set, and then obtains multiple preset probabilities according to the target feature value through the target formula. The robot can generate a target knowledge base according to the preset probability of each type of item being located in each candidate area, or fill some of the preset probabilities into the prior knowledge base, improve the probabilities in the prior knowledge base, and thus obtain the target knowledge base. In this way, the number of preset probabilities contained in the target knowledge base is greater than the number of prior probabilities contained in the prior knowledge base.
[0091] In the present application, the robot can select a target feature value set from multiple sets of feature value sets based on the similarity between the prior probability and the estimated probability, and then generate a target knowledge base, so that the target knowledge base has a preset probability that each type of to-be-selected item is located in each to-be-selected area. The present application fits the preset probability in the target knowledge base through the prior probability in the prior knowledge base, which can improve the prior knowledge base and obtain multiple preset probabilities in the target knowledge base.
[0092] As an optional implementation, determining multiple groups of feature value sets based on the feature dimensions of the items to be selected and the areas to be selected includes: determining a target feature dimension, wherein the target feature dimension is used to indicate the number of features, and both the items to be selected and the areas to be selected correspond to the target feature dimension; generating multiple feature values of random numerical values based on the target feature dimension corresponding to each type of items to be selected and the target feature dimension corresponding to each area to be selected; and forming each group of feature value sets through the feature values of multiple random numerical values.
[0093] In an embodiment of the present application, the robot may first set multiple feature dimensions, and then select a target feature dimension from the multiple feature dimensions, wherein the feature dimension represents the number of features. Exemplarily, the robot determines 1 to N feature dimensions based on computing power and preset computing time, and then selects a target feature dimension n, wherein the target feature dimension n represents the number of features is n, i.e., includes n features. In an embodiment of the present application, the features corresponding to the selected items and the features corresponding to the selected areas are both n, as shown in Tables 2 and 3.
[0094] The robot determines the feature value of each feature corresponding to each category of items to be selected according to the target feature dimension corresponding to each category of items to be selected. The robot determines the feature value of each feature corresponding to each area to be selected according to the target feature dimension corresponding to each area to be selected. The values of the feature values are randomly generated. The robot combines the multiple feature values obtained above into a set of feature value sets. The robot generates multiple sets of feature value sets in the above manner.
[0095] As an optional implementation, obtaining the estimated probability that each type of candidate item is located in each candidate area based on the feature values in each set of feature values includes: determining the prior area and prior items corresponding to the prior probabilities contained in the prior knowledge base; in each set of feature values, determining the regional feature value of each feature corresponding to the prior area and the item feature value of each feature corresponding to the prior item; determining the product of the regional feature value and the item feature value corresponding to the same feature; and adding the products corresponding to different features to obtain the estimated probability that the prior item is located in the prior area.
[0096] In an embodiment of the present application, the robot determines the prior area and prior items corresponding to the prior probability contained in the prior knowledge base, and then determines the regional feature value of each feature corresponding to the prior area and the item feature value of each feature corresponding to the prior item in each set of feature values. Then, the target formula is used to determine the product of the regional feature value and the item feature value corresponding to the same feature, and then the products corresponding to different features are added to obtain the estimated probability that the prior item is located in the prior area.
[0097] Exemplarily, the robot uses a target formula to calculate the estimated probability. The target formula is as follows:
[0098]
[0099] Among them, p(y i , x j ) represents the estimated probability that the candidate item j is located in the candidate area i. and The feature values of the first feature of the selected region i and the object j respectively; and Represent the feature values of the second feature of the selected area i and item j respectively, and They represent the feature values of the nth feature of the selected region i and item j respectively, and ε represents the error value.
[0100] In the present application, the estimated probabilities obtained by the above method, and their corresponding prior probabilities all exist in the prior knowledge base, so that the similarity between the prior probability and the estimated probability can be accurately compared, and there will be no situation where the estimated probability is compared with the non-existent prior probability for similarity, thereby improving the accuracy of the calculation.
[0101] As an optional implementation, selecting a target feature value set from multiple sets of feature value sets based on the similarity between the prior probability and the estimated probability includes: performing the following operations for each set of feature value sets: obtaining multiple pairs of prior probabilities and estimated probabilities based on the estimated probability corresponding to each prior probability in the prior knowledge base; determining the difference between each pair of prior probabilities and estimated probabilities; determining the sum of each pair of differences; and searching for the target feature value set with the smallest sum from the multiple sets of feature value sets.
[0102] For the prior probability contained in the prior knowledge base, the robot determines the estimated probability corresponding to the prior probability in the feature value set, thus obtaining a pair of prior probability and estimated probability. The server obtains multiple pairs of prior probability and estimated probability in each set of feature value sets in the above manner. Then the difference between each pair of prior probability and estimated probability is determined, and the difference indicates the similarity between the preset probability and the prior probability. After the robot determines multiple pairs of differences in a set of feature value sets in the above manner, it determines the sum of the multiple pairs of differences in the feature value set. The robot searches for the target feature value set with the smallest sum in the multiple sets of feature value sets. Since the sum in the target feature value set is the smallest, indicating that the difference is also small, then the similarity between the estimated probability and the prior probability in the target feature value set is the largest.
[0103] The robot uses an optimization formula to calculate the sum of multiple pairs of differences in each set of eigenvalues. The optimization formula is as follows:
[0104]
[0105] Among them, P prior (y i , x j ) represents the prior probability that the candidate item j is located in the candidate area i.
[0106] As an optional implementation, generating a target knowledge base according to the target feature values in the target feature value set includes: determining the prior probability of any missing feature in the prior knowledge base, and the preset area and preset item corresponding to the missing prior probability; determining the preset area feature value of each feature corresponding to the preset area and the preset item feature value of each feature corresponding to the preset item in the target feature value set; determining the product of the preset area feature value and the preset item feature value corresponding to the same feature; adding the products of different features to obtain the preset probability that the preset item is located in the preset area; and filling the preset probability into the prior knowledge base to obtain the target knowledge base.
[0107] In an embodiment of the present application, the robot can calculate the missing prior probabilities in the prior knowledge base, and then fill the calculated partial preset probabilities into the prior knowledge base to obtain the target knowledge base. This eliminates the need to calculate all the preset probabilities, thereby improving the generation efficiency of the target knowledge base.
[0108] The specific process of generating the target knowledge base is as follows: the robot determines the prior probability of any missing item in the prior knowledge base, and determines the preset area and preset item corresponding to the missing prior probability, and then determines the preset area feature value of each feature corresponding to the preset area and the preset item feature value of each feature corresponding to the preset item in the target feature value set, and then uses the target formula to determine the product of the preset area feature value and the preset item feature value corresponding to the same feature, and then adds the products of different features to obtain the preset probability that the preset item is located in the preset area, and finally fills the preset probability into the prior knowledge base to obtain the target knowledge base.
[0109] Optionally, the embodiment of the present application also provides a processing flow chart of a method for searching a target object, and the specific steps are as follows.
[0110] Step 1: Obtain a priori knowledge base, wherein a plurality of prior probabilities are pre-stored in the priori knowledge base.
[0111] Step 2: Determine the prior regions and prior items corresponding to the prior probabilities contained in the prior knowledge base.
[0112] Step 3: In each set of feature value sets, determine the region feature value of each feature corresponding to the prior region and the item feature value of each feature corresponding to the prior item.
[0113] Step 4: Use the target formula to obtain multiple estimated probabilities corresponding to each set of eigenvalues.
[0114] Step 5: In each set of eigenvalues, use the optimization formula to obtain the difference between each pair of prior probabilities and estimated probabilities, and determine the sum of each pair of differences.
[0115] Step 6: Select the target eigenvalue set with the smallest sum from multiple sets of eigenvalue sets.
[0116] Step 7: Use the target feature value in the target feature value set to obtain the target knowledge base.
[0117] Step 8: According to the search request, the target probability that the target object is located in each candidate area is determined through the target knowledge base.
[0118] Step 9: Search for the target object in the corresponding candidate area in order of target probability from high to low.
[0119] Based on the same technical concept, the embodiment of the present application also provides a device for searching a target object, such as Figure 3 As shown, the device comprises:
[0120] A first acquisition module 301 is used to acquire a search request, wherein the search request is used to request to search for a target item;
[0121] A first determination module 302 is used to determine the target probability that the target object is located in each to-be-selected area through a target knowledge base according to the search request, wherein the target knowledge base contains a preset probability that each type of to-be-selected object is located in each to-be-selected area;
[0122] The search module 303 is used to search for target objects in the corresponding candidate areas in order of target probability from high to low.
[0123] Optionally, the device further comprises:
[0124] A second acquisition module is used to acquire a priori knowledge base, wherein the priori knowledge base pre-stores a priori probability that each type of to-be-selected item is located in a portion of the to-be-selected area;
[0125] A third determination module is used to determine multiple sets of feature value sets according to the feature dimensions of the to-be-selected items and the to-be-selected areas, wherein each set of feature value sets includes a feature value of each feature corresponding to each to-be-selected area and a feature value of each feature corresponding to each type of to-be-selected items, and the values of the feature values are randomly generated;
[0126] An obtaining module is used to obtain an estimated probability of each type of candidate item being located in each candidate area according to the feature values in each set of feature values;
[0127] A selection module is used to select a target feature value set from multiple sets of feature value sets according to the similarity between the prior probability and the estimated probability;
[0128] A generating module is used to generate a target knowledge base according to target feature values in a target feature value set, wherein the number of preset probabilities included in the target knowledge base is greater than the number of prior probabilities included in the prior knowledge base.
[0129] Optionally, the third determining module is used to:
[0130] Determine a target feature dimension, wherein the target feature dimension is used to indicate the number of features, and both the to-be-selected object and the to-be-selected area correspond to the target feature dimension;
[0131] Generate a plurality of feature values of random values according to the target feature dimension corresponding to each type of to-be-selected object and the target feature dimension corresponding to each to-be-selected area;
[0132] Each set of eigenvalues is composed of eigenvalues of multiple random values.
[0133] Optionally, get the module for:
[0134] Determine the prior regions and prior items corresponding to the prior probabilities contained in the prior knowledge base;
[0135] In each set of feature value sets, determine the region feature value of each feature corresponding to the prior region and the item feature value of each feature corresponding to the prior item;
[0136] Determine the product of the region feature value and the item feature value corresponding to the same feature;
[0137] The products corresponding to different features are added together to obtain the estimated probability that the prior item is located in the prior area.
[0138] Optionally, the selection module is used to:
[0139] For each set of feature value sets, the following operations are performed: according to the estimated probability corresponding to each prior probability in the prior knowledge base, multiple pairs of prior probabilities and estimated probabilities are obtained; the difference between each pair of prior probabilities and estimated probabilities is determined; and the sum of each pair of differences is determined;
[0140] Find the target eigenvalue set with the smallest sum from multiple sets of eigenvalue sets.
[0141] Optionally, the selection module is further used to:
[0142] Determine any missing prior probability in the prior knowledge base, and the preset area and preset item corresponding to the missing prior probability;
[0143] In the target feature value set, determine the preset area feature value of each feature corresponding to the preset area and the preset item feature value of each feature corresponding to the preset item;
[0144] Determine the product of the preset region feature value and the preset item feature value corresponding to the same feature;
[0145] The products of different features are summed to obtain the preset probability that the preset object is located in the preset area;
[0146] Fill the preset probability into the prior knowledge base to obtain the target knowledge base.
[0147] Optionally, the first determining module 302 is used to:
[0148] determining a target item category of the target item according to the search request;
[0149] The target probability that an object of the target object category is located in each candidate area is determined through the target knowledge base.
[0150] According to another aspect of the embodiments of the present application, the present application provides an electronic device, such as Figure 4 As shown, it includes a memory 403, a processor 401, a communication interface 402 and a communication bus 404. The memory 403 stores a computer program that can be run on the processor 401. The memory 403 and the processor 401 communicate through the communication interface 402 and the communication bus 404. When the processor 401 executes the computer program, the steps of the above method are implemented.
[0151] The memory and processor in the above electronic device communicate via a communication bus and a communication interface. The communication bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus may be divided into an address bus, a data bus, a control bus, etc.
[0152] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0153] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0154] According to another aspect of the embodiments of the present application, a computer-readable medium having a non-volatile program code executable by a processor is provided.
[0155] Optionally, in an embodiment of the present application, a computer-readable medium is configured to store program code for the processor to execute the above method.
[0156] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0157] When the embodiments of the present application are specifically implemented, reference may be made to the above-mentioned embodiments, which have corresponding technical effects.
[0158] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.
[0159] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0160] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0161] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0162] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0163] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0164] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0165] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk. It should be noted that, in this article, 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 that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.
[0166] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent 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 will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A method for searching a target object, characterized in that: The method comprises: Obtaining a search request, wherein the search request is used to request to search for a target item; According to the search request, determining the target probability that the target object is located in each to-be-selected area through a target knowledge base, wherein the target knowledge base contains a preset probability that each type of to-be-selected object is located in each to-be-selected area; Searching for the target object in the corresponding candidate areas in order of the target probability from high to low; Before obtaining the search request, the method further includes: Acquire a priori knowledge base, wherein the priori knowledge base pre-stores a priori probability that each type of to-be-selected item is located in part of the to-be-selected area; Determine multiple sets of feature value sets according to the feature dimensions of the to-be-selected items and the to-be-selected areas, wherein each set of feature value sets includes a feature value of each feature corresponding to each to-be-selected area and a feature value of each feature corresponding to each type of to-be-selected items, and the values of the feature values are randomly generated; According to the eigenvalues in each set of eigenvalues, the estimated probability of each type of candidate item being located in each candidate area is obtained; Selecting a target feature value set from the multiple sets of feature value sets according to the similarity between the prior probability and the estimated probability; A target knowledge base is generated according to the target feature values in the target feature value set, wherein the number of preset probabilities included in the target knowledge base is greater than the number of prior probabilities included in the prior knowledge base.
2. The method according to claim 1, characterized in that Determining multiple sets of feature value sets according to the feature dimensions of the to-be-selected items and the to-be-selected areas includes: Determine a target feature dimension, wherein the target feature dimension is used to indicate the number of features, and both the to-be-selected object and the to-be-selected area correspond to the target feature dimension; Generate a plurality of feature values of random values according to the target feature dimension corresponding to each type of to-be-selected items and the target feature dimension corresponding to each to-be-selected area; Each set of feature values is composed of the feature values of the multiple random values.
3. The method according to claim 1, characterized in that According to the eigenvalues in each set of eigenvalues, the estimated probability of each type of candidate item being located in each candidate area includes: Determining a priori regions and a priori items corresponding to the priori probabilities contained in the priori knowledge base; In each set of the feature value sets, determining a region feature value of each feature corresponding to the prior region and an item feature value of each feature corresponding to the prior item; Determine the product of the region feature value and the item feature value corresponding to the same feature; The products corresponding to different features are summed to obtain the estimated probability that the priori object is located in the priori area.
4. The method according to claim 1, characterized in that: Selecting a target feature value set from the plurality of feature value sets according to the similarity between the prior probability and the estimated probability includes: For each set of feature value sets, the following operations are performed: according to the estimated probability corresponding to each prior probability in the prior knowledge base, multiple pairs of prior probabilities and estimated probabilities are obtained; the difference between each pair of prior probabilities and estimated probabilities is determined; and the sum of each pair of differences is determined; Find a target feature value set with the smallest sum value from the multiple sets of feature value sets.
5. The method according to claim 4, characterized in that Generating a target knowledge base according to the target feature value in the target feature value set includes: Determine any missing prior probability in the prior knowledge base, and the preset area and preset item corresponding to the missing prior probability; In the target feature value set, determine the preset area feature value of each feature corresponding to the preset area and the preset item feature value of each feature corresponding to the preset item; Determine the product of the preset region feature value and the preset item feature value corresponding to the same feature; The products of different features are summed to obtain the preset probability that the preset object is located in the preset area; The preset probability is filled into the prior knowledge base to obtain the target knowledge base.
6. The method according to claim 1, characterized in that According to the search request, determining the target probability that the target object is located in each candidate area through the target knowledge base includes: Determining a target item category of the target item according to the search request; The target probability that an object of the target object category is located in each candidate area is determined through the target knowledge base.
7. A device for searching a target object, characterized in that: The device comprises: An acquisition module, used to acquire a search request, wherein the search request is used to request to search for a target item; A determination module, configured to determine, according to the search request, a target probability that the target object is located in each to-be-selected area through a target knowledge base, wherein the target knowledge base contains a preset probability that each type of to-be-selected object is located in each to-be-selected area; A search module, used to search for the target object in the corresponding candidate area in order of the target probability from high to low; The device also includes: A second acquisition module is used to acquire a priori knowledge base, wherein the priori knowledge base pre-stores a priori probability that each type of to-be-selected item is located in a portion of the to-be-selected area; A third determination module is used to determine multiple sets of feature value sets according to the feature dimensions of the to-be-selected items and the to-be-selected areas, wherein each set of feature value sets includes a feature value of each feature corresponding to each to-be-selected area and a feature value of each feature corresponding to each type of to-be-selected items, and the values of the feature values are randomly generated; An obtaining module is used to obtain an estimated probability of each type of candidate item being located in each candidate area according to the feature values in each set of feature values; A selection module is used to select a target feature value set from multiple sets of feature value sets according to the similarity between the prior probability and the estimated probability; A generating module is used to generate a target knowledge base according to target feature values in a target feature value set, wherein the number of preset probabilities included in the target knowledge base is greater than the number of prior probabilities included in the prior knowledge base.
8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 6 when executing a program stored in a memory.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Dynamic article searching method and device in home environment
CN110110245A