CN115269235B - Message carrying method, device, equipment and medium based on components of different versions - Google Patents

Message carrying method, device, equipment and medium based on components of different versions Download PDF

Info

Publication number
CN115269235B
CN115269235B CN202211187331.1A CN202211187331A CN115269235B CN 115269235 B CN115269235 B CN 115269235B CN 202211187331 A CN202211187331 A CN 202211187331A CN 115269235 B CN115269235 B CN 115269235B
Authority
CN
China
Prior art keywords
component
end object
version
receiving end
components
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211187331.1A
Other languages
Chinese (zh)
Other versions
CN115269235A (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.)
Shanghai Huarui Software Co ltd
Shenzhen Huarui Distributed Technology Co ltd
Original Assignee
Shanghai Huarui Software Co ltd
Shenzhen Huarui Distributed 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 Shanghai Huarui Software Co ltd, Shenzhen Huarui Distributed Technology Co ltd filed Critical Shanghai Huarui Software Co ltd
Priority to CN202211187331.1A priority Critical patent/CN115269235B/en
Publication of CN115269235A publication Critical patent/CN115269235A/en
Application granted granted Critical
Publication of CN115269235B publication Critical patent/CN115269235B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/547Messaging middleware

Abstract

The invention relates to the technical field of Internet, and provides a message carrying method, a device, equipment and a medium based on components of different versions, wherein the method comprises the following steps: determining a target component from the PgBridge components, and reading the theme configuration from the domain server when detecting that the target component is started; determining a sender and a receiver adopting different versions of components in the message carrying process according to the theme configuration; creating a receiving end object of which the bottom layer communication uses a cllm multicast protocol, creating a sending end object of which the bottom layer communication uses a pgm multicast protocol, and binding the receiving end object and the sending end object; receiving data on a theme corresponding to the version assembly of the sender as target data by using the receiving end object; and calling the sending end object to forward the target data to the theme corresponding to the version component of the receiving end. The invention can realize message carrying among different versions of components based on the PgmBridge component, and has higher carrying efficiency.

Description

