Routing configuration tree generation method, routing method, device and electronic device based on routing configuration tree

By building a routing configuration tree, the problem of insufficient configuration redundancy and expansion of SMS channel in the SMS platform is solved, and the reduction of configuration storage space and convenient backtracking and expansion of routing configuration is achieved.

CN115442301BActive Publication Date: 2024-11-19ZHENAI INFORMATION TECH (HAINAN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211103013.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-09
Publication Date
2024-11-19
Estimated Expiration
2042-09-09

AI Technical Summary

Technical Problem

The existing SMS platform has problems such as redundant configuration, occupying a lot of space and not scalable in terms of SMS channel configuration, especially when the dimensions increase, data needs to be recoded or reorganized, resulting in low fault tolerance and inability to effectively trace backtracking.

Method used

The route configuration tree generation method is adopted. By receiving the route configuration tree generation instructions, the route configuration tree root node is constructed, and the route configuration data array is traversed to build sub-nodes, generating the route configuration tree, reducing the number of configuration rules, improving traceability and scalability sex.

Benefits of technology

By building a configuration tree for routing configuration, the configuration storage space is reduced and convenient backtracking of routing configuration is achieved. When the routing configuration rules are increased, you only need to build child nodes in the corresponding tree nodes, which improves the scalability of routing configuration .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115442301B_ABST
    Figure CN115442301B_ABST
Patent Text Reader

Abstract

The present application relates to a routing configuration tree generation method, a routing method based on a routing configuration tree, a device and an electronic device. The routing configuration tree generation method comprises: receiving a routing configuration tree generation instruction, wherein the routing configuration tree generation instruction comprises: a routing configuration data array and a dimension priority array, wherein the routing configuration array comprises at least one routing configuration tuple, and the routing configuration tuple comprises at least one routing value and a configuration value; constructing a routing configuration tree root node root based on the routing configuration tree generation instruction; traversing at least one routing configuration tuple of the routing configuration data array to construct a child node of the routing configuration tree root node, and generating a routing configuration tree. The present application also provides a routing method based on a routing configuration tree. The embodiment of the present application constructs a routing configuration tree to perform routing configuration and configuration rule storage, which is conducive to reducing the configuration code storage space and improving the traceability and scalability of the channel configuration code.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method for generating a routing configuration tree, a routing method, a device and an electronic device based on the routing configuration tree. Background Art

[0002] With the development of computer network technology and Internet technology, the emergence of SMS platform is a major change in the field of SMS technology. It has changed the previous method of sending group SMS manually and greatly reduced the time and human resources required for group SMS.

[0003] The SMS platform is based on the three major operators, China Telecom, China Unicom and China Mobile, and directly provides nationwide uplink and downlink SMS interface resources. It integrates customer management, group management, sending record management and account management, and realizes batch and customized SMS sending with customers / designated numbers.

[0004] Therefore, the SMS platform usually needs to access multiple SMS sending channels, and needs to select different SMS channels for different businesses according to business needs, and select the SMS channel according to the set routing rules when the business sends SMS.

[0005] Currently, the configuration of the SMS channel is done in a one-to-one configuration mode. Assume that the business party value domain is {business 1, business 2, business 3}, the process code value domain is {verification code, marketing SMS}, and the configuration item is {business party, process, channel}. Therefore, the number of value domains is 3 and the number of processes is 2. Therefore, 3*2=6 configuration rules are generated, namely {business 1, verification code, channel 1}, {business 2, verification code, channel 1}, {business 3, verification code, channel 1}, {business 1, marketing SMS, channel 2}, {business 2, marketing SMS, channel 2}, {business 3, marketing SMS, channel 2}, that is, For example, verification code text messages need to go through channel 1, and marketing text messages need to go through channel 2. However, through the one-to-one configuration method, every possible situation needs to be configured and processed. The increase in configuration item types and dimensions generates a large number of configuration rules, which takes up a lot of configuration space and has configuration redundancy. Moreover, the hash search method cannot be backtracked and has a low fault tolerance rate. The one-to-one configuration method can only configure a failed default value each time. When the dimension priority is changed, the data needs to be re-encoded or reorganized. When the value range of the dimension component increases, a large number of rules need to be added, and the scalability is not high.

[0006] Therefore, the current SMS platform is in urgent need of a channel configuration method that is traceable and highly scalable. Summary of the invention

[0007] The embodiments of the present application provide a routing configuration tree generation method, a routing method based on the routing configuration tree, a device and an electronic device, which are used to reduce the configuration code storage space and improve the traceability and scalability of the channel configuration code.

[0008] In a first aspect, an embodiment of the present application provides a method for generating a routing configuration tree, comprising:

[0009] Receive a routing configuration tree generation instruction, wherein the routing configuration tree generation instruction includes: a routing configuration data array and a dimension priority array, wherein the routing configuration data array includes at least one routing configuration tuple, and the routing configuration tuple includes at least one routing value and one configuration value;

[0010] Constructing a routing configuration tree root node root based on the routing configuration tree generation instruction;

[0011] Traversing the at least one routing configuration tuple of the routing configuration data array to construct child nodes of the root node of the routing configuration tree, and generating the routing configuration tree;

[0012] The step of traversing the at least one routing configuration tuple of the routing configuration data array to construct a child node of the root node of the routing configuration tree includes:

[0013] For any of the routing configuration tuples, construct the parent node currParent of the routing configuration tuple, and set the parent node currParent to be equal to the root node root of the routing configuration tree;

[0014] Traversing the dimension priority array, extracting the routing value of the routing configuration tuple, executing routing child node construction and parent node update operations, and obtaining at least one routing child node and an updated parent node currParent corresponding to the routing configuration tuple;

[0015] Extract the configuration value of the routing configuration tuple to generate a routing configuration tree node, and add the configuration tree node to the updated parent node currParent;

[0016] The traversing of the dimension priority array to extract the routing value of the routing configuration tuple to perform routing child node construction and parent node update operations includes:

[0017] S1, set variable a, initialize the variable a, set a=0, where a is an integer, and execute step S2;

[0018] S2, obtaining the ath priority value y of the dimensional priority array, where y is an integer and y is greater than or equal to 0, and executing step S3;

[0019] S3, extracting the yth routing value in the routing configuration tuple as the current routing value, and executing step S4;

[0020] S4, determine whether the parent node currParent has a child node, if yes, execute step S6, if no, execute step S5;

[0021] S5, construct a default node default and add it to the parent node currParent to obtain a new parent node currParent, update the parent node currParent to the new parent node currParent, and execute step S6;

[0022] S6, obtaining at least one child node of the parent node currParent, traversing the at least one child node, and determining whether there is a child node with the same value as the current routing value in the at least one child node, if so, executing step S7, if not, executing step S8;

[0023] S7, update the parent node currParent to the child node equal to the current routing value, set a=a+1, and execute step S2;

[0024] S8. If there is no child node equal to the current routing value in the child nodes, construct a routing child node corresponding to the current routing value, add the routing child node to the parent node currParent, update the parent node currParent to the routing child node corresponding to the current routing value, and set a=a+1, and execute step S2.

[0025] In a second aspect, an embodiment of the present application provides a routing method based on a routing configuration tree, wherein the routing configuration tree is generated based on the method for generating the routing configuration tree in the first aspect, including:

[0026] S41, receiving a routing configuration instruction, wherein the routing configuration instruction includes: data to be routed;

[0027] S42, processing the data to be routed based on a preset dimension priority array to generate a routing array, wherein the routing array includes at least one routing data;

[0028] S43: obtaining a preset routing configuration tree, generating a first routing sub-node list based on a root node of the routing configuration tree, and obtaining a first threshold corresponding to the first routing sub-node list;

[0029] S44, setting a first node index i, initializing the first node index, setting i=0;

[0030] S45, setting the current routing node as the i-th first routing child node, performing a routing judgment operation based on the current routing node and the routing array, receiving a first return value, and judging whether the first return value is a null value, if so, executing step S46, if not, executing step S47;

[0031] S46, updating the first node index i, setting i=i+1, updating the current routing node based on the first node index i, setting the routing data index j, initializing the routing data index j=0, and performing the routing judgment operation based on the current routing node, the routing data index j and the routing data;

[0032] S47: If the first return value is a non-null value, determine that the first return value is a routing configuration of the data to be routed.

[0033] In one embodiment, the routing judgment operation is performed based on the current routing node, the routing data index j and the routing data, including: S51, judging whether the current routing node contains a configuration subnode, if so, executing step S52, if not, executing step S53; S52, obtaining the configuration value of the configuration subnode as the first return value; S53, setting the current data to the jth routing data of the routing array, judging whether the routing value of the current routing node is equal to the current data or whether the current routing node is the default node default, if the routing value is not equal to the current data and the current routing node is not the default node default, executing step S54, if the routing value is equal to the current data or the current routing node is the default node default, Execute step S55; S54, return a null value as the first return value; S55, update the routing data index j, set j=j+1, update the current data based on the routing data index j, obtain the second routing sub-node list corresponding to the current routing node and the second threshold corresponding to the second routing sub-node list, and execute step S56; S56, obtain the second node index x, update the current routing node to the xth second routing sub-node in the second routing sub-node list, and execute step S57; S57, perform the routing judgment operation based on the current routing node, the routing data index j and the routing data, receive the second return value, and judge whether the second return value is a null value. If not, execute step S58; S58, if the second return value is a non-null value, return the routing value of the current routing node as the first return value.

[0034] In one of the embodiments, it also includes: S61, if the second return value is a null value, update the second node index, set x=x+1, and execute step S62; S62, determine whether the second node index x is greater than or equal to the second threshold; S63, if the second node index x is greater than or equal to the second threshold, return a null value as the first return value; S64, if the second node index x is less than the second threshold, execute step S56.

[0035] In one of the embodiments, before setting the current routing node as the i-th first routing child node, it also includes: determining whether the first node index i is greater than the first threshold; if the first node index i is greater than or equal to the first threshold, terminating the routing configuration operation of the routing data; if the first node index i is less than or equal to the first threshold, using the current routing node, the routing data index j and the routing array as input parameters of the routing judgment operation.

[0036] In a third aspect, an embodiment of the present application provides a device for generating a routing configuration tree, including:

[0037] A receiving unit, configured to receive a routing configuration tree generation instruction, wherein the routing configuration tree generation instruction includes: a routing configuration data array and a dimension priority array, wherein the routing configuration array includes at least one routing configuration tuple, and the routing configuration tuple includes at least one routing value and one configuration value;

[0038] A construction unit, configured to construct a routing configuration tree root node root based on the routing configuration tree generation instruction;

[0039] A generating unit, configured to traverse the at least one routing configuration tuple of the routing configuration data array to construct a child node of a root node of the routing configuration tree, and generate the routing configuration tree;

[0040] Wherein, in the aspect of traversing the at least one routing configuration tuple of the routing configuration data array to construct the child nodes of the root node of the routing configuration tree, the generating unit is specifically used to:

[0041] For any of the routing configuration tuples, construct the parent node currParent of the routing configuration tuple, and set the parent node currParent to be equal to the root node root of the routing configuration tree;

[0042] Traversing the dimension priority array, extracting the routing value of the routing configuration tuple, executing routing child node construction and parent node update operations, and obtaining at least one routing child node and an updated parent node currParent corresponding to the routing configuration tuple;

[0043] Extract the configuration value of the routing configuration tuple to generate a routing configuration tree node, and add the configuration tree node to the updated parent node currParent;

[0044] Wherein, in the aspect of traversing the dimension priority array to extract the routing value of the routing configuration tuple to perform routing child node construction and parent node update operations, the generating unit is specifically used to:

[0045] S1, set variable a, initialize the variable a, set a=0, where a is an integer, and execute step S2;

[0046] S2, obtaining the ath priority value y of the dimensional priority array, where y is an integer and y is greater than or equal to 0, and executing step S3;

[0047] S3, extracting the yth routing value in the routing configuration tuple as the current routing value, and executing step S4;

[0048] S4, determine whether the parent node currParent has a child node, if yes, execute step S6, if no, execute step S5;

[0049] S5, construct a default node default and add it to the parent node currParent to obtain a new parent node currParent, update the parent node currParent to the new parent node currParent, and execute step S6;

[0050] S6, obtaining at least one child node of the parent node currParent, traversing the at least one child node, and determining whether there is a child node with the same value as the current routing value in the at least one child node, if so, executing step S7, if not, executing step S8;

[0051] S7, update the parent node currParent to the child node equal to the current routing value, set a=a+1, and execute step S2;

[0052] S8. If there is no child node equal to the current routing value in the child nodes, construct a routing child node corresponding to the current routing value, add the routing child node to the parent node currParent, update the parent node currParent to the routing child node corresponding to the current routing value, and set a=a+1, and execute step S2.

[0053] In a fourth aspect, an embodiment of the present application provides a routing device based on a routing configuration tree, wherein the routing configuration tree is generated based on the method for generating the routing configuration tree in the first aspect, including:

[0054] A receiving unit, configured to receive a routing configuration instruction, wherein the routing configuration instruction includes: data to be routed;

[0055] A generating unit, configured to process the data to be routed based on a preset dimension priority array to generate a routing array, wherein the routing array includes at least one routing data;

[0056] an acquisition unit, configured to acquire a preset routing configuration tree, generate a first routing sub-node list based on a root node of the routing configuration tree, and acquire a first threshold value corresponding to the first routing sub-node list;

[0057] A setting unit, used to set a first node index i, and initialize the first node index to set i=0;

[0058] a judgment unit, configured to set a current routing node as the i-th first routing child node, perform a routing judgment operation based on the current routing node and the routing array, receive a first return value, and judge whether the first return value is a null value;

[0059] a recursive unit, configured to update the first node index i to set i=i+1 when the first return value is a null value, update the current routing node based on the first node index i, set the routing data index j, initialize the routing data index j=0, and perform the routing judgment operation based on the current routing node, the routing data index j and the routing data;

[0060] A determining unit is used to determine that the first return value is a routing configuration of the data to be routed when the first return value is a non-null value.

[0061] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program comprises instructions for executing some or all of the steps described in the method described in the first aspect of the embodiment of the present application.

[0062] As can be seen, in the present application, the present application provides a method for generating a routing configuration tree, by receiving a routing configuration tree generation instruction, wherein the routing configuration tree generation instruction includes: a routing configuration data array and a dimension priority array, wherein the routing configuration array includes at least one routing configuration tuple, and the routing configuration tuple includes at least one routing value and a configuration value; then constructing a routing configuration tree root node root based on the routing configuration tree generation instruction; finally, traversing the at least one routing configuration tuple of the routing configuration data array to construct the child nodes of the routing configuration tree root node, and generating the routing configuration tree. The routing configuration can be stored in the form of a tree to reduce the number of configuration rules and thus reduce the configuration storage space; at the same time, a routing method based on a routing configuration tree is provided, S41, receiving a routing configuration instruction, the routing configuration instruction including: data to be routed; S42, processing the data to be routed based on a preset dimension priority array to generate a routing array, the routing array including at least one routing data; S43, obtaining a preset routing configuration tree, generating a first routing sub-node list based on the root node of the routing configuration tree, and obtaining a first threshold value corresponding to the first routing sub-node list; S44, setting a first node index i, initializing the first node index to i=0; S45, setting the current The previous routing node is the i-th first routing child node, and a routing judgment operation is performed based on the current routing node and the routing array, and a first return value is received to determine whether the first return value is a null value. If so, step S46 is executed, and if not, step S47 is executed; S47, the first node index i is updated to set i=i+1, the current routing node is updated based on the first node index i, the routing data index j is set, the routing data index j=0 is initialized, and the routing judgment operation is performed based on the current routing node, the routing data index j and the routing data; S48, if the first return value is a non-null value, the first return value is determined to be the routing configuration of the data to be routed. In this way, routing configuration is performed by constructing a configuration tree, and tree nodes can be easily traced back. When routing configuration rules are increased, routing rules can be increased by only constructing subnodes at the corresponding tree nodes, which is conducive to improving the scalability of routing configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying creative work.

[0064] Figure 1 It is a flowchart of a method for generating a routing configuration tree provided in an embodiment of the present application;

[0065] Figure 2 A schematic diagram of a process for constructing a subnode provided in an embodiment of the present application;

[0066] Figure 3 It is a structural diagram of a routing configuration tree provided in an embodiment of the present application;

[0067] Figure 4 It is a flowchart of a routing method based on a routing configuration tree provided by the present application;

[0068] Figure 5 It is a flowchart of a routing determination operation method provided by an embodiment of the present application;

[0069] Figure 6 It is a structural schematic diagram of a device for generating a routing configuration tree provided in an embodiment of the present application;

[0070] Figure 7 It is a structural diagram of a routing device based on a routing configuration tree provided in an embodiment of the present application;

[0071] Figure 8 It is a structural diagram of an electronic device 800 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0072] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0073] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present invention and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0074] Reference to "embodiments" herein means that a particular feature, result, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0075] Below, some terms in this application are explained to facilitate understanding by those skilled in the art.

