CN107133109A - A kind of method of intermodule communication, device and computing device - Google Patents

A kind of method of intermodule communication, device and computing device Download PDF

Info

Publication number
CN107133109A
CN107133109A CN201710272190.6A CN201710272190A CN107133109A CN 107133109 A CN107133109 A CN 107133109A CN 201710272190 A CN201710272190 A CN 201710272190A CN 107133109 A CN107133109 A CN 107133109A
Authority
CN
China
Prior art keywords
communication
module
inter
name
message packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710272190.6A
Other languages
Chinese (zh)
Other versions
CN107133109B (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.)
Comba Network Systems Co Ltd
Original Assignee
Comba Telecom Systems Guangzhou Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Comba Telecom Systems Guangzhou Co Ltd filed Critical Comba Telecom Systems Guangzhou Co Ltd
Priority to CN201710272190.6A priority Critical patent/CN107133109B/en
Publication of CN107133109A publication Critical patent/CN107133109A/en
Application granted granted Critical
Publication of CN107133109B publication Critical patent/CN107133109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/541Interprogram communication via adapters, e.g. between incompatible applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the present invention provides a kind of method of intermodule communication, device and computing device, applied to the first computing device, the problem of intermodule communication method to solve in the prior art based on IP and port cannot be distinguished by intermodule communication type.This method includes:After the software module sender of intermodule communication obtains communication information bag, parsing obtains the destination address in communication information bag;Wherein, destination address is identified using process name, module name, logic machine name and process activestandby state;The intermodule communication type related to process is determined based on destination address;Using intermodule communication mode corresponding with intermodule communication type, communication information bag is sent to the software module recipient of intermodule communication;The destination address in communication information bag by using process name, module name, logic machine name and process activestandby state to the software module of module communicating pair and transmitted by them is identified, and realization makes a distinction to intermodule communication type.

Description

