CN114884855A - Routing method and system under asynchronous communication - Google Patents

Routing method and system under asynchronous communication Download PDF

Info

Publication number
CN114884855A
CN114884855A CN202210807873.8A CN202210807873A CN114884855A CN 114884855 A CN114884855 A CN 114884855A CN 202210807873 A CN202210807873 A CN 202210807873A CN 114884855 A CN114884855 A CN 114884855A
Authority
CN
China
Prior art keywords
request
service
uplink
uplink request
serial number
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
CN202210807873.8A
Other languages
Chinese (zh)
Other versions
CN114884855B (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.)
Simple Information Technology Guangzhou Co ltd
Original Assignee
Simple Information Technology Guangzhou Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Simple Information Technology Guangzhou Co ltd filed Critical Simple Information Technology Guangzhou Co ltd
Priority to CN202210807873.8A priority Critical patent/CN114884855B/en
Publication of CN114884855A publication Critical patent/CN114884855A/en
Application granted granted Critical
Publication of CN114884855B publication Critical patent/CN114884855B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a routing method under asynchronous communication, which receives an uplink request and matches a downlink message into a corresponding service through an exchange service by constructing the exchange service. The invention also provides a routing system under asynchronous communication, developers can respectively request downlink messages and accurately return own local services under respective development environments, and the problem that the downlink messages are received by other developers during multi-person collaborative development under asynchronous communication is effectively avoided; meanwhile, in the testing process, the testing request downlink message of the tester can also accurately return the service sent by the uplink request, the development environment and the testing environment are shielded, and the problem that data in different environments interfere with each other when the docking environment of a third party is not matched is effectively avoided.

Description

