GREEN KNOWLEDGE RECOMMENDATION MATHOD BASED ON CHARACTERISTIC SIMILARITY AND USERDEMANDS, ELECTRONIC DEVICE AND COMPUTER READABLE STORAGE MEDIUM THEREOF

Information

  • Patent Application
  • 20250094451
  • Publication Number
    20250094451
  • Date Filed
    November 30, 2024
    6 months ago
  • Date Published
    March 20, 2025
    2 months ago
Abstract
The present invention discloses a green knowledge recommendation method based on characteristic similarity and user demands, an electronic device and a computer readable storage medium thereof. The method includes: obtaining a current-search text e and a historical-search-texts set Eu both from a user; constructing a topics dictionary and a subtopics dictionary according to a green knowledge base, and decomposing the e and the Eu on the basis of semantic decomposition; picking words in a text-vector set and a valid-text set that about two dictionaries; finding the corresponding knowledge according to user satisfaction. The invention enables users to quickly find the required content through templating, thus avoiding users' meaningless search, improving search efficiency, and reducing the loss of useless time.
Description
FIELD OF THE INVENTION

The present invention relates to green knowledge recommendation methods, and more particularly to a green knowledge recommendation method based on characteristic similarity and user demands, an electronic device and a computer readable storage medium thereof.


BACKGROUND OF THE INVENTION

In the green knowledge base, the traditional way for users to search for the desired knowledge is not accurate and the search time is too slow. Because users in the search process is often very broad but not accurate. The traditional way to respond to a user's search is to give a search result that is only large enough, rather than trying to determine how to reduce uncertainty in the user's broad knowledge. Traditional methods only give a broad range of results and let the user to slowly search for themselves, thereby reducing what is unnecessary knowledge. Such a search method is too slow, and the search results are not accurate enough to meet the needs of users.


SUMMARY OF THE INVENTION

The object of the present invention is to provide a green knowledge recommendation method based on characteristic similarity and user demands to solve the problem that the search results are not accurate enough to meet the needs of users. The green knowledge recommendation method acts as a template-based method and allows users to quickly find what they need, so as to avoid users' meaningless search, improve the search efficiency, and reduce the loss of useless time.


It is adopted by the present invention to realize with the following technical scheme.


A green knowledge recommendation method based on characteristic similarity and user demands includes following steps 1˜4.


Step 1, obtain a current-search text e and a historical-search-texts set Eu both from a user u, Eu={e1,u, e2,u . . . , en1,u, . . . , EN1,u}. Wherein, the en1,u represents the n1 th historical-search text, 1≤n1≤N1; the N1 represents the total number of historical-search texts.


Step 2, construct a topics dictionary and a subtopics dictionary, and decompose the current-search text e and the historical-search-texts set Eu on the basis of semantic decomposition. The step 2 includes steps 2.1˜2.6.


Step 2.1, construct a topics dictionary X of a green knowledge base, X={x1, x2, . . . , xn2, . . . . xN2}. Wherein the xn2 represents the n2 th topics, the N2 represents the total number of topics in the dictionary X.


Construct a subtopics dictionary Y of the green knowledge base, Y={y1, y2, . . . , yn3, . . . , yN3}. Wherein the yn3 represents the n3 th subtopics, the N3 represents the total number of subtopics in the dictionary Y.


Construct a daily-expressions dictionary C of a set of users, C={c1, c2, . . . , cn4, . . . , cN4}. Wherein the cn4 represents the n4 th daily expression, the N4 represents the total number of daily expressions in the dictionary C.


Step 2.2, decompose e and en1,u according to dictionaries X, Y, C to obtain two text-vector sets we and wn1 correspondingly. The we is about the current-search text e, we={w1e, w2e, . . . , wiee, . . . , wiee}. The wn1 is about the n1 th historical-search text en1,u,







w

n
1


=


{


w
1

n
1


,


w
2

n
1


,


,

w

i

n
1



n
1


,


,

w

I

n
1



n
1



}