[0076] Electronic devices may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices (such as smart watches, smart bracelets, pedometers, etc.), computing devices or other processing devices connected to wireless modems, as well as various forms of user equipment (UE), mobile stations (MS), terminal devices, etc. For the convenience of description, the above-mentioned devices are collectively referred to as electronic devices.

[0077] See also Figure 1 , Figure 1 This is a flow chart of a method for generating a routing configuration tree provided in an embodiment of the present application, which is described by taking the method applied to electronic devices such as computers as an example, and includes the following steps:

[0078] Step 101: Receive a routing configuration tree generation instruction, wherein the routing configuration tree generation instruction includes: a routing configuration data array and a dimension priority array, wherein the routing configuration data array includes at least one routing configuration tuple, and the routing configuration tuple includes at least one routing value and one configuration value;

[0079] Step 102: construct a routing configuration tree root node root based on the routing configuration tree generation instruction;

[0080] Step 103: traverse the at least one routing configuration tuple in the routing configuration data array to construct child nodes of the root node of the routing configuration tree, thereby generating the routing configuration tree.

[0081] Optionally, the traversal of the at least one routing configuration tuple of the routing configuration data array to construct the child nodes of the root node of the routing configuration tree includes: for any one of the routing configuration tuples, constructing the parent node currParent of the routing configuration tuple, and setting the parent node currParent equal to the root node root of the routing configuration tree; traversing the dimension priority array to extract the routing value of the routing configuration tuple to perform routing child node construction and parent node update operations to obtain at least one routing child node corresponding to the routing configuration tuple and an updated parent node currParent; extracting the configuration value of the routing configuration tuple to generate a routing configuration tree node, and adding the configuration tree node to the updated parent node currParent.

