CN113553436A - Knowledge graph updating method and device, electronic equipment and storage medium - Google Patents

Knowledge graph updating method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113553436A
CN113553436A CN202010331693.8A CN202010331693A CN113553436A CN 113553436 A CN113553436 A CN 113553436A CN 202010331693 A CN202010331693 A CN 202010331693A CN 113553436 A CN113553436 A CN 113553436A
Authority
CN
China
Prior art keywords
knowledge
frequency
average
knowledge entity
entity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010331693.8A
Other languages
Chinese (zh)
Inventor
佟博
胡盼盼
赵茜
胡浩
高玮
叶凯亮
周玥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Bozhilin Robot Co Ltd
Original Assignee
Guangdong Bozhilin Robot Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Bozhilin Robot Co Ltd filed Critical Guangdong Bozhilin Robot Co Ltd
Priority to CN202010331693.8A priority Critical patent/CN113553436A/en
Publication of CN113553436A publication Critical patent/CN113553436A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a knowledge graph updating method, a knowledge graph updating device, an electronic device and a storage medium, wherein the method comprises the following steps: acquiring the use frequency of each knowledge entity of a knowledge graph in a plurality of different first time periods, wherein the knowledge graph comprises at least one knowledge entity; calculating a first average use frequency corresponding to each knowledge entity according to the use frequency of each knowledge entity in a plurality of different first time periods; judging whether knowledge entities with first average use frequency smaller than a corresponding first frequency threshold exist in at least one knowledge entity, wherein each knowledge entity corresponds to one first frequency threshold; and if so, updating the knowledge entities with the first average use frequency smaller than the corresponding first frequency threshold.

Description

