Encoding method and apparatus, computer device, and storage medium

The encoding interval of the rational number interval is generated by the Möbius transformation function and the encoding type selection function, which solves the problem of limited node capacity in traditional technology and realizes the infinite level construction and efficient query of the component tree.

WO2024192969A1PCT designated stage expired Publication Date: 2024-09-26CHINA NUCLEAR POWER ENGINEERING COMPANY LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/114955
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-20
Filing Date
2023-08-25
Publication Date
2024-09-26

AI Technical Summary

Technical Problem

The traditional tree coding model uses integers to encode the left and right values ​​of nodes, resulting in a limited number of child nodes that each node can accommodate, which limits the ability to build component trees.

Method used

Using the Möbius transformation function, the coding interval is generated by adjusting the parent interval endpoint value of the parent node to ensure that the coding interval is a rational number interval, thereby infinitely increasing the node capacity, and further optimizing the generation of the coding interval through the coding type selection function and scaling factor .

Benefits of technology

It realizes an infinite-capacity coding interval, supports the construction and query of infinite-level nodes in the component tree, avoids the problem of variable node coding, and improves the efficiency of component tree construction and query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023114955_26092024_PF_FP
    Figure CN2023114955_26092024_PF_FP
Patent Text Reader

Abstract

The present application relates to the technical field of data processing, and in particular to an encoding method and apparatus, a computer device, and a storage medium. The method comprises: acquiring a node index corresponding to a child node to be encoded; determining the node index as a variable value of a Mobius transformation function; and on the basis of a coefficient of the Mobius transformation function and the variable value corresponding to the node index, obtaining an encoding interval corresponding to said child node, wherein the coefficient of the Mobius transformation function is obtained by adjusting a parent interval endpoint value corresponding to the parent node of said child node. The method provided by the present application facilitates construction of an element tree of a device.
Need to check novelty before this filing date? Find Prior Art

Description

Coding method, device, computer equipment and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 20, 2023, with application number 202310299035.9 and application name “Coding method, device, computer equipment and storage medium”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of data processing technology, and in particular to an encoding method, apparatus, computer equipment, and storage medium. Background Art

[0003] The nuclear power equipment component tree is a tree structure that describes the components of large nuclear power equipment and their hierarchical relationships. The root node is typically the main body of the large equipment. This equipment body is deconstructed and broken down layer by layer to form the component tree of the entire equipment. This is a typical infinitely hierarchical tree structure. There are generally two tree structure models to handle this infinitely hierarchical nonlinear relationship: the hierarchical recursive model and the tree encoding model.

[0004] The tree encoding model uses algorithms to encode and index tree nodes, shortening node query time and reducing query complexity. For example, an improved pre-order traversal tree model encodes a tree node using only a pair of ordered positive integers, called left and right values. The ancestor-descendant relationship is reflected through subset relationships between integer intervals, providing a very intuitive foundation for hierarchical queries.

[0005] However, the traditional technology uses integers to encode the left and right values ​​of nodes, resulting in a limited number of child nodes that each node can accommodate, which is not conducive to the construction of the component tree.

[0006] Summary of the Invention

[0007] Based on this, it is necessary to provide a coding method, device, computer equipment and storage medium that are conducive to constructing a component tree to address the above technical problems.

[0008] In a first aspect, the present application provides an encoding method, the method comprising:

[0009] Get the node index corresponding to the child node to be encoded;

[0010] Determine the node index as the variable value of the Mobius transformation function;

[0011] Based on the coefficients of the Möbius transformation function and the variable values ​​corresponding to the node index, the coding interval corresponding to the child node to be encoded is obtained; wherein the coefficients of the Möbius transformation function are obtained by adjusting the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded.

[0012] In one embodiment, adjusting the parent interval endpoint value corresponding to the parent node of the child node to be encoded includes:

[0013] Based on the scaling factor, the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded are adjusted to obtain the coefficients of the Möbius transformation function.

[0014] In one embodiment, determining the node index as a variable value of a Mobius transformation function includes:

[0015] Based on the encoding type selection function, the node index is transformed to obtain a transformed index; wherein the encoding type selection function is a monotonic function of the node index in the parent interval;

[0016] Determine the transformation index as the variable value of the Möbius transformation function.

[0017] In one embodiment, the encoding type selection function is a linear function or an exponential function.

