A method, apparatus, device, and medium for constructing a knowledge graph

By building a knowledge graph, building a target layer in chronological order and determining the number of fixed nodes, the problem of large amount of calculation workload for interest rate derivative products with a long transaction period is solved, and the calculation efficiency is improved.

CN114637858BActive Publication Date: 2025-07-08CHINA CONSTRUCTION BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210272235.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-18
Publication Date
2025-07-08
Estimated Expiration
2042-03-18

AI Technical Summary

Technical Problem

When calculating the interest rates of interest rate derivative products with a longer transaction period, the calculation workload is large and inefficient, especially for interest rate swap products with a longer transaction period, the calculation workload is too large.

Method used

By building a knowledge graph, the target layer corresponding to each target reset date is constructed in chronological order, and a fixed number of nodes are determined in each target layer, and the nodes are connected using preset functions and transition points to calculate the interest rate.

Benefits of technology

The workload of calculating interest rates is reduced, the calculation efficiency is improved, and the problem of exponential growth of nodes as the number of layers increases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114637858B_ABST
    Figure CN114637858B_ABST
Patent Text Reader

Abstract

This application relates to the technical field of knowledge graphs, and in particular to a method, device, equipment and medium for constructing a knowledge graph. In this application, a target layer corresponding to each target reset date is constructed, and then the first preset number of nodes located on the horizontal axis of the coordinate axis in each target layer are determined. For any first node in the first layer corresponding to the target reset date with an earlier time among any two adjacent target reset dates, according to the coordinates of the first node in the first layer and a preset coordinate determination function, each transition point corresponding to the first node is determined, and based on each transition point, the first node is connected to a set number of second nodes in the second layer. Then, the interest rate corresponding to each first node is determined. Since each target layer contains the first preset number of nodes, and each node has its corresponding interest rate, for interest rate derivative products with a longer term, the number of nodes does not increase exponentially based on the increase in the number of layers, reducing the workload of calculating the interest rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of knowledge graphs, and particularly to a method, apparatus, device, and medium for constructing a knowledge graph. Background Art

[0002] A Bermudan option is an option that has multiple exercise opportunities before the expiration date, but can only be exercised at most once. The sequence of exercisable exercise dates is determined before the transaction. Among them, a Bermudan swaption is a type of Bermudan option that gives the holder the right to exercise an interest rate swap on a predetermined date. Specifically, based on the interest rate corresponding to the predetermined date, the pricing corresponding to the interest rate is determined, and then the exercise is completed based on the pricing. Here, the exercise means stopping the transaction. Among them, the interest rates corresponding to different exercise dates are different, and the corresponding pricings are also different. Therefore, the estimation of the interest rate is crucial for the user to determine when to exercise to obtain the maximum benefit.

[0003] In the related art, generally, a binary tree method is used to build a knowledge graph, and then the change of the interest rate is estimated based on the knowledge graph. However, the number of nodes in the tree structure increases exponentially with the number of layers. For the pricing of products with a long term, a large amount of calculation is required. For some interest rate derivative products with a relatively long term, the time span of the corresponding interest rate swap is up to several years, resulting in too much workload and low work efficiency when calculating the interest rate subsequently. Summary of the Invention

[0004] This application provides a method, apparatus, device, and medium for constructing a knowledge graph to solve the problem that when calculating the interest rate during the interest rate swap of interest rate derivative products with a long transaction term, the workload of calculating the interest rate is too large and the work efficiency is low.

[0005] This application provides a method for constructing a knowledge graph, and the method includes:

[0006] According to the time sequence, for each target reset date included in the pre-stored reset date sequence, construct a target layer corresponding to each target reset date; wherein, the target layers corresponding to each target reset date are parallel; according to the variance corresponding to each pre-stored target reset date and a preset first function, determine a first preset number of nodes located on the horizontal axis of the coordinate axis in each target layer;

[0007] For any first node in the first layer corresponding to the target reset date with an earlier time among any two adjacent target reset dates in the pre-stored reset date sequence, according to the abscissa of the first node in the first layer and a preset coordinate determination function, determine each transition point corresponding to the first node; for each transition point, connect the first node to a set number of second nodes in the second layer according to the distance between the transition point and each second node in the second layer corresponding to the target reset date with a later time;

[0008] Determine the interest rate corresponding to each first node based on the state price corresponding to the first layer, the discount factor corresponding to the second layer, the connection probability between each first node in the first layer and each second node in the second layer, the time difference between the target reset dates corresponding to the first layer and the second layer, and the abscissa of each first node in the first layer.

[0009] Further, determining the reset date sequence includes:

[0010] For each two adjacent reset dates in the obtained candidate reset date sequence, determine whether the time difference between the two adjacent reset dates is greater than the time threshold. If so, add a second preset number of other reset dates between the two adjacent reset dates; use the candidate reset date sequence with the added other reset dates as the reset date sequence.

[0011] Further, determining the variance corresponding to each target reset date includes:

[0012] In chronological order, sequentially use the target reset date for which the variance is determined as the current reset date, and determine the variance of the current reset date based on the time difference between the current reset date and the previous target reset date adjacent to it, and the variance of the previous target reset date adjacent to it;

[0013] Among them, the variance of the target reset date with the earliest time in the pre - saved reset date sequence is pre - obtained.

[0014] Further, the determining the coordinates of the first preset number of nodes on the horizontal axis of the coordinate axis in the target layer corresponding to the target reset date according to the variance corresponding to the pre - saved target reset date and the preset first function includes:

[0015] According to the first preset number, determine the number of nodes on both sides of the origin on the horizontal axis of the coordinate axis, where the first preset number of nodes are evenly distributed at equal distances on both sides of the origin on the horizontal axis of the coordinate axis;

[0016] For each node on either side of the origin on the horizontal axis of the coordinate axis, determine the corresponding proportional value according to the number of the node in its side and the number of nodes included in the side, and determine the coordinate of the node on the horizontal axis of the coordinate axis according to the proportional value and the variance corresponding to the pre - saved target reset date.

[0017] Further, the determining each transition point corresponding to the first node according to the abscissa of the first node in the first layer and the preset coordinate determination function includes:

[0018] Determine the target correction value corresponding to each transition point according to the pre-saved number of transition points and the corresponding relationship between each transition point and the correction value;

[0019] For each transition point, determine the abscissa of the transition point according to the abscissa of the first node in the first layer and the target correction value corresponding to the transition point.

[0020] Further, the determining the set number of second nodes connected to the first node in the second layer according to the distance between the transition point and each second node in the second layer corresponding to the target reset date later in time includes:

[0021] Determine the distance between the abscissa of the transition point and the abscissa of each second node in the second layer according to the abscissa of the transition point and the abscissa of each second node in the second layer;

[0022] Determine the target second node as the second node with the smallest distance from the transition point in the second layer;

[0023] Determine the second nodes in the second layer connected to the first node as the target second node and other second nodes adjacent to the target second node in the second layer.

[0024] Further, determining the connection probability between the first node and the second node includes:

[0025] Sort the transition points according to the abscissas of the respective transition points;

[0026] For each transition point, determine the difference between the abscissa of the transition point and the abscissas of the set number of second nodes, sort the set number of second nodes according to the magnitude of the difference; according to the position of each second node in the sorting and the position of the transition point in the sorting, determine the target value corresponding to each second node; for each second node among the first preset number of second nodes, determine the connection probability between the first node and the second node according to the abscissa of the transition point, the abscissa of the second node, the target value corresponding to the second node, and the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and save the connection probability corresponding to the connection relationship between the first node and the second node.

[0027] Further, the determining the interest rate corresponding to each first node according to the state price corresponding to the first layer, the discount factor corresponding to the second layer, the connection probability between each first node in the first layer and each second node in the second layer, the time difference between the target reset dates corresponding to the first layer and the second layer, and the abscissa of each first node in the first layer includes:

[0028] For each second node, determine each first node that has a connection relationship with the second node. For each connected first node, determine the product of the state price of the first node and the connection probability between the first node and the second node; according to the product, the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and the abscissa of the first node, determine the candidate parameter of the first node; according to the sum value of the candidate parameters of each first node, determine the state price corresponding to the second node.

[0029] According to the sum value of the state prices of each second node and the discount factor corresponding to the second layer, determine the target parameter value corresponding to each first node in the first layer; for each first node in the first layer, according to the target parameter value corresponding to the first node and the abscissa of the first node, determine the interest rate of the first node.

