CN112579216A - Java and heterogeneous system docking method and system - Google Patents

Java and heterogeneous system docking method and system Download PDF

Info

Publication number
CN112579216A
CN112579216A CN202011622220.XA CN202011622220A CN112579216A CN 112579216 A CN112579216 A CN 112579216A CN 202011622220 A CN202011622220 A CN 202011622220A CN 112579216 A CN112579216 A CN 112579216A
Authority
CN
China
Prior art keywords
message
java
character string
heterogeneous
content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011622220.XA
Other languages
Chinese (zh)
Inventor
赵洪超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Luban Beijing Electronic Commerce Technology Co ltd
Original Assignee
Luban Beijing Electronic Commerce Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Luban Beijing Electronic Commerce Technology Co ltd filed Critical Luban Beijing Electronic Commerce Technology Co ltd
Priority to CN202011622220.XA priority Critical patent/CN112579216A/en
Publication of CN112579216A publication Critical patent/CN112579216A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a method and a system for docking java with a heterogeneous system, wherein the method comprises the following steps: when the information of the java system changes, packaging first information to be sent into a first message character string and sending the first message character string to a message center; the message center stores the first message character string; a message agent service registered to the message center reads the first message character string stored in the message center; the message agent service analyzes the message content in the currently read first message character string and stores the message content; and the heterogeneous system acquires the message content from the message proxy service storage message and processes the message content. The invention belongs to the technical field of computers, and realizes a docking scheme capable of decoupling a system by adding a message queue mechanism into docking of the system, fully utilizing decoupling, asynchronization and peak clipping characteristics of the message queue and removing system coupling.

Description