[0018] In one embodiment, the node index includes a left sub-index and a right sub-index; based on the coefficient of the Möbius transformation function and the variable value corresponding to the node index, the encoding interval corresponding to the sub-node to be encoded is obtained, including:

[0019] determining a left encoding value based on the left subindex and the coefficient of the Möbius transform function;

[0020] determining a right encoding value based on the right sub-index and the coefficient of the Mobius transform function;

[0021] Based on the left code value and the right code value, the code interval corresponding to the sub-node to be encoded is determined.

[0022] In one embodiment, the method further includes: determining, for any coding interval, a mapping relationship between the coding interval and a parent interval corresponding to the coding interval, and storing the mapping relationship;

[0023] The mapping relationship is used to determine the parent interval corresponding to the coding interval according to the coding interval when a query instruction corresponding to the parent interval is obtained.

[0024] In a second aspect, the present application further provides an encoding device, comprising:

[0025] An acquisition module is used to obtain the node index corresponding to the child node to be encoded;

[0026] The assignment module is used to determine the node index as the variable value of the Mobius transformation function;

[0027] A determination module is used to obtain a coding interval corresponding to a child node to be coded based on the coefficients of a Möbius transformation function and the variable value corresponding to the node index; wherein the coefficients of the Möbius transformation function are obtained by adjusting the parent interval endpoint values ​​corresponding to the parent node of the child node to be coded.

[0028] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0029] Get the node index corresponding to the child node to be encoded;

[0030] Determine the node index as the variable value of the Mobius transformation function;

[0031] Based on the coefficients of the Möbius transformation function and the variable values ​​corresponding to the node index, the coding interval corresponding to the child node to be encoded is obtained; wherein the coefficients of the Möbius transformation function are obtained by adjusting the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded.

[0032] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0033] Get the node index corresponding to the child node to be encoded;

[0034] Determine the node index as the variable value of the Mobius transformation function;

[0035] Based on the coefficients of the Möbius transformation function and the variable values ​​corresponding to the node index, the coding interval corresponding to the child node to be encoded is obtained; wherein the coefficients of the Möbius transformation function are obtained by adjusting the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded.

[0036] In a fifth aspect, the present application further provides a computer program product, the computer program product comprising a computer program, which, when executed by a processor, implements the following steps:

[0037] Get the node index corresponding to the child node to be encoded;

[0038] Determine the node index as the variable value of the Mobius transformation function;

[0039] Based on the coefficients of the Möbius transformation function and the variable values ​​corresponding to the node index, the coding interval corresponding to the child node to be encoded is obtained; wherein the coefficients of the Möbius transformation function are obtained by adjusting the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0041] FIG1 is a schematic flow chart of an encoding method in one embodiment;

[0042] FIG2 is a schematic diagram of a process for determining a coding interval of a sub-node to be coded according to an embodiment;

[0043] FIG3 is a schematic diagram of a process for determining variable values ​​based on a coding type selection function in one embodiment;

[0044] FIG4 is a schematic flow chart of an encoding method in another embodiment;

[0045] FIG5 is a block diagram of a coding device according to an embodiment;

[0046] FIG6 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0048] The encoding method provided in the embodiment of the present application can be applied to data processing scenarios, and specifically can be used in component tree construction scenarios. Optionally, the method can be executed by a computer device, which can be a server.

[0049] In one embodiment, as shown in FIG1 , a coding method is provided, the method comprising the following steps:

[0050] S101, obtaining a node index corresponding to a child node to be encoded.

[0051] In the component tree of nuclear power equipment, each node represents a device or a component corresponding to the device. Node types can include root nodes and child nodes, with child nodes being the components that make up the root node (device). It is understood that in the component tree of nuclear power equipment, the node index of each node refers to the node's unique identifier, such as an ID. For example, the node index corresponding to the first node is 1 (or A), the node index corresponding to the second node is 2 (or B), the node index corresponding to the third node is 3 (or C), and so on.

[0052] Furthermore, to represent the hierarchical relationship between nodes and facilitate the addition and deletion of nodes, each node in the component tree in this embodiment is configured with two attributes: a node index and a coding range. As in the example above, when a parent-child relationship exists between two nodes, the coding ranges between the two nodes are nested. Therefore, based on the nested relationship between the coding ranges of each node, a component tree can be generated. In this case, the child node to be coded refers to the node in the component tree for which the coding range is to be generated.