[0030] This application also provides a knowledge graph construction device, and the device includes:

[0031] A determination module, configured to construct a target layer corresponding to each target reset date according to each target reset date included in the pre-saved reset date sequence in chronological order; wherein, the target layers corresponding to each target reset date are parallel; according to the variance corresponding to each pre-saved target reset date and a preset first function, determine a first preset number of nodes located on the horizontal axis of the coordinate axis in each target layer.

[0032] A connection module, configured to, for any first node in the first layer corresponding to the target reset date with an earlier time among any two adjacent target reset dates in the pre-saved reset date sequence, determine each transition point corresponding to the first node according to the abscissa of the first node in the first layer and a preset coordinate determination function; for each transition point, connect the first node to a set number of second nodes in the second layer according to the distance between the transition point and each second node in the second layer corresponding to the target reset date with a later time.

[0033] The determination module is further configured to determine the interest rate corresponding to each first node according to the state price corresponding to the first layer, the discount factor corresponding to the second layer, the connection probability between each first node in the first layer and each second node in the second layer, the time difference between the target reset dates corresponding to the first layer and the second layer, and the abscissa of each first node in the first layer.

[0034] Further, the determining module is further configured to, for every two adjacent reset dates in the obtained candidate reset date sequence, determine whether the time difference between the two adjacent reset dates is greater than a time threshold. If so, add a second preset number of other reset dates between the two adjacent reset dates; and use the candidate reset date sequence with the added other reset dates as the reset date sequence.

[0035] Further, the determining module is further configured to sequentially use the target reset dates for which variances are determined as the current reset dates in chronological order, and determine the variance of the current reset date according to the time difference between the current reset date and the previous adjacent target reset date and the variance of the previous adjacent target reset date; wherein the variance of the target reset date with the earliest time in the pre-saved reset date sequence is pre-obtained.

[0036] Further, the determining module is specifically configured to determine the number of nodes located on both sides of the origin on the horizontal axis of the coordinate axis according to the first preset number, where the first preset number of nodes are evenly distributed at equal distances on both sides of the origin on the horizontal axis of the coordinate axis; for each node located on either side of the origin on the horizontal axis of the coordinate axis, determine the corresponding proportional value according to the number of the node among the nodes on its side and the number of nodes on that side, and determine the coordinate of the node on the horizontal axis of the coordinate axis according to the proportional value and the variance corresponding to the target reset date pre-saved.

[0037] Further, the connecting module is specifically configured to determine the target correction value corresponding to each transition point according to the pre-saved number of transition points and the corresponding relationship between each transition point and the correction value; for each transition point, determine the abscissa of the transition point according to the abscissa of the first node in the first layer and the target correction value corresponding to the transition point.

[0038] Further, the connecting module is specifically configured to determine the distance between the abscissa of the transition point and the abscissa of each second node in the second layer; determine the second node with the smallest distance from the transition point in the second layer as the target second node; and determine the second nodes in the second layer that are connected to the first node as the target second node and other second nodes adjacent to the target second node in the second layer.

[0039] Further, the determining module is further configured to sort each transition point according to the abscissa of each transition point; for each transition point, determine the difference between the abscissa of the transition point and the abscissas of the set number of second nodes, and sort the set number of second nodes according to the magnitude of the difference; according to the position of each second node in the sorting and the position of the transition point in the sorting, determine the target value corresponding to each second node; for each second node among the first preset number of second nodes, determine the connection probability between the first node and the second node according to the abscissa of the transition point, the abscissa of the second node, the target value corresponding to the second node, and the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and save the connection probability corresponding to the connection relationship between the first node and the second node.

[0040] Further, the determining module is specifically configured to, for each second node, determine each first node having a connection relationship with the second node, and for each connected first node, determine the product of the state price of the first node and the connection probability between the first node and the second node; determine the candidate parameter of the first node according to the product, the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and the abscissa of the first node; determine the state price corresponding to the second node according to the sum value of the candidate parameters of each first node; determine the target parameter value corresponding to each first node in the first layer according to the sum value of the state prices of each second node and the discount factor corresponding to the second layer; for each first node in the first layer, determine the interest rate of the first node according to the target parameter value corresponding to the first node and the abscissa of the first node.

[0041] The present application further provides an electronic device, which at least includes a processor and a memory. When the processor executes a computer program stored in the memory, the steps of the knowledge graph construction method as described in any one of the above are implemented.

[0042] The present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the knowledge graph construction method as described in any one of the above are implemented.

[0043] The present application further provides a computer program product, which includes: computer program code. When the computer program code runs on a computer, the computer is caused to execute the steps of the knowledge graph construction method as described in any one of the above.

[0044] In the embodiments of the present application, in chronological order, according to each target reset date included in the pre - saved reset date sequence, a target layer corresponding to each target reset date is constructed, where the target layers corresponding to each target reset date are parallel. According to the variance corresponding to each pre - saved target reset date and a preset first function, a first preset number of nodes located on the horizontal axis of the coordinate axis in each target layer are determined. For any first node in the first layer corresponding to the target reset date with an earlier time among any two adjacent target reset dates in the pre - saved reset date sequence, according to the coordinates of the first node in the first layer and a preset coordinate determination function, each transition point corresponding to the first node is determined. For each transition point, according to the distance between the transition point and each second node in the second layer corresponding to the target reset date with a later time, the first node is connected to a set number of second nodes in the second layer. According to the state price corresponding to the first layer, the discount factor corresponding to the second layer, the connection probability between each first node in the first layer and each second node in the second layer, the time difference between the target reset dates corresponding to the first layer and the second layer, and the abscissa of each first node in the first layer, the interest rate corresponding to each first node is determined. Since each target layer corresponding to each target reset date in the knowledge graph established in the present application contains a first preset number of nodes, and each node has its corresponding interest rate, when performing an interest rate swap for an interest rate derivative product with a longer term, the number of nodes will not increase exponentially with the increase in the number of layers, reducing the workload of calculating the interest rate and improving the work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0046] Figure 1 Schematic diagram of a process for constructing a knowledge graph provided by some embodiments of the present application;

[0047] Figure 2a Schematic diagram of a knowledge graph for determining an interest rate provided in the related art;

[0048] Figure 2b Schematic diagram of a knowledge graph for determining an interest rate provided by some embodiments of the present application;

[0049] Figure 3 Schematic diagram of the structure of a knowledge graph construction device provided by some embodiments of the present application;

[0050] Figure 4A schematic structural diagram of an electronic device provided in some embodiments of the present application. Detailed implementation manners

[0051] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings. Apparently, the described embodiments are only some embodiments of the present application, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.

[0052] In the embodiments of the present application, in chronological order, according to each target reset date included in the pre-saved reset date sequence, a target layer corresponding to each target reset date is constructed, wherein the target layers corresponding to each target reset date are parallel. According to the variance corresponding to each pre-saved target reset date and a preset first function, a first preset number of nodes located on the horizontal axis of the coordinate axis in each target layer are determined. For any first node in the first layer corresponding to the target reset date with an earlier time among any two adjacent target reset dates in the pre-saved reset date sequence, according to the coordinates of the first node in the first layer and a preset coordinate determination function, each transition point corresponding to the first node is determined. For each transition point, according to the distance between the transition point and each second node in the second layer corresponding to the target reset date with a later time, the first node is connected to a set number of second nodes in the second layer. According to the state price corresponding to the first layer, the discount factor corresponding to the second layer, the connection probability between each first node in the first layer and each second node in the second layer, the time difference between the target reset dates corresponding to the first layer and the second layer, and the abscissa of each first node in the first layer, the interest rate corresponding to each first node is determined.

[0053] Embodiment 1:

[0054] In order to reduce the workload of calculating the interest rate and improve work efficiency, the present application provides a method, apparatus, device and medium for constructing a knowledge graph.

[0055] Figure 1 A schematic diagram of the process of constructing a knowledge graph provided in some embodiments of the present application, and the process includes the following steps:

[0056] S101: In chronological order, according to each target reset date included in the pre-saved reset date sequence, construct a target layer corresponding to each target reset date; wherein, the target layers corresponding to each target reset date are parallel; according to the variance corresponding to each pre-saved target reset date and a preset first function, determine a first preset number of nodes located on the horizontal axis of the coordinate axis in each target layer.