Java and heterogeneous system docking method and system
Technical Field
The invention relates to the technical field of computers, in particular to a method and a system for butting java and a heterogeneous system.
Background
The java system and the third-party system are usually docked in a Restful interface direct calling mode, and the problems of enhanced system coupling, high calling peak system pressure and difficulty in distributed transaction processing exist in the mode.
For the interaction scene between java and a third-party system, the Socket mode is most commonly used at present, which is a typical C/S interaction mode. The server provides services, and service access is carried out through the IP address and the port. The transmission protocol may be a TCP/UDP protocol, and the server and the client agree on a request message format and a response message format. This interaction has the following drawbacks: the server and the client must work simultaneously, and when the server is unavailable, the whole data interaction cannot be carried out; when the amount of transmitted data is large, the network bandwidth is severely occupied, which may cause connection timeout.
Yet another interactive approach is the ftp/file sharing server approach. For large data volume interaction, the interaction mode is usually adopted. The system A and the system B appoint the contents such as file server address, file naming rule, file content format and the like, and data interaction is carried out by uploading files to the file server. This interaction has the following drawbacks: the method is not suitable for real-time services; a common file server is required, and the file server has the risk that the file can be tampered, deleted or divulged; the format of the file data must be agreed, and when the file format is changed, all systems are required to be synchronously modified.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and a system for interfacing java with a heterogeneous system, so as to solve the problems that system coupling is enhanced, a peak call system pressure is high, and distributed transaction processing is difficult in a Restful interface direct-tuning in an existing interactive manner.
To solve the above technical problem, an embodiment of the present invention provides the following solutions:
in a first aspect, an embodiment of the present invention provides a method for interfacing java with a heterogeneous system, where the method includes the following steps:
when the information of the java system changes, packaging first information to be sent into a first message character string and sending the first message character string to a message center;
the message center stores the first message character string;
a message agent service registered to the message center reads the first message character string stored in the message center;
the message agent service analyzes the message content in the currently read first message character string and stores the message content;
and the heterogeneous system acquires the message content from the message proxy service storage message and processes the message content.
Optionally, the message broker service stores the message content, including:
the message proxy service stores the message content into a message storage table; the message storage table is used for storing the corresponding relation among the message content, the heterogeneous system identification and the processing state of the heterogeneous system on the message content; the processing state of the heterogeneous system on the message content comprises two results, namely unprocessed result and processed result.
Optionally, the heterogeneous system obtains the message content from the message broker service storage message and processes the message content, including:
the heterogeneous system periodically sends a message inquiry request to the message proxy service;
the message agent service provides a query interface for querying the message storage table to a heterogeneous system corresponding to the message query request according to the message query request;
the heterogeneous system corresponding to the message query request polls and queries the first type of message content in the message storage table through the query interface; the first type of message content is the message content recorded by the entry of which the processing state of the heterogeneous system corresponding to the message query request on the message content is unprocessed in the message storage table;
and the heterogeneous system corresponding to the message query request processes the first type of message content.
Optionally, after the heterogeneous system corresponding to the message query request processes the first type of message content, the method further includes:
the heterogeneous system processing the current first type message content sends a message updating request to the message agent service;
the message agent service provides an updating interface for updating the message storage table according to the message updating request;
and the heterogeneous system corresponding to the updating request updates the processing state of the message content of the heterogeneous system corresponding to the current first type of message content in the message storage table to be processed through the updating interface.
Optionally, the query interface and/or the update interface is a restful interface.
Optionally, the first message string is in json format;
when the java system has information change, the first information to be sent is encapsulated into a first message character string and sent to a message center, and the method comprises the following steps:
when the information of the java system changes, the java system judges whether the message contents required by different heterogeneous systems are consistent;
if the message contents required by different heterogeneous systems are not consistent, the java system combines the message contents required by the different heterogeneous systems in the currently changed information to obtain the first information to be sent;
the java system encapsulates the first information to be sent into a first message character string in a json format;
and the java system sends the first message character string to the message center through a first specified message body.
Optionally, the method further comprises:
when the heterogeneous system has the change information which needs to be synchronized to the java system, the heterogeneous system encapsulates second information to be sent into a second message character string in a json format;
the heterogeneous system calls a designated interface of the message agent service and sends the second message character string to the message center through a second designated message body;
and the message agent service sends the second message character string to the java system according to the subscription requirement of the java system, so that the java system consumes the message content in the second message character string.
In a second aspect, an embodiment of the present invention provides a java and heterogeneous system docking system, where the system includes:
the java system is used for encapsulating first information to be sent into a first message character string and sending the first message character string to the message center when the information of the java system changes;
the message center is used for storing the first message character string;
the message agent service is registered to the message center, and is used for reading the first message character string stored in the message center, analyzing the message content in the currently read first message character string, and storing the message content;
at least one heterogeneous system for obtaining the message content from the message broker service storage message and processing.
Optionally, the message broker service is specifically configured to store the message content in a message storage table; the message storage table is used for storing the corresponding relation among the message content, the heterogeneous system identification and the processing state of the heterogeneous system on the message content; the processing state of the heterogeneous system on the message content comprises two results, namely unprocessed result and processed result.
Optionally, the heterogeneous system comprises: the system comprises a first request module, a message content acquisition module and a processing module;
the first request module is used for periodically sending a message inquiry request to the message agent service;
the message agent service is further used for providing a query interface for querying the message storage table to a heterogeneous system corresponding to the message query request according to the message query request;
the message content acquisition module is used for polling and inquiring the first type of message content in the message storage table through the inquiry interface; the first type of message content is the message content recorded by the entry of which the processing state of the heterogeneous system corresponding to the message query request on the message content is unprocessed in the message storage table;
and the processing module is used for processing the first type of message content.
Optionally, the heterogeneous system further includes: a second request module and an updating module;
the second request module is used for sending a message updating request to the message agent service after the processing module processes the current first type of message content;
the message agent service is also used for providing an updating interface for updating the message storage table according to the message updating request;
and the updating module is used for updating the processing state of the heterogeneous system corresponding to the current first type of message content in the message storage table to be processed through the updating interface.
Optionally, the query interface and/or the update interface provided by the message broker service is a restful interface.
Optionally, the java system comprises:
the judging module is used for judging whether the message contents required by different heterogeneous systems are consistent or not when the java system has information change;
a merging module, configured to merge message contents, required by the different heterogeneous systems, in the currently changed information when the determination result of the determining module is negative, to obtain the first information to be sent;
the first packaging module is used for packaging the first information to be sent into a first message character string in a json format;
and the first sending module is used for sending the first message character string to the message center through a first designated message body.
Optionally, the heterogeneous system further includes:
the second packaging module is used for packaging second information to be sent into a json format second message character string when the heterogeneous system has the change information which needs to be synchronized to the java system;
the second sending module is used for calling a designated interface of the message agent service and sending the second message character string to the message center through a second designated message body;
the message agent service is further configured to send the second message character string to the java system according to a subscription requirement of the java system, so that the java system consumes message content in the second message character string.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the above-mentioned java interfacing method with a heterogeneous system;
the electronic equipment is a terminal or a server.
The technical scheme of the invention has the following beneficial effects:
in the scheme, when the java system has information change, packaging first information to be sent into a first message character string and sending the first message character string to a message center; the message center stores the first message character string; a message agent service registered to the message center reads the first message character string stored in the message center; the message agent service analyzes the message content in the currently read first message character string and stores the message content; and the heterogeneous system acquires the message content from the message proxy service storage message and processes the message content. Therefore, the message queue mechanism is added into the butt joint of the system, the decoupling, asynchronous and peak clipping characteristics of the message queue are fully utilized, the system coupling is released, and the butt joint scheme capable of decoupling the system is realized.
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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for interfacing java with a heterogeneous system according to a first embodiment of the present invention;
fig. 2 is a schematic structural diagram of a docking system of java and a heterogeneous system according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
As shown in fig. 1, an embodiment of the present invention provides a method for interfacing java with a heterogeneous system, including the following steps:
when the information of the java system changes, packaging first information to be sent into a first message character string and sending the first message character string to a message center;
the message center stores the first message character string;
a message agent service registered to the message center reads the first message character string stored in the message center;
the message agent service analyzes the message content in the currently read first message character string and stores the message content;
and the heterogeneous system acquires the message content from the message proxy service storage message and processes the message content.
In the embodiment of the invention, based on the message queue as message middleware, a service provider (also called a producer) puts data in the message queue, and a service receiver (also called a consumer) acquires the data from the message queue and performs logic processing of the service receiver. The invention introduces a message docking mechanism into docking between different systems, adds a message agent service integrating message middleware between the systems needing to be corresponded as an agent layer, fully utilizes the decoupling characteristic of a message queue, and realizes a docking method capable of decoupling the systems.
Further, the message broker service stores the message content, and the step specifically includes:
the message proxy service stores the message content into a message storage table; the message storage table is used for storing the corresponding relation among the message content, the heterogeneous system identification and the processing state of the heterogeneous system on the message content; the processing state of the heterogeneous system on the message content comprises two results, namely unprocessed result and processed result.
The heterogeneous system obtains and processes the message content from the message broker service storage message, specifically including:
the heterogeneous system periodically sends a message inquiry request to the message proxy service;
the message agent service provides a query interface for querying the message storage table to a heterogeneous system corresponding to the message query request according to the message query request;
the heterogeneous system corresponding to the message query request polls and queries the first type of message content in the message storage table through the query interface; the first type of message content is the message content recorded by the entry of which the processing state of the heterogeneous system corresponding to the message query request on the message content is unprocessed in the message storage table;
and the heterogeneous system corresponding to the message query request processes the first type of message content.
After the heterogeneous system corresponding to the message query request processes the first type of message content, the method further includes:
the heterogeneous system processing the current first type message content sends a message updating request to the message agent service;
the message agent service provides an updating interface for updating the message storage table according to the message updating request;
and the heterogeneous system corresponding to the updating request updates the processing state of the message content of the heterogeneous system corresponding to the current first type of message content in the message storage table to be processed through the updating interface.
In an embodiment of the present invention, the query interface and/or the update interface is preferably a restful interface.
The first message character string is in a json format;
when the java system has information change, encapsulating first information to be sent into a first message character string, and sending the first message character string to a message center, specifically comprising:
when the information of the java system changes, the java system judges whether the message contents required by different heterogeneous systems are consistent;
if the message contents required by different heterogeneous systems are not consistent, the java system combines the message contents required by the different heterogeneous systems in the currently changed information to obtain the first information to be sent;
the java system encapsulates the first information to be sent into a first message character string in a json format;
and the java system sends the first message character string to the message center through a first specified message body.
When the heterogeneous system has the change information which needs to be synchronized to the java system, the heterogeneous system encapsulates second information to be sent into a second message character string in a json format;
the heterogeneous system calls a designated interface of the message agent service and sends the second message character string to the message center through a second designated message body;
and the message agent service sends the second message character string to the java system according to the subscription requirement of the java system, so that the java system consumes the message content in the second message character string.
Specifically, the detailed working flow of the method of the invention is as follows:
assuming that the current scene is a system A developed by java, when the system A changes, both a NET system B and a PHP system C need to acquire the information change and synchronously perform corresponding service processing in respective systems; when the systems B and C change, the system a needs to acquire the corresponding information change and record the information change in the system a, and the current processing flow is described as follows:
1. when the information of the system A changes, the information required by the system B and the system C is encapsulated into character strings in a json format according to convention. If the information needed by systems B and C is not consistent, the encapsulated string needs to include a collection of the information needed by both. At that time, the packaged character string is put into a message body and sent to a message center.
2. And (3) constructing a message agent service program, registering the message agent service program to a message center, acquiring the message content sent in the step (1), and storing the message content into a corresponding database for subsequent acquisition of other systems. The message storage table includes a column for storing the content of the message and a column for recording whether the NET system and the PHP system process the message. The program provides a restful interface for inquiring and updating the message storage table at the same time, so that other systems can call and inquire corresponding messages, and update the processing result.
3. Corresponding message handling mechanisms are added to systems B and C, for example: and (3) adding a timer, polling and processing the message stored in the step (2), wherein the content of the message can call a corresponding query interface in the agent program for obtaining, and after the processing is finished, a corresponding update interface can be called, and the message is set to be processed, so that the message can be skipped to process other messages in the next processing.
4. When the system B and the system C change and need to be synchronized to the system A, the related content can be packaged into a json string according to the convention with the system A, a corresponding interface in an agent program is called, the json string is transmitted, the interface places the content into a message queue and transmits the message to a message center, and the system A subscribes the related message and consumes the message.
And finishing the whole process.
Example two
As shown in fig. 2, an embodiment of the present invention provides a java to heterogeneous system docking system, where the system includes:
the java system is used for encapsulating first information to be sent into a first message character string and sending the first message character string to the message center when the information of the java system changes;
the message center is used for storing the first message character string;
the message agent service is registered to the message center, and is used for reading the first message character string stored in the message center, analyzing the message content in the currently read first message character string, and storing the message content;
at least one heterogeneous system for obtaining the message content from the message broker service storage message and processing.
Further, the message broker service is specifically configured to store the message content in a message storage table; the message storage table is used for storing the corresponding relation among the message content, the heterogeneous system identification and the processing state of the heterogeneous system on the message content; the processing state of the heterogeneous system on the message content comprises two results, namely unprocessed result and processed result.
Further, the heterogeneous system includes: the system comprises a first request module, a message content acquisition module and a processing module;
the first request module is used for periodically sending a message inquiry request to the message agent service;
the message agent service is further used for providing a query interface for querying the message storage table to a heterogeneous system corresponding to the message query request according to the message query request;
the message content acquisition module is used for polling and inquiring the first type of message content in the message storage table through the inquiry interface; the first type of message content is the message content recorded by the entry of which the processing state of the heterogeneous system corresponding to the message query request on the message content is unprocessed in the message storage table;
and the processing module is used for processing the first type of message content.
Further, the heterogeneous system further includes: a second request module and an updating module;
the second request module is used for sending a message updating request to the message agent service after the processing module processes the current first type of message content;
the message agent service is also used for providing an updating interface for updating the message storage table according to the message updating request;
and the updating module is used for updating the processing state of the heterogeneous system corresponding to the current first type of message content in the message storage table to be processed through the updating interface.
Further, the query interface and/or the update interface provided by the message broker service is a restful interface.
Further, the java system comprises:
the judging module is used for judging whether the message contents required by different heterogeneous systems are consistent or not when the java system has information change;
a merging module, configured to merge message contents, required by the different heterogeneous systems, in the currently changed information when the determination result of the determining module is negative, to obtain the first information to be sent;
the first packaging module is used for packaging the first information to be sent into a first message character string in a json format;
and the first sending module is used for sending the first message character string to the message center through a first designated message body.
Further, the heterogeneous system further includes:
the second packaging module is used for packaging second information to be sent into a json format second message character string when the heterogeneous system has the change information which needs to be synchronized to the java system;
the second sending module is used for calling a designated interface of the message agent service and sending the second message character string to the message center through a second designated message body;
the message agent service is further configured to send the second message character string to the java system according to a subscription requirement of the java system, so that the java system consumes message content in the second message character string.
The system of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 1, and the implementation principle and the technical effect are similar, which are not described herein again.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof.
In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
EXAMPLE III
The embodiment of the invention also provides electronic equipment, and the electronic equipment comprises the system in any one of the embodiments.
As shown in fig. 3, the electronic device 300 includes a processor 301 and a memory 302, where the memory 302 stores at least one instruction, at least one program, a code set, or a set of instructions, which is loaded and executed by the processor 301 to implement any of the aforementioned java interfacing methods with heterogeneous systems;
the electronic device 300 is a terminal or a server.
In an exemplary embodiment, the present invention further provides a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement the java-to-heterogeneous system interfacing method in the above embodiments. For example, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (14)

