Retrieval method for numeric values within interval, storage medium, and computer
By establishing a numerical set and correspondence relationship, the search for interval values is realized, and the problem that the intermediate values of interval values cannot be retrieved in the prior art is solved, and the accuracy and efficiency of the search are improved.
Patent Information
- Application Number
- PCT/CN2024/098256
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-16
- Filing Date
- 2024-06-07
- Publication Date
- 2024-12-19
AI Technical Summary
The prior art cannot realize accurate search of interval values because it can only match the text clearly present in the database and cannot process the intermediate values of interval values, such as any values between 0 and 9, resulting in inaccurate search results.
By constructing the interval numerical search method, a numerical set is established, including the intermediate value of the interval numerical value, and a correspondence relationship with the document is established to realize the search of interval numerical values and improve the search accuracy.
By filling in part of the intermediate value of the interval value, the search for part of the intermediate value of the interval value can be achieved, the accuracy of the interval value search is improved, and the accuracy of the search results are ensured.
Smart Images

Figure CN2024098256_19122024_PF_FP_ABST
Abstract
Description
Interval value retrieval method, storage medium and computer Technical Field
[0001] The present invention relates to the field of information retrieval, and more particularly to an interval value retrieval method, a storage medium and a computer. Background Art
[0002] Using computers or the internet to search for data can help people quickly find what they need within vast amounts of data. Keyword search is a common method. Prior art keyword searches employ a "what you see is what you get" matching logic, meaning they only search for text already in the database, and then determine whether the user-entered keyword matches any existing text in the database. For example, if a user enters the number "3," a match will only be successful if the number "3" explicitly appears in the database.
[0003] The "what you see is what you get" keyword search matching logic of the existing technology cannot realize the search for the middle value of the interval value. The interval value expresses a range of values, and the middle value refers to the value between the minimum and maximum values of the interval value. For example, the interval value is 0 to 9, and the middle value is any value between 0 and 9, such as 3. According to the principle of "what you see is what you get", the interval value 0 to 9 can only represent two values 0 and 9. Therefore, the existing technology can only retrieve 0 and 9, and the values between 0 and 9 cannot be retrieved. For example, the keyword entered by the user is 3. Although 3 is between 0 and 9, it cannot be retrieved because 3 is not actually displayed, resulting in inaccurate search results. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide an interval value retrieval method, a storage medium and a computer.
[0005] The technical solution adopted by the present invention to solve the technical problem is: constructing an interval value retrieval method, including a value set establishment process and a value retrieval process;
[0006] The establishing of the value set comprises:
[0007] Step a1, detecting interval values in the document;
[0008] Step a2: obtaining a value set corresponding to the interval value according to a preset algorithm, wherein the value set includes the middle value of the interval value;
[0009] Step a3: establishing a first correspondence between the value set and the document;
[0010] The numerical value retrieval process includes:
[0011] Step b1, receiving search information, wherein the search information includes a value to be searched;
[0012] Step b2, searching the value to be searched in the value set;
[0013] Step b3: If the value to be retrieved is in the value set, determine the document corresponding to the search information according to the first corresponding relationship.
[0014] Furthermore, in the interval value retrieval method of the present invention, the value set includes at least one intermediate value, and the intermediate value is greater than the minimum value of the interval value and less than the maximum value of the interval value.
[0015] Furthermore, in the interval value search method of the present invention, step a2 includes:
[0016] Starting from the minimum value of the interval, gradually increase the value according to the preset step size until the maximum value of the interval, each increase of the preset step size generates an intermediate value, and all the intermediate values obtained constitute the value set corresponding to the interval value; or
[0017] Starting from the maximum value of the interval value, the value is gradually reduced according to the preset step size until the minimum value of the interval value. Each time the preset step size is reduced, an intermediate value is generated, and all the intermediate values obtained constitute the value set corresponding to the interval value.
[0018] Furthermore, in the interval value search method of the present invention, after step a1 and before step a2, the method further includes:
[0019] Get the numerical unit corresponding to the interval value;
[0020] The preset step length corresponding to the numerical unit is searched according to a second corresponding relationship, where the second corresponding relationship is a corresponding relationship between the numerical unit and the preset step length.
[0021] Furthermore, in the interval value search method of the present invention, after step a1 and before step a2, the method further includes:
[0022] Obtain the numerical unit corresponding to the interval value and the product information to which the document belongs;
[0023] The preset step length corresponding to the numerical unit and the product information is searched according to a third corresponding relationship, where the third corresponding relationship is a corresponding relationship between the preset step length, the numerical unit, and the product information.
[0024] Furthermore, in the interval value retrieval method of the present invention, the step a1 includes: detecting the interval value in the document and the position information of the interval value in the document;
[0025] The step a3 includes: establishing a first correspondence between the value set and the document, and a fourth correspondence between the value set and the location information;
[0026] The step b3 includes: if the value to be retrieved is in the value set, determining the document corresponding to the retrieval information according to the first corresponding relationship, and determining the position of the retrieval information in the document according to the fourth corresponding relationship.
[0027] Furthermore, in the interval value search method of the present invention, the step a1 includes: detecting the interval value in the document and the numerical unit corresponding to the interval value;
[0028] The value set in step a2 includes the middle value of the interval value and the value unit;
[0029] The search information in step b1 includes the value to be searched and the value unit;
[0030] The step b2 includes: searching the value to be searched and the value unit in the value set;
[0031] In the step b3, if the value to be retrieved is included in the value set: if the value to be retrieved and the value unit are in the same value set.
[0032] Furthermore, in the interval value search method of the present invention, after step b3, the method further includes:
[0033] If it is determined according to the first corresponding relationship that the number of documents corresponding to the search information is more than one, the obtained documents are sorted and displayed according to a preset sorting rule.
[0034] In addition, the present invention further provides a computer-readable storage medium storing a computer program, wherein the computer program is suitable for being loaded by a processor to execute the steps of the interval value retrieval method as described above.
[0035] In addition, the present invention also provides a computer, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the above-mentioned interval value retrieval method by calling the computer program stored in the memory.
[0036] The present invention provides an interval value retrieval method, storage medium, and computer, which have the following beneficial effects: the present invention achieves retrieval of some intermediate values of interval values by filling in some intermediate values of interval values, thereby improving the accuracy of interval value retrieval. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0038] FIG1 is a flow chart of an interval value retrieval method provided by an embodiment of the present invention;
[0039] FIG2 is a flow chart of an interval value retrieval method provided by an embodiment of the present invention;
[0040] FIG3 is a flow chart of a method for retrieving interval values provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described in detail with reference to the accompanying drawings.
[0042] In a preferred embodiment, referring to FIG1 , the interval value retrieval method of this embodiment is applied to the retrieval field, including computer local data retrieval, server data retrieval, and cloud data retrieval. An interval value refers to an interval segment of a value, that is, a range of values. An interval value can be a numeric range consisting only of digits, such as 0 to 9; or it can be a range of values that includes numerical units, such as 0°C (degrees Celsius) to 9°C, 0m (meters) to 9m, 0A (amperes) to 9A, etc., where 0°C (degrees Celsius), m (meters), and A (amperes) are numerical units. Specifically, this interval value retrieval method includes a process for establishing a numerical set and a numerical retrieval process, each of which is described below.
[0043] First, before searching, a value set must be created. The process of creating the value set includes the following steps:
[0044] Step a1: Detect interval values in the document.
[0045] Specifically, in this embodiment, a document refers to a file containing certain data, particularly text, so that it can be used for text retrieval in this embodiment. It is understood that there are many file formats, and this embodiment does not limit them. Alternatively, documents include, but are not limited to, Word documents, TXT documents, PDF documents, Excel spreadsheets, PPT documents, web pages, and the like. Interval values are typically expressed in specific ways, using symbols such as "-," "~," "()," and "[]." For example, the interval values 0-9, 0~9, (0,9), and [0,9] can be expressed using symbols. They can also be expressed using text representing ranges, such as 0 to 9, from 0 to 9, and between 0 and 9. Based on the specific ways in which interval values are expressed, these specific expressions are created into interval value models, which are then used to detect interval values in documents that match the interval value model. For example, if text matching the interval value model "number-number" is detected in a document, it is considered an interval value. For example, 0-9 matches the interval value model "number-number." By using the interval value model, automatic detection of interval values in documents can be achieved without the need for manual search for interval values in documents, which is highly efficient and low-cost.
[0046] Step a2: Obtain a value set corresponding to the interval value according to a preset algorithm, where the value set includes the middle value of the interval value.
[0047] Specifically, after retrieving the interval values in the document, a value set corresponding to the interval value is obtained according to a preset algorithm. Each interval value corresponds to a value set, and the value set includes the intermediate values of the interval values. A value set includes at least one intermediate value, which is greater than the minimum value of the interval value and less than the maximum value of the interval value. It can be understood that the more intermediate values a value set corresponding to a particular interval value includes, the greater the probability of being retrieved, thereby increasing the probability of retrieval of the interval value. For example, for the interval values 0 to 9, the intermediate values can be 1, 2, 3, 4, 5, 6, 7, and 8. That is, the value set corresponding to the interval values 0 to 9 consists of the intermediate values 1, 2, 3, 4, 5, 6, 7, and 8. However, it should be noted that the value set does not include all values between the minimum and maximum values of the interval value, but rather includes as many values as possible. The more values selected, the greater the density, and the greater the probability of retrieval of the interval value. However, the more intermediate values, the greater the corresponding data processing volume, so it is necessary to strike a balance between the number of intermediate values and the probability of retrieval.
[0048] Step a3: Establish a first correspondence between the value set and the document.
[0049] Specifically, after obtaining the value set corresponding to a certain interval value, a first correspondence between the value set and the document is established. That is, a first correspondence between the value set and the document containing the corresponding interval value is established. If a document contains more than two interval values, then the document corresponds to multiple value sets. Typically, a computer, server, or cloud database stores a large number of documents. The interval values in each document are retrieved, and a value set corresponding to each document is established, thereby establishing a value set corresponding to the database.
[0050] It can be understood that after establishing the first correspondence, each middle value in the value set corresponds to a document, thus enabling retrieval of the middle value of a range of values within a document. It should be noted that the value set corresponding to a range of values in a document is newly generated data outside the document and does not belong to the document itself, nor does it require modification of the document. Instead, it is stored separately as separate data, and the first correspondence between the value set and the document is then established.
[0051] Secondly, after the value set is established, the value retrieval is performed. The value retrieval process includes the following steps:
[0052] Step b1: Receive search information, where the search information includes a value to be searched.
[0053] Specifically, the search information input by the user is received, and the search information includes the value to be searched, and of course, may also include other search information. It should be noted that the value to be searched is a numerical value or a number.
[0054] Step b2: Search the value to be retrieved in the value set.
[0055] Specifically, since all the intermediate values in the numerical set are already specific numerical values, they can be searched through the "what you see is what you get" text matching method, so the numerical value to be searched can be searched in the numerical set. For example, the interval values are 0 to 9, and the intermediate values can be 1, 2, 3, 4, 5, 6, 7, 8, that is, the numerical set corresponding to the interval values 0 to 9 is composed of the intermediate values 1, 2, 3, 4, 5, 6, 7, 8. If the numerical value to be searched input by the user is 3, the numerical value 3 to be searched is searched in the numerical set 1, 2, 3, 4, 5, 6, 7, 8. It can be understood that the numerical value to be searched can still be used to search for existing content in the document. Please refer to the existing technology and will not be repeated here.
[0056] Step b3: If the value to be retrieved is in the value set, determine the document corresponding to the retrieval information according to the first corresponding relationship.
[0057] Specifically, by searching for the value to be searched in the value set, if the value to be searched is in the value set, the document corresponding to the search information is determined based on the first correspondence, thereby achieving the retrieval of the portion of the interval value that is not directly displayed. For example, the interval values are 0 to 9, and the intermediate values can be 1, 2, 3, 4, 5, 6, 7, 8, that is, the value set corresponding to the interval values 0 to 9 is composed of the intermediate values 1, 2, 3, 4, 5, 6, 7, 8. If the value to be searched entered by the user is 3, the value 3 to be searched is searched in the value set 1, 2, 3, 4, 5, 6, 7, 8. If it is found, the document corresponding to the value to be searched 3 can be determined.
[0058] Furthermore, if the user enters a search value of 3.5, it will not be successfully matched in the value set 1, 2, 3, 4, 5, 6, 7, and 8. However, 3.5 is indeed in the value range 0 to 9. This also shows that this embodiment can only increase the probability of finding the interval value to a certain extent, but cannot achieve full coverage of the interval value search. It can also be seen that the more values in the value set, that is, the greater the density, the greater the probability of finding the interval value.
[0059] This embodiment achieves retrieval of some intermediate values of interval values by filling in some intermediate values of interval values, thereby improving the accuracy of interval value retrieval.
[0060] In some embodiments of the interval value search method, a numerical set corresponding to the interval value is obtained according to a preset algorithm, and the numerical set includes the intermediate values of the interval value. This embodiment provides a preset algorithm: starting from the minimum value of the interval value, the value is gradually increased according to a preset step size until the maximum value of the interval value is reached. Each increase in the preset step size generates an intermediate value, and all the intermediate values obtained constitute the numerical set corresponding to the interval value. For example, if the interval values are 0 to 9 and the preset step size is 1, then starting from 0 and increasing by 1 each time, the intermediate values obtained are 1, 2, 3, 4, 5, 6, 7, and 8. That is, the numerical set corresponding to the interval values 0 to 9 is composed of the intermediate values 1, 2, 3, 4, 5, 6, 7, and 8.
[0061] In some embodiments of the interval value search method, a numerical set corresponding to the interval value is obtained according to a preset algorithm, and the numerical set includes the intermediate values of the interval value. This embodiment provides a preset algorithm: starting from the maximum value of the interval value, the value is gradually reduced according to a preset step size until the minimum value of the interval value is reached. Each time the preset step size is reduced, an intermediate value is generated, and the numerical set corresponding to the interval value is composed of all the intermediate values. For example, if the interval value is 0 to 9 and the preset step size is 1, then starting from 9, the value is reduced by 1 each time, and the intermediate values obtained are 1, 2, 3, 4, 5, 6, 7, and 8. That is, the numerical set corresponding to the interval value 0 to 9 is composed of the intermediate values 1, 2, 3, 4, 5, 6, 7, and 8.
[0062] In some embodiments of the interval value search method, after step a1 and before step a2, the method further includes determining a preset step size: obtaining the numerical unit corresponding to the interval value. The numerical unit is generally located immediately after the interval value, and the unit immediately after the interval value can be used as the numerical unit of the interval value. For example, if the interval value is 0 to 9°C, the unit immediately after the interval value 0 to 9°C is used as the numerical unit of the interval value. It is understood that the positional relationship between the interval value and the numerical unit is diverse, and the numerical unit corresponding to the interval value can be determined based on other positional relationships between the interval value and the numerical unit. The principle is similar to that of the numerical unit being located immediately after the interval value, and will not be explained one by one.
[0063] Furthermore, after determining the numerical unit corresponding to the interval value, the preset step size corresponding to the numerical unit is searched according to the second corresponding relationship. The second corresponding relationship is the correspondence between the numerical unit and the preset step size. It can be understood that the data accuracy corresponding to each numerical unit is usually fixed. For example, the accuracy corresponding to degrees Celsius is usually 0.1, that is, when the user searches for a numerical value, it is usually accurate to 0.1°C. At this time, the preset step size can be 0.1, and the numerical value set obtained at an accuracy of 0.1 can meet the needs of most users. Therefore, the setting of the second corresponding relationship needs to be combined with the general accuracy requirements of the numerical unit in a large amount of data and the experience of the staff. Each numerical unit corresponds to a preset step size.
[0064] This embodiment determines the preset step length according to the numerical unit corresponding to the interval value, so that the value of the preset step length is more reasonable, thereby making the value of the middle value of the interval value more reasonable, thereby increasing the accuracy of interval value retrieval.
[0065] In some embodiments of the interval value search method, after step a1 and before step a2, the process of determining a preset step size is also included: obtaining the numerical unit corresponding to the interval value and the product information to which the document belongs, wherein the numerical unit is usually located immediately after the interval value, and the unit immediately after the interval value can be used as the numerical unit of the interval value. For example, if the interval value is 0 to 9°C, the unit ℃ immediately after the interval value 0 to 9 is used as the numerical unit of the interval value. It can be understood that the positional relationship between the interval value and the numerical unit is diverse, and the numerical unit corresponding to the interval value can be determined based on other positional relationships between the interval value and the numerical unit. The principle is similar to that of the numerical unit being located immediately after the interval value, and will not be explained one by one.
[0066] Furthermore, the product information to which the document belongs refers to the product information of the product defined, described, or attributed by the document. Product information includes, but is not limited to, product name, product model, product field, product use, etc. Any information that can be used to describe the product can be used as product information. The product information can be further clarified through the interval value to further clarify the product described, and the preset step size can be determined more accurately. For example, if the interval value is 0 to 9mm (millimeter), if the corresponding product information is the size of a computer, the preset step size can be 1mm; if the corresponding product information is the size of a memory stick in a computer, the preset step size can be 0.1mm.
[0067] Furthermore, after determining the numerical unit and product information corresponding to the interval value, the preset step length corresponding to the numerical unit and product information is searched based on the third correspondence. The third correspondence is the correspondence between the preset step length, the numerical unit, and the product information. It will be understood that this embodiment considers both the numerical unit and the product information to determine the preset step length. Determining the preset step length based on the numerical unit itself and the object it describes can make the preset step length more reasonable. Therefore, the setting of the third correspondence needs to be based on the general accuracy requirements of the numerical unit in a large amount of data, the dimensional accuracy requirements of the product information, and the experience of the staff. Each numerical unit and product information corresponds to a preset step length.
[0068] This embodiment determines the preset step length based on the numerical unit corresponding to the interval value and the product information. Compared with determining the preset step length only based on the numerical unit, the value of the preset step length can be made more reasonable, thereby making the middle value of the interval value more reasonable, thereby increasing the accuracy of interval value retrieval.
[0069] In a preferred embodiment, referring to FIG2 , the interval value retrieval method of this embodiment is applied to the retrieval field, including computer local data retrieval, server data retrieval, and cloud data retrieval. An interval value refers to an interval segment of a value, that is, a range of values. An interval value can be a numeric range consisting solely of digits, such as 0 to 9; or it can be a range of values that includes numerical units, such as 0°C (degrees Celsius) to 9°C, 0m (meters) to 9m, 0A (amperes) to 9A, etc., where 0°C (degrees Celsius), m (meters), and A (amperes) are numerical units. Specifically, this interval value retrieval method includes a process for establishing a numerical set and a numerical retrieval process, each of which is described below.
[0070] First, before searching, a value set must be created. The process of creating the value set includes the following steps:
[0071] Step a11: Detect the interval values in the document and the position information of the interval values in the document.
[0072] Specifically, in this embodiment, a document refers to a file containing certain data, particularly text, so that it can be used for text retrieval in this embodiment. It is understood that there are many file formats, and this embodiment does not limit them. Alternatively, documents include, but are not limited to, Word documents, TXT documents, PDF documents, Excel spreadsheets, PPT documents, web pages, and the like. Interval values are typically expressed in specific ways, using symbols such as "-," "~," "()," and "[]." For example, the interval values 0-9, 0~9, (0,9), and [0,9] can be expressed using symbols. They can also be expressed using text representing ranges, such as 0 to 9, from 0 to 9, and between 0 and 9. Based on the specific ways in which interval values are expressed, these specific expressions are created into interval value models, which are then used to detect interval values in documents that match the interval value model. For example, if text matching the interval value model "number-number" is detected in a document, it is considered an interval value. For example, 0-9 matches the interval value model "number-number." By using the interval value model, automatic detection of interval values in documents can be achieved without the need for manual search for interval values in documents, which is highly efficient and low-cost.
[0073] Furthermore, after detecting an interval value in a document, the position information of the interval value in the document is obtained. The position information is used to locate the position of the interval value in the document. For example, if the position information is page 2, line 3, the interval value can be located on page 2, line 3. If the document contains multiple interval values, the position information corresponding to each interval value is obtained, and a corresponding relationship between each interval value and the position information is established.
[0074] Step a21: Obtain a value set corresponding to the interval value according to a preset algorithm, where the value set includes the middle value of the interval value.
[0075] Specifically, after retrieving the interval value in the document, the value set corresponding to the interval value is obtained according to the preset algorithm. Each interval value corresponds to a value set, and the value set includes the middle value of the interval value. The value set includes at least one middle value, and the middle value is greater than the minimum value of the interval value and less than the maximum value of the interval value. It can be understood that the more middle values the value set corresponding to a certain interval value contains, the greater the probability of being retrieved, thereby increasing the probability of the interval value being retrieved. For example, the interval values are 0 to 9, and the middle values can be 1, 2, 3, 4, 5, 6, 7, 8, that is, the value set corresponding to the interval values 0 to 9 is composed of the middle values 1, 2, 3, 4, 5, 6, 7, 8. However, it should be noted that the value set does not include all values between the minimum and maximum values of the interval values, but takes as many values as possible. The more values taken, that is, the greater the density, the greater the probability of the interval value being retrieved.
[0076] Step a31: Establish a first correspondence between the value set and the document, and a fourth correspondence between the value set and the location information.
[0077] Specifically, after obtaining the value set corresponding to a certain interval value, a first correspondence between the value set and the document is established. That is, a first correspondence between the value set and the document containing the corresponding interval value is established. If a document contains more than two interval values, then the document corresponds to multiple value sets. Typically, a computer, server, or cloud database stores a large number of documents. The interval values in each document are retrieved, and a value set corresponding to each document is established, thereby establishing a value set corresponding to the database.
[0078] It can be understood that after establishing the first correspondence, each middle value in the value set corresponds to a document, thus enabling retrieval of the middle value of a range of values within a document. It should be noted that the value set corresponding to a range of values in a document is newly generated data outside the document and does not belong to the document itself, nor does it require modification of the document. Instead, it is stored separately as separate data, and the first correspondence between the value set and the document is then established.
[0079] Furthermore, after establishing a first correspondence between the value set and the document, the document corresponding to the value set is determined based on the first correspondence. To enable the user to further locate the specific location within the document where the interval value is located, this embodiment also establishes a fourth correspondence between the value set and the location information. Based on the fourth correspondence, the specific location of the value set within the document can be determined.
[0080] Secondly, after the value set is established, the value retrieval is performed. The value retrieval process includes the following steps:
[0081] Step b11: Receive search information, where the search information includes the value to be searched.
[0082] Specifically, the search information input by the user is received, and the search information includes the value to be searched, and of course, may also include other search information. It should be noted that the value to be searched is a numerical value or a number.
[0083] Step b21: Search the value to be searched in the value set.
[0084] Specifically, since all the intermediate values in the numerical set are already specific numerical values, they can be searched through the "what you see is what you get" text matching method, so the numerical value to be searched can be searched in the numerical set. For example, the interval values are 0 to 9, and the intermediate values can be 1, 2, 3, 4, 5, 6, 7, 8, that is, the numerical set corresponding to the interval values 0 to 9 is composed of the intermediate values 1, 2, 3, 4, 5, 6, 7, 8. If the numerical value to be searched input by the user is 3, the numerical value 3 to be searched is searched in the numerical set 1, 2, 3, 4, 5, 6, 7, 8. It can be understood that the numerical value to be searched can still be used to search for existing content in the document. Please refer to the existing technology and will not be repeated here.
[0085] Step b31: If the value to be retrieved is in the value set, determine the document corresponding to the retrieval information according to the first corresponding relationship, and determine the position of the retrieval information in the document according to the fourth corresponding relationship.
[0086] Specifically, by searching for the value to be searched in the value set, if the value to be searched is in the value set, the document corresponding to the search information is determined based on the first correspondence, thereby achieving the retrieval of the portion of the interval value that is not directly displayed. For example, the interval values are 0 to 9, and the intermediate values can be 1, 2, 3, 4, 5, 6, 7, 8, that is, the value set corresponding to the interval values 0 to 9 is composed of the intermediate values 1, 2, 3, 4, 5, 6, 7, 8. If the value to be searched entered by the user is 3, the value 3 to be searched is searched in the value set 1, 2, 3, 4, 5, 6, 7, 8. If it is found, the document corresponding to the value to be searched 3 can be determined.
[0087] Furthermore, after determining the document corresponding to the search information based on the first corresponding relationship, the position of the search information in the document is determined based on the fourth corresponding relationship. For example, if the position information corresponding to the interval values 0 to 9 is page 2, line 3, then the interval values 0 to 9 can be located on page 2, line 3. In other words, if the value to be retrieved input by the user is 3, then the value to be retrieved 3 is searched in the value set 1, 2, 3, 4, 5, 6, 7, 8, and if it is matched, the document corresponding to the value to be retrieved 3 can be determined. Furthermore, if the position information corresponding to the interval values 0 to 9 is page 2, line 3, then the interval values 0 to 9 corresponding to the value to be retrieved 3 are further located on page 2, line 3 of the document.
[0088] This embodiment improves the accuracy of interval value retrieval by partially filling in the middle values of interval values. Furthermore, when searching for interval values in a document, the document location of the interval value is recorded, so that the location of the interval value in the document is directly displayed in the search results, making it easier for users to view and improving the user experience.
[0089] In a preferred embodiment, referring to FIG3 , the interval value retrieval method of this embodiment is applied to the retrieval field, including computer local data retrieval, server data retrieval, and cloud data retrieval. An interval value refers to an interval segment of a value, that is, a range of values. An interval value can be a numeric range consisting solely of digits, such as 0 to 9; or it can be a range of values that includes numerical units, such as 0°C (degrees Celsius) to 9°C, 0m (meters) to 9m, 0A (amperes) to 9A, etc., where 0°C (degrees Celsius), m (meters), and A (amperes) are numerical units. Specifically, this interval value retrieval method includes a process for establishing a numerical set and a numerical retrieval process, each of which is described below.
[0090] First, before searching, a value set must be created. The process of creating the value set includes the following steps:
[0091] Step a12: Detect the interval values in the document and the numerical units corresponding to the interval values.
[0092] Specifically, in this embodiment, a document refers to a file containing certain data, particularly text, so that it can be used for text retrieval in this embodiment. It is understood that there are many file formats, and this embodiment does not limit them. Alternatively, documents include, but are not limited to, Word documents, TXT documents, PDF documents, Excel spreadsheets, PPT documents, web pages, and the like. Interval values are typically expressed in specific ways, using symbols such as "-," "~," "()," and "[]." For example, the interval values 0-9, 0~9, (0,9), and [0,9] can be expressed using symbols. They can also be expressed using text representing ranges, such as 0 to 9, from 0 to 9, and between 0 and 9. Based on the specific ways in which interval values are expressed, these specific expressions are created into interval value models, which are then used to detect interval values in documents that match the interval value model. For example, if text matching the interval value model "number-number" is detected in a document, it is considered an interval value. For example, 0-9 matches the interval value model "number-number." By using the interval value model, automatic detection of interval values in documents can be achieved without the need for manual search for interval values in documents, which is highly efficient and low-cost.
[0093] Furthermore, after detecting interval values in a document, the numerical unit is typically located immediately after the interval value. The unit immediately following the interval value can be used as the numerical unit for the interval value. For example, for interval values ranging from 0 to 9°C, the unit immediately following the interval value from 0 to 9°C can be used as the numerical unit for the interval value. It is understood that the positional relationship between interval values and numerical units is diverse, and the numerical unit corresponding to the interval value can be determined based on other positional relationships between the interval values and numerical units. The principle behind this is similar to the positional relationship between the numerical unit and the interval value, and will not be further explained.
[0094] Step a22: Obtain a numerical value set corresponding to the interval value according to a preset algorithm, where the numerical value set includes the middle value and numerical unit of the interval value.
[0095] Specifically, after retrieving the interval values in the document, a value set corresponding to the interval values is obtained according to a preset algorithm. Each interval value corresponds to a value set, and the value set includes the intermediate value and the numerical unit of the interval value. The value set includes at least one intermediate value, which is greater than the minimum value of the interval value and less than the maximum value of the interval value. It can be understood that the more intermediate values the value set corresponding to a certain interval value contains, the greater the probability of being retrieved, thereby increasing the probability of the interval value being retrieved. For example, for the interval values of 0 to 9°C, the intermediate values can be 1, 2, 3, 4, 5, 6, 7, 8, that is, the value set corresponding to the interval values of 0 to 9°C is composed of the intermediate values 1, 2, 3, 4, 5, 6, 7, 8 and the numerical unit ℃. However, it should be noted that the value set does not include all values between the minimum and maximum values of the interval values, but rather takes as many values as possible. The more values taken, that is, the greater the density, the greater the probability of the interval value being retrieved.
[0096] Step a32: Establish a first correspondence between the value set and the document.
[0097] Specifically, after obtaining the value set corresponding to a certain interval value, a first correspondence between the value set and the document is established. That is, a first correspondence between the value set and the document containing the corresponding interval value is established. If a document contains more than two interval values, then the document corresponds to multiple value sets. Typically, a computer, server, or cloud database stores a large number of documents. The interval values in each document are retrieved, and a value set corresponding to each document is established, thereby establishing a value set corresponding to the database.
[0098] It can be understood that after establishing the first correspondence, each middle value in the value set corresponds to a document, thus enabling retrieval of the middle value of a range of values within a document. It should be noted that the value set corresponding to a range of values in a document is newly generated data outside the document and does not belong to the document itself, nor does it require modification of the document. Instead, it is stored separately as separate data, and the first correspondence between the value set and the document is then established.
[0099] Secondly, after the value set is established, the value retrieval is performed. The value retrieval process includes the following steps:
[0100] Step b12: Receive search information, which includes the value to be searched and the value unit.
[0101] Specifically, the user inputs search information, which includes the value to be searched and the unit of the value, and may also include other search information. It should be noted that the value to be searched is a number or digit, and the unit of the value is the name of a standard quantity in mathematics or physics. For example, if the user inputs the search information "3°C", the search information includes the value to be searched, 3, and the unit of the value, ℃.
[0102] Step b22: Retrieve the value and value unit to be retrieved from the value set.
[0103] Specifically, since all the intermediate values in the numerical set are already specific numerical values and corresponding numerical units, they can be searched through the "what you see is what you get" text matching method, so the numerical value and numerical unit to be searched can be searched in the numerical set. For example, the interval value is 0 to 9℃, and the intermediate values can be 1, 2, 3, 4, 5, 6, 7, 8, that is, the numerical set corresponding to the interval value 0 to 9℃ is composed of the intermediate values 1, 2, 3, 4, 5, 6, 7, 8 and the numerical unit ℃. If the numerical value to be searched input by the user is 3℃, the numerical value 3℃ to be searched is searched in the numerical set 1, 2, 3, 4, 5, 6, 7, 8 and the numerical unit ℃. It can be understood that the numerical value to be searched can still be used to search for existing content in the document. Please refer to the existing technology and will not be repeated here.
[0104] Step b32: If the value to be retrieved and the value unit are in the same value set, determine the document corresponding to the retrieval information according to the first corresponding relationship.
[0105] Specifically, by searching for the value to be retrieved and the numerical unit in the numerical set, if the value to be retrieved and the numerical unit are in the numerical set, the document corresponding to the search information is determined according to the first corresponding relationship, thereby realizing the retrieval of the portion of the interval value that is not directly displayed. For example, the interval value is 0 to 9°C, and the intermediate values can be 1, 2, 3, 4, 5, 6, 7, 8, that is, the numerical set corresponding to the interval value 0 to 9°C is composed of the intermediate values 1, 2, 3, 4, 5, 6, 7, 8 and the numerical unit ℃. If the value to be retrieved input by the user is 3°C, the value to be retrieved 3 and the numerical unit ℃ are searched in the numerical set 1, 2, 3, 4, 5, 6, 7, 8 and the numerical unit ℃. If they are matched at the same time, the document corresponding to the value to be retrieved 3°C can be determined.
[0106] Furthermore, if the user enters a search value of 3.5°C, it will not be successfully matched in the value sets 1, 2, 3, 4, 5, 6, 7, and 8, nor in the unit °C. However, 3.5°C is indeed in the value range 0 to 9. This also illustrates that this embodiment can only increase the probability of finding interval values to a certain extent, but cannot achieve full coverage of interval values. Furthermore, it can be seen that the more values a value set contains, that is, the greater the density, the greater the probability of finding an interval value.
[0107] This embodiment achieves retrieval of partial intermediate values of interval values by filling in partial intermediate values of interval values, and uses both numerical value and numerical unit parameters for simultaneous retrieval, thereby improving the accuracy of interval value retrieval.
[0108] In some embodiments, the interval value search method further includes the following steps after step b3: It is understood that because the database includes multiple documents, each document has a corresponding value set, and a document may correspond to multiple value sets, and different value sets may have the same intermediate value, the number of documents corresponding to the search information determined based on the first correspondence may exceed one. If the number of documents corresponding to the search information determined based on the first correspondence exceeds one, the resulting documents are sorted and displayed according to a preset sorting rule, and the preset sorting rule can refer to the prior art. In this embodiment, when multiple search results appear, they are sorted and displayed to facilitate user viewing of the search results.
[0109] In a preferred embodiment, the computer-readable storage medium of this embodiment stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps of the interval value retrieval method of the above embodiment.
[0110] In a preferred embodiment, the computer of this embodiment includes a memory and a processor. The memory stores a computer program. The processor executes the steps of the interval value retrieval method of the above embodiment by calling the computer program stored in the memory.
[0111] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0112] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0113] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0114] The above embodiments are intended only to illustrate the technical concepts and features of the present invention. Their purpose is to enable those skilled in the art to understand the present invention and implement it accordingly. They are not intended to limit the scope of protection of the present invention. All equivalent variations and modifications within the scope of the claims of the present invention are intended to be covered by the claims of the present invention.
Claims
1. A method for interval value retrieval, characterized in that: Including the process of establishing numerical set and numerical retrieval; The establishing of the value set comprises: Step a1, detecting interval values in the document; Step a2: obtaining a value set corresponding to the interval value according to a preset algorithm, wherein the value set includes the middle value of the interval value; Step a3, establishing a first corresponding relationship between the value set and the document; The numerical value retrieval process includes: Step b1, receiving search information, wherein the search information includes a value to be searched; Step b2, searching the value to be searched in the value set; Step b3: If the value to be retrieved is in the value set, determine the document corresponding to the search information according to the first corresponding relationship.
2. The interval value search method according to claim 1, characterized in that: The set of numerical values includes at least one intermediate value, and the intermediate value is greater than a minimum value of the interval numerical values and less than a maximum value of the interval numerical values.
3. The interval value search method according to claim 1, characterized in that: The step a2 comprises: Starting from the minimum value of the interval value, gradually increasing the value according to the preset step length until the maximum value of the interval value, each increase of the preset step length generates an intermediate value, and all the intermediate values obtained constitute the value set corresponding to the interval value; or Starting from the maximum value of the interval value, the value is gradually reduced according to the preset step size until it reaches the minimum value of the interval value. Each time the preset step size is reduced, an intermediate value is generated, and all the intermediate values obtained constitute a value set corresponding to the interval value.
4. The interval value search method according to claim 3, characterized in that: After step a1 and before step a2, the method further includes: Get the numerical unit corresponding to the interval value; The preset step length corresponding to the numerical unit is searched according to a second corresponding relationship, where the second corresponding relationship is a corresponding relationship between the numerical unit and the preset step length.
5. The interval value search method according to claim 3, characterized in that: After step a1 and before step a2, the method further includes: Obtain the numerical unit corresponding to the interval value and the product information to which the document belongs; The preset step length corresponding to the numerical unit and the product information is searched according to a third corresponding relationship, where the third corresponding relationship is a corresponding relationship between the preset step length, the numerical unit, and the product information.
6. The interval value search method according to claim 1, characterized in that: The step a1 comprises: detecting interval values in a document and position information of the interval values in the document; The step a3 comprises: establishing a first corresponding relationship between the value set and the document, and a fourth corresponding relationship between the value set and the location information; The step b3 includes: if the value to be retrieved is in the value set, determining the document corresponding to the retrieval information according to the first corresponding relationship, and determining the position of the retrieval information in the document according to the fourth corresponding relationship.
7. The interval value search method according to claim 1, characterized in that: The step a1 comprises: detecting interval values in the document and numerical units corresponding to the interval values; The numerical value set in step a2 includes the middle value of the interval value and the numerical value unit; The search information in step b1 includes the value to be searched and the value unit; The step b2 comprises: searching the value to be searched and the value unit in the value set; In the step b3, if the value to be retrieved is included in the value set: if the value to be retrieved and the value unit are in the same value set.
8. The interval value search method according to claim 1, characterized in that: After step b3, the method further includes: If it is determined according to the first corresponding relationship that the number of documents corresponding to the search information exceeds one, the obtained documents are sorted and displayed according to a preset sorting rule.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps of the interval value retrieval method according to any one of claims 1 to 8.
10. A computer, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the interval value retrieval method according to any one of claims 1 to 8 by calling the computer program stored in the memory.
Citation Information
Patent Citations
Document retrieval system and document retrieval method
CN101295307A
Interval numerical value retrieval method, storage medium and computer
CN116860828A
Document retrieval system recognizing types and values of numeric search conditions
US20050198027A1
Numeric range search device, numeric range search method, and numeric range search program
US20140156670A1