[0057] The knowledge graph construction method provided by the embodiment of the present application is applied to an electronic device, which can be a smart terminal, a PC, a server, etc.

[0058] In the embodiment of the present application, a reset date sequence is pre-stored in the electronic device. The reset date sequence contains multiple target reset dates, and each target reset date is different. The target reset dates in the reset date sequence are sorted in chronological order, and the positions of each target reset date in the reset date sequence are also different. Specifically, the earlier the time of a target reset date, the earlier its position in the reset date sequence. Among them, in the embodiment of the present application, the multiple target reset dates included in the pre-stored reset date sequence can all be exercise dates.

[0059] In order to construct a knowledge graph, in the embodiment of the present application, according to each target reset date included in the pre-stored reset date sequence in chronological order, a target layer corresponding to each target reset date is constructed. Among them, one target reset date corresponds to one target layer. For each target reset date, the target layer corresponding to the target reset date is parallel to the target layers corresponding to other target administrative option dates. The two target reset dates corresponding to every two adjacent target layers are adjacent in the pre-stored reset date sequence, and the distance between every two adjacent target layers can be a preset distance, such as 2, 3, or 4, etc. For every two adjacent target layers, the value corresponding to the time difference between the two target reset dates corresponding to the two adjacent target layers can also be determined as the distance between the two adjacent target layers. Specifically, the distance between every two adjacent target layers can be set according to requirements.

[0060] In order to avoid the nodes in each target layer changing exponentially with the change of the layer and increasing the calculation burden of the interest rate of transactions with longer time durations, in the embodiment of the present application, for the target layer corresponding to each target reset date, a first preset number of nodes can be constructed on the target layer corresponding to the target reset date. Specifically, for each target reset date, according to the variance corresponding to the target reset date pre-stored and a preset first function, the coordinates of the first preset number of nodes located on the horizontal axis of the coordinate axis in the target layer corresponding to the target reset date are determined, and corresponding nodes are constructed at each coordinate. Among them, the first preset number can be any odd number such as 3, 5, 7, etc. Among them, each target layer corresponding to a target reset date corresponds to a horizontal axis of the coordinate axis. In the embodiment of the present application, a node is constructed at the origin of the horizontal axis of the coordinate axis, and other nodes are deployed on both sides of the origin on the horizontal axis of the coordinate axis.

[0061] S102: For any first node in the first layer corresponding to the earlier target reset date among any two adjacent target reset dates in the pre - saved reset date sequence, determine each transition point corresponding to the first node according to the coordinates of the first node in the first layer and a preset coordinate determination function; for each transition point, connect the first node to a set number of second nodes in the second layer according to the distance between the transition point and each second node in the second layer corresponding to the later target reset date; determine the interest rate corresponding to the first node according to the state price corresponding to the first node, the state prices of each second node connected to the first node, and the connection probability between the first node and each second node.

[0062] In the embodiments of the present application, since the interest rate changes gradually over time and the change of the interest rate follows a certain objective factual law, for each node of the earlier target reset date among any two adjacent target reset dates in the pre - saved reset date sequence, there may be a connection relationship between this node and some nodes of the later target reset date, and there may be no connection relationship between this node and some nodes of the later target reset date. Among them, the "adjacent" in the two adjacent target reset dates in the pre - saved reset date sequence refers to the two target reset dates with adjacent corresponding positions.

[0063] For the convenience of description, the target layer corresponding to the earlier target reset date among two adjacent target reset dates is called the first layer, the target layer corresponding to the later target reset date is called the second layer, the nodes in the first layer are called first nodes, and the nodes in the second layer are called second nodes.

[0064] To determine the connection situation of each node in the knowledge graph, for any first node in the first layer, determine each transition point corresponding to the first node according to the coordinates of the first node in the first layer and a preset coordinate determination function. Among them, the transition point is an auxiliary point for determining the second nodes having a connection relationship with the first node, and the transition point may be located in the second layer, may be located in the first layer, or may be located at any position between the first layer and the second layer.

[0065] To determine which second nodes have a connection relationship with the first node, for each transition point, determine a set number of second nodes in the second layer connected to the first node according to the distance between the transition point and each second node in the second layer, and connect the first node to the set number of second nodes in the second layer respectively. Among them, the closer the distance between the transition point and the second node, the greater the possibility that the first node is connected to the second node. Among them, the set number can be 7, 9, 11, etc. Specifically, the set number can be set according to requirements.

[0066] S103: Determine the interest rate corresponding to each first node according to the state price corresponding to the first layer, the discount factor corresponding to the second layer, the connection probability between each first node in the first layer and each second node in the second layer, the time difference between the target reset dates corresponding to the first layer and the second layer, and the abscissa of each first node in the first layer.

[0067] In order to determine the interest rate corresponding to each node, in the embodiment of the present application, according to the state price corresponding to the first layer, the discount factor corresponding to the second layer, the connection probability between each first node in the first layer and each second node in the second layer, the time difference between the target reset dates corresponding to the first layer and the second layer, and the abscissa of each first node in the first layer, the interest rate corresponding to each first node is determined. Among them, the connection probability between nodes can be a preset value.

[0068] Since the target layer corresponding to each target reset date in the knowledge graph established in the present application contains a first preset number of nodes and the number of nodes will not increase exponentially based on the increase in the number of layers, when performing an interest rate swap for an interest rate derivative product with a longer term, the number of nodes will not increase exponentially based on the increase in the number of layers, reducing the workload of calculating the interest rate and improving the work efficiency.

[0069] Embodiment 2:

[0070] In order to determine the reset date sequence, based on the above embodiment, in the embodiment of the present application, determining the reset date sequence includes:

[0071] For each two adjacent exercise dates in the obtained exercise date sequence, determine whether the time difference between the two adjacent exercise dates is greater than the time threshold. If so, add a second preset number of other dates between the two adjacent exercise dates; use the exercise date sequence with the added other dates as the reset date sequence, and update the exercise dates and other dates included in the exercise date sequence with the added other dates as the reset dates.

[0072] For any given transaction, the specific date on which the transaction can be exercised is pre-specified, and the time difference between any two adjacent exercise dates is not fixed. It could be very large or very small. If the time difference is too large, the time span is too long, and directly predicting the data transfer from the data of the previous exercise date to the data of the next exercise date among two adjacent exercise dates with a too large time difference will affect the subsequent interest rate estimation. Therefore, in the embodiments of the present application, to improve the accuracy of interest rate determination, for each pair of adjacent exercise dates in the obtained exercise date sequence, it can be determined whether the time difference between the two adjacent exercise dates is greater than a time threshold. Herein, the exercise date sequence is the exercise date sequence composed of the pre-specified exercisable exercise dates, and the time threshold can be 10 days, 15 days, 30 days, etc. Specifically, the time threshold can be set according to requirements.

[0073] If the time difference between the two adjacent exercise dates is greater than the time threshold, to avoid the time difference between the two exercise dates being too large and affecting the accuracy of subsequent interest rate estimation, a second preset number of other dates can be added between the two adjacent exercise dates. The exercise date sequence with the added other dates is used as the reset date sequence for constructing the knowledge graph, and the exercise dates and other dates included in the exercise date sequence with the added other dates are updated as reset dates. Herein, the second preset number can be 5, 2, etc. Specifically, the second preset number can be set according to requirements.

[0074] It should be noted that since the specific date on which a certain transaction can be exercised is pre-specified, therefore, only the pre-specified exercisable dates in the exercise date sequence with the added second preset number of other dates can be exercised. The added other dates are only used to assist in subsequent interest rate calculation to more accurately complete the pricing. That is to say, the reset dates in the reset date sequence do not form a sequence of actual exercise dates. Only some of the reset dates in the reset dates of the reset date sequence can be exercised, and the other part of the reset dates cannot be exercised.

[0075] In the embodiments of the present application, since the time differences between different pairs of adjacent exercise dates in the obtained exercise date sequence are also different, to more accurately determine the interest rate, in addition to adding a second preset number of other dates between the two adjacent exercise dates, the accuracy of interest rate determination can also be improved by ensuring that the intervals between each pair of adjacent dates in the exercise date sequence with the added other dates are relatively uniform. That is to say, for each pair of adjacent exercise dates, according to the size of the time difference between the two exercise dates, the corresponding number of other dates is added. Generally speaking, the larger the time difference, the more other dates are added.