[0082] The routing configuration tuple can be represented by a tuple, and each routing configuration tuple can be represented by a tuple (Dim1, Dim2, ..., DimN, outi), wherein DimN is the value of the Nth dimension of the configuration tuple, and outi refers to the configuration value of the i-th configuration tuple.

[0083] Among them, the dimension priority array can be represented by the array DimSorted[]. The dimension priority array is used to store the value index index corresponding to each dimension in the routing configuration tuple, that is, the dimension priority array stores N data, each dimension corresponds to a dimension of the configuration tree, and the value of each dimension is the value index index of the routing configuration tuple in the Nth dimension. For example, DimSorted[0]=3, then the routing value corresponding to Dim3 in each routing configuration tuple is the value of the first dimension of the configuration tree.

[0084] Optionally, the traversal of the dimension priority array extracts the routing value of the routing configuration tuple to perform routing child node construction and parent node update operations, such as Figure 2 As shown, Figure 2 A schematic diagram of a process for constructing a subnode provided in an embodiment of the present application includes the following steps:

[0085] S201, set variable a, initialize the variable a to 0, where a is an integer, and execute step S202;

[0086] S202, obtaining the ath priority value y of the dimensional priority array, where y is an integer and y is greater than or equal to 0, and executing step S203;

[0087] S203, extracting the yth routing value in the routing configuration tuple as the current routing value, and executing step S204;

