CN111314476A - Message transmission method and system for enterprise asynchronization - Google Patents

Message transmission method and system for enterprise asynchronization Download PDF

Info

Publication number
CN111314476A
CN111314476A CN202010111781.7A CN202010111781A CN111314476A CN 111314476 A CN111314476 A CN 111314476A CN 202010111781 A CN202010111781 A CN 202010111781A CN 111314476 A CN111314476 A CN 111314476A
Authority
CN
China
Prior art keywords
message
order
enterprise
queue
order request
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
CN202010111781.7A
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.)
Suning Cloud Computing Co Ltd
Original Assignee
Suning Cloud Computing 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 Suning Cloud Computing Co Ltd filed Critical Suning Cloud Computing Co Ltd
Priority to CN202010111781.7A priority Critical patent/CN111314476A/en
Publication of CN111314476A publication Critical patent/CN111314476A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and a system for transmitting asynchronous messages among enterprises, wherein the method comprises the following steps: receiving an order request sent by an upstream order production system and putting the order request into a message queue; judging whether a flow control limiting condition is reached; if yes, queuing for waiting, otherwise, performing message conversion on the order request and then pushing the order request to downstream enterprises. The invention utilizes the queue mechanism to buffer and control concurrence, controls the flow and limits the current in real time, reduces the message blockage, carries out message conversion through an appointed or configured interface, delivers the message to a receiving end, namely a downstream enterprise, synchronously returns the result of the downstream enterprise, and finally updates the information processing result of the upstream enterprise, thereby ensuring the smoothness of the cross-enterprise business flow.

Description

