U.S. patent application number 13/906380 was filed with the patent office on 2013-10-03 for electronic device and method for searching related terms.
The applicant listed for this patent is CHUNG-I LEE, CHIU-HUA LU, GEN-CHI LU, CHIEN-FA YEH. Invention is credited to CHUNG-I LEE, CHIU-HUA LU, GEN-CHI LU, CHIEN-FA YEH.
Application Number | 20130262456 13/906380 |
Document ID | / |
Family ID | 44582471 |
Filed Date | 2013-10-03 |
United States Patent
Application |
20130262456 |
Kind Code |
A1 |
LEE; CHUNG-I ; et
al. |
October 3, 2013 |
ELECTRONIC DEVICE AND METHOD FOR SEARCHING RELATED TERMS
Abstract
A method for searching related terms first calculates a direct
relationship between every two of a plurality of query terms to
obtain a direct related matrix, and calculates a related score
between every two of the query terms to obtain a related score
matrix. The method further calculates an indirect relationship
between every two of the query terms according to the direct
relationship and the related score, and determines indirect terms
of each query term according to the indirect relationship between
every two of the query terms.
Inventors: |
LEE; CHUNG-I; (NEW TAIPEI,
TW) ; YEH; CHIEN-FA; (NEW TAIPEI, TW) ; LU;
CHIU-HUA; (NEW TAIPEI, TW) ; LU; GEN-CHI; (NEW
TAIPEI, TW) |
|
Applicant: |
Name |
City |
State |
Country |
Type |
LEE; CHUNG-I
YEH; CHIEN-FA
LU; CHIU-HUA
LU; GEN-CHI |
NEW TAIPEI
NEW TAIPEI
NEW TAIPEI
NEW TAIPEI |
|
TW
TW
TW
TW |
|
|
Family ID: |
44582471 |
Appl. No.: |
13/906380 |
Filed: |
May 31, 2013 |
Related U.S. Patent Documents
|
|
|
|
|
|
Application
Number |
Filing Date |
Patent Number |
|
|
13217272 |
Aug 25, 2011 |
8478770 |
|
|
13906380 |
|
|
|
|
Current U.S.
Class: |
707/723 ;
707/748 |
Current CPC
Class: |
G06F 16/24578 20190101;
G06F 16/3338 20190101 |
Class at
Publication: |
707/723 ;
707/748 |
International
Class: |
G06F 17/30 20060101
G06F017/30 |
Foreign Application Data
Date |
Code |
Application Number |
Jan 27, 2011 |
TW |
100103067 |
Claims
1. A method for calculating indirect relationships between a
plurality of query terms using an electronic device, the method
comprising: obtaining the plurality of query terms from a storage
device of the electronic device; calculating a direct relationship
"R.sub.i, j" between every two of the query terms; calculating a
related score "P.sub.i, j" between every two of the query terms;
and calculating an indirect relationship "R'.sub.i, j" between
every two of the query terms according to the direct relationship
"R.sub.i, j" and the related score "P.sub.i, j" between every two
of the query terms.
2. The method according to claim 1, further comprising: determining
indirect terms of each query term according to the indirect
relationship between every two of the query terms, and storing the
determined indirect terms in the storage device of the electronic
device.
3. The method according to claim 2, further comprising: obtaining
search results from a data source by performing a search operation
according to the determined indirect terms, and displaying the
search results on a display device of the electronic device.
4. The method according to claim 2, wherein the related score
"P.sub.i, j" between every two of the query terms is obtained by
calculating a conditional probability between every two of the
query terms.
5. The method according to claim 2, wherein the indirect
relationship "R'.sub.i, j" between every two of the query terms is
calculated by a formula R'.sub.i,
j=.SIGMA..sub.K=1.sup.nR.sub.i,k*P.sub.k,j,k.noteq.i,j, wherein the
variable "n" represents a total number of the query terms.
6. The method according to claim 5, wherein a direct related matrix
"R" is generated according to the direct relationships "R.sub.i,
j", a related score matrix "P" is generated according to the
related scores "P.sub.i, j", and the indirect relationship
"R'.sub.i, j" is calculated using the direct related matrix "R" and
the related score matrix "P" according to the formula.
7. The method according to claim 2, wherein the determining step
comprises: determining that a first term of the query term is the
indirect term of a second term of the query terms upon the
condition that the indirect relationship between the first term and
the second term is greater than or equal to a preset value.
8. The method according to claim 7, wherein the preset value is
1.0.
9. An electronic device, comprising: a processor; a storage device
storing a plurality of instructions, which when executed by the
processor, causes the processor to: obtain a plurality of query
terms from the storage device; calculate a direct relationship
"R.sub.i, j" between every two of the query terms; calculate a
related score "P.sub.i, j" between every two of the query terms;
and calculate an indirect relationship "R'.sub.i, j" between every
two of the query terms according to the direct relationship
"R.sub.i, j" and the related score "P.sub.i, j" between every two
of the query terms.
10. The electronic device according to claim 9, wherein the
plurality of instructions further comprise: determining indirect
terms of each query term according to the indirect relationship
between every two of the query terms, and store the determined
indirect terms in the storage device.
11. The electronic device according to claim 10, wherein the
plurality of instructions further comprise: obtaining search
results from a data source by performing a search operation
according to the determined indirect terms, and displaying the
search results on a display device of the electronic device.
12. The electronic device according to claim 10, wherein the
related score "P.sub.i, j" between every two of the query terms is
obtained by calculating a conditional probability between every two
of the query terms.
13. The electronic device according to claim 10, wherein the
indirect relationship "R'.sub.i, j" between every two of the query
terms is calculated by a formula
R'.sub.i,j=.SIGMA..sub.K=1.sup.nR.sub.i,k*P.sub.k,j,k.noteq.i,j,
wherein the variable "n" represents a number of the query
terms.
14. The electronic device according to claim 10, wherein the
instruction of determining indirect terms of each query term
according to the indirect relationship between every two of the
query terms comprises: determining that a first term of the query
term is the indirect term of a second term of the query terms upon
the condition that the indirect relationship between the first term
and the second term is greater than or equal to a preset value.
15. A non-transitory storage medium having stored thereon
instructions that, when executed by a processor of an electronic
device, causes the processor to perform a method for calculating
indirect relationships between a plurality of query terms, the
method comprising: obtaining the plurality of query terms from a
storage device of the electronic device; calculating a direct
relationship "R.sub.i, j" between every two of the query terms;
calculating a related score "P.sub.i, j" between every two of the
query terms; and calculating an indirect relationship "R'.sub.i, j"
between every two of the query terms according to the direct
relationship "R.sub.i, j" and the related score "P.sub.i, j"
between every two of the query terms.
16. The non-transitory storage medium according to claim 15,
wherein the method further comprises: determining indirect terms of
each query term according to the indirect relationship between
every two of the query terms, and storing the determined indirect
terms in the storage device of the electronic device.
17. The non-transitory storage medium according to claim 16,
wherein the method further comprises: obtaining search results from
a data source by performing a search operation according to the
determined indirect terms, and displaying the search results on a
display device of the electronic device.
18. The non-transitory storage medium according to claim 16,
wherein the related score "P.sub.i, j" between every two of the
query terms is obtained by calculating a conditional probability
between every two of the query terms.
19. The non-transitory storage medium according to claim 16,
wherein the indirect relationship "R'.sub.i, j" between every two
of the query terms is calculated by a formula
R'.sub.i,j=.SIGMA..sub.K=1.sup.nR.sub.i,k*P.sub.k,j,k.noteq.i,j,
wherein the variable "n" represents a total number of the query
terms.
20. The non-transitory storage medium according to claim 16,
wherein the determining step comprises: determining that a first
term of the query term is the indirect term of a second term of the
query terms upon the condition that the indirect relationship
between the first term and the second term is greater than or equal
to a preset value.
Description
CROSS-REFERENCE TO RELATED APPLICATION
[0001] This application is a continuation application of U.S.
application Ser. No. 13/217,272, filed on Aug. 25, 2011.
BACKGROUND
[0002] 1. Technical Field
[0003] Embodiments of the present disclosure relate to file
searching technology, and particularly to an electronic device and
method for searching related terms using the electronic device.
[0004] 2. Description of Related Art
[0005] Related terms of preset query terms can be obtained using a
natural language processing (NLP) method by calculating a
relationship between every two of the preset query terms. However,
the NLP technology only calculates a direct relationship between
every two of the preset query terms, and generates the related
terms having the direct relation with the preset query terms. That
is to say, the NLP technology cannot calculate an indirect
relationship between every two of the preset query terms to
generate the related terms having the indirect relationship with
the preset query terms, which influences search results
corresponding to the preset query terms.
[0006] For example, suppose that a query term is "baseball," the
query term "baseball" has a direct relationship with a first term
"sport," and the first term "sport" further has a direct
relationship with a second term "basketball." Thus, the query term
"baseball" has an indirect relation with the second term
"basketball." The NLP technology can determine the first term
"sport" as the related term of the query term "baseball," but
cannot determine the second term "basketball" as the related term
of the query term "baseball." It is thus less than efficient to
implement a search operation according to the query term.
Therefore, a more efficient method for searching related terms is
desired.
BRIEF DESCRIPTION OF THE DRAWINGS
[0007] FIG. 1 is a block diagram of one embodiment of an electronic
device including a related term search system.
[0008] FIG. 2 is a block diagram of one embodiment of the related
term search system included in the electronic device of FIG. 1.
[0009] FIG. 3 is a flowchart of one embodiment of a method for
searching related terms using the electronic device of the FIG.
1.
[0010] FIG. 4 is a topological diagram of direct relationship
between a plurality of query terms.
[0011] FIG. 5 is an example of a direct related matrix created from
the topological diagram of FIG. 4.
[0012] FIGS. 6 and 7 are exemplary schematic diagrams of related
score matrices obtained from FIG. 5.
[0013] FIG. 8 is an exemplary topological diagram of indirect
relationship of a plurality of query terms.
[0014] FIG. 9 is an example of an indirect related matrix created
from the topological diagram of FIG. 8.
DETAILED DESCRIPTION
[0015] All of the processes described below may be embodied in, and
fully automated via, functional code modules executed by one or
more general purpose electronic devices or processors. The code
modules may be stored in any type of non-transitory readable medium
or other storage device. Some or all of the methods may
alternatively be embodied in specialized hardware. Depending on the
embodiment, the non-transitory readable medium may be a hard disk
drive, a compact disc, a digital video disc, a tape drive or other
suitable storage medium.
[0016] FIG. 1 is a block diagram of one embodiment of an electronic
device 2 including a related term search system 24. In the
embodiment, the electronic device 2 further includes a display
device 20, an input device 22, a storage device 23, and at least
one processor 25. The related term search system 24 may be used to
determine related terms having indirect relationships with a
plurality of query terms stored in the storage device 23. A
detailed description will be given in the following paragraphs.
[0017] The display device 20 may be used to display search results
matched with the determined related terms, and the input device 22
may be a mouse or a keyboard used to input computer readable
data.
[0018] FIG. 2 is a block diagram of one embodiment of the related
term search system 24 in the electronic device 2. In one
embodiment, the related term search system 24 may include one or
more modules, for example, a first calculation module 201, a second
calculation module 202, a third calculation module 203, a related
term determining module 204, and a searching module 205. The one or
more modules 201-204 may comprise computerized code in the form of
one or more programs that are stored in the storage device 23 (or
memory). The computerized code includes instructions that are
executed by the at least one processor 25 to provide functions for
the one or more modules 201-204.
[0019] FIG. 3 is a flowchart of one embodiment of a method for
searching related terms using the electronic device 2. Depending on
the embodiment, additional blocks may be added, others removed, and
the ordering of the blocks may be changed.
[0020] In block S1, the first calculation module 201 calculates a
direct relationship "R.sub.i, j" between every two of a plurality
of query terms, and obtains a direct related matrix "R" according
to all the calculated direct relationship. In one embodiment, the
query terms may be inputted by a user, or stored in the storage
device 23 in advance. As shown in FIG. 4, a direct relationship
from "Term.sub.1" to "Term.sub.2" is 2, but a direct relationship
from "Term.sub.2" to "Term.sub.1" is 1. That is to say, the direct
relationship between two terms is determined according to a
sequence of the two terms. As shown in FIG. 5, R.sub.i, j
represents the direct relationship from "Term.sub.i" to
"Term.sub.j", which is referred to as Relation(term.sub.i,
term.sub.j).
[0021] In block S2, the second calculation module 202 calculates a
related score between every two of the query terms, obtains a
related score matrix according to all the calculated related
scores, and stores the related score matrix in the storage device
23. In one embodiment, the related score between every two of the
query terms is obtained by calculating a conditional probability
between every two of the query terms. As shown in FIG. 6, each
element "P.sub.i, j" in the related score matrix "P" represents a
conditional probability between "Term.sub.i" and "Term.sub.j",
where P.sub.i, j=P((Term.sub.i.andgate.Term.sub.j)|Term.sub.i). For
example, assume that an occurrence number of a term "A" is 100, and
an occurrence number of a term "B" is 30 given the occurrence of
the term "A". Thus, P(A.omega.B)|A)=0.3, that is, the related score
from the term "A" to the term "B" is 30%.
[0022] In other embodiments, the second calculation module 202 may
calculate the related score using other methods to obtain the
related score matrix. For example, assume that a direct
relationship from the term "A" to the term "B" is 100, and a direct
relationship from the term "B" to a term "C" is 300, where no other
terms have a direct relationship with the term "B," which is
referred to as A.fwdarw.B.fwdarw.C. Thus, a total related value of
the term "B" equals to (100+300)=400, where the term "A" occupies
100 (i.e., 25%), the term "C" occupies 300 (i.e., 75%). That is to
say, the related score between the term "B" and the term "C" equals
to 0.75, and an indirect relationship between the term "A" and the
term "C" equals to 100*0.75=75. Using this method, the second
calculation module 202 may calculate the related score between
every two terms of the query terms in FIG. 5, and obtain a related
score matrix "P'," which is shown in FIG. 7, according to the
calculated related scores.
[0023] In block S3, the third calculation module 203 calculates an
indirect relationship "R'.sub.i, j" between every two of the query
terms according to the direct relationship "R.sub.i, j" and the
related score "P.sub.i, j" between every two terms, and stores the
calculated indirect relationships in the storage device 23. In one
embodiment, the indirect relationship "R'.sub.i, j" between every
two terms of the query terms is calculated by a formula of
R'.sub.i,j=.SIGMA..sub.K=1.sup.nR.sub.i,k*P.sub.k,j,k.noteq.i,j,
where the variable "n" represents a total number of the query
terms, for example, n=7 as shown in FIG. 4. FIG. 8 shows an
exemplary topological diagram of the indirect relationship between
"Term.sub.1" and other query terms. FIG. 9 shows an example of an
indirect related matrix "R'" created from the topological diagram
of FIG. 8, where each element "R'.sub.i, j" in the indirect related
matrix "R'" represents an indirect relationship between
"Term.sub.i" and "Term.sub.j".
[0024] In block S4, the related term determining module 204
determines indirect terms of each query term according to the
indirect relationship between every two terms of the query terms,
and stores the determined indirect terms in the storage device 23
of the electronic device 2. Then, the searching module 205 performs
a search operation according to the determined indirect terms to
obtain search results from a data source, and displays the search
results on the display device 20 of the electronic device 2. The
data source may be the Internet, at least one database, or at least
one file system. In one embodiment, the related term determining
module 204 determines that a first term of the query term is the
indirect term of a second term of the query terms if the indirect
relationship between the first term and the second term is greater
than or equal to a preset value. The preset value may be 1.0. For
example, as shown in FIG. 9, the indirect terms of "Term.sub.1"
include "Term.sub.3," "Term.sub.4," "Term.sub.5," and "Term.sub.7"
whose indirect relationships are greater than 1.0.
[0025] In one embodiment, if the term "A" has the direct
relationship with the term "B," and the term "B" further has the
direction relationship with the term "C," which is referred to as
A.fwdarw.B.fwdarw.C. Then the related term search system 24
determines that the term "A" has the indirect relationship with the
term "C", which is called a second-level relationship. In other
embodiments, the system 24 may determine a third-level relationship
or multi-level relationship using the above-mentioned method. For
example, if the term "A" has the direct relationship with the term
"B," the term "B" further has the direction relationship with the
term "C," and the term "C" further has the direction relationship
with a term "D," which is referred to as
A.fwdarw.B.fwdarw.C.fwdarw.D. Then the system 24 determines that
the term "A" has the indirect relationship with the term "D", which
is called the third-level relationship.
[0026] It should be emphasized that the above-described embodiments
of the present disclosure, particularly, any embodiments, are
merely possible examples of implementations, merely set forth for a
clear understanding of the principles of the disclosure. Many
variations and modifications may be made to the above-described
embodiment(s) of the disclosure without departing substantially
from the spirit and principles of the disclosure. All such
modifications and variations are intended to be included herein
within the scope of this disclosure and the present disclosure and
protected by the following claims.
* * * * *