Data routing method and device

Through the multi-level data routing method, it solves the problems of uneven data distribution and low query performance caused by random storage, achieves uniform storage and efficient query of data, reduces disk IO consumption, and has subsequent scalability.

CN110244902BActive Publication Date: 2024-09-20BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201810189709.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-03-08
Publication Date
2024-09-20
Estimated Expiration
2038-03-08

AI Technical Summary

Technical Problem

In the existing technology, the data routing process is random storage, which results in uneven data distribution and low query performance. As the amount of data increases, disk IO consumption is high and query efficiency is low.

Method used

Using a multi-level data routing method, by obtaining information about the data to be routed, sub-partitions are determined layer by layer based on layer indicator data, and the process is repeated until the specified conditions are met to achieve uniform storage and query of data.

Benefits of technology

It overcomes the problems of uneven data distribution and high disk IO, improves data storage and query efficiency, and achieves scalability and flexible configuration at subsequent levels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110244902B
    Figure CN110244902B
Patent Text Reader

Abstract

The present invention discloses a method and device for data routing, and relates to the technical field of computer technology. A specific implementation of the method includes the following steps: A. Obtaining information of data to be routed; B. Performing data routing at the first level according to the information of the data to be routed and the indicator data of the first level, and determining the sub-partition corresponding to the data to be routed; C. Setting the sub-partition as a new first level, and repeating step B until the specified conditions are met. This implementation overcomes the technical problems that the data routing storage process is random storage and data distribution is uneven, and avoids the defects that users do not have any rules when querying data, need to scan the data of all sharded data sources, resulting in high consumption of disk IO and low query performance, thereby achieving the beneficial effects of subsequent levels being expandable or flexibly configured, larger data source storage capacity, and querying data according to routing results, reducing the number of scans, and improving query efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for data routing. Background Art

[0002] The process of distributing the massive data to be stored to the computer storage device, or the process of consulting the data recorded in a certain storage location is called data routing. The prior art uses Java hard-coded random storage data to store the data in the data source.

[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0004] 1. The data routing storage process is random storage, which will lead to uneven data distribution.

[0005] 2. When the amount of randomly stored data increases, users need to query data from all sharded data sources without any rules when querying data, which will result in high disk IO consumption and low query performance. Summary of the invention

[0006] In view of this, an embodiment of the present invention provides a method and device for data routing, which stores or queries data according to different levels, can evenly store data, overcome the defects of high disk IO consumption and low query performance, and achieve the effect of scalability at the later level.

[0007] To achieve the above object, according to one aspect of an embodiment of the present invention, a data routing method is provided, comprising:

[0008] A. Obtain information about the data to be routed;

[0009] B. According to the information of the data to be routed and the indicator data at the first level, the first level performs data routing and determines the sub-partition corresponding to the data to be routed;

[0010] C. Set the sub-partition as the new first level and repeat step B until the specified conditions are met.

[0011] Preferably, satisfying the specified condition includes completing data routing of a fixed number of layers and / or the new first layer has no sub-partitions.

[0012] Preferably, the information of the data to be routed includes: field values ​​corresponding to each level;

[0013] The level indicator data include: item value;

[0014] Step B includes: determining the sub-partition corresponding to the first level based on the field value corresponding to the first level and the item value of the level.

[0015] Preferably, the data routing method is hash routing.

[0016] Preferably, when the designated location to which the data to be routed is routed is in the data source, the method further includes: determining the item value according to the number of shards;

[0017] When the designated location to which the data to be routed is routed is in the database, the method further includes: determining the item value according to the number of partitions.

[0018] According to another aspect of an embodiment of the present invention, a data routing device is provided, including:

[0019] A data information acquisition module, used in step A to acquire information of the data to be routed;

[0020] The routing parsing module is used in step B to perform data routing at the first level according to the information of the data to be routed and the indicator data of the first level, and determine the sub-partition corresponding to the data to be routed; it is also used in step C to set the sub-partition as the new first level, and repeat step B until the specified conditions are met.

[0021] Preferably, satisfying the specified condition includes completing data routing of a fixed number of layers and / or the new first layer has no sub-partitions.

[0022] Preferably, the information of the data to be routed includes: field values ​​corresponding to each level;

[0023] The level indicator data include: item value;

[0024] Step B includes: determining the sub-partition corresponding to the first level based on the field value corresponding to the first level and the item value of the level.

[0025] Preferably, the data routing method is hash routing.

[0026] Preferably, when the designated location to which the data to be routed is routed is in the data source, the method further includes: determining the item value according to the number of shards;

[0027] When the designated location to which the data to be routed is routed is in the database, the method further includes: determining the item value according to the number of partitions.