[0076] Specifically, the target number of other dates to be added between the two exercise dates can be determined according to the ratio of the time difference between the two exercise dates and the time threshold, and then the dates are added between the two adjacent exercise dates according to the target number and the time threshold. Specifically, the target number can be determined according to the ratio. If the ratio is an integer, the ratio is determined as the target number, and then the target number of other dates are evenly added with the time threshold as the length. If the ratio is not an integer, a rounding operation is performed on the ratio. Specifically, for example, the decimal part is discarded, and the integer obtained after the rounding operation is determined as the target number. Then, starting from any one of the two adjacent exercise dates, the target number of other dates are evenly added with the time threshold as the length.

[0077] Embodiment 3:

[0078] In order to determine the variance corresponding to each target reset date, based on the above embodiments, in the embodiments of the present application, determining the variance corresponding to each target reset date includes:

[0079] In chronological order, the target reset date for determining the variance is sequentially used as the current reset date, and the variance corresponding to the current reset date is determined according to the time difference between the current reset date and the previous adjacent target reset date, and the variance of the previous adjacent target reset date;

[0080] Among them, the variance of the target reset date with the earliest time in the pre-saved reset date sequence is a preset value.

[0081] In the embodiments of the present application, since the variance of the target reset date with the earliest time in the pre-saved reset date sequence is known and is a preset value, therefore, in order to determine the variance corresponding to each target reset date in this reset date sequence, in chronological order, the target reset date for determining the variance is sequentially used as the current reset date, and the variance corresponding to the current reset date is determined according to the time difference between the current reset date and the previous adjacent target reset date, and the variance of the previous adjacent target reset date.

[0082] Specifically, the variance corresponding to the current reset date can be determined according to V 2 =(1 - α n Δt) 2 V 1 +(σ n ) 2 Δt;

[0083] Among them, V 2 is the variance corresponding to the current reset date, V 1is the time difference from the current reset date to the previous target reset date, Δt is the time difference from the current reset date to the previous target reset date adjacent to it, and σ n is the preset first value corresponding to the first layer, and α n is the preset second value corresponding to the first layer. Among them, the preset first value and the preset second value corresponding to different layers are different. Specifically, the preset first value and the preset second value corresponding to each layer can be set according to requirements.

[0084] Embodiment 4:

[0085] In order to determine the coordinates of each node included in the target layer corresponding to the target reset date, based on the above embodiments, in the embodiment of the present application, determining the coordinates of the first preset number of nodes located on the horizontal axis of the coordinate axis in the target layer corresponding to the target reset date according to the variance corresponding to the pre-saved target reset date and the preset first function includes:

[0086] Determine the number of nodes on both sides of the origin on the horizontal axis of the coordinate axis according to the first preset number, where the first preset number of nodes are evenly distributed on both sides of the origin on the horizontal axis of the coordinate axis;

[0087] For each node on either side of the origin on the horizontal axis of the coordinate axis, determine the corresponding proportional value according to the number of the node in its side and the number of nodes included in that side, and determine the coordinate of the node on the horizontal axis of the coordinate axis according to the proportional value and the variance corresponding to the pre-saved target reset date.

[0088] In the embodiment of the present application, in order to ensure that the number of nodes in each layer of the knowledge graph does not increase exponentially with the increase of the number of layers, thereby reducing the workload of determining the interest rate, for each target reset date, the number of nodes included in the target layer corresponding to the target reset date can be set to the first preset number, and the nodes included in the target layer can be evenly distributed. Among them, the first preset number can be 5, 7, 9, etc. Specifically, the first preset number can be set according to requirements.

[0089] In the embodiment of the present application, the number of nodes included in each target layer in the knowledge graph is 7, and the nodes included in the target layer are evenly distributed.

[0090] To determine the coordinates of the first preset number of nodes, in the embodiments of the present application, the number of nodes located on both sides of the origin on the horizontal axis of the coordinate axis can be determined according to the first preset number, where the first preset number of nodes are evenly distributed at equal distances on both sides of the origin on the horizontal axis of the coordinate axis. For example, if the first preset number is 7, then there is 1 node at the origin on the horizontal axis of the coordinate axis, and the total number of nodes located on both sides of the origin on the horizontal axis of the coordinate axis is 6, and the number of nodes on each side is 3 respectively.

[0091] To determine the coordinates of each node, in the embodiments of the present application, for each node located on either side of the origin on the horizontal axis of the coordinate axis, determine which number node the node is among the nodes on its side. According to which number node the node is among the nodes on its side and the number of nodes included on this side, determine the proportional value corresponding to the node. Among them, the proportional values corresponding to different nodes are different, and the farther the node is from the origin, the larger the proportional value corresponding to the node. Among them, for the nodes on the left side of the horizontal axis of the coordinate axis, when determining which number node the node is among the nodes on the left side, it is determined in the order from right to left. Among them, for the nodes on the right side of the horizontal axis of the coordinate axis, when determining which number node the node is among the nodes on the right side, it is determined in the order from left to right.

[0092] For example, if the number of nodes included on either side is 3, then the proportional value of the first node on this side is 1 / 3, the proportional value of the second node on this side can be 2 / 3, and the proportional value of the third node on this side can be 1.

[0093] After determining the proportional values corresponding to each node in the target layer, according to the proportional value and the variance corresponding to the pre-saved target reset date, determine the coordinate of the node on the horizontal axis of the coordinate axis.

[0094] Specifically, it can be based on Determine the coordinates of the first preset number of nodes Among them, V n Is the variance corresponding to the pre-saved target reset date, where j represents which number node the node is among the nodes on a certain side of the origin on the horizontal axis of the coordinate axis. If j is less than 0, it is determined that the node is a node on the left side of the origin on the horizontal axis of the coordinate axis. If j is greater than 0, it is determined that the node is a node on the right side of the origin on the horizontal axis of the coordinate axis. Is the proportional value of the node, 2M + 1 is the total number of nodes included in the target layer, that is, the first preset number, and M is the number of nodes included on each side of the origin.

[0095] Embodiment 5:

[0096] To determine the transition points corresponding to the first node, based on the above embodiments, in the embodiments of the present application, determining each transition point corresponding to the first node according to the abscissa of the first node in the first layer and a preset coordinate determination function includes:

[0097] Determine the target correction value corresponding to each transition point according to the pre-saved number of transition points and the corresponding relationship between each transition point and the correction value;

[0098] For each transition point, determine the abscissa of the transition point according to the abscissa of the first node in the first layer and the target correction value corresponding to the transition point.

[0099] In the embodiments of the present application, for each first node, the first node corresponds to multiple transition points, and the coordinates of each transition point are different. To determine each transition point corresponding to the first node, in the embodiments of the present application, the abscissas of the respective transition points can be determined. Specifically, the target correction value corresponding to each transition point can be determined according to the pre-saved number of transition points and the corresponding relationship between each transition point and the correction value; preferably, in the embodiments of the present application, for each first node, the first node corresponds to four transition points.

[0100] For each transition point, determine the abscissa of the transition point as the sum of the abscissa of the first node in the first layer and the target correction value corresponding to the transition point.

[0101] Specifically, it can be determined according to the abscissas of each transition point corresponding to the first node;

[0102] wherein, is the abscissa of the first node, y k is the abscissa of the k-th transition point corresponding to the first node, where k represents which transition point, (2k - 3) is the target correction value corresponding to the k-th transition point, a is a preset first target value, b is a preset second target value, and in the embodiments of the present application, the first node corresponds to 4 transition nodes.

[0103] Specifically, it can also be determined according to the abscissas of each transition point corresponding to the first node;

[0104] wherein, is the abscissa of the first node, y k is the abscissa of the k-th transition point corresponding to the first node, where k represents the k-th transition point, (2k - 3) is the target correction value corresponding to the k-th transition point, and in the embodiments of the present application, the first node corresponds to 4 transition nodes.

[0105] In the present application, it can also be determined according to Determine the abscissa of each transition point corresponding to the first node;

[0106] Among them, is the abscissa of the first node, Δt is the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and σ n is the preset first value corresponding to the first layer, and α n is the preset second value corresponding to the first layer, and y k is the abscissa of the k-th transition point corresponding to the first node. Among them, the preset first value and the preset second value corresponding to different layers are different. Specifically, the preset first value and the preset second value corresponding to each layer can be set according to requirements. Among them, k represents which transition point, and (2k - 3) is the target correction value corresponding to the k-th transition point.