Message carrying method, device, equipment and medium based on components of different versions
Technical Field
The invention relates to the technical field of internet, in particular to a message carrying method, device, equipment and medium based on components of different versions.
Background
In the prior art, when carrying out message handling across data centers, sysBridge components appearing in pairs are mainly adopted, and the two components are pulled up by the same process. One component is used for receiving upstream data, the other component is used for forwarding the data to the downstream, and the two components transmit the data through a shared memory.
However, the SysBridge component is only responsible for carrying messages, and when the component of the upstream main data center fails, the component corresponding to the downstream disaster recovery data center cannot sense the failure, so that disaster recovery switching is affected.
Moreover, when the SysBridge component carries the message, a layer of shared memory communication is needed, so that the message carrying delay is increased, and the message carrying efficiency is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a message handling method, device, apparatus and medium based on different versions of components, which aims to solve the problem of message handling between components without versions.
A message handling method based on different versions of components comprises the following steps:
obtaining at least one PgmBridge component and determining a target component from the at least one PgmBridge component;
when the target component is detected to be started, reading theme configuration from a domain server;
determining a sender and a receiver adopting different versions of components in the message carrying process according to the theme configuration;
creating a receiving end object of which the bottom layer communication uses a cllm multicast protocol, creating a sending end object of which the bottom layer communication uses a pgm multicast protocol, and binding the receiving end object and the sending end object;
receiving data on a theme corresponding to the version assembly of the sender as target data by using the receiving end object;
and calling the sending end object to forward the target data to the theme corresponding to the version component of the receiving end.
According to a preferred embodiment of the invention, said determining a target component from said at least one PgmBridge component comprises:
selecting the target component from the at least one PgBridge component based on the opt-in function of the Etcd component.
According to a preferred embodiment of the invention, after determining the target component from the at least one PgmBridge component, the method further comprises:
determining the target component as a master node, and determining other components except the target component in the at least one PgBridge component as alternative nodes of the master node;
and adding the main node into the data stream of the corresponding theme to carry out message handling.
According to the preferred embodiment of the present invention, the determining of the sender and the receiver using components of different versions in the message transfer process according to the theme configuration includes:
acquiring the data flow direction and the network communication addresses of the receiving party and the transmitting party in the message carrying process from the theme configuration;
and determining the sender and the receiver according to the data flow direction and the network communication addresses of the two transceivers.
According to a preferred embodiment of the invention, the method further comprises:
when the receiving end object senses the version assembly fault of the sending party, stopping the sending end object from sending heartbeat information in the corresponding data stream, and when the heartbeat of the version assembly of the receiving party on the corresponding data stream is out of time, determining that the receiving party senses the version assembly fault of the sending party;
when the sending end object perceives the version component failure of the receiving end, the sending end object stops feeding back the Ack in the corresponding data stream, and when the Ack confirmation of the version component of the sending end on the corresponding data stream is over time, the sending end is determined to perceive the version component failure of the receiving end.
According to the preferred embodiment of the present invention, when creating a receiver object using cllm multicast protocol for bottom layer communication and creating a sender object using pgm multicast protocol for bottom layer communication, the method further comprises:
adding the receiving end object and the sending end object into data streams of corresponding subjects respectively;
configuring the same data stream ID for the data streams corresponding to the receiving end object and the sending end object;
and the data stream ID is used for determining the sender according to the data stream ID and sending message retransmission to the sender when the version component of the receiver senses that the message is lost.
According to a preferred embodiment of the invention, the method further comprises:
and when the target component is restarted after failure, setting an initial sequence number of forwarding messages on the data stream of the theme corresponding to the target component.
A different version component based message handling apparatus, the different version component based message handling apparatus comprising:
a determining unit, configured to acquire at least one PgmBridge component and determine a target component from the at least one PgmBridge component;
the reading unit is used for reading the theme configuration from the domain server when the target component is detected to be started;
the determining unit is further configured to determine, according to the theme configuration, a sender and a receiver that use components of different versions in a message handling process;
the system comprises a creating unit and a sending unit, wherein the creating unit is used for creating a receiving end object of which the bottom layer communication uses a cllm multicast protocol, creating a sending end object of which the bottom layer communication uses a pgm multicast protocol, and binding the receiving end object and the sending end object;
a receiving unit, configured to receive, by using the receiving end object, data on a theme corresponding to the version component of the sending end as target data;
and the forwarding unit is used for calling the sending end object to forward the target data to the theme corresponding to the version component of the receiving party.
A computer device, the computer device comprising:
a memory storing at least one instruction; and
and the processor executes the instructions stored in the memory to realize the message handling method based on the components with different versions.
A computer-readable storage medium having stored therein at least one instruction for execution by a processor in a computer device to implement the different version component-based message handling method.
According to the technical scheme, the message carrying among the components of different versions can be realized based on the PgmBridge component, and the carrying efficiency is high.
Drawings
FIG. 1 is a flow chart of a message handling method based on different versions of components according to a preferred embodiment of the present invention.
Fig. 2 is a functional block diagram of a message handling apparatus based on different versions of components according to a preferred embodiment of the present invention.
FIG. 3 is a schematic structural diagram of a computer device for implementing a message handling method based on different versions of components according to a preferred embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
Fig. 1 is a flow chart of a message handling method based on different versions of components according to a preferred embodiment of the present invention. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs.
The message handling method based on the components of different versions is applied to one or more computer devices, where the computer devices are devices capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and hardware thereof includes, but is not limited to, microprocessors, application Specific Integrated Circuits (ASICs), programmable Gate arrays (FPGAs), digital Signal Processors (DSPs), embedded devices, and the like.
The computer device may be any electronic product capable of performing human-computer interaction with a user, for example, a Personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), a game machine, an interactive web Television (IPTV), an intelligent wearable device, and the like.
The computer device may also include a network device and/or a user device. Wherein the network device includes, but is not limited to, a single network server, a server group consisting of a plurality of network servers, or a Cloud Computing (Cloud Computing) based Cloud consisting of a large number of hosts or network servers.
The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
Among them, artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence base technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
The Network where the computer device is located includes, but is not limited to, the internet, a wide area Network, a metropolitan area Network, a local area Network, a Virtual Private Network (VPN), and the like.
S10, at least one PgBridge component is obtained, and a target component is determined from the at least one PgBridge component.
In this embodiment, the PgmBridge component is a component for message handling.
In this embodiment, the determining the target component from the at least one PgmBridge component comprises:
selecting the target component from the at least one PgBridge component based on the opt-in functionality of the Etcd component.
The Etcd component is a key-value storage distributed system and is an important basic component in a cloud native architecture. The Etcd component has a master selection function, namely, a process or a service in the same distributed cluster is used for finding out the other side and establishing connection, and the function can be used for realizing master selection among all nodes of the cluster.
Further, upon determining a target component from the at least one PgmBridge component, the method further comprises:
determining the target component as a master node, and determining other components except the target component in the at least one PgBridge component as alternative nodes of the master node;
and adding the main node into the data stream of the corresponding theme to carry out message handling.
The data stream may be a multicast or unicast data stream.
The topic refers to the topic semantics of the system publish-subscribe mode. Specifically, a producer may push a message to a certain topic, and a consumer may subscribe to the message from the topic.
In the above embodiment, the PgmBridge component selected with the master selection function serves as the master node, with the other nodes acting as candidates for the master node. When the master node provides the service, the alternative node does not work, and only serves as a standby node of the master node, and the alternative node can continue to provide the service instead of the master node when the master node fails.
S11, when the target component is detected to be started, reading theme configuration from the domain server.
In this embodiment, the theme configuration may include, but is not limited to: data flow direction, network communication addresses of both the transmitter and the receiver.
And S12, determining the sender and the receiver adopting different versions of components in the message carrying process according to the theme configuration.
In this embodiment, the determining, according to the theme configuration, the sender and the receiver of the message that adopt different versions of components in the message handling process includes:
acquiring the data flow direction and the network communication addresses of the receiving party and the transmitting party in the message carrying process from the theme configuration;
and determining the sender and the receiver according to the data flow direction and the network communication addresses of the two transceivers.
For example: the sender may be a main disaster data center using a first version of components, and the receiver may be a disaster backup data center using a second version of components, and may synchronize data from the main disaster data center to the disaster backup data center, so that when the main disaster data center fails, the disaster backup data center replaces the main disaster data center to normally operate.
S13, a receiving end object of the cllm multicast protocol used for bottom layer communication and a sending end object of the pgm multicast protocol used for bottom layer communication are created, and the receiving end object and the sending end object are bound.
The cllm (unified Link Level Management) multicast protocol is a commercial reliable multicast protocol, and supports reliable multicast and reliable unicast.
The pgm (practical General Multicast) Multicast protocol is a reliable Multicast protocol, and supports reliable Multicast and reliable unicast.
Because the underlying communication protocols adopted by the components of different versions are different, messages transmitted among different communication protocols cannot be directly analyzed, and therefore, message handling among the components of different versions fails. To enable message handling between different versions of components, the present embodiment first instantiates objects of the underlying communication.
And by instantiating the object of the underlying communication, mutual perception of the faults of the upstream and downstream version components can be realized.
Specifically, the method further comprises:
when the receiving end object senses the version assembly fault of the sending end, the sending end object is stopped sending heartbeat information in the corresponding data stream, and when the heartbeat of the version assembly of the receiving end on the corresponding data stream is out of time, the receiving end object determines that the receiving end senses the version assembly fault of the sending end;
when the sending end object senses that the version component of the receiving end is in fault, stopping the receiving end object from feeding back an Ack (acknowledgement character) in the corresponding data stream, and when the Ack acknowledgement of the version component of the sending end on the corresponding data stream is over time, determining that the sending end senses that the version component of the receiving end is in fault.
Wherein the Ack is a reliable guarantee of the underlying communication protocol. The receiver of the communication checks the received message, if no error is found, the receiver sends a confirmation answer Ack to the sender of the communication, which indicates that the message is correctly received and is ready to receive the next message.
In the above embodiment, when the sender is a main disaster data center and the receiver is a disaster recovery data center, disaster recovery switching can be facilitated by mutual sensing of version component failures between upstream and downstream.
In this embodiment, when creating a receiver object using cllm multicast protocol for bottom layer communication and creating a sender object using pgm multicast protocol for bottom layer communication, the method further includes:
adding the receiving end object and the sending end object into data streams of corresponding subjects respectively;
configuring the same data stream ID for the data streams corresponding to the receiving end object and the sending end object;
and the data stream ID is used for determining the sender according to the data stream ID and sending message retransmission to the sender when the version component of the receiver senses that the message is lost.
The above embodiment can accurately find the upstream component when the downstream component senses the message loss and initiate message retransmission to the upstream component by configuring the uniform data stream ID.
And S14, receiving the data on the theme corresponding to the version assembly of the sender as target data by using the receiving end object.
The above embodiment implements a part of message handling, namely, reads data to be handled from the sender.
And S15, calling the sending end object to forward the target data to the theme corresponding to the version component of the receiving end.
The above-described embodiments enable another part of message handling, namely the transmission of data to be handled to the recipient.
In addition, a layer of shared memory communication is not needed in the message carrying process, so that the message carrying time delay is effectively reduced, and the message carrying efficiency is improved.
In this embodiment, the method further includes:
and when the target component is restarted after failure, setting an initial sequence number of forwarding messages on the data stream of the theme corresponding to the target component.
In the above embodiment, since the underlying communication protocol is directly used for message forwarding, when the target component is restarted due to a failure, only the starting sequence number of the forwarding message on the corresponding subject data stream needs to be set, and the downstream component determines that the message is lost for retransmission and the message is repeatedly filtered. That is, the target component may not turn on the data persistence function or may not support failover, thus reducing disk pressure.
According to the technical scheme, the message carrying among the components of different versions can be realized based on the PgmBridge component, and the carrying efficiency is high.
Fig. 2 is a functional block diagram of a message handling apparatus based on different versions of components according to a preferred embodiment of the present invention. The message handling device 11 based on different versions of components comprises a determining unit 110, a reading unit 111, a creating unit 112, a receiving unit 113 and a forwarding unit 114. A module/unit as referred to herein is a series of computer program segments stored in a memory that can be executed by a processor and that can perform a fixed function. In the present embodiment, the functions of the modules/units will be described in detail in the following embodiments.
The determining unit 110 is configured to obtain at least one PgmBridge component, and determine a target component from the at least one PgmBridge component.
In this embodiment, the PgmBridge component is a component for message handling.
In this embodiment, the determining unit 110 determines the target component from the at least one PgmBridge component includes:
selecting the target component from the at least one PgBridge component based on the opt-in functionality of the Etcd component.
The Etcd component is a key-value storage distributed system and is an important basic component in a cloud native architecture. The Etcd component has a master selection function, namely, a process or a service in the same distributed cluster is used for finding out the other side and establishing connection, and the function can be used for realizing master selection among all nodes of the cluster.
Further, after determining a target component from the at least one PgmBridge component, determining the target component as a master node, and determining other components of the at least one PgmBridge component except the target component as alternative nodes of the master node;
and adding the main node into the data stream of the corresponding theme to carry out message handling.
The data stream may be a multicast or unicast data stream.
The topic refers to the topic semantics of the system publishing subscription mode. Specifically, a producer may push a message to a certain topic, and a consumer may subscribe to the message from the topic.
In the above embodiment, the PgmBridge component selected by the master election function serves as a master node, and other nodes serve as candidates for the master node. When the master node provides the service, the alternative node does not work, and only serves as a standby node of the master node, and the alternative node can continue to provide the service instead of the master node when the master node fails.
The reading unit 111 is configured to read the theme configuration from the domain server when it is detected that the target component is started.
In this embodiment, the theme configuration may include, but is not limited to: data flow direction, network communication addresses of both the transmitter and the receiver.
The determining unit 110 is further configured to determine, according to the theme configuration, a sender and a receiver that use components of different versions in a message handling process.
In this embodiment, the determining unit 110, according to the theme configuration, determines the sender and the receiver that use components of different versions in the message transportation process, including:
acquiring the data flow direction and the network communication addresses of the receiving party and the transmitting party in the message carrying process from the theme configuration;
and determining the sender and the receiver according to the data flow direction and the network communication addresses of the transceiver and the receiver.
For example: the sender may be a main disaster data center using a first version of the component, and the receiver may be a disaster backup data center using a second version of the component, and may synchronize data from the main disaster data center to the disaster backup data center, so that when the main disaster data center fails, the disaster backup data center replaces the main disaster data center to normally work.
The creating unit 112 is configured to create a receiving end object using a cllm multicast protocol for bottom layer communication, create a sending end object using a pgm multicast protocol for bottom layer communication, and bind the receiving end object and the sending end object.
The cllm (unified Link Level Management) multicast protocol is a commercial reliable multicast protocol, and supports reliable multicast and reliable unicast.
The pgm (practical General Multicast) Multicast protocol is a reliable Multicast protocol, and supports reliable Multicast and reliable unicast.
Because the underlying communication protocols adopted by the components of different versions are different, messages transmitted among different communication protocols cannot be directly analyzed, and therefore, message handling among the components of different versions fails. To implement message handling between different versions of components, the present embodiment first instantiates objects of the underlying communication.
And by instantiating the object of the underlying communication, mutual perception of the faults of the upstream and downstream version components can be realized.
Specifically, when the receiving end object senses a failure of the version component of the sending end, the sending end object is stopped from sending heartbeat information in the corresponding data stream, and when the heartbeat of the version component of the receiving end on the corresponding data stream is timed out, the receiving end object is determined to sense the failure of the version component of the sending end;
when the sending end object senses that the version component of the receiving end is in fault, stopping the receiving end object from feeding back an Ack (acknowledgement character) in the corresponding data stream, and when the Ack acknowledgement of the version component of the sending end on the corresponding data stream is over time, determining that the sending end senses that the version component of the receiving end is in fault.
Wherein the Ack is a reliable guarantee of the underlying communication protocol. The communication receiver checks the received message, if no error is found, it sends acknowledgement Ack to the communication sender to indicate that the message has been received correctly, and is ready to receive the next message.
In the above embodiment, when the sender is a main disaster data center and the receiver is a disaster recovery data center, disaster recovery switching can be facilitated by mutual sensing of version component failures between upstream and downstream.
In this embodiment, when a receiving end object using a cllm multicast protocol for bottom layer communication and a sending end object using a pgm multicast protocol for bottom layer communication are created, the receiving end object and the sending end object are respectively added to data streams corresponding to topics;
configuring the same data stream ID for the data streams corresponding to the receiving end object and the sending end object;
and the data stream ID is used for determining the sender according to the data stream ID and initiating message retransmission to the sender when the version component of the receiver senses message loss.
The above embodiment can accurately find the upstream component and initiate message retransmission to the upstream component when the downstream component senses message loss by configuring the uniform data stream ID.
The receiving unit 113 is configured to receive, by using the receiving end object, data on a theme corresponding to the version component of the sending end as target data.
The above embodiment implements a part of message handling, namely, reads data to be handled from the sender.
The forwarding unit 114 is configured to invoke the sending end object to forward the target data to the theme corresponding to the version component of the receiving end.
The above-described embodiments enable another part of message handling, namely the transmission of data to be handled to the recipient.
In addition, a layer of shared memory communication is not needed in the message carrying process, so that the message carrying time delay is effectively reduced, and the message carrying efficiency is further improved.
In this embodiment, when the target component is restarted after a failure, an initial sequence number of a forwarding message on a data stream of a theme corresponding to the target component is set.
In the above embodiment, since the underlying communication protocol is directly used for message forwarding, when the target component is restarted due to a failure, only the starting sequence number of the forwarding message on the corresponding subject data stream needs to be set, and the downstream component determines that the message is lost for retransmission and the message is repeatedly filtered. That is, the target component may not turn on the data persistence function or may not support failover, thus reducing disk pressure.
According to the technical scheme, the message carrying among the components of different versions can be realized based on the PgmBridge component, and the carrying efficiency is high.
Fig. 3 is a schematic structural diagram of a computer device according to a preferred embodiment of the present invention, which implements a message handling method based on different versions of components.
The computer device 1 may comprise a memory 12, a processor 13 and a bus, and may further comprise a computer program stored in the memory 12 and executable on the processor 13, such as a message handler based on different versions of components.
It will be appreciated by those skilled in the art that the schematic diagram is merely an example of the computer device 1, and does not constitute a limitation to the computer device 1, the computer device 1 may be in a bus structure or a star structure, the computer device 1 may include more or less hardware or software than those shown, or different component arrangements, for example, the computer device 1 may further include an input and output device, a network access device, and the like.
It should be noted that the computer device 1 is only an example, and other electronic products that are currently available or may come into existence in the future, such as electronic products that can be adapted to the present invention, should also be included in the scope of the present invention, and are included herein by reference.
The memory 12 includes at least one type of readable storage medium, which includes flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 12 may in some embodiments be an internal storage unit of the computer device 1, e.g. a removable hard disk of the computer device 1. The memory 12 may also be an external storage device of the computer device 1 in other embodiments, such as a plug-in removable hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the computer device 1. Further, the memory 12 may also include both an internal storage unit and an external storage device of the computer device 1. The memory 12 can be used not only for storing application software installed in the computer device 1 and various types of data, such as codes of message handlers based on components of different versions, etc., but also for temporarily storing data that has been output or is to be output.
The processor 13 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 13 is a Control Unit (Control Unit) of the computer device 1, connects various components of the entire computer device 1 by using various interfaces and lines, and executes various functions and processes data of the computer device 1 by running or executing programs or modules (for example, executing message handlers based on different versions of components, and the like) stored in the memory 12 and calling data stored in the memory 12.
The processor 13 executes the operating system of the computer device 1 and various installed application programs. The processor 13 executes the application program to implement the steps in each of the above-mentioned message handling method embodiments based on different versions of components, such as the steps shown in fig. 1.
Illustratively, the computer program may be divided into one or more modules/units, which are stored in the memory 12 and executed by the processor 13 to accomplish the present invention. The one or more modules/units may be a series of computer readable instruction segments capable of performing certain functions, which are used to describe the execution of the computer program in the computer device 1. For example, the computer program may be divided into a determination unit 110, a reading unit 111, a creation unit 112, a receiving unit 113, a forwarding unit 114.
The integrated unit implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a computer device, or a network device) or a processor (processor) to execute parts of the message handling method based on the different versions of the components according to the embodiments of the present invention.
The modules/units integrated by the computer device 1 may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented.
Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random-access Memory, or the like.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, which is used for verifying the validity (anti-counterfeiting) of the information and generating a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one line is shown in FIG. 3, but this does not mean only one bus or one type of bus. The bus is arranged to enable connection communication between the memory 12 and at least one processor 13 etc.
Although not shown, the computer device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 13 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The computer device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the computer device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the computer device 1 and other computer devices.
Optionally, the computer device 1 may further comprise a user interface, which may be a Display (Display), an input unit, such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the computer device 1 and for displaying a visualized user interface.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
Fig. 3 shows only the computer device 1 with the components 12-13, and it will be understood by a person skilled in the art that the structure shown in fig. 3 does not constitute a limitation of the computer device 1 and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
With reference to fig. 1, the memory 12 of the computer device 1 stores a plurality of instructions to implement a message handling method based on different versions of components, and the processor 13 can execute the plurality of instructions to implement:
obtaining at least one PgmBridge component and determining a target component from the at least one PgmBridge component;
when the target component is detected to be started, reading theme configuration from a domain server;
determining a sender and a receiver adopting different versions of components in the message carrying process according to the theme configuration;
creating a receiving end object of which the bottom layer communication uses a cllm multicast protocol, creating a sending end object of which the bottom layer communication uses a pgm multicast protocol, and binding the receiving end object and the sending end object;
receiving data on a theme corresponding to the version assembly of the sender as target data by using the receiving end object;
and calling the sending end object to forward the target data to the theme corresponding to the version component of the receiving end.
Specifically, the processor 13 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the instruction, which is not described herein again.
It should be noted that all the data involved in the present application are legally acquired.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The invention is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the present invention may also be implemented by one unit or means through software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (9)