[0053] S102: Determine the node index as the variable value of the Möbius transformation function.

[0054] Among them, the Möbius transformation function is as follows - Formula (1):

[0055] Where a, b, c, and d are the coefficient values ​​in the Möbius transformation function, and x is the variable value in the Möbius transformation function.

[0056] S103 , obtaining a coding interval corresponding to the sub-node to be coded based on the coefficient of the Möbius transformation function and the variable value corresponding to the node index.

[0057] Furthermore, when bc-ad>0, and x∈[1,+∞], the Möbius transformation function The range of is as shown in the following formula - formula (2):

[0058] (2)

[0059] The coefficients of the Möbius transformation function are obtained by adjusting the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded.

[0060] In formula (2), it is assumed that a, c, a+b, c+d>0;

[0061] Let a = lft_num, c = lft_den, a + b = rgt_num, c + d = rgt_den; where lft_num and lft_den represent the numerator and denominator of the left boundary of the coding interval corresponding to the parent node; rgt_num and rgt_den represent the numerator and denominator of the right boundary of the coding interval. Substitute them into the above formula (2) and the following formula (3) can be obtained after transformation:

[0062] Based on formula (3), we know that after determining the coding interval corresponding to the parent node of the child node to be coded After that, the coefficient values ​​a, b, c, and d in the Möbius transform function can be determined; then the node index (x) of the child node to be encoded is determined, and the node index (x) is substituted into the corresponding f(x) in the above formula (3). The value of f(x) obtained can be used as the encoding value of the node index (x).

[0063] It can be understood that in order to generate the coding interval of the node index, in one possible implementation, the node index of each child node to be encoded can be a node index interval, such as [x1, x2]. In this case, based on the above formula (3), the coding interval corresponding to the node index can be obtained; in another possible implementation, the node index of each child node to be encoded can be a single value, such as x. In this case, based on the above formula (3), the coding value corresponding to the node index can be obtained, and the coding value is further transformed to generate the coding interval.

[0064] In the above encoding method, after the encoding interval of the parent node is known, the coefficient of the Möbius transform function is obtained based on the encoding interval of the parent node, that is, the encoding interval of the parent node is a rational number interval; for any child node to be encoded under the parent node, the node index corresponding to the child node to be encoded is determined as the variable value of the Möbius transform function, substituted into the Möbius transform function, and the function value of the Möbius transform function is calculated. The function value is used as the encoding interval of the child node to be encoded, so that the encoding interval of the child node to be encoded can fall within the encoding interval of the parent node, and a hierarchical encoding interval corresponding to the parent-child node is generated, and the node index corresponding to each different child node to be encoded is different. The same method makes the coding intervals of different sub-nodes to be encoded independent of each other, and there is no need to modify the coding intervals of other sub-nodes to be encoded due to the addition of new ones, thereby avoiding the problem of variable node coding; in addition, the coding interval of the sub-node to be encoded generated based on the Möbius transformation function is a rational number interval. Therefore, in the coding interval of the sub-node to be encoded, since the number of rational numbers in the rational number interval is infinite, the capacity of the node in the rational number interval is guaranteed to be infinite, that is, an infinite number of sub-nodes can be inserted in the rational number interval. Correspondingly, the coding interval of the sub-node to be encoded can also generate an infinite number of coding intervals of the next-level nodes again. Compared with traditional technologies, this method solves the problem of limited capacity of component tree nodes.

[0065] As shown in Figure 2, this embodiment provides an optional method for obtaining the coding interval corresponding to the child node to be encoded based on the coefficients of the Möbius transform function and the variable value corresponding to the node index, that is, providing a method for refining S103. The node index includes a left sub-index and a right sub-index; optionally, the left sub-index and the right sub-index in this embodiment are both natural numbers.

[0066] S201, determining a left coding value based on a left sub-index and a coefficient of a Möbius transform function.

[0067] Specifically, for any child node of the parent node, if the node index corresponding to the child node is x1 and x2 (and x2>x1), x1 is used as the variable value of the Möbius transformation function, substituted into the Möbius transformation function, and the left-coded value f(x1) is obtained.

[0068] S202: Determine a right coding value based on the right sub-index and the coefficient of the Möbius transform function.