Method and device for communication between modules and computing equipment
Technical Field
The embodiment of the invention relates to the technical field of digital communication, in particular to a method and a device for communication between modules and computing equipment.
Background
Interactive communication is required to be carried out between software modules in an operating system and application software developed based on the operating system so as to realize data exchange. The data interactive communication between the software modules, namely the inter-module communication, comprises the following steps: intra-process communication and inter-process communication; wherein, interprocess communication includes: interprocess communication within the same computing device, interprocess communication between different computing devices.
The unified communication interface can make the communication transparent and simple, thus it is fully concerned with the realization of the service logic in the software development stage, therefore, in most cases, both sides of the communication between the modules carry out the identification through the bound IP and the ports, and receive and transmit the communication message packet.
However, the inventor finds that, in the process of implementing the technical solution in the embodiment of the present invention, the existing inter-module communication method has at least the following technical problems:
in practical application, the existing inter-module communication method based on the IP and the ports cannot distinguish the inter-module communication types, and further cannot adopt an inter-module communication mode capable of improving the communication efficiency and the bandwidth utilization rate for different inter-module communication types to carry out inter-module communication.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method, an apparatus, and a computing device for inter-module communication, so as to solve a defect that an inter-module communication method based on IP and ports in the prior art cannot distinguish communication types between modules, and identify software modules of both sides of module communication and destination addresses in communication message packets sent by the software modules and the software modules by using a process name, a module name, a logic machine name, and a process master/standby state, so as to distinguish communication types between modules, and further send the communication message packets by using corresponding inter-module communication methods for different inter-module communication types, thereby improving communication efficiency and bandwidth utilization rate of inter-module communication.
In order to achieve the above purpose, the technical solution adopted in the embodiment of the present invention is as follows:
in a first aspect, an embodiment of the present invention provides a method for inter-module communication, where the method is applied to a first computing device, and software modules of the first computing device and at least one second computing device communicating with the first computing device are identified by a process name, a module name, a logical machine name, and a process active/standby state; the process name is a predefined process name based on the processed service, the module name is a predefined software module name, the logic machine name is a predefined logic hardware name of the computing equipment, and the process master-slave state is a master process state and a slave process state determined by a process master-slave management node; the method comprises the following steps:
after a software module sender of the inter-module communication obtains a communication message packet, analyzing and obtaining a destination address in the communication message packet; the destination address comprises a process name, a module name, a logic machine name and process master and standby state marks;
determining an inter-module communication type related to the process based on the destination address;
and sending the communication message packet to a software module receiver of the inter-module communication by adopting an inter-module communication mode corresponding to the inter-module communication type.
In a possible implementation manner, if it is determined that the inter-module communication type related to the process is intra-process communication based on the destination address, the step of sending the communication message packet to the software module receiver of the inter-module communication in the inter-module communication manner corresponding to the inter-module communication type specifically includes:
sending the communication message packet to the software module receiver of the inter-module communication by adopting an internal message queue communication mode corresponding to the intra-process communication; the internal message queue communication mode comprises a common message queue communication mode and a memory message queue communication mode.
In a possible implementation manner, if the internal message queue communication manner is the memory message queue communication manner, the step of sending the communication message packet to the software module receiver of the inter-module communication by using the internal message queue communication manner corresponding to the intra-process communication specifically includes:
and writing the memory pointer of the communication message packet into a memory message queue so that the software module receiver of the inter-module communication obtains the memory pointer of the communication message packet from the memory message queue, and obtaining the content of the communication message packet based on the memory pointer of the communication message packet.
In a possible implementation manner, if it is determined based on the destination address that the inter-module communication type related to the process is inter-process communication in the same computing device, the step of sending the communication message packet to the software module receiver of the inter-module communication in the inter-module communication manner corresponding to the inter-module communication type specifically includes:
sending the communication message packet to the software module receiver of the inter-module communication in a system message queue communication mode corresponding to the inter-process communication in the same computing device; the system message queue is a system message queue included in a process external message interface.
In a possible implementation manner, if the inter-module communication type determined based on the destination address is inter-process communication between different computing devices, the step of sending the communication message packet to the software module receiver of the inter-module communication in an inter-module communication manner corresponding to the inter-module communication type specifically includes:
sending the communication message packet to the software module receiver of the inter-module communication by adopting an IP and port number communication mode corresponding to the inter-process communication between different computing devices; and the IP and the port number are the IP and the port number which are included in the process external message interface and are obtained based on the process name and the port resource owned by the process corresponding to the process name.
In a possible embodiment, the method further comprises:
after the software module receiver of the inter-module communication receives the communication message packet, analyzing the destination address in the received communication message packet;
if the destination address can be resolved, dispatching the communication message packet based on the destination address;
and if the destination address cannot be resolved, processing the communication message packet as an abnormal message.
In a possible embodiment, before the software module sender of the inter-module communication obtains the communication message packet, the method further comprises:
determining a communication transceiver module in each process;
registering the software module in each process into the communication transceiver module based on a module name and creating a message queue corresponding to the software module based on a module registration interface of the communication transceiver module of each process;
after all processes complete the software module registration in the process, obtaining an address mapping table for communication address conversion among the software modules; the address mapping table is a mapping table of a process name, a module name, a logic machine name, a process master/standby state, a message queue, an IP and a port; the message queue includes an internal message queue and a system message queue.
In a second aspect, an embodiment of the present invention provides an inter-module communication apparatus, which is applied to a first computing device, where software modules of the first computing device and at least one second computing device that communicates with the first computing device are identified by a process name, a module name, a logical machine name, and a process master/slave state; the process name is a predefined process name based on the processed service, the module name is a predefined software module name, the logic machine name is a predefined logic hardware name of the computing equipment, and the process master-slave state is a master process state and a slave process state determined by a process master-slave management node; the device comprises:
the communication message packet analysis unit is used for analyzing and obtaining a destination address in a communication message packet after a software module sender of the inter-module communication obtains the communication message packet; the destination address comprises a process name, a module name, a logic machine name and process master and standby state marks;
a communication type determination unit for determining an inter-module communication type related to the process based on the destination address;
and the communication message packet sending unit is used for sending the communication message packet to a software module receiver of the inter-module communication in an inter-module communication mode corresponding to the inter-module communication type.
In a possible implementation manner, if it is determined that the inter-module communication type related to the process is intra-process communication based on the destination address, the communication message packet sending unit is specifically configured to:
sending the communication message packet to the software module receiver of the inter-module communication by adopting an internal message queue communication mode corresponding to the intra-process communication; the internal message queue communication mode comprises a common message queue communication mode and a memory message queue communication mode.
In a possible implementation manner, if the internal message queue communication manner is the memory message queue communication manner, the communication message packet sending unit is specifically configured to:
and writing the memory pointer of the communication message packet into a memory message queue so that the software module receiver of the inter-module communication obtains the memory pointer of the communication message packet from the memory message queue, and obtaining the content of the communication message packet based on the memory pointer of the communication message packet.
In a possible implementation manner, if it is determined based on the destination address that the inter-module communication type related to the process is inter-process communication in the same computing device, the communication message packet sending unit is specifically configured to:
sending the communication message packet to the software module receiver of the inter-module communication in a system message queue communication mode corresponding to the inter-process communication in the same computing device; the system message queue is a system message queue included in a process external message interface.
In a possible implementation manner, if it is determined based on the destination address that the inter-module communication type related to the process is inter-process communication between different computing devices, the communication message packet sending unit is specifically configured to:
sending the communication message packet to the software module receiver of the inter-module communication by adopting an IP and port number communication mode corresponding to the inter-process communication between different computing devices; and the IP and the port number are the IP and the port number which are included in the process external message interface and are obtained based on the process name and the port resource owned by the process corresponding to the process name.
In a possible embodiment, the apparatus further comprises:
a communication message packet receiving and processing unit, configured to, after the software module receiver of the inter-module communication receives the communication message packet, analyze the destination address in the received communication message packet; if the destination address can be resolved, dispatching the communication message packet based on the destination address; and if the destination address cannot be resolved, processing the communication message packet as an abnormal message.
In a possible embodiment, the apparatus further comprises:
a communication transceiver module determining unit, which is used for determining a communication transceiver module in each process before a software module sender of the inter-module communication obtains a communication message packet; registering the software module in each process into the communication transceiver module based on a module name and creating a message queue corresponding to the software module based on a module registration interface of the communication transceiver module of each process; after all processes complete the software module registration in the process, obtaining an address mapping table for communication address conversion among the software modules; the address mapping table is a mapping table of a process name, a module name, a logic machine name, a process master/standby state, a message queue, an IP and a port; the message queue includes an internal message queue and a system message queue.
In a third aspect, an embodiment of the present invention provides a computing device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the aforementioned method of inter-module communication.
Based on the technical scheme, the method, the device and the computing equipment for communication between modules in the embodiment of the invention identify the software module used by the computing equipment through the process name, the module name, the logic machine name and the process master/standby state, so that the software module communication interface is further unified on the basis of the IP and the port obtained based on the process name and the port resource owned by the process, the process name is dynamically bound by the IP and the port, and the software module does not need to be changed correspondingly due to the change of the IP and the port; therefore, on one hand, the process name, the module name, the logic machine name and the process master/standby state mark of the destination address in the communication message packet generated by the communication interface of the software module can be used for distinguishing the inter-module communication types related to the process between the software module and the software module, and further, the inter-module communication mode which can improve the communication efficiency and the bandwidth utilization rate of inter-module communication is adopted for different inter-module communication types to send the communication message packet, so that the self-adaptive communication between the software modules in the computing equipment and between the computing equipment and the software modules of the computing equipment is realized, unnecessary system bandwidth occupation is removed, when the computing equipment communicates with the computing equipment, the external bandwidth occupation of the computing equipment can be effectively reduced, the network card load is effectively reduced, and the communication efficiency and the bandwidth utilization rate of inter-module communication are improved; on the other hand, as the software communication interfaces are unified, the communication between the modules is transparent and simple, the software modularization idea is clearer, the difficulty and the complexity of software development are reduced, the realization of business logic is realized in the software development stage, and the software development speed is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a process diagram illustrating a method of inter-module communication provided in an embodiment of the present invention;
FIG. 2 is a process diagram illustrating the creation of a communication transceiver module within each process that can be used to transceive intra-process communication and inter-process communication message packets in accordance with an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for inter-module communication provided in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computing device provided in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to facilitate clear and complete understanding of the technical solutions of the embodiments of the present invention, the following description is provided for terms related to the embodiments of the present invention.
The term "Message" refers to data transmitted within and/or between processes of the same computing device, or between processes of different computing devices.
The term "Message queue" (Message queue), i.e. a Message linked list, is a container used for storing messages during the transmission process of messages, a Message sender adds a new Message to be sent to the Message queue according to a certain rule, a Message receiver reads the Message from the Message queue, the Message queue serves as a man-in-the-middle, relays the Message from its sender to its receiver, transfers the Message through the Message queue, provides a route for Message transfer and ensures successful transfer of the Message.
The term "Process" (Process), is a running activity of a program with some independent functionality with respect to a certain data set, each Process having its own address space.
The existing inter-module communication method based on IP and ports can not distinguish the inter-module communication types, and further can not adopt an inter-module communication mode capable of improving the communication efficiency and the bandwidth utilization rate for different inter-module communication types to carry out inter-module communication.
The inventor finds that, in the process of implementing the technical solution in the embodiment of the present invention, the inter-module communication method based on the IP and the port cannot distinguish the inter-module communication types, and not because the inter-module communication types cannot be distinguished, the true reason is that, in the inter-module communication process, the IP and the port used for inter-module communication are changed, and both software modules for inter-module communication cannot be effectively positioned based on the IP and the port.
The inventor also finds that the factors involved in the inter-module communication include processes, the active/standby states of the processes, software modules in the processes, and hardware-related information used for the process communication. If the modules can be associated, the communication interfaces of the communication between the modules can be unified, so that the communication between the modules is transparent and simple, and both software modules of the communication between the modules can be effectively positioned, thereby distinguishing the communication types between the modules.
The inventor provides a method, a device and a computing device for communication between modules based on the recognition.
FIG. 1 is a process diagram illustrating a method of inter-module communication provided in an embodiment of the present invention; the method is applied to first computing equipment, and software modules of the first computing equipment and at least one second computing equipment which is communicated with the first computing equipment are identified by adopting a process name, a module name, a logic machine name and a process master-slave state; the process name is a predefined process name based on the processed service, the module name is a predefined software module name, the logic machine name is a predefined logic hardware name of the computing device, and the process master/standby state is a master process state and a standby process state determined by the process master/standby management node.
The first computing device and the second computing device may be specifically not limited to computing devices related to software, such as a cloud platform, a server, a client, a workstation, a Personal Computer (PC), a notebook computer, an industrial personal computer, an embedded device, an intelligent terminal device, a network switching device, a network security device, a network terminal device, and the like; the software module of the computing device may be specifically a software module not limited to system software, application software and middleware.
The Process name (Process Identification) is a Process name predefined based on the processed service, and can be specifically represented by a PID; the process master/standby state related to the process is a master process state and a standby process state determined by the process master/standby management node, and can be specifically represented by hash; when the process names are predefined, processes with the same service are processed by adopting the same process names, for example, the main process and the standby process which are determined by the main and standby process management nodes of the processes and have different states are generally the same, and the processed services are the same and have the same process names; meanwhile, it is also ensured that the process name is a globally unique identifier, and the process name can be specifically generated by a globally unique ID generator.
The module name (module Identification) is a predefined software module name and can be specifically represented by a module ID; when the software module names are predefined, the software module names in the same process must be ensured to be unique, and the software module names of different processes can be the same.
The logical machine name (Slot Identification) is a predefined logical hardware name of the computing device, and may be specifically represented by a Slot id; the logical machine name may specifically be a card slot number or the like.
Before communication among the modules, software modules in each process are registered in the process based on module registration, and a message queue corresponding to the software modules is created; after all processes finish the software module registration in the process, an address mapping table for the communication address conversion among the software modules is obtained.
Before communication between the modules, the first computing device and the second computing device perform process registration, and a specific process of the process registration may be that, when the process 1 is initialized, the process 1 initializes its own hardware information, such as a logical machine name (which may specifically include a machine frame number, a board slot number, a chip number, and the like), according to a hardware environment, obtains a port number in an external message interface of the process 1 based on the process name and port resources owned by the process, and obtains an external IP of a board on the basis of the port number, thereby creating an external communication transceiving interface of the process 1 and a system message queue for obtaining system messages sent by other processes in the same computing device. The process 1 notifies other processes, such as process 2 and process 3, of its own hardware information, such as a logical machine name (which may specifically include a machine frame number, a board slot number, a chip number, etc.), and other proprietary information, such as a process master/standby state, a system message queue number, an IP and a port number of a transceiving interface, etc., in a multicast or broadcast manner, so as to realize discovery among the processes, thereby obtaining an address mapping table for process communication.
Referring now to fig. 1, the specific process of inter-module communication in the embodiment of the present invention is as follows:
s110, after a software module sender of the inter-module communication obtains a communication message packet, analyzing and obtaining a destination address in the communication message packet; the destination address comprises a process name, a module name, a logic machine name and process master and standby state marks;
s120, determining the inter-module communication type related to the process based on the destination address;
the inter-module communication type determined in step S120 and related to the process may specifically include intra-process communication, inter-process communication in the same computing device, and inter-process communication between different computing devices.
The specific implementation process may be that whether the communication message packet is sent to a software module of different computing devices or a software module in the same computing device is determined based on a module name and a logical machine name in a destination address, if the communication message packet is sent to a software module of different computing devices, the inter-module communication type related to the process is inter-process communication between different computing devices, and if the communication message packet is sent to a software module in the same computing device, whether the communication message packet is inter-process communication or intra-process communication in the same computing device is determined based on the process name and the master-slave state of the process.
S130, the communication message packet is sent to the software module receiver of the inter-module communication by adopting the inter-module communication mode corresponding to the inter-module communication type.
Corresponding to step S120, step S130 uses an inter-module communication mode corresponding to the inter-module communication type to send the communication message packet to the software module receiver of inter-module communication, which may be implemented by at least the following three possible implementations:
the first possible implementation is:
if the inter-module communication type related to the process is determined to be intra-process communication based on the destination address, the step of sending the communication message packet to a software module receiver of the inter-module communication by adopting an inter-module communication mode corresponding to the inter-module communication type specifically comprises the following steps:
sending the communication message packet to the software module receiver of the inter-module communication by adopting an internal message queue communication mode corresponding to the intra-process communication; the internal message queue communication mode comprises a common message queue communication mode and a memory message queue communication mode. Wherein:
if the internal message queue communication mode is the memory message queue communication mode, the step of sending the communication message packet to the software module receiver of the inter-module communication by adopting the internal message queue communication mode corresponding to the intra-process communication is specifically as follows:
and writing the memory pointer of the communication message packet into a memory message queue so that the software module receiver of the inter-module communication obtains the memory pointer of the communication message packet from the memory message queue, and obtaining the content of the communication message packet based on the memory pointer of the communication message packet.
If the internal message queue communication mode is a common message queue communication mode, the step of sending the communication message packet to the software module receiver of the inter-module communication by adopting the internal message queue communication mode corresponding to the intra-process communication is specifically as follows:
and writing the communication message packet into a common message queue so that the software module receiver of the inter-module communication obtains the content copy of the communication message packet from the common message queue.
In the embodiment of the present invention, the internal message queue is a message queue used for inter-module communication between software modules in a process of the same computing device. The memory message queue is a message linked list generated based on a memory pointer of a memory in which messages are stored.
In a first possible implementation manner, if a common message queue communication manner is adopted for in-process communication, the system recovers the memory occupied by the content of the communication message packet after the in-process communication is completed, and if the in-process communication manner is adopted for in-process communication, the problem that the communication message packet interaction is carried out by adopting a content copy manner, that is, the memory is leaked because the communication message packet is copied too much can be avoided. In addition, the in-process communication is carried out based on the internal message queue communication mode, so that not only can a route be provided to ensure the delivery of the communication message packet, but also redundancy can be provided for the transmission of the communication message packet, an asynchronous processing mechanism can be provided to effectively reduce the flow peak value of in-process communication, and the efficiency and the performance of in-process communication are improved.
A second possible implementation is:
if it is determined based on the destination address that the inter-module communication type related to the process is inter-process communication in the same computing device, the step of sending the communication message packet to the software module receiver of the inter-module communication in an inter-module communication mode corresponding to the inter-module communication type includes:
sending the communication message packet to the software module receiver of the inter-module communication in a system message queue communication mode corresponding to the inter-process communication in the same computing device; the system message queue is a system message queue included in a process external message interface.
When the inter-module communication type is inter-process communication in the same computing device, inter-process communication in the same computing device may also be performed by using an IP and a port number in a process external message interface obtained based on a process name and a port resource owned by the process.
On one hand, the method can not only effectively reduce the flow peak value of the communication in the process through an asynchronous processing mechanism and improve the efficiency and the performance of the communication between the processes, but also provide redundancy for the transmission of the communication message packets and provide a route to ensure the delivery of the communication message packets and effectively reduce the coupling degree between the two processes; on the other hand, the inter-process communication in the same computing device does not occupy the network card load of the computing device.
In the embodiment of the present invention, the system message queue is a message queue based on an operating system kernel.
A third possible implementation is:
if the inter-module communication type determined based on the destination address is inter-process communication between different computing devices, the step of sending the communication message packet to the software module receiver of the inter-module communication in an inter-module communication mode corresponding to the inter-module communication type specifically includes:
sending the communication message packet to the software module receiver of the inter-module communication by adopting an IP and port number communication mode corresponding to the inter-process communication between different computing devices; and the IP and the port number are the IP and the port number which are included in the process external message interface and are obtained based on the process name and the port resource owned by the process corresponding to the process name.
The IP and the port number which are contained in the process external message interface and are obtained based on the process name and the port resource which is owned by the process corresponding to the process name are in a dynamic binding relationship with the process name, when the IP and the port number are changed, a corresponding change strategy is not needed to be carried out on a software module, namely, a communication interface for interprocess communication among different computing devices can be a uniform communication interface, so that interprocess communication among different computing devices is transparent and simple.
In view of at least enabling efficient inter-process and/or intra-process transfer of communication message packets, the method further comprises:
after the software module receiver of the inter-module communication receives the communication message packet, analyzing the destination address in the received communication message packet;
if the destination address can be resolved, dispatching the communication message packet based on the destination address;
and if the destination address cannot be resolved, processing the communication message packet as an abnormal message.
The specific implementation process may be that the software module receiver of inter-module communication analyzes the communication message packet after obtaining the communication message packet sent by the software module sender, dispatches the communication message packet based on the analyzed destination address, and treats the communication message packet as an abnormal message if the destination address is not analyzed, and may add a logical machine name and a process master/slave state to perform comprehensive judgment when performing abnormal message treatment.
Based at least on the communication interface considerations that facilitate intra-process and/or inter-process communication, further, as now described with reference to fig. 2, before a software module sender of inter-module communication obtains a communication message packet, the method further comprises:
s010, determining a communication transceiver module in each process;
s020, registering the software module in each process into the communication transceiver module based on the module name and creating a message queue corresponding to the software module based on the module registration interface of the communication transceiver module of each process;
s030, after all processes finish the software modules registration in the processes, obtaining an address mapping table for carrying out communication address conversion among the software modules; the address mapping table is a mapping table of a process name, a module name, a logic machine name, a process master/standby state, a message queue, an IP and a port; the message queue includes an internal message queue and a system message queue.
The specific implementation process can be as follows:
the operating system or the application software system of the computing device determines a communication transceiving module in each process, and the communication transceiving module is used for transceiving communication message packets, wherein the communication message packets comprise communication message packets communicated in the processes and communication message packets communicated among the processes. The communication transceiver module may specifically include a communication receiving module and a communication sending module, where the communication receiving module and the communication sending module may be one module or two separately designed modules.
The communication transceiver module is provided with a module registration interface, an operating system or an application software system of the first computing device and/or the second computing device registers the software module in each process to the communication transceiver module based on a module name by calling the module registration interface of the communication transceiver module, and a message queue corresponding to the software module is created in the process of registering the software module to the communication transceiver module, wherein the message queue can be realized in a double-queue mode or a single-queue mode, and comprises an internal message queue and a system message queue. After all processes complete the software module registration in the process, obtaining an address mapping table for communication address conversion among the software modules; the first computing device and at least one software module of the second computing device communicating with the first computing device are identified by using a process name, a module name, a logic machine name and a process master/slave state, and an IP and a port are bound, so that the address mapping table is a mapping table of the process name, the module name, the logic machine name and the process master/slave state, a message queue and the IP and the port.
Therefore, in the embodiment of the invention, the intra-process communication message packet and the inter-process communication message packet can be received and transmitted based on the communication receiving and transmitting module determined in each process and the address mapping table corresponding to the communication receiving and transmitting module, so that the communication interface of the inter-module communication is simplified, and the communication efficiency and performance are improved.
According to the method for communication between the modules, provided by the embodiment of the invention, the software modules used by the computing equipment are identified through the process names, the module names, the logic machine names and the process main and standby states, so that the software module communication interfaces are further unified on the basis of the IP and the ports obtained on the basis of the process names and the port resources owned by the processes, the process names are dynamically bound by the IP and the ports, and the software modules do not need to be changed correspondingly due to the change of the IP and the ports; therefore, on one hand, the process name, the module name, the logic machine name and the process master/standby state mark of the destination address in the communication message packet generated by the communication interface of the software module can be used for distinguishing the inter-module communication types related to the process between the software module and the software module, and further, the inter-module communication mode which can improve the communication efficiency and the bandwidth utilization rate of inter-module communication is adopted for different inter-module communication types to send the communication message packet, so that the self-adaptive communication between the software modules in the computing equipment and between the computing equipment and the software modules of the computing equipment is realized, unnecessary system bandwidth occupation is removed, when the computing equipment communicates with the computing equipment, the external bandwidth occupation of the computing equipment can be effectively reduced, the network card load is effectively reduced, and the communication efficiency and the bandwidth utilization rate of inter-module communication are improved; on the other hand, as the software communication interfaces are unified, the communication between the modules is transparent and simple, the software modularization idea is clearer, the difficulty and the complexity of software development are reduced, the realization of business logic is realized in the software development stage, and the software development speed is improved.
The steps corresponding to the process disclosed in any embodiment of the method for inter-module communication according to the present invention may be obtained by dividing a plurality of functional modules corresponding to the process disclosed in any embodiment based on logical functions according to the functions that can be realized by one or more steps and the specific implementation application environment, one functional module may correspond to the same step, or may correspond to two or more steps, each functional module may exist alone physically, or two or more functional modules may exist together physically. In the aspect of execution, the execution of the steps corresponding to the functional modules may be realized by executing the instructions corresponding to the functional modules, and one or more execution main bodies for executing the instructions corresponding to the functional modules may be used.
In different embodiments, because the functions to be implemented may differ, the application environments of the implementation may also differ, and therefore, a plurality of functional modules corresponding to the processes disclosed in the embodiments may also differ, in some embodiments, some functional modules may be omitted or not executed, in some embodiments, two or more functional modules may be integrated into one functional module, and in some embodiments, one or more functional modules may be combined or integrated into another system.
A plurality of functional modules corresponding to the processes disclosed in any of the foregoing method embodiments for inter-module communication according to the present invention based on logical function partitioning may be implemented by program codes to obtain corresponding programs, where the programs may be installed in a memory and include one or more software functional modules executed by a processor, and the processor executes instructions corresponding to the programs to perform the method steps corresponding to the functional modules.
The program may be in the form of external or resident software, firmware, or microcode (source or object code), which may be used in connection with or in connection with a data processing system; the program corresponding to the process disclosed in any of the method embodiments for inter-module communication according to the present invention may be provided as a computer readable medium of a non-volatile program code executable by a processor, where the computer readable medium is a computer readable storage medium storing the program code, and the program code includes instructions for executing the method for inter-module communication in the aforementioned method embodiments for inter-module communication according to the present invention. The computer readable medium may be any element suitable for containing, storing, communicating, propagating or transmitting the program, and may in particular be of an electronic, magnetic, optical, electromagnetic, infrared or semiconductor type. For example, removable disks, tapes, cards, wires, optical fibers, wireless connections, networks, broadcast waves, fixed disks in which programs can be preloaded, and the like.
The plurality of functional modules corresponding to the processes disclosed in any of the foregoing embodiments of the method for inter-module communication according to the present invention based on logic function division may also be implemented by logic circuits, and accordingly, the processes disclosed in any of the embodiments of the method for inter-module communication according to the present invention may be implemented by a hardware structure (for example, integrated in a chip made of semiconductor material), or by a combination of software and hardware that is suitably programmed or configured in other manners.
No matter which implementation manner is used to implement the steps corresponding to the processes disclosed in any of the method embodiments of inter-module communication of the present invention, a corresponding apparatus embodiment of inter-module communication of the present invention and/or an embodiment of computing device of the present invention can be obtained. Since they are based on the same inventive concept as the method embodiments of the communication between modules of the present invention, the technical problems to be solved, the working processes of implementing functions, and the technical effects to be achieved are the same as or similar to the method embodiments of the communication between modules of the present invention. Therefore, a person skilled in the art may refer to the embodiment of the apparatus for inter-module communication and/or the embodiment of the computing device of the present invention to understand a specific implementation form of the embodiment of the method for inter-module communication of the present invention, and similarly, may refer to a specific description of method steps in the embodiment of the method for inter-module communication of the present invention to understand each functional module in the embodiment of the apparatus for inter-module communication of the present invention, a coordination relationship between each functional module, and an operation process of the embodiment of the apparatus for inter-module communication of the present invention, and understand a process of method steps corresponding to the functional modules that are executed when each execution main body in the embodiment of the computing device of the present invention executes instructions corresponding to the functional modules.
For convenience and simplicity of description, in the process of describing the embodiment of the apparatus for inter-module communication according to the present invention, detailed descriptions of the working processes of the functional modules, the coordination relationships among the functional modules, technical problems that can be solved by the embodiment of the apparatus for inter-module communication according to the present invention, and technical effects that can be obtained are not repeated. Similarly, in the process of describing the embodiment of the computing device of the present invention, a content part that can be understood by referring to the embodiment of the method for inter-module communication of the present invention is not described in detail.
Based on the technical solution of the method embodiment of communication between modules of the present invention, the embodiment of the present invention provides an apparatus for communication between modules, and the apparatus for communication between modules and the method for communication between modules belong to the same inventive concept. The inter-module communication device may obtain a corresponding program through a program code in a form corresponding to the inter-module communication method embodiment of the present invention, and apply the program to software, such as system software, application software, and middleware, where the software may be specifically applied to, but not limited to, a cloud platform, a server, a client, a workstation, a Personal Computer (PC), a notebook computer, an industrial personal computer, an embedded device, an intelligent terminal device, a network switching device, a network security device, a network terminal device, and other computing devices related to software.
Fig. 3 is a schematic structural diagram of an apparatus for inter-module communication provided in an embodiment of the present invention. The device for communication among the modules is applied to first computing equipment, and software modules of the first computing equipment and at least one second computing equipment which is communicated with the first computing equipment are marked by adopting a process name, a module name, a logic machine name and a process master-slave state; the process name is a predefined process name based on the processed service, the module name is a predefined software module name, the logic machine name is a predefined logic hardware name of the computing device, and the process master/standby state is a master process state and a standby process state determined by the process master/standby management node.
Referring now to FIG. 3, the apparatus 100 for communication between modules comprises: the communication message packet parsing unit 110, the communication type determining unit 120, and the communication message packet sending unit 130, and in the embodiment of the present invention, the communication message packet parsing unit 110, the communication type determining unit 120, and the communication message packet sending unit 130 may be modules that implement related functions through a hardware processor (hardware processor). Wherein:
a communication message packet analyzing unit 110, configured to, after a software module sender of inter-module communication obtains a communication message packet, analyze the communication message packet to obtain a destination address in the communication message packet; the destination address comprises a process name, a module name, a logic machine name and process master and standby state marks;
a communication type determining unit 120, configured to determine an inter-module communication type related to the process based on the destination address;
a communication message packet sending unit 130, configured to send the communication message packet to a software module receiving party of the inter-module communication in an inter-module communication manner corresponding to the inter-module communication type.
In a possible embodiment, the apparatus further comprises:
a communication message packet receiving and processing unit 140, configured to, after the software module receiver in the inter-module communication receives the communication message packet, analyze the destination address in the received communication message packet; if the destination address can be resolved, dispatching the communication message packet based on the destination address; and if the destination address cannot be resolved, processing the communication message packet as an abnormal message.
In a possible embodiment, the apparatus further comprises:
a communication transceiver module determining unit 150, configured to determine a communication transceiver module in each process before a software module sender of inter-module communication obtains a communication message packet; registering the software module in each process into the communication transceiver module based on a module name and creating a message queue corresponding to the software module based on a module registration interface of the communication transceiver module of each process; after all processes complete the software module registration in the process, obtaining an address mapping table for communication address conversion among the software modules; the address mapping table is a mapping table of a process name, a module name, a logic machine name, a process master/standby state, a message queue, an IP and a port; the message queue includes an internal message queue and a system message queue.
In a possible implementation manner, if it is determined that the inter-module communication type related to the process is intra-process communication based on the destination address, the communication message packet sending unit 130 is specifically configured to:
sending the communication message packet to the software module receiver of the inter-module communication by adopting an internal message queue communication mode corresponding to the intra-process communication; the internal message queue communication mode comprises a common message queue communication mode and a memory message queue communication mode.
In a possible implementation manner, if the internal message queue communication manner is the memory message queue communication manner, the communication message packet sending unit 130 is specifically configured to:
and writing the memory pointer of the communication message packet into a memory message queue so that the software module receiver of the inter-module communication obtains the memory pointer of the communication message packet from the memory message queue, and obtaining the content of the communication message packet based on the memory pointer of the communication message packet.
In a possible implementation manner, if it is determined that the inter-module communication type related to the process is inter-process communication in the same computing device based on the destination address, the communication message packet sending unit 130 is specifically configured to:
sending the communication message packet to the software module receiver of the inter-module communication in a system message queue communication mode corresponding to the inter-process communication in the same computing device; the system message queue is a system message queue included in a process external message interface.
In a possible implementation manner, if the inter-module communication type determined based on the destination address is inter-process communication between different computing devices, the communication message packet sending unit 130 is specifically configured to:
sending the communication message packet to the software module receiver of the inter-module communication by adopting an IP and port number communication mode corresponding to the inter-process communication between different computing devices; and the IP and the port number are the IP and the port number which are included in the process external message interface and are obtained based on the process name and the port resource owned by the process corresponding to the process name.
Based on the technical scheme of the method embodiment of the communication between the modules, the embodiment of the invention provides the computing equipment, and the computing equipment and the method of the communication between the modules belong to the same inventive concept. The computing device is corresponding computing device obtained by applying the method embodiment of the communication between the modules, and the computing device can be but not limited to computing devices related to software, such as a cloud platform, a server, a client, a workstation, a Personal Computer (PC), a notebook computer, an industrial personal computer, an embedded device, an intelligent terminal device, a network switching device, a network security device, a network terminal device and the like.
Fig. 4 is a schematic structural diagram of a computing device provided in an embodiment of the present invention. Software modules of the computing equipment and other computing equipment which can be in communication connection with the computing equipment are identified by adopting a process name, a module name, a logic machine name and a process master/standby state; the process name is a predefined process name based on the processed service, the module name is a predefined software module name, the logic machine name is a predefined logic hardware name of the computing device, and the process master/standby state is a master process state and a standby process state determined by the process master/standby management node.
Referring now to FIG. 4, the computing device 200 includes: a bus 230, at least one processor 210 coupled to the bus 230, and a memory 220 communicatively coupled to the at least one processor 210. Wherein the memory 220 stores instructions executable by the at least one processor, the instructions being executable by the at least one processor 210 to, when executed, perform the steps of:
after a software module sender of the inter-module communication obtains a communication message packet, analyzing and obtaining a destination address in the communication message packet; the destination address comprises a process name, a module name, a logic machine name and process master and standby state marks;
determining an inter-module communication type related to the process based on the destination address;
and sending the communication message packet to a software module receiver of the inter-module communication by adopting an inter-module communication mode corresponding to the inter-module communication type.
The at least one processor 210 is further configured to:
before a software module sender of the inter-module communication obtains a communication message packet, determining a communication transceiver module in each process; registering the software module in each process into the communication transceiver module based on a module name and creating a message queue corresponding to the software module based on a module registration interface of the communication transceiver module of each process; after all processes complete the software module registration in the process, obtaining an address mapping table for communication address conversion among the software modules; the address mapping table is a mapping table of a process name, a module name, a logic machine name, a process master/standby state, a message queue, an IP and a port; the message queue includes an internal message queue and a system message queue.
The at least one processor 210 is further configured to:
after the software module receiver of the inter-module communication receives the communication message packet, analyzing the destination address in the received communication message packet;
if the destination address can be resolved, dispatching the communication message packet based on the destination address;
and if the destination address cannot be resolved, processing the communication message packet as an abnormal message.
In a possible embodiment, when performing the step of sending the communication message packet to the software module receiver of the inter-module communication in the inter-module communication manner corresponding to the inter-module communication type, if the inter-module communication type related to the process is determined to be intra-process communication based on the destination address, the at least one processor 210 is specifically configured to:
sending the communication message packet to the software module receiver of the inter-module communication by adopting an internal message queue communication mode corresponding to the intra-process communication; the internal message queue communication mode comprises a common message queue communication mode and a memory message queue communication mode.
In a possible implementation manner, when executing the step of sending the communication message packet to the software module receiving side of the inter-module communication by using an internal message queue communication manner corresponding to intra-process communication, if the internal message queue communication manner is the memory message queue communication manner, the at least one processor 210 is specifically configured to:
and writing the memory pointer of the communication message packet into a memory message queue so that the software module receiver of the inter-module communication obtains the memory pointer of the communication message packet from the memory message queue, and obtaining the content of the communication message packet based on the memory pointer of the communication message packet.
In a possible embodiment, when performing the step of sending the communication message packet to the software module receiver of the inter-module communication in an inter-module communication manner corresponding to the inter-module communication type, if it is determined based on the destination address that the inter-module communication type related to the process is inter-process communication within the same computing device, the at least one processor 210 is specifically configured to:
sending the communication message packet to the software module receiver of the inter-module communication in a system message queue communication mode corresponding to the inter-process communication in the same computing device; the system message queue is a system message queue included in a process external message interface.
In a possible embodiment, when performing the step of sending the communication message packet to the software module receiver of the inter-module communication in the inter-module communication manner corresponding to the inter-module communication type, if the inter-module communication type determined based on the destination address is inter-process communication between different computing devices, the at least one processor 210 is specifically configured to:
sending the communication message packet to the software module receiver of the inter-module communication by adopting an IP and port number communication mode corresponding to the inter-process communication between different computing devices; and the IP and the port number are the IP and the port number which are included in the process external message interface and are obtained based on the process name and the port resource owned by the process corresponding to the process name.
In summary, in the embodiments of the present invention, the software module used by the computing device is identified by the process name, the module name, the logical machine name, and the process active/standby state, so that the software module communication interface is further unified on the basis of the IP and the port obtained based on the process name and the port resource owned by the process, and the process name is dynamically bound to the IP and the port without making a corresponding change policy on the software module due to the change of the IP and the port; therefore, on one hand, the process name, the module name, the logic machine name and the process master/standby state mark of the destination address in the communication message packet generated by the communication interface of the software module can be used for distinguishing the inter-module communication types related to the process between the software module and the software module, and further, the inter-module communication mode which can improve the communication efficiency and the bandwidth utilization rate of inter-module communication is adopted for different inter-module communication types to send the communication message packet, so that the self-adaptive communication between the software modules in the computing equipment and between the computing equipment and the software modules of the computing equipment is realized, unnecessary system bandwidth occupation is removed, when the computing equipment communicates with the computing equipment, the external bandwidth occupation and the network card load of the computing equipment can be effectively reduced, and the communication efficiency and the bandwidth utilization rate of inter-module communication are improved; on the other hand, as the software communication interfaces are unified, the communication between the modules is transparent and simple, the software modularization idea is clearer, the difficulty and the complexity of software development are reduced, the realization of business logic is realized in the software development stage, and the software development speed is improved.
On the basis, the interprocess communication in the same computing equipment can be carried out based on the scheduling system message queue of the computing equipment system, and the network card load of the computing equipment cannot be occupied; the intra-process communication can be carried out based on an internal message queue communication mode, particularly based on a memory message queue communication mode, so that the intra-process communication becomes more reasonable and efficient, the communication message packet can be effectively prevented from being copied too much in the memory, and the efficiency and the performance of the inter-module communication are improved.
On the basis, the intra-process communication message packet and the inter-process communication message packet can be received and transmitted based on the communication receiving and transmitting module determined in each process and the address mapping table corresponding to the communication receiving and transmitting module, so that the communication interface of inter-module communication is simplified, and the communication efficiency and performance are improved.
It should be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (15)