1. A message handling method based on components of different versions is characterized by comprising the following steps:
acquiring at least one PgmBridge component, and determining a target component from the at least one PgmBridge component, wherein the PgmBridge component is a component for message handling;
when the target component is detected to be started, reading theme configuration from a domain server;
determining a sender and a receiver adopting different versions of components in the message carrying process according to the theme configuration;
creating a receiving end object of which the bottom layer communication uses a cllm multicast protocol, creating a sending end object of which the bottom layer communication uses a pgm multicast protocol, and binding the receiving end object and the sending end object;
receiving data on a theme corresponding to the version assembly of the sender as target data by using the receiving end object;
calling the sending end object to forward the target data to a theme corresponding to the version component of the receiving end;
when the receiving end object senses that the version assembly of the sending party is in fault, the sending end object is stopped sending heartbeat information in the corresponding data stream, and when the heartbeat of the version assembly of the receiving party on the corresponding data stream is out of time, the receiving party is determined to sense that the version assembly of the sending party is in fault; when the sending end object perceives that the version assembly of the receiving end is in fault, the receiving end object stops feeding back the Ack in the corresponding data stream, and when the Ack confirmation of the version assembly of the sending end on the corresponding data stream is over, the sending end is determined to perceive that the version assembly of the receiving end is in fault.
2. The method of message handling based on different version components of claim 1 wherein the determining a target component from the at least one PgmBridge component comprises:
selecting the target component from the at least one PgBridge component based on the opt-in function of the Etcd component.
3. The method of different version component-based message handling according to claim 2, wherein upon determining a target component from the at least one PgmBridge component, the method further comprises:
determining the target component as a master node, and determining other components of the at least one PgBridge component except the target component as alternative nodes of the master node;
and adding the main node into the data stream of the corresponding theme to carry out message handling.
4. The method as claimed in claim 1, wherein the determining of the sender and the receiver using the components of different versions in the message handling process according to the theme configuration comprises:
acquiring the data flow direction and the network communication addresses of the receiving party and the transmitting party in the message carrying process from the theme configuration;
and determining the sender and the receiver according to the data flow direction and the network communication addresses of the two transceivers.
5. The message handling method based on different versions of components according to claim 1, wherein when creating a receiver object using cllm multicast protocol for the underlying communication and creating a sender object using pgm multicast protocol for the underlying communication, the method further comprises:
adding the receiving end object and the sending end object into data streams of corresponding subjects respectively;
configuring the same data stream ID for the data streams corresponding to the receiving end object and the sending end object;
and the data stream ID is used for determining the sender according to the data stream ID and initiating message retransmission to the sender when the version component of the receiver senses message loss.
6. The method of message handling based on different versions of components according to claim 1, the method further comprising:
and when the target component is restarted after the fault, setting an initial sequence number of a forwarding message on the data flow of the corresponding theme of the target component.
7. A message handling apparatus based on different version components, the apparatus comprising:
a determining unit, configured to acquire at least one PgmBridge component, and determine a target component from the at least one PgmBridge component, where the PgmBridge component is a component used for message handling;
the reading unit is used for reading the theme configuration from the domain server when the target component is detected to be started;
the determining unit is further configured to determine, according to the theme configuration, a sender and a receiver that use components of different versions in a message handling process;
the system comprises a creating unit, a transmitting unit and a receiving unit, wherein the creating unit is used for creating a receiving end object of which the bottom layer communication uses a cllm multicast protocol, creating a transmitting end object of which the bottom layer communication uses a pgm multicast protocol, and binding the receiving end object and the transmitting end object;
a receiving unit, configured to receive, by using the receiving end object, data on a theme corresponding to the version component of the sending end as target data;
the forwarding unit is used for calling the sending end object to forward the target data to a theme corresponding to the version component of the receiving end;
when the receiving end object senses the version assembly fault of the sending end, the sending end object is stopped sending heartbeat information in the corresponding data stream, and when the heartbeat of the version assembly of the receiving end on the corresponding data stream is over, the receiving end object determines that the receiving end senses the version assembly fault of the sending end; when the sending end object perceives the version component failure of the receiving end, the sending end object stops feeding back the Ack in the corresponding data stream, and when the Ack confirmation of the version component of the sending end on the corresponding data stream is over time, the sending end is determined to perceive the version component failure of the receiving end.
8. A computer device, characterized in that the computer device comprises:
a memory storing at least one instruction; and
a processor executing instructions stored in the memory to implement the method of message handling based on different versions of components as claimed in any one of claims 1 to 6.
9. A computer-readable storage medium characterized by: the computer readable storage medium has at least one instruction stored therein, the at least one instruction being executed by a processor in a computer device to implement the message handling method based on different versions of components as claimed in any one of claims 1 to 6.
CN202211187331.1A 2022-09-28 2022-09-28 Message carrying method, device, equipment and medium based on components of different versions Active CN115269235B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211187331.1A CN115269235B (en) 2022-09-28 2022-09-28 Message carrying method, device, equipment and medium based on components of different versions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211187331.1A CN115269235B (en) 2022-09-28 2022-09-28 Message carrying method, device, equipment and medium based on components of different versions