[0069] Furthermore, x2 is used as the variable value of the Möbius transformation function and substituted into the Möbius transformation function to obtain the left-coded value f(x2).

[0070] S203: Determine the coding interval corresponding to the sub-node to be coded based on the left coding value and the right coding value.

[0071] As shown in the above example, from formula (3), we can see that f(x1) and f(x2) are located in the coding interval Therefore, [f(x1), f(x2)] is used as the coding interval of the child node, so that the coding interval of the child node can be nested in the coding interval of the parent node. To construct the coding interval of parent-child nodes with hierarchical relationship.

[0072] Furthermore, for different sub-nodes to be encoded, by setting different node indexes, the encoding intervals of multiple independent sub-nodes can be obtained; for example, the first sub-node corresponds to node indexes x1 and x2, the second sub-node corresponds to node indexes x2 and x3, the third sub-node corresponds to node indexes x3 and x4, and so on.

[0073] In one embodiment, this embodiment provides an optional method for adjusting the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded, that is, provides a method for refining S203. The specific implementation process may include: adjusting the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded based on the scaling factor to obtain the coefficients of the Möbius transform function.

[0074] Among them, when the parent node corresponds to the parent interval endpoint value When the fraction is not reduced, the interval scaling factor can be extracted to adjust the parent interval endpoint value corresponding to the parent node. Assuming that the interval scaling factors of the left and right values ​​are λ and μ respectively, the scaling factors are substituted into the above formula (3) to obtain the following formula - formula (4):

[0075] In this case, f(x) is called a nested interval generator, and f(x;λ,μ) is called a nested interval generator with scaling factors. Correspondingly, the Möbius mapping functions a, b, c, and d are expressed as follows:

[0076] a=λ*lft_num;

[0077] b = μ*rgt_num-μ*lft_num;

[0078] c = λ*lft_den;

[0079] d = μ*rgt_num-λ*lft_den.

[0080] In this embodiment, by setting a scaling factor, the initial parent interval endpoint values ​​can be adjusted to construct a new Möbius mapping function to generate different coding intervals for child nodes to be encoded, thereby achieving flexible division of coding intervals.

[0081] Furthermore, in order to further improve the diversity of the coding intervals for generating the sub-nodes to be encoded, as shown in FIG3 , this embodiment provides an optional method for determining the node index as the variable value of the Möbius transformation function, that is, it provides a method for refining S203.

[0082] S301 : transforming the node index based on the encoding type selection function to obtain a transformed index.

[0083] The encoding type selection function is a monotonic function g(x) of the node index in the parent interval, and g(x) satisfies the following conditions: (1) g(0) = 1 or g(1) = 1, and (2) When x∈[1,+∞], g(x) is monotonic.

[0084] Optionally, the encoding type selection function is a linear function or an exponential function.

[0085] S302: Determine the transformation index as the variable value of the Möbius transformation function.

[0086] As shown in the example above, substitute x1 into g(x) to obtain the transformation index g(x1), substitute x2 into g(x) to obtain the transformation index g(x2), and determine g(x1) and g(x2) as the variable values ​​of the Möbius transformation function.

[0087] Specifically, by introducing g(x) on the basis of formula (4), we can obtain a new composite nested interval generator M(x; λ, μ]), which is the following formula - formula (5):

[0088] In this case, M(x1, λ, μ) and M(x2, λ, μ) are determined as the coding intervals of the sub-nodes to be coded.

[0089] In this embodiment, by introducing the coding type selection function g(x), the node index of the node to be coded can be transformed to obtain a transformation index, and then the transformation index is substituted into the Möbius mapping function to obtain different coding intervals, so that the generation of coding intervals is diverse.

[0090] In one embodiment, the encoding method further includes: for any encoding interval, determining a mapping relationship between the encoding interval and a parent interval corresponding to the encoding interval, and storing the mapping relationship.

[0091] The mapping relationship is used to determine the parent interval corresponding to the coding interval according to the coding interval when a query instruction corresponding to the parent interval is obtained.

[0092] Specifically, when querying child nodes, you can use a partial order query to achieve this; when querying parent nodes, you can get the parent node code using the following method:

[0093] For example, let the coding interval of any coding interval be Where lftNum: represents the left value numerator, lftDen represents the left value denominator, rgtNum represents the right value numerator, rgtDen represents the right value denominator, index represents the node index of any child node, then the parent interval (previous level) corresponding to the coding interval is