1. A method for communication between modules is applied to a first computing device, and is characterized in that software modules of the first computing device and at least one second computing device which is communicated with the first computing device are identified by a process name, a module name, a logic machine name and a process master/standby state; the process name is a predefined process name based on the processed service, the module name is a predefined software module name, the logic machine name is a predefined logic hardware name of the computing equipment, and the process master-slave state is a master process state and a slave process state determined by a process master-slave management node; the method comprises the following steps:
after a software module sender of the inter-module communication obtains a communication message packet, analyzing and obtaining a destination address in the communication message packet; the destination address comprises a process name, a module name, a logic machine name and process master and standby state marks;
determining an inter-module communication type related to the process based on the destination address;
and sending the communication message packet to a software module receiver of the inter-module communication by adopting an inter-module communication mode corresponding to the inter-module communication type.
2. The method of claim 1,
if the inter-module communication type related to the process is determined to be intra-process communication based on the destination address, the step of sending the communication message packet to a software module receiver of the inter-module communication by adopting an inter-module communication mode corresponding to the inter-module communication type specifically comprises the following steps:
sending the communication message packet to the software module receiver of the inter-module communication by adopting an internal message queue communication mode corresponding to the intra-process communication; the internal message queue communication mode comprises a common message queue communication mode and a memory message queue communication mode.
3. The method of claim 2,
if the internal message queue communication mode is the memory message queue communication mode, the step of sending the communication message packet to the software module receiver of the inter-module communication by adopting the internal message queue communication mode corresponding to the intra-process communication is specifically as follows:
and writing the memory pointer of the communication message packet into a memory message queue so that the software module receiver of the inter-module communication obtains the memory pointer of the communication message packet from the memory message queue, and obtaining the content of the communication message packet based on the memory pointer of the communication message packet.
4. The method of claim 1,
if it is determined based on the destination address that the inter-module communication type related to the process is inter-process communication in the same computing device, the step of sending the communication message packet to the software module receiver of the inter-module communication in an inter-module communication mode corresponding to the inter-module communication type includes:
sending the communication message packet to the software module receiver of the inter-module communication in a system message queue communication mode corresponding to the inter-process communication in the same computing device; the system message queue is a system message queue included in a process external message interface.
5. The method of claim 1,
if the inter-module communication type determined based on the destination address is inter-process communication between different computing devices, the step of sending the communication message packet to the software module receiver of the inter-module communication in an inter-module communication mode corresponding to the inter-module communication type specifically includes:
sending the communication message packet to the software module receiver of the inter-module communication by adopting an IP and port number communication mode corresponding to the inter-process communication between different computing devices; and the IP and the port number are the IP and the port number which are included in the process external message interface and are obtained based on the process name and the port resource owned by the process corresponding to the process name.
6. The method according to any one of claims 1-5, further comprising:
after the software module receiver of the inter-module communication receives the communication message packet, analyzing the destination address in the received communication message packet;
if the destination address can be resolved, dispatching the communication message packet based on the destination address;
and if the destination address cannot be resolved, processing the communication message packet as an abnormal message.
7. The method of any of claims 1-5, wherein before a software module sender of the inter-module communication obtains a communication message packet, the method further comprises:
determining a communication transceiver module in each process;
registering the software module in each process into the communication transceiver module based on a module name and creating a message queue corresponding to the software module based on a module registration interface of the communication transceiver module of each process;
after all processes complete the software module registration in the process, obtaining an address mapping table for communication address conversion among the software modules; the address mapping table is a mapping table of a process name, a module name, a logic machine name, a process master/standby state, a message queue, an IP and a port; the message queue includes an internal message queue and a system message queue.
8. A device for communication between modules is applied to a first computing device, and is characterized in that software modules of the first computing device and at least one second computing device which is communicated with the first computing device are identified by a process name, a module name, a logic machine name and a process master-slave state; the process name is a predefined process name based on the processed service, the module name is a predefined software module name, the logic machine name is a predefined logic hardware name of the computing equipment, and the process master-slave state is a master process state and a slave process state determined by a process master-slave management node; the device comprises:
the communication message packet analysis unit is used for analyzing and obtaining a destination address in a communication message packet after a software module sender of the inter-module communication obtains the communication message packet; the destination address comprises a process name, a module name, a logic machine name and process master and standby state marks;
a communication type determination unit for determining an inter-module communication type related to the process based on the destination address;
and the communication message packet sending unit is used for sending the communication message packet to a software module receiver of the inter-module communication in an inter-module communication mode corresponding to the inter-module communication type.
9. The apparatus of claim 8,
if the inter-module communication type related to the process is determined to be intra-process communication based on the destination address, the communication message packet sending unit is specifically configured to:
sending the communication message packet to the software module receiver of the inter-module communication by adopting an internal message queue communication mode corresponding to the intra-process communication; the internal message queue communication mode comprises a common message queue communication mode and a memory message queue communication mode.
10. The apparatus of claim 9,
if the internal message queue communication mode is the memory message queue communication mode, the communication message packet sending unit is specifically configured to:
and writing the memory pointer of the communication message packet into a memory message queue so that the software module receiver of the inter-module communication obtains the memory pointer of the communication message packet from the memory message queue, and obtaining the content of the communication message packet based on the memory pointer of the communication message packet.
11. The apparatus of claim 8,
if it is determined based on the destination address that the inter-module communication type related to the process is inter-process communication in the same computing device, the communication message packet sending unit is specifically configured to:
sending the communication message packet to the software module receiver of the inter-module communication in a system message queue communication mode corresponding to the inter-process communication in the same computing device; the system message queue is a system message queue included in a process external message interface.
12. The apparatus of claim 8,
if it is determined based on the destination address that the inter-module communication type related to the process is inter-process communication between different computing devices, the communication message packet sending unit is specifically configured to:
sending the communication message packet to the software module receiver of the inter-module communication by adopting an IP and port number communication mode corresponding to the inter-process communication between different computing devices; and the IP and the port number are the IP and the port number which are included in the process external message interface and are obtained based on the process name and the port resource owned by the process corresponding to the process name.
13. The apparatus according to any one of claims 8-12, further comprising:
a communication message packet receiving and processing unit, configured to, after the software module receiver of the inter-module communication receives the communication message packet, analyze the destination address in the received communication message packet; if the destination address can be resolved, dispatching the communication message packet based on the destination address; and if the destination address cannot be resolved, processing the communication message packet as an abnormal message.
14. The apparatus according to any one of claims 8-12, further comprising:
a communication transceiver module determining unit, which is used for determining a communication transceiver module in each process before a software module sender of the inter-module communication obtains a communication message packet; registering the software module in each process into the communication transceiver module based on a module name and creating a message queue corresponding to the software module based on a module registration interface of the communication transceiver module of each process; after all processes complete the software module registration in the process, obtaining an address mapping table for communication address conversion among the software modules; the address mapping table is a mapping table of a process name, a module name, a logic machine name, a process master/standby state, a message queue, an IP and a port; the message queue includes an internal message queue and a system message queue.
15. A computing device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of inter-module communication of any one of claims 1-7.
CN201710272190.6A 2017-04-24 2017-04-24 Method and device for communication between modules and computing equipment Active CN107133109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710272190.6A CN107133109B (en) 2017-04-24 2017-04-24 Method and device for communication between modules and computing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710272190.6A CN107133109B (en) 2017-04-24 2017-04-24 Method and device for communication between modules and computing equipment