[0107] Embodiment 6:

[0108] In order to determine the second node connected to the first node, on the basis of the above embodiment, in the embodiment of the present application, determining the set number of second nodes in the second layer connected to the first node according to the distance between each second node in the second layer corresponding to the transition point and the target reset date with a later time includes:

[0109] According to the abscissa of the transition point and the abscissa of each second node in the second layer, determine the distance between the abscissa of the transition point and each second node;

[0110] Determine the second node with the smallest distance from the transition point in the second layer as the target second node;

[0111] Determine the target second node and other second nodes adjacent to the target second node in the second layer as the second nodes in the second layer connected to the first node.

[0112] In the embodiment of the present application, after determining each transition point corresponding to the first node, for each transition point, according to the abscissa of the transition point and the abscissa of each second node in the second layer, determine the second node connected to the first node. Specifically, according to the abscissa of the transition point and the abscissa of each second node in the second layer, determine the distance between the transition point and each second node. Among them, the smaller the distance, the greater the possibility that the first node is connected to the second node corresponding to the distance.

[0113] In order to determine the second node connected to the first node, each second node in the second layer can be sorted in ascending order of distance, and the set number of second nodes ranked in the front is connected to the first node.

[0114] In an embodiment of the present application, in order to determine a second node connected to the first node, it is also possible to determine the second node with the smallest distance from the transition point in the second layer as the target second node, and determine the target second node and other second nodes adjacent to the target second node in the second layer as the second nodes connected to the first node in the second layer. Among them, the other second nodes adjacent to the target second node are two second nodes that are on the same coordinate horizontal axis as the target node, are located on the left and right sides of the target second node, and are closest to the second target node.

[0115] Embodiment 7:

[0116] In order to determine the connection probability between each connection node, on the basis of the above embodiments, in an embodiment of the present application, the method further includes:

[0117] Sort the transition points according to the abscissas of the respective transition points;

[0118] For each transition point, determine the difference between the abscissa of the transition point and the abscissas of the set number of second nodes, and sort the set number of second nodes according to the magnitude of the difference; according to the position of each second node in the sorting and the position of the transition point in the sorting, determine the target value corresponding to each second node; for each second node among the first preset number of second nodes, determine the connection probability between the first node and the second node according to the abscissa of the transition point, the abscissa of the second node, the target value corresponding to the second node, and the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and save the connection probability corresponding to the connection relationship between the first node and the second node.

[0119] In an embodiment of the present application, sorting the respective transition points according to the abscissas of the respective transition points, specifically, sorting the respective transition points in ascending order of abscissa.

[0120] In an embodiment of the present application, for each first node, there are multiple second nodes connected to the first node. In order to determine the connection probability between the first node and any connected second node, after determining each transition point corresponding to the first node, for each transition point, determine the difference between the abscissa of the transition point and the abscissas of the third preset number of second nodes, and sort the set number of second nodes according to the magnitude of the difference, specifically, sorting the third preset number of second nodes in ascending order of the difference. Among them, the third preset number is less than the first preset number.

[0121] After sorting the second nodes in this application, for the second nodes in different sorting positions, the corresponding relationship between each sorting position and the target value is saved.

[0122] After sorting the set number of second nodes, according to the position of each second node in the sorting and the position of the transition point in the sorting, the target value corresponding to each second node is determined. In the embodiment of this application, the set number is 3. That is, the first node is connected to three second nodes for one transition point.

[0123] Specifically, the target value corresponding to the second node ranked at the forefront of the sorting is The target value corresponding to the second node ranked in the middle of the sorting is The target value corresponding to the second node ranked at the end of the sorting is Wherein, k represents the position of the transition point in the sorting result. That is to say, the transition point is the k-th transition point in the sorting result, and C is a combination operation.

[0124] To determine the connection probability between the first node and each of the second nodes among the first preset number of second nodes, for each of the second nodes among the first preset number of second nodes, according to the abscissa of the transition point, the abscissa of the second node, the target value corresponding to the second node, and the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, the connection probability between the first node and the second node is determined, and the connection probability is saved corresponding to the connection relationship between the first node and the second node.

[0125] Specifically, if the second node is the second node ranked at the forefront of the sorting, then according to Determine the connection probability between the first node and the second node;

[0126] Wherein, y k Is the abscissa of the transition point, Is the abscissa of the second node, Δx n Is the distance between every two adjacent first nodes in the first layer, Is the target value corresponding to the second node ranked at the forefront of the sorting.

[0127] If the second node is the second node ranked in the middle of the sorting, then according to Determine the connection probability between the first node and the second node;

[0128] Wherein, y k Is the abscissa of the transition point, Is the abscissa of the second node, Δx n Is the distance between every two adjacent first nodes in the first layer, is the target value corresponding to the second node sorted in the middle.

[0129] If the second node is the second node sorted at the end, then according to determine the connection probability between the first node and the second node.

[0130] where y k is the abscissa of the transition point, is the abscissa of the second node, Δx n is the distance between every two adjacent first nodes in the first layer, is the target value corresponding to the second node sorted at the end.

[0131] Embodiment 8:

[0132] In order to accurately determine the interest rate corresponding to each node, based on the above embodiments, in the embodiments of the present application, the determining the interest rate corresponding to each first node according to the state price corresponding to the first layer, the discount factor corresponding to the second layer, the connection probability between each first node in the first layer and each second node in the second layer, the time difference between the target reset dates corresponding to the first layer and the second layer, and the abscissa of each first node in the first layer includes:

[0133] For each second node, determine each first node having a connection relationship with the second node. For each connected first node, determine the product of the state price of the first node and the connection probability between the first node and the second node; according to the product, the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and the abscissa of the first node, determine the candidate parameter of the first node; according to the sum value of the candidate parameters of each first node, determine the state price corresponding to the second node;

[0134] According to the sum value of the state prices of each second node and the discount factor corresponding to the second layer, determine the target parameter value corresponding to each first node in the first layer; for each first node in the first layer, according to the target parameter value corresponding to the first node and the abscissa of the first node, determine the interest rate of the first node.

[0135] In this application, in order to determine the interest rate corresponding to each first node, for each second node, first determine each first node in the first layer that has a connection relationship with the second node, and determine the product of the state price of the first node and the connection probability between the first node and the second node. The number of first nodes having a connection relationship with the second node can be 1, or multiple, and so on. Then, based on this product, the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and the abscissa of the first node, determine the candidate parameter of the first node. Specifically, first determine the sum of the abscissa of the first node and the target sum value of the independent variable, then determine the target product of the target sum value and the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and then determine the quotient of the product of the state price of the first node and the connection probability between the first node and the second node and the target product as the candidate parameter corresponding to the first node; where the candidate parameter includes the independent variable.

[0136] In order to determine the interest rate of each first node connected to the second node, in the embodiment of this application, first determine the state price corresponding to the second node according to the sum value of the candidate parameters of each first node. Specifically, the sum value of the candidate parameters of each first node corresponding to the second node is equal to the state price corresponding to the second node. Since the candidate parameter includes the independent variable, the state price also includes the independent variable, and the independent variable included in the state price is the same as the independent variable included in the candidate parameter. Then, based on the sum value of the state prices of each second node and the discount factor corresponding to the second layer, determine the target parameter value corresponding to each first node in the first layer. Specifically, the sum value of the state prices of each second node is equal to the state price corresponding to the second layer, and the target parameter value is the value of the independent variable included in the state price of each second node. After determining the target parameter value corresponding to each first node, for each first node, determine the interest rate of the first node according to the target parameter value corresponding to the first node and the abscissa of the first node.

[0137] Specifically, for each first node connected to the second node, the interest rate of the first node can be determined according to the value of the independent variable and the abscissa of the first node. For example, the reciprocal of the sum value of the value of the independent variable and the abscissa of the first node can be determined as the interest rate of the first node.

[0138] In the embodiment of this application, it can be based on to determine the state price corresponding to the second node;