[0094] Specifically, the mapping relationship between the encoding interval and its corresponding parent interval is as follows:

[0095] resNum=lftNum-rgtNum

[0096] resDen=lftDen-rgtDen

[0097] a=resDen / (g(index)-g(index-1))

[0098] b=lftDen-a*g(index)

[0099] c=resNum / (g(index-g(index-1)))

[0100] d=leftNum-c*g(index)

[0101] For example, based on the above embodiment, this embodiment provides an optional example of an encoding method, and the specific implementation process includes:

[0102] Step 1: Set the interval scaling factors λ and μ of the device tree encoding. In order to ensure that the encoding of the device tree node is a fraction, it is generally set to λ = 1 and μ = 1;

[0103] Step 2: Select the nuclear power equipment body as the parent node and set its nested interval code In the nuclear power equipment configuration tree structure, set lft_num = 0, lft_den = 1, rgt_num = 1, rgt_den = 1, that is, the starting interval is set to

[0104] Step 3: Set the encoding type selector g(x) that complies with the specification, for example, g(x) = x;

[0105] Step 4: Based on the parameters from steps 1 to 3, obtain the composite nested interval generator M(x, λ, μ) with scaling factors;

[0106] Step 5: Bring the node index i of the child node to be encoded into the composite nested interval generator to generate the nested interval encoding M(i+1, λ, μ), M(i, λ, μ) of the child node;

[0107] Step 6: Take the nested interval code M(i+1, λ, μ) of the child node to be encoded and M(i, λ, μ) as the starting interval, and repeat steps 1 to 5 to generate the nested interval code of the grandchild node;

[0108] As shown in Figure 4, a schematic diagram of a device tree encoding based on the nested interval model is shown. The nested interval encoding of the device body is The interval scaling factors λ and μ of the device tree encoding are both set to 1. The entire device tree can be encoded using the above steps 1 to 6.

[0109] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0110] Based on the same inventive concept, the present application also provides an encoding device for implementing the aforementioned encoding method. The implementation solution provided by this device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations in one or more encoding device embodiments provided below can be found in the above-mentioned limitations on the encoding method and will not be repeated here.

[0111] In one embodiment, as shown in FIG5 , a coding device 1 is provided, comprising: an acquisition module 11 , an assignment module 12 , and a determination module 13 , wherein:

[0112] An acquisition module 11 is used to obtain a node index corresponding to a sub-node to be encoded;

[0113] The assignment module 12 is used to determine the node index as the variable value of the Mobius transformation function;

[0114] The determination module 13 is used to obtain the coding interval corresponding to the child node to be encoded based on the coefficients of the Möbius transformation function and the variable values ​​corresponding to the node index; wherein the coefficients of the Möbius transformation function are obtained by adjusting the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded.

[0115] In one embodiment, the determination module 13 is further configured to adjust the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded based on the scaling factor to obtain coefficients of the Möbius transformation function.

[0116] In one embodiment, the assignment module 12 is further configured to: transform the node index based on the encoding type selection function to obtain a transformed index; wherein the encoding type selection function is a monotonic function of the node index within the parent interval;

[0117] Determine the transformation index as the variable value of the Möbius transformation function.

[0118] In one embodiment, the encoding type selection function is a linear function or an exponential function.

[0119] In one embodiment, the node index includes a left sub-index and a right sub-index; the determination module 13 is further configured to: determine a left code value based on the left sub-index and a coefficient of the Mobius transform function;

[0120] determining a right encoding value based on the right sub-index and the coefficient of the Mobius transform function;

[0121] Based on the left code value and the right code value, the code interval corresponding to the sub-node to be encoded is determined.

[0122] In one embodiment, the encoding device also includes a query module, which is used to: for any encoding interval, determine the mapping relationship between the encoding interval and the parent interval corresponding to the encoding interval, and store the mapping relationship; wherein the mapping relationship is used to determine the parent interval corresponding to the encoding interval based on the encoding interval when a query instruction corresponding to the parent interval is obtained.

[0123] Each module in the above encoding device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0124] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in FIG6 . The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data of an encoding method. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, an encoding method is implemented.

[0125] Those skilled in the art will understand that the structure shown in FIG6 is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0126] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0127] Get the node index corresponding to the child node to be encoded;