[0088] S204, determine whether the parent node currParent has a child node, if yes, execute step S206, if no, execute step S205;

[0089] S205, construct a default node default and add it to the parent node currParent to obtain a new parent node currParent, update the parent node currParent to the new parent node currParent, and execute step S206;

[0090] S206, obtaining at least one child node of the parent node currParent, traversing the at least one child node, and determining whether there is a child node with a value equal to the current routing value in the at least one child node, if so, executing step S207, if not, executing step S208;

[0091] S207, update the parent node currParent to the child node with the same value as the current route, set a=a+1, and execute step S202;

[0092] S208. If there is no child node equal to the current routing value in the child nodes, construct a routing child node corresponding to the current routing value, add the routing child node to the parent node currParent, update the parent node currParent to the routing child node corresponding to the current routing value, and set a=a+1, and execute step S202.

[0093] The following is an actual example to explain the above steps. For the routing configuration data array data[], start from the first routing configuration tuple data[0] in the routing configuration data array, and remember that the current routing configuration tuple data[0]=tuple(Dim1, Dim2, ..., DimN, out), where tuple contains N-dimensional data Dim1-DimN and a configuration value out. Get the dimension priority array DimSorted[], where the dimension priority array includes N-dimensional data. Initialize the current parent node currParent to the root node root, set the variable a, and initialize the variable a to a=0. First, get the first data DimSorted[a] in the dimension priority array, that is, the value y corresponding to DimSorted[0]. Assuming y=1, extract the y=1th data from the routing configuration tuple as the current routing value, that is, the current routing value is Dim1. Get the number of child nodes of the current parent node currParent, that is, the root node root. Determine whether the current parent node currParent has child nodes. If there are child nodes, directly get the current parent node cu At least one child node of rrParent is determined, and whether there is a child node equal to Dim1 in at least one child node; if there is no child node, a default node default is constructed, and the default node default is added to the parent node currParent to obtain a new parent node currParent containing the default node default, and the current parent node currParent is updated to the new parent node currParent. Then, at least one child node of the current parent node currParent is obtained, and whether there is a child node equal to Dim1 in at least one child node. If so, the current parent node currParent is directly updated to a child node equal to Dim1. If the parent node currParent only contains the default node default or there is no child node equal to Dim1, a routing child node corresponding to Dim1 is constructed, and the routing child node corresponding to Dim1 is added to the current parent node currParent, and the current parent node currParent is updated to the routing child node corresponding to Dim1. a=a+1=0+1=1, Get the value y of the dimension priority array DimSorted[a], that is, DimSorted[1]. Assume that y=2 at this time, execute the above loop until a>=N, the loop ends, and the routing configuration tree branch corresponding to the first routing configuration tuple data[0] in the configuration tree is generated. In this way, traverse the routing configuration data array data[], execute the above loop for each routing configuration tuple, and generate the routing configuration tree. The routing configuration tree is as follows: Figure 3 As shown, Figure 3It is a structural diagram of a routing configuration tree provided in an embodiment of the present application, wherein root is a root node, V is a routing child node, default is a default node, and out is a configuration node.

[0094] See also Figure 4 , Figure 4 This is a flowchart of a routing method based on a routing configuration tree provided by the present application, in which the method is applied to Figure 1 The terminal in is used as an example to illustrate, including the following steps:

[0095] Step 401: receiving a routing configuration instruction, wherein the routing configuration instruction includes: data to be routed;

[0096] Step 402: Process the data to be routed based on a preset dimension priority array to generate a routing array, wherein the routing array includes at least one routing data;

[0097] Among them, processing the data to be routed based on the preset dimension priority array to generate a routing array includes: constructing a current array, initializing the current array to be an empty array, setting the current value to be the first dimension priority value in the dimension priority array, extracting the routing value corresponding to the current value in the routing data and adding it to the routing array, that is, the position parameter of the routing value in the routing data corresponds to the current value, updating the current array, updating the current value to the next dimension priority value, executing the above loop until the traversal of the dimension priority array is completed, and obtaining the routing array.

[0098] Step 403: Obtain a preset routing configuration tree, generate a first routing sub-node list based on a root node of the routing configuration tree, and obtain a first threshold corresponding to the first routing sub-node list;

[0099] The first threshold is the sum of the number of first routing sub-nodes and the default node default included in the first routing sub-node list.

[0100] Among them, generating a first routing subnode list based on the root node of the routing configuration tree includes: obtaining all routing subnodes and the default node default of the root node of the routing configuration tree, generating a first routing subnode list based on all routing subnodes and the default node default, wherein the default node default is placed at the end of the first routing subnode list.

[0101] Step 404: Set a first node index i, and initialize the first node index to i=0;

[0102] Step 405: Set the current routing node as the i-th first routing child node, perform a routing judgment operation based on the current routing node and the routing array, receive a first return value, and judge whether the first return value is a null value. If so, execute step 406; if not, execute step 407;

[0103] Optionally, before setting the current routing node as the i-th first routing sub-node, it also includes: determining whether the first node index i is greater than the first threshold; if the first node index i is greater than or equal to the first threshold, terminating the routing configuration operation of the routing data; if the first node index i is less than or equal to the first threshold, using the current routing node, the routing data index j and the routing array as input parameters of the routing judgment operation.