[0139] where is the state price corresponding to the j-th second node in the second layer, is the state price corresponding to the $i$-th first node in the first layer, is the connection probability between the $j$-th second node in the second layer and the $i$-th first node in the first layer. Specifically, if there is no connection between the $j$-th second node in the second layer and the $i$-th first node in the first layer, the connection probability is 0, $t$ n+1 $-t$ n represents the time difference between the target reset date corresponding to the second layer and the target reset date corresponding to the first layer, is the abscissa of the $i$-th first node in the first layer, $\mu$ n is the independent variable in the candidate parameters corresponding to the first node, where one $\mu$ corresponds to one layer n .

[0140] Then, according to the target parameter values corresponding to each first node in the first layer can be determined;

[0141] Among them, is the state price corresponding to the $j$-th second node in the second layer, $df$ 2 is the discount factor corresponding to the second layer, and the target parameter values corresponding to each first node in the first layer are the determined values of $\mu$ n values.

[0142] Finally, after determining the target parameter values corresponding to the first layer, that is, after determining the values of $\mu$ n values, the values of $\mu$ n values can be substituted into to determine the interest rate corresponding to the $i$-th first node.

[0143] Among them, $y$ is the interest rate corresponding to the $i$-th first node, is the abscissa of the $i$-th first node.

[0144] Figure 2a is a schematic diagram of a knowledge graph for determining the interest rate provided in the related art, Figure 2b is a schematic diagram of a knowledge graph for determining the interest rate provided in some embodiments of the present application. Now, for Figure 2a and Figure 2b are described.

[0145] In the related art, the number of nodes in each layer of the knowledge graph increases exponentially with the increase of the layer. For example, the first layer includes 1 node, the second layer includes 2 nodes, the third layer includes 3 nodes, the fourth layer includes 5 nodes..., as Figure 2a shown.

[0146] In the embodiments of the present application, except for the first layer, the number of nodes in other layers is 7 nodes, as Figure 2b shown.

[0147] Example 9:

[0148] Figure 3 A schematic structural diagram of a knowledge graph construction device provided in some embodiments of this application. The device includes:

[0149] A determination module 301, configured to construct a target layer corresponding to each target reset date in chronological order according to each target reset date included in a pre-saved reset date sequence; wherein, the target layers corresponding to each target reset date are parallel; determine a first preset number of nodes located on the horizontal axis of the coordinate axis in each target layer according to the variance corresponding to each pre-saved target reset date and a preset first function;

[0150] A connection module 302, configured to, for any first node in the first layer corresponding to the target reset date with an earlier time among any two adjacent target reset dates in the pre-saved reset date sequence, determine each transition point corresponding to the first node according to the abscissa of the first node in the first layer and a preset coordinate determination function; for each transition point, connect the first node to a set number of second nodes in the second layer according to the distance between the transition point and each second node in the second layer corresponding to the target reset date with a later time;

[0151] The determination module 301 is further configured to determine the interest rate corresponding to each first node according to the state price corresponding to the first layer, the discount factor corresponding to the second layer, the connection probability between each first node in the first layer and each second node in the second layer, the time difference between the target reset dates corresponding to the first layer and the second layer, and the abscissa of each first node in the first layer.

[0152] In a possible implementation manner, the determination module 301 is further configured to, for each two adjacent reset dates in the obtained candidate reset date sequence, determine whether the time difference between the two adjacent reset dates is greater than a time threshold. If so, add a second preset number of other reset dates between the two adjacent reset dates; use the candidate reset date sequence with the added other reset dates as the reset date sequence.

[0153] In a possible implementation manner, the determination module 301 is further configured to, in chronological order, sequentially use the target reset date for determining the variance as the current reset date, and determine the variance of the current reset date according to the time difference between the current reset date and the previous adjacent target reset date and the variance of the previous adjacent target reset date; wherein, the variance of the target reset date with the earliest time in the pre-saved reset date sequence is obtained in advance.

[0154] In a possible implementation manner, the determining module 301 is specifically configured to determine the number of nodes located on both sides of the origin on the horizontal axis of the coordinate axis according to the first preset number, where the first preset number of nodes are evenly distributed at equal intervals on both sides of the origin on the horizontal axis of the coordinate axis; for each node located on either side of the origin on the horizontal axis of the coordinate axis, determine the proportional value corresponding to the node according to the number of the node in its corresponding side and the number of nodes included in that side, and determine the coordinate of the node on the horizontal axis of the coordinate axis according to the proportional value and the variance corresponding to the target reset date pre-stored.

[0155] In a possible implementation manner, the connecting module 302 is specifically configured to determine the target correction value corresponding to each transition point according to the pre-stored number of transition points and the corresponding relationship between each transition point and the correction value; for each transition point, determine the abscissa of the transition point according to the abscissa of the first node in the first layer and the target correction value corresponding to the transition point.

[0156] In a possible implementation manner, the connecting module 302 is specifically configured to determine the distance between the abscissa of the transition point and the abscissa of each second node in the second layer; determine the second node with the smallest distance from the transition point in the second layer as the target second node; determine the target second node and other second nodes adjacent to the target second node in the second layer as the second nodes connected to the first node in the second layer.

[0157] In a possible implementation manner, the determining module 301 is further configured to sort each transition point according to the abscissa of each transition point; for each transition point, determine the difference between the abscissa of the transition point and the abscissa of the set number of second nodes, and sort the set number of second nodes according to the magnitude of the difference; determine the target value corresponding to each second node according to the position of each second node in the sorting and the position of the transition point in the sorting; for each second node among the first preset number of second nodes, determine the connection probability between the first node and the second node according to the abscissa of the transition point, the abscissa of the second node, the target value corresponding to the second node, and the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and save the connection probability corresponding to the connection relationship between the first node and the second node.

[0158] In a possible implementation manner, the determining module 301 is specifically configured to, for each second node, determine each first node having a connection relationship with the second node, and for each connected first node, determine the product of the status price of the first node and the connection probability between the first node and the second node; determine the candidate parameter of the first node according to the product, the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and the abscissa of the first node; determine the status price corresponding to the second node according to the sum value of the candidate parameters of each first node; determine the target parameter value corresponding to each first node in the first layer according to the sum value of the status prices of each second node and the discount factor corresponding to the second layer; for each first node in the first layer, determine the interest rate of the first node according to the target parameter value corresponding to the first node and the abscissa of the first node.

[0159] Embodiment 10:

[0160] Based on the above embodiments, some embodiments of the present application further provide an electronic device, as Figure 4 shown, including: a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404.

[0161] A computer program is stored in the memory 403, and when the program is executed by the processor 401, the processor 401 is caused to execute the following steps:

[0162] According to the time sequence, construct a target layer corresponding to each target reset date according to each target reset date included in the pre-stored reset date sequence; wherein the target layers corresponding to each target reset date are parallel; determine the first preset number of nodes located on the horizontal axis of the coordinate axis in each target layer according to the variance corresponding to each pre-stored target reset date and a preset first function.

[0163] For any first node in the first layer corresponding to the earlier target reset date among any two adjacent target reset dates in the pre-stored reset date sequence, determine each transition point corresponding to the first node according to the abscissa of the first node in the first layer and a preset coordinate determination function; for each transition point, connect the first node to a set number of second nodes in the second layer according to the distance between the transition point and each second node in the second layer corresponding to the later target reset date.

[0164] Determine the interest rate corresponding to each first node based on the state price corresponding to the first layer, the discount factor corresponding to the second layer, the connection probability between each first node in the first layer and each second node in the second layer, the time difference between the target reset dates corresponding to the first layer and the second layer, and the abscissa of each first node in the first layer.

[0165] Further, the processor 401 is further configured to, for every two adjacent reset dates in the obtained candidate reset date sequence, determine whether the time difference between the two adjacent reset dates is greater than a time threshold. If so, add a second preset number of other reset dates between the two adjacent reset dates; and use the candidate reset date sequence with the added other reset dates as the reset date sequence.

[0166] Further, the processor 401 is further configured to, in chronological order, sequentially use the target reset date for which the variance is determined as the current reset date, and determine the variance of the current reset date according to the time difference between the current reset date and the previous adjacent target reset date, and the variance of the previous adjacent target reset date; wherein the variance of the target reset date with the earliest time in the pre-saved reset date sequence is pre-obtained.