Routing method and system under asynchronous communication
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a routing method and system under asynchronous communication.
Background
The existing software is more and more in development, test and application environments, and when the software needs to be docked with a third party, the situation that the environment cannot be matched with the development environment often occurs, for example, one party has 4 development, test, pre-release and production environments, and the docking party only has 2 development and production environments, so that the following problems can be encountered:
1. in the development process of a development team, as asynchronous communication is adopted by a third party at present, the downlink of a debugging request of a developer can be received by other developers, and the debugging effect cannot be achieved;
2. after software development is completed and the test is carried out, the test environment is still connected with the development environment of the butt joint party, at the moment, some parallel projects in the original development environment need to be developed in the development environment, the situation that the development environment and the test environment of a sender are connected with the development environment of the butt joint party can occur, development and test can interfere with each other in actual operation, and the development efficiency and the test effect are seriously influenced.
The prior art discloses an automatic testing method for a multi-environment multi-platform embedded system, which can improve the testing efficiency of software on the multi-platform multi-environment embedded device by starting a plurality of testing nodes which are respectively communicated with corresponding testing devices, selecting a corresponding compiling mode according to an operating system of a device to be tested to generate a corresponding testing case to execute testing, and returning a testing result.
Disclosure of Invention
In order to solve at least one technical defect, the invention provides a routing method and a routing system under asynchronous communication, which solve the problem that a downlink message is received by other developers during multi-person collaborative development under asynchronous communication, and simultaneously solve the problem that data in different environments interfere with each other when a third party is not matched with a docking environment.
In order to solve the technical problems, the technical scheme of the invention is as follows:
a routing method under asynchronous communication comprises an access process, an execution process and a restoration process; wherein, the access process includes:
a1: building an exchange service only used during development and test, wherein the exchange service is connected with a plurality of development environments and test environments;
a2: accessing exchange service, and changing the uplink request of the development environment or the test environment from being directly sent to the third-party service to being sent to the exchange service; meanwhile, the downlink message returned by the third-party service is changed from being directly sent to the gateway to being sent to the exchange service;
the execution process comprises the following steps:
b1: when the uplink request is sent to the exchange service, the exchange service analyzes the uplink request, records the serial number of the uplink request and the request IP, and then forwards the uplink request to a third-party service;
b2: the third party service executes the uplink request and returns the downlink message to the exchange service;
b3: the exchange service analyzes the downlink message and acquires an uplink request serial number in the downlink message;
b4: the exchange service inquires a corresponding request IP through an uplink request serial number and sends a downlink message to the inquired request IP;
the reduction process is as follows: and disconnecting the exchange service, changing the uplink request of the development environment or the test environment into the uplink request directly sent to the third-party service, directly sending the downlink message returned by the third-party service to the gateway, and then distributing the downlink message to the development environment or the test environment by the gateway at random.
In the execution process of the scheme, developers can respectively request the downlink message and accurately return own local service under respective development environments, so that the problem that the downlink message is received by other developers during multi-person collaborative development under asynchronous communication is effectively avoided; meanwhile, in the testing process, the testing request downlink message of the tester can also accurately return the service sent by the uplink request, the development environment and the testing environment are shielded, and the problem that data in different environments interfere with each other when the docking environment of a third party is not matched is effectively avoided.
The uplink request comprises an uplink message header and an uplink message body, wherein the uplink message header comprises a service type and an uplink request serial number; wherein: the service type is used for recording a request strategy instruction and is executed by a third-party service; the uplink request serial number is used for recording a serial number of an uplink request; the uplink message body is used for storing relevant data under the request strategy instruction;
in the B3, the third party service will execute the request policy instruction based on the relevant data under the request policy instruction, and return a control policy instruction; and meanwhile, the control strategy command and the uplink request serial number are packaged to generate a downlink message.
The downlink message comprises a downlink message header and a downlink message body, wherein the downlink message header comprises a control strategy instruction and an uplink request serial number; wherein: the control strategy instruction is used for controlling the exchange service to execute corresponding forwarding operation; the uplink request serial number is used for matching and acquiring a corresponding request IP; the downlink message body is used for storing related data under the control strategy instruction;
in the B4, the exchange service is configured to obtain a corresponding request IP by matching according to the serial number of the uplink request, and send the downlink message body to the queried request IP according to the control policy instruction.
In B4, the exchange service only executes point-to-point forwarding, group sending, or partial forwarding according to the control policy instruction, and does not modify data in the downlink message body, thereby ensuring that the whole service flow is not affected.
The exchange service is built based on a springboot framework, and the essence of the exchange service is to maintain a list Msgip-IP; when receiving an uplink request, taking out the request IP and the uplink request serial number Msgip; storing the uplink request serial number Msgip and the request IP into a cache redis of exchange service by Key and Value respectively; when receiving a downlink message, the method acquires an uplink request flow number Msgip in the downlink message, queries a corresponding Value, namely a request IP, in the redis by taking the Msgip as a Key, and then sends the downlink message to the queried request IP.
The scheme also provides a routing system under asynchronous communication, which is used for executing a routing method under asynchronous communication and comprises a plurality of development environments, test environments, third-party service environments, service building modules, service access modules, service execution modules and service disconnection modules; wherein:
the service building module is used for building an exchange service which is only used in the development and test period, and the exchange service is respectively connected with a plurality of development environments and test environments and is simultaneously connected with a third-party service environment; the development environment and the test environment are used for sending an uplink request; the third-party service environment is used for executing the uplink request and returning the downlink message to the exchange service; the service access module is used for accessing exchange services and changing the uplink request of a development environment or a test environment from being directly sent to a third-party service to being sent to the exchange services; meanwhile, the downlink message returned by the third-party service is changed from being directly sent to the gateway to being sent to the exchange service; the service execution module is used for executing exchange service, when the uplink request reaches the exchange service, the exchange service analyzes the uplink request, records the serial number of the uplink request and the request IP, and forwards the uplink request to a third-party service environment; when the downlink message reaches the exchange service, the exchange service analyzes the downlink message, acquires an uplink request serial number in the downlink message, queries a corresponding request IP through the uplink request serial number, and sends the downlink message to the queried request IP; the service disconnection module is used for disconnecting the exchange service, changing the uplink request of the development environment or the test environment into the uplink request directly sent to the third-party service, directly sending the downlink message returned by the third-party service to the gateway, and then distributing the downlink message to the development environment or the test environment by the gateway at random.
The uplink request comprises an uplink message header and an uplink message body, wherein the uplink message header comprises a service type and an uplink request serial number; wherein: the service type is used for recording a request strategy instruction and is executed by a third-party service environment; the uplink request serial number is used for recording a serial number of an uplink request; the uplink message body is used for storing relevant data under the request strategy instruction; the third-party service environment executes the request strategy instruction based on the related data under the request strategy instruction and returns a control strategy instruction; and meanwhile, the control strategy command and the uplink request serial number are packaged to generate a downlink message.
The downlink message comprises a downlink message header and a downlink message body, wherein the downlink message header comprises a control strategy instruction and an uplink request serial number; wherein: the control strategy instruction is used for controlling the exchange service to execute corresponding forwarding operation; the uplink request serial number is used for matching and acquiring a corresponding request IP; the downlink message body is used for storing related data under the control strategy instruction; in the service execution module, the exchange service is used for matching and acquiring a corresponding request IP according to the uplink request serial number, and sending the downlink message body to the inquired request IP according to the control strategy instruction.
In the service execution module, the exchange service only executes point-to-point forwarding, group sending or partial forwarding according to the control strategy instruction, does not modify data in a downlink message body, and ensures that the whole service flow is not influenced.
The service building module builds exchange service based on a springboot framework, and the essence of the exchange service is to maintain a list Msgip-IP. In the service execution module, when an exchange service receives an uplink request, taking out a request IP and an uplink request serial number Msgip; storing the uplink request serial number Msgip and the request IP into a cache redis of exchange service by using Key and Value respectively; when the exchange service receives a downlink message, an uplink request flow number Msgip in the downlink message is obtained, a corresponding Value, namely a request IP, is inquired in the redis by taking the Msgip as a Key, and then the downlink message is sent to the inquired request IP.
Compared with the prior art, the technical scheme of the invention has the beneficial effects that:
the invention provides a routing method and a system under asynchronous communication, which can enable developers to independently request downlink messages and accurately return own local services under respective development environments, and effectively avoid the problem that the downlink messages are received by other developers when a plurality of persons develop in a cooperative manner under asynchronous communication; meanwhile, in the testing process, the testing request downlink message of the tester can also accurately return the service sent by the uplink request, the development environment and the testing environment are shielded, and the problem that data in different environments interfere with each other when the docking environment of a third party is not matched is effectively avoided.
Drawings
Fig. 1 is a schematic flow chart of a routing method in asynchronous communication according to the present invention;
fig. 2 is a schematic diagram illustrating connection of routing system modules in asynchronous communication according to the present invention;
FIG. 3 is a diagram of an original system communication framework according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a communication framework of a routing system under asynchronous communication according to an embodiment of the present invention.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent;
the embodiment is a complete use example and has rich content
For the purpose of better illustrating the embodiments, certain features of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product;
it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The technical solution of the present invention is further described below with reference to the accompanying drawings and examples.
Example 1
As shown in fig. 1, a routing method under asynchronous communication includes an access procedure, an execution procedure, and a restoration procedure; wherein, the access process includes:
a1: building an exchange service which is only used during development and testing, wherein the exchange service is connected with a plurality of development environments and testing environments;
a2: accessing exchange service, and changing the uplink request of the development environment or the test environment from being directly sent to the third-party service to being sent to the exchange service; meanwhile, the downlink message returned by the third-party service is changed from being directly sent to the gateway to being sent to the exchange service;
the execution process comprises the following steps:
b1: when the uplink request is sent to the exchange service, the exchange service analyzes the uplink request, records the serial number of the uplink request and the request IP, and then forwards the uplink request to a third-party service;
b2: the third party service executes the uplink request and returns the downlink message to the exchange service;
b3: the exchange service analyzes the downlink message and acquires an uplink request serial number in the downlink message;
b4: the exchange service inquires a corresponding request IP through an uplink request serial number and sends a downlink message to the inquired request IP;
the reduction process is as follows: and disconnecting the exchange service, changing the uplink request of the development environment or the test environment into the uplink request directly sent to the third-party service, directly sending the downlink message returned by the third-party service to the gateway, and then distributing the downlink message to the development environment or the test environment by the gateway at random.
In the execution process of the embodiment, developers can respectively request the downlink message and accurately return own local service under respective development environments, so that the problem that the downlink message is received by other developers during multi-user collaborative development under asynchronous communication is effectively solved; meanwhile, in the testing process, the testing request downlink message of the tester can also accurately return the service sent by the uplink request, the development environment and the testing environment are shielded, and the problem that data in different environments interfere with each other when the docking environment of a third party is not matched is effectively avoided.
More specifically, the uplink request includes an uplink message header and an uplink message body, and the uplink message header includes a service type and an uplink request serial number; wherein: the service type is used for recording a request strategy instruction and is executed by a third-party service; the uplink request serial number is used for recording a serial number of an uplink request; the uplink message body is used for storing relevant data under the request strategy instruction;
in the B3, the third party service will execute the request policy instruction based on the relevant data under the request policy instruction, and return a control policy instruction; and meanwhile, the control strategy command and the uplink request serial number are packaged to generate a downlink message.
In the specific implementation process, the uplink request can adopt a JSON format, the data format is simple and easy to read and write, and the formats are all compressed, so that the occupied bandwidth is small; the format is easy to analyze, supports multiple languages including ActionScript, C, C #, Coldfusion, Java, JavaScript, Perl, PHP, Python, Ruby and other languages, is convenient for analyzing the service, has strong applicability to the implementation of the method provided by the embodiment, greatly simplifies the code development amount of the server side and the client side, and is easy to maintain.
More specifically, the downlink packet may also adopt a JSON format, which includes a downlink packet header and a downlink packet body, where the downlink packet header includes a control policy instruction and an uplink request serial number; wherein: the control strategy instruction is used for controlling the exchange service to execute corresponding forwarding operation; the uplink request serial number is used for matching and acquiring a corresponding request IP; the downlink message body is used for storing related data under the control strategy instruction;
in the B4, the exchange service is configured to obtain a corresponding request IP by matching according to the serial number of the uplink request, and send the downlink message body to the queried request IP according to the control policy instruction.
In a specific implementation process, the control policy instruction is a rule formulated for forwarding the downlink message, for example, when the service type of the uplink request is "drawing a ticket", the control policy instruction in the corresponding downlink message directs the exchange service to forward the corresponding message data to the service which sends the request and executes a corresponding execution command; when the service type of the uplink request is "time check" or "general service notification", the control policy instruction in the corresponding downlink message instructs the exchange service to forward the corresponding message data to all services and perform time check or service notification.
In B4, the exchange service only performs point-to-point forwarding, group sending, or partial forwarding according to the control policy instruction, and does not modify data in the downlink message body, thereby ensuring that the entire service flow is not affected.
More specifically, the exchange service is built based on a springboot framework, and the essence of the exchange service is to maintain a list Msgip-IP; when receiving an uplink request, taking out the request IP and the uplink request serial number Msgip; storing the uplink request serial number Msgip and the request IP into a cache redis of exchange service by Key and Value respectively; when receiving a downlink message, the method acquires an uplink request flow number Msgip in the downlink message, queries a corresponding Value, namely a request IP, in the redis by taking the Msgip as a Key, and then sends the downlink message to the queried request IP.
Example 2
More specifically, the embodiment further provides a routing system under asynchronous communication, configured to execute a routing method under asynchronous communication, as shown in fig. 2, where the routing system includes a plurality of development environments, a test environment, a third-party service environment, a service building module, a service access module, a service execution module, and a service disconnection module; wherein:
the service building module is used for building an exchange service which is only used in a development and test period, and the exchange service is respectively connected with a plurality of development environments and test environments and is simultaneously connected with a third-party service environment; the development environment and the test environment are used for sending an uplink request; the third-party service environment is used for executing the uplink request and returning the downlink message to the exchange service; the service access module is used for accessing exchange services and changing the uplink request of a development environment or a test environment from being directly sent to a third-party service to being sent to the exchange services; meanwhile, the downlink message returned by the third-party service is changed from being directly sent to the gateway to being sent to the exchange service; the service execution module is used for executing exchange service, when the uplink request reaches the exchange service, the exchange service analyzes the uplink request, records the serial number of the uplink request and the request IP, and forwards the uplink request to a third-party service environment; when the downlink message reaches the exchange service, the exchange service analyzes the downlink message, acquires an uplink request serial number in the downlink message, queries a corresponding request IP through the uplink request serial number, and sends the downlink message to the queried request IP; the service disconnection module is used for disconnecting the exchange service, changing the uplink request of the development environment or the test environment into the uplink request directly sent to the third-party service, directly sending the downlink message returned by the third-party service to the gateway, and then distributing the downlink message to the development environment or the test environment by the gateway at random.
More specifically, the uplink request includes an uplink message header and an uplink message body, and the uplink message header includes a service type and an uplink request serial number; wherein: the service type is used for recording a request strategy instruction and is executed by a third-party service environment; the uplink request serial number is used for recording a serial number of an uplink request; the uplink message body is used for storing relevant data under the request strategy instruction; the third-party service environment executes the request strategy instruction based on the related data under the request strategy instruction and returns a control strategy instruction; and meanwhile, the control strategy command and the uplink request serial number are packaged to generate a downlink message.
More specifically, the downlink packet includes a downlink packet header and a downlink packet body, where the downlink packet header includes a control policy instruction and an uplink request serial number; wherein: the control strategy instruction is used for controlling the exchange service to execute corresponding forwarding operation; the uplink request serial number is used for matching and acquiring a corresponding request IP; the downlink message body is used for storing related data under the control strategy instruction; in the service execution module, the exchange service is used for matching and acquiring a corresponding request IP according to the uplink request serial number, and sending the downlink message body to the inquired request IP according to the control strategy instruction.
More specifically, in the service execution module, the exchange service only executes point-to-point forwarding, group sending or partial forwarding according to the control policy instruction, and does not modify data in the downlink message body, thereby ensuring that the whole service flow is not affected.
More specifically, the service building module builds exchange service based on a springboot framework, and the essence of the exchange service is to maintain a list Msgip-IP. In the service execution module, when an exchange service receives an uplink request, taking out a request IP and an uplink request serial number Msgip; storing the uplink request serial number Msgip and the request IP into a cache redis of exchange service by Key and Value respectively; when the exchange service receives a downlink message, an uplink request flow number Msgip in the downlink message is obtained, a corresponding Value, namely a request IP, is inquired in the redis by taking the Msgip as a Key, and then the downlink message is sent to the inquired request IP.
In the specific implementation process, the system can well realize the routing method under asynchronous communication, developers can respectively request downlink messages and accurately return local services of the developers under respective development environments, and the problem that the downlink messages are received by other developers when a plurality of persons develop in a cooperative manner under asynchronous communication is effectively solved; meanwhile, in the testing process, the testing request downlink message of the tester can also accurately return the service sent by the uplink request, the development environment and the testing environment are shielded, and the problem that data in different environments interfere with each other when the docking environment of a third party is not matched is effectively avoided.
Example 3
More specifically, in order to further illustrate the advantages of the routing system under asynchronous communication provided by the present invention, the present embodiment compares it with the original system.
In the original system, as shown in fig. 3, the upstream requests of the supply-bill-1 development environment in which the developer 1 is located, the supply-bill-2 development environment in which the developer 2 is located, and the test environment in which the supply-bill-3 is located are all directly connected to the third-party service, and the downstream return of the third-party service is directly handed to the gateway getaway and randomly allocated by the gateway getaway.
In the development stage of the scheme, the downward movement among developers often flees, so that the debugging is very difficult; in the testing phase, the test request of the tester is often sent to the service of the development environment or the local service of the developer, resulting in slow testing progress.
In the system provided in this embodiment, as shown in fig. 4, after completing the exchange service access operation, the upstream requests of the supply-bill-1 development environment where the developer 1 is located, the supply-bill-2 development environment where the developer 2 is located, and the test environment where the supply-bill-3 is located are all connected to the exchange service, and then forwarded to the third-party service by the exchange service; and the downlink return of the third-party service is directly delivered to the exchange service, and then the exchange service carries out matching distribution. After the development test is executed, only the exchange service needs to be disconnected, and the system can be restored to the execution model of the original system.
In the access process of the exchange service of the scheme, only the request of a development environment or a test environment needs to be changed into the request of the exchange service, and the downlink return address of the third-party service is configured as the request address of the exchange service; in the process of disconnecting the exchange service, only the request of the development environment or the test environment needs to be changed into the request of the third-party service directly, and the downlink return address of the third-party service is configured as the address of the development environment or the test environment.
In the specific implementation process, the exchange service of the embodiment essentially maintains a list Msgip-IP. When the exchange service receives an uplink request, taking out the request IP and the uplink request serial number Msgip; storing the uplink request serial number Msgip and the request IP into a cache redis of exchange service by Key and Value respectively; when the exchange service receives a downlink message, an uplink request flow number Msgip in the downlink message is obtained, a corresponding Value, namely a request IP, is inquired in the redis by taking the Msgip as a Key, and then the downlink message is sent to the inquired request IP.
In the development stage, developers can accurately return own native services after respective requests of the developers are descended, and mutual influence cannot occur; in the testing stage, the downlink return of the third-party service can accurately return the service sent by the uplink request, so that the development environment and the testing environment can be well shielded, and the problem that data in different environments interfere with each other when the docking environment of the third party is not matched is effectively avoided.
It should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.