Message transmission method and system for enterprise asynchronization
Technical Field
The invention belongs to the field of distributed application, and particularly relates to an inter-enterprise asynchronization message transmission method and system.
Background
The traditional ordering process of most enterprises is that an external enterprise client selects and orders at a system foreground to generate a pre-occupation order, inventory and account period limit are locked, a pre-occupation request is sent to an order center station, the order center station returns to the system foreground after pre-occupation is successful, the foreground system needs to return a successful pre-occupation result to a purchasing system of the client at the moment, the client completes purchasing approval flow in the purchasing system, after approval is passed, an easy-to-purchase system is called and notified through an interface, the easy-to-purchase system notifies the order center station to confirm ordering, and accordingly an order is generated and then logic such as delivery, confirmation and the like is performed.
In the enterprise purchasing scene, due to the fact that service capabilities among enterprises are different, the order system architecture is not complete, the message processing mechanism is not mature and the like, the upstream enterprise flow is limited by downstream enterprises, the downstream enterprise processing capability is insufficient, or tasks of the upstream enterprises cannot be executed and completed, the order placing success rate is low, and meanwhile, business intrusiveness and redundant work exist in the aspects of message reliability, retry and exception handling, so that the cross-enterprise business flow is not smooth.
Disclosure of Invention
Based on the above defects in the prior art, an object of the present invention is to provide an inter-enterprise asynchronous message transmission method and system, so as to solve the problem of unsmooth message transmission in the original cross-enterprise business process.
The technical scheme adopted by the invention is as follows:
an inter-enterprise asynchronized message transmission method, comprising:
receiving an order request sent by an upstream order production system and putting the order request into a message queue;
judging whether a flow control limiting condition is reached; if yes, queuing for waiting, otherwise, performing message conversion on the order request and pushing the order request to downstream enterprises.
Further, when the pushing is abnormal, the order request to be pushed is thrown back to the message queue again to wait for continuing pushing.
Further, the message conversion includes: and routing according to the information of the enterprise to which the order belongs, selecting an interface address corresponding to the downstream enterprise to be pushed, and converting the message into a data structure required by the downstream enterprise according to the customized requirements of different enterprises.
Further, the method further comprises: the method comprises the following steps of performing message packaging on an order request sent by an upstream order production system, wherein the message packaging comprises the following steps: and extracting, compressing and packaging the order core data contained in the order request and the information of the enterprise to which the order belongs.
Further, the method further comprises: and modifying the flow control limiting conditions according to the abnormal feedback result of the downstream enterprise.
Further, the method further comprises: and monitoring the message sending condition in the message queue, and modifying the flow control limiting condition when the messages are continuously accumulated.
Further, the modifying of the flow control restriction condition includes: modifying the time interval and the number of consumers consumed by the queue.
Further, the modification of the time interval of queue consumption and the number of consumers is realized by the zookeeper cluster.
Another aspect of the present invention further provides an inter-enterprise asynchronized message transmission system, including:
the message queue control module is used for receiving order requests sent by an upstream order production system and putting the order requests into a message queue for sequential pushing;
the message pushing module is used for monitoring the order message of the message queue control module and judging whether the set flow control limiting condition is reached; if yes, continuing to wait until the order is idle, otherwise, converting the order request into a message and pushing the message to a downstream enterprise.
Further, the system further comprises: and the monitoring module is used for monitoring the abnormal feedback result of the downstream enterprise and the order congestion condition of the message queue and modifying the flow control limiting condition according to the abnormal feedback result and the congestion condition.
Compared with the prior art, the message transmission method and the message transmission system which are asynchronous among enterprises and disclosed by the invention have the following technical effects:
1. the invention deploys the message queue in the business process, the upstream enterprise is used as the message producer to put the message into the queue, the queue mechanism is used for buffering and controlling concurrency, the flow control and the current limiting are carried out in real time, the message blocking are reduced, the message is delivered to the receiving end, namely the downstream enterprise through the appointed or configured interface and the message conversion, the downstream enterprise synchronously returns the result, and finally the information processing result of the upstream enterprise is updated, thereby ensuring the smoothness of the cross-enterprise business process.
2. The flow control and flow limiting condition of the invention is adjusted in real time according to the congestion condition of the message queue and the abnormal feedback of downstream enterprises, so as to achieve the optimal transmission effect.
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 flowchart of an inter-enterprise asynchronized message transmission method according to an embodiment of the present invention.
Fig. 2 is an architecture diagram of an inter-enterprise asynchronized message transfer system in an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the present invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that such description is merely illustrative and not intended to limit the scope of the present invention. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present invention.
Referring to fig. 1, an embodiment of the present invention discloses an inter-enterprise asynchronous message transmission method, which includes the following steps:
step S1, the upstream order production system submits the order request of the user;
specifically, after receiving an order request for purchasing a commodity sent by an order front end, an upstream order production system packages order request data, wherein the order request data is transmitted in a data message format, order core data (such as order numbers and order quantities) contained in the order request and information (such as enterprise name codes) of enterprises to which the orders belong are extracted, compressed and packaged, useful information in the order core data is extracted and then packaged, and data transmission is facilitated.
Step S2, receiving an order request sent by an upstream order production system and putting the order request into a message queue; then judging whether the flow control limiting condition is reached; if the current orders are more and the number of the orders exceeds the number of the orders processed at the same time, queuing for waiting, if the flow control limiting condition is not reached and the new order requests can be processed, performing message conversion on the order requests and then pushing the order requests to downstream enterprises.
In step S2, when the push system consumes the order data in the message queue, the route is performed according to the information of the enterprise to which the order belongs, the interface address corresponding to the downstream enterprise to be pushed is selected, the message is converted into the data structure required by the downstream enterprise according to the customized requirements of different enterprises, then the accurate push is performed, and corresponding subsequent processing is performed according to the returned result, where the result may be a push success or a push failure. And when the pushing is abnormal, if the pushing cannot be accurately pushed to the interface end of the downstream enterprise, according to the transaction characteristics of the queue, the order request to be pushed is re-thrown to the message queue to wait for the next continuous pushing. Therefore, the asynchronization of message transmission among enterprises can be realized, and the decoupling of business among the enterprises is completed.
In order to satisfy order data transmission under different conditions, as a preferred embodiment of the present invention, the flow control limiting condition is modified according to an abnormal feedback result of a downstream enterprise, a message sending condition in a message queue is monitored, and the flow control limiting condition is modified when messages are continuously accumulated. Wherein the modifying of the flow control restriction condition comprises: the time interval consumed by the queue and the number of the consumers are modified, the time interval consumed by the queue and the number of the consumers are modified through a zookeeper cluster, the zookeeper cluster is deployed to serve as a configuration platform, modification is effective in real time, in addition, the configuration of flow control conditions can be manually adjusted after abnormal alarms are selected, and the flow control conditions can be automatically adjusted according to rules after flow control rules are customized, so that the return flow can be flexibly adjusted according to the state of a downstream enterprise system.
When a request flood occurs, the ordering system can continuously respond to the ordering request, send the order request to the queue and wait for the pushing system to consume the order. Specifically, when the information in the order queue is found to be continuously accumulated, the number of consumers of the push system can be increased through the configuration platform, or push interfaces are increased, the thread of server service is increased, or the flow is increased, and the order data consumption is accelerated; when the results of the abnormal increase returned by the downstream enterprise are received, the number of consumers of the pushing system can be reduced, or the pushing is delayed, or the pushing interval time is increased, so that the pressure of the downstream enterprise is reduced, and when the capability of the downstream system is recovered, the number of the consumers of the pushing system can be adjusted, so that the optimal data transmission effect is achieved. The flow control conditions are adjusted in real time through monitoring and result feedback of the order pushing process, and the transmission efficiency is improved.
And step S3, the downstream enterprise feeds back the result, and the upstream order production system updates the order state according to the received feedback.
And after receiving the pushed order message, the downstream enterprise processes the message, feeds back a result to the upstream order production system, and updates the order state of the upstream order production system.
Such as the order has been completed.
Corresponding to the method in the foregoing embodiment, another embodiment of the present invention further provides an inter-enterprise asynchronized message transmission system, including:
the message queue control module is used for receiving order requests sent by an upstream order production system and putting the order requests into a message queue for sequential pushing;
the message pushing module is used for monitoring the order message of the message queue control module and judging whether the set flow control limiting condition is reached or not when a new order request exists; if the order request is idle, continuing to queue and wait for the order request to be pushed, and if the order request is not idle, converting the order request into a message and pushing the message to a downstream enterprise.
The system further comprises: and the monitoring module is used for monitoring the abnormal feedback result of the downstream enterprise and the order congestion condition of the message queue, and modifying the flow control limiting condition according to the received abnormal feedback result and the congestion condition, such as increasing the number of the push servers, so as to achieve the optimal data transmission effect.
Taking an easy-to-buy platform as an example, firstly, a message queue control module needs to be deployed, the message queue control module can be deployed on an enterprise queue management platform, a system (hereinafter referred to as an order system) which is easy to buy and generates an order applies for the order, the order is returned to a pushing system (hereinafter referred to as a message pushing module) for subscription by the easy-to-buy order, and JMS is used for monitoring. After the ordering system submits the order to an order console through a synchronous interface, according to a result returned by the order console, if the order fails, the synchronous operation directly returns user failure information; if the order placing is successful, further packaging the order data which needs to be returned into a message, wherein the message comprises order core information and user information (the information is the basis of enterprise routing) of an enterprise to which the order belongs, sending the message to a queue, and returning to the user to complete the order placing. The message queue control module is used, in that it integrates the functions of abnormal retry and flow control, such as the way of processing by using a database and a timed task, and the function needs to be repeatedly implemented, and the delay is relatively high.
By the aid of the inter-enterprise asynchronous message transmission system, after the inter-enterprise queue control module is erected, buffering, flow control and current limiting can be performed on a downstream system, and message encapsulation of the message pushing module is matched, so that the success rate of business is not limited by the processing capacity of downstream enterprises, the business is more concentrated on the business of the enterprises, and the smoothness of business processes of the enterprises is improved.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for asynchronous message transmission between enterprises, the method comprising:
receiving an order request sent by an upstream order production system and putting the order request into a message queue;
judging whether a flow control limiting condition is reached; if yes, queuing for waiting, otherwise, performing message conversion on the order request and then pushing the order request to downstream enterprises.
2. The message transmission method according to claim 1, wherein when the push is abnormal, the order request to be pushed is re-thrown back to the message queue to wait for continuing the push.
3. The message transmission method according to claim 2, wherein the message conversion comprises: and routing according to the information of the enterprise to which the order belongs, selecting an interface address corresponding to the downstream enterprise to be pushed, and converting the message into a data structure required by the downstream enterprise according to the customized requirements of different enterprises.
4. The message transmission method according to claim 3, characterized in that the method further comprises: the method comprises the following steps of performing message packaging on an order request sent by an upstream order production system, wherein the message packaging comprises the following steps: and extracting, compressing and packaging the order core data contained in the order request and the information of the enterprise to which the order belongs.
5. The method of enterprise message transmission of claim 2, wherein the method further comprises: and modifying the flow control limiting conditions according to the abnormal feedback result of the downstream enterprise.
6. The message transmission method according to claim 5, wherein the method further comprises: and monitoring the message sending condition in the message queue, and modifying the flow control limiting condition when the messages are continuously accumulated.
7. The message transmission method according to claim 5 or 6, wherein the modifying of the flow control restriction condition comprises: modifying the time interval and the number of consumers consumed by the queue.
8. The message transmission method according to claim 6, wherein the modification of the time interval of queue consumption and the number of consumers is implemented by zookeeper cluster.
9. An inter-enterprise asynchronized message transfer system, the system comprising:
the message queue control module is used for receiving order requests sent by an upstream order production system and putting the order requests into a message queue for sequential pushing;
the message pushing module is used for monitoring the order message of the message queue control module and judging whether the set flow control limiting condition is reached; if so, continuing to wait in a queue, otherwise, converting the order request and pushing the order request to a downstream enterprise.
10. The message transmission system according to claim 9, wherein the system further comprises: and the monitoring module is used for monitoring the abnormal feedback result of the downstream enterprise and the order congestion condition of the message queue and modifying the flow control limiting condition according to the abnormal feedback result and the congestion condition.
CN202010111781.7A 2020-02-24 2020-02-24 Message transmission method and system for enterprise asynchronization Pending CN111314476A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010111781.7A CN111314476A (en) 2020-02-24 2020-02-24 Message transmission method and system for enterprise asynchronization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010111781.7A CN111314476A (en) 2020-02-24 2020-02-24 Message transmission method and system for enterprise asynchronization