[0104] Step 406: Update the first node index i to set i=i+1, update the current routing node based on the first node index i, set the routing data index j, initialize the routing data index j=0, and perform the routing judgment operation based on the current routing node, the routing data index j and the routing data;

[0105] In a possible example, the routing judgment operation is represented by visit0 (currNode, tuple, currDimIdx), where currNode represents the current routing node, tuple is routing data, and currDimIdx is the routing data index j.

[0106] Step 407: If the first return value is a non-null value, determine that the first return value is the routing configuration of the data to be routed.

[0107] Optionally, the routing judgment operation is performed based on the current routing node, the routing data index j and the routing data, such as Figure 5 As shown, Figure 5 This is a flow chart of a routing determination operation method provided by an embodiment of the present application, comprising the following steps:

[0108] Step 501, determine whether the current routing node contains a configuration sub-node, if so, execute step 502, if not, execute step S503;

[0109] Step 502: Obtain the configuration value of the configuration subnode and return it as the first return value;

[0110] Step 503, setting the current data to the j-th routing data of the routing array, determining whether the routing value of the current routing node is equal to the current data or whether the current routing node is the default node default; if the routing value is not equal to the current data and the current routing node is not the default node default, executing step 504; if the routing value is equal to the current data or the current routing node is the default node default, executing step 505;

[0111] When the routing value of the current routing node is equal to the current data or the current routing node is the default node, it is confirmed that the current data hits the current routing node or the default node.

[0112] Step 504: Return a null value as the first return value;

[0113] Step 505: Update the routing data index j to set j=j+1, update the current data based on the routing data index j, obtain the second routing sub-node list corresponding to the current routing node and the second threshold corresponding to the second routing sub-node list, and execute step 506;

[0114] The second threshold is the sum of the numbers of the first routing sub-nodes and the default node default included in the second routing sub-node list.

[0115] Step 506, obtaining the second node index x, updating the current routing node to the xth second routing sub-node in the second routing sub-node list, and executing step 507;

[0116] The initial value of the second node index x is 0.

[0117] Step 507: Execute the routing judgment operation based on the current routing node, the routing data index j and the routing data, receive a second return value, and determine whether the second return value is a null value. If not, execute step 508;

[0118] Step 508: If the second return value is a non-null value, return the routing value of the current routing node as the first return value;

[0119] Step 509: If the second return value is a null value, update the second node index so that x=x+1, and execute step 510;

[0120] Step 510, determine whether the second node index x is greater than or equal to the second threshold; if the second node index x is greater than or equal to the second threshold, return a null value as the first return value; if the second node index x is less than the second threshold, execute step 506.

[0121] It can be seen that a routing judgment operation method provided in an embodiment of the present application recursively inputs routing data into a configuration tree for routing judgment, extracts routing configuration, and first matches the routing sub-nodes for each dimension. When there is no sub-node equal to the current data in the routing sub-nodes, the default node default is hit, wherein the default node default in each dimension is equivalent to the complement of the routing sub-nodes in the dimension, ensuring that each routing data can hit the node to ensure that the routing loop is carried out to obtain the configuration value.

[0122] Thus, based on a method for generating a routing configuration tree and a routing method based on a routing configuration tree provided in an embodiment of the present application, full coverage of the configuration space is achieved by generating a routing configuration tree. Assuming that in a fixed n-dimensional configuration space, for any dimension, the set of dimensions is assumed to be A, and the actual covered set range is A'. Without any specific configuration, the set of routing nodes is an empty set. The default node default represents the complement of the set of routing nodes, that is, the complement of the empty set, that is, the full set of the current dimension, that is, A, that is, the covered range is also equal to A'. Therefore, without any specific configuration, the routing configuration tree provided by the present application can be To achieve full coverage of the configuration space; when any configuration item is added, for any dimension, it includes routing node set B and default node default. At this time, default node default is the complement of routing node set B. Therefore, the sum of routing node set B and default node default is equal to set A of the dimension. Similarly, the sum of the coverage range of routing node set B and the coverage range of default node default is also equal to A'. Therefore, by adding any configuration, the routing configuration tree provided in the present application can still achieve full coverage of the configuration space. Therefore, the routing configuration tree provided in the embodiment of the present application can achieve full coverage of the routing configuration content.

[0123] Furthermore, suppose that the i-dimensional set A is {a1, a2, ..., ai} and the j-dimensional set B is {b1, b2, ..., bj}, where the following mapping relationship exists between set A and set B: (1) For any a∈A, there exists and only exists one b∈B such that f(a)=b; (2) For any b∈B, it is not required that there exists an a∈A such that f(a)=b; (3) For any a∈A, c∈A, a≠c, there can exist a∈B such that f(c)=b. Based on the above mapping relationship, we can obtain a set B' that has a mapping relationship with set A. The mapping relationship between set A and set B' satisfies: (1) For any a∈A, there exists and only exists one b'∈B' such that f(a)=b'; (2) For any b'∈B', there exists at least one a∈A such that f(a)=b'. Therefore, based on set A and set B', a set of equivalence classes Q can be generated, Q = {Q1, Q2, ..., Qk}, the number of which is the same as the number of value ranges k of set B', and is the minimum number of configuration items that need to be configured, where any Qi = {<ax,bi> ,<ay,bi> , …}, which can be further converted into Qi'=<{<ax,ay,…},bi > , so the simplest configuration based on set A and set B is:<Q1',b1> ,<Q2',b2> , …,<Qk',bk> In the database paradigm design, it is still necessary to design<Qi',bi> Expands to {<ax,bi> ,<ay,bi> , …} are stored separately, so in this application, default is used to represent the largest set in Qi', the number of configuration rules is reduced, and the purpose of saving configuration storage space is achieved. When the routing configuration rules increase, routing sub-nodes can be added in the corresponding dimensions to improve the scalability of routing configuration.