Publications (2)

Publication Number Publication Date
CN107133109A true CN107133109A (en) 2017-09-05
CN107133109B CN107133109B (en) 2020-01-14

Family

ID=59716010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710272190.6A Active CN107133109B (en) 2017-04-24 2017-04-24 Method and device for communication between modules and computing equipment

Country Status (1)

Country Link
CN (1) CN107133109B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108038011A (en) * 2017-12-28 2018-05-15 深圳市富途网络科技有限公司 A kind of method for realizing SNS multiprocess communications
CN108600011A (en) * 2018-04-26 2018-09-28 百度在线网络技术(北京)有限公司 Method, apparatus, storage medium and the terminal device of communication network data transmission
CN111400055A (en) * 2019-01-03 2020-07-10 中国移动通信集团终端有限公司 Method, device, equipment and storage medium for communication among multiple processes
CN112256453A (en) * 2020-10-28 2021-01-22 北京基软科技有限公司 Communication method between arbitrary software processes
CN115794443A (en) * 2023-01-29 2023-03-14 北京万里红科技有限公司 Method and device for multi-process communication based on shared memory
CN115934262A (en) * 2021-08-06 2023-04-07 北京小米移动软件有限公司 Process node management method and device, electronic equipment and storage medium
CN118193254A (en) * 2024-05-15 2024-06-14 先临三维科技股份有限公司 Process communication method, device, medium and equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1117766A (en) * 1993-02-10 1996-02-28 艾利森电话股份有限公司 A method and a system in a distributed operating system
CN101789938A (en) * 2010-01-12 2010-07-28 清华大学 Agent-based component generation method in reconfigurable software
CN101902458A (en) * 2010-02-21 2010-12-01 中国联合网络通信集团有限公司 Interprocess communication method across host machine, device thereof and system thereof
CN102135917A (en) * 2010-11-30 2011-07-27 广东星海数字家庭产业技术研究院有限公司 Inter-Linux operating system progress communication information acquisition method
CN102662776A (en) * 2012-04-01 2012-09-12 杭州格畅科技有限公司 Inter-application communication method, client side and application process manager of online application platform
WO2012159305A1 (en) * 2011-06-28 2012-11-29 华为技术有限公司 Distributed multi-process communication method and device
CN103995751A (en) * 2014-05-30 2014-08-20 上海斐讯数据通信技术有限公司 Cross-platform communication system and method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1117766A (en) * 1993-02-10 1996-02-28 艾利森电话股份有限公司 A method and a system in a distributed operating system
CN101789938A (en) * 2010-01-12 2010-07-28 清华大学 Agent-based component generation method in reconfigurable software
CN101902458A (en) * 2010-02-21 2010-12-01 中国联合网络通信集团有限公司 Interprocess communication method across host machine, device thereof and system thereof
CN102135917A (en) * 2010-11-30 2011-07-27 广东星海数字家庭产业技术研究院有限公司 Inter-Linux operating system progress communication information acquisition method
WO2012159305A1 (en) * 2011-06-28 2012-11-29 华为技术有限公司 Distributed multi-process communication method and device
CN102971723A (en) * 2011-06-28 2013-03-13 华为技术有限公司 Distributed multi-process communication method and device
CN102662776A (en) * 2012-04-01 2012-09-12 杭州格畅科技有限公司 Inter-application communication method, client side and application process manager of online application platform
CN103995751A (en) * 2014-05-30 2014-08-20 上海斐讯数据通信技术有限公司 Cross-platform communication system and method

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108038011A (en) * 2017-12-28 2018-05-15 深圳市富途网络科技有限公司 A kind of method for realizing SNS multiprocess communications
CN108600011A (en) * 2018-04-26 2018-09-28 百度在线网络技术(北京)有限公司 Method, apparatus, storage medium and the terminal device of communication network data transmission
CN108600011B (en) * 2018-04-26 2020-01-24 百度在线网络技术(北京)有限公司 Communication network data transmission method, device, storage medium and terminal equipment
CN111400055A (en) * 2019-01-03 2020-07-10 中国移动通信集团终端有限公司 Method, device, equipment and storage medium for communication among multiple processes
CN112256453A (en) * 2020-10-28 2021-01-22 北京基软科技有限公司 Communication method between arbitrary software processes
CN112256453B (en) * 2020-10-28 2024-05-28 北京基软科技有限公司 Communication method between arbitrary software processes
CN115934262A (en) * 2021-08-06 2023-04-07 北京小米移动软件有限公司 Process node management method and device, electronic equipment and storage medium
CN115934262B (en) * 2021-08-06 2024-02-23 北京小米机器人技术有限公司 Node management method and device for process, electronic equipment and storage medium
CN115794443A (en) * 2023-01-29 2023-03-14 北京万里红科技有限公司 Method and device for multi-process communication based on shared memory
CN118193254A (en) * 2024-05-15 2024-06-14 先临三维科技股份有限公司 Process communication method, device, medium and equipment
CN118193254B (en) * 2024-05-15 2024-08-13 先临三维科技股份有限公司 Process communication method, device, medium and equipment