Publications (2)

Publication Number Publication Date
CN115269235A CN115269235A (en) 2022-11-01
CN115269235B true CN115269235B (en) 2022-12-23

Family

ID=83757609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211187331.1A Active CN115269235B (en) 2022-09-28 2022-09-28 Message carrying method, device, equipment and medium based on components of different versions

Country Status (1)

Country Link
CN (1) CN115269235B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111381983A (en) * 2020-03-06 2020-07-07 西安理工大学 Lightweight message middleware system and method of virtual test target range verification system
CN112506702A (en) * 2020-12-03 2021-03-16 平安科技(深圳)有限公司 Data center disaster tolerance method, device, equipment and storage medium
CN112865927A (en) * 2019-11-27 2021-05-28 浙江大搜车软件技术有限公司 Message delivery verification method, device, computer equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7640357B2 (en) * 2004-04-30 2009-12-29 Sap Ag Transmitting enterprise messages based on buffer sizes
US8566414B2 (en) * 2012-10-12 2013-10-22 Freedomone Mobile, Inc. Systems and methods for subscription management in a multi-channel context aware communication environment
CN104579905B (en) * 2013-10-15 2018-11-06 阿里巴巴集团控股有限公司 Message delivery method and system and MOM servers, receiving terminal
US10116599B2 (en) * 2013-12-11 2018-10-30 Cisco Technology, Inc. Topic categorized instant message communication
CN107622060B (en) * 2016-07-13 2022-04-26 北京京东尚科信息技术有限公司 Order tracking analysis method and device
CN112230616A (en) * 2020-10-28 2021-01-15 腾讯科技(深圳)有限公司 Linkage control method and device and linkage middleware

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112865927A (en) * 2019-11-27 2021-05-28 浙江大搜车软件技术有限公司 Message delivery verification method, device, computer equipment and storage medium
CN111381983A (en) * 2020-03-06 2020-07-07 西安理工大学 Lightweight message middleware system and method of virtual test target range verification system
CN112506702A (en) * 2020-12-03 2021-03-16 平安科技(深圳)有限公司 Data center disaster tolerance method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Reliable Multicast in Data Center Networks;Dan Li等;《IEEE Transactions on Computers 》;20130417;20130417 *
面向大数据的分布式流处理技术综述;张鹏等;《计算机研究与发展》;20141215;20141215 *

