CN112653624A - Routing method, device, medium and electronic equipment - Google Patents

Routing method, device, medium and electronic equipment Download PDF

Info

Publication number
CN112653624A
CN112653624A CN202011551254.4A CN202011551254A CN112653624A CN 112653624 A CN112653624 A CN 112653624A CN 202011551254 A CN202011551254 A CN 202011551254A CN 112653624 A CN112653624 A CN 112653624A
Authority
CN
China
Prior art keywords
routing
data capacity
routing node
interval
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011551254.4A
Other languages
Chinese (zh)
Inventor
牛一佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202011551254.4A priority Critical patent/CN112653624A/en
Publication of CN112653624A publication Critical patent/CN112653624A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/38Flow based routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present specification discloses a routing method, apparatus, medium, and electronic device, including: receiving a routing request sent by user equipment, and determining each second routing node corresponding to the next hop of a path from a first routing node to a target address according to a pre-stored routing table; determining the data capacity of data to be transmitted and a data capacity interval corresponding to the data capacity; for each second routing node, according to a pre-established corresponding relationship between the data capacity interval and the routing node and the routing recommendation sequence, inquiring a specified routing node corresponding to the determined data capacity interval in each second routing node, and determining the routing recommendation sequence corresponding to the specified routing node; and selecting one appointed routing node from the inquired appointed routing nodes according to the route recommendation sequence corresponding to the inquired appointed routing node, and forwarding the routing request to the selected appointed routing node. Therefore, the data transmission efficiency is ensured, and the aim of saving resources can be achieved.

Description

