CN115118767A - 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
CN115118767A
CN115118767A CN202210711081.0A CN202210711081A CN115118767A CN 115118767 A CN115118767 A CN 115118767A CN 202210711081 A CN202210711081 A CN 202210711081A CN 115118767 A CN115118767 A CN 115118767A
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.)
Granted
Application number
CN202210711081.0A
Other languages
Chinese (zh)
Other versions
CN115118767B (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

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/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 method, a device and equipment for realizing a customizable unitized routing assembly, which can be applied to the distributed field and the financial field, can realize the customizable unitized routing assembly and enable the unitized routing assembly to be lighter and more noninductive. The method comprises the following steps: firstly, when an application is started, marking each service unit through a service renaming component module constructed in advance, and registering the service units to a registration center; the method comprises the steps of reading routing information of a configuration center through a pre-constructed routing service component module and issuing the routing information to each service unit, then obtaining a target external transaction request through a gateway, inputting the target external transaction request into the pre-constructed gateway to a unit forwarding component module to access the routing service component module to obtain unit information to be forwarded, forwarding the unit information to a first application of a target unit, and further obtaining the unit information to be forwarded through the pre-constructed inter-unit forwarding component module and accessing the routing service component module and forwarding the unit information to a second application of the target unit.

Description

Method, device and equipment for realizing customizable unitized routing assembly
Technical Field
The present application 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 application system scale, the single application gradually falls into a bottleneck period, the distributed micro-service application architecture will replace the existing single application architecture, and the unit routing component is an indispensable part forming the distributed micro-service application architecture system.
There are currently two designs of unit routing components: one is the BFW service fragment routing component shown in fig. 1, and its specific implementation flow and use example are respectively shown in fig. 2 and fig. 3, which have the disadvantages of strong code intrusiveness, being not beneficial to the non-inductive design, simple component hierarchy, not supporting the complex mapping relation of routing elements, and poor component expansibility. The other is a global routing component and a transaction forwarding component in the technologies shown in fig. 4 and fig. 5, which have the disadvantages that each request requires the global routing component of the access server to obtain routing information, network requests are frequent, 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 imperceptible and enable request forwarding is an urgent problem to be solved at present.
Disclosure of Invention
The present invention provides a method, an apparatus, and a device for implementing a customizable unitized routing component, which can implement a 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 the service units to a registration center; reading the routing information of the configuration center through a pre-constructed routing service component module and sending the routing 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 a 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 includes:
selecting a corresponding query mechanism according to the partition elements contained in the target external transaction request through a pre-constructed routing query component module;
when the partition element is a general partition element, directly inquiring the issued routing information to carry out transaction forwarding; or, for the customized query element, the target unit routing information mapped by Redis access is acquired for transaction forwarding.
Optionally, the method further includes:
and storing the mapping relation between the non-partition elements and the partition elements 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, an embodiment of the present application further provides an apparatus for implementing 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 the service units to the registration center when the micro-service application is started; reading the routing information of the configuration center through a pre-constructed routing service component module and sending the routing information to each service unit;
the acquisition unit is used for acquiring a target external transaction request through a gateway;
the first forwarding unit is used for inputting the target external transaction request into a pre-constructed gateway to a unit forwarding component module so as to access the routing service component module to 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-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 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 routing 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 mapped target unit routing information is acquired by accessing Redis to perform transaction forwarding.
Optionally, the apparatus further comprises:
and the storage unit is used for storing the mapping relation between the non-partition elements and the partition elements 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.
An embodiment of the present application further provides an implementation device for a customizable unitized routing component, including: a processor, a memory, a system bus;
the processor and the memory are connected through the system bus;
the memory is used 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 one of the implementations of the method for implementing the customizable unitized routing component described above.
An embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on a terminal device, the terminal device is enabled to execute any implementation manner of the implementation method of the customizable unitized routing component.
The method, the device and the equipment for realizing the customizable unitized routing component provided by the embodiment of the application are characterized in that firstly, when a microservice application is started, each service unit is marked through a pre-constructed service renaming component module and is registered in a registration center; and reading the routing information of the configuration center through a pre-constructed routing service component module and issuing the routing information to each service unit, then acquiring a target external transaction request through a gateway, then inputting the target external transaction request into the pre-constructed gateway to a 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 further 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. Thereby enabling customizable unitized routing components and making them more lightweight and non-intrusive.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a code diagram of a BFW service fragmentation routing component provided in an embodiment of the present application;
fig. 2 is a schematic diagram of an implementation flow of a BFW service fragmentation routing component provided in an embodiment of the present application;
fig. 3 is a schematic diagram of a usage example of a BFW service fragmentation 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 the embodiment of the present application;
fig. 5 is a schematic diagram of a transaction forwarding component in the art according to an embodiment of the present disclosure;
fig. 6 is a schematic flowchart of an implementation method of a customizable unitized routing component according to an embodiment of the present application;
FIG. 7 is a schematic diagram illustrating module calls of a method for implementing a customizable unitized routing component according to an embodiment of the present application;
fig. 8 is a schematic functional implementation flowchart of a gateway-to-unit forwarding component module according to an embodiment of the present application;
fig. 9 is a schematic functional implementation flowchart of an inter-unit forwarding component module according to an embodiment of the present application;
fig. 10 is a schematic composition diagram of an implementation apparatus for a customizable unitized routing component according to an embodiment of the present application.
Detailed Description
At present, with the development of an application system and the expansion of the scale of the application system, the single application gradually falls into a bottleneck period, a distributed micro-service application architecture replaces the existing single application architecture, and a unit routing component is an indispensable part forming a distributed micro-service application architecture system. The following two designs of unit routing components exist:
first, BFW service fragment route assembly
In a service scenario with a large data volume and high concurrency, in order to avoid the problem of a single-node data volume being too large and a single-point read-write bottleneck, data often needs to support the capabilities of fragmentation (sharing) and replication (replica): the data is fragmented (sharding) according to a certain rule, each fragment stores a part of data, and the corresponding micro-service packet is deployed to access different fragment data respectively. For the micro-service consumers, different fragment micro-services need to be called according to a certain routing rule. Bfw abstracts the domain model and designs a service fragment access component bfw-sharing-router, as shown in fig. 1.
Fig. 2 is a flow for implementing a BFW service fragment routing component fragment routing, where a request is intercepted by a tangent plane and a doRouter method is released for custom routing by adding an @ sharing annotation to a called interface, and the method supports tsf-related routing configuration, as shown in the schematic diagram of an example of use shown in fig. 3.
Second, technology middle station global routing assembly and transaction forwarding assembly
The technical global routing component client provides the registration and query functions of the routing unit information. The components of transaction forwarding, asynchronous reliable messages, batch scheduling services, service arrangement and the like provided by the stations in the technology all depend on unit information provided by global routing. Portions of the global routing component (shown in FIG. 4) illustrate:
(1) global routing SDK: the SDK encapsulates specific routing positioning service logic, is responsible for communicating with a server, provides global routing service integration capability for gateway/micro-service application/service arrangement/asynchronous messages, and performs near routing and load balancing through a TSF platform when a client calls the server;
(2) global routing service: providing services such as inquiry, new addition, modification, cancellation and the like of a service element mapping relation for the SDK of the client;
(3) a database: and the database of the global routing component is responsible for recording the mapping relation of the service elements.
The routing component provides two mapping schemes:
the server only stores the first layer of mapping relation (business element- > client number) and does not store the second layer of mapping relation (client number- > logic fragment), and the second layer of mapping relation can be calculated and distributed through the client (according to the client number HASH).
Secondly, no mapping relation of the client number is established, the first layer of mapping relation (service element- > logic fragmentation) is stored in the server side, and other mapping relations are cached in the client side.
The transaction request obtains the unit information through the server side of the global routing component and is forwarded through the transaction forwarding component of the client side. Portions of the transaction forwarding component (shown in FIG. 5) illustrate:
(1) transaction forwarding SDK: providing a transaction forwarding function of the whole application service;
(2) cutting/intercepting: intercepting a transaction request, and analyzing a current request;
(3) customer elements: and after the request is intercepted, extracting the client element through the message body or the header.
(4) Routing strategy: pulling the policy configuration from the registry to provide policy selection for service location;
(5) service positioning: requesting global routing service to acquire a service unit information list through a client element and screening appropriate address information through a routing strategy;
(6) service routing: the current request service name is changed through the unit address positioned by the service to carry out the forwarding processing of the transaction;
(7) fault tolerance/retry: and re-forwarding the request with failed forwarding or returning the request with failed forwarding, and the like.
However, the two existing unit routing assemblies have the following disadvantages:
first, BFW service fragment route assembly
The code is relatively invasive and is not conducive to the design of an insensitive type.
And the component has simple hierarchy and does not support the complex mapping relation of the routing elements.
And the expansibility of the assembly is poor.
Second, technical middle platform matching assembly
The global routing component of the access server is required to acquire routing information for each request, and network requests are frequent.
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 them more lightweight and imperceptible and enable the forwarding of requests is a problem that is urgently to be solved at present.
In order to solve the above-mentioned defects, the embodiment of the present application provides a method for implementing a customizable unitized routing component, and when a microservice application is started, each service unit is marked by a service rename component module constructed in advance and is registered in a registry; and reading the routing information of the configuration center through a pre-constructed routing service component module and issuing the routing information to each service unit, then acquiring a target external transaction request through a gateway, then inputting the target external transaction request into the pre-constructed gateway to a 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 further 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. Thereby enabling customizable unitized routing components and making them more lightweight and non-intrusive.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in 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 obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
First embodiment
Referring to fig. 6, a flow chart of a method for implementing a customizable unitized routing module provided in this embodiment is schematically shown, where the method includes the following steps:
s601: when the micro-service application is started, marking each service unit through a service renaming component module which is constructed in advance, and registering the service units to a registration center; and reading the routing information of the configuration center through a pre-constructed routing service component module and sending 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 noninductive, the present application constructs four component modules in advance: service renaming component module, route service component module, gateway-to-unit forwarding component module and inter-unit forwarding component module. Therefore, when the micro-service application is started, each service unit can be marked through a pre-constructed service renaming component module and registered in a registration center; and reading the routing information of the configuration center through a pre-constructed routing service component module and sending 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 the unit forwarding component module so as to access the routing service component module to acquire unit information to be forwarded and forward the unit information to a first application of the target unit.
In this embodiment, after the target external transaction request is acquired in step S602, the target external transaction request may be further input into a pre-constructed gateway-to-unit forwarding component module to access the routing service component module, so as to acquire unit information to be forwarded, and forward the unit information to the first application of the target unit, so as to execute subsequent step S604.
Specifically, after a target external transaction request enters from the gateway, the access routing service component module first obtains unit information to be forwarded through the gateway to the unit forwarding component module, and forwards the unit information to the application a module of the target unit, as shown in steps (r) to (c) of fig. 7.
S604: and accessing the routing service component module through the 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.
In this embodiment, after the unit information is forwarded to the first application of the target unit in step S603, the routing service component module may be further accessed through a pre-constructed inter-unit forwarding component module to obtain the unit information to be forwarded, and forward the unit information to the second application of the target unit.
Specifically, the target external transaction request is forwarded from the application a module in the target unit to the application B module by the inter-unit forwarding component module, the access routing service component module obtains the unit information to be forwarded, and forwards it to the application B module of the target unit, as shown in fig. 7
Figure BDA0003708032310000081
It should be noted that the key of the present application is the design part of the forwarding component processing logic, the target external transaction request is from the gateway to the unit, and the processing logic of the request is different between the units. Aiming at different route query relations, a corresponding query mechanism can be selected through a pre-constructed route query component module according to the partition elements contained in the target external transaction request, and when the partition elements are general partition elements, issued route information is directly queried for transaction forwarding; or, for the customized query element, the mapped target unit routing information is acquired by accessing Redis to perform transaction forwarding.
In addition, in the present application, a mapping relationship between a non-partition element and a partition element is stored by using a remote dictionary service Redis. And the mapping information between the partition elements and the units is configured in a configuration center and is uniformly issued to each application. Additionally, as shown in fig. 8, a functional implementation flow diagram of a gateway-to-element forwarding component module is shown; as shown in fig. 9, a flow diagram of a functional implementation of the inter-unit forwarding component module is shown.
Therefore, the micro-service application registers the information of the fragment units to a registration center through the service renaming component module when being started, a transaction request enters the service application from the gateway, and sequentially passes through the gateway of the client to the unit forwarding component module and the inter-unit forwarding component module to inquire unit routing information. The unit routing information is uniformly issued to each unit module through the routing service assembly module, the routing service assembly module constantly checks the activity state of each unit of the registration center and broadcasts the change of the routing configuration information to each unit, and if some units need to be added with routing query elements, the routing service assembly module stores the 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 to S604, a customizable unitized routing component is designed, where the routing configuration information is that when the application is started, the routing service component module reads the routing information from the configuration center and sends the routing information to each unit in a unified manner, and there is no access from the service end, no network resource is consumed, and only when the routing configuration information changes, the change information is broadcasted to the local units in a unified manner. Furthermore, supporting customized routing elements and storage by Redis, the entire unit routing component is more lightweight and non-intrusive for microservice applications. That is, under the micro service application system, the routing transaction request forwarding inside each unit and among the units in the unit architecture system is satisfied, and the unit architecture system has the expansibility and supports the customized routing query element.
In summary, in the implementation method of the customizable unitized routing component provided in this embodiment, first, when the microservice application is started, each service unit is marked by a service rename component module that is constructed in advance, and is registered in the registry; and reading the routing information of the configuration center through a pre-constructed routing service component module and issuing the routing information to each service unit, then acquiring a target external transaction request through a gateway, then inputting the target external transaction request into the pre-constructed gateway to a 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 further 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. Thereby enabling customizable unitized routing components and making them more lightweight and non-intrusive.
Second embodiment
In this embodiment, a device for implementing a customizable unitized routing module will be described, and for related contents, reference is made to the above method embodiment.
Referring to fig. 10, a schematic composition diagram of an implementation apparatus for a customizable unitized routing component provided in this embodiment specifically includes:
the issuing unit 1001 is used for marking each service unit through a pre-constructed service renaming component module and registering the service units to a registration center when the micro-service application is started; reading the routing information of the configuration center through a pre-constructed routing service component module and sending the routing information to each service unit;
an obtaining unit 1002, configured to obtain a target external transaction request through a gateway;
a first forwarding unit 1003, configured to input the target external transaction request into a pre-constructed gateway to a unit forwarding component module, so as 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;
a second forwarding unit 1004, configured to access the routing service component module through a pre-constructed inter-unit forwarding component module, to obtain unit information to be forwarded, and forward the unit information to a second application of the target unit.
In an implementation manner 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 routing 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 target unit routing information mapped by Redis access is acquired for transaction forwarding.
In an implementation manner 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 a remote dictionary service Redis.
In an implementation manner of this embodiment, the mapping information between the partition elements and the units is configured in a configuration center and is issued to each application in a unified manner.
In summary, in the implementation apparatus for a customizable unitized routing component provided in this embodiment, first, when a microservice application is started, each service unit is marked by a service rename component module that is constructed in advance, and is registered in a registry; and reading the routing information of the configuration center through a pre-constructed routing service component module and issuing the routing information to each service unit, then acquiring a target external transaction request through a gateway, then inputting the target external transaction request into the pre-constructed gateway to a 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 further 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. Thereby enabling customizable unitized routing components and making them more lightweight and non-intrusive.
Further, an embodiment of the present application further provides an implementation device of a customizable unitized routing component, including: a processor, a memory, a 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 including instructions, which when executed by the processor, cause the processor to perform any of the implementations of the customizable routing component described above.
Further, an embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a terminal device, the instructions cause the terminal device to execute any one of the implementation methods of the customizable unitized routing component.
As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the above embodiment methods can be implemented by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be essentially or partially implemented 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., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
In addition, it should be noted that the implementation method, apparatus and device of the customizable unitized routing component provided by the present invention can be used in the distributed field and the financial field. The foregoing is only an example, and does not limit the application fields of the method, apparatus and device for implementing the customizable unitized routing component provided in the present invention.
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 (10)

1. A method for implementing a customizable unitized routing component, the method comprising:
when the micro-service application is started, marking each service unit through a service renaming component module which is constructed in advance, and registering the service units to a registration center; reading the routing information of the configuration center through a pre-constructed routing service component module and sending the routing 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 a 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.
2. The method of claim 1, further comprising:
selecting a corresponding query mechanism according to the partition elements contained in the target external transaction request through a pre-constructed routing query component module;
when the partition element is a general partition element, directly inquiring the issued routing information to carry out transaction forwarding; or, for the customized query element, the target unit routing information mapped by Redis access is acquired for transaction forwarding.
3. The method of claim 2, further comprising:
and storing the mapping relation between the non-partition elements and the partition elements by using a remote dictionary service Redis.
4. A method according to any one of claims 2 to 3, wherein the mapping information between the partition elements and the units is configured in a configuration center and is issued to each application in a unified manner.
5. An apparatus for implementing a customizable unitized routing component, the apparatus comprising:
the issuing unit is used for marking each service unit through a service rename component module constructed in advance when the micro service application is started and registering the service units to the registration center; reading the routing information of the configuration center through a pre-constructed routing service component module and sending the routing information to each service unit;
the acquisition unit is used for acquiring a target external transaction request through a gateway;
the first forwarding unit is used for inputting the target external transaction request into a pre-constructed gateway to a unit forwarding component module so as to access the routing service component module to 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-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.
6. The apparatus of claim 5, further comprising:
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 routing 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 mapped target unit routing information is acquired by accessing Redis to perform transaction forwarding.
7. The apparatus of claim 6, further comprising:
and the storage unit is used for storing the mapping relation between the non-partition elements and the partition elements by using a remote dictionary service Redis.
8. The apparatus according to any one of claims 6-7, wherein the mapping information between the partition elements and the units is configured in a configuration center and is issued to each application uniformly.
9. An apparatus for implementing a customizable unitized routing component, comprising: a processor, a memory, a system bus;
the processor and the memory are connected through the system bus;
the memory is to store one or more programs, the one or more programs comprising instructions, which when executed by the processor, cause the processor to perform the method of any of claims 1-4.
10. A computer-readable storage medium having stored therein instructions that, when executed on a terminal device, cause the terminal device to perform the method of any one of claims 1-4.
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 true CN115118767A (en) 2022-09-27
CN115118767B 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 (5)

* 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
US20210037114A1 (en) * 2019-07-30 2021-02-04 At&T Intellectual Property I, L.P. Enhanced self-assembling and self-configuring microservices
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

Patent Citations (5)

* 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
US20210037114A1 (en) * 2019-07-30 2021-02-04 At&T Intellectual Property I, L.P. Enhanced self-assembling and self-configuring microservices
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
CN115118767B (en) 2024-03-01

Similar Documents

Publication Publication Date Title
US9880982B2 (en) System and method for rendering presentation pages based on locality
EP2485168B1 (en) System and method for searching disparate datastores via a remote device
US9363314B2 (en) Systems and methods for event notification framework in a machine-to-machine (M2M) context
EP1753195B1 (en) Server computer, client device and web service implemented data processing method
US8306979B2 (en) Service query, selection, routing and propagation
US7877682B2 (en) Modular distributed mobile data applications
US8443380B2 (en) Web services layer synchrony in relation to the business layer synchrony
US8595380B2 (en) Message bus based replication
US20070026855A1 (en) Mobile electronic device and methods for providing information to a mobile electronic device using a web service
WO2002046971A1 (en) Remote service agent for sending commands and receiving data over e-mail network
CN101609415B (en) Universal service calling system and method based on middleware
US8060586B2 (en) Dynamic web service deployment and integration
US9031991B2 (en) Web service interface for order management system
US20070083599A1 (en) System for transforming application data using xslt extensions to render templates from cache and related methods
CN109617647A (en) Message forwarding method, device, computer equipment and computer readable storage medium
KR20120138175A (en) Housekeeping book service method and system using network information
AU2005201783A1 (en) Computer system and method for providing a failure resistant data processing service
CN115118767A (en) Method, device and equipment for realizing customizable unitized routing component
CN116647552A (en) Service processing method and system in heterogeneous micro-service cluster, terminal and storage medium
KR101040891B1 (en) System for Providing of Complex Service in Wireless Internet
CN108011804B (en) Service pairing system and method for instant messaging software
US8185911B2 (en) System and method for simplification of data structure in wireless communications
EP1999643A1 (en) System and method for rendering presentation pages based on locality
CN115794931B (en) Early warning method, system, equipment and storage medium of NDC aggregator
CN101406007B (en) System and method for configuring mobile radio communication equipment to include image and voice data indicator representation

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