[0124] In summary, in the present application, an embodiment of the present application provides a method for generating a routing configuration tree, by receiving a routing configuration tree generation instruction, wherein the routing configuration tree generation instruction includes: a routing configuration data array and a dimension priority array, wherein the routing configuration array includes at least one routing configuration tuple, and the routing configuration tuple includes at least one routing value and a configuration value; then constructing a routing configuration tree root node root based on the routing configuration tree generation instruction; finally, traversing the at least one routing configuration tuple of the routing configuration data array to construct the child nodes of the routing configuration tree root node, and generating the routing configuration tree. The routing configuration can be stored in the form of a tree to reduce the number of configuration rules and thus reduce the configuration storage space; at the same time, a routing method based on a routing configuration tree is provided, S41, receiving a routing configuration instruction, the routing configuration instruction including: data to be routed; S42, processing the data to be routed based on a preset dimension priority array to generate a routing array, the routing array including at least one routing data; S43, obtaining a preset routing configuration tree, generating a first routing sub-node list based on the root node of the routing configuration tree, and obtaining a first threshold value corresponding to the first routing sub-node list; S44, setting a first node index i, initializing the first node index to i=0; S45, setting the current The previous routing node is the i-th first routing child node, and a routing judgment operation is performed based on the current routing node and the routing array, and a first return value is received to determine whether the first return value is a null value. If so, step S46 is executed, and if not, step S47 is executed; S47, the first node index i is updated to set i=i+1, the current routing node is updated based on the first node index i, the routing data index j is set, the routing data index j=0 is initialized, and the routing judgment operation is performed based on the current routing node, the routing data index j and the routing data; S48, if the first return value is a non-null value, the first return value is determined to be the routing configuration of the data to be routed. In this way, routing configuration is performed by constructing a configuration tree, and tree nodes can be easily traced back. When routing configuration rules are increased, routing rules can be increased by only constructing subnodes at the corresponding tree nodes, which is conducive to improving the scalability of routing configuration.

[0125] It should be understood that although Figure 1-5 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-5At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0126] In one embodiment, Figure 6 As shown, Figure 6 6 is a schematic diagram of the structure of a routing configuration tree generation device provided in an embodiment of the present application, including a receiving unit 601, a construction unit 602 and a generation unit 603, wherein:

[0127] A receiving unit 601 is used to receive a routing configuration tree generation instruction, wherein the routing configuration tree generation instruction includes: a routing configuration data array and a dimension priority array, wherein the routing configuration data array includes at least one routing configuration tuple, and the routing configuration tuple includes at least one routing value and one configuration value;

[0128] A construction unit 602 is used to construct a routing configuration tree root node root based on the routing configuration tree generation instruction;

[0129] A generating unit 603 is configured to traverse the at least one routing configuration tuple of the routing configuration data array to construct a child node of a root node of the routing configuration tree, thereby generating the routing configuration tree;

[0130] In terms of constructing the child nodes of the root node of the routing configuration tree by traversing the at least one routing configuration tuple of the routing configuration data array, the generating unit 603 is specifically used to: construct the parent node currParent of the routing configuration tuple for any one of the routing configuration tuples, and set the parent node currParent to be equal to the root node root of the routing configuration tree; traverse the dimension priority array to extract the routing value of the routing configuration tuple to perform routing child node construction and parent node update operations to obtain at least one routing child node corresponding to the routing configuration tuple and the updated parent node currParent; extract the configuration value of the routing configuration tuple to generate a routing configuration tree node, and add the configuration tree node to the updated parent node currParent.

[0131] In a possible example, in terms of traversing the dimensional priority array to extract the routing value of the routing configuration tuple to perform routing child node construction and parent node update operations, the generating unit 603 is specifically used for: S1, setting variable a, initializing the variable a to set a=0, where a is an integer, and executing step S2; S2, obtaining the ath priority value y of the dimensional priority array, where y is an integer and y is greater than or equal to 0, and executing step S3; S3, extracting the yth routing value in the routing configuration tuple as the current routing value, and executing step S4; S4, determining whether the parent node currParent has a child node, if so, executing step S6, if not, executing step S5; S5, constructing a default node default and adding it to the parent node currParent to obtain a new parent node currParent, and The parent node currParent is updated to the new parent node currParent, and step S6 is executed; S6, at least one child node of the parent node currParent is obtained, the at least one child node is traversed, and whether there is a child node equal to the current routing value in the at least one child node, if so, step S7 is executed, if not, step S8 is executed; S7, the parent node currParent is updated to the child node equal to the current routing value; S8, if there is no child node equal to the current routing value in the child node, a routing child node corresponding to the current routing value is constructed, the routing child node is added to the parent node currParent, the parent node currParent is updated to the routing child node corresponding to the current routing value, and a=a+1 is set, and step S2 is executed.

[0132] In one embodiment, Figure 7 As shown, Figure 7 70 is a schematic diagram of a structure of a routing device based on a routing configuration tree provided in an embodiment of the present application, including a receiving unit 701, a generating unit 702, an acquiring unit 703, a setting unit 704, a judging unit 705, a recursive unit 706 and a determining unit 707, wherein:

[0133] The receiving unit 701 is used to receive a routing configuration instruction, wherein the routing configuration instruction includes: data to be routed;

[0134] A generating unit 702, configured to process the to-be-routed data based on a preset dimension priority array to generate a routing array, wherein the routing array includes at least one routing data;

[0135] The acquisition unit 703 is used to acquire a preset routing configuration tree, generate a first routing sub-node list based on a root node of the routing configuration tree, and acquire a first threshold corresponding to the first routing sub-node list;

[0136] A setting unit 704 is used to set a first node index i and initialize the first node index to i=0;

[0137] A judgment unit 705 is used to set the current routing node as the i-th first routing child node, perform a routing judgment operation based on the current routing node and the routing array, receive a first return value, and judge whether the first return value is a null value;

[0138] The recursive unit 706 is configured to update the first node index i to set i=i+1 when the first return value is a null value, update the current routing node based on the first node index i, set the routing data index j, initialize the routing data index j=0, and perform the routing judgment operation based on the current routing node, the routing data index j and the routing data;

[0139] The determining unit 707 is configured to determine that the first return value is a routing configuration of the data to be routed when the first return value is a non-null value.

[0140] In a possible example, in terms of performing the routing judgment operation based on the current routing node, the routing data index j and the routing data, the recursive unit 706 is specifically used to: S51, determine whether the current routing node contains a configuration child node, if so, execute step S52, if not, execute step S53; S52, obtain the configuration value of the configuration child node as the first return value and return it; S53, set the current data to the jth routing data of the routing array, determine whether the routing value of the current routing node is equal to the current data or whether the current routing node is the default node default, if the routing value is not equal to the current data and the current routing node is not the default node default, execute step S54, if the routing value is equal to the current data or the current routing node is the default node d efault, execute step S55; S54, return a null value as the first return value; S55, update the routing data index j so that j=j+1, update the current data based on the routing data index j, obtain the second routing sub-node list corresponding to the current routing node and the second threshold value corresponding to the second routing sub-node list, and execute step S56; S56, obtain the second node index x, update the current routing node to the xth second routing sub-node in the second routing sub-node list, and execute step S57; S57, perform the routing judgment operation based on the current routing node, the routing data index j and the routing data, receive the second return value, and judge whether the second return value is a null value. If not, execute step S58; S58, if the second return value is a non-null value, return the routing value of the current routing node as the first return value.