.





Wherein the wiee represents the ie th word of the current-search text e; the Ie represents the total number of words in the current-search text e; the






w

i

n
1



n
1





represents the i th word or the n1 the historical-search text en1,u; the In1 represents the total number of words in the n1 th historical-search text en1,u.


Define ti, being the label of the wiee. If the tiee belongs to the dictionary X, define wiee∈X; if the tiee belongs to the dictionary Y, define wiee∈Y; if the tiee belongs to the dictionary C, define wiee∈C; otherwise define wiee∈Ø.


Define tin1 being the label of







w

i

n
1



n
1


.




If the tin1 belongs to the dictionary X, define








w

i

n
1



n
1



X

;




if it the tin1 belongs to the dictionary Y, define







w

i

n
1



n
1




Y
;





if the tin1 belongs to the dictionary C, define








w

i

n
1



n
1



C

,




otherwise define







w

i

n
1



n
1





.





Step 2.3, obtain the weight Lin1 of the i th word






w

i

n
1



n
1





by the formula (1).










L
i

n
1


=

{





δ
1

,





if



t
i

n
1




X







δ
2

,





if



t
i

n
1




Y






0
,





if



t
i

n
1





C


{

}












(
1
)







In the formula, the δ1 represents the first weight, the δ2 represents the second weight, and 0<δ21<1.


Step 2.4, obtain the weight Liee, of the ie th word wiee by the same way of step 2.3.


Step 2.5, obtain the similarity






g



(


w

i
e

e

,

w

i

n
1



n
1



)





between the wiee and the






w

i

n
1



n
1





by the formula (2).










g



(


w

i
e

e

,

w

i

n
1



n
1



)


=



(








i
e

=
1


I
e




w

i
e

e



L

i
e

e


)



(








i

n
1


=
1


I

n
1





w

i

n
1





n
1





L

i

n
1



n
1



)


















i
e

=
1


I
e




w

i
e

e



L

i
e

e




2













i

n
1


=
1


I

n
1





w

i

n
1



n
1




L

i

n
1



n
1





2


-







(








i
e

=
1


I
e




w

i
e

e



L

i
e

e


)



(








i

n
1


=
1


I

n
1





w

i

n
1



n
1




L

i

n
1



n
1



)










(
2
)







Step 2.6, obtain the similarities between each of the two words respectively from two text-vector sets we and wn1 by the same way of step 2.5. Collect words with the highest similarity to be a candidate-words set in which one candidate word would be select to be the n1 th word of the we. A valid-text set Viee is defined by all candidate-words sets, Viee={v1,iee, v2,iee, . . . vp,iee, . . . , vP,iee}. Wherein the vP,iee represents the p th candidate word of the ie th word wiee, the p represents the total number of candidate words.


Step 3, according to the weight, pick words in the we and the Viee that belong to the two dictionaries X and Y. The step 3 includes steps 3.1˜3.6.


Step 3.1, pick words in the we that belong to the dictionary X.


When wieeLien11, xiee is defined to mean the words corresponding to the wiee and is also from the dictionary X. The first words set is defined by many xiee accordingly, and the Lien1 is the weight of the wiee.


Step 3.2, pick words in the Viee that belong to the dictionary X.


When vp,ieeLp,iee1, xp,iee is defined to mean the words corresponding to the vp,iee and is also from the dictionary X. The second words set is defined by many Viee accordingly, and the Lp,iee is the weight of the vp,iee.


Step 3.3, a large-subject terms set Z is defined by the first words set and the second words set, Z={z1X, z2X, . . . , zn5X, . . . , zN5X}.


Wherein the zn5X represents the n5 th large-subject term, 1≤n5≤N5, and the N5 represents the total number of large-subject terms.


Step 3.4, pick words in the we that belong to the dictionary Y. When wieeLin11, γiee is defined to mean the words corresponding to the wiee and is also from the dictionary Y.


Step 3.5, pick words in the Viee that belong to the dictionary Y; when Lin11, γivalid is defined to mean the words corresponding to the Viee and is also from the dictionary Y.


Step 3.6, a minor-subject terms set V is defined by the we and the Viee, V={v1Y, v2Y, . . . , vn6Y, . . . , vN6Y}. Wherein the vy, represents the n6 th minor-subject term, 1≤n6≤N6, and the N6 represents the total number of minor-subject terms.


Step 4, find the corresponding knowledge according to user satisfaction. The step 4 includes steps 4.1˜4.6.


Step 4.1, acquire a knowledge a to be identified, and calculate the frequency of each of the word appearing in the knowledge a after semantic decomposition under the dictionary X and the minor-subject terms set V,







{


s

x
1

a

,





s

x

n
2


a


,





s

x

N
2


a


,

t

v
1
Y

a

,


,

t

v

n
6

Y

a

,


,

t

v

N
6

Y

a


}

.





Wherein the





s

x

n
2




a





represents the frequency of the n2 th topic xn2 appearing in the knowledge a







0


s

x

n
2




a



1

;




and the






t

v

N
6



Y




a





represents the frequency of the n6 th subtopic vn6Y appearing in the knowledge a, 0≤







t

v

n
6

Y



a




1
.





Step 4.2, assigns a value to each of the word in the minor-subject terms set V, and a weighting function H(vn6Y) of words in minor-subject terms set V is defined as formula (3).










H

(

v

n
6



Y


)

=


v

n
6



Y










n
6

=
1


N
6




v

n
6



Y








(
3
)







Step 4.3, a user-demand degree function Q(vn6Y) is defined as formula (4).










Q



(

v

n
6



Y


)


=


H

(

v

n
6



Y


)


k





(
4
)







In the formula, the K represents users' satisfaction, kϵ(0,100%).


Step 4.4, get a topic xuser required by the user in the topics dictionary X, and calculate the closing degree d1a between the topic xuser and the knowledge a, d1a=1−sxusera. Wherein the st represents the frequency of the topic xuser appearing in the knowledge a.


Step 4.5, get the user's demand for each of the minor-subject term in the minor-subject terms set V, and calculate the user's closing degree dg to all of the minor-subject terms,







d
2
a

=








n
6

=
1


N
6





(


Q




(

v

n
6



Y


)

2


-


(

t

v

n
6



Y




a


)

2


)

.






Step 4.6, calculate the closing degree da between the user's demand and the knowledge a, da=d1a+d2a, obtain all of the closing degree of all of the knowledge, and select some knowledge with less closing degree to fed to the user.


The present invention further provides an electronic device, including a memory and a processor. The memory is used to store programs that could support the processor to execute. Wherein the programs are programmed according to the green knowledge recommendation method.


The present invention further provides a computer readable storage medium, used to store programs that are programmed according to the green knowledge recommendation method.


Compared with the prior art, the beneficial effects of the present invention are as follows.


1. The present invention firstly divides the collected text into words, and also sets the weight to improve the usefulness of similarity calculation. The present invention secondly divides the text into two parts according to the dependency relationship between the user's demand for large type and small type, so that the user's idea is more specific and detailed, and in the demand degree model, the user's demand for different types can be combined to make the search results conform to the user's demand. According to the received knowledge, the word frequency obtained after the dictionaries and the sets, the present invention is compared with the demand function to find out the knowledge that best meets the needs of the user.


2. The present invention uses a similarity model to quickly obtain usable text. The use of demand degree model can make users combine different types of needs, so that the search results meet the needs of users. The present invention combines the demand of the user with the results of previous searches, so that the accuracy of the pushed results is greatly improved.





BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1 is a flow diagram of the green knowledge recommendation method, according to the embodiment of the present invention.





DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

Referring to FIG. 1, in the present embodiment, a green knowledge recommendation method based on characteristic similarity and user demands includes following steps.


Step 1, obtain a current-search text e and a historical-search-texts set Eu both from a user u, Eu={e1,u, e2,u . . . , en1,u, . . . , eN1,u}. Wherein, the en1,u represents the n1 th historical-search text, 1≤n1≤N1; the N1 represents the total number of historical-search texts.


Step 2, construct a topics dictionary and a subtopics dictionary, and decompose the current-search text e and the historical-search-texts set Eu on the basis of semantic decomposition. The step 2 includes steps 2.1˜2.6.


Step 2.1, construct a topics dictionary X of a green knowledge base, X={x1, x2, . . . , xn2, . . . , xN2}. Wherein the xn2 represents the n2 th topics, the N2 represents the total number of topics in the dictionary X. The topics can be cars, machine tools, refrigerators, and other big categories.


Construct a subtopics dictionary Y of the green knowledge base, Y={y1, y2, . . . , yn3, . . . , yN3}. Wherein the yn3 represents the n3 th subtopics, the N3 represents the total number of subtopics in the dictionary Y. The subtopics can be a small type under a large type such as a large car, bus, truck, or a component such as a chassis, engine, shell, or a lightweight, energy-saving, wear-resistant effect.


Construct a daily-expressions dictionary C of a set of users, C={c1, c2, . . . , cn4, . . . , cN4}. Wherein the cn4 represents the n4 th daily expression, the N4 represents the total number of daily expressions in the dictionary C. The daily expression can be I, you, he, or whatever, want such everyday words.


Step 2.2, decompose e and en1,u according to dictionaries X, Y, C to obtain two text-vector sets we and wn1 correspondingly. The we is about the current-search text e, we={w1e, w2e, . . . , wiee, . . . , wiee}. The wn1 is about the n1 the historical-search text en1,u,







w

n
1


=


{


w
1

n
1


,

w
2

n
1


,


,


W



i

n
1





n
1



,


,

w

I

n
1



n
1



}

.





Wherein the wiee represents the ie th word of the current-search text e; the Ie represents the total number of words in the current-search text e; the






w

i

n
1



n
1





represents the i th word of the n1 th historical-search text en1,u; the In1 represents the total number of words in the n1 th historical-search text en1,u. Here is the use of stuttering word segmentation system to carry out semantic decomposition, the use of stuttering word segmentation used the dictionaries X, Y, C. The dictionary to which the participle belongs is replaced by tiee, and tin1.


Define tiee being the label of the wiee. If the tiee belongs to the dictionary X, define wiee∈X; if the tiee belongs to the dictionary Y, define wiee∈Y; if the tiee belongs to the dictionary C, define wiee∈C; otherwise define wiee∈Ø.


Define tin1 being the label of







w

i

n
1



n
1


.




If the tin1 belongs to the dictionary X, define








w

i

n
1



n
1




X

;




if the tin1 belongs to the dictionary Y, define







w

i

n
1



n
1







Y; if the tin1 belongs to the dictionary C, define








w

i

n
1



n
1




C

,




otherwise define







w

i

n
1



n
1






.





Use labels to detect the dictionary that each word corresponds to, to simplify the identification of the relationship.


Step 2.3, obtain the weight Lin1 of the i th word






w

i

n
1



n
1





by the formula (1).










L
i

n
1


=

{





δ
1

,





if



t
i

n
1





X







δ
2

,





if



t
i

n
1





Y






0
,





if



t
i

n
1






C




{

}











(
1
)







In the formula, the δ1 represents the first weight, the δ2 represents the second weight, and 0<δ21<1. Set weights for words that fall under topics, subtopics, and daily-expressions.


Step 2.4, obtain the weight Liee, of the ie th word wiee by the same way of step 2.3.


Step 2.5, obtain the similarity






g



(


w

i
e

e

,

w

i

n
1



n
1



)





between the wiee and the






w

i

n
1



n
1





by the formula (2).













(


w

i
e

e

,

w

i

n
1



n
1



)

=








(








i
e

=
1


I
e




w

i
e

e



L

i
e

e


)




(








i

n
1


=
1


I

n
1





w

i

n
1



n
1




L

i

n
1



n
1



)



(
















i
e

=
1


I
e




w

i
e

e



L

i
e

e




2












i

n
1


=
1


I

n
1





w

i

n
1



n
1




L

i

n
1



n
1





)



2






(








i
e

=
1


I
e




w

i
e

e



L

i
e

e


)




(








i

n
1


=
1


I

n
1





w

i

n
1



n
1




L

i

n
1



n
1



)











(
2
)







The text vector set is converted into a numerical vector during the computation.


Step 2.6, obtain the similarities between each of the two words respectively from two text-vector sets we and wn1 by the same way of step 2.5.


Collect words with the highest similarity to be a candidate-words set in which one candidate word would be select to be the n1 th word of the we.


A valid-text set Viee is defined by all candidate-words sets, Viee={v1,iee, v2,iee, . . . , vp,iee, . . . , vP,iee}.


Wherein the vP,iee represents the p th candidate word of the ie th word, wiee, the p represents the total number of candidate words. Choose the text you want based on the similarity you want.


Step 3, according to the weight, pick words in the we and the Viee that belong to the two dictionaries X and Y. The step 3 includes steps 3.1˜3.6.


Step 3.1, pick words in the we that belong to the dictionary X.


When wieeLien11, xiee is defined to mean the words corresponding to the wiee and is also from the dictionary X. The first words set is defined by many xiee accordingly, and the Lien1 is the weight of the wiee.


Step 3.2, pick words in the Viee that belong to the dictionary X.


When vp,ieeLp,iee1, xp,iee is defined to mean the words corresponding to the vp,iee and is also from the dictionary X. The second words set is defined by many Viee accordingly, and the Lp,iee is the weight of the vp,iee.


Step 3.3, a large-subject terms set Z is defined by the first words set and the second words set, Z={z1X, z2X, . . . , zn5X, . . . , zN5X}. Wherein the zn5X represents the n5 th large-subject term, 1≤n5≤N5, and the N5 represents the total number of large-subject terms. The number of the large-subject terms is set to prepare the text content for the demand for words of a topic and the closeness of knowledge to the topic.


Step 3.4, pick words in the we that belong to the dictionary Y. When wieeLin11, γiee is defined to mean the words corresponding to the wiee and is also from the dictionary Y.


Step 3.5, pick words in the Viee that belong to the dictionary Y; when Lin11, γivalid is defined to mean the words corresponding to the Viee and is also from the dictionary Y.


Step 3.6, a minor-subject terms set V is defined by the we and the Viee, V={v1Y, v2Y, . . . , vn6Y, . . . vN6Y}. Wherein the vn6Y, represents the n6 th minor-subject term, 1≤n6≤N6, and the No represents the total number of minor-subject terms. The number of the minor-subject terms is set to prepare the text content for the demand for words of a subtopic and the closeness of knowledge to the subtopic.


Step 4, find the corresponding knowledge according to user satisfaction. The step 4 includes steps 4.1˜4.6.


Step 4.1, acquire a knowledge a to be identified, and calculate the frequency of each of the word appearing in the knowledge a after semantic decomposition under the dictionary X and the minor-subject terms set V,







{


s

x
1



a


,





s

x

n
2




a



,





s

x

N
2




a



,

t

v
1
Y



a


,


,

t

v

n
6

Y



a


,


,

t

v

N
6

Y



a



}

.




Wherein the





s

x

n
2




a





represents the frequency of the n2 th topic xn2 appearing in the knowledge a,







0


s

x

n
2




a



1

;




and the






t

v

N
6



Y




a





represents the frequency of the n6 th subtopic vn6Y appearing in the knowledge a, 0≤







t

v

n
6



Y




a




1
.





Step 4.2, assigns a value to each of the word in the minor-subject terms set V, and a weighting function H(vn6Y) of words in minor-subject terms set V is defined as formula (3). Here, word frequency is used to show the proportion of each feature in the knowledge a, and it is also the influence of each feature in the knowledge a.










H

(

v

n
6



Y


)

=


v

n
6



Y










n
6

=
1


N
6




v

n
6



Y








(
3
)







Step 4.3, a user-demand degree function Q(vn6Y) is defined as formula (4).












Q



(

v

n
6



Y


)


=

H


(

v

n
6



Y


)


k






(
4
)







In the formula, the K represents users' satisfaction, kϵ(0,100%).


Because there are some effects in the user's overall text that are more searched, this is obviously what the user wants more.


Step 4.4, get a topic xuser required by the user in the topics dictionary X, and calculate the closing degree da between the topic xuser and the knowledge a, d1a=1−sxusera. Wherein the sxusera represents the frequency of the topic xuser appearing in the knowledge a. Because there is usually only one requirement for a car or airplane, for example, set the header requirement to 1.


Step 4.5, get the user's demand for each of the minor-subject term in the minor-subject terms set V, and calculate the user's closing degree d2a to all of the minor-subject terms,







d
2
a

=








n
6

=
1


N
6





(


Q




(

v

n
6

Y

)

2


-


(

t

v

n
6



Y




a


)

2


)

.






Because the semantic decomposition uses the minor-subject terms set V, the subscript of vn6Y is n6.


Step 4.6, calculate the closing degree da between the user's demand and the knowledge a, da=d1a+d2a, obtain all of the closing degree of all of the knowledge, and select some knowledge with less closing degree to fed to the user.


The present embodiment further provides an electronic device, including a memory and a processor. The memory is used to store programs that could support the processor to execute. Wherein the programs are programmed according to the green knowledge recommendation method.


The present embodiment further provides a computer readable storage medium, used to store programs that are programmed according to the green knowledge recommendation method.

Claims
  • 1. A green knowledge recommendation method based on characteristic similarity and user demands, comprises: step 1, obtaining a current-search text e and a historical-search-texts set Eu both from a user u, Eu={e1,u, e2,u . . . , en1,u, . . . , eN1,u}, wherein, the en1,u represents the n1 the historical-search text, 1≤n1≤N1; the N1 represents the total number of historical-search texts;step 2, constructing a topics dictionary and a subtopics dictionary, and decomposing the current-search text e and the historical-search-texts set Eu on the basis of semantic decomposition; the step 2 comprising steps 2.1˜2.6;step 2.1, constructing a topics dictionary X of a green knowledge base, X={x1, x2, . . . , xn2, . . . , xN2}, wherein the xn2 represents the n2 th topics, the N2 represents the total number of topics in the dictionary X;constructing a subtopics dictionary Y of the green knowledge base, Y={y1, y2, . . . , yn3, . . . , yN3}, wherein the yn3 represents the n3 th subtopics, the N3 represents the total number of subtopics in the dictionary Y;constructing a daily-expressions dictionary C of a set of users, C={c1, c2, . . . , cn4, . . . , cN4}, wherein the cn4 represents the n4 th daily expression, the N4 represents the total number of daily expressions in the dictionary C;step 2.2, decomposing e and en1,u according to dictionaries X, Y, C to obtain two text-vector sets we and wn1 correspondingly; the we being about the current-search text e, we={w1e, w2e, . . . , wiee, . . . , wlee}, the wn1 being about the 11 th historical-search text en1,u,
  • 2. An electronic device, comprising a memory and a processor, the memory used to store programs that could support the processor to execute, wherein the programs are programmed according to claim 1.
  • 3. A computer readable storage medium, used to store programs that are programmed according to claim 1.
Priority Claims (1)
Number Date Country Kind
202310103329.X Feb 2023 CN national
Continuations (1)
Number Date Country
Parent PCT/CN2023/118564 Sep 2023 WO
Child 18964413 US