CN117076144A - System parallel conversion method, device, computer equipment and storage medium - Google Patents

System parallel conversion method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117076144A
CN117076144A CN202311043786.0A CN202311043786A CN117076144A CN 117076144 A CN117076144 A CN 117076144A CN 202311043786 A CN202311043786 A CN 202311043786A CN 117076144 A CN117076144 A CN 117076144A
Authority
CN
China
Prior art keywords
data
port
information
parallel conversion
message
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.)
Pending
Application number
CN202311043786.0A
Other languages
Chinese (zh)
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.)
Hexin Technology Suzhou Co ltd
Hexin Technology Co ltd
Original Assignee
Hexin Technology Suzhou Co ltd
Hexin Technology 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 Hexin Technology Suzhou Co ltd, Hexin Technology Co ltd filed Critical Hexin Technology Suzhou Co ltd
Priority to CN202311043786.0A priority Critical patent/CN117076144A/en
Publication of CN117076144A publication Critical patent/CN117076144A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/20Support for services
    • H04L49/208Port mirroring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Abstract

The invention relates to the technical field of computers and discloses a system parallel conversion method, a device, computer equipment and a storage medium, wherein the method is realized based on a switch, a first port of the switch is connected with a first system, a second port of the switch is connected with a second system, and a third port of the switch is connected with an external system; the method comprises the following steps: determining a network card corresponding to the second port, and acquiring a plurality of data frames corresponding to a data link layer of the network card; capturing a target data frame from a plurality of data frames; carrying out layer-by-layer data stripping treatment on the target data frame to obtain original service data; carrying out data recombination on the original service data to obtain a service data packet; and sending the service data packet to the second system so that the second system realizes system parallel conversion through the service data packet. The invention can complete the conversion and upgrading of the new and old systems without the cooperation of external systems, thereby achieving the purpose of reducing the difficulty and cost of system upgrading; and the conversion upgrading efficiency of the new system can be further improved.

Description