[0141] In a possible example, the recursive unit 706 is also used for: S61, if the second return value is a null value, updating the second node index so that x=x+1, and executing step S62; S62, determining whether the second node index x is greater than or equal to the second threshold; S63, if the second node index x is greater than or equal to the second threshold, returning a null value as the first return value; S64, if the second node index x is less than the second threshold, executing step S56.

[0142] In a possible example, before setting the current routing node as the i-th first routing child node, the judgment unit 705 is further used to: judge whether the first node index i is greater than the first threshold; if the first node index i is greater than or equal to the first threshold, terminate the routing configuration operation of the routing data; if the first node index i is less than or equal to the first threshold, use the current routing node, the routing data index j and the routing array as input parameters of the routing judgment operation.

[0143] The above-mentioned generating device of the routing configuration tree and each module in the routing device based on the routing configuration tree can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0144] See also Figure 8 , Figure 8 It is a structural diagram of an electronic device 800 provided in an embodiment of the present application. As shown in the figure, the electronic device 800 includes an application processor 810, a memory 820, a communication interface 530 and one or more programs 821, wherein the one or more programs 821 are stored in the above-mentioned memory 820 and are configured to be executed by the above-mentioned application processor 810.

[0145] The one or more programs 821 include instructions for performing the following steps:

[0146] Receiving a routing configuration tree generation instruction, wherein the routing configuration tree generation instruction includes: a routing configuration data array and a dimension priority array, wherein the routing configuration array includes at least one routing configuration tuple, and the routing configuration tuple includes at least one routing value and one configuration value;

[0147] Constructing a routing configuration tree root node root based on the routing configuration tree generation instruction;

[0148] The at least one routing configuration tuple of the routing configuration data array is traversed to construct child nodes of the root node of the routing configuration tree, thereby generating the routing configuration tree.

[0149] The one or more programs 821 are also used to perform instructions for the following steps:

[0150] S41, receiving a routing configuration instruction, wherein the routing configuration instruction includes: data to be routed;

[0151] S42, processing the data to be routed based on a preset dimension priority array to generate a routing array, wherein the routing array includes at least one routing data;

[0152] S43: obtaining a preset routing configuration tree, generating a first routing sub-node list based on a root node of the routing configuration tree, and obtaining a first threshold corresponding to the first routing sub-node list;

[0153] S44, setting a first node index i, and initializing the first node index i=0;

[0154] S45, setting the current routing node as the i-th first routing child node, performing a routing judgment operation based on the current routing node and the routing array, receiving a first return value, and judging whether the first return value is a null value, if so, executing step S46, if not, executing step S47;

[0155] S46, updating the first node index i to set i=i+1, updating the current routing node based on the first node index i, setting the routing data index j, initializing the routing data index j=0, and performing the routing judgment operation based on the current routing node, the routing data index j and the routing data;

[0156] S47: If the first return value is a non-null value, determine that the first return value is a routing configuration of the data to be routed.

[0157] The execution process of the above steps can be referred to Figure 1-Figure 5 The instructions in , I will not repeat them again.

[0158] The embodiment of the present application can divide the electronic device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into a control unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0159] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiments, and the above computer includes an electronic device.

[0160] The present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps of any method described in the method embodiment. The computer program product may be a software installation package, and the computer includes an electronic device.

[0161] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0162] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0163] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0164] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0165] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0166] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the above-mentioned methods in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0167] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable memory, which may include a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0168] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for generating a routing configuration tree, It is characterized in that include: Receive a routing configuration tree generation instruction, wherein the routing configuration tree generation instruction includes: a routing configuration data array and a dimension priority array, wherein the routing configuration data array includes at least one routing configuration tuple, and the routing configuration tuple includes at least one routing value and one configuration value; Constructing a routing configuration tree root node root based on the routing configuration tree generation instruction; Traversing the at least one routing configuration tuple of the routing configuration data array to construct child nodes of the root node of the routing configuration tree, and generating the routing configuration tree; The step of traversing the at least one routing configuration tuple of the routing configuration data array to construct a child node of the root node of the routing configuration tree includes: For any of the routing configuration tuples, construct the parent node currParent of the routing configuration tuple, and set the parent node currParent to be equal to the root node root of the routing configuration tree; Traversing the dimension priority array, extracting the routing value of the routing configuration tuple, executing routing child node construction and parent node update operations, and obtaining at least one routing child node and an updated parent node currParent corresponding to the routing configuration tuple; Extract the configuration value of the routing configuration tuple to generate a routing configuration tree node, and add the configuration tree node to the updated parent node currParent; The traversing of the dimension priority array to extract the routing value of the routing configuration tuple to perform routing child node construction and parent node update operations includes: S1, set variable a, initialize the variable a, set a=0, where a is an integer, and execute step S2; S2, obtaining the ath priority value y of the dimensional priority array, where y is an integer and y is greater than or equal to 0, and executing step S3; S3, extracting the yth routing value in the routing configuration tuple as the current routing value, and executing step S4; S4, determine whether the parent node currParent has a child node, if yes, execute step S6, if no, execute step S5; S5, construct a default node default and add it to the parent node currParent to obtain a new parent node currParent, update the parent node currParent to the new parent node currParent, and execute step S6; S6, obtaining at least one child node of the parent node currParent, traversing the at least one child node, and determining whether there is a child node with the same value as the current routing value in the at least one child node, if so, executing step S7, if not, executing step S8; S7, update the parent node currParent to the child node equal to the current routing value, set a=a+1, and execute step S2; S8. If there is no child node equal to the current routing value in the child nodes, construct a routing child node corresponding to the current routing value, add the routing child node to the parent node currParent, update the parent node currParent to the routing child node corresponding to the current routing value, and set a=a+1, and execute step S2.