Also Published As

Publication number Publication date
CN115269235A (en) 2022-11-01

Similar Documents

Publication Publication Date Title
US20040243663A1 (en) Event heap: a coordination infrastructure for dynamic heterogeneous application interactions in ubiquitous computing environments
CN112653760B (en) Cross-server file transmission method and device, electronic equipment and storage medium
US20170085653A1 (en) Method, device and system for message distribution
CN115118738B (en) Disaster recovery method, device, equipment and medium based on RDMA
CN111538573A (en) Asynchronous task processing method and device and computer readable storage medium
CN114691050B (en) Cloud native storage method, device, equipment and medium based on kubernets
CN113890712A (en) Data transmission method and device, electronic equipment and readable storage medium
CN115269235B (en) Message carrying method, device, equipment and medium based on components of different versions
CN114741422A (en) Query request method, device, equipment and medium
CN114371962A (en) Data acquisition method and device, electronic equipment and storage medium
CN114816371A (en) Message processing method, device, equipment and medium
CN115101152A (en) Sample priority switching method, device, equipment and medium
CN114185502A (en) Log printing method, device, equipment and medium based on production line environment
CN114064033A (en) Front-end component development method and device, electronic equipment and readable storage medium
CN112540839A (en) Information changing method, device, electronic equipment and storage medium
CN115277376B (en) Disaster recovery switching method, device, equipment and medium
CN115065642B (en) Code table request method, device, equipment and medium under bandwidth limitation
CN116760835B (en) Distributed storage method, device and medium
CN113687834B (en) Distributed system node deployment method, device, equipment and medium
CN114244638B (en) Multicast network communication method, device, equipment and medium
CN115964307B (en) Automatic test method, device, equipment and medium for transaction data
CN116860508B (en) Distributed system software defect continuous self-healing method, device, equipment and medium
CN116418896B (en) Task execution method, device, equipment and medium based on timer
CN117851520A (en) Data synchronization method, system, equipment and medium of securities core transaction engine
CN116527771A (en) Method, device, equipment and storage medium for rapidly transferring service information

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