Routing method, device, medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer network technologies, and in particular, to a routing method, device, medium, and electronic device.
Background
Routing is the activity of transmitting information from a source address to a destination address through an interconnected network. As a network layer packet forwarding device, how to quickly determine the next-hop routing node in the routing path becomes an important factor for determining how fast the data transmission is.
Therefore, the present application provides a routing method to solve the above problems and achieve the purpose of saving resources while ensuring data transmission efficiency.
Disclosure of Invention
The present specification provides a routing method, device, medium, and electronic device, to partially solve the problems in the prior art.
The technical scheme adopted by the specification is as follows:
the routing method provided by the present specification includes:
a first routing node receives a routing request sent by user equipment, wherein the routing request comprises data to be transmitted and a target address;
determining at least one routing node corresponding to a next hop of a path from the first routing node to the destination address according to a pre-stored routing table, and using the routing node as each second routing node;
determining the data capacity of the data to be transmitted and a data capacity interval corresponding to the data capacity;
for each second routing node, according to a pre-established data capacity interval, a corresponding relation between the routing node and a routing recommendation sequence and a determined data capacity interval, inquiring the second routing node corresponding to the determined data capacity interval in each second routing node as a designated routing node, and determining the routing recommendation sequence corresponding to the designated routing node, wherein the routing recommendation sequence is determined in advance according to resources used by the designated routing node when the designated routing node transmits data contained in the data capacity interval;
and selecting one appointed routing node from the inquired appointed routing nodes according to the route recommendation sequence corresponding to the inquired appointed routing node, and forwarding the routing request to the selected appointed routing node.
Optionally, the pre-established correspondence between the data capacity interval, the routing node, and the routing recommendation sequence specifically includes:
determining a routing node corresponding to the data capacity interval according to a corresponding relation between the pre-established data capacity interval and the routing node;
selecting a data capacity from the data capacity interval, and respectively determining resources used by each routing node when transmitting data corresponding to the data capacity;
determining a route recommendation sequence of each routing node corresponding to the data capacity interval according to the resource quantity of the resources, wherein the smaller the resource quantity corresponding to the routing node is, the earlier the route recommendation sequence corresponding to the routing node is;
and establishing a corresponding relation among the data capacity interval, the routing nodes and the route recommendation sequence of each routing node.
Optionally, the correspondence between the pre-established data capacity interval and the routing node specifically includes:
determining a routing node corresponding to each preset data capacity interval according to the corresponding relation between the preset data capacity interval and the routing node;
respectively determining resources used by different routing nodes when processing data corresponding to each data capacity in the preset data capacity interval aiming at each preset data capacity interval;
according to the determined resources, the preset data capacity interval is divided again;
and establishing a corresponding relation between the divided data capacity interval and the business routing node.
Optionally, the repartitioning of the preset data capacity interval according to the determined resources specifically includes:
determining resources used by different routing nodes when transmitting data corresponding to the data capacity aiming at each data capacity in the preset data capacity interval;
according to the determined resources used by different routing nodes in the process of transmitting the data corresponding to the data capacity, the preset data capacity interval is divided again;
the resource quantity ordering of the resources determined by the corresponding different routing nodes is consistent for the different data capacities in the same data capacity interval in the divided data capacity interval;
and different data capacity attributes in different data capacity intervals are different in the size ordering of the resource quantity of the resources determined by the corresponding different routing nodes.
Optionally, determining the data capacity of the data to be transmitted and a data capacity interval corresponding to the data capacity specifically includes:
splitting the data capacity of the data to be transmitted to obtain at least two subdata capacities;
and determining a data capacity interval corresponding to each sub-data capacity according to the sub-data capacity.
Optionally, selecting one designated routing node from the queried designated routing nodes according to the routing recommendation sequence corresponding to the queried designated routing node specifically includes:
and selecting the appointed routing node with the most front routing sequence from the inquired appointed routing nodes according to the routing recommendation sequence corresponding to the inquired appointed routing node.
Optionally, the data amount of the data to be transmitted is a payment amount; different second routing nodes correspond to different payment channels; the resource is a fee charged for the procedure.
This specification provides a routing apparatus comprising:
a receiving unit, configured to receive a routing request sent by user equipment, where the routing request includes data to be transmitted and a target address;
a determining unit, configured to determine, according to a pre-stored routing table, at least one routing node corresponding to a next hop of a path from the first routing node to the destination address, as each second routing node; determining the data capacity of the data to be transmitted and a data capacity interval corresponding to the data capacity;
a query unit, configured to query, for each second routing node, according to a pre-established data capacity interval, a correspondence between a routing node and a routing recommendation sequence, and a determined data capacity interval, the second routing node corresponding to the determined data capacity interval in each second routing node as a designated routing node, and determine a routing recommendation sequence corresponding to the designated routing node, where the routing recommendation sequence is determined in advance according to a resource used by the designated routing node when transmitting data included in the data capacity interval;
and the processing unit is used for selecting one appointed routing node from the inquired appointed routing nodes according to the route recommendation sequence corresponding to the inquired appointed routing node and forwarding the routing request to the selected appointed routing node.
The present specification provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the routing method described above.
The present specification provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, the processor implements the routing method described above.
The technical scheme adopted by the specification can achieve the following beneficial effects:
the routing method provided by the present specification receives a routing request sent by user equipment, where the routing request includes data to be transmitted and a target address; determining at least one routing node corresponding to a next hop of a path from the first routing node to the destination address according to a pre-stored routing table, and using the routing node as each second routing node; determining the data capacity of the data to be transmitted and a data capacity interval corresponding to the data capacity; for each second routing node, according to a pre-established data capacity interval, a corresponding relation between the routing node and a routing recommendation sequence and a determined data capacity interval, inquiring the second routing node corresponding to the determined data capacity interval in each second routing node as a designated routing node, and determining the routing recommendation sequence corresponding to the designated routing node, wherein the routing recommendation sequence is determined in advance according to resources used by the designated routing node when the designated routing node transmits data contained in the data capacity interval; and selecting one appointed routing node from the inquired appointed routing nodes according to the route recommendation sequence corresponding to the inquired appointed routing node, and forwarding the routing request to the selected appointed routing node. When data is transmitted, the route recommendation sequence of the route node corresponding to the data capacity of the data to be transmitted is searched, and a proper route node is selected according to the route recommendation sequence, wherein the route recommendation sequence is determined according to resources used by the route node when the data corresponding to the data capacity is transmitted, so that the data transmission efficiency can be ensured and the purpose of saving the resources can be achieved by transmitting the data through the determined route node.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification and are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description serve to explain the specification and not to limit the specification in a non-limiting sense. In the drawings:
fig. 1 is a schematic flow chart of a routing method provided in an embodiment of the present specification;
fig. 2 is a schematic flowchart of a service processing method provided in an embodiment of the present specification;
fig. 3 is a schematic flowchart of a service processing method provided in an embodiment of the present specification;
fig. 4 is a schematic structural diagram of a routing device provided in an embodiment of the present specification;
fig. 5 is a schematic structural diagram of a service processing apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device provided in an embodiment of this specification.
Detailed Description
In practical applications, there is a service in internet financial services, such as: in the payment service, when a user initiates a payment request to a server, several payment modes provided by the server can be checked on a payment page. At this time, the user needs to compare the several payment modes and select a relatively economically applicable payment mode for himself so as to achieve the purpose of saving cost. How to quickly determine the advantages and disadvantages of different payment methods becomes a problem to be solved so as to improve the user experience.
Based on this, the present specification provides a routing method, which receives a routing request sent by a user equipment, where the routing request includes data to be transmitted and a destination address; determining at least one routing node corresponding to a next hop of a path from the first routing node to the destination address according to a pre-stored routing table, and using the routing node as each second routing node; determining the data capacity of the data to be transmitted and a data capacity interval corresponding to the data capacity; for each second routing node, according to a pre-established data capacity interval, a corresponding relation between the routing node and a routing recommendation sequence and a determined data capacity interval, inquiring the second routing node corresponding to the determined data capacity interval in each second routing node as a designated routing node, and determining the routing recommendation sequence corresponding to the designated routing node, wherein the routing recommendation sequence is determined in advance according to resources used by the designated routing node when the designated routing node transmits data contained in the data capacity interval; and selecting one appointed routing node from the inquired appointed routing nodes according to the route recommendation sequence corresponding to the inquired appointed routing node, and forwarding the routing request to the selected appointed routing node.
When data is transmitted, the route recommendation sequence of the route node corresponding to the data capacity of the data to be transmitted is searched, and a proper route node is selected according to the route recommendation sequence, wherein the route recommendation sequence is determined according to resources used by the route node when the data corresponding to the data capacity is transmitted, so that the data transmission efficiency can be ensured and the purpose of saving the resources can be achieved by transmitting the data through the determined route node.
In the embodiments of the present description, the description of the route recommendation sequence may be understood as follows: the method is determined according to the amount of resources used by the routing node when the routing node transmits the data corresponding to the set data capacity. Different routing nodes use different resources when transmitting data corresponding to different data capacities.
The routing node described in the embodiments of the present specification determines in advance the data processing capacity of the routing node, that is, how much resource is used when processing data corresponding to a set data capacity.
Here, the payment service is taken as an example for explanation. If the service corresponding to the data to be transmitted is a payment service, determining a routing node corresponding to the transmission of the payment service, and selecting the routing node through a payment channel supported by the routing node and a commission charge rule corresponding to the payment channel.
In order to make the objects, technical solutions and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort belong to the protection scope of the present specification.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a routing method provided in an embodiment of the present specification. The method may be as follows.
Step 101: the first routing node receives a routing request sent by user equipment, wherein the routing request comprises data to be transmitted and a target address.
In the embodiments provided in this specification, when transmitting data, the user equipment carries the data to be transmitted in a routing request and sends the routing request to the routing node, and the routing node selects an appropriate next-hop routing node according to a destination address of data transmission, and forwards the routing request to the selected next-hop routing node.
The following describes how the first routing node selects the next hop routing node in detail.
Step 103: and determining at least one routing node corresponding to the next hop of the path from the first routing node to the destination address according to a pre-stored routing table, wherein the routing node is used as each second routing node.
In the embodiments provided in this specification, each routing node stores a routing table, and according to a destination address included in a routing request, a routing node corresponding to a next hop that is required to reach the destination address from a first routing node may be determined. Since there is more than one routing path from the first routing node to the destination address, there is also more than one next-hop routing node corresponding to the first routing node.
Step 105: and determining the data capacity of the data to be transmitted and a data capacity interval corresponding to the data capacity.
In the embodiments provided in this specification, the data capacity of the data to be transmitted is determined according to the data to be transmitted carried in the routing request; and obtaining a data capacity interval corresponding to the data capacity of the data to be transmitted according to the corresponding relation between the data capacity and the data capacity interval.
Optionally, determining the data capacity of the data to be transmitted and a data capacity interval corresponding to the data capacity specifically includes:
splitting the data capacity of the data to be transmitted to obtain at least two subdata capacities;
and determining a data capacity interval corresponding to each sub-data capacity according to the sub-data capacity.
Step 107: and for each second routing node, according to a pre-established data capacity interval, a corresponding relation between the routing node and the routing recommendation sequence and the determined data capacity interval, inquiring the second routing node corresponding to the determined data capacity interval in each second routing node to serve as a designated routing node, and determining the routing recommendation sequence corresponding to the designated routing node.
The route recommendation sequence is determined in advance according to resources used by the specified route node when the specified route node transmits the data contained in the data capacity interval.
In the embodiment provided in this specification, first, a correspondence relationship between a data capacity section, a routing node, and a route recommendation order is established in advance.
Specifically, in the first step, a routing node corresponding to a data capacity interval is determined according to a correspondence relationship between the data capacity interval and the routing node, which is established in advance.
It should be noted that a data capacity interval is determined in advance for each routing node. The data capacity intervals corresponding to different routing nodes may overlap.
The correspondence between the pre-established data capacity interval and the routing node specifically includes:
determining a routing node corresponding to each preset data capacity interval according to the corresponding relation between the preset data capacity interval and the routing node;
respectively determining resources used by different routing nodes when processing data corresponding to each data capacity in the preset data capacity interval aiming at each preset data capacity interval;
according to the determined resources, the preset data capacity interval is divided again;
and establishing a corresponding relation between the divided data capacity interval and the business routing node.
Optionally, the repartitioning of the preset data capacity interval according to the determined resources specifically includes:
determining resources used by different routing nodes when transmitting data corresponding to the data capacity aiming at each data capacity in the preset data capacity interval;
according to the determined resources used by different routing nodes in the process of transmitting the data corresponding to the data capacity, the preset data capacity interval is divided again;
the resource quantity ordering of the resources determined by the corresponding different routing nodes is consistent for the different data capacities in the same data capacity interval in the divided data capacity interval;
and different data capacity attributes in different data capacity intervals are different in the size ordering of the resource quantity of the resources determined by the corresponding different routing nodes.
And secondly, selecting a data capacity from the data capacity interval, and respectively determining resources used by each routing node when transmitting the data corresponding to the data capacity.
And thirdly, determining a route recommendation sequence of each route node corresponding to the data capacity interval according to the resource quantity of the resources, wherein the smaller the resource quantity corresponding to the route node is, the earlier the route recommendation sequence corresponding to the route node is.
And fourthly, establishing a corresponding relation among the data capacity interval, the routing nodes and the route recommendation sequence of each routing node.
Secondly, according to a data capacity interval which is established in advance and is determined by the corresponding relation between the routing node and the routing recommendation sequence, a designated routing node corresponding to the determined data capacity interval is inquired in each second routing node, and the routing recommendation sequence corresponding to the designated routing node is determined.
Step 109: and selecting one appointed routing node from the inquired appointed routing nodes according to the route recommendation sequence corresponding to the inquired appointed routing node, and forwarding the routing request to the selected appointed routing node.
In an embodiment provided by this specification, a specific routing node with the top routing order is selected from the queried specific routing nodes according to the routing recommendation order corresponding to the queried specific routing node.
Optionally, the data amount of the data to be transmitted is a payment amount; different second routing nodes correspond to different payment channels; the resource is a fee charged for the procedure.
By the routing method provided by the specification, when data is transmitted, the routing recommendation sequence of the routing node corresponding to the data capacity of the data to be transmitted is searched, and a proper routing node is selected according to the routing recommendation sequence, wherein the routing recommendation sequence is determined according to resources used by the routing node when the data corresponding to the data capacity is transmitted, so that the data transmission efficiency can be ensured and the purpose of saving the resources can be achieved by transmitting the data through the determined routing node.
Based on the same inventive concept, fig. 2 is a schematic flow chart of a service processing method provided in the embodiments of the present specification. The method may be as follows. The processing idea of the service processing method is the same as the principle of the routing method shown in fig. 1. I.e. the service handling request shown in fig. 2 corresponds to the routing request shown in fig. 1; a data capacity corresponding to the service attribute; the attribute interval corresponds to a data capacity interval; the service processing strategy corresponds to a second routing node; the recommendation order corresponds to a route recommendation order.
Step 201, receiving a service processing request sent by user equipment.
Wherein, the service processing request includes the service attribute of the service to be processed and the device identifier of the user equipment.
In the embodiments provided in this specification, a user sends a service processing request to a server through a user equipment used, where the service processing request includes a service attribute of a service to be processed.
The server receives a service processing request sent by the user equipment, and extracts the service attribute of the service to be processed from the service processing request.
It should be noted that the service attribute described in the embodiments of the present specification is used to characterize the service property of the service to be processed. If the service to be processed is a payment service, the service attribute of the payment service is the amount, i.e. the payment amount. Different payment amounts indicate different service attributes.
Step 203: and determining an attribute interval corresponding to the service attribute according to the service attribute.
In the embodiments provided in this specification, a correspondence between an attribute interval and a service attribute may be established in advance, that is, one attribute interval includes at least one service attribute.
Specifically, an attribute interval corresponding to the service attribute is determined according to the pre-established corresponding relationship and the service attribute of the service to be processed included in the received service processing request.
In another embodiment provided in this specification, the pre-establishing a correspondence between the attribute interval and the service processing policy specifically includes:
determining a service processing strategy corresponding to each preset attribute interval according to the corresponding relation between the preset attribute interval and the service processing strategy;
respectively determining resources used by different types of service processing strategies when the services corresponding to the service attributes in the preset attribute interval are processed aiming at the preset attribute interval;
according to the determined resources, the preset attribute interval is divided again;
and establishing a corresponding relation between the divided attribute interval and the service processing strategy. The corresponding relationship may be regarded as a corresponding relationship between the pre-established attribute interval and the service processing policy.
Specifically, determining a service processing policy corresponding to each preset attribute interval according to a corresponding relationship between the preset attribute interval and the service processing policy specifically includes:
and comparing different preset attribute intervals, and determining the service processing strategy corresponding to the same preset attribute interval.
For example: here, the payment service is taken as an example for explanation. In the payment service, the service attribute corresponds to the payment amount, and the service processing strategy corresponds to the payment mode and the procedure fee standard which should be received by using the payment mode. Suppose that the attribute interval preset by A is as follows: the corresponding set business processing policy is [ 0, ∞ ]: the fee is charged according to the a1 standard. B comprises B1, B2 and B3, wherein the attribute intervals preset by B1 are as follows: (0, 1000), the corresponding set service processing policy is: charging according to b1 standard of each percent; the attribute intervals preset by B2 include: the corresponding set service processing policy is: charging according to b2 standard of each percent; the attribute intervals preset by B3 include: the corresponding set business processing policy is [ 5000, ∞ ]: the fee is charged according to the a2 standard. C comprises C1, C2 and C3, wherein the attribute intervals preset by C1 are as follows: (0, 5000), the corresponding set service processing policy is: charging according to b3 standard of each percent; the attribute intervals preset by C2 include: (5000, 10000) correspondingly set service processing policy of charging according to b4 per pen, wherein the attribute interval preset by C3 has 10000 and infinity, and the correspondingly set service processing policy of charging according to a3 per pen.
Comparing A, B with the attribute interval preset by C, the following can be determined: the preset attribute interval comprises: [ 0,1000 ], [ 1000,5000 ], [ 5000,10000 ], [ 10000, ∞ ].
Then for [ 0,1000 ], the corresponding business processing policy is: a charges a fee according to a1 standard; b1 charges per B1 percent standard; c1 charges a fee per b3 percent standard;
for [ 1000,5000 ], the corresponding business processing policy is: a charges a fee according to a1 standard; b2 charges per B2 percent standard; c1 charges a fee per b3 percent standard;
for [ 5000,10000 ], the corresponding business processing policy is: a charges a fee according to a1 standard; b3 charges per a2 standard; c2 charges a fee per b4 percent standard;
for [ 10000, ∞ ] the corresponding business processing strategy is: a charges a fee according to a1 standard; b3 charges per a2 standard; c3 charges a fee per a3 standard.
It should be noted that A, B and C described herein correspond to different service processing methods, respectively, and if the service is a payment service, they correspond to different payment methods or payment routes, respectively.
Specifically, for each preset attribute interval, resources used by different types of service processing strategies when processing the service corresponding to each service attribute in the preset attribute interval are respectively determined.
The description is given by way of example. For the preset attribute interval [ 0,1000 ], respectively calculating A, B1 and C1 resources, i.e., procedure fees, to be charged when processing the service corresponding to each service attribute in the preset attribute interval. A is the fixed fee a 1; b1 and C1 are collected as a percentage of a repayment amount within 1000, B1 corresponds to M (i.e., a repayment amount less than 1000) B1; c1 corresponds to M (i.e. a repayment amount less than 1000) b 3.
Optionally, the repartitioning of the preset attribute interval according to the determined resources specifically includes:
determining resources used by different types of service processing strategies when processing services corresponding to the service attributes according to the service attributes in the preset attribute interval;
according to the resources used when the determined different types of service processing strategies process the services corresponding to the service attributes, the preset attribute interval is divided again;
the resource quantity ordering of the resources determined by the corresponding different types of service processing strategies is consistent for different service attributes located in the same attribute interval in the divided attribute intervals;
and different service attributes located in different attribute intervals, and the resource quantity of the resources determined by the corresponding different types of service processing strategies are ordered differently.
That is, when the attribute interval needs to be re-divided, there needs to be a service attribute that makes the two divided attribute intervals satisfy: the corresponding business processing strategies are the same, but the ordering results corresponding to the business processing strategies are different.
For example: for the preset attribute interval [ 0,1000 ], assuming that the service attribute is 500, a1 is 500 × b 1; assuming that the service attribute is 700, a1 is 700 × b 3.
It can be understood that: for the preset attribute interval of [ 0,1000 ], assuming that the determined service attribute is 500, in the attribute interval of [ 0,499 ], the resource amount of the resource determined by a is greater than the resource amount of the resource determined by B1, that is, the ordering result is A, B1; in the attribute interval [ 501,1000 ], the resource amount of the resource determined by a is smaller than the resource amount of the resource determined by B1, that is, the result of the ranking is B1 and a. Therefore, it can be determined that the service attribute 500 satisfies the condition of repartitioning [ 0,1000 ] of this preset attribute interval. This preset attribute interval of [ 0,1000 ] may be repartitioned by 500. It should be noted that 500 may belong to the attribute interval of [ 0,499 ], or belong to the attribute interval of [ 501,1000 ], which is not specifically limited herein.
Then the preset attribute interval can be subdivided into [ 0,500 ], [ 500, 700 ], and [ 700,1000 ] for [ 0,1000 ].
For other preset attribute intervals, whether the attribute interval needs to be subdivided or not can be judged according to the method.
Optionally, in an embodiment provided in this specification, determining, according to the service attribute, an attribute interval corresponding to the service attribute specifically includes:
splitting the service attributes to obtain at least two sub-service attributes;
and determining attribute intervals corresponding to the sub-service attributes respectively according to the sub-service attributes.
For the service attribute that can be split, in the embodiment provided in this specification, the service attribute of the service to be processed, which is included in the received service processing request, may be split to obtain a plurality of different sub-service attributes, and then an attribute interval corresponding to each sub-service attribute is determined according to the attribute interval that is established in advance.
For example: for a repayment service, a user sends a repayment service processing request, where the repayment service processing request includes a repayment amount, and the repayment amount may be regarded as a service attribute of the repayment service.
Specifically, when splitting the service attribute, splitting may be performed according to an attribute interval provided by the system. For example: if the repayment amount is 10000, the corresponding attribute intervals within the 10000 can be inquired, the repayment amount is divided into a plurality of sub-service attributes according to the inquired attribute intervals, and then the attribute intervals corresponding to the sub-service attributes are determined.
Step 205: and inquiring each service processing strategy corresponding to the determined attribute interval and the recommendation sequence corresponding to each service processing strategy according to the corresponding relation among the pre-established attribute interval, the service processing strategies, the recommendation sequences corresponding to the service processing strategies and the determined attribute interval.
And the recommendation sequence is determined in advance according to the resources used when the business corresponding to the business attribute contained in the business processing strategy processing attribute interval is processed.
In an embodiment provided in this specification, the correspondence between the pre-established attribute interval, the service processing policy, and the recommendation sequence corresponding to the service processing policy specifically includes:
determining a service processing strategy corresponding to the attribute interval according to a corresponding relation between the pre-established attribute interval and the service processing strategy;
selecting a service attribute from the attribute interval, and respectively determining the resources used by each service processing strategy when processing the service corresponding to the service attribute;
sequencing each business processing strategy according to the resource quantity of the resource;
determining the recommendation sequence of each service processing strategy corresponding to the attribute interval according to the sequencing result;
and establishing a corresponding relation among the attribute interval, the service processing strategies and the recommendation sequence of each service processing strategy.
The description is given by way of example. For the preset attribute interval [ 0,500 ], the determined service processing strategy includes: A. b1 and C1. A service attribute is selected from [ 0,500 ], where the selection of the service attribute may select the median value or the value closest to the maximum value (e.g., 499). This example will be described with reference to option 499.
The resource used by the C1 in processing the service corresponding to the service attribute 499, i.e. the procedure fee charged, is calculated A, B1 and C1 respectively. A is the fixed fee a 1; b1 is 499 x B1; c1 is 499 × b 3.
Comparing the sizes of a1, 499 b1 and 499 b 3; in the examples provided herein, since the content 500 × b1 is 700 × b3 as described above, it can be determined that b1 is greater than b3, yielding 499 × b3 < 499 × b 1; therefore, it can be determined that 499B 3 < 499B 1 < a1, which indicates that the recommended order of the business processing policy corresponding to the preset attribute interval is C1, B1, a [ 0,500 ].
After obtaining the recommendation sequence, establishing a corresponding relationship among the attribute interval, the service processing policy, and the recommendation sequence of the service processing policy, as shown in table 1:
TABLE 1
Figure BDA0002857986830000141
Figure BDA0002857986830000151
After the attribute interval is determined, the recommendation order of the service processing policy corresponding to the determined attribute interval can be obtained by querying the table 1.
Step 207: and selecting a target business processing strategy from the inquired business processing strategies according to the recommendation sequence.
In the embodiments provided in this specification, the execution subject for selecting the target business processing policy may be a server or a user equipment, and if the execution subject is a server, the server may select the target business processing policy from the queried business processing policies according to the set selection rules (for example, the selection rule is ranked most top) according to the recommendation order.
If the execution main body is the user equipment, the server sends the inquired business processing strategies and the recommendation sequence corresponding to the business processing strategies to the user equipment according to the equipment identification of the user equipment contained in the business processing request, so that a user using the user equipment can select the business processing strategies to be used from the business processing strategies according to the recommendation sequence.
In the embodiment provided in this specification, after querying the service processing policies and the recommendation sequences corresponding to the service processing policies, sending the queried service processing policies and the recommendation sequences corresponding to the service processing policies to the user equipment, and loading and displaying the service processing policies and the recommendation sequences corresponding to the service processing policies on the user equipment.
The description is given by way of example. Assuming that the determined attribute interval is [ 1000,5000 ], the corresponding contents of the line [ 1000,5000 ] in table 1, namely A, C1 and B2, can be pushed to the user equipment and loaded for display on the user equipment.
And selecting the service processing strategy to be used from the displayed contents by the user according to the contents loaded and displayed on the user equipment. If the service processing strategy and the recommendation sequence corresponding to the service processing strategy are displayed in a page display mode, a user can click the control corresponding to the selected service processing strategy to be regarded as sending the selected service processing strategy to be used to the server. And the server receives the strategy identification which is sent by the user equipment and corresponds to the service processing strategy selected by the user. Here, the service processing policy selected by the user is taken as the target service processing policy.
Step 209: and processing the service to be processed based on the selected target service processing strategy.
In an embodiment provided in this specification, a resource used by a target service processing policy when processing a service corresponding to a service attribute is determined based on the selected target service processing policy; and processing the service to be processed based on the resources.
For example: and calculating procedure cost which is corresponding to the repayment amount based on the selected target service processing strategy, and processing the residual repayment amount after deducting the procedure cost.
If the repayment amount is split in step 203, the procedure charges to be received corresponding to each split repayment amount are calculated respectively, and the remaining repayment amount is processed after each procedure charge is deducted respectively.
According to the technical scheme provided by the specification, when a service processing request sent by user equipment is received, an attribute interval corresponding to a service attribute is determined according to the service attribute of a service to be processed contained in the service processing request; according to the attribute interval, inquiring each service processing strategy corresponding to the determined attribute interval and a recommendation sequence corresponding to each service processing strategy according to the corresponding relation among the pre-established attribute interval, the service processing strategies and the recommendation sequences corresponding to the service processing strategies and the determined attribute interval, wherein the recommendation sequences are determined according to resources used when the service processing strategies process the services corresponding to the service attributes contained in the attribute interval; and selecting a target business processing strategy from the inquired business processing strategies according to the recommendation sequence, and processing the business to be processed based on the selected target business processing strategy.
When the service is processed, the recommendation sequence of the service processing strategy corresponding to the service attribute of the service to be processed needs to be searched, and a proper service processing strategy is selected according to the recommendation sequence, wherein the recommendation sequence is determined according to the resources used by the service processing strategy when the service is processed, so that the service is processed by using the service processing strategy, the processing efficiency of the service can be ensured, and the purpose of saving the resources can be achieved.
Based on the same inventive concept, fig. 3 is a schematic flow chart of a service processing method provided in the embodiments of the present specification. The method may be as follows. In the embodiments provided in this specification, how to establish a correspondence between an attribute interval, a service processing policy, and a recommendation order corresponding to the service processing policy is described in detail.
The server can establish a corresponding relation among the attribute interval, the service processing strategy and the recommendation sequence corresponding to the service processing strategy according to the attribute interval and the service processing strategy corresponding to the attribute interval which are provided in advance.
Specifically, first, the kind of the traffic handling policy is determined, and the traffic handling policy included in each type is determined.
The payment service is taken as an example for explanation. The types of business process policies described herein include charging a commission by a pen and charging a commission by a rate of transaction amounts.
Secondly, calculating the critical service attributes corresponding to different kinds of service processing strategies.
The critical service attribute is understood herein to mean that resources used by different kinds of service processing policies for processing the service corresponding to the critical service attribute are the same.
For example: the ratio of a1 to b1 was calculated by charging a commission by pen a1 and a commission by the ratio of the transaction amount b 1. The service attribute corresponding to the ratio is the critical service attribute.
Thirdly, dividing the service attribute according to the determined critical service attribute and the boundary service attribute of the preset attribute interval to obtain a plurality of different attribute intervals.
Assuming that the preset attribute interval includes [ 0, s1 ], [ 0, ∞ ], [ s1, s2 ], [ s3, s4 ], [ s4, ∞ ], the boundary service attribute is s1, s2, s3, s 4; assuming that the critical service attribute determined in the previous step is s0, service attributes from 0 to ∞ may be divided into a plurality of attribute intervals, such as [ 0, s0 ], [ s0, s1 ], [ s1, s2 ], [ s2, s3 ], [ s3, s4 ], [ s4, ∞ ].
Here, the boundary service attributes s1, s2, s3, s4, or sn have a continuity characteristic.
Fourthly, determining the business processing strategy corresponding to each attribute interval obtained by division.
Fifthly, selecting a service attribute from the attribute interval, and calculating the resource used by each service processing strategy when processing the service corresponding to the selected service attribute.
And sixthly, sequencing the service processing strategies according to the calculated resources, and determining the recommendation sequence of each service processing strategy according to the sequencing result.
And seventhly, establishing a corresponding relation among the attribute interval, the service processing strategy and the recommendation sequence corresponding to the service processing strategy.
The description is given by taking the contents of the above-described examples as examples. Suppose that the attribute interval preset by A is as follows: the corresponding set business processing policy is [ 0, ∞ ]: the fee is charged according to the a1 standard. B comprises B1, B2 and B3, wherein the attribute intervals preset by B1 are as follows: (0, 1000), the corresponding set service processing policy is: charging according to b1 standard of each percent; the attribute intervals preset by B2 include: the corresponding set service processing policy is: charging according to b2 standard of each percent; the attribute intervals preset by B3 include: the corresponding set business processing policy is [ 5000, ∞ ]: the fee is charged according to the a2 standard. C comprises C1, C2 and C3, wherein the attribute intervals preset by C1 are as follows: (0, 5000), the corresponding set service processing policy is: charging according to b3 standard of each percent; the attribute intervals preset by C2 include: (5000, 10000) correspondingly set service processing policy of charging according to b4 per pen, wherein the attribute interval preset by C3 has 10000 and infinity, and the correspondingly set service processing policy of charging according to a3 per pen.
In the first step, the types of the business processing strategies and the business processing strategies contained in each type are determined.
Collecting commission charge by pressing pen Charging a commission fee in a rate of transaction amount
Charging according to a1 standard Charging according to b1 per percent
Charging according to a2 standard Charging according to b2 per percent
Charging according to a3 standard Charging according to b3 per percent
Charging according to b4 per percent
And secondly, calculating the critical service attributes corresponding to the different types of service processing strategies.
Calculating the ratio of a1 to b1, b2, b3 and b4 respectively; calculating the ratio of a2 to b1, b2, b3 and b 4; calculating the ratio of a3 to b1, b2, b3 and b 4; resulting in 12 critical service attributes.
And thirdly, dividing 0 to infinity according to the determined 12 critical service attributes and the 3 boundary service attributes of 1000,5000 and 10000 to obtain 16 attribute intervals.
Fourthly, determining the business processing strategy corresponding to each attribute interval obtained by division.
Fifthly, selecting a service attribute from the attribute interval, and calculating the resource used by each service processing strategy when processing the service corresponding to the selected service attribute.
And sixthly, sequencing the service processing strategies according to the calculated resources, and determining the recommendation sequence of each service processing strategy according to the sequencing result.
And seventhly, establishing a corresponding relation among the attribute interval, the service processing strategy and the recommendation sequence corresponding to the service processing strategy.
Based on the same idea, the routing method provided in the embodiments of the present specification further provides a corresponding device, a storage medium, and an electronic device.
Fig. 4 is a schematic structural diagram of a routing device according to an embodiment of the present disclosure. The routing device comprises: a receiving unit 401, a determining unit 402, an inquiring unit 403 and a processing unit 404, wherein:
a receiving unit 401, configured to receive a routing request sent by a user equipment, where the routing request includes data to be transmitted and a target address;
a determining unit 402, configured to determine, according to a pre-stored routing table, at least one routing node corresponding to a next hop of a path from the first routing node to the destination address, as each second routing node; determining the data capacity of the data to be transmitted and a data capacity interval corresponding to the data capacity;
a query unit 403, configured to, for each second routing node, query, as a designated routing node, a second routing node corresponding to a determined data capacity interval in accordance with a pre-established data capacity interval, a correspondence between the routing node and a routing recommendation sequence, and the determined data capacity interval, and determine a routing recommendation sequence corresponding to the designated routing node, where the routing recommendation sequence is determined in advance according to a resource used by the designated routing node when transmitting data included in the data capacity interval;
and the processing unit 404 is configured to select one designated routing node from the queried designated routing nodes according to the routing recommendation sequence corresponding to the queried designated routing node, and forward the routing request to the selected designated routing node.
In another embodiment provided in this specification, the correspondence between the data capacity interval, the routing node, and the routing recommendation sequence, which is pre-established by the querying unit 403, specifically includes:
determining a routing node corresponding to the data capacity interval according to a corresponding relation between the pre-established data capacity interval and the routing node;
selecting a data capacity from the data capacity interval, and respectively determining resources used by each routing node when transmitting data corresponding to the data capacity;
determining a route recommendation sequence of each routing node corresponding to the data capacity interval according to the resource quantity of the resources, wherein the smaller the resource quantity corresponding to the routing node is, the earlier the route recommendation sequence corresponding to the routing node is;
and establishing a corresponding relation among the data capacity interval, the routing nodes and the route recommendation sequence of each routing node.
In another embodiment provided in this specification, the correspondence between the data capacity interval and the routing node, which is pre-established by the querying unit 403, specifically includes:
determining a routing node corresponding to each preset data capacity interval according to the corresponding relation between the preset data capacity interval and the routing node;
respectively determining resources used by different routing nodes when processing data corresponding to each data capacity in the preset data capacity interval aiming at each preset data capacity interval;
according to the determined resources, the preset data capacity interval is divided again;
and establishing a corresponding relation between the divided data capacity interval and the business routing node.
In another embodiment provided in this specification, the query unit 403, according to the determined resource, repartitioning the preset data capacity interval, specifically including:
determining resources used by different routing nodes when transmitting data corresponding to the data capacity aiming at each data capacity in the preset data capacity interval;
according to the determined resources used by different routing nodes in the process of transmitting the data corresponding to the data capacity, the preset data capacity interval is divided again;
the resource quantity ordering of the resources determined by the corresponding different routing nodes is consistent for the different data capacities in the same data capacity interval in the divided data capacity interval;
and different data capacity attributes in different data capacity intervals are different in the size ordering of the resource quantity of the resources determined by the corresponding different routing nodes.
In another embodiment provided in this specification, the determining unit 402 determines the data capacity of the data to be transmitted and a data capacity interval corresponding to the data capacity, specifically including:
splitting the data capacity of the data to be transmitted to obtain at least two subdata capacities;
and determining a data capacity interval corresponding to each sub-data capacity according to the sub-data capacity.
In another embodiment provided in this specification, the processing unit 404 selects, according to a routing recommendation sequence corresponding to the queried designated routing node, one designated routing node from the queried designated routing node, specifically including:
and selecting the appointed routing node with the most front routing sequence from the inquired appointed routing nodes according to the routing recommendation sequence corresponding to the inquired appointed routing node.
In another embodiment provided in this specification, the data amount of the data to be transmitted is a payment amount; different second routing nodes correspond to different payment channels; the resource is a fee charged for the procedure.
It should be noted that the routing device provided in the embodiment of the present disclosure may be implemented in a hardware manner, or may be implemented in a software manner, where the implementation manner is not specifically limited. When data is transmitted, the route recommendation sequence of the route node corresponding to the data capacity of the data to be transmitted is searched, and a proper route node is selected according to the route recommendation sequence, wherein the route recommendation sequence is determined according to resources used by the route node when the data corresponding to the data capacity is transmitted, so that the data transmission efficiency can be ensured and the purpose of saving the resources can be achieved by transmitting the data through the determined route node.
Fig. 5 is a schematic structural diagram of a service processing apparatus according to an embodiment of the present disclosure. The service processing device comprises: a receiving unit 501, a determining unit 502, an inquiring unit 503 and a processing unit 504, wherein:
a receiving unit 501, configured to receive a service processing request sent by a user equipment, where the service processing request includes a service attribute of a service to be processed and an equipment identifier of the user equipment;
a determining unit 502, configured to determine, according to the service attribute, an attribute interval corresponding to the service attribute;
a query unit 503, configured to query, according to a pre-established attribute interval, a service processing policy, and a corresponding relationship between recommendation sequences corresponding to the service processing policies and the determined attribute interval, each service processing policy corresponding to the attribute interval and a recommendation sequence corresponding to each service processing policy, where the recommendation sequence is determined in advance according to resources used when the service processing policy processes a service corresponding to a service attribute included in the attribute interval;
a processing unit 504, configured to select a target service processing policy from the queried service processing policies according to the recommendation order, and process the service to be processed based on the selected target service processing policy.
In another embodiment provided in this specification, the selecting, by the processing unit 504, a target business processing policy from the queried business processing policies according to the recommendation order specifically includes:
sending the inquired business processing strategies and the recommendation sequence corresponding to the business processing strategies to the user equipment according to the equipment identification of the user equipment contained in the business processing request, so that a user using the user equipment can select the business processing strategies to be used from the business processing strategies according to the recommendation sequence;
and receiving the service processing strategy selected by the user and sent by the user equipment, and taking the service processing strategy selected by the user as a target service processing strategy.
In another embodiment provided in the present specification, the service processing apparatus further includes a preprocessing unit 505, where: the preprocessing unit 505 pre-establishes a correspondence between an attribute interval, a service processing policy, and a recommendation sequence corresponding to the service processing policy, and specifically includes:
determining a service processing strategy corresponding to the attribute interval according to a corresponding relation between the pre-established attribute interval and the service processing strategy;
selecting a service attribute from the attribute interval, and respectively determining the resources used by each service processing strategy when processing the service corresponding to the service attribute;
determining the recommendation sequence of each service processing strategy corresponding to the attribute interval according to the resource quantity of the resource;
and establishing a corresponding relation among the attribute interval, the service processing strategies and the recommendation sequence of each service processing strategy.
In another embodiment provided in this specification, the correspondence between the attribute interval and the service processing policy, which is pre-established by the preprocessing unit 505, specifically includes:
determining a service processing strategy corresponding to each preset attribute interval according to the corresponding relation between the preset attribute interval and the service processing strategy;
respectively determining resources used by different types of service processing strategies when the services corresponding to the service attributes in the preset attribute interval are processed aiming at the preset attribute interval;
according to the determined resources, the preset attribute interval is divided again;
and establishing a corresponding relation between the divided attribute interval and the service processing strategy.
In another embodiment provided in this specification, the pre-processing unit 505 performs repartitioning on the preset attribute interval according to the determined resource, specifically including:
determining resources used by different types of service processing strategies when processing services corresponding to the service attributes according to the service attributes in the preset attribute interval;
according to the resources used when the determined different types of service processing strategies process the services corresponding to the service attributes, the preset attribute interval is divided again;
the resource quantity ordering of the resources determined by the corresponding different types of service processing strategies is consistent for different service attributes located in the same attribute interval in the divided attribute intervals;
and different service attributes located in different attribute intervals, and the resource quantity of the resources determined by the corresponding different types of service processing strategies are ordered differently.
In another embodiment provided in this specification, the determining unit 502 determines, according to the service attribute, an attribute interval corresponding to the service attribute, specifically including:
splitting the service attributes to obtain at least two sub-service attributes;
and determining attribute intervals corresponding to the sub-service attributes respectively according to the sub-service attributes.
In another embodiment provided in this specification, the processing unit 504 processes the service to be processed based on the selected target service processing policy, specifically including:
determining resources used by the target business processing strategy when the business corresponding to the business attribute is processed based on the selected target business processing strategy;
and processing the service to be processed based on the resources.
In another embodiment provided in this specification, the service attribute of the service to be processed is a payment service; the resource is a fee charged for the procedure.
It should be noted that the service processing device provided in this specification may be implemented in a hardware manner, or may be implemented in a software manner, where the implementation manner is not specifically limited. The method comprises the steps that corresponding relations among attribute intervals, service processing strategies and recommendation sequences corresponding to the service processing strategies are pre-established by the service processing equipment, and when a service processing request sent by user equipment is received, the attribute intervals corresponding to the service attributes are determined according to the service attributes of services to be processed contained in the service processing request; inquiring each service processing strategy corresponding to the attribute interval and a recommendation sequence corresponding to each service processing strategy according to the pre-established corresponding relation and the determined attribute interval, wherein the recommendation sequence is determined according to resources used when the service processing strategies process the services corresponding to the service attributes contained in the attribute interval; and selecting a target business processing strategy from the inquired business processing strategies according to the recommendation sequence, and processing the business to be processed based on the selected target business processing strategy. When the service is processed, the recommendation sequence of the service processing strategy corresponding to the service attribute of the service to be processed needs to be searched, and a proper service processing strategy is selected according to the recommendation sequence, wherein the recommendation sequence is determined according to the resources used by the service processing strategy when the service is processed, so that the service is processed by using the service processing strategy, the processing efficiency of the service can be ensured, and the purpose of saving the resources can be achieved.
The present specification also provides a computer readable storage medium storing a computer program which, when executed by a processor, is operable to perform the routing method provided in fig. 1 above.
Based on the routing method shown in fig. 1, the embodiment of the present specification further provides a schematic structural diagram of the electronic device shown in fig. 6. As shown in fig. 6, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, but may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs the computer program to implement the routing method described in fig. 1 above. When data is transmitted, the route recommendation sequence of the route node corresponding to the data capacity of the data to be transmitted is searched, and a proper route node is selected according to the route recommendation sequence, wherein the route recommendation sequence is determined according to resources used by the route node when the data corresponding to the data capacity is transmitted, so that the data transmission efficiency can be ensured and the purpose of saving the resources can be achieved by transmitting the data through the determined route node.
Of course, besides the software implementation, the present specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or Flash memory (Flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (10)

1. A routing method, comprising:
a first routing node receives a routing request sent by user equipment, wherein the routing request comprises data to be transmitted and a target address;
determining at least one routing node corresponding to a next hop of a path from the first routing node to the destination address according to a pre-stored routing table, and using the routing node as each second routing node;
determining the data capacity of the data to be transmitted and a data capacity interval corresponding to the data capacity;
for each second routing node, according to a pre-established data capacity interval, a corresponding relation between the routing node and a routing recommendation sequence and a determined data capacity interval, inquiring the second routing node corresponding to the determined data capacity interval in each second routing node as a designated routing node, and determining the routing recommendation sequence corresponding to the designated routing node, wherein the routing recommendation sequence is determined in advance according to resources used by the designated routing node when the designated routing node transmits data contained in the data capacity interval;
and selecting one appointed routing node from the inquired appointed routing nodes according to the route recommendation sequence corresponding to the inquired appointed routing node, and forwarding the routing request to the selected appointed routing node.
2. The method according to claim 1, wherein the pre-established correspondence between the data capacity interval, the routing node, and the routing recommendation sequence specifically includes:
determining a routing node corresponding to the data capacity interval according to a corresponding relation between the pre-established data capacity interval and the routing node;
selecting a data capacity from the data capacity interval, and respectively determining resources used by each routing node when transmitting data corresponding to the data capacity;
determining a route recommendation sequence of each routing node corresponding to the data capacity interval according to the resource quantity of the resources, wherein the smaller the resource quantity corresponding to the routing node is, the earlier the route recommendation sequence corresponding to the routing node is;
and establishing a corresponding relation among the data capacity interval, the routing nodes and the route recommendation sequence of each routing node.
3. The method of claim 2, wherein the pre-established correspondence between the data capacity interval and the routing node specifically comprises:
determining a routing node corresponding to each preset data capacity interval according to the corresponding relation between the preset data capacity interval and the routing node;
respectively determining resources used by different routing nodes when processing data corresponding to each data capacity in the preset data capacity interval aiming at each preset data capacity interval;
according to the determined resources, the preset data capacity interval is divided again;
and establishing a corresponding relation between the divided data capacity interval and the business routing node.
4. The method of claim 3, wherein repartitioning the preset data capacity interval according to the determined resources comprises:
determining resources used by different routing nodes when transmitting data corresponding to the data capacity aiming at each data capacity in the preset data capacity interval;
according to the determined resources used by different routing nodes in the process of transmitting the data corresponding to the data capacity, the preset data capacity interval is divided again;
the resource quantity ordering of the resources determined by the corresponding different routing nodes is consistent for the different data capacities in the same data capacity interval in the divided data capacity interval;
and different data capacity attributes in different data capacity intervals are different in the size ordering of the resource quantity of the resources determined by the corresponding different routing nodes.
5. The method according to claim 1, wherein determining the data capacity of the data to be transmitted and the data capacity interval corresponding to the data capacity specifically includes:
splitting the data capacity of the data to be transmitted to obtain at least two subdata capacities;
and determining a data capacity interval corresponding to each sub-data capacity according to the sub-data capacity.
6. The method according to claim 1, wherein selecting one designated routing node from the queried designated routing nodes according to a routing recommendation sequence corresponding to the queried designated routing node specifically comprises:
and selecting the appointed routing node with the most front routing sequence from the inquired appointed routing nodes according to the routing recommendation sequence corresponding to the inquired appointed routing node.
7. The method of claim 1, wherein the data amount of the data to be transmitted is a payment amount; different second routing nodes correspond to different payment channels; the resource is a fee charged for the procedure.
8. A routing device, comprising:
a receiving unit, configured to receive a routing request sent by user equipment, where the routing request includes data to be transmitted and a target address;
a determining unit, configured to determine, according to a pre-stored routing table, at least one routing node corresponding to a next hop of a path from the first routing node to the destination address, as each second routing node; determining the data capacity of the data to be transmitted and a data capacity interval corresponding to the data capacity;
a query unit, configured to query, for each second routing node, according to a pre-established data capacity interval, a correspondence between a routing node and a routing recommendation sequence, and a determined data capacity interval, the second routing node corresponding to the determined data capacity interval in each second routing node as a designated routing node, and determine a routing recommendation sequence corresponding to the designated routing node, where the routing recommendation sequence is determined in advance according to a resource used by the designated routing node when transmitting data included in the data capacity interval;
and the processing unit is used for selecting one appointed routing node from the inquired appointed routing nodes according to the route recommendation sequence corresponding to the inquired appointed routing node and forwarding the routing request to the selected appointed routing node.
9. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the routing method of any of the preceding claims 1 to 7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements the routing method of any of claims 1 to 7 when executing the program.
CN202011551254.4A 2020-12-24 2020-12-24 Routing method, device, medium and electronic equipment Pending CN112653624A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011551254.4A CN112653624A (en) 2020-12-24 2020-12-24 Routing method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011551254.4A CN112653624A (en) 2020-12-24 2020-12-24 Routing method, device, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112653624A true CN112653624A (en) 2021-04-13

Family

ID=75360169

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011551254.4A Pending CN112653624A (en) 2020-12-24 2020-12-24 Routing method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112653624A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105741088A (en) * 2016-01-27 2016-07-06 广州唯品会信息科技有限公司 Routing matching payment method and device
CN108399195A (en) * 2018-01-29 2018-08-14 阿里巴巴集团控股有限公司 The recommendation method and device of channel of disbursement
CN109242496A (en) * 2018-09-18 2019-01-18 北京三快在线科技有限公司 Prediction technique, device and the computer-readable medium of the means of payment
CN110705980A (en) * 2019-09-09 2020-01-17 平安普惠企业管理有限公司 Method, device and storage medium for processing transaction payment operation based on data analysis
CN111292433A (en) * 2020-02-06 2020-06-16 西安艾润物联网技术服务有限责任公司 Charging method, terminal device and storage medium
CN111626852A (en) * 2020-04-03 2020-09-04 中邮消费金融有限公司 Transaction management method and transaction management system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105741088A (en) * 2016-01-27 2016-07-06 广州唯品会信息科技有限公司 Routing matching payment method and device
CN108399195A (en) * 2018-01-29 2018-08-14 阿里巴巴集团控股有限公司 The recommendation method and device of channel of disbursement
CN109242496A (en) * 2018-09-18 2019-01-18 北京三快在线科技有限公司 Prediction technique, device and the computer-readable medium of the means of payment
CN110705980A (en) * 2019-09-09 2020-01-17 平安普惠企业管理有限公司 Method, device and storage medium for processing transaction payment operation based on data analysis
CN111292433A (en) * 2020-02-06 2020-06-16 西安艾润物联网技术服务有限责任公司 Charging method, terminal device and storage medium
CN111626852A (en) * 2020-04-03 2020-09-04 中邮消费金融有限公司 Transaction management method and transaction management system

Similar Documents

Publication Publication Date Title
CN107450979B (en) Block chain consensus method and device
CN107450981B (en) Block chain consensus method and equipment
CN113282659A (en) Data processing method and device based on block chain
CN108848244B (en) Page display method and device
CN113011483B (en) Method and device for model training and business processing
CN108694574B (en) Resource transfer channel processing method, device and equipment
CN109002357B (en) Resource allocation method and device and Internet of things system
CN110599307A (en) Commodity recommendation method and device
CN111881393A (en) Page rendering method, device, medium and electronic equipment
CN109345081B (en) Data acquisition method and device and electronic equipment
CN113641894A (en) Information recommendation method and device
CN110688223B (en) Data processing method and related product
CN112653624A (en) Routing method, device, medium and electronic equipment
CN116501927A (en) Graph data processing system, method, equipment and storage medium
CN111639269A (en) Site recommendation method and device
CN107562533B (en) Data loading processing method and device
CN115049263A (en) Construction method of distribution network
CN113344248A (en) Order allocation method, device, storage medium and electronic equipment
CN114077944A (en) Order allocation method and device, storage medium and electronic equipment
JP7133037B2 (en) Message processing method, device and system
CN108428189B (en) Social resource processing method and device and readable medium
CN113347110A (en) Flow control method, flow control device, storage medium and equipment
CN113343141A (en) Webpage obtaining method and device
CN113343085A (en) Information recommendation method and device, storage medium and electronic equipment
CN107704502B (en) Routing method, device, equipment and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210413

RJ01 Rejection of invention patent application after publication