1. A method for docking java with a heterogeneous system is characterized by comprising the following steps:
when the information of the java system changes, packaging first information to be sent into a first message character string and sending the first message character string to a message center;
the message center stores the first message character string;
a message agent service registered to the message center reads the first message character string stored in the message center;
the message agent service analyzes the message content in the currently read first message character string and stores the message content;
and the heterogeneous system acquires the message content from the message proxy service storage message and processes the message content.
2. The java interfacing method with a heterogeneous system as claimed in claim 1, wherein said message broker service stores said message contents, including:
the message proxy service stores the message content into a message storage table; the message storage table is used for storing the corresponding relation among the message content, the heterogeneous system identification and the processing state of the heterogeneous system on the message content; the processing state of the heterogeneous system on the message content comprises two results, namely unprocessed result and processed result.
3. The java interfacing method for heterogeneous system as claimed in claim 2, wherein said heterogeneous system retrieves and processes said message content from said message broker service storage message, comprising:
the heterogeneous system periodically sends a message inquiry request to the message proxy service;
the message agent service provides a query interface for querying the message storage table to a heterogeneous system corresponding to the message query request according to the message query request;
the heterogeneous system corresponding to the message query request polls and queries the first type of message content in the message storage table through the query interface; the first type of message content is the message content recorded by the entry of which the processing state of the heterogeneous system corresponding to the message query request on the message content is unprocessed in the message storage table;
and the heterogeneous system corresponding to the message query request processes the first type of message content.
4. The java based interfacing method with heterogeneous system as claimed in claim 3, further comprising, after the heterogeneous system corresponding to said message query request processes said first type of message content:
the heterogeneous system processing the current first type message content sends a message updating request to the message agent service;
the message agent service provides an updating interface for updating the message storage table according to the message updating request;
and the heterogeneous system corresponding to the updating request updates the processing state of the message content of the heterogeneous system corresponding to the current first type of message content in the message storage table to be processed through the updating interface.
5. The java to heterogeneous system interfacing method of claim 4, wherein said query interface and/or said update interface is a restful interface.
6. A java interfacing method with a heterogeneous system according to any one of claims 1 to 5, wherein said first message string is in json format;
when the java system has information change, the first information to be sent is encapsulated into a first message character string and sent to a message center, and the method comprises the following steps:
when the information of the java system changes, the java system judges whether the message contents required by different heterogeneous systems are consistent;
if the message contents required by different heterogeneous systems are not consistent, the java system combines the message contents required by the different heterogeneous systems in the currently changed information to obtain the first information to be sent;
the java system encapsulates the first information to be sent into a first message character string in a json format;
and the java system sends the first message character string to the message center through a first specified message body.
7. The method for interfacing java with a heterogeneous system according to claim 6, further comprising:
when the heterogeneous system has the change information which needs to be synchronized to the java system, the heterogeneous system encapsulates second information to be sent into a second message character string in a json format;
the heterogeneous system calls a designated interface of the message agent service and sends the second message character string to the message center through a second designated message body;
and the message agent service sends the second message character string to the java system according to the subscription requirement of the java system, so that the java system consumes the message content in the second message character string.
8. A java to heterogeneous docking system, comprising:
the java system is used for encapsulating first information to be sent into a first message character string and sending the first message character string to the message center when the information of the java system changes;
the message center is used for storing the first message character string;
the message agent service is registered to the message center, and is used for reading the first message character string stored in the message center, analyzing the message content in the currently read first message character string, and storing the message content;
at least one heterogeneous system for obtaining the message content from the message broker service storage message and processing.
9. The java to heterogeneous system docking system as recited in claim 8, wherein the message broker service is specifically configured to store the message content in a message storage table; the message storage table is used for storing the corresponding relation among the message content, the heterogeneous system identification and the processing state of the heterogeneous system on the message content; the processing state of the heterogeneous system on the message content comprises two results, namely unprocessed result and processed result.
10. The java to heterogeneous system docking system as recited in claim 9, wherein the heterogeneous system comprises: the system comprises a first request module, a message content acquisition module and a processing module;
the first request module is used for periodically sending a message inquiry request to the message agent service;
the message agent service is further used for providing a query interface for querying the message storage table to a heterogeneous system corresponding to the message query request according to the message query request;
the message content acquisition module is used for polling and inquiring the first type of message content in the message storage table through the inquiry interface; the first type of message content is the message content recorded by the entry of which the processing state of the heterogeneous system corresponding to the message query request on the message content is unprocessed in the message storage table;
and the processing module is used for processing the first type of message content.
11. The java to heterogeneous system docking system as recited in claim 10, further comprising: a second request module and an updating module;
the second request module is used for sending a message updating request to the message agent service after the processing module processes the current first type of message content;
the message agent service is also used for providing an updating interface for updating the message storage table according to the message updating request;
and the updating module is used for updating the processing state of the heterogeneous system corresponding to the current first type of message content in the message storage table to be processed through the updating interface.
12. The java to heterogeneous system interfacing system of claim 11, wherein said query interface and/or said update interface provided by said message broker service is a restful interface.
13. A java interfacing system with a heterogeneous system according to any one of claims 8 to 12, wherein said java system comprises:
the judging module is used for judging whether the message contents required by different heterogeneous systems are consistent or not when the java system has information change;
a merging module, configured to merge message contents, required by the different heterogeneous systems, in the currently changed information when the determination result of the determining module is negative, to obtain the first information to be sent;
the first packaging module is used for packaging the first information to be sent into a first message character string in a json format;
and the first sending module is used for sending the first message character string to the message center through a first designated message body.
14. The java to heterogeneous system docking system as recited in claim 13, further comprising:
the second packaging module is used for packaging second information to be sent into a json format second message character string when the heterogeneous system has the change information which needs to be synchronized to the java system;
the second sending module is used for calling a designated interface of the message agent service and sending the second message character string to the message center through a second designated message body;
the message agent service is further configured to send the second message character string to the java system according to a subscription requirement of the java system, so that the java system consumes message content in the second message character string.
CN202011622220.XA 2020-12-30 2020-12-30 Java and heterogeneous system docking method and system Pending CN112579216A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011622220.XA CN112579216A (en) 2020-12-30 2020-12-30 Java and heterogeneous system docking method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011622220.XA CN112579216A (en) 2020-12-30 2020-12-30 Java and heterogeneous system docking method and system