System parallel conversion method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a system parallel conversion method, a device, a computer device, and a storage medium.
Background
With the vigorous development of the computer industry in China, various large-scale computer system software has been put into various industries. Over time, both business changes and data growth result in existing legacy systems not meeting current user needs, and system upgrades and modifications become a necessary process. Many large systems have undergone at least one or more upgrades. In the upgrading and reconstruction process, considering factors such as safety, stability and the like, most of system software (especially systems in multiple areas such as banks, rail traffic, medical treatment and the like) is upgraded by adopting a parallel conversion strategy.
The existing parallel conversion strategy often needs to be matched with an external system, but the old system has been subjected to maintenance, the provider needs to charge higher cost, or the provider is turned off and cannot be contacted, so that the difficulty of parallel conversion of the new system and the old system is greatly increased.
Therefore, a parallel conversion method of the system is needed, and conversion and upgrading of new and old systems can be completed on the premise that no external system is needed, so that difficulty and cost of upgrading and modifying the system are reduced.
Disclosure of Invention
In view of the above, the present invention provides a system parallel conversion method, apparatus, computer device and storage medium, so as to solve the problem of relatively high system parallel conversion difficulty in the related art.
In a first aspect, the present invention provides a system parallel conversion method, where the method is implemented based on a switch, where a first port of the switch is connected to a first system, a second port of the switch is connected to a second system, and a third port of the switch is connected to an external system; the second port is a mirror image port of the first port;
the method comprises the following steps:
determining a network card corresponding to a second port, and acquiring a plurality of data frames corresponding to a data link layer of the network card;
capturing a target data frame from the plurality of data frames according to the first IP information, the second IP information and the protocol information; the first IP information is the IP information of an external system, and the second IP information is the IP information of the first system;
carrying out layer-by-layer data stripping treatment on the target data frame to obtain original service data;
according to the working protocol of the first system, carrying out data recombination on the original service data to obtain a service data packet;
and sending the service data packet to a second system so that the second system realizes system parallel conversion through the service data packet.
According to the system parallel conversion method provided by the invention, the switch is arranged, the first port of the switch is connected with the first system, the second port is connected with the second system, the third port is connected with the external system, and the second port is a mirror image port of the first port, so that data required by the parallel conversion of the second system can be obtained through the second port, and the purposes of reducing the difficulty and cost of upgrading and reconstruction of the system without the cooperation of the external system are achieved; the invention captures a plurality of data frames in a data link layer through the first IP information, the second IP information and the protocol information to obtain a target data frame, and carries out layer-by-layer data stripping processing on the target data frame to obtain original service data, and carries out data recombination on the original service data according to the working protocol of the first system to obtain a service data packet, thereby improving the upgrading efficiency of the second system.
In an alternative embodiment, the step of performing layer-by-layer data stripping processing on the target data frame to obtain original service data includes:
stripping the packet header information of each target frame data according to the protocol stack rule of the data link layer to obtain message data;
judging whether the message data is a confirmation response message of a protocol layer or not;
if the message data is a confirmation response message of a protocol layer, removing the message data;
and if the message data is not the confirmation response message of the protocol layer, carrying out secondary stripping on the message data according to the IP information of the first system to obtain the original service data.
According to the system parallel conversion method provided by the invention, the target frame data is stripped for multiple times, and whether the message data is the determination response message of the protocol layer or not is judged in the stripping process, so that the finally obtained original service data is the service data necessary for the system parallel conversion, and the stability and the safety of the system upgrading are further effectively improved.
In an alternative embodiment, determining whether the packet data is a protocol layer acknowledgement packet includes:
and if the message data is a request message for establishing protocol connection, a first verification request message or a second verification request message, determining that the message data is a determination response message of a protocol layer.
In an alternative embodiment, the method further comprises:
and carrying out asynchronous caching on the original service data, and marking the asynchronous caching data by utilizing a mutual exclusion lock, so that the marked asynchronous caching data only allows one thread to access at any time.
The system parallel conversion method provided by the invention can asynchronously buffer the stripped data by using the technical means of queue buffer and mutual exclusion lock, so that the capturing performance of the data frame under the condition of high concurrency is ensured, and the requirements of the identification and the recombination of the original data packet are also solved. The step can reorganize the completed data message required by one service request, and can effectively improve the conversion efficiency of the parallel conversion of the system.
In an alternative embodiment, after the second system performs system parallel conversion through the service data packet, the method further includes:
if the communication mode of the first system and the external system is bidirectional, feedback information is sent to the external system; the feedback information indicates that one-time service communication with the external system is ended.
In an alternative embodiment, the second port is unidirectional.
In the parallel conversion process of the system, the second port of the switch (namely the port connected with the new system) is unidirectional, so that no fluctuation is generated on the old system, and the safety and the stability are high.
In an alternative embodiment, the method further comprises:
when the first system and the second system are upgraded and run stably, the connection between the switch and the first system, the connection between the second system and the external system are cut off, and the connection between the second system and the external system is established, so that the second system replaces the first system.
According to the system parallel conversion method provided by the invention, when the first system and the second system are upgraded and run stably, the connection between the switch and the first system, the connection between the second system and the external system are cut off, and the connection between the second system and the external system is established, so that the conversion and upgrading of the new and old systems can be completed on the premise of ensuring the normal running of the subsequent service; and the exchanger can be recycled after successful conversion.
In a second aspect, the present invention provides a system parallel conversion device, where the device is implemented based on a switch, where a first port of the switch is connected to a first system, a second port of the switch is connected to a second system, and a third port of the switch is connected to an external system; the second port is a mirror image port of the first port;
the device comprises:
the data link layer acquisition module is used for determining a network card corresponding to the second port and acquiring a plurality of data frames corresponding to the data link layer of the network card;
the data frame capturing module is used for capturing and obtaining a target data frame from the plurality of data frames according to the first IP information, the second IP information and the protocol information; the first IP information is the IP information of an external system, and the second IP information is the IP information of the first system;
the data stripping module is used for carrying out layer-by-layer data stripping processing on the target data frame so as to obtain original service data;
the data reorganization module is used for reorganizing the original service data according to the working protocol of the first system to obtain service data packets;
and the parallel conversion module is used for sending the service data packet to a second system so that the second system realizes system parallel conversion through the service data packet.
In a third aspect, the present invention provides a computer device comprising: the system comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions, so that the system parallel conversion method of the first aspect or any implementation mode corresponding to the first aspect is executed.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon computer instructions for causing a computer to perform the system parallel conversion method of the first aspect or any of its corresponding embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of the connection of related devices in a parallel conversion process of a system according to an embodiment of the present invention;
FIG. 2 is a flow chart of a system parallel conversion method according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a layer-by-layer stripping process for a target data frame in accordance with an embodiment of the present invention;
FIG. 4 is a flow chart of another system parallel conversion method according to an embodiment of the present invention;
FIG. 5 is a block diagram of a system parallel conversion apparatus according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
With the vigorous development of the computer industry in China, various large-scale computer system software has been put into various industries. Over time, both business changes and data growth result in existing legacy systems not meeting current user needs, and system upgrades and modifications become a necessary process. Many large systems have undergone at least one or more upgrades. There are only three strategies for system upgrade: direct conversion, segment conversion and parallel conversion are specifically as follows:
direct conversion means that when the new system is determined to run without any error, the new system is started immediately, and the old system is terminated; the method has the advantages of saving personnel and equipment cost, and being applicable to occasions with less complex processing process and less important data.
Segment conversion belongs to a mode of combining direct conversion and parallel conversion. A portion replaces the old system before the new system is fully formally running.
The parallel conversion is that after the new and old systems work in parallel for a period of time and a period of time passes, the new system formally replaces the old system. Mainly for relatively complex large systems, which offer an opportunity to compare with the results of old system operation, with the advantages of safety and reliability, and with the disadvantages of great expense and effort. Because the parallel operation of the two systems needs to be performed simultaneously for a relatively long time. The method is suitable for the occasions: banks, financial systems, and some enterprises' core systems.
In the upgrading and reconstruction process, considering factors such as safety, stability and the like, most of system software (especially systems in multiple areas such as banks, rail traffic, medical treatment and the like) is upgraded by adopting a parallel conversion strategy. But the reliance of parallel conversion on external data prevents the use and popularization of this strategy. When the system needs to interface with an external system, the external system only provides one port or point-to-point service. If the system upgrade adopts a parallel conversion strategy, external system cooperation is also needed, and services and ports are additionally provided. However, often, the system has been in maintenance, the suppliers need to collect higher fees, and even the suppliers have been in switching-off, and cannot be connected. These problems all lead to a significant increase in the difficulty of parallel conversion of the system.
In accordance with an embodiment of the present invention, there is provided a system parallel conversion method embodiment, it being noted that the steps shown in the flowchart of the figures may be performed in a computer system such as a set of computer executable instructions, and, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order other than that shown or described herein.
In this embodiment, a system parallel conversion method is provided, which is implemented based on a switch, as shown in fig. 1: in the parallel conversion process of the system, a first port (namely a port 1) of the switch is connected with a first system (namely an old system), a second port (namely a port 2) of the switch is connected with a second system (namely a new system), and a third port (namely a port 3) of the switch is connected with an external system, wherein the second port is a mirror image port of the first port, namely transmission data in the first port and the second port are the same; and the second port is set to forward unidirectionally, and data of the second port is not forwarded to the first port. One end of a parallel conversion system for implementing the system parallel conversion method in the embodiment is connected with the second port of the switch, and the other end of the parallel conversion system is connected with the second system.
Specifically, the switch is installed between the old system and the external system while the old system is periodically maintained. The old system is ensured to use the port 1, the port 2 is reserved for the new system, and the external system uses any other port which can be reached with the port 1.
Fig. 2 is a flowchart of a system parallel conversion method according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the steps of:
step S101, a network card corresponding to a second port is determined, and a plurality of data frames corresponding to a data link layer of the network card are acquired.
Specifically, the data link layer is as shown in (1) in fig. 3: including ethernet header, IP header, TCP (Transmission Control Protocol )/UDP (User Datagram Protocol, user datagram protocol) header, application data, and ethernet trailer.
Specifically, considering that the data obtained by the transmission of the second port is disordered, no link is established to form a set of network data frames, the pacp network library is adopted to acquire the data frames of the data link layer, namely, the network card corresponding to the second port is determined first, and then the network card is opened to acquire the relevant information of the network card, such as the IP information and the mask information of the network card.
Step S102, capturing a target data frame from the plurality of data frames according to the first IP information, the second IP information and the protocol information.
Specifically, the first IP information may be understood as IP information of the first system (i.e., the old system) and corresponding port information, and the second IP information may be understood as IP information of the external system and corresponding port information; protocol information may be understood as transport layer communication protocols such as TCP protocol, UDP protocol, etc.; the data link layer may be understood as the (1) ethernet frame in fig. 3, and the target data frame may be understood as the (4) application data in fig. 3.
More specifically, when the IP information and the corresponding port of the first system, the IP information and the corresponding port of the external system, and the transport layer communication protocol are specified, the service data meeting the user requirements (i.e., (4) application data in fig. 3) can be accurately captured from the plurality of data frames of the data link layer. The capturing operation may be performed in a loop.
Step S103, carrying out layer-by-layer data stripping processing on the target data frame to obtain the original service data.
Specifically, the target data frame to be stripped is as shown in (1) ethernet frame in fig. 3, which is the result of the operating system layer-by-layer packaging, and thus it is necessary to perform layer-by-layer data stripping processing on the target data frame. The stripped original service data is shown as (4) application data in fig. 3.
Step S104, according to the working protocol of the first system, the data of the original service data are recombined to obtain a service data packet.
Specifically, considering that the original data packet may be decomposed into multiple data frames for transmission when transmitted in the data link layer, the original service data obtained in this step may be incomplete, and the data continuous before and after the transmission process needs to be analyzed, identified and reassembled to obtain the service data packet. The data reorganization rule is related to the working protocol of the old system, and needs to refer to the protocol document or the development document of the old system.
Step S105, the service data packet is sent to a second system, so that the second system realizes system parallel conversion through the service data packet.
Specifically, the reorganized complete service data packet is sent to the new system, so that data interaction with the new system is realized. The service program or client program simulating TCP/UDP is mainly used, and other communication protocols are mostly built on the two protocols.
More specifically, after the new system and the old system are upgraded and run stably, the exchanger needs to be withdrawn, and the parallel conversion system is withdrawn, so that the new system can be directly in butt joint with an external system, and the conversion upgrading work of the new system and the old system can be completely and thoroughly completed.
In this embodiment, a system parallel conversion method is provided, which may be used in the above parallel conversion system, and the system parallel conversion method includes the following steps:
step S201, determining a network card corresponding to the second port, and acquiring a plurality of data frames corresponding to a data link layer of the network card.
Please refer to step S101 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S202, capturing a target data frame from the plurality of data frames according to the first IP information, the second IP information and the protocol information; the first IP information is the IP information of an external system, and the second IP information is the IP information of the first system.
Please refer to step S102 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S203, performing layer-by-layer data stripping processing on the target data frame to obtain original service data.
Specifically, as shown in fig. 4, the step S203 includes:
step S2031, stripping header information of each target frame data according to the protocol stack rule of the data link layer to obtain message data.
Specifically, the data link layer performs data transmission in the form of frames (e.g., ethernet frames in fig. 3); the frame header and the frame tail may be removed according to the protocol stack rule of the data link layer, for example, the ethernet header and the ethernet tail of the ethernet frame are removed in fig. 3 (1), to obtain an IP datagram, for example, fig. 3 (2).
Step S2032, determining whether the message data is a determination response message of a protocol layer.
Specifically, the following step a is used for judging whether the message data is a determination response message of a protocol layer:
and a step a of determining that the message data is a determination response message of a protocol layer if the message data is a protocol connection establishment request message, a first verification request message or a second verification request message.
In step a, the establishment request message may be understood as that the old system sends a request message for establishing a communication protocol connection to the external system, where the request message includes a seq serial number, which is randomly generated by the sender, and sets a SYN field in the message to 1, which indicates that the communication protocol connection needs to be established (syn=1, seq=x, where x is a randomly generated value);
the first authentication request message may be understood as a communication protocol connection request grant message sent by the old system by the external system, where the message includes a seq sequence number, which is randomly generated by the external system, and sets SYN to 1, and generates an ACK field, where the value of the ACK field is replied by adding 1 to the sequence number seq sent by the old system, so that when the old system receives the information, it is known that its own TCP establishment request has been authenticated. (syn=1, ack=x+1, seq=y, y is a randomly generated value) ack plus 1 here can be understood as an acknowledgement and who established the connection;
the second verification request message may be understood as that the old system will make its own serial number be added with 1 to indicate after receiving the communication protocol connection request grant message replied by the external system, and reply the verification request again by adding 1 to the seq sent by the external system, which indicates that my is known. (syn=1, ack=y+1, seq=x+1).
The establishment request message, the first verification request message or the second verification request message belongs to response message data in the protocol communication connection process, but not service data, so that the establishment request message, the first verification request message or the second verification request message needs to be removed.
Step S2033, if the message data is a determination response message of the protocol layer, removing the message data.
Step S2034, if the message data is not the acknowledgement message of the protocol layer, performing secondary stripping on the message data according to the IP information of the first system, to obtain the original service data.
Specifically, when the message data is not a confirmation response message of the protocol layer, the IP header data thereof is removed from the IP datagram, for example, as shown in (2) - (3) in fig. 3; and after the second stripping, three stripping processes are involved, i.e. the communication protocol header thereof, such as TCP header or UDP header, is removed, resulting in the final original service data, i.e. (4) in fig. 3.
Step S204, according to the working protocol of the first system, the data of the original service data are recombined to obtain a service data packet.
Please refer to step S104 in the embodiment shown in fig. 2, which is not described herein.
Step S205, the service data packet is sent to a second system, so that the second system realizes system parallel conversion through the service data packet.
Please refer to step S105 in the embodiment shown in fig. 2 in detail, which is not described herein.
In some alternative embodiments, the method further comprises:
and carrying out asynchronous caching on the original service data, and marking the asynchronous caching data by utilizing a mutual exclusion lock, so that the marked asynchronous caching data only allows one thread to access at any time.
Specifically, the invention uses the technical means of queue buffering and mutual exclusion locking to asynchronously buffer the original service data obtained by stripping the data layer by layer of the target data frame. Therefore, the capturing performance of the data frames under the high concurrency condition is ensured, and the requirements of the identification and the recombination of the original data packets are met. This step reassembles the completed data message required for a service request.
In some alternative embodiments, after the second system performs system parallel conversion through the service data packet, the method further includes:
if the communication mode of the first system and the external system is bidirectional, feedback information is sent to the external system; the feedback information indicates that one-time service communication with the external system is ended.
Specifically, the feedback information indicates that one service communication with the external system is ended, and the conversion of the whole system is not ended. The feedback information is useful in that it needs to be masked during parallel conversion (the masking may be such that the mirrored port is single-ended and certainly cannot be sent), also because the first system already has feedback information. But after the parallel conversion is finished, the first system is disconnected, and then the feedback information is returned to the external system to indicate that one service communication is finished.
In some alternative embodiments, the second port is unidirectional in transmission.
In some alternative embodiments, the method further comprises: when the first system and the second system are upgraded and run stably, the connection between the switch and the first system, the connection between the second system and the external system are cut off, and the connection between the second system and the external system is established, so that the second system replaces the first system.
Specifically, after the new system and the old system are upgraded and run stably, the switch needs to be withdrawn, and the new system is directly docked with an external system, so that the conversion upgrading work of the new and old systems is completed completely and thoroughly, as shown by 'after conversion' in fig. 1.
The invention has the technical effects that:
1. the invention can finish the conversion and upgrading of the new and old systems without modifying any existing system.
2. In the parallel conversion process, the second port is transmitted unidirectionally, so that no fluctuation is generated on an old system, and the safety and the stability are high.
3. In the parallel conversion process, the invention can complete the corresponding function by only one low-configuration switch device, and has low cost. And the exchanger can be recycled after successful conversion.
4. The new system in the invention does not need the cooperation of an external software system and an old system, can independently complete the conversion and the normal operation of the subsequent service, and reduces the upgrading and reconstruction cost of the enterprise system.
The embodiment also provides a system parallel conversion device, which is used for implementing the above embodiment and the preferred implementation manner, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The embodiment provides a system parallel conversion device, which is realized based on a switch, wherein a first port of the switch is connected with a first system, a second port of the switch is connected with a second system, and a third port of the switch is connected with an external system; the second port is a mirror image port of the first port;
as shown in fig. 5, the apparatus includes:
the data link layer acquisition module is used for determining a network card corresponding to the second port and acquiring a plurality of data frames corresponding to the data link layer of the network card;
the data frame capturing module is used for capturing and obtaining a target data frame from the plurality of data frames according to the first IP information, the second IP information and the protocol information; the first IP information is the IP information of an external system, and the second IP information is the IP information of the first system;
the data stripping module is used for carrying out layer-by-layer data stripping processing on the target data frame so as to obtain original service data;
the data reorganization module is used for reorganizing the original service data according to the working protocol of the first system to obtain service data packets;
the parallel conversion module is used for sending the service data packet to a second system so that the second system realizes system parallel conversion through the service data packet
In some alternative embodiments, the apparatus is implemented based on a switch having a first port connected to a first system, a second port connected to a second system, and a third port connected to an external system; the second port is a mirrored port of the first port.
In some alternative embodiments, a data stripping module includes:
the first stripping unit is used for stripping the packet header information of each target frame data according to the protocol stack rule of the data link layer to obtain message data;
the judging unit is used for judging whether the message data is a determination response message of a protocol layer;
the removing unit is used for removing the message data if the message data is a determination response message of a protocol layer;
and the second stripping unit is used for carrying out secondary stripping on the message data according to the IP information of the first system if the message data is not the determination response message of the protocol layer, so as to obtain the original service data.
In some alternative embodiments, the determining unit includes:
and the judging subunit is used for determining that the message data is a determination response message of a protocol layer if the message data is a request message for establishing protocol connection, a first verification request message or a second verification request message.
In some alternative embodiments, the apparatus further comprises:
and the asynchronous caching module is used for carrying out asynchronous caching on the original service data and marking the asynchronous caching data by utilizing a mutual exclusion lock so that the marked asynchronous caching data only allows one thread to access at any time.
In some alternative embodiments, the apparatus further comprises:
the feedback module is used for sending feedback information to the external system if the communication mode of the first system and the external system is bidirectional after the second system realizes system parallel conversion through the service data packet; the feedback information indicates that one-time service communication with the external system is ended.
In some alternative embodiments, the second port is unidirectional in transmission.
In some alternative embodiments, the apparatus further comprises:
and the system replacement module is used for cutting off the connection between the switch and the first system, between the switch and the second system and between the switch and the external system when the first system and the second system are upgraded and run stably, and establishing the connection between the second system and the external system so as to enable the second system to replace the first system.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The embodiment of the invention also provides computer equipment, which is provided with the system parallel conversion device shown in the figure 5.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 6, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 6.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform the methods shown in implementing the above embodiments.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (10)