Also Published As

Publication number Publication date
CN107133109B (en) 2020-01-14

Similar Documents

Publication Publication Date Title
CN107133109B (en) Method and device for communication between modules and computing equipment
EP2888858B1 (en) Method and apparatus of generalized network controller for a software defined network (sdn)
US11960430B2 (en) Remote mapping method, apparatus and device for computing resources, and storage medium
CN110313163A (en) Load balance in distributed computing system
CN109088820B (en) Cross-device link aggregation method and device, computing device and storage medium
WO2014031430A1 (en) Systems and methods for sharing devices in a virtualization environment
CN108768667B (en) Method for inter-chip network communication of multi-core processor
CN110278161A (en) Message diversion method, apparatus and system based on User space protocol stack
CN108512779B (en) Control information transmission method, server and system
CN118227343B (en) Data processing method, system, device, equipment, medium and product
CN114050998A (en) Method, device, electronic equipment and medium for realizing remote direct memory access
CN115022408A (en) Data transmission method and device based on service grid and electronic equipment
CN103888364A (en) Message shunting method and device
CN112433826B (en) Hybrid heterogeneous virtualization communication method and chip
WO2024067529A1 (en) Rdma-based link establishment method and apparatus, and device and storage medium
CN114816651A (en) Communication method, device and system
CN115022424B (en) Hydropower LCU controller network card virtual control method, system, equipment and medium thereof
CN116455836A (en) Intelligent network card, cloud server and traffic forwarding method
CN105939242B (en) Realize the method and device of virtual system
CN114844888B (en) Power computer and processing method thereof
WO2023035777A1 (en) Network configuration method, proxy component, controller, electronic device and storage medium
CN118606079B (en) Socket interface-based communication method and system
CN114039894B (en) Network performance optimization method, system, device and medium based on vector packet
CN115022259B (en) Method for processing and transmitting OAM (operation administration and maintenance) of multi-core switching chip and application
US20230393916A1 (en) Network adapter, computing device, and data acquisition method

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
TA01 Transfer of patent application right