2. A routing method based on a routing configuration tree, wherein the routing configuration tree is generated based on the method for generating the routing configuration tree according to claim 1, It is characterized in that include: S41, receiving a routing configuration instruction, wherein the routing configuration instruction includes: data to be routed; S42, processing the data to be routed based on a preset dimension priority array to generate a routing array, wherein the routing array includes at least one routing data; S43: obtaining a preset routing configuration tree, generating a first routing sub-node list based on a root node of the routing configuration tree, and obtaining a first threshold corresponding to the first routing sub-node list; S44, setting a first node index i, initializing the first node index, setting i=0; S45, setting the current routing node as the i-th first routing child node, performing a routing judgment operation based on the current routing node and the routing array, receiving a first return value, and judging whether the first return value is a null value, if so, executing step S46, if not, executing step S47; S46, updating the first node index i to set i=i+1, updating the current routing node based on the first node index i, setting the routing data index j, initializing the routing data index j=0, and performing the routing judgment operation based on the current routing node, the routing data index j and the routing data; S47: If the first return value is a non-null value, determine that the first return value is a routing configuration of the data to be routed.

3. The method according to claim 2, It is characterized in that The performing the routing judgment operation based on the current routing node, the routing data index j and the routing data includes: S51, determine whether the current routing node contains a configuration sub-node, if so, execute step S52, if not, execute step S53; S52: Obtain the configuration value of the configuration subnode and return it as the first return value; S53, setting the current data to the j-th routing data of the routing array, determining whether the routing value of the current routing node is equal to the current data or whether the current routing node is the default node default, if the routing value is not equal to the current data and the current routing node is not the default node default, executing step S54, if the routing value is equal to the current data or the current routing node is the default node default, executing step S55; S54, returning a null value as the first return value; S55, update the routing data index j, set j=j+1, update the current data based on the routing data index j, obtain the second routing sub-node list corresponding to the current routing node and the second threshold corresponding to the second routing sub-node list, and execute step S56; S56, obtaining a second node index x, updating the current routing node to be the xth second routing sub-node in the second routing sub-node list, and executing step S57; S57, performing the routing judgment operation based on the current routing node, the routing data index j and the routing data, receiving a second return value, and judging whether the second return value is a null value, if not, executing step S58; S58. If the second return value is a non-null value, return the routing value of the current routing node as the first return value.

4. The method according to claim 3, It is characterized in that The method further comprises: S61. If the second return value is null, update the second node index, set x=x+1, and execute step S62; S62. Determine whether the second node index x is greater than or equal to the second threshold; S63: If the second node index x is greater than or equal to the second threshold, return a null value as the first return value; S64. If the second node index x is less than the second threshold, execute step S56.

5. The method according to claim 2, It is characterized in that Before setting the current routing node as the i-th first routing subnode, the method further includes: Determine whether the first node index i is greater than the first threshold; If the first node index i is greater than or equal to the first threshold, terminating the routing configuration operation of the routing data; If the first node index i is less than or equal to the first threshold, the current routing node, the routing data index j and the routing array are used as input parameters of the routing determination operation.

6. A device for generating a routing configuration tree, It is characterized in that include: A receiving unit, configured to receive a routing configuration tree generation instruction, wherein the routing configuration tree generation instruction includes: a routing configuration data array and a dimension priority array, wherein the routing configuration array includes at least one routing configuration tuple, and the routing configuration tuple includes at least one routing value and one configuration value; A construction unit, configured to construct a routing configuration tree root node root based on the routing configuration tree generation instruction; A generating unit, configured to traverse the at least one routing configuration tuple of the routing configuration data array to construct a child node of a root node of the routing configuration tree, and generate the routing configuration tree; Wherein, in the aspect of traversing the at least one routing configuration tuple of the routing configuration data array to construct the child nodes of the root node of the routing configuration tree, the generating unit is specifically used to: For any of the routing configuration tuples, construct the parent node currParent of the routing configuration tuple, and set the parent node currParent to be equal to the root node root of the routing configuration tree; Traversing the dimension priority array, extracting the routing value of the routing configuration tuple, executing routing child node construction and parent node update operations, and obtaining at least one routing child node and an updated parent node currParent corresponding to the routing configuration tuple; Extract the configuration value of the routing configuration tuple to generate a routing configuration tree node, and add the configuration tree node to the updated parent node currParent; Wherein, in the aspect of traversing the dimension priority array to extract the routing value of the routing configuration tuple to perform routing child node construction and parent node update operations, the generating unit is specifically used to: S1, set variable a, initialize the variable a, set a=0, where a is an integer, and execute step S2; S2, obtaining the ath priority value y of the dimensional priority array, where y is an integer and y is greater than or equal to 0, and executing step S3; S3, extracting the yth routing value in the routing configuration tuple as the current routing value, and executing step S4; S4, determine whether the parent node currParent has a child node, if yes, execute step S6, if no, execute step S5; S5, construct a default node default and add it to the parent node currParent to obtain a new parent node currParent, update the parent node currParent to the new parent node currParent, and execute step S6; S6, obtaining at least one child node of the parent node currParent, traversing the at least one child node, and determining whether there is a child node with the same value as the current routing value in the at least one child node, if so, executing step S7, if not, executing step S8; S7, update the parent node currParent to the child node equal to the current routing value, set a=a+1, and execute step S2; S8. If there is no child node equal to the current routing value in the child nodes, construct a routing child node corresponding to the current routing value, add the routing child node to the parent node currParent, update the parent node currParent to the routing child node corresponding to the current routing value, and set a=a+1, and execute step S2.

7. A routing device based on a routing configuration tree, wherein the routing configuration tree is generated based on the method for generating the routing configuration tree according to claim 1, It is characterized in that include: A receiving unit, configured to receive a routing configuration instruction, wherein the routing configuration instruction includes: data to be routed; A generating unit, configured to process the data to be routed based on a preset dimension priority array to generate a routing array, wherein the routing array includes at least one routing data; an acquisition unit, configured to acquire a preset routing configuration tree, generate a first routing sub-node list based on a root node of the routing configuration tree, and acquire a first threshold value corresponding to the first routing sub-node list; A setting unit, used for setting a first node index i, initializing the first node index, and setting i=0; a judgment unit, configured to set a current routing node as the i-th first routing child node, perform a routing judgment operation based on the current routing node and the routing array, receive a first return value, and judge whether the first return value is a null value; a recursive unit, configured to update the first node index i to set i=i+1 when the first return value is a null value, update the current routing node based on the first node index i, set the routing data index j, initialize the routing data index j=0, and perform the routing judgment operation based on the current routing node, the routing data index j and the routing data; A determining unit is used to determine that the first return value is a routing configuration of the data to be routed when the first return value is a non-null value.

8. An electronic device, It is characterized in that The method comprises a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the method according to any one of claims 1, 2-5.