[0028] According to another aspect of an embodiment of the present invention, there is provided an electronic device for data routing, comprising:

[0029] one or more processors;

[0030] a storage device for storing one or more programs,

[0031] When the one or more programs are executed by the one or more processors, the one or more processors implement the data routing method.

[0032] According to another aspect of an embodiment of the present invention, there is provided a computer-readable medium having a computer program stored thereon, wherein the program implements a data routing method when executed by a processor.

[0033] One embodiment of the above invention has the following advantages or beneficial effects:

[0034] 1. Because of the use of multiple levels of routing technology, the defect of random storage in the data routing storage process is overcome, and the technical effect of subsequent level expansion or flexible configuration is achieved.

[0035] 2. Because each piece of data is routed through multiple levels and stored at the corresponding data source level, the technical problem of uneven data distribution is overcome, thereby achieving a technical effect of greater data source storage capacity.

[0036] 3. Because the data is stored in a multi-level routing method, it overcomes the defects of users having no rules when querying data, needing to scan the data of all shard data sources, resulting in high disk IO (input and output) consumption and low query performance, thereby achieving the beneficial effect of querying data according to routing results, reducing the number of scans and improving query efficiency.

[0037] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0039] Figure 1 is a schematic diagram of the main process of the data routing method according to an embodiment of the present invention;

[0040] Figure 2 is a schematic diagram of main modules of a data routing device according to an embodiment of the present invention;

[0041] Figure 3 is a schematic diagram of a specific embodiment of a data routing device according to an embodiment of the present invention;

[0042] Figure 4 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0043] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0045] Figure 1 is a schematic diagram of the main process of the data routing method according to an embodiment of the present invention, such as Figure 1 As shown, including:

[0046] A. Obtain information about the data to be routed;

[0047] B. According to the information of the data to be routed and the indicator data at the first level, the first level performs data routing and determines the sub-partition corresponding to the data to be routed;

[0048] C. Set the sub-partition as the new first level and repeat step B until the specified conditions are met.

[0049] The present invention adopts a method of data routing at multiple levels to route data, so as to achieve the beneficial effect of being able to be evenly stored in a pre-stored location and convenient to query, and greatly improving the storage and query efficiency. The data routing method is divided into two parts: a data storage method and a data query method: the data storage method is to find the location to be stored through a series of algorithms based on the information of the data to be routed, so that the data can be stored in the corresponding location; the data query method is to find the location of the data storage through an algorithm corresponding to the data storage based on the information of the data to be queried, so that the data at the corresponding location can be queried. The data query method is determined by the data storage method, so the data storage and data query methods are the same. In this embodiment, the storage and query methods are combined into a data routing method for explanation. The embodiment of the method can overcome the defects that the data routing of the prior art is unevenly distributed due to random and irregular storage, and the data source data of all shards needs to be scanned when querying, resulting in high consumption of disk IO and low query performance.

[0050] In this embodiment, each time data is routed, it is routed layer by layer according to the pre-set indicator data of multiple layers. The routing position is divided according to a certain standard, and the position set obtained after the standard division is called a level. Different levels can be obtained according to different standards for dividing the routing positions. The level division standards include but are not limited to: expansion according to business characteristics and / or division according to the distribution of physical storage devices. In this embodiment, the set consisting of multiple levels of routing data to be routed is called a level set. The data to be routed is routed according to the indicator data of the first level in the preset level set. According to the results obtained, the sub-partition corresponding to the data to be routed on the first level can be determined. The obtained sub-partition is set as the new first level, and iterative data routing is performed until the specified conditions of the iteration are met, and the iteration is stopped.

[0051] When the information of the data to be routed completes the data routing of all the layers in the layer set, the data to be routed is routed to a new layer without sub-partitions. This step avoids the technical defects of the prior art that a large amount of disk IO is required during query due to random storage and the query performance is poor, thereby achieving the beneficial effect of storing data regularly and evenly in the storage device and accurately locating the data when querying it.

[0052] Preferably, satisfying the specified condition includes completing data routing of a fixed number of layers and / or the new first layer has no sub-partitions.

[0053] When determining whether all the level routing in the level set is completed, it is optional to determine whether the routing is completed based on whether the number of levels traversed by the data to be routed is the same as the number of levels in the level set. When the determination result is the same, it can be considered that all level routing is completed. Because the levels iterated by the data routing are routed in sequence according to the order of the levels in the multiple levels, it is also possible to determine whether the data routing is completed based on whether the new first level of the iteration has a sub-partition.

[0054] Preferably, the information of the data to be routed includes: field values ​​corresponding to each level;

[0055] The level indicator data include: item value;

