WO2022183889A1 - 贝叶斯网络结构的生成方法、装置、电子设备和存储介质 - Google Patents

贝叶斯网络结构的生成方法、装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2022183889A1
WO2022183889A1 PCT/CN2022/075660 CN2022075660W WO2022183889A1 WO 2022183889 A1 WO2022183889 A1 WO 2022183889A1 CN 2022075660 W CN2022075660 W CN 2022075660W WO 2022183889 A1 WO2022183889 A1 WO 2022183889A1
Authority
WO
WIPO (PCT)
Prior art keywords
series data
bayesian network
time series
node
time
Prior art date
Application number
PCT/CN2022/075660
Other languages
English (en)
French (fr)
Inventor
丁茹
龚文化
顾松庠
Original Assignee
京东科技控股股份有限公司
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 京东科技控股股份有限公司 filed Critical 京东科技控股股份有限公司
Publication of WO2022183889A1 publication Critical patent/WO2022183889A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • G06N7/01Probabilistic graphical models, e.g. probabilistic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data

Definitions

  • the present application relates to the technical field of data processing, and in particular, to a method, apparatus, electronic device and storage medium for generating a Bayesian network structure.
  • Bayesian network In a Bayesian network, nodes represent variables and edges represent dependencies between variables.
  • the main modeling technology of Bayesian network consists of three stages: Structure Learning, Parameter Estimation and Inference-Asking. Structural learning is mainly to learn the association and relationship orientation between nodes.
  • the main method of learning the Bayesian network graph structure includes two steps: first, learn whether there is a relationship between nodes, that is, A-B; and then learn the direction of the relationship between nodes, that is, A ⁇ B.
  • these two steps are separated, and the direction is determined based on algorithms such as heuristics, which are uncertain.
  • the embodiment of the first aspect of the present application proposes a method for generating a Bayesian network structure, which improves the generation efficiency and accuracy of the Bayesian network structure.
  • the embodiment of the second aspect of the present application provides an apparatus for generating a Bayesian network structure.
  • An embodiment of the third aspect of the present application provides an electronic device.
  • Embodiments of the fourth aspect of the present application provide a computer-readable storage medium.
  • the embodiment of the fifth aspect of the present application provides a computer program product.
  • the embodiment of the first aspect of the present application proposes a method for generating a Bayesian network structure, including:
  • the structure of the plurality of nodes of the Bayesian network is constructed according to the plurality of correlation degrees, so as to generate the structure of the Bayesian network.
  • a plurality of nodes of the Bayesian network are obtained first, and the first time series data corresponding to each node at the first moment is obtained, and the second The second time series data corresponding to the time, and then calculate the multiple correlation degrees between the first time series data of each node and the second time series data of each node, and finally calculate the multiple correlation degrees of the Bayesian network according to the multiple correlation degrees.
  • the nodes are structured to generate the structure of the Bayesian network. Thus, the generation efficiency and accuracy of the Bayesian network structure are improved.
  • the method for generating a Bayesian network structure may also have the following additional technical features:
  • the calculating, respectively, a plurality of correlation degrees between the first time series data of each node and the second time series data of each node includes:
  • the correlation includes but is not limited to an information entropy value, an information gain value, and a Gini coefficient value.
  • the structure construction of multiple nodes of the Bayesian network according to the multiple correlation degrees to generate the structure of the Bayesian network includes:
  • the structure of the plurality of nodes of the Bayesian network is constructed according to the plurality of target correlation degrees, so as to generate the structure of the Bayesian network.
  • the structure construction of multiple nodes of the Bayesian network according to the multiple target correlation degrees to generate the structure of the Bayesian network includes:
  • the structure of the multiple nodes of the Bayesian network is constructed to generate the structure of the Bayesian network.
  • the structures of multiple nodes of the Bayesian network are constructed to generate the The structure of a Bayesian network, including:
  • the cyclic structure in the time series node structure is removed to generate the structure of the Bayesian network.
  • the embodiment of the second aspect of the present application proposes an apparatus for generating a Bayesian network structure, including:
  • the first acquisition module is used to acquire multiple nodes of the Bayesian network
  • a second acquisition module configured to acquire the first time series data corresponding to each of the nodes at the first moment
  • a third obtaining module configured to obtain second time series data corresponding to each node at a second time, wherein the second time is greater than the first time
  • a calculation module for calculating a plurality of correlations between the first time series data of each node and the second time series data of each node
  • the generating module is configured to construct the structure of multiple nodes of the Bayesian network according to the multiple correlation degrees, so as to generate the structure of the Bayesian network.
  • the device for generating a Bayesian network structure first obtains multiple nodes of the Bayesian network through the first obtaining module, and obtains the first time series data corresponding to each node at the first moment through the second obtaining module , and obtain the second time series data corresponding to each node at the second moment through the third acquisition module, and then calculate the number of times between the first time series data of each node and the second time series data of each node through the calculation module. Finally, the generation module constructs the structure of multiple nodes of the Bayesian network according to the multiple correlations, so as to generate the structure of the Bayesian network. Thus, the generation efficiency and accuracy of the Bayesian network structure are improved.
  • the device for generating a Bayesian network structure may also have the following additional technical features:
  • the computing module is specifically used for:
  • the correlation includes but is not limited to an information entropy value, an information gain value, and a Gini coefficient value.
  • the generating module includes:
  • a judging submodule for judging whether each of the correlations satisfies a threshold condition
  • a generating submodule is configured to construct a structure of multiple nodes of the Bayesian network according to the multiple target correlation degrees, so as to generate the structure of the Bayesian network.
  • the generating submodule includes:
  • an obtaining unit used for obtaining the time series data set corresponding to each of the target correlations respectively;
  • a determining unit for determining a connection edge between two time-series nodes corresponding to each of the time-series data sets
  • a generating unit configured to construct a plurality of nodes of the Bayesian network according to the connection edges between the two time-series nodes corresponding to each time-series data set, so as to generate the structure of the Bayesian network .
  • the generating unit is specifically used for:
  • the cyclic structure in the time series node structure is removed to generate the structure of the Bayesian network.
  • the embodiment of the third aspect of the present application proposes an electronic device, including: a memory, a processor, and a computer program stored in the memory and running on the processor, when the processor executes the program, the above-mentioned first
  • the method for generating a Bayesian network structure is described in the embodiments.
  • the processor executes the computer program stored in the memory, thereby improving the generation efficiency and accuracy of the Bayesian network structure.
  • Embodiments of the fourth aspect of the present application provide a computer-readable storage medium on which a computer program is stored.
  • the program is executed by a processor, the generation of the Bayesian network structure described in the foregoing first aspect embodiment is realized. method.
  • the computer-readable storage medium of the embodiment of the present application improves the generation efficiency and accuracy of the Bayesian network structure by storing the computer program and being executed by the processor.
  • Embodiments of the fifth aspect of the present application provide a computer program product, including a computer program that, when executed by a processor, implements the method for generating a Bayesian network structure as described in the foregoing first aspect embodiment.
  • the computer program product of the embodiment of the present application improves the generation efficiency and accuracy of the Bayesian network structure by storing the computer program and being executed by the processor.
  • FIG. 1 is a schematic flowchart of a method for generating a Bayesian network structure according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a method for generating a Bayesian network structure according to another embodiment of the present application
  • FIG. 3 is a schematic flowchart of a method for generating a Bayesian network structure according to another embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a method for generating a Bayesian network structure according to another embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a method for generating a Bayesian network structure according to another embodiment of the present application.
  • FIG. 6 is a schematic block diagram of an apparatus for generating a Bayesian network structure according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • the method for generating a Bayesian network structure may be executed by an electronic device, and the electronic device may be a PC (Personal Computer, personal computer) computer, a tablet computer, a server, or the like.
  • PC Personal Computer, personal computer
  • the electronic device may be a PC (Personal Computer, personal computer) computer, a tablet computer, a server, or the like.
  • the electronic device may be provided with a processing component, a storage component, and a driving component.
  • the driving component and the processing component may be integrated and set
  • the storage component may store an operating system, an application program or other program modules
  • the processing component implements the shell provided by the embodiment of the present application by executing the application program stored in the storage component. Generating method of Yess network structure.
  • the Bayesian network is a kind of probabilistic graph model.
  • the nodes in the Bayesian network represent variables, the edges between the nodes represent the dependencies between the variables, and the direction of the edges between the nodes represents the difference between the variables represented by the nodes. causal relationship between. Take node A pointing to node B as an example, node A is the parent node, node B is the child node, then node A represents the cause, node B represents the result, that is, the variable represented by the parent node A is the cause of the variable represented by the child node B, and the child The variable represented by node B is the result of the variable represented by parent node A.
  • the purpose of the generation of the Bayesian network structure is to generate (learn) the causal relationship between variables.
  • FIG. 1 is a schematic flowchart of a method for generating a Bayesian network structure according to an embodiment of the present application.
  • the method for generating a Bayesian network structure according to the embodiment of the present application can also be executed by the device for generating a Bayesian network structure provided in the embodiment of the present application, and the device can be configured in an electronic device to obtain multiple Bayesian network structures. nodes, and calculate the multiple correlations between the first time series data corresponding to each node at the first moment and the second time series data corresponding to each node at the second moment, and calculate the Bayesian correlation according to the multiple correlations.
  • the structure of the multiple nodes of the Bayesian network is constructed to generate the structure of the Bayesian network, thereby improving the generation efficiency and accuracy of the Bayesian network structure.
  • the method for generating a Bayesian network structure in the embodiment of the present application may also be executed on a server side, the server may be a cloud server, and the method for generating a Bayesian network structure may be executed in the cloud.
  • the method for generating the Bayesian network structure may include steps 101 to 105:
  • Step 101 acquiring multiple nodes of the Bayesian network.
  • the above-mentioned Bayesian network may be a Bayesian network to be subjected to structure generation (learning).
  • the Bayesian network can be pre-stored in the storage space of the electronic device for easy retrieval and use.
  • the storage space is not limited to an entity-based storage space, for example, a hard disk, and the storage space may also be a storage space (cloud storage space) of a network hard disk connected to an electronic device.
  • the Bayesian network described in this embodiment can be a directed acyclic graph (model), wherein the Bayesian network can be applied in a shopping platform (website) to analyze the shopping platform (Website) data for analysis and mining (for example, time series data mining). For example, analyze and mine the shopping information of users in the shopping platform (website), and analyze and mine the sales information of a commodity and its supporting commodities in the shopping platform (website).
  • the Bayesian network may be processed through a node extraction model to obtain multiple nodes of the Bayesian network.
  • the electronic device can obtain the Bayesian network (that is, the Bayesian network to be subjected to structure generation (learning) from its own storage space, and input the Bayesian network into the node extraction model, so as to extract the The model extracts this Bayesian network to output multiple nodes.
  • the Bayesian network that is, the Bayesian network to be subjected to structure generation (learning) from its own storage space
  • learning structure generation
  • the node extraction model described in this embodiment may be trained in advance and pre-stored in the storage space of the electronic device to facilitate retrieval of applications.
  • the training and generation of the node extraction model may be performed by a related server, which may be a cloud server or a computer host, and the server and the method for generating a Bayesian network structure provided by the application embodiments may be executed.
  • a communication connection is established between the electronic devices, and the communication connection may be at least one of a wireless network connection and a wired network connection.
  • the server can send the trained transformation model to the electronic device, so that the electronic device can call it when needed, thereby greatly reducing the computing pressure of the electronic device.
  • the Bayesian network may also be processed based on a preset acquisition algorithm to acquire multiple nodes of the Bayesian network, wherein the preset acquisition algorithm may be calibrated according to actual conditions.
  • Step 102 Obtain first time series data corresponding to each node at the first moment.
  • Step 103 Acquire second time series data corresponding to each node at a second time, where the second time is greater than the first time.
  • the electronic device can also acquire the first time series data corresponding to each node at the first moment based on a preset time series data acquisition algorithm, so as to obtain the time series data of each node at the first moment.
  • the preset time series data acquisition algorithm can be calibrated according to the actual situation.
  • the first time series data corresponding to each node in the first time period may also be obtained, and the second time series data corresponding to each node in the second time period may be obtained, wherein the The start time point of the second time period may be earlier than the start time point of the first time period.
  • Step 104 Calculate a plurality of correlations between the first time series data of each node and the second time series data of each node, respectively.
  • the correlation may include, but is not limited to, an information entropy value, an information gain value, and a Gini coefficient value. It should be noted that the smaller the information entropy value and the Gini coefficient value described in this embodiment, the better, and the larger the information gain value, the better.
  • calculating a plurality of correlations between the first time series data of each node and the second time series data of each node, respectively, may include steps 201 and 202:
  • Step 201 Pair the first time series data of each node and the second time series data of each node respectively to obtain multiple time series data sets.
  • the electronic device may pair the first time series data of each node and the second time series data of each node respectively, to obtain multiple time series data sets, wherein one time series data set may include one matching pair.
  • the multiple nodes include A, B and C
  • the corresponding first time series data are A1, B1 and C1
  • the corresponding second time series data are A2, B2 and C2.
  • nine time series data sets can be obtained, namely ⁇ A1, A2 ⁇ , ⁇ A1, B2 ⁇ , ⁇ A1, C2 ⁇ , ⁇ B1, A2 ⁇ , ⁇ B1, B2 ⁇ , ⁇ B1, C2 ⁇ , ⁇ C1, A2 ⁇ , ⁇ C1, B2 ⁇ , and ⁇ C1, C2 ⁇ .
  • the electronic device may temporarily store them in the storage space of the electronic device for subsequent use.
  • Step 202 Calculate the correlation between the first time series data and the second time series data in each time series data set to obtain multiple correlation degrees.
  • the correlation between the first time series data and the second time series data in each time series data set may be calculated by using a preset correlation degree calculation formula.
  • the preset correlation calculation formula can be calibrated according to the actual situation.
  • the electronic device can calculate the correlation degree between the first time series data and the second time series data in each time series data set according to a preset correlation degree calculation formula.
  • the preset correlation calculation formula can be calibrated according to the actual situation.
  • the preset correlation calculation formula may be a Gini coefficient calculation formula.
  • the electronic device can calculate the Gini coefficient between the first time series data and the second time series data in each time series data set by using the above-mentioned Gini coefficient calculation formula after obtaining the above-mentioned multiple time series data sets.
  • Step 105 constructing the structure of multiple nodes of the Bayesian network according to the multiple correlation degrees, so as to generate the structure of the Bayesian network.
  • the structure of multiple nodes of the Bayesian network may be constructed according to a preset structure construction algorithm and multiple correlation degrees, so as to generate the structure of the Bayesian network.
  • the preset structure construction algorithm can be calibrated according to the actual situation.
  • the electronic device can further construct the structure of multiple nodes of the Bayesian network according to the preset structure construction algorithm and the multiple correlation degrees, so as to generate the structure of the Bayesian network. .
  • a plurality of nodes of the Bayesian network are obtained first, and the first time series data corresponding to each node at the first moment is obtained, and the second time series data corresponding to each node at the second moment is obtained, Then, the multiple correlation degrees between the first time series data of each node and the second time series data of each node are calculated respectively, and finally the multiple nodes of the Bayesian network are structured according to the multiple correlation degrees to generate a Bayesian network.
  • the structure of the Yes network thus, the generation efficiency and accuracy of the Bayesian network structure are improved.
  • multiple nodes of the Bayesian network are structured according to multiple correlation degrees to generate the structure of the Bayesian network, It can include steps 301 to 303:
  • Step 301 Determine whether each correlation degree satisfies a threshold condition.
  • the threshold condition can be calibrated according to the actual situation, and can be pre-stored in the storage space of the electronic device for easy retrieval and use.
  • step 302 the correlation degrees that do not meet the threshold condition are deleted from the plurality of correlation degrees to obtain a plurality of target correlation degrees.
  • the electronic device can separately determine whether each of the multiple correlations is greater than the Gini threshold, and will be greater than the Gini threshold.
  • the correlations of the Gini threshold are deleted from the plurality of correlations to obtain a plurality of target correlations (ie, the plurality of correlations remaining after the above-mentioned deletion operation).
  • the electronic device can separately determine whether each correlation degree in the multiple correlation degrees is smaller than the information gain threshold value, and set the correlation degree smaller than the information gain threshold value Remove from multiple affinities to get multiple target affinities.
  • Step 303 construct the structure of multiple nodes of the Bayesian network according to the multiple target correlation degrees, so as to generate the structure of the Bayesian network.
  • the structure of multiple nodes of the Bayesian network is constructed according to multiple target correlation degrees to generate the structure of the Bayesian network , which may include steps 401 to 403:
  • Step 401 respectively acquiring time series data sets corresponding to each target correlation degree.
  • Step 402 Determine a connection edge between two time-series nodes corresponding to each time-series data set.
  • the electronic device can search the storage space of the electronic device according to each target correlation degree to find out the time series data set corresponding to each target correlation degree. Then, the electronic device may use the connection between the time series node corresponding to the first time series data and the time series node corresponding to the second time series data in each time series data set as a connection edge.
  • Step 403 according to the connection edge between the two time-series nodes corresponding to each time-series data set, construct the structure of multiple nodes of the Bayesian network to generate the structure of the Bayesian network.
  • Step 501 establishing a connection edge from the time sequence node corresponding to the first time sequence data in the time sequence data set to the time sequence node corresponding to the second time sequence data in the time sequence data set.
  • the electronic device may also need to determine the direction of the connection edge between the two time series nodes.
  • the above-mentioned method for connecting edges may be that the time sequence node corresponding to the previous time sequence data points to the time sequence node corresponding to the next time sequence data, that is, the time sequence node corresponding to the first time sequence data points to the time sequence corresponding to the second time sequence data. node.
  • the electronic device can also determine the direction of the connection edge according to the time sequence of the time series data in the time series data set, and establish the connection edge from the time series data set.
  • the time series node corresponding to the first time series data points to the connection edge of the time series node corresponding to the second time series data in the time series data set.
  • the two time-series nodes corresponding to the time-series dataset described in this embodiment may constitute a time-series structure of a sub-Bayesian network.
  • Step 502 construct the structure of multiple nodes of the Bayesian network according to the connection edges, so as to generate a time-series node structure.
  • the electronic device can construct a structure for a plurality of nodes of the Bayesian network according to a preset structure construction algorithm and the plurality of directional connection edges to generate time-series nodes structure.
  • the multiple nodes include A, B, and C
  • the corresponding first time series data are A1, B1, and C1
  • the corresponding second time series data are A2, B2, and C2
  • the edge structure is A1 ⁇ A2, A1 ⁇ B2, B1 ⁇ A2, B1 ⁇ C2, C2 ⁇ B1
  • the connection edge structure of multiple nodes of the corresponding Bayesian network can be A ⁇ A, A ⁇ B, B ⁇ A, B ⁇ C, C ⁇ B, and then these structures are fused to generate the above timing node structure.
  • Step 503 remove the cyclic structure in the time sequence node structure to generate the structure of the Bayesian network.
  • the cyclic structure in the time sequence node structure may be removed by removing the cyclic structure model.
  • the model for removing the cyclic structure described in this embodiment may be trained in advance and pre-stored in the storage space of the electronic device to facilitate retrieval of applications.
  • the electronic device can input the time-series node structure into the cyclic structure removal model, so that the time-series node structure can be processed to remove the cyclic structure through the removed cyclic structure model to output the Bayesian network. structure.
  • time series node structure is constructed by the connection edge structure of multiple nodes: A ⁇ A, A ⁇ B, B ⁇ A, B ⁇ C, C ⁇ B, then the Bayesian output of the cyclic structure model should be removed.
  • the structure of the network can be C ⁇ B ⁇ A.
  • the model for removing the cyclic structure described in this embodiment can select and remove the connecting edge structure in the cyclic structure according to the correlation degree corresponding to the above-mentioned connecting edge structure.
  • the output structure can be A ⁇ B ⁇ C, C ⁇ B ⁇ A, and C ⁇ B ⁇ A. After selecting the connection edge structure in the loop structure according to the correlation degree corresponding to the connection edge structure above, the output structure can be output.
  • the structure of the final Bayesian network C ⁇ B ⁇ A.
  • a plurality of nodes of the Bayesian network are obtained first, and the first time series data corresponding to each node at the first moment is obtained, and each node is obtained The second time series data corresponding to the second moment, and then calculate the multiple correlations between the first time series data of each node and the second time series data of each node respectively, and finally calculate the Bayesian network according to the multiple correlation degrees.
  • the multiple nodes of the structure are constructed to generate the structure of the Bayesian network.
  • FIG. 6 is a schematic block diagram of an apparatus for generating a Bayesian network structure according to an embodiment of the present application.
  • the device for generating a Bayesian network structure may be configured in an electronic device, so as to obtain multiple nodes of the Bayesian network, and respectively calculate the first time series data corresponding to each node at the first moment and the Multiple correlation degrees between the second time series data corresponding to each node at the second moment, and structure construction of multiple nodes of the Bayesian network according to the multiple correlation degrees, so as to generate the structure of the Bayesian network, thereby The generation efficiency and accuracy of the Bayesian network structure are improved.
  • the device 600 for generating a Bayesian network structure may include: a first obtaining module 610 , a second obtaining module 620 , a third obtaining module 630 , a computing module 640 and a generating module 650 .
  • the first obtaining module 610 is used to obtain multiple nodes of the Bayesian network.
  • the second acquisition module 620 is configured to acquire the first time series data corresponding to each node at the first moment
  • the third obtaining module 630 is configured to obtain second time series data corresponding to each node at a second time, wherein the second time is greater than the first time.
  • the calculation module 640 is configured to calculate a plurality of correlation degrees between the first time series data of each node and the second time series data of each node, respectively.
  • the generating module 650 is configured to construct structures of multiple nodes of the Bayesian network according to the multiple correlation degrees, so as to generate the structure of the Bayesian network.
  • the calculation module 640 is specifically configured to: pair the first time series data of each node and the second time series data of each node respectively to obtain multiple time series data sets; calculate each time series The correlation between the first time series data and the second time series data in the data set to obtain multiple correlation degrees.
  • the correlation includes but is not limited to an information entropy value, an information gain value, and a Gini coefficient value.
  • the generating module 650 may include: a judging sub-module 651 , a deleting sub-module 652 and a generating sub-module 653 .
  • the judgment sub-module 651 is used for judging whether each correlation degree satisfies the threshold condition.
  • the deletion sub-module 652 is configured to delete the correlation degrees that do not meet the threshold condition from the plurality of correlation degrees, so as to obtain a plurality of target correlation degrees.
  • the generating sub-module 653 is configured to construct the structure of multiple nodes of the Bayesian network according to the multiple target correlation degrees, so as to generate the structure of the Bayesian network.
  • the generating sub-module 653 may include: an acquiring unit 6531 , a determining unit 6532 and a generating unit 6533 .
  • the obtaining unit 6531 is configured to obtain the time series data set corresponding to each target correlation degree respectively.
  • the determining unit 6532 is configured to determine a connection edge between two time-series nodes corresponding to each time-series data set.
  • the generating unit 6533 is configured to construct a structure of multiple nodes of the Bayesian network according to the connection edges between the two time-series nodes corresponding to each time-series data set, so as to generate the structure of the Bayesian network.
  • the generating unit 6533 is specifically configured to: establish a connection edge from the time sequence node corresponding to the first time sequence data in the time sequence data set to the time sequence node corresponding to the second time sequence data in the time sequence data set; according to the connection The edge constructs the structure of multiple nodes of the Bayesian network to generate the time-series node structure; removes the cyclic structure in the time-series node structure to generate the structure of the Bayesian network.
  • the device for generating a Bayesian network structure first obtains multiple nodes of the Bayesian network through the first obtaining module, and obtains the first time corresponding to each node through the second obtaining module. a time series data, and obtain the second time series data corresponding to each node at the second moment through the third acquisition module, and then calculate the difference between the first time series data of each node and the second time series data of each node through the calculation module.
  • the generation module constructs the structure of multiple nodes of the Bayesian network according to the multiple correlations, so as to generate the structure of the Bayesian network.
  • the generation efficiency and accuracy of the Bayesian network structure are improved.
  • the present invention further provides an electronic device 700, which includes a memory 710, a processor 720, and a computer program stored in the memory 710 and running on the processor 720.
  • the processor 720 The program is executed to implement the method for generating the Bayesian network structure proposed by the foregoing embodiments of the present application.
  • the processor executes the computer program stored in the memory, thereby improving the generation efficiency and accuracy of the Bayesian network structure.
  • the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and the program is executed by a processor to realize the Bayesian network structure proposed by the foregoing embodiments of the present application. Generate method.
  • the computer-readable storage medium of the embodiment of the present application improves the generation efficiency and accuracy of the Bayesian network structure by storing the computer program and being executed by the processor.
  • first and second are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature delimited with “first”, “second” may expressly or implicitly include at least one of that feature.
  • plurality means at least two, such as two, three, etc., unless expressly and specifically defined otherwise.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Algebra (AREA)
  • Fuzzy Systems (AREA)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请提出一种贝叶斯网络结构的生成方法、装置、电子设备和存储介质,其中,生成方法包括:获取贝叶斯网络的多个节点;获取每个节点在第一时刻对应的第一时序数据;获取每个节点在第二时刻对应的第二时序数据,其中,第二时刻大于第一时刻;分别计算每个节点的第一时序数据与每个节点的第二时序数据之间的多个相关度;以及根据多个相关度对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构。

Description

贝叶斯网络结构的生成方法、装置、电子设备和存储介质
相关申请的交叉引用
本申请基于申请号为202110237214.0、申请日为2021年03月03日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本申请涉及数据处理技术领域,尤其涉及一种贝叶斯网络结构的生成方法、装置、电子设备和存储介质。
背景技术
贝叶斯网,节点表示变量,边表示变量间的依赖关系。贝叶斯网的主要建模技术包含三个阶段:结构学习(Structure Learning)、参数学习(Parameter Estimation)和模型推理(Inference-Asking)。其中结构学习主要是学习节点之间的关联和关系指向。
相关技术中,贝叶斯网图结构学习的主要方式包含两个步骤:先学习节点之间是否有关系,即A-B;再学习节点之间的关系方向,即A→B。一般这两个步骤是分开的,且确定方向时基于启发式等算法,具有不确定性。
发明内容
本申请第一方面实施例提出一种贝叶斯网络结构的生成方法,提高了贝叶斯网络结构的生成效率和准确性。
本申请第二方面实施例提出一种贝叶斯网络结构的生成装置。
本申请第三方面实施例提出一种电子设备。
本申请第四方面实施例提出一种计算机可读存储介质。
本申请第五方面实施例提出一种计算机程序产品。
本申请第一方面实施例提出了一种贝叶斯网络结构的生成方法,包括:
获取贝叶斯网络的多个节点;
获取每个所述节点在第一时刻对应的第一时序数据;
获取所述每个节点在第二时刻对应的第二时序数据,其中,所述第二时刻大于所述第一时刻;
分别计算所述每个节点的第一时序数据与所述每个节点的第二时序数据之间的多个相关度;以及
根据所述多个相关度对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构。
根据本申请实施例的贝叶斯网络结构的生成方法,首先获取贝叶斯网络的多个节点,并获取每个节点在第一时刻对应的第一时序数据,以及获取每个节点在第二时刻对应的 第二时序数据,然后分别计算每个节点的第一时序数据与每个节点的第二时序数据之间的多个相关度,最后根据多个相关度对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构。由此,提高了贝叶斯网络结构的生成效率和准确性。
另外,根据本申请上述实施例的贝叶斯网络结构的生成方法还可以具有如下附加的技术特征:
在本申请的一个实施例中,所述分别计算所述每个节点的第一时序数据与所述每个节点的第二时序数据之间的多个相关度,包括:
分别对所述每个节点的第一时序数据与所述每个节点的第二时序数据进行配对,以得到多个时序数据集合;
计算每个所述时序数据集合中第一时序数据与第二时序数据之间的相关度,以得到所述多个相关度。
在本申请的一个实施例中,所述相关度包括但不限于信息熵值、信息增益值和基尼系数值。
在本申请的一个实施例中,所述根据所述多个相关度对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构,包括:
判断每个所述相关度是否满足阈值条件;
将未满足所述阈值条件的相关度从多个相关度中删除,以得到多个目标相关度;
根据所述多个目标相关度对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构。
在本申请的一个实施例中,所述根据所述多个目标相关度对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构,包括:
分别获取每个所述目标相关度对应的时序数据集合;
确定每个所述时序数据集合对应的两个时序节点之间的连接边;
根据所述每个时序数据集合对应的两个时序节点之间的连接边,对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构。
在本申请的一个实施例中,所述根据所述每个时序数据集合对应的两个时序节点之间的连接边,对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构,包括:
建立从所述时序数据集合中第一时序数据对应的时序节点,指向所述时序数据集合中第二时序数据对应的时序节点的连接边;
根据所述连接边对所述贝叶斯网络的多个节点进行结构构建,以生成时序节点结构;
去除所述时序节点结构中的循环结构,以生成所述贝叶斯网络的结构。
本申请第二方面实施例提出了一种贝叶斯网络结构的生成装置,包括:
第一获取模块,用于获取贝叶斯网络的多个节点;
第二获取模块,用于获取每个所述节点在第一时刻对应的第一时序数据;
第三获取模块,用于获取所述每个节点在第二时刻对应的第二时序数据,其中,所述第二时刻大于所述第一时刻;
计算模块,用于分别计算所述每个节点的第一时序数据与所述每个节点的第二时序数据之间的多个相关度;以及
生成模块,用于根据所述多个相关度对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构。
本申请实施例的贝叶斯网络结构的生成装置,首先通过第一获取模块获取贝叶斯网络的多个节点,并通过第二获取模块获取每个节点在第一时刻对应的第一时序数据,以及通过第三获取模块获取每个节点在第二时刻对应的第二时序数据,然后通过计算模块分别计算每个节点的第一时序数据与每个节点的第二时序数据之间的多个相关度,最后通过生成模块根据多个相关度对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构。由此,提高了贝叶斯网络结构的生成效率和准确性。
另外,根据本申请上述实施例的贝叶斯网络结构的生成装置还可以具有如下附加的技术特征:
在本申请的一个实施例中,所述计算模块,具体用于:
分别对所述每个节点的第一时序数据与所述每个节点的第二时序数据进行配对,以得到多个时序数据集合;
计算每个所述时序数据集合中第一时序数据与第二时序数据之间的相关度,以得到所述多个相关度。
在本申请的一个实施例中,所述相关度包括但不限于信息熵值、信息增益值和基尼系数值。
在本申请的一个实施例中,所述生成模块,包括:
判断子模块,用于判断每个所述相关度是否满足阈值条件;
删除子模块,用于将未满足所述阈值条件的相关度从多个相关度中删除,以得到多个目标相关度;
生成子模块,用于根据所述多个目标相关度对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构。
在本申请的一个实施例中,所述生成子模块,包括:
获取单元,用于分别获取每个所述目标相关度对应的时序数据集合;
确定单元,用于确定每个所述时序数据集合对应的两个时序节点之间的连接边;
生成单元,用于根据所述每个时序数据集合对应的两个时序节点之间的连接边,对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构。
在本申请的一个实施例中,所述生成单元,具体用于:
建立从所述时序数据集合中第一时序数据对应的时序节点,指向所述时序数据集合中第二时序数据对应的时序节点的连接边;
根据所述连接边对所述贝叶斯网络的多个节点进行结构构建,以生成时序节点结构;
去除所述时序节点结构中的循环结构,以生成所述贝叶斯网络的结构。
本申请第三方面实施例提出了一种电子设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现如前述第一方面实施例所述的贝叶斯网络结构的生成方法。
本申请实施例的电子设备,通过处理器执行存储在存储器上的计算机程序,提高了贝叶斯网络结构的生成效率和准确性。
本申请第四方面实施例提出了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时,实现如前述第一方面实施例所述的贝叶斯网络结构的生成方法。
本申请实施例的计算机可读存储介质,通过存储计算机程序并被处理器执行,提高了贝叶斯网络结构的生成效率和准确性。
本申请第五方面实施例提出了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时,实现如前述第一方面实施例所述的贝叶斯网络结构的生成方法。
本申请实施例的计算机程序产品,通过存储计算机程序并被处理器执行,提高了贝叶斯网络结构的生成效率和准确性。
本申请附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。
附图说明
本申请上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:
图1为根据本申请一个实施例的贝叶斯网络结构的生成方法的流程示意图;
图2为根据本申请另一个实施例的贝叶斯网络结构的生成方法的流程示意图;
图3为根据本申请另一个实施例的贝叶斯网络结构的生成方法的流程示意图;
图4为根据本申请另一个实施例的贝叶斯网络结构的生成方法的流程示意图;
图5为根据本申请另一个实施例的贝叶斯网络结构的生成方法的流程示意图;
图6为根据本申请一个实施例的贝叶斯网络结构的生成装置的方框示意图;以及
图7为根据本申请一个实施例的电子设备的结构示意图。
具体实施方式
下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本申请,而不能理解为对本申请的限制。
下面参照附图描述本申请实施例的贝叶斯网络结构的生成方法、装置、电子设备和存储介质。
本申请实施例提供的贝叶斯网络结构的生成方法,可以由电子设备来执行,该电子设备可为PC(Personal Computer,个人计算机)电脑、平板电脑或服务器等。
在本申请实施例中,电子设备中可以设置有处理组件、存储组件和驱动组件。可选的,该驱动组件和处理组件可以集成设置,该存储组件可以存储操作系统、应用程序或其他程序模块,该处理组件通过执行存储组件中存储的应用程序来实现本申请实施例提供的贝叶斯网络结构的生成方法。
为了更好的理解本申请的技术方案,首先对贝叶斯网络进行简单介绍。
贝叶斯网络,为概率图模型的一种,贝叶斯网络中的节点代表变量,节点之间的边表示变量之间的依赖关系,节点之间的边的方向,表示节点代表的变量之间的因果关系。以节点A指向节点B为例,节点A为父节点,节点B为子节点,则节点A表示原因,节点B表示结果,即父节点A代表的变量为子节点B代表的变量的原因,子节点B代表的变量为父节点A代表的变量的结果。贝叶斯网络结构的生成的目的,即是要生成(学习)出变量之间的因果关系。
图1为根据本申请一个实施例的贝叶斯网络结构的生成方法的流程示意图。
本申请实施例的贝叶斯网络结构的生成方法,还可由本申请实施例提供的贝叶斯网络结构的生成装置执行,该装置可配置于电子设备中,以实现获取贝叶斯网络的多个节点,并分别计算每个节点在第一时刻对应的第一时序数据与每个节点在第二时刻对应的第二时序数据之间的多个相关度,以及根据多个相关度对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构,从而提高了贝叶斯网络结构的生成效率和准确性。
作为一种可能的情况,本申请实施例的贝叶斯网络结构的生成方法还可以在服务器端执行,服务器可以为云服务器,可以在云端执行该贝叶斯网络结构的生成方法。
如图1所示,该贝叶斯网络结构的生成方法,可包括步骤101至步骤105:
步骤101,获取贝叶斯网络的多个节点。
在本申请实施例中,上述的贝叶斯网络可为待进行结构生成(学习)的贝叶斯网络。其中,该贝叶斯网络可预先存储在电子设备的存储空间中,以便于调取使用。其中,该存储空间不仅限于基于实体的存储空间,例如,硬盘,该存储空间还可以是连接电子设备的网络硬盘的存储空间(云存储空间)。
需要说明的是,该实施例中所描述的贝叶斯网络可为一种有向无环图(模型),其中,该贝叶斯网络可应用在购物平台(网站)中,以对购物平台(网站)的数据进行分析与挖掘(例如,时序数据挖掘)。例如,对购物平台(网站)中用户的购物信息进行分析与挖掘、对购物平台(网站)中一种商品及其配套商品的销售信息的分析与挖掘。
在本申请实施例中,可通过节点提取模型对贝叶斯网络进行处理,以获取贝叶斯网络的多个节点。
具体地,电子设备可从自身的存储空间中获取贝叶斯网络(即,待进行结构生成(学 习)的贝叶斯网络,并将贝叶斯网络输入至节点提取模型,从而通过该节点提取模型对该贝叶斯网络进行提取,以输出多个节点。
需要说明的是,该实施例中所描述的节点提取模型可以是提前训练好的,并将其预存在电子设备的存储空间中,以方便调取应用。
其中,该节点提取模型的训练与生成可由相关的服务器进行,该服务器可以是云端服务器,也可以是一台电脑的主机,该服务器与可执行申请实施例提供的贝叶斯网络结构的生成方法的电子设备之间,建立有通信连接,该通信连接可以是无线网络连接和有线网络连接的至少一种。服务器可将训练完成的转化模型发送给电子设备,以便电子设备在需要时调用,从而大大减少电子设备的计算压力。
在本申请的其它实施例中,还可基于预设的获取算法对贝叶斯网络进行处理以获取该贝叶斯网络的多个节点,其中,预设的获取算法可根据实际情况进行标定。
步骤102,获取每个节点在第一时刻对应的第一时序数据。
步骤103,获取每个节点在第二时刻对应的第二时序数据,其中,第二时刻大于第一时刻。
具体地,电子设备在获取到贝叶斯网络的多个节点之后,还可基于预设的时序数据获取算法,获取每个节点在第一时刻对应的第一时序数据,以获取每个节点在第二时刻对应的第二时序数据。其中,预设的时序数据获取算法可根据实际情况进行标定。
在本申请的其它实施例中,还可获取每个节点在第一时间段内对应的第一时序数据,以及获取每个节点在第二时间段内对应的第二时序数据,其中,所述第二时间段的起始时间点可早于所述第一时间段的起始时间点。
步骤104,分别计算每个节点的第一时序数据与每个节点的第二时序数据之间的多个相关度。其中,相关度可包括但不限于信息熵值、信息增益值和基尼系数值。应说明的是,该实施例中所描述的信息熵值和基尼系数值为越小越好,信息增益值则为越大越好。
在本申请的一个实施例中,如图2所示,分别计算每个节点的第一时序数据与每个节点的第二时序数据之间的多个相关度,可包括步骤201和步骤202:
步骤201,分别对每个节点的第一时序数据与每个节点的第二时序数据进行配对,以得到多个时序数据集合。
具体地,电子设备在获取到每个节点的第一时序数据和每个节点的第二时序数据之后,可分别对每个节点的第一时序数据与每个节点的第二时序数据进行配对,以得到多个时序数据集合,其中,一个时序数据集合可包括一个匹配对。
进一步而言,假设,多个节点包括A、B和C,其对应的第一时序数据为A1、B1和C1,其对应的第二时序数据为A2、B2和C2。其中,在分别对上述的每个节点的第一时序数据与上述的每个节点的第二时序数据进行配对后,可得到九个时序数据集合,即{A1,A2},{A1,B2}、{A1,C2}、{B1,A2}、{B1,B2}、{B1,C2}、{C1,A2}、{C1,B2}和{C1,C2}。
在本申请实施例中,电子设备在得到多个时序数据集合之后,可将其临时存储在电子设备的存储空间中,以便后续使用。
步骤202,计算每个时序数据集合中第一时序数据与第二时序数据之间的相关度,以得到多个相关度。
在本申请实施例中,可通过预设的相关度计算公式计算每个时序数据集合中第一时序数据与第二时序数据之间的相关度。其中,预设的相关度计算公式可根据实际情况进行标定。
具体地,电子设备在得到上述的多个时序数据集合之后,可根据预设的相关度计算公式,计算每个时序数据集合中第一时序数据与第二时序数据之间的相关度。其中,预设的相关度计算公式可根据实际情况进行标定。
进一步而言,假设,相关度为基尼系数,则预设的相关度计算公式可为基尼系数计算公式。其中,电子设备在得到上述的多个时序数据集合之后,可通过上述的基尼系数计算公式计算每个时序数据集合中第一时序数据与第二时序数据之间的基尼系数。
步骤105,根据多个相关度对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构。
在本申请实施例中,可根据预设的结构构建算法和多个相关度对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构。其中,预设的结构构建算法可根据实际情况进行标定。
具体地,电子设备在得到上述的多个相关度之后,还可根据预设的结构构建算法和多个相关度对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构。
在本申请实施例中,首先获取贝叶斯网络的多个节点,并获取每个节点在第一时刻对应的第一时序数据,以及获取每个节点在第二时刻对应的第二时序数据,然后分别计算每个节点的第一时序数据与每个节点的第二时序数据之间的多个相关度,最后根据多个相关度对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构。由此,提高了贝叶斯网络结构的生成效率和准确性。
为了清楚说明上一实施例,在本申请的一个实施例中,如图3所示,根据多个相关度对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构,可包括步骤301至步骤303:
步骤301,判断每个相关度是否满足阈值条件。其中,阈值条件可根据实际情况进行标定,且可将其预先存储在电子设备的存储空间中,以便于调取使用。
步骤302,将未满足阈值条件的相关度从多个相关度中删除,以得到多个目标相关度。
具体地,当相关度为信息熵值或基尼系数值时,电子设备在得到上述的多个相关度之后,可分别判断该多个相关度中的每个相关度是否大于基尼阈值,并将大于基尼阈值的相关度从多个相关度中删除,以得到多个目标相关度(即,经过上述删除操作后剩下的多个相关度)。
当相关度为信息增益值时,电子设备在得到上述的多个相关度之后,可分别判断该多个相关度中的每个相关度是否小于信息增益阈值,并将小于信息增益阈值的相关度从多个相关度中删除,以得到多个目标相关度。
步骤303,根据多个目标相关度对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构。
为了清楚说明上一实施例,在本申请的一个实施例中,如图4所示,根据多个目标相关度对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构,可包括步骤401至步骤403:
步骤401,分别获取每个目标相关度对应的时序数据集合。
步骤402,确定每个时序数据集合对应的两个时序节点之间的连接边。
具体地,电子设备在得到多个目标相关度之后,可根据每个目标相关度,查找该电子设备的存储空间,以查找出与该每个目标相关度相对应的时序数据集合。然后电子设备可将每个时序数据集合中第一时序数据对应的时序节点和第二时序数据对应的时序节点之间的连接作为连接边。
步骤403,根据每个时序数据集合对应的两个时序节点之间的连接边,对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构。
为了清楚说明上一实施例,在本申请的一个实施例中,如图5所示,根据每个时序数据集合对应的两个时序节点之间的连接边,对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构,可包括步骤501至步骤503:
步骤501,建立从时序数据集合中第一时序数据对应的时序节点,指向时序数据集合中第二时序数据对应的时序节点的连接边。
需要说明的是,电子设备在确定每个时序数据集合对应的两个时序节点之间的连接边之后,还可需要确定两个时序节点之间的连接边的方向。
在本申请实施例中,上述连接边的方法可为前一个时序数据对应的时序节点指向后一个一个时序数据对应的时序节点,即第一时序数据对应的时序节点指向第二时序数据对应的时序节点。
具体地,电子设备在确定每个时序数据集合对应的两个时序节点之间的连接边之后,还可根据时序数据集合中时序数据的时间顺序确定连接边的方向,并建立从时序数据集合中第一时序数据对应的时序节点,指向时序数据集合中第二时序数据对应的时序节点的连接边。应说明的是,该实施例中所描述的时序数据集对应的两个时序节点,可以构成一个子贝叶斯网络的时序结构。
步骤502,根据连接边对贝叶斯网络的多个节点进行结构构建,以生成时序节点结构。
具体地,电子设备在得到多个具有方向的连接边之后,可根据预设的结构构建算法和该多个具有方向的连接边对贝叶斯网络的多个节点进行结构构建,以生成时序节点结构。
进一步而言,假设多个节点包括A、B和C,其对应的第一时序数据为A1、B1和C1,其对应的第二时序数据为A2、B2和C2,且多个具有方向的连接边结构为A1→A2,A1→B2,B1→A2,B1→C2,C2→B1,则对应的贝叶斯网络的多个节点的连接边结构可为A→A,A→B,B→A,B→C,C→B,而后将这些结构进行融合以生成上述的时序节点结构。
步骤503,去除时序节点结构中的循环结构,以生成贝叶斯网络的结构。
在本申请实施例中,可通过去除循环结构模型去除时序节点结构中的循环结构。应说明的是,该实施例中所描述的去除循环结构模型可以是提前训练好的,并将其预存在电子设备的存储空间中,以方便调取应用。
具体地,电子设备在得到时序节点结构之后,可将该时序节点结构输入至去除循环结构模型,从而通过该去除循环结构模型对该时序节点结构进行去除循环结构处理,以输出贝叶斯网络的结构。
进一步而言,时序节点结构由多个节点的连接边结构:A→A,A→B,B→A,B→C,C→B融合构建的,则该去除循环结构模型输出的贝叶斯网络的结构可为C→B→A。
需要说明的是,该实施例中所描述的去除循环结构模型可根据上述连接边结构对应的相关度选择将循环结构中那个连接边结构去除,例如,上述时序节点结构如果仅是简单的去除循环结构,则输出的结构可为A→B→C、C←B→A和C→B→A,在结合上述连接边结构对应的相关度选择将循环结构中那个连接边结构去除后,可输出最终的贝叶斯网络的结构:C→B→A。
综上,根据本申请实施例的贝叶斯网络结构的生成方法,首先获取贝叶斯网络的多个节点,并获取每个节点在第一时刻对应的第一时序数据,以及获取每个节点在第二时刻对应的第二时序数据,然后分别计算每个节点的第一时序数据与每个节点的第二时序数据之间的多个相关度,最后根据多个相关度对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构。由此,提高了贝叶斯网络结构的生成效率和准确性。
图6为根据本申请一个实施例的贝叶斯网络结构的生成装置的方框示意图。
本申请实施例的贝叶斯网络结构的生成装置,可配置于电子设备中,以实现获取贝叶斯网络的多个节点,并分别计算每个节点在第一时刻对应的第一时序数据与每个节点在第二时刻对应的第二时序数据之间的多个相关度,以及根据多个相关度对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构,从而提高了贝叶斯网络结构的生成效率和准确性。
如图6示,该贝叶斯网络结构的生成装置600,可包括:第一获取模块610、第二获取模块620、第三获取模块630、计算模块640和生成模块650。
第一获取模块610用于获取贝叶斯网络的多个节点。
第二获取模块620用于获取每个节点在第一时刻对应的第一时序数据;
第三获取模块630用于获取每个节点在第二时刻对应的第二时序数据,其中,第二 时刻大于第一时刻。
计算模块640用于分别计算每个节点的第一时序数据与每个节点的第二时序数据之间的多个相关度。
生成模块650用于根据多个相关度对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构。
在本申请的一个实施例中,计算模块640具体用于:分别对每个节点的第一时序数据与每个节点的第二时序数据进行配对,以得到多个时序数据集合;计算每个时序数据集合中第一时序数据与第二时序数据之间的相关度,以得到多个相关度。
在本申请的一个实施例中,相关度包括但不限于信息熵值、信息增益值和基尼系数值。
在本申请的一个实施例中,如图6所示,生成模块650可包括:判断子模块651、删除子模块652和生成子模块653。
其中,判断子模块651用于判断每个相关度是否满足阈值条件。
删除子模块652用于将未满足阈值条件的相关度从多个相关度中删除,以得到多个目标相关度。
生成子模块653用于根据多个目标相关度对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构。
在本申请的一个实施例中,如图6所示,生成子模块653可包括:获取单元6531、确定单元6532和生成单元6533。
其中,获取单元6531用于分别获取每个目标相关度对应的时序数据集合。
确定单元6532用于确定每个时序数据集合对应的两个时序节点之间的连接边。
生成单元6533用于根据每个时序数据集合对应的两个时序节点之间的连接边,对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构。
在本申请的一个实施例中,生成单元6533具体用于:建立从时序数据集合中第一时序数据对应的时序节点,指向时序数据集合中第二时序数据对应的时序节点的连接边;根据连接边对贝叶斯网络的多个节点进行结构构建,以生成时序节点结构;去除时序节点结构中的循环结构,以生成贝叶斯网络的结构。
需要说明的是,本发明实施例的贝叶斯网络结构的生成装置中未披露的细节,请参照本发明实施例的贝叶斯网络结构的生成方法中所披露的细节,具体这里不再赘述。
综上,本申请实施例的贝叶斯网络结构的生成装置,首先通过第一获取模块获取贝叶斯网络的多个节点,并通过第二获取模块获取每个节点在第一时刻对应的第一时序数据,以及通过第三获取模块获取每个节点在第二时刻对应的第二时序数据,然后通过计算模块分别计算每个节点的第一时序数据与每个节点的第二时序数据之间的多个相关度,最后通过生成模块根据多个相关度对贝叶斯网络的多个节点进行结构构建,以生成贝叶斯网络的结构。由此,提高了贝叶斯网络结构的生成效率和准确性。
为了实现上述实施例,如图7所示,本发明还提出一种电子设备700,包括存储器710、处理器720及存储在存储器710上并可在处理器720上运行的计算机程序,处理器720执行程序,以实现本申请前述实施例提出的贝叶斯网络结构的生成方法。
本申请实施例的电子设备,通过处理器执行存储在存储器上的计算机程序,提高了贝叶斯网络结构的生成效率和准确性。
为了实现上述实施例,本发明还提出一种非临时性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行,以实现本申请前述实施例提出的贝叶斯网络结构的生成方法。
本申请实施例的计算机可读存储介质,通过存储计算机程序并被处理器执行,提高了贝叶斯网络结构的生成效率和准确性。
在本说明书的描述中,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。

Claims (15)

  1. 一种贝叶斯网络结构的生成方法,包括:
    获取贝叶斯网络的多个节点;
    获取每个所述节点在第一时刻对应的第一时序数据;
    获取所述每个节点在第二时刻对应的第二时序数据,其中,所述第二时刻大于所述第一时刻;
    分别计算所述每个节点的第一时序数据与所述每个节点的第二时序数据之间的多个相关度;以及
    根据所述多个相关度对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构。
  2. 根据权利要求1所述的方法,其中所述分别计算所述每个节点的第一时序数据与所述每个节点的第二时序数据之间的多个相关度,包括:
    分别对所述每个节点的第一时序数据与所述每个节点的第二时序数据进行配对,以得到多个时序数据集合;
    计算每个所述时序数据集合中第一时序数据与第二时序数据之间的相关度,以得到所述多个相关度。
  3. 根据权利要求1或2所述的方法,其中所述相关度包括但不限于信息熵值、信息增益值和基尼系数值。
  4. 根据权利要求2所述的方法,其中所述根据所述多个相关度对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构,包括:
    判断每个所述相关度是否满足阈值条件;
    将未满足所述阈值条件的相关度从多个相关度中删除,以得到多个目标相关度;
    根据所述多个目标相关度对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构。
  5. 根据权利要求4所述的生成方法,其中所述根据所述多个目标相关度对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构,包括:
    分别获取每个所述目标相关度对应的时序数据集合;
    确定每个所述时序数据集合对应的两个时序节点之间的连接边;
    根据所述每个时序数据集合对应的两个时序节点之间的连接边,对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构。
  6. 根据权利要求5所述的方法,其中所述根据所述每个时序数据集合对应的两个时序节点之间的连接边,对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构,包括:
    建立从所述时序数据集合中第一时序数据对应的时序节点,指向所述时序数据集合中第二时序数据对应的时序节点的连接边;
    根据所述连接边对所述贝叶斯网络的多个节点进行结构构建,以生成时序节点结构;
    去除所述时序节点结构中的循环结构,以生成所述贝叶斯网络的结构。
  7. 一种贝叶斯网络结构的生成装置,包括:
    第一获取模块,用于获取贝叶斯网络的多个节点;
    第二获取模块,用于获取每个所述节点在第一时刻对应的第一时序数据;
    第三获取模块,用于获取所述每个节点在第二时刻对应的第二时序数据,其中,所述第二时刻大于所述第一时刻;
    计算模块,用于分别计算所述每个节点的第一时序数据与所述每个节点的第二时序数据之间的多个相关度;以及
    生成模块,用于根据所述多个相关度对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构。
  8. 根据权利要求7所述的装置,其中所述计算模块进一步用于:
    分别对所述每个节点的第一时序数据与所述每个节点的第二时序数据进行配对,以得到多个时序数据集合;
    计算每个所述时序数据集合中第一时序数据与第二时序数据之间的相关度,以得到所述多个相关度。
  9. 根据权利要求7或8所述的装置,其中所述相关度包括但不限于信息熵值、信息增益值和基尼系数值。
  10. 根据权利要求8所述的装置,其中所述生成模块,包括:
    判断子模块,用于判断每个所述相关度是否满足阈值条件;
    删除子模块,用于将未满足所述阈值条件的相关度从多个相关度中删除,以得到多个目标相关度;
    生成子模块,用于根据所述多个目标相关度对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构。
  11. 根据权利要求10所述的装置,其中所述生成子模块,包括:
    获取单元,用于分别获取每个所述目标相关度对应的时序数据集合;
    确定单元,用于确定每个所述时序数据集合对应的两个时序节点之间的连接边;
    生成单元,用于根据所述每个时序数据集合对应的两个时序节点之间的连接边,对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构。
  12. 根据权利要求10所述的装置,其中所述生成单元进一步用于:
    建立从所述时序数据集合中第一时序数据对应的时序节点,指向所述时序数据集合中第二时序数据对应的时序节点的连接边;
    根据所述连接边对所述贝叶斯网络的多个节点进行结构构建,以生成时序节点结构;
    去除所述时序节点结构中的循环结构,以生成所述贝叶斯网络的结构。
  13. 一种电子设备,其特征在于,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现以下步骤:
    获取贝叶斯网络的多个节点;
    获取每个所述节点在第一时刻对应的第一时序数据;
    获取所述每个节点在第二时刻对应的第二时序数据,其中,所述第二时刻大于所述第一时刻;
    分别计算所述每个节点的第一时序数据与所述每个节点的第二时序数据之间的多个相关度;以及
    根据所述多个相关度对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构。
  14. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现以下步骤:
    获取贝叶斯网络的多个节点;
    获取每个所述节点在第一时刻对应的第一时序数据;
    获取所述每个节点在第二时刻对应的第二时序数据,其中,所述第二时刻大于所述第一时刻;
    分别计算所述每个节点的第一时序数据与所述每个节点的第二时序数据之间的多个相关度;以及
    根据所述多个相关度对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构。
  15. 一种计算机程序产品,其中,包括计算机程序,所述计算机程序在被处理器执行时实现以下步骤:
    获取贝叶斯网络的多个节点;
    获取每个所述节点在第一时刻对应的第一时序数据;
    获取所述每个节点在第二时刻对应的第二时序数据,其中,所述第二时刻大于所述第一时刻;
    分别计算所述每个节点的第一时序数据与所述每个节点的第二时序数据之间的多个相关度;以及
    根据所述多个相关度对所述贝叶斯网络的多个节点进行结构构建,以生成所述贝叶斯网络的结构。
PCT/CN2022/075660 2021-03-03 2022-02-09 贝叶斯网络结构的生成方法、装置、电子设备和存储介质 WO2022183889A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110237214.0 2021-03-03
CN202110237214.0A CN113807522A (zh) 2021-03-03 2021-03-03 贝叶斯网络结构的生成方法、装置、电子设备和存储介质

Publications (1)

Publication Number Publication Date
WO2022183889A1 true WO2022183889A1 (zh) 2022-09-09

Family

ID=78892882

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/075660 WO2022183889A1 (zh) 2021-03-03 2022-02-09 贝叶斯网络结构的生成方法、装置、电子设备和存储介质

Country Status (2)

Country Link
CN (1) CN113807522A (zh)
WO (1) WO2022183889A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113807522A (zh) * 2021-03-03 2021-12-17 京东科技控股股份有限公司 贝叶斯网络结构的生成方法、装置、电子设备和存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7660705B1 (en) * 2002-03-19 2010-02-09 Microsoft Corporation Bayesian approach for learning regression decision graph models and regression models for time series analysis
CN111797564A (zh) * 2020-05-21 2020-10-20 中国电力科学研究院有限公司 一种高维分布式光伏出力的相关性样本获取方法及系统
CN113807522A (zh) * 2021-03-03 2021-12-17 京东科技控股股份有限公司 贝叶斯网络结构的生成方法、装置、电子设备和存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4639784B2 (ja) * 2004-12-06 2011-02-23 ソニー株式会社 学習装置および学習方法、並びにプログラム
JP5915006B2 (ja) * 2011-06-29 2016-05-11 ソニー株式会社 情報処理装置および方法、記録媒体、並びにプログラム
GB2510422A (en) * 2013-02-05 2014-08-06 Inst Of Comp Science Learning a Bayesian network from data in parallel
US10453026B2 (en) * 2015-03-06 2019-10-22 Walmart Apollo, Llc System and method for forecasting high-sellers using multivariate bayesian time series
CN107688871B (zh) * 2017-08-18 2020-08-21 中国农业大学 一种水质预测方法和装置
CN110059131A (zh) * 2018-11-30 2019-07-26 阿里巴巴集团控股有限公司 一种时序数据关系演化的可视化方法及装置
CN109697512B (zh) * 2018-12-26 2023-10-27 东南大学 基于贝叶斯网络的个人数据分析方法及计算机存储介质
CN109947879B (zh) * 2019-01-29 2023-07-04 中国海洋大学 一种基于复杂网络的海洋观测大数据可视化分析方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7660705B1 (en) * 2002-03-19 2010-02-09 Microsoft Corporation Bayesian approach for learning regression decision graph models and regression models for time series analysis
CN111797564A (zh) * 2020-05-21 2020-10-20 中国电力科学研究院有限公司 一种高维分布式光伏出力的相关性样本获取方法及系统
CN113807522A (zh) * 2021-03-03 2021-12-17 京东科技控股股份有限公司 贝叶斯网络结构的生成方法、装置、电子设备和存储介质

Also Published As

Publication number Publication date
CN113807522A (zh) 2021-12-17

Similar Documents

Publication Publication Date Title
US11200611B2 (en) Computer vision for unsuccessful queries and iterative search
US20210043283A1 (en) Method and apparatus for identifying heterogeneous graph and property of molecular space structure and computer device
JP5789204B2 (ja) マルチリレーショナル環境において項目を推薦するためのシステム及び方法
WO2017137000A1 (zh) 对描述同一实体的不同实例进行合并的方法、装置及设备
US9256693B2 (en) Recommendation system with metric transformation
CN111881350B (zh) 一种基于混合图结构化建模的推荐方法与系统
WO2016062044A1 (zh) 一种模型参数训练方法、装置及系统
CN108205581B (zh) 生成数字媒介环境中的紧凑视频特征表示
US11809486B2 (en) Automated image retrieval with graph neural network
WO2020133398A1 (zh) 应用推荐方法、装置、服务器和计算机可读存储介质
JP2015197702A (ja) 情報処理装置、情報処理方法
JP6509717B2 (ja) 事例選択装置、分類装置、方法、及びプログラム
KR101977231B1 (ko) 커뮤니티 검출 방법 및 커뮤니티 검출 프레임워크 장치
WO2022142494A1 (zh) 时序数据的异常监测方法、装置、电子设备和存储介质
US10831818B2 (en) Digital image search training using aggregated digital images
CN115618098B (zh) 基于知识增强与空洞卷积的冷链物流推荐方法及装置
WO2022183889A1 (zh) 贝叶斯网络结构的生成方法、装置、电子设备和存储介质
CN110008348B (zh) 结合节点和边进行网络图嵌入的方法和装置
WO2020155814A1 (zh) 维修对象的定损方法及装置、电子设备
CN109858031B (zh) 神经网络模型训练、上下文预测方法及装置
CN113761124B (zh) 文本编码模型的训练方法、信息检索方法及设备
WO2021253938A1 (zh) 一种神经网络的训练方法、视频识别方法及装置
CN113515519A (zh) 图结构估计模型的训练方法、装置、设备及存储介质
US11023783B2 (en) Network architecture search with global optimization
US10943353B1 (en) Handling untrainable conditions in a network architecture search

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22762356

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 11.01.24)