[0128] Determine the node index as the variable value of the Mobius transformation function;

[0129] Based on the coefficients of the Möbius transformation function and the variable values ​​corresponding to the node index, the coding interval corresponding to the child node to be encoded is obtained; wherein the coefficients of the Möbius transformation function are obtained by adjusting the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded.

[0130] In one embodiment, when the processor executes the logic of the computer program to adjust the parent interval endpoint value corresponding to the parent node of the child node to be encoded, the following steps are specifically implemented: based on the scaling factor, the parent interval endpoint value corresponding to the parent node of the child node to be encoded is adjusted to obtain the coefficient of the Möbius transformation function.

[0131] In one embodiment, when a processor executes a computer program to determine the node index as the logic of the variable value of the Möbius transformation function, the following steps are specifically implemented: based on the encoding type selection function, the node index is transformed to obtain a transformation index; wherein the encoding type selection function is a monotonic function of the node index within the parent interval; and the transformation index is determined as the variable value of the Möbius transformation function.

[0132] In one embodiment, the encoding type selection function is a linear function or an exponential function.

[0133] In one embodiment, the node index includes a left sub-index and a right sub-index; when the processor executes a computer program to obtain the logic of the coding interval corresponding to the sub-node to be encoded based on the coefficients of the Möbius transformation function and the variable values ​​corresponding to the node index, the following steps are specifically implemented: based on the left sub-index and the coefficients of the Möbius transformation function, the left coding value is determined; based on the right sub-index and the coefficients of the Möbius transformation function, the right coding value is determined; based on the left coding value and the right coding value, the coding interval corresponding to the sub-node to be encoded is determined.

[0134] In one embodiment, when the processor executes the computer program, it further implements the following steps: for any coding interval, determining a mapping relationship between the coding interval and the parent interval corresponding to the coding interval, and storing the mapping relationship; wherein the mapping relationship is used to determine the parent interval corresponding to the coding interval based on the coding interval when a query instruction corresponding to the parent interval is obtained.

[0135] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0136] Get the node index corresponding to the child node to be encoded;

[0137] Determine the node index as the variable value of the Mobius transformation function;

[0138] Based on the coefficients of the Möbius transformation function and the variable values ​​corresponding to the node index, the coding interval corresponding to the child node to be encoded is obtained; wherein the coefficients of the Möbius transformation function are obtained by adjusting the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded.

[0139] In one embodiment, when the logic of a computer program for adjusting the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded is executed by a processor, the following steps are specifically implemented: based on the scaling factor, the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded are adjusted to obtain the coefficients of the Möbius transformation function.

[0140] In one embodiment, when the logic of a computer program that determines a node index as a variable value of a Möbius transformation function is executed by a processor, the following steps are specifically implemented: based on an encoding type selection function, the node index is transformed to obtain a transformed index; wherein the encoding type selection function is a monotonic function of the node index within a parent interval; and the transformed index is determined as the variable value of the Möbius transformation function.

[0141] In one embodiment, the encoding type selection function is a linear function or an exponential function.

[0142] In one embodiment, the node index includes a left sub-index and a right sub-index; when the computer program obtains the logic of the coding interval corresponding to the sub-node to be encoded based on the coefficients of the Möbius transform function and the variable values ​​corresponding to the node index and is executed by the processor, the following steps are specifically implemented: based on the left sub-index and the coefficients of the Möbius transform function, the left coding value is determined; based on the right sub-index and the coefficients of the Möbius transform function, the right coding value is determined; based on the left coding value and the right coding value, the coding interval corresponding to the sub-node to be encoded is determined.

[0143] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: for any coding interval, a mapping relationship between the coding interval and the parent interval corresponding to the coding interval is determined, and the mapping relationship is stored; wherein the mapping relationship is used to determine the parent interval corresponding to the coding interval based on the coding interval when a query instruction corresponding to the parent interval is obtained.

[0144] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0145] Get the node index corresponding to the child node to be encoded;

[0146] Determine the node index as the variable value of the Mobius transformation function;

[0147] Based on the coefficients of the Möbius transformation function and the variable values ​​corresponding to the node index, the coding interval corresponding to the child node to be encoded is obtained; wherein the coefficients of the Möbius transformation function are obtained by adjusting the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded.