Knowledge graph updating method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of knowledge graph updating technologies, and in particular, to a knowledge graph updating method, apparatus, electronic device, and storage medium.
Background
At present, a main updating method of the knowledge graph is periodic full-scale updating, wherein the full-scale updating refers to the whole indiscriminate updating of the content of the knowledge graph after a certain period, although the correctness and timeliness of knowledge can be guaranteed to the maximum extent, the problems of long time consumption, overlarge bandwidth cost and low pertinence exist.
Disclosure of Invention
An object of the embodiments of the present application is to provide a knowledge graph updating method, an apparatus, an electronic device, and a storage medium, so as to solve the problems of long time consumption, excessively large bandwidth cost, and low pertinence of the knowledge graph periodic full-scale updating method.
In a first aspect, an embodiment provides a knowledge graph updating method, which includes: acquiring the use frequency of each knowledge entity of a knowledge graph in a plurality of different first time periods, wherein the knowledge graph comprises at least one knowledge entity; calculating a first average use frequency corresponding to each knowledge entity according to the use frequency of each knowledge entity in a plurality of different first time periods; judging whether knowledge entities with first average use frequency smaller than a corresponding first frequency threshold exist in the at least one knowledge entity, wherein each knowledge entity corresponds to one first frequency threshold; and if so, updating the knowledge entities with the first average use frequency smaller than the corresponding first frequency threshold.
In the designed knowledge graph updating method, the average use frequency of knowledge entities in the knowledge graph is determined according to the use frequencies of the knowledge entities in a plurality of different first time periods, and then the knowledge entities are determined to be required to be updated at the moment when the average use frequency of each knowledge entity is smaller than the correspondingly set first frequency threshold value, so that the knowledge entities required to be updated and the time points for updating the knowledge entities can be found more accurately, the problems of long time consumption, overlarge bandwidth cost and low pertinence existing in the knowledge graph periodic full-scale updating method are solved, the knowledge graph updating efficiency and pertinence are improved, and the updating cost of the knowledge graph is reduced.
In an optional implementation manner of the first aspect, the calculating, according to usage frequencies of each knowledge entity in a plurality of different first time periods, a first average usage frequency corresponding to each knowledge entity includes: respectively substituting the use frequency of each knowledge entity in a plurality of different first time periods into a probability distribution function formula of Poisson distribution to obtain a formula to be calculated corresponding to each knowledge entity; and calculating the formula to be calculated corresponding to each knowledge entity by using a maximum likelihood method to obtain a first average using frequency corresponding to each knowledge entity.
In the embodiment designed above, the average usage frequency of the knowledge entity is calculated by poisson distribution and maximum likelihood method, so that the average usage frequency of the knowledge entity is not greatly influenced by a single time point or the preference of a certain user, and the average usage frequency obtained by calculation is more accurate.
In an optional implementation manner of the first aspect, before the determining whether there is a knowledge entity with a first average usage frequency smaller than a corresponding first frequency threshold in the at least one knowledge entity, the method further includes: judging whether a knowledge entity with a first average use frequency smaller than a corresponding second frequency threshold exists in the at least one knowledge entity, wherein the second frequency threshold is larger than the first frequency threshold; if yes, acquiring data to be updated of the knowledge entity of which the first average using frequency is smaller than the corresponding second frequency threshold; the updating the knowledge entities having the first average usage frequency less than the corresponding first frequency threshold comprises: and updating the knowledge entities of which the corresponding first average use frequency is less than the corresponding first frequency threshold according to the acquired data to be updated.
In the embodiment designed above, before the knowledge entity is judged to be updated, the update data of the knowledge entity is prepared in advance through the threshold value larger than the first frequency threshold value, so that data support is made in advance for the subsequent update of the knowledge entity, the update time of the knowledge entity is saved, and the update efficiency of the knowledge entity is improved.
In an optional implementation manner of the first aspect, the updating the knowledge entity whose first average usage frequency is smaller than the corresponding first frequency threshold includes: and acquiring data to be updated of the knowledge entities with the first average use frequency smaller than the corresponding first frequency threshold, and updating the corresponding knowledge entities according to the data to be updated.
In an optional implementation manner of the first aspect, before the frequency of use of each knowledge entity of the acquisition knowledge-graph over a plurality of different first time periods, the method further comprises: acquiring the use frequency of each knowledge entity in a plurality of different second time periods; calculating a second average use frequency corresponding to each knowledge entity according to the use frequency of each knowledge entity in a plurality of different second time periods; dividing the plurality of second average use frequencies into a plurality of intervals according to a preset interval length; determining an interval corresponding to each knowledge entity according to the range of the second average using frequency corresponding to each interval and the second average using frequency of each knowledge entity; and selecting any second average using frequency from a plurality of second average using frequencies corresponding to each interval as a first frequency threshold of the knowledge entity located in the corresponding interval.
In an optional implementation manner of the first aspect, the selecting, as the first frequency threshold of the knowledge entity located in the corresponding interval, any second average usage frequency corresponding to each interval includes: and selecting the minimum second average using frequency from a plurality of second average using frequencies corresponding to each interval as a first frequency threshold of the knowledge entity located in the corresponding interval.
In the two embodiments of the design, the knowledge entities with different heat degrees are grouped by collecting the average use frequency of the knowledge entities in the early stage, the first frequency threshold value of the knowledge entity located in the corresponding interval is determined according to the frequency range of each group, and then the knowledge entities with similar use frequencies use the same first frequency threshold value, so that the workload of setting the frequency threshold value for the knowledge entities can be reduced.
In a second aspect, an embodiment provides a knowledge graph updating apparatus, the method including: the acquisition module is used for acquiring the use frequency of each knowledge entity of the knowledge graph in a plurality of different first time periods, wherein the knowledge graph comprises at least one knowledge entity; the calculation module is used for calculating a first average use frequency corresponding to each knowledge entity according to the use frequency of each knowledge entity in a plurality of different first time periods; the judging module is used for judging whether knowledge entities with first average use frequency smaller than a corresponding first frequency threshold exist in the at least one knowledge entity, wherein each knowledge entity corresponds to one first frequency threshold; and the updating module is used for updating the knowledge entities with the first average use frequency smaller than the corresponding first frequency threshold.
In the knowledge graph updating device designed above, the average use frequency of the knowledge entities in the knowledge graph is determined according to the use frequencies of the knowledge entities in the knowledge graph in a plurality of different first time periods, and then the knowledge entities are determined to be required to be updated at the moment when the average use frequency of each knowledge entity is compared to be smaller than the correspondingly set first frequency threshold, so that the knowledge entities required to be updated and the time points for updating the knowledge entities can be found more accurately, the problems of long time consumption, excessively large bandwidth cost and low pertinence existing in the periodic full-scale knowledge graph updating method are solved, the knowledge graph updating efficiency and pertinence are improved, and the updating cost of the knowledge graph is reduced.
In an optional implementation manner of the second aspect, the calculation module is specifically configured to bring the usage frequency of each knowledge entity in a plurality of different first time periods into a probability distribution function formula of poisson distribution, respectively, to obtain a formula to be calculated corresponding to each knowledge entity; and calculating the formula to be calculated corresponding to each knowledge entity by using a maximum likelihood method to obtain a first average using frequency corresponding to each knowledge entity.
In an optional implementation manner of the second aspect, the determining module is further configured to determine whether a knowledge entity with a first average usage frequency smaller than a corresponding second frequency threshold exists in the at least one knowledge entity, where the second frequency threshold is larger than the first frequency threshold; the acquisition module is further configured to acquire data to be updated of the knowledge entity of which the first average usage frequency is smaller than the corresponding second frequency threshold; the updating module is specifically configured to update the knowledge entity whose corresponding first average usage frequency is smaller than the corresponding first frequency threshold according to the acquired data to be updated.
In an optional implementation manner of the second aspect, the updating module is specifically configured to acquire data to be updated of a knowledge entity of which the first average usage frequency is smaller than the corresponding first frequency threshold, and update the corresponding knowledge entity according to the data to be updated.
In an optional implementation manner of the second aspect, the obtaining module is further configured to obtain a usage frequency of each knowledge entity in a plurality of different second time periods; the calculation module is further configured to calculate a second average usage frequency corresponding to each knowledge entity according to the usage frequency of each knowledge entity in a plurality of different second time periods; the dividing module is used for dividing the plurality of calculated second average use frequencies into a plurality of intervals according to the preset interval length; the determining module is used for determining the interval corresponding to each knowledge entity according to the range of the second average using frequency corresponding to each interval and the second average using frequency of each knowledge entity; and selecting any second average using frequency from a plurality of second average using frequencies corresponding to each interval as a first frequency threshold of the knowledge entity located in the corresponding interval.
In an optional implementation manner of the second aspect, the determining module is specifically configured to select a minimum second average usage frequency from a plurality of second average usage frequencies corresponding to each interval as a first frequency threshold of the knowledge entity located in the corresponding interval.
In a third aspect, an embodiment provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor executes the computer program to perform the method in the first aspect or any optional implementation manner of the first aspect.
In a fourth aspect, embodiments provide a non-transitory readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method of the first aspect, any optional implementation manner of the first aspect.
In a fifth aspect, embodiments provide a computer program product, which when run on a computer, causes the computer to execute the method of the first aspect or any optional implementation manner of the first aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
FIG. 1 is a first flowchart of a knowledge-graph updating method provided by an embodiment of the present application;
FIG. 2 is a second flowchart of a knowledge-graph update method provided by an embodiment of the present application;
FIG. 3 is a third flowchart of a knowledge-map updating method provided by an embodiment of the present application;
FIG. 4 is a fourth flowchart of a knowledge-graph update method provided by an embodiment of the present application;
FIG. 5 is a fifth flowchart of a knowledge-graph updating method provided by an embodiment of the present application;
FIG. 6 is a sixth flowchart of a knowledge-graph update method provided by an embodiment of the present application;
FIG. 7 is a block diagram of a knowledge graph updating apparatus according to an embodiment of the present application;
fig. 8 is a block diagram of an electronic device according to an embodiment of the present application.
Icon: 200-an obtaining module; 202-a calculation module; 204-a judging module; 206-an update module; 208-a partitioning module; 210-a determination module; 3-an electronic device; 301-a processor; 302-a memory; 303-communication bus.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
First embodiment
As shown in fig. 1, an embodiment of the present application provides a knowledge graph updating method, which may be applied to a device such as a server, and automatically find a content to be updated in a knowledge graph to update at a corresponding time point, where the method specifically includes the following steps:
step S100: the frequency of use of each knowledge entity of the knowledge-graph over a plurality of different first time periods is obtained.
Step S102: and calculating a first average use frequency corresponding to each knowledge entity according to the use frequency of each knowledge entity in a plurality of different first time periods.
Step S104: and judging whether a knowledge entity with the first average use frequency smaller than the corresponding first frequency threshold exists in the at least one knowledge entity, and if so, turning to the step S106.
Step S106: the knowledge entities having a first average usage frequency less than the corresponding first frequency threshold are updated.
Before describing the method, a knowledge graph and a knowledge entity in the present application will be described. The knowledge graph is a general composition which represents a plurality of knowledge entities and describes the relationship between the entities, wherein each knowledge entity represents various entities or concepts in the knowledge graph, for example, the knowledge graph corresponding to a movie recommendation system, when a user browses a certain movie or several movies in a website, the knowledge graph constructed by massive movie information in the background finds the relationship or similarity between the several movies according to the browsing records of the user, and further can search or deduce other movies that the user may be interested in according to the knowledge graph, for example, the user searches several movies of a certain star, and the several movies all belong to "action films", according to the foregoing, the knowledge graph may recommend other "action films" of the star for the knowledge graph, wherein the foregoing names of the star and "action films" are the entities in the knowledge graph, i.e. the knowledge entity in the present application.
In step S100, the usage frequency of the knowledge entities may also be expressed as the usage times or the access amount of the knowledge entities, and the usage frequency of acquiring the knowledge entities may be determined by collecting the access amount of the user to the knowledge entities over a period of time, and specifically, the usage habits of the user may be collected by a crowdsourcing feedback mechanism, for example, which knowledge entities are frequently triggered or used, which knowledge entities are never triggered or used, and further obtain the usage frequency of a certain knowledge entity by the user, on the basis of which, the usage frequency of each knowledge entity in the knowledge graph in a plurality of different first time periods may be obtained by collecting a plurality of different first time periods, that is, a plurality of different time periods, and after the usage frequency of each knowledge entity of the knowledge graph in the plurality of different first time periods is acquired, step S102 may be executed.
In step S102, the first average usage frequency corresponding to each knowledge entity is calculated according to the usage frequency of each knowledge entity in a plurality of different first time periods, the first average usage frequency corresponding to each knowledge entity can be obtained by calculating an average value of the usage frequency of each knowledge entity in a plurality of different first time periods, or a poisson distribution model of each knowledge entity can be established according to the usage frequency of each knowledge entity in a plurality of different first time periods, and the first average usage frequency corresponding to each knowledge entity is estimated through the poisson distribution model. After the first average usage frequency corresponding to each knowledge entity is calculated, step S104 may be executed to determine whether a knowledge entity with the first average usage frequency smaller than the corresponding first frequency threshold exists in at least one knowledge entity, that is, determine whether the first average usage frequency of each knowledge entity is smaller than the first frequency threshold corresponding to the knowledge entity, observe whether a knowledge entity with the first average usage frequency smaller than the first frequency threshold corresponding to the knowledge entity exists, if so, indicate that the knowledge entity needs to be updated, and then step S106 may be executed to update the knowledge entity with the first average usage frequency smaller than the corresponding first frequency threshold. Each knowledge entity corresponds to a first frequency threshold, the first frequency thresholds corresponding to different knowledge entities can be the same or different, and can be set in advance according to the use condition of each knowledge entity; the updating of the knowledge entity means that the knowledge entity is used as a center to update the knowledge entity, the attribute of the knowledge entity and the relationship between the knowledge entity and other entities, and the method for updating the knowledge entity can adopt any updating method in the prior art and is not the key point protected by the application.
In the designed knowledge graph updating method, the average use frequency of knowledge entities in the knowledge graph is determined according to the use frequencies of the knowledge entities in a plurality of different first time periods, and then the knowledge entities are determined to be required to be updated at the moment when the average use frequency of each knowledge entity is smaller than the correspondingly set first frequency threshold value, so that the knowledge entities required to be updated and the time points for updating the knowledge entities can be found more accurately, the problems of long time consumption, overlarge bandwidth cost and low pertinence existing in the knowledge graph periodic full-scale updating method are solved, the knowledge graph updating efficiency and pertinence are improved, and the updating cost of the knowledge graph is reduced.
In an alternative implementation manner of this embodiment, it has been described above that the step S102 calculates the first average usage frequency corresponding to each knowledge entity according to the usage frequency of each knowledge entity in a plurality of different first time periods, so as to establish a poisson distribution model of each knowledge entity according to the usage frequency of each knowledge entity in a plurality of different first time periods, and further estimate the first average usage frequency corresponding to each knowledge through the poisson distribution model, as shown in fig. 2, it may specifically be as follows:
step S1020: and respectively substituting the use frequency of each knowledge entity in a plurality of different first time periods into a probability distribution function formula of Poisson distribution to obtain a formula to be calculated corresponding to each knowledge entity.
Step S1022: and calculating the formula to be calculated corresponding to each knowledge entity by using a maximum likelihood method to obtain a first average using frequency corresponding to each knowledge entity.
Before describing step S1020, the reason why data is processed using poisson distribution will be described first. When the number of users is small, the average value of the access amount may be greatly influenced due to a single time point or the preference of a user, because when the number of users is small, the average value is estimated through maximum likelihood estimation, that is, several collected points are obtained, that is, the average way is adopted for the points, when the obtained data amount is small, the average value deviates from the real average value more far, and a large amount of time is needed to obtain enough data, and this situation can be effectively avoided by adopting a method combining poisson distribution and the maximum likelihood method, and the real network access amount (especially the simulation data when the interconnected servers are deployed) generally follows poisson distribution.
The probability distribution function formula P { x ═ k } of the poisson distribution in step S1020 is:
Figure BDA0002463076800000101
wherein x is1,x2…xnIs a subsample xi12…ξnA set of observations of (a); λ is an unknown parameter greater than 0.
On this basis, the likelihood function L (λ) obtained by the maximum likelihood method is:
Figure BDA0002463076800000111
Figure BDA0002463076800000112
wherein, L is a derivative function of λ, and the derivative is used to solve the extremum:
Figure BDA0002463076800000113
the following formula can be obtained:
Figure BDA0002463076800000114
make it
Figure BDA0002463076800000115
To obtain
Figure BDA0002463076800000116
The
Figure BDA0002463076800000117
Maximizing L to obtain maximum likelihood estimator of lambda
Figure BDA0002463076800000118
Further, λ, i.e. the average frequency of use of a knowledge entity, can be obtained.
In an optional implementation manner of this embodiment, when updating knowledge entities, preparation of update data needs to be performed on the knowledge entities to be updated, so before determining whether a knowledge entity with a first average usage frequency smaller than a corresponding first frequency threshold exists in at least one knowledge entity in step S104, as shown in fig. 3, the method may further include the following steps:
step S1030: and judging whether the knowledge entity with the first average use frequency smaller than the corresponding second frequency threshold exists in the at least one knowledge entity, and if so, turning to the step S1031.
Step S1031: and acquiring the data to be updated of the knowledge entity of which the first average using frequency is less than the corresponding second frequency threshold.
On this basis, the step S106 updates the knowledge entity whose first average usage frequency is smaller than the corresponding first frequency threshold, which may specifically be the following steps:
step S1060: and updating the knowledge entities of which the corresponding first average use frequency is less than the corresponding first frequency threshold according to the acquired data to be updated.
In step S1030, the second frequency threshold is greater than the first frequency threshold, that is, before step S104 is executed to determine whether there is a knowledge entity whose first average usage frequency is smaller than the corresponding first frequency threshold, it is determined whether there is a knowledge entity whose first average usage frequency is smaller than the second frequency threshold, and if yes, step S1031 is executed to obtain data to be updated of the knowledge entity whose first average usage frequency is smaller than the second frequency threshold, so as to prepare data for updating the knowledge entity.
On the basis, step S104 is further executed to determine that the knowledge entity with the first average usage frequency smaller than the second frequency threshold is still smaller than the corresponding first frequency threshold, and when it is determined that the knowledge entity with the first average usage frequency smaller than the second frequency threshold is smaller than the first frequency threshold, the corresponding knowledge entity is updated according to the acquired data to be updated.
In the embodiment designed above, before the knowledge entity is judged to be updated, the update data of the knowledge entity is prepared in advance through the threshold value larger than the first frequency threshold value, so that data support is made in advance for the subsequent update of the knowledge entity, the update time of the knowledge entity is saved, and the update efficiency of the knowledge entity is improved.
In an optional implementation manner of this embodiment, in addition to the previous preparation of the data to be updated of the knowledge entity in the previous embodiment, after determining that the knowledge entity needs to be updated in step S104, the data to be updated may be prepared immediately to update the knowledge entity, and on this basis, as shown in fig. 4, step S106 specifically includes the following steps:
step S1061: and acquiring data to be updated of the knowledge entities with the first average use frequency smaller than the corresponding first frequency threshold, and updating the corresponding knowledge entities according to the data to be updated.
In an alternative implementation manner of this embodiment, before obtaining the frequency of use of each knowledge entity of the knowledge-graph in the plurality of different first time periods in step S100, as shown in fig. 5, the method may further include the following steps:
step S90: the frequency of use of each knowledge entity in a plurality of different second time periods is obtained.
Step S91: and calculating a second average use frequency corresponding to each knowledge entity according to the use frequency of each knowledge entity in a plurality of different second time periods.
Step S92: and dividing the plurality of calculated second average use frequencies into a plurality of intervals according to the preset interval length.
Step S93: and determining the interval corresponding to each knowledge entity according to the range of the second average using frequency corresponding to each interval and the second average using frequency of each knowledge entity.
Step S94: and selecting any second average using frequency from a plurality of second average using frequencies corresponding to each interval as a first frequency threshold of the knowledge entity located in the corresponding interval.
In step S90, the plurality of different second time periods may be a plurality of time periods before the plurality of different first time periods, for example, the plurality of different second time periods may be a plurality of time periods one month before the plurality of different first time periods. The rest of the methods are similar to the method in step S100, and are not repeated here, after the using frequencies of each knowledge entity in a plurality of different second time periods are obtained in step S90, step S91 may be performed to calculate the second average using frequency corresponding to each knowledge entity according to the using frequencies of each knowledge entity in a plurality of different second time periods, wherein the method of calculating the second average using frequency in step S91 may be the above-mentioned direct average calculation, or may be the calculation by establishing a poisson distribution model.
After the second average use frequency corresponding to each knowledge entity is obtained in step S91, step S92 is executed to obtain the maximum average use frequency and the minimum average use frequency of the obtained second average use frequencies, the maximum average use frequency and the minimum average use frequency are used as two poles, then the numerical value between the maximum average use frequency and the minimum average use frequency is divided into a plurality of intervals, for example, 20 intervals, according to a preset interval, and step S93 is executed to find the interval where each knowledge entity is located according to the frequency numerical range of each interval and the second average use frequency of each knowledge entity obtained in step S92, wherein different knowledge entities may be located in the same interval. On this basis, step S94 is performed to determine a first frequency threshold value as a knowledge entity located within the corresponding section according to the frequency range of each section.
The above-mentioned method is to group a plurality of knowledge entities, and then determine the threshold of the knowledge entities in each group according to the frequency range of each group, because it is difficult to give a threshold to each knowledge entity in practical operation, different knowledge entities have heat or cold, and the visit quantity of some knowledge entities under normal conditions is lower than others (e.g. philosophy, Xiaozhongchan scholanzi in movie knowledge map, etc.), so that the knowledge entities with basically the same heat degree are put into the same group and limited by a uniform threshold, and thus the workload of threshold determination can be reduced.
In an alternative implementation manner of this embodiment, the aforementioned step S94 determines the first frequency threshold as the knowledge entity located in the corresponding interval according to the frequency range of each interval, as shown in fig. 6, specifically, the following steps may be performed:
step S940: and selecting the minimum second average using frequency from a plurality of second average using frequencies corresponding to each interval as a first frequency threshold of the knowledge entity located in the corresponding interval.
The step is carried out by determining the lower limit value, namely the minimum value, of the frequency range of each interval as the first frequency threshold value of the knowledge entity located in the corresponding interval; on the basis, the middle value of the frequency range of each interval can be determined as a second frequency threshold value of the knowledge entity located in the corresponding interval, namely, a threshold value for acquiring the data to be updated; it is also possible to determine five quarters of the minimum value of the frequency range of each interval as the first frequency threshold of the knowledge entity located within the corresponding interval, and further determine five quarters of the middle value of the corresponding interval as the second frequency threshold of the knowledge entity located within the corresponding interval.
In an alternative embodiment of this embodiment, after acquiring the usage frequency of each knowledge entity in a plurality of different second time periods in step S90, a lower usage frequency limit value may be set, and if the usage frequency is smaller than this range, the knowledge entities smaller than this usage frequency range are removed and do not participate in the subsequent inter-partition operation, for example, the lower usage frequency limit value is set to 20, and the usage frequency of a certain knowledge entity is 0 and is smaller than this lower limit value, which indicates that the knowledge entity is never triggered.
Second embodiment
Fig. 7 shows a schematic block diagram of a knowledge-graph updating apparatus provided in the present application, and it should be understood that the apparatus corresponds to the method embodiments in fig. 1 to 6, and can perform the steps involved in the method in the first embodiment, and the specific functions of the apparatus can be referred to the description above, and the detailed description is appropriately omitted here to avoid repetition. The device includes at least one software function that can be stored in memory in the form of software or firmware (firmware) or solidified in the Operating System (OS) of the device. Specifically, the apparatus includes: an obtaining module 200, configured to obtain a usage frequency of each knowledge entity of a knowledge graph in a plurality of different first time periods, where the knowledge graph includes at least one knowledge entity; a calculating module 202, configured to calculate, according to usage frequencies of each knowledge entity in multiple different first time periods, a first average usage frequency corresponding to each knowledge entity; a determining module 204, configured to determine whether a knowledge entity with a first average usage frequency smaller than a corresponding first frequency threshold exists in at least one knowledge entity, where each knowledge entity corresponds to one first frequency threshold; an update module 206, configured to update the knowledge entities with the first average usage frequency being smaller than the corresponding first frequency threshold.
In the knowledge graph updating device designed above, the average use frequency of the knowledge entities in the knowledge graph is determined according to the use frequencies of the knowledge entities in the knowledge graph in a plurality of different first time periods, and then the knowledge entities are determined to be required to be updated at the moment when the average use frequency of each knowledge entity is compared to be smaller than the correspondingly set first frequency threshold, so that the knowledge entities required to be updated and the time points for updating the knowledge entities can be found more accurately, the problems of long time consumption, excessively large bandwidth cost and low pertinence existing in the periodic full-scale knowledge graph updating method are solved, the knowledge graph updating efficiency and pertinence are improved, and the updating cost of the knowledge graph is reduced.
In an optional implementation manner of this embodiment, the calculating module 202 is specifically configured to bring the usage frequency of each knowledge entity in a plurality of different first time periods into a probability distribution function formula of poisson distribution, and obtain a formula to be calculated corresponding to each knowledge entity; and calculating the formula to be calculated corresponding to each knowledge entity by using a maximum likelihood method to obtain a first average using frequency corresponding to each knowledge entity.
In an optional implementation manner of this embodiment, the determining module 204 is further configured to determine whether a knowledge entity whose first average usage frequency is smaller than a corresponding second frequency threshold exists in the at least one knowledge entity, where the second frequency threshold is greater than the first frequency threshold; the obtaining module 200 is further configured to obtain data to be updated of the knowledge entity of which the first average usage frequency is smaller than the corresponding second frequency threshold; the updating module 206 is specifically configured to update the knowledge entity whose corresponding first average usage frequency is smaller than the corresponding first frequency threshold according to the obtained data to be updated.
In an optional implementation manner of this embodiment, the updating module 206 is specifically configured to acquire data to be updated of a knowledge entity whose first average usage frequency is smaller than the corresponding first frequency threshold, and update the corresponding knowledge entity according to the data to be updated.
In an optional implementation manner of this embodiment, the obtaining module 200 is further configured to obtain a usage frequency of each knowledge entity in a plurality of different second time periods; the calculating module 202 is further configured to calculate a second average usage frequency corresponding to each knowledge entity according to the usage frequency of each knowledge entity in a plurality of different second time periods; a dividing module 208, configured to divide the calculated multiple second average usage frequencies into multiple intervals according to a preset interval length; a determining module 210, configured to determine an interval corresponding to each knowledge entity according to the range of the second average using frequency corresponding to each interval and the second average using frequency of each knowledge entity; and selecting any one second average use frequency corresponding to each interval as a first frequency threshold of the knowledge entity located in the corresponding interval.
In an optional implementation manner of this embodiment, the determining module 210 is specifically configured to select a minimum second average usage frequency corresponding to each interval as a first frequency threshold of the knowledge entity located in the corresponding interval.
Third embodiment
As shown in fig. 8, the present application provides an electronic device 3 including: a processor 301 and a memory 302, the processor 301 and the memory 302 being interconnected and communicating with each other via a communication bus 303 and/or other form of connection mechanism (not shown), the memory 302 storing a computer program executable by the processor 301, the processor 301 executing the computer program when the computing device is running to perform the method of the first embodiment, any alternative implementation of the first embodiment, such as steps S100 to S106: acquiring the use frequency of each knowledge entity of a knowledge graph in a plurality of different first time periods, wherein the knowledge graph comprises at least one knowledge entity; calculating a first average use frequency corresponding to each knowledge entity according to the use frequency of each knowledge entity in a plurality of different first time periods; judging whether knowledge entities with first average use frequency smaller than a corresponding first frequency threshold exist in at least one knowledge entity, wherein each knowledge entity corresponds to one first frequency threshold; and if so, updating the knowledge entities with the first average use frequency smaller than the corresponding first frequency threshold.
The present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method of the first embodiment, any of the alternative implementations of the first embodiment.
The storage medium may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.
The present application provides a computer program product which, when run on a computer, causes the computer to perform the method of the first embodiment, any of its alternative implementations.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
It should be noted that the functions, if implemented in the form of software functional modules and sold or used as independent products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method for knowledge graph update, the method comprising:
acquiring the use frequency of each knowledge entity of a knowledge graph in a plurality of different first time periods, wherein the knowledge graph comprises at least one knowledge entity;
calculating a first average use frequency corresponding to each knowledge entity according to the use frequency of each knowledge entity in a plurality of different first time periods;
judging whether knowledge entities with first average use frequency smaller than a corresponding first frequency threshold exist in the at least one knowledge entity, wherein each knowledge entity corresponds to one first frequency threshold;
and if so, updating the knowledge entities with the first average use frequency smaller than the corresponding first frequency threshold.
2. The method of claim 1, wherein the calculating a first average usage frequency corresponding to each knowledge entity according to the usage frequency of each knowledge entity in a plurality of different first time periods comprises:
respectively substituting the use frequency of each knowledge entity in a plurality of different first time periods into a probability distribution function formula of Poisson distribution to obtain a formula to be calculated corresponding to each knowledge entity;
and calculating the formula to be calculated corresponding to each knowledge entity by using a maximum likelihood method to obtain a first average using frequency corresponding to each knowledge entity.
3. The method of claim 1, wherein prior to said determining whether knowledge entities exist in the at least one knowledge entity having a first average usage frequency that is less than a corresponding first frequency threshold, the method further comprises:
judging whether a knowledge entity with a first average use frequency smaller than a corresponding second frequency threshold exists in the at least one knowledge entity, wherein the second frequency threshold is larger than the first frequency threshold;
if yes, acquiring data to be updated of the knowledge entity of which the first average using frequency is smaller than the corresponding second frequency threshold;
the updating the knowledge entities having the first average usage frequency less than the corresponding first frequency threshold comprises:
and updating the knowledge entities of which the corresponding first average use frequency is less than the corresponding first frequency threshold according to the acquired data to be updated.
4. The method of claim 1, wherein updating the knowledge entity having the first average usage frequency less than the corresponding first frequency threshold comprises:
and acquiring data to be updated of the knowledge entities with the first average use frequency smaller than the corresponding first frequency threshold, and updating the corresponding knowledge entities according to the data to be updated.
5. The method of claim 1, wherein prior to the frequency of use of each knowledge entity of the acquired knowledge-graph over a plurality of different first time periods, the method further comprises:
acquiring the use frequency of each knowledge entity in a plurality of different second time periods;
calculating a second average use frequency corresponding to each knowledge entity according to the use frequency of each knowledge entity in a plurality of different second time periods;
dividing the plurality of calculated second average use frequencies into a plurality of intervals according to a preset interval length;
determining an interval corresponding to each knowledge entity according to the range of the second average using frequency corresponding to each interval and the second average using frequency of each knowledge entity;
and selecting any second average using frequency from a plurality of second average using frequencies corresponding to each interval as a first frequency threshold of the knowledge entity located in the corresponding interval.
6. The method according to claim 5, wherein the selecting any one of the second average usage frequencies from the plurality of second average usage frequencies corresponding to each interval as the first frequency threshold of the knowledge entity located in the corresponding interval comprises:
and selecting the minimum second average using frequency from a plurality of second average using frequencies corresponding to each interval as a first frequency threshold of the knowledge entity located in the corresponding interval.
7. A knowledge graph update apparatus, the apparatus comprising:
the acquisition module is used for acquiring the use frequency of each knowledge entity of the knowledge graph in a plurality of different first time periods, wherein the knowledge graph comprises at least one knowledge entity;
the calculation module is used for calculating a first average use frequency corresponding to each knowledge entity according to the use frequency of each knowledge entity in a plurality of different first time periods;
the judging module is used for judging whether knowledge entities with first average use frequency smaller than a corresponding first frequency threshold exist in the at least one knowledge entity, wherein each knowledge entity corresponds to one first frequency threshold;
and the updating module is used for updating the knowledge entities with the first average use frequency smaller than the corresponding first frequency threshold.
8. The apparatus according to claim 7, wherein the calculating module is specifically configured to calculate the first average usage frequency corresponding to each knowledge entity according to a probability distribution function formula of a poisson distribution, a maximum likelihood method, and usage frequencies of each knowledge entity in a plurality of different first time periods.
9. An electronic device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the method of any of claims 1 to 6 when executing the computer program.
10. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of any of claims 1 to 6.
CN202010331693.8A 2020-04-23 2020-04-23 Knowledge graph updating method and device, electronic equipment and storage medium Pending CN113553436A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010331693.8A CN113553436A (en) 2020-04-23 2020-04-23 Knowledge graph updating method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010331693.8A CN113553436A (en) 2020-04-23 2020-04-23 Knowledge graph updating method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113553436A true CN113553436A (en) 2021-10-26