Claims (10)

1. A routing method under asynchronous communication is characterized by comprising an access process, an execution process and a recovery process; wherein, the access process includes:
a1: building an exchange service which is only used during development and testing, wherein the exchange service is connected with a plurality of development environments and testing environments;
a2: accessing exchange service, and changing the uplink request of the development environment or the test environment from being directly sent to the third-party service to being sent to the exchange service; meanwhile, the downlink message returned by the third-party service is changed from being directly sent to the gateway to being sent to the exchange service;
the execution process comprises the following steps:
b1: when the uplink request is sent to the exchange service, the exchange service analyzes the uplink request, records the serial number of the uplink request and the request IP, and then forwards the uplink request to a third-party service;
b2: the third party service executes the uplink request and returns the downlink message to the exchange service;
b3: the exchange service analyzes the downlink message and acquires an uplink request serial number in the downlink message;
b4: the exchange service inquires a corresponding request IP through an uplink request serial number and sends a downlink message to the inquired request IP;
the reduction process is as follows: and disconnecting the exchange service, changing the uplink request of the development environment or the test environment into the uplink request directly sent to the third-party service, directly sending the downlink message returned by the third-party service to the gateway, and then distributing the downlink message to the development environment or the test environment by the gateway at random.
2. The routing method according to claim 1, wherein the uplink request includes an uplink message header and an uplink message body, and the uplink message header includes a service type and an uplink request serial number; wherein:
the service type is used for recording a request strategy instruction and is executed by a third-party service; the uplink request serial number is used for recording a serial number of an uplink request; the uplink message body is used for storing relevant data under the request strategy instruction;
in the B3, the third party service will execute the request policy instruction based on the relevant data under the request policy instruction, and return a control policy instruction; and meanwhile, the control strategy command and the uplink request serial number are packaged to generate a downlink message.
3. The routing method according to claim 2, wherein the downlink packet includes a downlink packet header and a downlink packet body, and the downlink packet header includes a control policy instruction and an uplink request serial number; wherein:
the control strategy instruction is used for controlling the exchange service to execute corresponding forwarding operation; the uplink request serial number is used for matching and acquiring a corresponding request IP; the downlink message body is used for storing related data under the control strategy instruction;
in the B4, the exchange service is configured to obtain a corresponding request IP by matching according to the serial number of the uplink request, and send the downlink message body to the queried request IP according to the control policy instruction.
4. The routing method according to claim 3, wherein in B4, the exchange service only performs point-to-point forwarding, group forwarding or partial forwarding according to the control policy instruction, and does not modify data in the downstream message body, thereby ensuring no impact on the whole service flow.
5. The routing method under asynchronous communication according to any one of claims 1 to 4, wherein the exchange service is built based on a springboot framework, which is essentially to maintain a list Msgip-IP;
when receiving an uplink request, taking out the request IP and the uplink request serial number Msgip; storing the uplink request serial number Msgip and the request IP into a cache redis of exchange service by Key and Value respectively;
when receiving a downlink message, the method acquires an uplink request serial number Msgip in the downlink message, queries a corresponding Value, namely a request IP, in redis by taking the Msgip as a Key, and then sends the downlink message to the queried request IP.
6. A routing system under asynchronous communication comprises a plurality of development environments, a test environment and a third-party service environment; the system is characterized by also comprising a service building module, a service access module, a service execution module and a service disconnection module; wherein:
the service building module is used for building an exchange service which is only used in the development and test period, and the exchange service is respectively connected with a plurality of development environments and test environments and is simultaneously connected with a third-party service environment;
the development environment and the test environment are used for sending an uplink request;
the third-party service environment is used for executing the uplink request and returning the downlink message to the exchange service;
the service access module is used for accessing exchange services and changing the uplink request of a development environment or a test environment from being directly sent to a third-party service to being sent to the exchange services; meanwhile, the downlink message returned by the third-party service is changed from being directly sent to the gateway to being sent to the exchange service;
the service execution module is used for executing exchange service, when the uplink request reaches the exchange service, the exchange service analyzes the uplink request, records the serial number of the uplink request and the request IP, and forwards the uplink request to a third-party service environment; when the downlink message reaches the exchange service, the exchange service analyzes the downlink message, acquires an uplink request serial number in the downlink message, queries a corresponding request IP through the uplink request serial number, and sends the downlink message to the queried request IP;
the service disconnection module is used for disconnecting the exchange service, changing the uplink request of the development environment or the test environment into the uplink request directly sent to the third-party service, directly sending the downlink message returned by the third-party service to the gateway, and then distributing the downlink message to the development environment or the test environment by the gateway at random.
7. The routing system of claim 6, wherein the uplink request comprises an uplink message header and an uplink message body, and the uplink message header comprises a service type and an uplink request serial number; wherein:
the service type is used for recording a request strategy instruction and is executed by a third-party service environment; the uplink request serial number is used for recording a serial number of an uplink request; the uplink message body is used for storing relevant data under the request strategy instruction;
the third-party service environment executes the request strategy instruction based on the related data under the request strategy instruction and returns a control strategy instruction; and meanwhile, the control strategy command and the uplink request serial number are packaged to generate a downlink message.
8. The routing system according to claim 7, wherein the downlink packet includes a downlink packet header and a downlink packet body, and the downlink packet header includes a control policy instruction and an uplink request serial number; wherein:
the control strategy instruction is used for controlling the exchange service to execute corresponding forwarding operation; the uplink request serial number is used for matching and acquiring a corresponding request IP; the downlink message body is used for storing related data under the control strategy instruction;
in the service execution module, the exchange service is used for matching and acquiring a corresponding request IP according to the uplink request serial number, and sending the downlink message body to the inquired request IP according to the control strategy instruction.
9. The routing system of claim 8, wherein in the service execution module, the exchange service only performs point-to-point forwarding, group sending or partial forwarding according to the control policy instruction, and does not modify data in a downlink message body, thereby ensuring that the whole service flow is not affected.
10. The routing system under asynchronous communication according to any one of claims 6 to 9, wherein the service building module builds an exchange service based on a springboot framework, which essentially maintains a list Msgip-IP;
in the service execution module, when an exchange service receives an uplink request, taking out a request IP and an uplink request serial number Msgip; storing the uplink request serial number Msgip and the request IP into a cache redis of exchange service by Key and Value respectively;
when an exchange service receives a downlink message, an uplink request serial number Msgip in the downlink message is obtained, a corresponding Value, namely a request IP, is inquired in redis by taking the Msgip as Key, and then the downlink message is sent to the inquired request IP.
CN202210807873.8A 2022-07-11 2022-07-11 Routing method and system under asynchronous communication Active CN114884855B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210807873.8A CN114884855B (en) 2022-07-11 2022-07-11 Routing method and system under asynchronous communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210807873.8A CN114884855B (en) 2022-07-11 2022-07-11 Routing method and system under asynchronous communication