[0167] Further, the processor 401 is further configured to determine the number of nodes located on both sides of the origin on the horizontal axis of the coordinate axis according to the first preset number, where the first preset number of nodes are evenly distributed at equal distances on both sides of the origin on the horizontal axis of the coordinate axis; for each node located on either side of the origin on the horizontal axis of the coordinate axis, determine the corresponding proportional value according to the position of the node among the nodes on its side and the number of nodes on that side, and determine the coordinate of the node on the horizontal axis of the coordinate axis according to the proportional value and the variance corresponding to the target reset date pre-saved.

[0168] Further, the processor 401 is further configured to determine the target correction value corresponding to each transition point according to the pre-saved number of transition points and the corresponding relationship between each transition point and the correction value; for each transition point, determine the abscissa of the transition point according to the abscissa of the first node in the first layer and the target correction value corresponding to the transition point.

[0169] Further, the processor 401 is further configured to determine the distance between the abscissa of the transition point and the abscissa of each second node in the second layer; determine the second node with the smallest distance from the transition point in the second layer as the target second node; and determine the second nodes in the second layer that are connected to the first node as the target second node and other second nodes adjacent to the target second node in the second layer.

[0170] Further, the processor 401 is further configured to sort each transition point according to the abscissa of each transition point; for each transition point, determine the difference between the abscissa of the transition point and the abscissas of the set number of second nodes, and sort the set number of second nodes according to the magnitude of the difference; according to the position of each second node in the sorting and the position of the transition point in the sorting, determine the target value corresponding to each second node; for each second node among the first preset number of second nodes, determine the connection probability between the first node and the second node according to the abscissa of the transition point, the abscissa of the second node, the target value corresponding to the second node, and the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and save the connection probability corresponding to the connection relationship between the first node and the second node.

[0171] Further, the processor 401 is further configured to, for each second node, determine each first node having a connection relationship with the second node, and for each connected first node, determine the product of the state price of the first node and the connection probability between the first node and the second node; according to the product, the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and the abscissa of the first node, determine the candidate parameter of the first node; according to the sum value of the candidate parameters of each first node, determine the state price corresponding to the second node; according to the sum value of the state prices of each second node and the discount factor corresponding to the second layer, determine the target parameter value corresponding to each first node in the first layer; for each first node in the first layer, determine the interest rate of the first node according to the target parameter value corresponding to the first node and the abscissa of the first node.

[0172] The communication bus mentioned in the above server may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0173] The communication interface 402 is used for communication between the above electronic device and other devices.

[0174] The memory may include a Random Access Memory (RAM), or may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.

[0175] The aforementioned processor may be a general-purpose processor, including a central processing unit, a Network Processor (NP), etc.; it may also be a Digital Signal Processing (DSP), an application-specific integrated circuit, a field-programmable gate array, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0176] Example 11:

[0177] Based on the above embodiments, some embodiments of the present application further provide a computer-readable storage medium, in which a computer program executable by an electronic device is stored. When the program runs on the electronic device, the electronic device is caused to execute the following steps when executed:

[0178] A computer program is stored in the memory. When the program is executed by the processor, the processor is caused to execute the following steps:

[0179] In chronological order, according to each target reset date included in the pre-saved reset date sequence, construct a target layer corresponding to each target reset date; wherein, the target layers corresponding to each target reset date are parallel; according to the variance corresponding to each pre-saved target reset date and a preset first function, determine a first preset number of nodes on the horizontal axis of the coordinate axis in each target layer;

[0180] For any first node in the first layer corresponding to the target reset date with an earlier time among any two adjacent target reset dates, determine each transition point corresponding to the first node according to the abscissa of the first node in the first layer and a preset coordinate determination function; for each transition point, connect the first node to a set number of second nodes in the second layer according to the distance between the transition point and each second node in the second layer corresponding to the target reset date with a later time;

[0181] According to the state price corresponding to the first layer, the discount factor corresponding to the second layer, the connection probability between each first node in the first layer and each second node in the second layer, the time difference between the target reset dates corresponding to the first layer and the second layer, and the abscissa of each first node in the first layer, determine the interest rate corresponding to each first node.

[0182] Further, determining the reset date sequence includes:

[0183] For each two adjacent reset dates in the obtained candidate reset date sequence, determine whether the time difference between the two adjacent reset dates is greater than a time threshold. If so, add a second preset number of other reset dates between the two adjacent reset dates; use the candidate reset date sequence with the added other reset dates as the reset date sequence.

[0184] Further, determining the variance corresponding to each target reset date includes:

[0185] In chronological order, sequentially use the target reset date for which the variance is determined as the current reset date, and determine the variance of the current reset date according to the time difference between the current reset date and the previous adjacent target reset date, and the variance of the previous adjacent target reset date.

[0186] Among them, the variance of the target reset date with the earliest time in the pre-saved reset date sequence is pre-obtained.

[0187] Further, determining the coordinates of the first preset number of nodes located on the horizontal axis of the coordinate axis in the target layer corresponding to the target reset date according to the variance corresponding to the pre-saved target reset date and a preset first function includes:

[0188] According to the first preset number, determine the number of nodes on both sides of the origin on the horizontal axis of the coordinate axis, where the first preset number of nodes are equally spaced on both sides of the origin on the horizontal axis of the coordinate axis.

[0189] For each node on either side of the origin on the horizontal axis of the coordinate axis, determine the corresponding proportional value according to the number of the node on its side and the number of nodes included on that side, and determine the coordinate of the node on the horizontal axis of the coordinate axis according to the proportional value and the variance corresponding to the pre-saved target reset date.

[0190] Further, determining each transition point corresponding to the first node according to the abscissa of the first node in the first layer and a preset coordinate determination function includes:

[0191] According to the pre-saved number of transition points and the corresponding relationship between each transition point and the correction value, determine the target correction value corresponding to each transition point.

[0192] For each transition point, determine the abscissa of the transition point according to the abscissa of the first node in the first layer and the target correction value corresponding to the transition point.

[0193] Further, determining the set number of second nodes in the second layer that are connected to the first node according to the distance between each pair of second nodes corresponding to the transition point and the target reset date that is later in time includes:

[0194] Determining the distance between the abscissa of the transition point and the abscissa of each second node in the second layer according to the abscissa of the transition point and the abscissa of each second node in the second layer;

[0195] Determining the second node with the smallest distance from the transition point in the second layer as the target second node;

[0196] Determining the target second node and other second nodes adjacent to the target second node in the second layer as the second nodes in the second layer that are connected to the first node.

[0197] Further, determining the connection probability between the first node and the second node includes:

[0198] Sorting each transition point according to the abscissa of each transition point;

[0199] For each transition point, determining the difference between the abscissa of the transition point and the abscissas of the set number of second nodes, sorting the set number of second nodes according to the magnitude of the difference; determining the target value corresponding to each second node according to the position of each second node in the sorting and the position of the transition point in the sorting; for each second node among the first preset number of second nodes, determining the connection probability between the first node and the second node according to the abscissa of the transition point, the abscissa of the second node, the target value corresponding to the second node, the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and saving the connection probability corresponding to the connection relationship between the first node and the second node.

[0200] Further, determining the interest rate corresponding to each first node according to the state price corresponding to the first layer, the discount factor corresponding to the second layer, the connection probability between each first node in the first layer and each second node in the second layer, the time difference between the target reset dates corresponding to the first layer and the second layer, and the abscissa of each first node in the first layer includes:

[0201] For each second node, determine each first node that has a connection relationship with the second node. For each connected first node, determine the product of the state price of the first node and the connection probability between the first node and the second node; according to the product, the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and the abscissa of the first node, determine the candidate parameter of the first node; according to the sum value of the candidate parameters of each first node, determine the state price corresponding to the second node.

[0202] According to the sum value of the state prices of each second node and the discount factor corresponding to the second layer, determine the target parameter value corresponding to each first node in the first layer; for each first node in the first layer, according to the target parameter value corresponding to the first node and the abscissa of the first node, determine the interest rate of the first node.

[0203] Embodiment 12:

[0204] The embodiment of the present application also provides a computer program product, which when executed by a computer implements the knowledge graph construction method described in any of the above method embodiments applied to an electronic device.

[0205] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof, and can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions, and when the computer instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part.

[0206] Since each target layer corresponding to each target reset date in the knowledge graph established by the present application contains a first preset number of nodes, and each node has its corresponding interest rate, when performing an interest rate swap corresponding to an interest rate derivative product with a longer term, the number of nodes will not increase exponentially based on the increase in the number of layers, reducing the workload of calculating the interest rate and improving the work efficiency.