[0056] Step B includes: determining the sub-partition corresponding to the first level based on the field value corresponding to the first level and the item value of the level.

[0057] The setting of indicator data at each level can facilitate the routing of the information of the data to be routed at each level, that is, when the information of the data to be routed is routed at a certain level, the field value of the information of the data to be routed and the corresponding item value of the level are used for routing. By setting the indicator data at each level, the data routing is stored according to a unified algorithm, thereby achieving the beneficial effects of fast storage and easy query.

[0058] Since the stored target data needs to be routed according to certain rules before being stored or queried, the beneficial effects of uniform distribution and real-time query are achieved. In this embodiment, field values ​​and item values ​​are selected for data routing to prevent the defects of random storage or query, which requires sequential scanning and querying, consumes disk IO, and has a slow query speed, thereby preventing uneven data storage and achieving the beneficial effect of real-time data query.

[0059] Preferably, the data routing method is hash routing.

[0060] In the embodiment of the method, the data to be routed is preferably stored in the location after the information routing of the data to be routed through the hash algorithm through hash routing. Since hash routing is a function that compresses target data of any length into a fixed length, the target data can be evenly stored in the storage device.

[0061] Preferably, when the designated location to which the data to be routed is routed is in the data source, the method further includes: determining the item value according to the number of shards;

[0062] When the designated location to which the data to be routed is routed is in the database, the method further includes: determining the item value according to the number of partitions.

[0063] Since the existing classic storage devices are configured for distributed storage, when querying, quickly determining which part the data is stored on is a preferred step to improve the query speed. When the data is stored on the data source, it is necessary to determine which shard the data is on. Therefore, the embodiment of the present method determines the item value based on the number of shards to determine the shard of the route. Similarly, when the data is stored on the database, it is necessary to determine which partition the data is on, so the embodiment of the present method determines the item value based on the number of partitions to determine the partition of the route the data is on.

[0064] like Figure 2 FIG. 1 is a schematic diagram of main modules of a data routing device according to an embodiment of the present invention. Figure 2 As shown, a data routing device 200 is provided, comprising:

[0065] Data information acquisition module 201, used in step A to acquire information of data to be routed;

[0066] The routing parsing module 202 is used in step B to perform data routing at the first level according to the information of the data to be routed and the indicator data of the first level, and determine the sub-partition corresponding to the data to be routed; it is also used in step C to set the sub-partition as the new first level, and repeat step B until the specified conditions are met.

[0067] The data information acquisition module 201 transmits the acquired information of the data to be routed to the routing analysis module, and performs iterative routing through the indicator data of the layer in the routing analysis module 202. Through the layer-by-layer routing of the routing analysis module, the location to which the data to be routed should be routed is found. With the settings of these two modules, the data is evenly distributed on the storage according to the routing at different levels, thereby achieving the beneficial effect of real-time query.

[0068] Preferably, satisfying the specified condition includes completing data routing of a fixed number of layers and / or the new first layer has no sub-partitions.

[0069] Preferably, the information of the data to be routed includes: field values ​​corresponding to each level;

[0070] The level indicator data include: item value;

[0071] Step B includes: determining the sub-partition corresponding to the first level based on the field value corresponding to the first level and the item value of the level.

[0072] Preferably, the data routing method is hash routing.

[0073] Preferably, when the designated location to which the data to be routed is routed is in the data source, the method further includes: determining the item value according to the number of shards;

[0074] When the designated location to which the data to be routed is routed is in the database, the method further includes: determining the item value according to the number of partitions.

[0075] Figure 3 FIG. 1 is a schematic diagram of a specific embodiment of a data routing device according to an embodiment of the present invention. Figure 3As shown, when the device of the present invention is used in the logistics industry, the data to be routed is a production message. The production message is received asynchronously using the message queue technology. The location for storing the production message uses the ElasticSearch (ES) data source, which can be divided into X index tables according to the physical business area, specifically, the value of X is 7; according to the shard division, each index table can be divided into Y shards, specifically, the value of Y is 32, then the Nth level routing in the figure is the second level routing. According to the above division criteria, the routing configuration entity class and the routing configuration item file can be set in the routing parsing module in advance. Among them, the routing configuration entity class defines all the configuration item attributes used for routing; the routing configuration item file saves the values ​​of all the configuration item attributes defined in the routing configuration entity class, including: the item value of each level. The field values ​​of the two levels in this embodiment are: area code and site code, respectively, and the item values ​​correspond to the two levels in this specific embodiment: the number of index tables and the number of shards, respectively. After the routing configuration entity class and the routing configuration item file are configured, the data can be routed according to the routing executor when the data is routed. When the level needs to be added, reduced or changed, the routing configuration entity class and routing configuration item file can be adjusted to achieve flexible configuration effects.