Publications (1)

Publication Number Publication Date
CN111314476A true CN111314476A (en) 2020-06-19

Family

ID=71159106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010111781.7A Pending CN111314476A (en) 2020-02-24 2020-02-24 Message transmission method and system for enterprise asynchronization

Country Status (1)

Country Link
CN (1) CN111314476A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113810307A (en) * 2021-10-11 2021-12-17 上海微盟企业发展有限公司 Data flow control method, system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105160570A (en) * 2015-09-15 2015-12-16 浪潮软件股份有限公司 Concurrent online transaction processing method capable of being horizontally expanded
CN108038767A (en) * 2017-12-26 2018-05-15 广州供电局有限公司 Electric business order asynchronous distribution system and method based on message queue
CN109194586A (en) * 2018-08-31 2019-01-11 重庆富民银行股份有限公司 Peak clipping processing method based on distributed token bucket
US20190258979A1 (en) * 2018-02-19 2019-08-22 Target Brands, Inc. Method and system for transfer order management

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105160570A (en) * 2015-09-15 2015-12-16 浪潮软件股份有限公司 Concurrent online transaction processing method capable of being horizontally expanded
CN108038767A (en) * 2017-12-26 2018-05-15 广州供电局有限公司 Electric business order asynchronous distribution system and method based on message queue
US20190258979A1 (en) * 2018-02-19 2019-08-22 Target Brands, Inc. Method and system for transfer order management
CN109194586A (en) * 2018-08-31 2019-01-11 重庆富民银行股份有限公司 Peak clipping processing method based on distributed token bucket

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113810307A (en) * 2021-10-11 2021-12-17 上海微盟企业发展有限公司 Data flow control method, system and storage medium