Publications (1)

Publication Number Publication Date
CN112579216A true CN112579216A (en) 2021-03-30

Family

ID=75144700

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011622220.XA Pending CN112579216A (en) 2020-12-30 2020-12-30 Java and heterogeneous system docking method and system

Country Status (1)

Country Link
CN (1) CN112579216A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7216181B1 (en) * 2001-07-31 2007-05-08 Sprint Communications Company L.P. Middleware brokering system
CN102938731A (en) * 2012-11-22 2013-02-20 北京锐易特软件技术有限公司 Exchange and integration device and method based on proxy cache adaptation model
CN104954469A (en) * 2015-06-19 2015-09-30 长沙廖氏软件科技有限公司 Information exchange method for heterogeneous system
CN105472042A (en) * 2016-01-15 2016-04-06 中煤电气有限公司 WEB terminal controlled message middleware system and data transmission method thereof
CN109284312A (en) * 2018-08-27 2019-01-29 山东威尔数据股份有限公司 A kind of heterogeneous database change real-time informing method
US20190138375A1 (en) * 2017-11-03 2019-05-09 Dell Products L. P. Optimization of message oriented middleware monitoring in heterogenenous computing environments
CN111740872A (en) * 2020-05-06 2020-10-02 北京百度网讯科技有限公司 Message passing test method and device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7216181B1 (en) * 2001-07-31 2007-05-08 Sprint Communications Company L.P. Middleware brokering system
CN102938731A (en) * 2012-11-22 2013-02-20 北京锐易特软件技术有限公司 Exchange and integration device and method based on proxy cache adaptation model
CN104954469A (en) * 2015-06-19 2015-09-30 长沙廖氏软件科技有限公司 Information exchange method for heterogeneous system
CN105472042A (en) * 2016-01-15 2016-04-06 中煤电气有限公司 WEB terminal controlled message middleware system and data transmission method thereof
US20190138375A1 (en) * 2017-11-03 2019-05-09 Dell Products L. P. Optimization of message oriented middleware monitoring in heterogenenous computing environments
CN109284312A (en) * 2018-08-27 2019-01-29 山东威尔数据股份有限公司 A kind of heterogeneous database change real-time informing method
CN111740872A (en) * 2020-05-06 2020-10-02 北京百度网讯科技有限公司 Message passing test method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109635019B (en) Request processing method, device, equipment and storage medium
JP2003132160A (en) Personal information management system and device, and personal information management program
CN111045833B (en) Interface calling method and device
US20070165615A1 (en) Apparatus and method for notifying communication network event in application server capable of supporting open API based on Web services
CN111641676B (en) Method and device for constructing third-party cloud monitoring service
CN101388887A (en) Network service processing method and system
CN114567650B (en) Data processing method and Internet of things platform system
CN112511591A (en) Method, device, equipment and medium for realizing hospital interface data interaction
CN112433920A (en) Buried point data reporting method, device, equipment and medium
KR100738040B1 (en) Method for providing application Program Interface in open mobile business supporting system
CN110515750B (en) Application topology generation method, system and cluster
CN111225018A (en) Request message processing method and device and electronic equipment
WO2024109543A1 (en) Vehicle-to-cloud communication method based on service-oriented architecture, and storage medium
CN106357654B (en) Remote procedure calling method, device and communication system
CN113282590A (en) Interface joint debugging method and device based on 5G message
CN112817779A (en) Communication method, device, equipment and medium for modular application program
CN110543401B (en) Hierarchical application topology generation method, hierarchical application topology generation system and hierarchical application topology cluster
CN112579216A (en) Java and heterogeneous system docking method and system
US8510346B2 (en) Efficiently handling information on changes to a UDDI registry including those resulting in virtual deletes
CN116028696A (en) Resource information acquisition method and device, electronic equipment and storage medium
CN112000618B (en) File change management method, device, equipment and storage medium for cluster nodes
CN115361378A (en) Test environment file searching method and system and computer equipment
CN114006939A (en) Message pushing method and device
CN112118276B (en) Media resource pushing method and device
CN111782428A (en) Data calling system and 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