[0076] When routing the information of the relevant level of the production message, specifically, the area code is 737, the total number of index tables X is 7, and the information of the data to be routed can be mapped to an index table numbered 0-6 through hash routing, that is, the index table numbered 2. On this basis, the index table numbered 2 is set as the new first level, the site code is obtained as 14695, the total number of shards Y is 32, and the information of the data to be routed can be mapped to a shard numbered 0-31 through hash routing, that is, the shard numbered 7. The production message is routed to the 7th shard on the index table numbered 2 of the ES data source.

[0077] The steps for querying production message data are the same as the steps for storage, which is to route the information of the data to be queried related to the level data through multiple levels to the precise location where the required information is stored, so as to query the content corresponding to the precise location.

[0078] Figure 4 An exemplary system architecture 400 is shown to which the data routing method or data routing apparatus according to the embodiment of the present invention can be applied.

[0079] like Figure 4As shown, system architecture 400 may include terminal devices 401, 402, 403, network 404 and server 405. Network 404 is used to provide a medium for communication links between terminal devices 401, 402, 403 and server 405. Network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0080] Users can use terminal devices 401, 402, 403 to interact with server 405 through network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, 403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0081] The terminal devices 401 , 402 , and 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0082] The server 405 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 401, 402, and 403. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.

[0083] It should be noted that the data routing method provided in the embodiment of the present invention is generally executed by the server 405 , and accordingly, the data routing device is generally disposed in the server 405 .

[0084] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0085] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0086] like Figure 5As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0087] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0088] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.

[0089] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0090] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0091] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor includes a sending module, an acquisition module, a determination module, and a first processing module. The names of these modules do not, in some cases, constitute a limitation on the unit itself. For example, the sending module may also be described as a "module for sending a picture acquisition request to the connected server."

[0092] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: A. obtaining information of data to be routed; B. performing data routing on the indicator data of the first layer of the information of the data to be routed, and determining the sub-partition corresponding to the data to be routed; C. setting the sub-partition as a new first layer, and repeating step B until the specified condition is met.

[0093] According to the technical solution of the embodiment of the present invention, the following beneficial effects are achieved:

[0094] 1. Because of the use of multiple levels of routing technology, the process of data routing storage is overcome as random storage, and the technical effect of subsequent level expansion or flexible configuration is achieved.

[0095] 2. Because each piece of data is routed through multiple levels and stored at the corresponding data source level, the technical problem of uneven data distribution is overcome, thereby achieving the technical effect of greater data source storage capacity.

[0096] 3. Because the data is stored in a multi-level routing method, it overcomes the defects of users having no rules when querying data, needing to scan the data of all shard data sources, resulting in high disk IO (input and output) consumption and low query performance, thereby achieving the beneficial effect of querying data according to routing results, reducing the number of scans and improving query efficiency.

[0097] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A data routing method, characterized in that: include: A. Obtain information about the data to be routed; B. Perform data routing at the first level according to the information of the data to be routed and the indicator data at the first level, and determine the sub-partition corresponding to the data to be routed; C. setting the sub-partition as a new first level, and repeating step B until the specified condition is met; The information of the data to be routed includes: field values ​​corresponding to each level; the indicator data includes: item values; in step B, the sub-partition corresponding to the level is determined according to the field value corresponding to the first level and the item value of the level; The satisfying of the specified conditions includes completing data routing at a fixed number of levels and / or the new first level having no sub-partitions; the method also includes: when the specified location to which the data to be routed is routed is in the data source, determining the item value according to the number of shards; when the specified location to which the data to be routed is routed is in the database, determining the item value according to the number of partitions.

2. The method according to claim 1, characterized in that: The data routing method is hash routing.

3. A data routing device, characterized in that: include: A data information acquisition module, used in step A to acquire information of the data to be routed; A routing parsing module, used in step B to perform data routing at the first level according to the information of the data to be routed and the indicator data at the first level, and determine the sub-partition corresponding to the data to be routed; Also used in step C to set the sub-partition as a new first level, and repeating step B until a specified condition is met; The information of the data to be routed includes: field values ​​corresponding to each level; the indicator data includes: item values; in step B, the sub-partition corresponding to the level is determined according to the field value corresponding to the first level and the item value of the level; The satisfying of the specified conditions includes completing data routing at a fixed number of levels and / or the new first level having no sub-partitions; the device also includes: when the specified location to which the data to be routed is routed is in the data source, determining the item value according to the number of shards; when the specified location to which the data to be routed is routed is in the database, determining the item value according to the number of partitions.

4. The device according to claim 3, characterized in that: The data routing method is hash routing.

5. An electronic device for data routing, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-2.

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