Publications (2)

Publication Number Publication Date
CN114884855A true CN114884855A (en) 2022-08-09
CN114884855B CN114884855B (en) 2022-12-16

Family

ID=82682687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210807873.8A Active CN114884855B (en) 2022-07-11 2022-07-11 Routing method and system under asynchronous communication

Country Status (1)

Country Link
CN (1) CN114884855B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015148879A (en) * 2014-02-05 2015-08-20 三菱電機株式会社 Incorporated equipment software development testing device
CN111090587A (en) * 2019-12-11 2020-05-01 中国建设银行股份有限公司 Method, device and equipment for testing production point service and storage medium
CN111538602A (en) * 2020-04-17 2020-08-14 上海悦易网络信息技术有限公司 Message forwarding method and device for message queue
CN113254235A (en) * 2021-06-08 2021-08-13 行吟信息科技(武汉)有限公司 Message transmission method and device under multi-test environment
CN114116508A (en) * 2021-12-02 2022-03-01 上海洛轲智能科技有限公司 External platform docking test method and system, forwarding system and vehicle software system
CN114448719A (en) * 2022-03-08 2022-05-06 中国工商银行股份有限公司 Message interaction method, device and system
CN114697248A (en) * 2022-03-30 2022-07-01 北京理工大学 Unmanned aerial vehicle information attack semi-physical test system and method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015148879A (en) * 2014-02-05 2015-08-20 三菱電機株式会社 Incorporated equipment software development testing device
CN111090587A (en) * 2019-12-11 2020-05-01 中国建设银行股份有限公司 Method, device and equipment for testing production point service and storage medium
CN111538602A (en) * 2020-04-17 2020-08-14 上海悦易网络信息技术有限公司 Message forwarding method and device for message queue
CN113254235A (en) * 2021-06-08 2021-08-13 行吟信息科技(武汉)有限公司 Message transmission method and device under multi-test environment
CN114116508A (en) * 2021-12-02 2022-03-01 上海洛轲智能科技有限公司 External platform docking test method and system, forwarding system and vehicle software system
CN114448719A (en) * 2022-03-08 2022-05-06 中国工商银行股份有限公司 Message interaction method, device and system
CN114697248A (en) * 2022-03-30 2022-07-01 北京理工大学 Unmanned aerial vehicle information attack semi-physical test system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱锋: "基于Spring Boot和Vue的火电SIS***设计与实现", 《科技创新导报》 *

