An ESB-based inter-system asynchronous, timing, packet communication control method
By introducing asynchronous, sequential, and group communication control methods into the ESB system, the timing and efficiency issues of data transmission in the steel industry were solved, achieving efficient and accurate data transmission and exception handling, preventing message blocking, and improving message processing efficiency.
Patent Information
- Application Number
- CN202211142836.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-20
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-09-20
AI Technical Summary
Existing ESB technology is difficult to simultaneously meet the timing requirements of efficient data transmission and the efficiency requirements of asynchronous communication in the steel industry. Furthermore, it carries the risk of failing to quickly block subsequent nodes when data anomalies occur, leading to large-scale errors.
Asynchronous, sequential, and packet communication control methods are introduced into the ESB system. The timing and packet status of messages are determined through initialization configuration, and data transmission is monitored in real time on the monitoring and management platform. Abnormal data is handled manually or automatically.
It enables efficient and accurate data transmission in the steel industry, prevents large-scale message congestion, improves message processing efficiency, and facilitates monitoring and handling of abnormal situations.
Smart Images

Figure CN115623048B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of asynchronous communication technology, in particular to a kind of asynchronous, timing, grouping communication control method between systems based on ESB. BACKGROUND
[0002] With the rapid development of informationization process of steel, in order to achieve the purpose of efficient production, many informationization systems are established, in order to prevent information island problem, each enterprise uses ESB enterprise data bus system, and the communication problem of each system is solved. Through ESB system, the inter-system communication task can be completed, and asynchronous, synchronous, distribution and other modes are supported, which can basically meet most business scenarios, but due to the process industry (such as steel industry), there is a strict timing relationship between each production link; how to ensure efficient and accurate transmission of information according to the actual business order, and how to quickly block the data of the following nodes when a data transmission occurs abnormally to avoid large-scale errors, how to deal with the above problems is a major challenge.
[0003] The existing ESB technology has many problems in data transmission. For example, using synchronous mode can meet the timing requirements between businesses, but when the data transmission volume is large, it will cause long delay, and even system execution timeout; if using asynchronous mode can solve the performance problem, but the business data in the later stage may be consumed in advance, which will cause confusion in business logic; the existing communication mode cannot well solve the communication demand of process industry, that is, how to efficiently and accurately synchronize data is an urgent problem to be solved. SUMMARY
[0004] In view of the shortcomings of the existing algorithm, the present application adds asynchronous, timing and grouping in the ESB system, informs the ESB which message is strictly controlled according to timing and which message needs to be controlled by grouping through initialization configuration, and controls the degree, monitors the data transmission situation through monitoring management platform, discovers abnormal transmission data in time, and processes through manual or automatic mode.
[0005] The technical scheme adopted by the present application is: a kind of asynchronous, timing, grouping communication control method between systems based on ESB includes the following steps:
[0006] Step one, the source system generates business data, and generates corresponding current message data, and sends the current message to the MQInput queue of ESB system;
[0007] Step two, determine whether the current message is timing or non-timing message according to the grouping state of the current message, and update the state identifier of the message in the intermediate table;
[0008] Further, the determination of whether the current electronic message is time-sequenced or non-time-sequenced is based on whether the electronic message has a group, if yes, it is time-sequenced, and if no, it is non-time-sequenced.
[0009] Further, if the current electronic message has no group, the state identifier of the intermediate table is updated to 0; if the current electronic message has a group, the keyword and group name are obtained according to whether the group is a keyword group, and the state identifier of the intermediate table is updated to 0; wherein 0 indicates that the current electronic message is successfully pushed to the ESB system.
[0010] Step three, updating the state identifier of the current electronic message according to the time-sequencing type (time-sequenced or non-time-sequenced) of the current electronic message and the state identifier of the previous electronic message, and writing the state identifier into the MQOutput queue;
[0011] Further, when the state identifier of the previous electronic message is 1 or 3 or 4, the state of the current electronic message in the intermediate table is updated to 4; when the state identifier of the previous electronic message is 2, the state of the current electronic message in the intermediate table is updated to 1; wherein 1 indicates that the current electronic message is successfully pushed to the target system, 2 indicates that the target system processes the current electronic message successfully, 3 indicates that the target system fails to process the current electronic message, and 4 indicates that the current electronic message is in a blocked state.
[0012] Step four, the target system listens to the MQOutput queue and performs business logic operation on the current electronic message data, feeds back the operation result to the ESB system through the Http mode, writes the operation result and the time-sequencing type of the current electronic message into the feedback table, and updates the state identifier of the current electronic message according to the business result response code;
[0013] Further, when the business result response code is success, the state of the current electronic message in the intermediate table is updated to 2; when the business result response code is success, the current electronic message is time-sequenced, and the state of the next time-sequenced electronic message is 0 or 4, the state of the next time-sequenced electronic message in the intermediate table is updated to 1; when the business result response code is failure, the state of the current electronic message in the intermediate table is updated to 3.
[0014] The beneficial effects of the present application are as follows:
[0015] 1. The present application can meet the communication scenarios of strong time-sequenced business between process industry systems, so that the systems can have the efficiency of asynchronous communication and meet the demand of processing time sequence;
[0016] 2. The granularity of the communication channel is adjusted according to the business scenarios by adjusting the grouping and the keyword, so as to prevent large-area electronic message blocking from occurring;
[0017] 3. The processing situation of each electronic message is grasped in a whole closed loop, so as to facilitate business personnel to monitor and process later; 4. The blocked electronic message is processed immediately after the business feedback node, so as to improve the message processing efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 is a flow chart of an ESB-based inter-system asynchronous, timing, packet communication control method of the present application. DETAILED DESCRIPTION
[0019] The present application will be further described below in conjunction with the accompanying drawings and examples, which are simplified schematic diagrams and only schematically show the basic structure of the present application, and thus only show the components related to the present application.
[0020] As shown in Figure 1 , an ESB-based inter-system asynchronous, timing, packet communication control method includes the following steps:
[0021] Step 1, initialization configuration, including: whether timing, whether packet, group name of packet, business key, determining the grouping situation and grouping granularity of the message through configuration; configuring the grouping relationship of all asynchronous timing messages, the grouping relationship refers to which messages can be divided into the same group, and whether a key needs to be added for fine division, and maintaining the configuration information of each message;
[0022] Step 2, asynchronous non-timing transmission of business data;
[0023] S21, the source system is the sender of the message, the source system generates business data, converts it into non-timing message through a standard processing method, and sends it to the fixed message queue (MQInput) of the ESB through the MQ method;
[0024] The standard processing method is an existing method, including but not limited to conversion through the SDK method, encapsulating the underlying logic, and the underlying logic is to convert the data into json format and send it to the MQInput, and the MQ can use ActiveMQ.
[0025] S22, the ESB system is an enterprise message bus system, the ESB system analyzes the timing message sent by the source system, first judges whether the message is configured for grouping, if not, it is non-timing, writes the timing ID, message number, and received message data into the intermediate table, and sets the current message sending state send_flag to 0, indicating that the ESB system has successfully received the data;
[0026] S23, the ESB system directly sends the current non-timing message to the MQOutPut queue, and updates the message sending state send_flag to 1, indicating that the ESB system has successfully sent the data to the target system queue;
[0027] S24, the target system is a receiving message system, the target system's listening business queue acquires the non-timing message and executes the business logic service, and after the execution of the business logic is completed, the processing result is returned to the ESB system through the Http method;
[0028] S25, the ESB system records the result of the business processing into the feedback table of the database, the feedback table including detailed error information and result information of the target system processing business logic, whether successful or failed is judged through the business response code, if the processing fails, the current non-sequential message send_flag is 3, the process ends; if the processing succeeds, the current non-sequential message state send_flag of the intermediate table is updated to 2, indicating that the target system processing succeeds, the process ends.
[0029] Step three, asynchronous timing transmission of business data;
[0030] S31, the source system generates business data, converts into sequential messages through a standard processing method, and sends to the fixed message queue of the ESB through the MQ mode;
[0031] S32, the ESB system analyzes the message sent by the source system, judges whether there is grouping, if there is grouping, it is timing, further judges whether the keyword information is configured, thereby determining the grouping mode, that is, if there is grouping configuration, it is sequential message, if it is sequential message, it also needs to combine the keyword to determine the final grouping mode, if the keyword information is configured, the grouping is processed in the keyword dimension, the ESB system analyzes the sequential message and extracts the keyword content;
[0032] S33, the ESB system writes the extracted group name, keyword, timing ID, message number, received message data into the intermediate table, and sets the send_flag of the timing message of the intermediate table to 0, indicating that the ESB system has successfully received the data;
[0033] S34, when receiving the sequential message, it needs to decide how to process the current message according to the message state of the previous message;
[0034] S35, if the state of the previous message is that the target system processing succeeds, that is, send_flag = 2, the ESB system sends the current sequential message to the target queue MQOutput, and sets the send_flag of the current sequential message to 1, indicating that the ESB system successfully pushes the data to the target system queue;
[0035] S36, if the state of the previous message is a non-successful state (that is, in any one of 1, 3, 4), it indicates that the previous message is in a processing or failed state, the ESB updates the send_flag of the current sequential message to 4, indicating that the current message is in a blocked state, which is prohibited to be sent to the target system;
[0036] S37, the target system listens to the business queue, acquires the current sequential data to be consumed, and executes the business logic service, after the execution of the business logic ends, the processing result is returned to the ESB system through the Http mode;
[0037] The business logic service includes, but is not limited to, performing operations such as addition, subtraction, multiplication and division on current time sequence data;
[0038] S38, the ESB system returns the result information of the business processing to the feedback table of the ESB system, if the business result response code is failure, the current time sequence message state send_flag is 3, if the business result response code is success, it is judged whether there is a next message, if there is, the next message and the state send_flag of the next message is 0 or 4, then the state send_flag of the next message in the intermediate table is updated to 1, indicating that the next message is successfully sent to the target queue, and the current message is send_flag 2.
[0039] Wherein, send_flag=0, indicating that the data is successfully pushed to the ESB system; send_flag=1: the data is successfully pushed to the target system; send_flag=2: the target system processing is successful; send_flag=3: the target system processing fails; send_flag=4: the data is in a blocked state.
[0040] The application meets the communication scene of strong time sequence business between process industry systems, so that the systems can have the efficiency of asynchronous communication and meet the processing time sequence demand; the granularity of the communication channel is adjusted according to the business scene by adjusting the grouping and the key, so as to prevent large-area message blocking; the processing situation of each message is grasped in a whole closed loop, so as to facilitate business personnel to monitor and process later; the blocked message is processed immediately after the business feedback node, so as to improve the message processing efficiency.
[0041] With the above ideal embodiments according to the application as the inspiration, through the above description, relevant personnel can make various changes and modifications without deviating from the technical idea of the application. The technical scope of the application is not limited to the content in the specification, and must be determined according to the scope of claims.
Claims
1. A method for controlling asynchronous, time-sequential, packet communication between systems based on ESB, characterized in that, Includes the following steps: Step 1: The source system generates business data and corresponding current message data, and sends the current message to the MQInput queue of the ESB system. Step 2: Determine whether the current message is a time-series or non-time-series message based on the current message's grouping status, and update the current message's status flag in the intermediate table. If the current message is not grouped, update the status flag of the intermediate table to 0; if the current message is grouped, obtain the keywords and group names according to whether the message is grouped by keywords, and update the status flag of the intermediate table to 0; where 0 indicates that the current message has been successfully pushed to the ESB system. Step 3: Update the status flag of the current message according to the timing type of the current message and the status flag of the previous message, and write it to the MQOutput queue. When the status flag of the previous message is 1, 3, or 4, update the status of the current message to 4; when the status flag of the previous message is 2, update the status of the current message to 1; where 1 indicates that the data was successfully pushed to the target system, 2 indicates that the target system processed it successfully, 3 indicates that the target system failed to process it, and 4 indicates that the data is in a blocked state. Step 4: The target system listens to the MQOutput queue, performs business logic operations on the current message, and feeds back the operation results to the ESB system via HTTP. Then, it writes the operation results and the timing type of the current message into the feedback table and updates the status identifier of the current message according to the business result response code. When the business result response code is successful, update the current message status to 2; when the business result response code is successful, the current message is a time-series message, and the status of the next time-series message is 0 or 4, update the status of the next time-series message to 1; when the business result response code is failed, update the current message status to 3.
Citation Information
Patent Citations
Data transceiving method based on message queue
CN111404643A
Message asynchronous processing method and equipment thereof
CN112486701A