[0148] In one embodiment, when the logic of a computer program for adjusting the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded is executed by a processor, the following steps are specifically implemented: based on the scaling factor, the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded are adjusted to obtain the coefficients of the Möbius transformation function.

[0149] In one embodiment, when the logic of a computer program that determines a node index as a variable value of a Möbius transformation function is executed by a processor, the following steps are specifically implemented: based on an encoding type selection function, the node index is transformed to obtain a transformed index; wherein the encoding type selection function is a monotonic function of the node index within a parent interval; and the transformed index is determined as the variable value of the Möbius transformation function.

[0150] In one embodiment, the encoding type selection function is a linear function or an exponential function.

[0151] In one embodiment, the node index includes a left sub-index and a right sub-index; when the computer program obtains the logic of the coding interval corresponding to the sub-node to be encoded based on the coefficients of the Möbius transform function and the variable values ​​corresponding to the node index and is executed by the processor, the following steps are specifically implemented: based on the left sub-index and the coefficients of the Möbius transform function, the left coding value is determined; based on the right sub-index and the coefficients of the Möbius transform function, the right coding value is determined; based on the left coding value and the right coding value, the coding interval corresponding to the sub-node to be encoded is determined.

[0152] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: for any coding interval, a mapping relationship between the coding interval and the parent interval corresponding to the coding interval is determined, and the mapping relationship is stored; wherein the mapping relationship is used to determine the parent interval corresponding to the coding interval based on the coding interval when a query instruction corresponding to the parent interval is obtained.

[0153] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0154] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0155] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A coding method, characterized in that: The method comprises: Get the node index corresponding to the child node to be encoded; Determine the node index as a variable value of the Mobius transformation function; Based on the coefficient of the Möbius transformation function and the variable value corresponding to the node index, the coding interval corresponding to the child node to be encoded is obtained; wherein the coefficient of the Möbius transformation function is obtained by adjusting the parent interval endpoint value corresponding to the parent node of the child node to be encoded.

2. The method according to claim 1, characterized in that: The adjusting of the parent interval endpoint value corresponding to the parent node of the child node to be encoded includes: Based on the scaling factor, the parent interval endpoint values ​​corresponding to the parent node of the child node to be encoded are adjusted to obtain the coefficients of the Möbius transformation function.

3. The method according to claim 1, characterized in that Determining the node index as a variable value of a Mobius transformation function includes: Based on the coding type selection function, transform the node index to obtain a transformation index; wherein the coding type selection function is a monotonic function of the node index in the parent interval; The transformation index is determined as the variable value of the Mobius transformation function.

4. The method according to claim 3, characterized in that The encoding type selection function is a linear function or an exponential function.

5. The method according to claim 1, characterized in that The node index includes a left sub-index and a right sub-index; the obtaining of the coding interval corresponding to the sub-node to be coded based on the coefficient of the Mobius transformation function and the variable value corresponding to the node index includes: Determining a left coded value based on the left sub-index and coefficients of the Mobius transform function; Determining a right coded value based on the right sub-index and coefficients of the Mobius transform function; Based on the left coding value and the right coding value, a coding interval corresponding to the sub-node to be encoded is determined.

6. The method according to claim 1, characterized in that The method further comprises: For any coding interval, determine a mapping relationship between the coding interval and a parent interval corresponding to the coding interval, and store the mapping relationship; The mapping relationship is used to determine the parent interval corresponding to the coding interval according to the coding interval when a query instruction corresponding to the parent interval is obtained.

7. A coding device, characterized in that: The device comprises: An acquisition module is used to obtain a node index corresponding to a sub-node to be encoded; An assignment module, used for determining the node index as a variable value of a Mobius transformation function; A determination module is used to obtain the coding interval corresponding to the child node to be encoded based on the coefficient of the Möbius transformation function and the variable value corresponding to the node index; wherein the coefficient of the Möbius transformation function is obtained by adjusting the parent interval endpoint value corresponding to the parent node of the child node to be encoded.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Universal tree structure storage analysis method

    CN107092659A

  • GIS (Geographic Information System) vector data hierarchical coding method and device based on tree-shaped hierarchical index

    CN115145930A

  • Coding method and device, computer equipment and storage medium

    CN116301899A

  • Arithmetic node encoding for tree structures

    US20130151565A1

  • Transformation for fast inner product search on graph

    US20210133246A1