CN115118767B - Method, device and equipment for realizing customizable unitized routing component - Google Patents

Method, device and equipment for realizing customizable unitized routing component Download PDF

Info

Publication number
CN115118767B
CN115118767B CN202210711081.0A CN202210711081A CN115118767B CN 115118767 B CN115118767 B CN 115118767B CN 202210711081 A CN202210711081 A CN 202210711081A CN 115118767 B CN115118767 B CN 115118767B
Authority
CN
China
Prior art keywords
unit
routing
service
information
forwarding
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
Application number
CN202210711081.0A
Other languages
Chinese (zh)
Other versions
CN115118767A (en
Inventor
莫宇阳
梁智华
刘富德
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202210711081.0A priority Critical patent/CN115118767B/en
Publication of CN115118767A publication Critical patent/CN115118767A/en
Application granted granted Critical
Publication of CN115118767B publication Critical patent/CN115118767B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS
    • H04L45/306Route determination based on the nature of the carried application
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1073Registration or de-registration
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Multimedia (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a customizable unitized routing component realization method, device and equipment, which can be applied to the distributed field and the financial field, can realize the customizable unitized routing component, and enable the unitized routing component to be lighter and less sensitive. The method comprises the following steps: firstly, when an application is started, marking each service unit through a pre-constructed service renaming component module, and registering in a registry; the method comprises the steps of reading routing information of a configuration center through a pre-built routing service component module and sending the routing information to each service unit, obtaining a target external transaction request through a gateway, inputting the target external transaction request into a pre-built gateway-to-unit forwarding component module to access the routing service component module so as to obtain unit information to be forwarded and forwarding the unit information to a first application of a target unit, and accessing the routing service component module through the pre-built inter-unit forwarding component module so as to obtain the unit information to be forwarded and forwarding the unit information to a second application of the target unit.

Description

Method, device and equipment for realizing customizable unitized routing component
Technical Field
The present disclosure relates to the field of distributed technologies, and in particular, to a method, an apparatus, and a device for implementing a customizable unitized routing component.
Background
With the development of application systems and the expansion of the scale of application systems, the single application gradually falls into a bottleneck period, the distributed micro-service application architecture replaces the existing single application architecture, and the unit routing component forms an integral part of the distributed micro-service application architecture system.
There are two cell routing component designs currently available: a BFW service fragment routing component shown in figure 1 has the defects of strong code invasiveness, no benefit to noninductive design, simple component hierarchy, no support of complex routing element mapping relation and poor component expansibility, and the specific implementation flow and the use examples of the BFW service fragment routing component are shown in figures 2 and 3 respectively. The other is a global routing component and a transaction forwarding component in the technology shown in fig. 4 and fig. 5, which have the disadvantages that the global routing component of the access server needs to obtain the routing information every time a request, the network requests frequently, and the routing mapping rule configured by the client does not support the customization requirement. Therefore, how to implement customizable unitized routing components, and make the unitized routing components more lightweight and insensitive and can implement forwarding of requests is a current challenge.
Disclosure of Invention
The main objective of the embodiments of the present application is to provide a method, an apparatus, and a device for implementing a customizable unitized routing component, which can implement the customizable unitized routing component, and make the unitized routing component lighter and less sensitive.
In a first aspect, an embodiment of the present application provides a method for implementing a customizable unitized routing component, where the method includes:
when the micro-service application is started, marking each service unit through a pre-constructed service renaming component module, and registering in a registration center; reading the route information of the configuration center through a pre-constructed route service component module and transmitting the route information to each service unit;
acquiring a target external transaction request through a gateway;
inputting the target external transaction request into a pre-constructed gateway-to-unit forwarding component module to access the routing service component module to acquire unit information to be forwarded, and forwarding the unit information to a first application of a target unit;
and accessing the routing service component module through a pre-constructed inter-unit forwarding component module to acquire unit information to be forwarded, and forwarding the unit information to a second application of the target unit.
Optionally, the method further comprises:
selecting a corresponding query mechanism according to partition elements contained in the target external transaction request through a pre-constructed route query component module;
when the partition element is a general partition element, directly inquiring the issued route information to carry out transaction forwarding; or, for the customized query element, the transaction forwarding is performed by accessing the Redis to obtain the mapped target unit routing information.
Optionally, the method further comprises:
the mapping relation between the non-partition elements and the partition elements is stored by using a remote dictionary service Redis.
Optionally, the mapping information between the partition elements and the units is configured in a configuration center and is uniformly distributed to each application.
In a second aspect, embodiments of the present application further provide an implementation apparatus of a customizable unitized routing component, where the apparatus includes:
the issuing unit is used for marking each service unit through a pre-constructed service renaming component module and registering in a registration center when the micro-service application is started; reading the route information of the configuration center through a pre-constructed route service component module and transmitting the route information to each service unit;
the acquisition unit is used for acquiring the target external transaction request through the gateway;
the first forwarding unit is used for inputting the target external transaction request into a pre-built gateway-to-unit forwarding component module so as to access the routing service component module, acquire unit information to be forwarded, and forward the unit information to a first application of a target unit;
and the second forwarding unit is used for accessing the routing service component module through a pre-built inter-unit forwarding component module to acquire the unit information to be forwarded and forwarding the unit information to a second application of the target unit.
Optionally, the apparatus further includes:
the selection unit is used for selecting a corresponding query mechanism according to the partition elements contained in the target external transaction request through a pre-constructed route query component module;
the third forwarding unit is used for directly inquiring the issued routing information to forward the transaction when the partition element is a general partition element; or, for the customized query element, the transaction forwarding is performed by accessing the Redis to obtain the mapped target unit routing information.
Optionally, the apparatus further includes:
and the storage unit is used for storing the mapping relation between the non-partition elements and the partition elements by using the remote dictionary service Redis.
Optionally, the mapping information between the partition elements and the units is configured in a configuration center and is uniformly distributed to each application.
The embodiment of the application also provides a device for realizing the customizable unitized routing component, which comprises: a processor, memory, system bus;
the processor and the memory are connected through the system bus;
the memory is for storing one or more programs, the one or more programs comprising instructions, which when executed by the processor, cause the processor to perform any of the implementations of the customizable unitized routing component implementations described above.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores instructions, and when the instructions run on the terminal equipment, the terminal equipment is caused to execute any implementation mode of the implementation method of the customizable unitized routing component.
The embodiment of the application provides a method, a device and equipment for realizing customizable unitized routing components, wherein when micro-service application is started, each service unit is marked by a pre-built service renaming component module and registered in a registration center; and reading the routing information of the configuration center through the pre-built routing service component module and issuing the routing information to each service unit, then acquiring a target external transaction request through a gateway, inputting the target external transaction request into the pre-built gateway to the unit forwarding component module to access the routing service component module so as to acquire the unit information to be forwarded, forwarding the unit information to the first application of the target unit, and further accessing the routing service component module through the pre-built inter-unit forwarding component module so as to acquire the unit information to be forwarded and forwarding the unit information to the second application of the target unit. Thereby enabling customizable unitized routing components and making the unitized routing components more lightweight and unobservable.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a code schematic diagram of a BFW service fragment routing component provided in an embodiment of the present application;
fig. 2 is a schematic diagram of a BFW service fragment routing component implementation flow provided in an embodiment of the present application;
fig. 3 is a schematic diagram of a use example of a BFW service fragment routing component provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of a global routing component in the technology provided in an embodiment of the present application;
fig. 5 is a schematic diagram of a technical platform transaction forwarding component according to an embodiment of the present application;
fig. 6 is a flow chart of a method for implementing a customizable unitized routing module according to an embodiment of the present application;
FIG. 7 is a schematic diagram of call of each module of a method for implementing a customizable unitized routing component according to an embodiment of the present application;
fig. 8 is a schematic flow diagram of a functional implementation of a gateway to unit forwarding component module provided in an embodiment of the present application;
fig. 9 is a schematic flow chart of a functional implementation of an inter-unit forwarding component module provided in an embodiment of the present application;
fig. 10 is a schematic diagram of an implementation device of a customizable unitized routing module according to an embodiment of the present application.
Detailed Description
With the development of application systems and the expansion of the scale of application systems, single application gradually falls into a bottleneck period, the distributed micro-service application architecture replaces the existing single application architecture, and a unit routing component forms an integral part of the distributed micro-service application architecture system. At present, the following two unit routing component designs are available:
1. BFW service fragment routing component
In a business scenario with large data volume and high concurrency, in order to avoid the problem of single-node data volume being too large and single-point read-write bottleneck, the data often needs the capability of supporting slicing (slicing) and duplicate (duplicate): and (3) slicing (slicing) the data according to a certain rule, wherein each slice stores a part of data, and the corresponding micro-service packet is deployed to access different slice data respectively. For the consumer of the micro-service, different fragmented micro-services need to be called according to a certain routing rule. Bfw abstracts the domain model and a service fragment access component bfw-shaping-router is designed, as shown in fig. 1.
Fig. 2 is a flowchart of a implementation of a BFW service partition routing component partition routing, where a request is intercepted by a tangent plane by adding @ shording annotation to a called party interface, and a doRouter method is released to perform a custom routing, where the method supports tsf related routing configuration, as shown in a schematic diagram of a use example in fig. 3.
2. Technical platform global routing component and transaction forwarding component
The global routing component client in the technology provides the registration and query functions of the routing unit information. Components such as transaction forwarding, asynchronous reliable messaging, batch scheduling services, service orchestration, etc. provided by the technology platform are all dependent on element information provided by the global routing. The global routing component (as shown in fig. 4) is described in sections:
(1) Global routing SDK: the global route SDK encapsulates specific route positioning business logic, is responsible for communication with a server, provides global route service integration capability for gateway/micro-service application/service arrangement/asynchronous messages, and performs nearby routing and load balancing through a TSF platform when a client calls the server;
(2) Global routing service: providing services such as query/new addition/modification/cancellation of the mapping relation of the business elements for the client SDK;
(3) Database: the database of the global routing component is responsible for recording the mapping relation of the business elements.
The routing component provides two mapping schemes:
(1) the server only stores the first layer mapping relation (business element- > client number), and does not store the second layer mapping relation (client number- > logical fragment), and the second layer mapping relation can be calculated and distributed (according to client number HASH) through the client.
(2) The mapping relation of the client numbers is not established any more, the first layer mapping relation (business element-logic fragment) is stored in the server, and other mapping relations are cached in the client.
The transaction request obtains unit information through the server side of the global routing component and is forwarded through the transaction forwarding component of the client side. The transaction forwarding component (as shown in fig. 5) illustrates the following parts:
(1) Transaction forwarding SDK: a transaction forwarding function for providing the entire application service;
(2) Cutting/interception: intercepting a transaction request and analyzing the current request;
(3) Customer element: after the request is intercepted, the extraction of the client elements is carried out through the message body or the header.
(4) Routing policy: pulling policy configuration from a registry to provide policy selection for service location;
(5) Service positioning: requesting global routing service to obtain a unit information list of the service through a client element and screening proper address information through a routing strategy;
(6) Service routing: changing the current request service name through the unit address of service positioning to carry out forwarding processing of the transaction;
(7) Fault tolerance/retry: re-forwarding or failure return is performed on the request with failed forwarding.
However, the existing two cell routing assemblies have the following disadvantages:
1. BFW service fragment routing component
(1) The code is more invasive and is unfavorable for the design without inductance.
(2) The component has simple level and does not support complex mapping relation of the routing elements.
(3) The component is less expandable.
2. Technical middle table matching assembly
(1) Every request needs to access the global routing component of the server to acquire the routing information, and the network requests frequently.
(2) The routing mapping rules configured by the client do not support the customization needs.
Therefore, how to implement customizable unitized routing components, and make the unitized routing components more lightweight and insensitive and can implement forwarding of requests is a current challenge.
In order to solve the above-mentioned defect, the embodiment of the application provides a method for implementing customizable unitized routing components, firstly, when micro-service application is started, each service unit is marked by a pre-built service renaming component module and registered in a registration center; and reading the routing information of the configuration center through the pre-built routing service component module and issuing the routing information to each service unit, then acquiring a target external transaction request through a gateway, inputting the target external transaction request into the pre-built gateway to the unit forwarding component module to access the routing service component module so as to acquire the unit information to be forwarded, forwarding the unit information to the first application of the target unit, and further accessing the routing service component module through the pre-built inter-unit forwarding component module so as to acquire the unit information to be forwarded and forwarding the unit information to the second application of the target unit. Thereby enabling customizable unitized routing components and making the unitized routing components more lightweight and unobservable.
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
First embodiment
Referring to fig. 6, a flow chart of a method for implementing a customizable unitized routing module according to this embodiment is provided, and the method includes the following steps:
s601: when the micro-service application is started, marking each service unit through a pre-constructed service renaming component module, and registering in a registration center; and reading the routing information of the configuration center through a pre-constructed routing service component module and transmitting the routing information to each service unit.
In this embodiment, in order to implement a customizable unitized routing component and make the unitized routing component more lightweight and less susceptible, four component modules are pre-built in the present application: service renaming module, route service module, gateway to unit transmitting module and unit transmitting module. When the micro-service application is started, each service unit can be marked through a pre-built service renaming component module and registered in a registry; and reading the routing information of the configuration center through a pre-constructed routing service component module and transmitting the routing information to each service unit.
S602: and acquiring the target external transaction request through the gateway.
S603: and inputting the target external transaction request into a pre-constructed gateway-to-unit forwarding component module to access a routing service component module to acquire unit information to be forwarded, and forwarding the unit information to a first application of the target unit.
In this embodiment, after the target external transaction request is obtained in step S602, the target external transaction request may be further input into a pre-configured gateway to unit forwarding component module, so as to access the routing service component module, to obtain the unit information to be forwarded, and forward the unit information to the first application of the target unit, so as to execute the subsequent step S604.
Specifically, after the target external transaction request enters from the gateway, the access route service module obtains the unit information to be forwarded through the gateway to unit forwarding module, and forwards the unit information to the application a module of the target unit, as shown in steps (1) to (7) in fig. 7.
S604: and accessing the routing service component module through the pre-constructed inter-unit forwarding component module to acquire the unit information to be forwarded and forwarding the unit information to a second application of the target unit.
In this embodiment, after forwarding the unit information to the first application of the target unit in step S603, the route service component module may be accessed through the inter-unit forwarding component module constructed in advance to obtain the unit information to be forwarded, and forward the unit information to the second application of the target unit.
Specifically, the forwarding of the target external transaction request from the target in-cell application a module to the application B module is performed by the inter-cell forwarding component module, the access route service component module obtains the cell information to be forwarded, and the cell information is forwarded to the target in-cell application B module, as shown in steps (8) to (8) of fig. 7
It should be noted that, the key of the present application is that the design part of the processing logic of the forwarding component, the target external transaction request from gateway to unit, and the processing logic of the request between units are different. Aiming at different route query relations, a corresponding query mechanism can be selected through a pre-constructed route query component module according to partition elements contained in the target external transaction request, and when the partition elements are general partition elements, the issued route information is directly queried for transaction forwarding; or, for the customized query element, the transaction forwarding is performed by accessing the Redis to obtain the mapped target unit routing information.
In addition, the present application uses the remote dictionary service dis to store the mapping relationship between the non-partitioned elements and the partitioned elements. And the mapping information between the partition elements and the units is configured in the configuration center and is uniformly distributed to various applications. In addition, as shown in fig. 8, a functional implementation flow diagram of the gateway to element forwarding component module is shown; as shown in fig. 9, a functional implementation flow diagram of the inter-unit forwarding component module is shown.
In this way, when the micro-service application is started, the fragment unit information is registered to the registration center through the service renaming component module, the transaction request enters the service application from the gateway, sequentially passes through the gateway-to-unit forwarding component module and the inter-unit forwarding component module of the client, and the unit routing information is queried. The unit route information is uniformly issued to each unit module through the route service module, the route service module checks the activity state of each unit of the registration center at any time, and broadcasts route configuration information change to each unit, if part of units need to be newly added with route inquiry elements, the route service module stores the newly added elements into Redis. And the inter-unit forwarding component module forwards the transaction request according to the returned routing component information.
By executing the steps S601-S604, a customizable unitized routing component is designed, and when an application is started, the routing configuration information is read from the configuration center by the routing service component module and is uniformly distributed to each unit, so that access of a server does not exist, network resources are not consumed, and change information is uniformly broadcast to the local units only when the routing configuration information changes. In addition, customized routing elements are supported and stored by Redis, and the entire unit routing component is more lightweight and non-sensitive for micro-service applications. That is, under the micro-service application system, the routing transaction request forwarding in each unit and between units in the unitized architecture system is satisfied, and the system has expansibility and supports customized routing query elements.
In summary, in the implementation method of the customizable unitized routing component provided in this embodiment, when a micro-service application is started, each service unit is marked by a service renaming component module built in advance and registered in a registry; and reading the routing information of the configuration center through the pre-built routing service component module and issuing the routing information to each service unit, then acquiring a target external transaction request through a gateway, inputting the target external transaction request into the pre-built gateway to the unit forwarding component module to access the routing service component module so as to acquire the unit information to be forwarded, forwarding the unit information to the first application of the target unit, and further accessing the routing service component module through the pre-built inter-unit forwarding component module so as to acquire the unit information to be forwarded and forwarding the unit information to the second application of the target unit. Thereby enabling customizable unitized routing components and making the unitized routing components more lightweight and unobservable.
Second embodiment
The embodiment will be described with respect to an implementation apparatus of a customizable unitized routing module, and for related content, reference is made to the above-mentioned method embodiment.
Referring to fig. 10, a schematic diagram of an implementation apparatus of a customizable unitized routing module according to this embodiment specifically includes:
the issuing unit 1001 is configured to mark each service unit through a service renaming component module that is built in advance when the micro-service application is started, and register the service unit in the registry; reading the route information of the configuration center through a pre-constructed route service component module and transmitting the route information to each service unit;
an obtaining unit 1002, configured to obtain, through a gateway, a target external transaction request;
a first forwarding unit 1003, configured to input the target external transaction request into a pre-constructed gateway-to-unit forwarding component module, to access the routing service component module, to obtain unit information to be forwarded, and forward the unit information to a first application of a target unit;
and the second forwarding unit 1004 is configured to access the routing service component module through a pre-built inter-unit forwarding component module, obtain unit information to be forwarded, and forward the unit information to a second application of the target unit.
In one implementation of this embodiment, the apparatus further includes:
the selection unit is used for selecting a corresponding query mechanism according to the partition elements contained in the target external transaction request through a pre-constructed route query component module;
the third forwarding unit is used for directly inquiring the issued routing information to forward the transaction when the partition element is a general partition element; or, for the customized query element, the transaction forwarding is performed by accessing the Redis to obtain the mapped target unit routing information.
In one implementation of this embodiment, the apparatus further includes:
and the storage unit is used for storing the mapping relation between the non-partition elements and the partition elements by using the remote dictionary service Redis.
In one implementation of this embodiment, the mapping information between the partition elements and the units is configured in a configuration center and is uniformly issued to each application.
In summary, in the implementation device of the customizable unitized routing component provided in this embodiment, when a micro-service application is started, each service unit is marked by a service renaming component module built in advance and registered in a registry; and reading the routing information of the configuration center through the pre-built routing service component module and issuing the routing information to each service unit, then acquiring a target external transaction request through a gateway, inputting the target external transaction request into the pre-built gateway to the unit forwarding component module to access the routing service component module so as to acquire the unit information to be forwarded, forwarding the unit information to the first application of the target unit, and further accessing the routing service component module through the pre-built inter-unit forwarding component module so as to acquire the unit information to be forwarded and forwarding the unit information to the second application of the target unit. Thereby enabling customizable unitized routing components and making the unitized routing components more lightweight and unobservable.
Further, the embodiment of the application also provides an implementation device of the customizable unitized routing component, which comprises: a processor, memory, system bus;
the processor and the memory are connected through the system bus;
the memory is for storing one or more programs, the one or more programs comprising instructions, which when executed by the processor, cause the processor to perform any of the implementations of the customizable unitary routing component described above.
Further, the embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores instructions, and when the instructions run on a terminal device, the terminal device is caused to execute any implementation method of the customizable unitized routing component.
From the above description of embodiments, it will be apparent to those skilled in the art that all or part of the steps of the above described example methods may be implemented in software plus necessary general purpose hardware platforms. Based on such understanding, the technical solutions of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway, etc.) to perform the methods described in the embodiments or some parts of the embodiments of the present application.
It should be noted that, in the present description, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different manner from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
It is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In addition, it should be noted that the method, the device and the equipment for implementing the customizable unitized routing component provided by the invention can be used in the distributed field and the financial field. The foregoing is merely exemplary, and the application fields of the method, the device and the equipment for implementing the customizable unitized routing module provided by the present invention are not limited.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (3)

1. A method for implementing a customizable, unitized routing element, the method comprising:
when the micro-service application is started, marking each service unit through a pre-constructed service renaming component module, and registering in a registration center; reading the route information of the configuration center through a pre-constructed route service component module and transmitting the route information to each service unit;
acquiring a target external transaction request through a gateway;
inputting the target external transaction request into a pre-constructed gateway-to-unit forwarding component module to access the routing service component module to acquire unit information to be forwarded, and forwarding the unit information to a first application of a target unit;
accessing the routing service component module through a pre-constructed inter-unit forwarding component module to acquire unit information to be forwarded, and forwarding the unit information to a second application of a target unit;
the method further comprises the steps of:
selecting a corresponding query mechanism according to partition elements contained in the target external transaction request through a pre-constructed route query component module;
when the partition element is a general partition element, directly inquiring the issued route information to carry out transaction forwarding; or, for the customized query element, the transaction forwarding is carried out by accessing the Redis to obtain the mapped target unit routing information;
the method further comprises the steps of:
storing the mapping relation between the non-partition elements and the partition elements by using a remote dictionary service Redis;
the mapping information between the partition elements and the units is configured in a configuration center and is uniformly distributed to various applications.
2. An apparatus for implementing a customizable, unitized routing element, the apparatus comprising:
the issuing unit is used for marking each service unit through a pre-constructed service renaming component module and registering in a registration center when the micro-service application is started; reading the route information of the configuration center through a pre-constructed route service component module and transmitting the route information to each service unit;
the acquisition unit is used for acquiring the target external transaction request through the gateway;
the first forwarding unit is used for inputting the target external transaction request into a pre-built gateway-to-unit forwarding component module so as to access the routing service component module, acquire unit information to be forwarded, and forward the unit information to a first application of a target unit;
the second forwarding unit is used for accessing the routing service component module through a pre-built inter-unit forwarding component module to acquire unit information to be forwarded and forwarding the unit information to a second application of the target unit;
the apparatus further comprises:
the selection unit is used for selecting a corresponding query mechanism according to the partition elements contained in the target external transaction request through a pre-constructed route query component module;
the third forwarding unit is used for directly inquiring the issued routing information to forward the transaction when the partition element is a general partition element; or, for the customized query element, the transaction forwarding is carried out by accessing the Redis to obtain the mapped target unit routing information;
the apparatus further comprises:
a storage unit for storing the mapping relationship between the non-partitioned elements and the partitioned elements by using a remote dictionary service Redis;
the mapping information between the partition elements and the units is configured in a configuration center and is uniformly distributed to various applications.
3. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein instructions, which when run on a terminal device, cause the terminal device to perform the method of claim 1.
CN202210711081.0A 2022-06-22 2022-06-22 Method, device and equipment for realizing customizable unitized routing component Active CN115118767B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210711081.0A CN115118767B (en) 2022-06-22 2022-06-22 Method, device and equipment for realizing customizable unitized routing component

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210711081.0A CN115118767B (en) 2022-06-22 2022-06-22 Method, device and equipment for realizing customizable unitized routing component

Publications (2)

Publication Number Publication Date
CN115118767A CN115118767A (en) 2022-09-27
CN115118767B true CN115118767B (en) 2024-03-01

Family

ID=83328378

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210711081.0A Active CN115118767B (en) 2022-06-22 2022-06-22 Method, device and equipment for realizing customizable unitized routing component

Country Status (1)

Country Link
CN (1) CN115118767B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110381163A (en) * 2019-07-30 2019-10-25 普信恒业科技发展(北京)有限公司 The method and gateway node of gateway node for transmitting service request
CN113656180A (en) * 2021-08-19 2021-11-16 中国银行股份有限公司 System and method for batch processing files under unitized architecture and related products
CN113918215A (en) * 2021-10-21 2022-01-11 广州新科佳都科技有限公司 Micro-service configuration system, equipment and medium
CN114363233A (en) * 2020-10-12 2022-04-15 网联清算有限公司 Packet routing method, device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11146658B2 (en) * 2019-07-30 2021-10-12 At&T Intellectual Property I, L.P. Enhanced self-assembling and self-configuring microservices

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110381163A (en) * 2019-07-30 2019-10-25 普信恒业科技发展(北京)有限公司 The method and gateway node of gateway node for transmitting service request
CN114363233A (en) * 2020-10-12 2022-04-15 网联清算有限公司 Packet routing method, device, electronic equipment and storage medium
CN113656180A (en) * 2021-08-19 2021-11-16 中国银行股份有限公司 System and method for batch processing files under unitized architecture and related products
CN113918215A (en) * 2021-10-21 2022-01-11 广州新科佳都科技有限公司 Micro-service configuration system, equipment and medium

Also Published As

Publication number Publication date
CN115118767A (en) 2022-09-27

Similar Documents

Publication Publication Date Title
US10387438B2 (en) Method and apparatus for integration of community-provided place data
US9363314B2 (en) Systems and methods for event notification framework in a machine-to-machine (M2M) context
US8045995B2 (en) Centralized location broker
JP4570252B2 (en) Determining where to place remote computers in a wide area network for conditional delivery of digitized products
US7827280B2 (en) System and method for domain name filtering through the domain name system
US8843580B2 (en) Criteria-based message publication control and feedback in a publish/subscribe messaging environment
US9083711B2 (en) Server computer, client device, and web-service-implemented data processing method
US10915554B2 (en) Database replication system
US8615580B2 (en) Message publication feedback in a publish/subscribe messaging environment
US8595380B2 (en) Message bus based replication
US20090319685A1 (en) Routing in a communications network using contextual information
US20090119376A1 (en) Hint-Based Email Address Construction
JP2013101676A (en) Dynamic parse/build engine for parsing multi-format messages
US8060586B2 (en) Dynamic web service deployment and integration
WO2002046971A1 (en) Remote service agent for sending commands and receiving data over e-mail network
US20110307543A1 (en) Servicing database operations using a messaging server
CN112311786B (en) Service request processing method and device, storage medium and computing equipment
CN107103011B (en) Method and device for realizing terminal data search
CN101609415A (en) Universal service calling system and method based on middleware
CN109617647A (en) Message forwarding method, device, computer equipment and computer readable storage medium
KR20120138175A (en) Housekeeping book service method and system using network information
US9736006B2 (en) Scalable address resolution in a communications environment
US20040002886A1 (en) System and method for processing a service order
CN112241474B (en) Information processing method, apparatus and storage medium
CN115118767B (en) Method, device and equipment for realizing customizable unitized routing component

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
GR01 Patent grant
GR01 Patent grant