[0207] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0208] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to the application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to generate a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices produce means for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0209] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means that implement the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0210] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0211] Obviously, those skilled in the art can make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these changes and modifications.

Claims

1. A method for constructing a knowledge graph, characterized in that, The method includes: Constructing, in chronological order, a target layer corresponding to each target reset date according to each target reset date included in a pre-saved reset date sequence; wherein, the target layers corresponding to each target reset date are parallel; determining, according to the variance corresponding to each pre-saved target reset date and a preset first function, a first preset number of nodes located on the horizontal axis of the coordinate axis in each target layer; For any first node in the first layer corresponding to the target reset date with an earlier time among any two adjacent target reset dates in the pre-saved reset date sequence, determining a target correction value corresponding to each transition point according to the pre-saved number of transition points and the corresponding relationship between each transition point and the correction value; for each transition point, determining the abscissa of the transition point according to the abscissa of the first node in the first layer and the target correction value corresponding to the transition point; determining the distance between the abscissa of the transition point and the abscissa of each second node in the second layer according to the abscissa of the transition point; determining the second node with the smallest distance from the transition point in the second layer as the target second node; determining the target second node and other second nodes adjacent to the target second node in the second layer as the second nodes connected to the first node in the second layer, and connecting the first node to a set number of second nodes in the second layer; For each second node, determining each first node having a connection relationship with the second node, and for each connected first node, determining the product of the state price of the first node and the connection probability between the first node and the second node; determining the candidate parameter of the first node according to the product, the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and the abscissa of the first node; determining the state price corresponding to the second node according to the sum value of the candidate parameters of each first node; Determining the target parameter value corresponding to each first node in the first layer according to the sum value of the state prices of each second node and the discount factor corresponding to the second layer; for each first node in the first layer, determining the interest rate of the first node according to the target parameter value corresponding to the first node and the abscissa of the first node.

2. The method according to claim 1, characterized in that Determining the reset date sequence includes: For every two adjacent reset dates in the obtained candidate reset date sequence, determining whether the time difference between the two adjacent reset dates is greater than a time threshold, and if so, adding a second preset number of other reset dates between the two adjacent reset dates; using the candidate reset date sequence with the added other reset dates as the reset date sequence.

3. The method according to claim 1, characterized in that, Determining the variance corresponding to each target reset date includes: In chronological order, sequentially taking the target reset date for which the variance is to be determined as the current reset date, and determining the variance of the current reset date according to the time difference between the current reset date and the previous adjacent target reset date and the variance of the previous adjacent target reset date; Among them, the variance of the target reset date with the earliest time in the pre - saved reset date sequence is pre - obtained.

4. The method according to claim 1, wherein Determining the coordinates of the first preset number of nodes on the horizontal axis of the coordinate axis in the target layer corresponding to the target reset date according to the variance corresponding to the pre - saved target reset date and the preset first function includes: Determining the number of nodes on both sides of the origin on the horizontal axis of the coordinate axis according to the first preset number, wherein the first preset number of nodes are equally spaced on both sides of the origin on the horizontal axis of the coordinate axis; For each node on either side of the origin on the horizontal axis of the coordinate axis, determine the corresponding proportional value according to the position of the node in its side and the number of nodes in that side, and determine the coordinate of the node on the horizontal axis of the coordinate axis according to the proportional value and the variance corresponding to the pre - saved target reset date.

5. The method according to claim 1, wherein Determining the connection probability between the first node and the second node includes: Sorting each transition point according to the abscissa of each transition point; For each transition point, determine the difference between the abscissa of the transition point and the abscissas of the set number of second nodes, and sort the set number of second nodes according to the magnitude of the difference; determine the target value corresponding to each second node according to the position of each second node in the sorting and the position of the transition point in the sorting; for each second node among the first preset number of second nodes, determine the connection probability between the first node and the second node according to the abscissa of the transition point, the abscissa of the second node, the target value corresponding to the second node, and the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and save the connection probability corresponding to the connection relationship between the first node and the second node.

6. A knowledge graph construction device, characterized in that The device includes: A determining module, configured to construct a target layer corresponding to each target reset date according to each target reset date included in the pre - saved reset date sequence in chronological order; wherein the target layers corresponding to each target reset date are parallel; determine the first preset number of nodes on the horizontal axis of the coordinate axis in each target layer according to the variance corresponding to each pre - saved target reset date and the preset first function. The connection module is used to, for any first node in the first layer corresponding to the earlier target reset date among any two adjacent target reset dates in the pre-saved reset date sequence, determine the target correction value corresponding to each transition point according to the pre-saved number of transition points and the corresponding relationship between each transition point and the correction value; for each transition point, determine the abscissa of the transition point according to the abscissa of the first node in the first layer and the target correction value corresponding to the transition point; determine the distance between the abscissa of the transition point and the abscissa of each second node in the second layer; determine the second node with the smallest distance from the transition point in the second layer as the target second node; determine the second node in the second layer that is connected to the first node and other second nodes adjacent to the target second node, and connect the first node to a set number of second nodes in the second layer; The determination module is further used to, for each second node, determine each first node having a connection relationship with the second node, and for each connected first node, determine the product of the status price of the first node and the connection probability between the first node and the second node; determine the candidate parameter of the first node according to the product, the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and the abscissa of the first node; determine the status price corresponding to the second node according to the sum value of the candidate parameters of each first node; determine the target parameter value corresponding to each first node in the first layer according to the sum value of the status prices of each second node and the discount factor corresponding to the second layer; for each first node in the first layer, determine the interest rate of the first node according to the target parameter value corresponding to the first node and the abscissa of the first node.

7. The device according to claim 6, characterized in that The determination module is further used to, for every two adjacent reset dates in the obtained candidate reset date sequence, determine whether the time difference between the two adjacent reset dates is greater than the time threshold, and if so, add a second preset number of other reset dates between the two adjacent reset dates; use the candidate reset date sequence with the added other reset dates as the reset date sequence.

8. The device according to claim 6, characterized in that, The determination module is further used to, in chronological order, sequentially use the target reset date for which the variance is determined as the current reset date, and determine the variance of the current reset date according to the time difference between the current reset date and the previous adjacent target reset date and the variance of the previous adjacent target reset date; where the variance of the target reset date with the earliest time in the pre-saved reset date sequence is pre-obtained.

9. The device according to claim 6, wherein The determining module is specifically configured to determine the number of nodes located on both sides of the origin on the horizontal axis of the coordinate axis according to the first preset quantity, where the first preset quantity of nodes are evenly distributed on both sides of the origin on the horizontal axis of the coordinate axis; for each node located on either side of the origin on the horizontal axis of the coordinate axis, determine the proportional value corresponding to the node according to the number of the node in its side and the number of nodes included in the side, and determine the coordinate of the node on the horizontal axis of the coordinate axis according to the proportional value and the variance corresponding to the target reset date pre-stored.

10. The device according to claim 6, wherein The determining module is further configured to sort each transition point according to the abscissa of each transition point; for each transition point, determine the difference between the abscissa of the transition point and the abscissa of the second nodes of the set quantity, and sort the second nodes of the set quantity according to the magnitude of the difference; determine the target value corresponding to each second node according to the position of each second node in the sorting and the position of the transition point in the sorting; for each second node among the second nodes of the first preset quantity, determine the connection probability between the first node and the second node according to the abscissa of the transition point, the abscissa of the second node, the target value corresponding to the second node, and the time difference between the target reset date corresponding to the first layer and the target reset date corresponding to the second layer, and save the connection probability corresponding to the connection relationship between the first node and the second node.

11. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory is used to store program instructions, and the processor is used to implement the steps of the knowledge graph construction method described in any one of claims 1-5 above when executing the computer program stored in the memory.

12. A computer-readable storage medium, characterized in that, It stores a computer program, and when the computer program is executed by a processor, it implements the steps of the knowledge graph construction method described in any one of claims 1-5 above.

13. A computer program product, characterized in that, Its computer program product includes: computer program code, and when the computer program code runs on a computer, it causes the computer to execute the steps of the knowledge graph construction method described in any one of claims 1-5 above.

Citation Information

Patent Citations

  • Knowledge graph acquisition method and device, equipment and medium

    CN110750654A

  • Block chain generation method and device, terminal equipment and storage medium

    CN110910242A