1. The system parallel conversion method is characterized in that the method is realized based on a switch, a first port of the switch is connected with a first system, a second port of the switch is connected with a second system, and a third port of the switch is connected with an external system; the second port is a mirror image port of the first port;
the method comprises the following steps:
determining a network card corresponding to a second port, and acquiring a plurality of data frames corresponding to a data link layer of the network card;
capturing a target data frame from the plurality of data frames according to the first IP information, the second IP information and the protocol information; the first IP information is the IP information of an external system, and the second IP information is the IP information of the first system;
carrying out layer-by-layer data stripping treatment on the target data frame to obtain original service data;
according to the working protocol of the first system, carrying out data recombination on the original service data to obtain a service data packet;
and sending the service data packet to a second system so that the second system realizes system parallel conversion through the service data packet.
2. The method of claim 1, wherein performing a layer-by-layer data stripping process on the target data frame to obtain the original service data comprises:
stripping the packet header information of each target frame data according to the protocol stack rule of the data link layer to obtain message data;
judging whether the message data is a confirmation response message of a protocol layer or not;
if the message data is a confirmation response message of a protocol layer, removing the message data;
and if the message data is not the confirmation response message of the protocol layer, carrying out secondary stripping on the message data according to the IP information of the first system to obtain the original service data.
3. The method of claim 2, wherein determining whether the message data is a protocol layer acknowledgement message comprises:
and if the message data is a request message for establishing protocol connection, a first verification request message or a second verification request message, determining that the message data is a determination response message of a protocol layer.
4. The method according to claim 2, wherein the method further comprises:
and carrying out asynchronous caching on the original service data, and marking the asynchronous caching data by utilizing a mutual exclusion lock, so that the marked asynchronous caching data only allows one thread to access at any time.
5. The method of claim 2, wherein after the second system performs system parallel conversion by the service data packet, the method further comprises:
if the communication mode of the first system and the external system is bidirectional, feedback information is sent to the external system; the feedback information indicates that one-time service communication with the external system is ended.
6. The method according to claim 1 or 2, characterized in that the method further comprises:
when the first system and the second system are upgraded and run stably, the connection between the switch and the first system, the connection between the second system and the external system are cut off, and the connection between the second system and the external system is established, so that the second system replaces the first system.
7. A method according to claim 1 or 2, wherein the second port is unidirectionally transmitted.
8. The system parallel conversion device is characterized in that the device is realized based on a switch, a first port of the switch is connected with a first system, a second port of the switch is connected with a second system, and a third port of the switch is connected with an external system; the second port is a mirror image port of the first port; the device comprises:
the data link layer acquisition module is used for determining a network card corresponding to the second port and acquiring a plurality of data frames corresponding to the data link layer of the network card;
the data frame capturing module is used for capturing and obtaining a target data frame from the plurality of data frames according to the first IP information, the second IP information and the protocol information; the first IP information is the IP information of an external system, and the second IP information is the IP information of the first system;
the data stripping module is used for carrying out layer-by-layer data stripping processing on the target data frame so as to obtain original service data;
the data reorganization module is used for reorganizing the original service data according to the working protocol of the first system to obtain service data packets;
and the parallel conversion module is used for sending the service data packet to a second system so that the second system realizes system parallel conversion through the service data packet.
9. A computer device, comprising:
a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the system parallel conversion method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the system parallel conversion method of any one of claims 1 to 7.
CN202311043786.0A 2023-08-17 2023-08-17 System parallel conversion method, device, computer equipment and storage medium Pending CN117076144A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311043786.0A CN117076144A (en) 2023-08-17 2023-08-17 System parallel conversion method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311043786.0A CN117076144A (en) 2023-08-17 2023-08-17 System parallel conversion method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117076144A true CN117076144A (en) 2023-11-17