Also Published As

Publication number Publication date
CN114884855B (en) 2022-12-16

Similar Documents

Publication Publication Date Title
Cinque et al. Microservices monitoring with event logs and black box execution tracing
US8245083B2 (en) Systems, methods, and apparatus to debug a network application
CN100353714C (en) Method for realizing Web service automatic test
US6832184B1 (en) Intelligent work station simulation—generalized LAN frame generation simulation structure
CN105450476B (en) A kind of regression test system and test method
CN110752943B (en) Distributed fault diagnosis system and method for power transmission line
US8516451B2 (en) System and method for creating virtual callback objects
CN109257224B (en) Database communication network test simulation method and device
CN110086652A (en) A kind of management system and its method for service network element in 5G core net
CN105357039A (en) Simulation method and device for delay tolerant network
CN116028292A (en) Simulation verification system and method for remote direct memory access simulation verification
CN102098702A (en) Performance testing system, method and equipment
CN114422386B (en) Monitoring method and device for micro-service gateway
CN101668036A (en) Simulating system of distributed device and method for processing service by simulating distributed device
CN108494597B (en) Intelligent optical network simulation system and method
CN114884855B (en) Routing method and system under asynchronous communication
CN107086951A (en) Transmission method, Short Message Service Gateway and the industry short message access gateway of industry short message
CN108345508B (en) Interface call testing method and device
CN110380930B (en) Test method, test device, server and computer storage medium
CN105446867B (en) A kind of generation method and device of test data
Fecko et al. A success story of formal description techniques: Estelle specification and test generation for MIL-STD 188-220
CN109639568A (en) A kind of real-time Communication for Power Network simulation system based on OpenDDS
CN114745285A (en) Large-scale distributed virtual network simulation method based on virtual container
CN100570547C (en) A kind of data readback method and device
CN114071391A (en) Content charging test method, management device, terminal device and storage medium

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