Similar Documents

Publication Publication Date Title
US10528405B2 (en) Methods, apparatus and computer programs for managing persistence
US9805078B2 (en) Next generation near real-time indexing
CN107093138B (en) Auction Ask-Bid System and its operation method based on distributed clog-free asynchronous message tupe
US8146095B2 (en) Method, apparatus and computer program product for managing persistence in a messaging network
US7047532B1 (en) Application independent messaging system
CN110515748B (en) Message processing method and related device
CN111737329A (en) Unified data acquisition platform for rail transit
CN106375241B (en) Batch data processing method, front-end system, host and batch data processing system
CN109714409B (en) Message management method and system
CN114253748B (en) Message processing system and message processing method
US8726079B2 (en) Handling of messages in a message system
WO2001067263A1 (en) Messaging system for computers
EP2309389A1 (en) Delivery with reconciliation on client side
CN108390919B (en) Message synchronization system and method for high-reliability dual-computer hot standby
CN111314476A (en) Message transmission method and system for enterprise asynchronization
CN116633875B (en) Time order-preserving scheduling method for multi-service coupling concurrent communication
US20040177111A1 (en) Non-persistent service support in transactional application support environments
CN115022402B (en) Agent acquisition method and system based on stack-type integration technology
WO2023147716A1 (en) Flow control and billing methods, apparatuses and system, electronic device, medium and product
CN117692877B (en) Charging C++ application-oriented distributed message distribution method and system
CN112579274A (en) Multi-channel access message forwarding method and device
CN112099933A (en) Task operation and query method and device, electronic equipment and storage medium
CN113076206A (en) Cross-system data sending method and device
CN109347760A (en) A kind of data transmission method for uplink and device
US20050076106A1 (en) Asynchronous information retrieval

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200619

RJ01 Rejection of invention patent application after publication