Family

ID=88714660

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311043786.0A Pending CN117076144A (en) 2023-08-17 2023-08-17 System parallel conversion method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117076144A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101001183A (en) * 2007-01-10 2007-07-18 网之易信息技术(北京)有限公司 Test method and system for network application software
CN106850319A (en) * 2017-03-27 2017-06-13 广州供电局有限公司 The collecting method and system of power network EMS system
CN113872810A (en) * 2021-09-29 2021-12-31 中国建设银行股份有限公司 Service simulation method and device, electronic equipment and storage medium
WO2022151867A1 (en) * 2021-01-18 2022-07-21 武汉绿色网络信息服务有限责任公司 Method and apparatus for converting http into https bidirectional transparent proxy

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101001183A (en) * 2007-01-10 2007-07-18 网之易信息技术(北京)有限公司 Test method and system for network application software
CN106850319A (en) * 2017-03-27 2017-06-13 广州供电局有限公司 The collecting method and system of power network EMS system
WO2022151867A1 (en) * 2021-01-18 2022-07-21 武汉绿色网络信息服务有限责任公司 Method and apparatus for converting http into https bidirectional transparent proxy
CN113872810A (en) * 2021-09-29 2021-12-31 中国建设银行股份有限公司 Service simulation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110460638A (en) Information push method and device
CN109768623A (en) Monitoring method, device, computer equipment and the storage medium of electric system
CN109587006A (en) A kind of data forward method and its system and storage medium based on Lora gateway
CN108710638A (en) A kind of Distributed concurrency control method and system based on mixing RDMA operation
CN107517227B (en) Session implementation method and device for distributed consistency system
CN109361525B (en) Method, device, control terminal and medium for restarting distributed deployment of multiple services
CN110138867A (en) File transmission and method of reseptance, computer equipment and storage medium
CN112532704B (en) Data transmission method, device, electronic equipment and storage medium
CN112487271A (en) Data acquisition method, system, equipment and medium
CN104243610A (en) Distributed file transmission service method
CN105554042A (en) Method and system for UDP tele-transmission log
CN112600924A (en) IoT terminal data storage system, method, computer device and storage medium
CN105607606B (en) A kind of data acquisition device and method based on double mainboard frameworks
CN103997437A (en) Cloud server registration function testing method
CN117076144A (en) System parallel conversion method, device, computer equipment and storage medium
CN104009961A (en) PPPoE session ID distribution method and equipment thereof
CN109327499A (en) Management method and device, storage medium, the terminal of business interface
CN110661850B (en) Edge calculation method, system, computer equipment and storage medium
CN109039427B (en) Ship monitoring management device
CN113596325B (en) Method and device for capturing images, electronic equipment and storage medium
CN115470206A (en) MES system docking data interaction method and system, computer equipment and storage medium
CN115086380A (en) Data transmission system and method based on energy management platform
CN101499920A (en) Method and apparatus for implementing veneer software download
CN112217659B (en) Method and system for adding client terminal equipment to SD-WAN system
CN112055058A (en) Data storage method and device and computer readable 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