Effective date of registration: 20180226

Address after: 510663 Shenzhou Road, Guangzhou Science City, Guangzhou, Guangzhou economic and Technological Development Zone, Guangdong Province, No. 10

Applicant after: Comba Telecom System (China) Co., Ltd.

Applicant after: Comba Telecom Systems (Guangzhou) Co., Ltd.

Applicant after: Jingxin Communication Technology (Guangzhou) Co., Ltd.

Applicant after: TIANJIN COMBA TELECOM SYSTEMS CO., LTD.

Address before: 510663 Guangdong city of Guangzhou Province Economic and Technological Development Zone Jinbi Road No. 6

Applicant before: Comba Telecom Systems (Guangzhou) Co., Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200108

Address after: 510663 No. 10, Shenzhou Road, Science City, Guangzhou, economic and Technological Development Zone, Huangpu District, Guangzhou, Guangdong Province

Patentee after: Jingxin Communication System (China) Co., Ltd.

Address before: 510663 Shenzhou Road, Guangzhou Science City, Guangzhou, Guangzhou economic and Technological Development Zone, Guangdong Province, No. 10

Co-patentee before: Jingxin Communication System (Guangzhou) Co., Ltd.

Patentee before: Jingxin Communication System (China) Co., Ltd.

Co-patentee before: Jingxin Communication Technology (Guangzhou) Co., Ltd.

Co-patentee before: TIANJIN COMBA TELECOM SYSTEMS CO., LTD.

TR01 Transfer of patent right
CP01 Change in the name or title of a patent holder

Address after: 510663 No.10, Shenzhou Road, Guangzhou Science City, economic and Technological Development Zone, Huangpu District, Guangzhou City, Guangdong Province

Patentee after: Jingxin Network System Co.,Ltd.

Address before: 510663 No.10, Shenzhou Road, Guangzhou Science City, economic and Technological Development Zone, Huangpu District, Guangzhou City, Guangdong Province

Patentee before: Comba Telecom System (China) Ltd.

CP01 Change in the name or title of a patent holder