Family

ID=78101229

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010331693.8A Pending CN113553436A (en) 2020-04-23 2020-04-23 Knowledge graph updating method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113553436A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109033160A (en) * 2018-06-15 2018-12-18 东南大学 A kind of knowledge mapping dynamic updating method
CN109597856A (en) * 2018-12-05 2019-04-09 北京知道创宇信息技术有限公司 A kind of data processing method, device, electronic equipment and storage medium
CN110019823A (en) * 2017-07-13 2019-07-16 阿里巴巴集团控股有限公司 Update the method and device of knowledge mapping
CN110019840A (en) * 2018-07-20 2019-07-16 腾讯科技(深圳)有限公司 The method, apparatus and server that entity updates in a kind of knowledge mapping
CN110413793A (en) * 2019-06-11 2019-11-05 福建奇点时空数字科技有限公司 A kind of knowledge mapping substance feature method for digging based on translation model
WO2020007224A1 (en) * 2018-07-06 2020-01-09 中兴通讯股份有限公司 Knowledge graph construction and smart response method and apparatus, device, and storage medium
CN110737779A (en) * 2019-09-18 2020-01-31 北京三快在线科技有限公司 Knowledge graph construction method and device, storage medium and electronic equipment
CN110765753A (en) * 2019-12-27 2020-02-07 广东博智林机器人有限公司 Method, system, computer device and storage medium for generating file
CN110825889A (en) * 2020-01-09 2020-02-21 广东博智林机器人有限公司 Propaganda information interaction method and device, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110019823A (en) * 2017-07-13 2019-07-16 阿里巴巴集团控股有限公司 Update the method and device of knowledge mapping
CN109033160A (en) * 2018-06-15 2018-12-18 东南大学 A kind of knowledge mapping dynamic updating method
WO2020007224A1 (en) * 2018-07-06 2020-01-09 中兴通讯股份有限公司 Knowledge graph construction and smart response method and apparatus, device, and storage medium
CN110019840A (en) * 2018-07-20 2019-07-16 腾讯科技(深圳)有限公司 The method, apparatus and server that entity updates in a kind of knowledge mapping
CN109597856A (en) * 2018-12-05 2019-04-09 北京知道创宇信息技术有限公司 A kind of data processing method, device, electronic equipment and storage medium
CN110413793A (en) * 2019-06-11 2019-11-05 福建奇点时空数字科技有限公司 A kind of knowledge mapping substance feature method for digging based on translation model
CN110737779A (en) * 2019-09-18 2020-01-31 北京三快在线科技有限公司 Knowledge graph construction method and device, storage medium and electronic equipment
CN110765753A (en) * 2019-12-27 2020-02-07 广东博智林机器人有限公司 Method, system, computer device and storage medium for generating file
CN110825889A (en) * 2020-01-09 2020-02-21 广东博智林机器人有限公司 Propaganda information interaction method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US10025785B2 (en) Method and system of automatically downloading media content in a preferred network
CN107943718B (en) Method and device for cleaning cache file
US20140136571A1 (en) System and Method for Optimizing Data Storage in a Distributed Data Storage Environment
US20160321331A1 (en) Device and method
CN109495543B (en) Management method and device for monitors in ceph cluster
CN110716950A (en) Method, device and equipment for establishing aperture system and computer storage medium
US10250550B2 (en) Social message monitoring method and apparatus
CN111966887A (en) Dynamic caching method and device, electronic equipment and storage medium
CN113556368A (en) User identification method, device, server and storage medium
CN110968802A (en) User characteristic analysis method, analysis device and readable storage medium
CN108228598B (en) Media information sorting method, server and system
CN111913801B (en) Data processing method and device, proxy server, storage system and storage medium
CN113553436A (en) Knowledge graph updating method and device, electronic equipment and storage medium
CN106708880B (en) Topic associated word acquisition method and device
CN111459987A (en) Cache updating method and device
CN112650940A (en) Recommendation method and device of application program, computer equipment and storage medium
CN116089487A (en) Scheduling of query pipeline execution
CN113868373A (en) Word cloud generation method and device, electronic equipment and storage medium
CN108629610B (en) Method and device for determining popularization information exposure
CN111950821A (en) Test method, test device and server
CN110837508A (en) Method, device and equipment for establishing aperture system and computer storage medium
CN110795032B (en) Method, system and related device for updating software layer cache in storage system
CN118051476A (en) Snapshot quota management method, device, equipment and storage medium
CN116595025B (en) Dynamic updating method, terminal and medium of vector tile
CN112307025B (en) Distributed index construction method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20211026

WD01 Invention patent application deemed withdrawn after publication