CN112165430B - Data routing method, device, equipment and storage medium - Google Patents
Data routing method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN112165430B CN112165430B CN202011016405.6A CN202011016405A CN112165430B CN 112165430 B CN112165430 B CN 112165430B CN 202011016405 A CN202011016405 A CN 202011016405A CN 112165430 B CN112165430 B CN 112165430B
- Authority
- CN
- China
- Prior art keywords
- data
- module
- routing
- service
- service module
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 103
- 238000004891 communication Methods 0.000 claims abstract description 23
- 230000008569 process Effects 0.000 claims description 45
- 238000012795 verification Methods 0.000 claims description 23
- 230000015654 memory Effects 0.000 claims description 19
- 238000013507 mapping Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 10
- 238000004590 computer program Methods 0.000 description 7
- 238000012545 processing Methods 0.000 description 6
- 101100055496 Arabidopsis thaliana APP2 gene Proteins 0.000 description 5
- 101100016250 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) GYL1 gene Proteins 0.000 description 5
- 238000011161 development Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 230000003993 interaction Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012827 research and development Methods 0.000 description 3
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 239000000243 solution Substances 0.000 description 2
- 101150053844 APP1 gene Proteins 0.000 description 1
- 101100264195 Caenorhabditis elegans app-1 gene Proteins 0.000 description 1
- 101100189105 Homo sapiens PABPC4 gene Proteins 0.000 description 1
- 102100039424 Polyadenylate-binding protein 4 Human genes 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000002347 injection Methods 0.000 description 1
- 239000007924 injection Substances 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- YZMCKZRAOLZXAZ-UHFFFAOYSA-N sulfisomidine Chemical compound CC1=NC(C)=CC(NS(=O)(=O)C=2C=CC(N)=CC=2)=N1 YZMCKZRAOLZXAZ-UHFFFAOYSA-N 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/14—Routing performance; Theoretical aspects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
- H04L63/123—Applying verification of the received information received data contents, e.g. message integrity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3247—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
Abstract
The application discloses a data routing method, a device, equipment and a storage medium, which relate to the technical field of computers, in particular to the fields of inter-process communication, data routing and the like. The specific implementation scheme is as follows: receiving first data from a first service module; analyzing the first data according to a preset routing protocol to obtain target module information; and forwarding the first data to a second service module corresponding to the target module information. According to the embodiment of the application, the data of the service module is forwarded based on the routing protocol, so that the resource occupation of a system can be reduced, the access cost is reduced, and the joint debugging difficulty is reduced.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to the fields of cross-process communications, data routing, and the like.
Background
The cross-process communication may mainly include: in the same system, information is propagated or exchanged between processes of different modules. In a multi-module system, the traditional implementation is a CS architecture. Communication is typically established directly by a Server (Server) side and a Client (Client) side. However, in a multi-module system, there is a more complex scenario, for example, one module communicates with N modules, there is a relationship of 1 to N, or one module is both a server and a client. The N-to-N communication mode of the traditional mode is used in the scene, and the problems of high access cost, high joint debugging difficulty and the like exist.
Disclosure of Invention
The application provides a data routing method, a data routing device, data routing equipment and a storage medium.
According to an aspect of the present application, there is provided a data routing method, including:
receiving first data from a first service module;
analyzing the first data according to a preset routing protocol to obtain target module information;
and forwarding the first data to a second service module corresponding to the target module information.
According to another aspect of the present application, there is provided a data routing apparatus, including:
the receiving unit is used for receiving the first data from the first service module;
the analyzing unit is used for analyzing the first data according to a preset routing protocol to obtain target module information;
and the sending unit is used for forwarding the first data to a second service module corresponding to the target module information.
According to another aspect of the present application, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described above.
According to another aspect of the present application, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method as described above.
According to another aspect of the present application, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a method as described above.
According to the embodiment of the application, the data of the service module is forwarded based on the routing protocol, so that the resource occupation of a system can be reduced, the access cost is reduced, and the joint debugging difficulty is reduced.
It should be understood that the description of this section is not intended to identify key or critical features of the embodiments of the application or to delineate the scope of the application. Other features of the present application will become apparent from the description that follows.
Drawings
The drawings are for better understanding of the present solution and do not constitute a limitation of the present application. Wherein:
fig. 1 is a flow chart of a data routing method according to an embodiment of the present application.
Fig. 2 is a flow chart of a data routing method according to another embodiment of the present application.
Fig. 3 is a flow chart of a data routing method according to another embodiment of the present application.
Fig. 4 is a schematic architecture diagram of an application scenario.
Fig. 5 is a logic flow diagram of a routing node.
Fig. 6 is a schematic diagram of N modules in direct communication with N modules.
Fig. 7 is a schematic diagram of 2N modules in communication with a routing module.
Fig. 8 is a block diagram of a data routing device according to an embodiment of the present application.
Fig. 9 is a block diagram of a datapath device according to another embodiment of the present application.
Fig. 10 is a block diagram of an electronic device for implementing a data routing method of an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a flow chart of a data routing method according to an embodiment of the present application. The method may include:
s11, receiving first data from a first service module.
S12, analyzing the first data according to a preset routing protocol to obtain target module information.
S13, forwarding the first data to a second service module corresponding to the target module information.
For example, multiple business modules may be run in the same system, such as the operating system of a device. There may be data interactions between the business modules. In the system, a routing module can be arranged, and data of one service module is forwarded to another service module by establishing a data channel between the routing module and each service module. The routing module may analyze the data received from the first service module by using a preset routing protocol, obtain information such as an address or an identifier of the target module to be forwarded, and forward the data to the target module, for example, the second service module. The first service module that needs to forward data may be referred to as a client or a transmitting end, and the second service module that needs to receive data may be referred to as a server or a receiving end. Some traffic modules may be full duplex, may transmit data in some cases, and may receive data in some cases, and may act as both clients and servers. Such service modules may also be referred to as C/S service modules, C/S service nodes, C/S logical nodes, etc.
For example, a plurality of APPs (applications) installed in the same terminal device such as a mobile phone are C/S service modules. There may be data exchange between two APPs. Suppose data D1 through APP2 need to be transferred from APP 1. The routing module can receive the data D1 from the APP1 first, and obtain the information of the APP2 after analyzing the data D1 based on the routing protocol. The routing module then sends data D1 to APP2 based on the information of APP2. After APP2 receives D1, some processing may be performed using D1 to obtain some new data D2.
According to the embodiment of the application, the data of the service module is forwarded based on the routing protocol, so that the resource occupation of a system can be reduced, the access cost is reduced, and the joint debugging difficulty is reduced.
Fig. 2 is a flow chart of a data routing method according to another embodiment of the present application. The data routing method of this embodiment may include the steps of the above-described embodiments. In this embodiment, the receiving, by S11 of the method, the first data of the first service module may include:
s21, the first data of the process from the first service module is received through a data channel between the routing module and the first service module.
Illustratively, in the same system, a data channel is established between the routing module and each traffic module. The routing module may receive first data of a process of the first traffic module through the data channel. Thus, in cross-process communication, data forwarding can be achieved through the routing module. Therefore, the number of data channels and the number of joint debugging can be reduced, the resource occupation of a system is reduced, the access cost is reduced, and the joint debugging difficulty is reduced.
For example, the first service module and the second service module may implement data transceiving through a process. The process of the first service module sends the data to the process of the routing module, and the process of the routing module forwards the data to the process of the second service module.
In this embodiment, forwarding, by S13, the first data to the second service module corresponding to the target module information may include:
s23, forwarding the first data to the process of the second service module corresponding to the target module information through a data channel between the routing module and the second service module.
For example, the process of the routing module may forward the first data to the process of the second traffic module through a data path between the routing module and the second traffic module.
According to the embodiment of the application, the data of the service module is forwarded based on the routing protocol through the data channel between the routing module and the service module, so that the resource occupation of the system can be reduced. For example, a data channel is not required to be established between every two service modules, and data passing can be established between the service modules and the routing module, so that the data channel can be reduced, the multiplexing rate of the data channel can be improved, and the access cost is low. For another example, joint debugging is not needed for every two service modules, and joint debugging can be performed for the service modules and the routing modules, so that the number of joint debugging can be reduced, the joint debugging difficulty is reduced, the joint debugging cost is reduced, the research and development efficiency is improved, and the development difficulty and the maintenance cost are reduced.
Fig. 3 is a flow chart of a data routing method according to another embodiment of the present application. The data routing method of this embodiment may include the steps of the method embodiments described above. In this embodiment, the method may further include:
s31, searching the second service module corresponding to the target module information in a plurality of service modules connected with the routing module.
For example, after the process of the routing module receives the first data of the process of the first service module, the first data may be parsed to obtain the target module information. And then searching a second service module corresponding to the information of the determined target module in a plurality of service modules connected with the routing module. And forwarding the first data to the process of the second service module through a data channel between the routing module and the second service module. Therefore, the receiving end can be accurately found, and data forwarding is realized.
In this embodiment, the method may further include:
s41, receiving second data processed by the first data by the process of the second service module;
s42, returning the second data to the process of the first business module.
For example, the process of the second service module performs required processing on the first data received from the process of the routing module to obtain second data. The process of the second service module may return the second data to the process of the routing module, and then return to the process of the first service module via the process of the routing module.
The routing module can return the data processed by the receiving end to the transmitting end, so that the complete data processing process is rapidly realized.
In this embodiment, the method may further include:
s51, carrying out integrity check and/or security check on the first data, and carrying out a route forwarding step on the first data passing the check, for example, carrying out the route forwarding step of the S13. For another example, the route forwarding step of S23 is performed.
The routing module may perform an integrity check and/or a security check on the received first data, and if the check passes, forward the first data to the corresponding second traffic module. If the data is not checked, the first data can be discarded, and information that the data check is not checked can also be returned to the first service module. In this way, the first service module may send the first data to the routing module again, or send other data that needs to be forwarded.
For example, the mapping rule is used for verification, the mapping rule may include a corresponding relationship between the sending end and the receiving end, the first data of the sending end is parsed to obtain information of the target module, and whether the information of the target module is consistent with the receiving end corresponding to the sending end in the mapping rule is verified.
For another example, it is checked whether the first data in the data packet is complete, corrupted, or missing.
For another example, the signature algorithm of the APK is utilized to sign the data, so as to obtain the packet name of the data packet, and then, whether the packet name of the data packet accords with the preset packet name is checked. Thus, the disguised service module can be prevented from being accessed, and the safety is improved.
According to the embodiment of the application, the routing module is used for checking the data, so that the controllability and the safety can be improved.
In an application scenario, if an N-to-N scheme is adopted in the data communication of multiple modules under the same system. N modules serve as a server side, N modules serve as a client side, and part of modules simultaneously serve as the server side and the client side. During communication, the client establishes communication channel directly with the server and performs data transmission and exchange. Using an N-to-N approach, N modules need to be docked in terms of a single module. In the development stage, the development difficulty is high, and the access cost is high. In the data flow process, if an interception mechanism and a verification mechanism are not provided, the problems of low controllability and weaker safety exist. In the debugging stage, the related modules are too many, so that joint debugging is difficult, and the maintenance cost is high.
The data routing method can complete data transmission and exchange among multiple modules in a new mode, and has the characteristics of high expandability, low access cost, strong controllability, high safety and the like.
The data routing method of the embodiment of the application is a multi-module data routing scheme. The scheme can be designed and realized on the basis of cross-process communication, and the multiplexing of the communication links can greatly reduce the consumption of system resources. In this embodiment, it is assumed that a service module in a system is a C/S node, and a routing module is a routing node, and the routing node through the core performs a data forwarding task in the whole operation process. Therefore, stability of the routing node is important. As shown in fig. 4, in this embodiment, the following parts may be mainly included:
(1) C/S node: in this embodiment of the present application, the service node may take the roles of a Server (Server) and a Client (Client), so that the two roles may be integrated into one service node role, and the service node cooperates with a routing node to forward data to other service nodes, thereby implementing data propagation and exchange. The C/S nodes may also be referred to as C/S service nodes, C/S logical nodes, etc.
(2) Routing node: the routing node may be responsible for forwarding data. The routing node may store and record a predetermined protocol, such as a routing protocol, and may be capable of parsing the data packet according to the protocol. The routing node analyzes the data packet to obtain the target node identification therein, finds the target node in the C/S node data accessed to the routing node, forwards the data, and completes the routing of the data.
Based on the division of the above nodes, a complete data transfer is completed, and a routing protocol needs to be preset, where the protocol is mainly a distribution protocol, and is used to inform the routing node that the routing node needs to forward data to the target C/S service node. After the target C/S node finishes logic processing, the processed data is fed back to the request C/S service node through the routing node, so that a preset data request task is completed.
The protocol may be formulated based on general business logic, e.g., a base protocol is formulated based on base business logic. Business logic may include that an upper layer business module requires at least one basic capability in operation. For example, business logic may include, but is not limited to, account number, activation, voice, location, and the like capabilities. The routing protocol may include format information for the data that the traffic module needs to forward. For example: when the hotel module obtains account information from the account, the data packet sent by the hotel module to the routing module has a certain format. The data packet that can be defined for transmission by the protocol contains the following fields Domian, intent, data, examples of which are as follows:
domain Account, used to distinguish the basic capability types.
Intent, getAccountInfo, interface method for differentiating basic capability provisioning.
Data, for providing additional parameters provided when retrieving Data to the underlying capabilities.
In addition, to ensure the expandability of the scheme, an interface of a custom protocol can be reserved, and an access party, such as a C/S service node of an access routing node, is allowed to custom-define a relevant protocol injection system through a preset interface. For example, custom protocols need to conform to the definition of the underlying protocol, including fields Domain, intent, data, etc. Custom protocols conforming to this definition may be added to the routing system.
Since the routing node is added in the process of data transmission, the operability is greatly enhanced. In order to ensure data security, the routing node not only can carry out data distribution, but also can carry out authority verification. For example, a permission check node is added in the routing node, only the C/S node meeting the conditions is allowed to access the system, and the access controllability of the system is ensured. The following are some examples of compliance. For example, the packet name of a node joining the routing system may be checked to determine that the node is eligible. For another example, signature information of a packet of a node joining the routing system may be checked to determine that the node meets the condition.
In addition, the routing node can carry out data integrity check and security check on the received data of the C/S node, and the integrity and security of the data can be ensured only through the data conforming to the protocol conditions.
For example, as shown in fig. 5, an exemplary logic flow of data routing may include: after receiving the data to be forwarded of the service node (transmitting end), the routing node performs data analysis (S501). And performing authority verification on the analyzed data (S502) to determine the integrity and the security of the data. If the verification is passed, the information of the target node to which the data needs to be forwarded can be obtained by analysis. Then, from the information of the plurality of service nodes connected to the routing node, it is searched whether or not the information of the target node exists (S503). If so, the routing node forwards the data to the target node (receiving end). In this embodiment of the present application, the sending end and the receiving end may belong to different processes, and cross-process communication is implemented through the routing node.
According to the embodiment of the application, the resource occupation of the system can be effectively reduced, the number of the data channels can be reduced, and the multiplexing rate of the data channels is improved. For example, in a scenario where inter-process communication is performed between N modules, in a case where inter-module direct communication is performed, each module needs to establish data passing with other service modules, and the other service modules are required to provide SDKs (Software Development Kit, software development kits). Thus, n×n data channels are required, as shown in fig. 6. However, at most 2N data channels (data channels are established between each traffic module and the routing module) are required in the case of forwarding through the routing module, as shown in fig. 7. Thus, the greater the number of modules, the greater the number of reduced data channels and the higher the multiplexing rate of the data channels.
Furthermore, the embodiment of the application can reduce the dependence data packet such as Jar packet which is required to be output by the service module, and reduce the development cost.
Furthermore, the embodiment of the application can further increase and improve the controllability and the safety in the data circulation process by performing the permission verification through the routing module.
Furthermore, each service module reduces the joint debugging quantity, reduces the joint debugging cost and greatly improves the research and development efficiency. For example, in a scenario where cross-process communication is performed between N modules, joint debugging is required for every two modules, where joint debugging is required for n×n times in the case of direct communication between modules, and where each module is joint-debugged with a routing module in the case of setting a routing module, joint debugging is required for 2N times. Thus, the greater the number of modules, the greater the number of joint tones decreases.
Fig. 8 is a block diagram of a data routing device according to an embodiment of the present application. The apparatus may include:
a receiving unit 61, configured to receive first data from a first service module;
the parsing unit 62 is configured to parse the first data according to a preset routing protocol to obtain target module information;
and a sending unit 63, configured to forward the first data to a second service module corresponding to the target module information.
Fig. 9 is a block diagram of a datapath device according to another embodiment of the present application. The apparatus may comprise. The data routing device of this embodiment may include the components of the device embodiments described above. In this embodiment, in a possible implementation manner, the receiving unit 61 is specifically configured to receive the first data from the process of the first service module through a data channel between the routing module and the first service module.
In a possible implementation manner, the sending unit 63 is specifically configured to forward the first data to a process of the second service module corresponding to the target module information through a data channel between the routing module and the second service module.
In one possible implementation, the apparatus further includes:
and a searching unit 71, configured to search the second service module corresponding to the target module information in the plurality of service modules connected to the routing module.
In a possible implementation manner, the receiving unit 61 is further configured to receive second data after the process of the second service module processes the first data;
the sending unit 63 is further configured to return the second data to the process of the first service module.
In one possible implementation, the apparatus further includes:
a verification unit 72, configured to perform integrity verification and/or security verification on the first data, and perform a routing forwarding step on the first data that passes the verification.
The functions of each unit in each data routing device in the embodiments of the present application may be referred to the corresponding descriptions in the above data routing methods, which are not described herein again.
According to embodiments of the present application, there is also provided an electronic device, a readable storage medium and a computer program product.
As shown in fig. 10, a block diagram of an electronic device according to a data routing method according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the application described and/or claimed herein.
As shown in fig. 10, the electronic device includes: one or more processors 901, memory 902, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In other embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple electronic devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). In fig. 10, a processor 901 is taken as an example.
Memory 902 is a non-transitory computer-readable storage medium provided herein. Wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the data routing methods provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the data routing methods provided herein.
The memory 902 is used as a non-transitory computer readable storage medium, and may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules/units (e.g., the receiving unit 61, the parsing unit 62, and the transmitting unit 63 shown in fig. 8) corresponding to the data routing method in the embodiments of the present application. The processor 901 executes various functional applications of the server and data processing, i.e., implements the data routing method in the above-described method embodiments, by running non-transitory software programs, instructions, and modules stored in the memory 902.
The memory 902 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the electronic device of the data routing method, and the like. In addition, the memory 902 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 902 optionally includes memory remotely located relative to processor 901, which may be connected to the electronic device of the data routing method via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the data routing method may further include: an input device 903 and an output device 904. The processor 901, memory 902, input devices 903, and output devices 904 may be connected by a bus or other means, for example in fig. 10.
The input device 903 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device of the data routing method, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointer stick, one or more mouse buttons, a track ball, a joystick, etc. The output means 904 may include a display device, auxiliary lighting means (e.g., LEDs), tactile feedback means (e.g., vibration motors), and the like. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASIC (application specific integrated circuit), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
These computing programs (also referred to as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented in a high-level procedural and/or object-oriented programming language, and/or in assembly/machine language. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and Virtual Private Server (VPS) service are overcome.
According to the embodiment of the application, the resource occupation of the system can be effectively reduced, the number of the data channels can be reduced, and the multiplexing rate of the data channels is improved. Further, the embodiment of the application can reduce the dependent data packet which is required to be output by the service module, and reduce the development cost. Furthermore, the embodiment of the application can further increase and improve the controllability and the safety in the data circulation process by performing the permission verification through the routing module. Furthermore, each service module reduces the joint debugging quantity, reduces the joint debugging cost and greatly improves the research and development efficiency.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions disclosed in the present application can be achieved, and are not limited herein.
The above embodiments do not limit the scope of the application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application are intended to be included within the scope of the present application.
Claims (8)
1.A data routing method is applied to a scene of cross-process communication of a plurality of service modules, and comprises the following steps:
receiving first data of a process from a first service module through a data channel between a routing module and the first service module; the routing module is arranged in an operating system of equipment, and the operating system runs a plurality of service modules;
analyzing the first data according to a preset routing protocol to obtain target module information;
forwarding the first data to a process of the second service module corresponding to the target module information through a data channel between the routing module and the second service module;
the routing protocol is a distribution protocol and is formulated based on service logic, and is used for informing a routing module that data needs to be forwarded to a target service module, wherein the service logic comprises at least one basic capability required by an upper service module in operation;
the method further comprises the steps of:
performing integrity check and/or security check on the first data, and performing a route forwarding step on the first data passing the check; under the condition that the verification fails, discarding the first data or returning information of the failed verification to the first service module, wherein the information of the failed verification is used for informing the first service module to send the first data to the routing module again or send other data needing to be forwarded;
wherein the performing integrity check and/or security check on the first data includes:
checking whether the target module information is consistent with a receiving end corresponding to a transmitting end for transmitting the first data in the mapping rule based on the mapping rule; the sending end is a first service module needing to forward data, and the receiving end is a second service module needing to receive data; the mapping rule comprises a corresponding relation between the sending end and the receiving end;
or,
checking whether the first data is complete;
or,
and signing the first data by utilizing a signing algorithm to obtain the packet name of the data packet containing the first data, and checking whether the packet name accords with a preset packet name.
2. The method according to claim 1, wherein the method further comprises:
and searching the second service module corresponding to the target module information in a plurality of service modules connected with the routing module.
3. The method according to claim 1, wherein the method further comprises:
receiving second data processed by the first data by the process of the second service module;
and returning the second data to the process of the first business module.
4. A data routing apparatus for use in a scenario in which a plurality of traffic modules communicate across a process, comprising:
the receiving unit is used for receiving the first data of the process from the first service module through a data channel between the routing module and the first service module; the routing module is arranged in an operating system of equipment, and the operating system runs a plurality of service modules;
the analyzing unit is used for analyzing the first data according to a preset routing protocol to obtain target module information;
the sending unit is used for forwarding the first data to the process of the second service module corresponding to the target module information through a data channel between the routing module and the second service module;
the routing protocol is a distribution protocol and is formulated based on service logic, and is used for informing a routing module that data needs to be forwarded to a target service module, wherein the service logic comprises at least one basic capability required by an upper service module in operation;
the apparatus further comprises:
the verification unit is used for carrying out integrity verification and/or security verification on the first data, and carrying out a route forwarding step on the first data passing the verification; under the condition that the verification fails, discarding the first data or returning information of the failed verification to the first service module, wherein the information of the failed verification is used for informing the first service module to send the first data to the routing module again or send other data needing to be forwarded;
wherein, the check unit includes:
the first verification subunit is used for verifying whether the target module information is consistent with a receiving end corresponding to a sending end for sending the first data in the mapping rule or not based on the mapping rule; the sending end is a first service module needing to forward data, and the receiving end is a second service module needing to receive data; the mapping rule comprises a corresponding relation between the sending end and the receiving end;
or,
a second checking subunit, configured to check whether the first data is complete;
or,
and the third verification subunit is used for signing the first data by utilizing a signature algorithm to obtain the packet name of the data packet containing the first data, and verifying whether the packet name accords with a preset packet name.
5. The apparatus of claim 4, wherein the apparatus further comprises:
and the searching unit is used for searching the second service module corresponding to the target module information in a plurality of service modules connected with the routing module.
6. The apparatus of claim 4, wherein the device comprises a plurality of sensors,
the receiving unit is further configured to receive second data after the process of the second service module processes the first data;
the sending unit is further configured to return the second data to the process of the first service module.
7. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 3.
8. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011016405.6A CN112165430B (en) | 2020-09-24 | 2020-09-24 | Data routing method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011016405.6A CN112165430B (en) | 2020-09-24 | 2020-09-24 | Data routing method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112165430A CN112165430A (en) | 2021-01-01 |
CN112165430B true CN112165430B (en) | 2024-02-13 |
Family
ID=73863828
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011016405.6A Active CN112165430B (en) | 2020-09-24 | 2020-09-24 | Data routing method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112165430B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114157598B (en) * | 2021-12-13 | 2023-04-07 | 百果园技术(新加坡)有限公司 | Message forwarding method, system, electronic equipment and storage medium |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101252527A (en) * | 2008-04-09 | 2008-08-27 | 腾讯科技(深圳)有限公司 | Method for transferring network, network transfer server and inner core managing module |
EP2074772A2 (en) * | 2006-10-06 | 2009-07-01 | Genesys Telecommunications Laboratories, Inc. | Integrating sip control messaging into existing communication center routing infrastructure |
CN102457537A (en) * | 2010-10-19 | 2012-05-16 | 阿里巴巴集团控股有限公司 | Communication method of transmission control protocol (TCP) and server |
CN104065731A (en) * | 2014-06-30 | 2014-09-24 | 江苏华大天益电力科技有限公司 | FTP file transfer system and transfer method |
CN104868592A (en) * | 2015-03-13 | 2015-08-26 | 国家电网公司 | Inter-network information system application state supervision system |
WO2018232701A1 (en) * | 2017-06-22 | 2018-12-27 | 北京小米移动软件有限公司 | Data transmission method, device, user equipment and base station |
CN110309006A (en) * | 2019-06-28 | 2019-10-08 | 百度在线网络技术(北京)有限公司 | A kind of funcall method, apparatus, terminal device and storage medium |
CN110377438A (en) * | 2019-07-22 | 2019-10-25 | 广州小鹏汽车科技有限公司 | The method for routing of striding course communication interface, device and system |
CN110765024A (en) * | 2019-10-29 | 2020-02-07 | 百度在线网络技术(北京)有限公司 | Simulation test method, simulation test device, electronic equipment and computer-readable storage medium |
CN111080243A (en) * | 2019-12-05 | 2020-04-28 | 北京百度网讯科技有限公司 | Service processing method, device, system, electronic equipment and storage medium |
CN111131074A (en) * | 2018-10-31 | 2020-05-08 | 中移(杭州)信息技术有限公司 | Data processing method, device, system, server and readable storage medium |
CN111193768A (en) * | 2019-11-25 | 2020-05-22 | 腾讯科技(深圳)有限公司 | Network data processing method and device, computer equipment and storage medium |
CN111694889A (en) * | 2020-06-12 | 2020-09-22 | 百度在线网络技术(北京)有限公司 | Data processing method and device, electronic equipment and readable storage medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009019925A1 (en) * | 2007-08-09 | 2009-02-12 | Nippon Telegraph And Telephone Corporation | Communication method, relay server device, program, and recording medium |
US8089952B2 (en) * | 2007-08-31 | 2012-01-03 | Intelepeer, Inc. | Intelligent call routing |
CN101626343B (en) * | 2009-08-05 | 2012-04-04 | 华为技术有限公司 | Method and apparatus for exchanging data packet, and communication device |
JP2012009996A (en) * | 2010-06-23 | 2012-01-12 | National Institute Of Information & Communication Technology | Information processing system, relay device, and information processing method |
US10572279B2 (en) * | 2018-04-10 | 2020-02-25 | Microsoft Technology Licensing, Llc | Cross-process interface for non-compatible frameworks |
CN111327545B (en) * | 2018-12-14 | 2021-10-15 | 北京金山云网络技术有限公司 | Data sending method and device, network system and switch |
CN110719432A (en) * | 2019-09-11 | 2020-01-21 | 视联动力信息技术股份有限公司 | Data transmission method and device, electronic equipment and storage medium |
-
2020
- 2020-09-24 CN CN202011016405.6A patent/CN112165430B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2074772A2 (en) * | 2006-10-06 | 2009-07-01 | Genesys Telecommunications Laboratories, Inc. | Integrating sip control messaging into existing communication center routing infrastructure |
CN101252527A (en) * | 2008-04-09 | 2008-08-27 | 腾讯科技(深圳)有限公司 | Method for transferring network, network transfer server and inner core managing module |
CN102457537A (en) * | 2010-10-19 | 2012-05-16 | 阿里巴巴集团控股有限公司 | Communication method of transmission control protocol (TCP) and server |
CN104065731A (en) * | 2014-06-30 | 2014-09-24 | 江苏华大天益电力科技有限公司 | FTP file transfer system and transfer method |
CN104868592A (en) * | 2015-03-13 | 2015-08-26 | 国家电网公司 | Inter-network information system application state supervision system |
WO2018232701A1 (en) * | 2017-06-22 | 2018-12-27 | 北京小米移动软件有限公司 | Data transmission method, device, user equipment and base station |
CN111131074A (en) * | 2018-10-31 | 2020-05-08 | 中移(杭州)信息技术有限公司 | Data processing method, device, system, server and readable storage medium |
CN110309006A (en) * | 2019-06-28 | 2019-10-08 | 百度在线网络技术(北京)有限公司 | A kind of funcall method, apparatus, terminal device and storage medium |
CN110377438A (en) * | 2019-07-22 | 2019-10-25 | 广州小鹏汽车科技有限公司 | The method for routing of striding course communication interface, device and system |
CN110765024A (en) * | 2019-10-29 | 2020-02-07 | 百度在线网络技术(北京)有限公司 | Simulation test method, simulation test device, electronic equipment and computer-readable storage medium |
CN111193768A (en) * | 2019-11-25 | 2020-05-22 | 腾讯科技(深圳)有限公司 | Network data processing method and device, computer equipment and storage medium |
CN111080243A (en) * | 2019-12-05 | 2020-04-28 | 北京百度网讯科技有限公司 | Service processing method, device, system, electronic equipment and storage medium |
CN111694889A (en) * | 2020-06-12 | 2020-09-22 | 百度在线网络技术(北京)有限公司 | Data processing method and device, electronic equipment and readable storage medium |
Non-Patent Citations (5)
Title |
---|
XPC: Architectural Support for Secure and Efficient Cross Process Call;Dong Du等;《2019 ACM/IEEE 46th Annual International Symposium on Computer Architecture (ISCA)》;全文 * |
一种基于COM/COM+的跨进程消息共享池接口组件;陈江;福建电脑(10);全文 * |
周根元等.《计算机信息技术概论》.上海交通大学出版社,2006,第5.4.4节 第179页. * |
基于模糊逻辑的VANET路由协议算法研究;廖小飞;公维涛;周凡;李德敏;;计算机仿真(11);全文 * |
支持业务需求灵活定制的多态路由系统;张岩;兰巨龙;胡宇翔;王鹏;段通;;电子学报(04);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN112165430A (en) | 2021-01-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113141386B (en) | Kubernetes cluster access method, device, equipment and medium in private network | |
CN110506411B (en) | Method and system for providing packet enforcement using logical ports in a virtualized computing environment | |
CN110865855B (en) | Applet processing method and related equipment | |
CN111741026B (en) | Cross-chain transaction request processing method, device, equipment and storage medium | |
CN111414208B (en) | Application program starting method, device and equipment | |
CN112000394B (en) | Method, apparatus, device and storage medium for accessing applet | |
CN104394080A (en) | Method and device for achieving function of security group | |
CN111782254A (en) | Method, device, equipment and storage medium for upgrading object | |
CN109669787B (en) | Data transmission method and device, storage medium and electronic equipment | |
CN111552934A (en) | Database access method and device | |
CN109194589B (en) | MDC (media data center) implementation method and device | |
CN112511505A (en) | Authentication system, method, device, equipment and medium | |
US20210350805A1 (en) | Method, apparatus, device and computer storage medium for processing voices | |
CN112165430B (en) | Data routing method, device, equipment and storage medium | |
US11457071B2 (en) | Method and apparatus for communication between private networks, electronic device and storage medium | |
CN111866092A (en) | Message transmission method and device, electronic equipment and readable storage medium | |
CN112565225B (en) | Method and device for data transmission, electronic equipment and readable storage medium | |
CN112532528B (en) | Message routing method and device for rule engine | |
CN111639116B (en) | Data access connection session protection method and device | |
CN113094139B (en) | UI style updating method and device | |
CN112527635B (en) | Fault injection method and device, electronic equipment and storage medium | |
CN110830477B (en) | Service identification method, device, gateway, system and storage medium | |
CN111092876B (en) | Multi-host system, electronic device, storage medium, information processing method and apparatus for multi-host system | |
CN111339571A (en) | Block chain key management method, device, equipment and storage medium | |
CN107113280A (en) | A kind of network control method and virtual switch |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20211018 Address after: 100176 Room 101, 1st floor, building 1, yard 7, Ruihe West 2nd Road, economic and Technological Development Zone, Daxing District, Beijing Applicant after: Apollo Zhilian (Beijing) Technology Co.,Ltd. Address before: 2 / F, baidu building, 10 Shangdi 10th Street, Haidian District, Beijing 100085 Applicant before: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |