CN115170152A - Data distribution method, device, equipment and storage medium - Google Patents

Data distribution method, device, equipment and storage medium Download PDF

Info

Publication number
CN115170152A
CN115170152A CN202210646837.8A CN202210646837A CN115170152A CN 115170152 A CN115170152 A CN 115170152A CN 202210646837 A CN202210646837 A CN 202210646837A CN 115170152 A CN115170152 A CN 115170152A
Authority
CN
China
Prior art keywords
order
data
processed
order data
receiving object
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
CN202210646837.8A
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.)
Jiangsu Suning Logistics Co ltd
Original Assignee
Jiangsu Suning Logistics 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 Jiangsu Suning Logistics Co ltd filed Critical Jiangsu Suning Logistics Co ltd
Priority to CN202210646837.8A priority Critical patent/CN115170152A/en
Publication of CN115170152A publication Critical patent/CN115170152A/en
Priority to CA3202557A priority patent/CA3202557A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/01Customer relationship services
    • G06Q30/015Providing customer assistance, e.g. assisting a customer within a business location or via helpdesk
    • G06Q30/016After-sales
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/545Gui
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application relates to a data distribution method, a device, equipment and a storage medium. The main technical scheme comprises: when the order data of the processed order are distributed to the receiving object, whether the distributed lock is obtained or not is judged, when the distributed lock is obtained, the distribution sequence of the order data of the processed order is determined according to the request sequence information and the number information of the processed order which are recorded in the distributed lock in advance, the target order data needed by the receiving object are obtained based on the responsibility chain according to configuration data preset by a user through a visual interface, and the target order data are distributed to the receiving object through a message queue according to the distribution sequence of the order data of the processed order. According to the method and the device, timeliness and sequence of data transmission can be guaranteed, and usability of the after-sale operating system is improved.

Description

Data distribution method, device, equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data distribution method, apparatus, device, and storage medium.
Background
In the product selling process of the selling platform, the after-sale operating system can process orders and record related order data. In order to facilitate the after-sale operation management of each manufacturer, the sales platform needs to transmit the sales information to each cooperation manufacturer in time.
At present, after an after-sales operation system processes an order, the after-sales operation system queries pre-configured manufacturer demand information to judge whether data related to the order is issued to a manufacturer, and if the data related to the order is determined to be issued, a manufacturer interface is called to distribute the data. If the external system of the manufacturer is abnormal, the after-sale operating system cannot send the order data and affects the subsequent operation of the order, so that the timeliness and the sequence of data transmission are difficult to guarantee, and the availability of the after-sale operating system is reduced.
Disclosure of Invention
Based on the above, the application provides a data distribution method, device, equipment and storage medium, which can ensure timeliness and sequency of data transmission and improve availability of an after-sale operating system.
In a first aspect, a data distribution method is provided, which includes:
when the order data of the processed order is determined to be distributed to the receiving object, judging whether a distributed lock is acquired;
when the distributed lock is obtained, determining the distribution sequence of order data of the processed order according to the request sequence information and the number information of the processed order pre-recorded in the distributed lock;
acquiring target order data required by a receiving object based on a responsibility chain according to configuration data preset by a user through a visual interface;
and distributing the target order data to the receiving object through the message queue according to the distribution sequence of the order data of the processed order.
According to an implementation manner in the embodiment of the present application, the request sequence information includes at least one request form number and at least one request serial number corresponding to the request form number, and the numbering information includes a preset form number and a preset serial number; determining the distribution sequence of the order data of the processed orders according to the pre-recorded request sequence information and the number information of the processed orders in the distributed lock, wherein the distribution sequence comprises the following steps:
and determining the distribution sequence of the order data of the processed orders according to the size relation between at least one request serial number corresponding to the request order number which is the same as the preset order number and the preset serial number.
According to an implementation manner in an embodiment of the present application, distributing target order data to a receiving object through a message queue according to a distribution order of order data of processed orders includes:
when the distribution sequence of the order data of the processed orders is not the first, the target order data is transferred to a queue to be processed through a message queue;
and polling the queue to be processed at regular time until the order data distribution sequence of the processed order is the first, and distributing the target order data to the receiving object through the message queue.
According to an implementation manner in the embodiment of the present application, after distributing the target order data to the receiving object through the message queue, the method further includes:
and deleting the request sequence information in the distributed lock, which is the same as the number information of the processed order, so as to release the distributed lock.
According to one implementation manner in the embodiment of the present application, the configuration data includes field information and a data format; acquiring target order data required by a receiving object based on a responsibility chain according to configuration data preset by a user through a visual interface, wherein the target order data comprises the following steps:
acquiring order data to be sent required by a receiving object based on a responsibility chain according to field information preset by a user through a visual interface;
and packaging the order data to be sent according to a data format preset by a user through a visual interface to obtain target order data.
According to one implementation manner in the embodiment of the present application, the method further includes: when the distributed lock is not acquired, transferring order data to a queue to be processed through a message queue;
and polling order data of the queue to be processed at regular time until the distributed lock is obtained.
According to an implementation manner in the embodiment of the present application, the message queue includes a WINDQ message queue, and the distributed lock is a redis distributed lock.
In a second aspect, there is provided a data distribution apparatus, the apparatus comprising:
the judging module is used for judging whether the distributed lock is acquired or not when the order data of the processed order is determined to be distributed to the receiving object;
the determining module is used for determining the distribution sequence of the order data of the processed order according to the request sequence information and the number information of the processed order pre-recorded in the distributed lock when the distributed lock is acquired;
the acquisition module is used for acquiring target order data required by the receiving object based on the responsibility chain according to configuration data preset by a user through a visual interface;
and the distribution module is used for distributing the target order data to the receiving object through the message queue according to the distribution sequence of the order data of the processed order.
In a third aspect, a computer device is provided, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores computer instructions executable by the at least one processor to enable the at least one processor to perform the method referred to in the first aspect above.
In a fourth aspect, a computer-readable storage medium is provided, on which computer instructions are stored, wherein the computer instructions are configured to cause a computer to perform the method according to the first aspect.
According to the technical content provided by the embodiment of the application, when the order data of the processed order is determined to be distributed to the receiving object, whether the distributed lock is obtained is judged, when the distributed lock is obtained, the distribution sequence of the order data of the processed order is determined according to the request sequence information and the number information of the processed order pre-recorded in the distributed lock, the target order data required by the receiving object is obtained based on the responsibility chain according to the configuration data preset by a user through the visual interface, the target order data are distributed to the receiving object through the message queue according to the distribution sequence of the order data of the processed order, the timeliness and the sequence of data transmission can be guaranteed, and the availability of an after-sale operating system is improved.
Drawings
FIG. 1 is a diagram of an application environment of a data distribution method in one embodiment;
FIG. 2 is a schematic flow chart diagram illustrating a data distribution method according to one embodiment;
FIG. 3 is a block diagram showing the structure of a data distribution apparatus according to an embodiment;
FIG. 4 is a schematic block diagram of a computer apparatus in one embodiment.
Detailed Description
The present application will be described in further detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The data distribution method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. When the server 104 determines to distribute the order data of the processed order to the receiving object, the server 104 determines whether to acquire the distributed lock, and when acquiring the distributed lock, determines a distribution sequence of the order data of the processed order according to the request sequence information and the number information of the processed order pre-recorded in the distributed lock. According to configuration data preset by a user through a visual interface of the terminal 102, target order data required by a receiving object are obtained based on a responsibility chain, and the target order data are distributed to the receiving object through a message queue according to a distribution sequence of the order data of the processed order. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, and tablet computers, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
Fig. 2 is a flowchart of a data distribution method according to an embodiment of the present application. As shown in fig. 2, the method may include the steps of:
s210, when the order data of the processed order is determined to be distributed to the receiving object, whether the distributed lock is acquired is judged.
The receiving object may be a manufacturer, a shop, or the like that cooperates with the sales platform.
After the after-sale operating system of the sales platform processes the order, the pre-configured manufacturer demand information is inquired to judge whether the order related data is issued to the receiving object, so as to facilitate the after-sale management of the receiving object.
And when the order data of the processed order is determined to be distributed to the receiving object, judging whether the distributed lock is acquired. If the distributed lock is obtained, the fact that the order data are not processed in the system at the moment is indicated; if the distributed lock is not acquired, the system is indicated to process order data at the moment, and other order data can be processed only after the order data is processed. The distributed lock can be a redis distributed lock, and multiple order data can be prevented from being processed simultaneously through the distributed lock, so that the data distribution sequence is ensured.
S220, when the distributed lock is obtained, determining the distribution sequence of the order data of the processed order according to the request sequence information and the number information of the processed order pre-recorded in the distributed lock.
Before data distribution, request sequence information of a server corresponding to a receiving object is recorded in a distributed lock, and the request sequence information may be expressed as: the one number is key with value, e.g., key:1, value: [1,2], indicating request 1 with 1 one number and 1 and request 2 with 1 one number and 2.
When the distributed lock is obtained, determining the distribution sequence of the order data of the processed order according to the request sequence information and the number information of the processed order pre-recorded in the distributed lock so as to avoid disturbing the data distribution sequence.
And S230, acquiring target order data required by the receiving object based on the responsibility chain according to configuration data preset by the user through a visual interface.
Based on the responsibility chain mode, different processing chains are constructed according to the requirements of each receiving object, namely, the responsibility chains are used for respectively processing the data distribution requests of different receiving objects, and the expandability of the system is enhanced. For the newly accessed receiving object, only the request processing class needs to be added and added into the link. When the service logic is changed, only the specific processing object logic of the corresponding class needs to be modified or the link sequence needs to be adjusted, so that other services are not affected, and the stability of the system is greatly improved.
Taking a receiving object as a certain manufacturer as an example, the constructed responsibility chain can be as follows: the system comprises a request receiving module, a public data checking module, a manufacturer service logic processing module and a data transmission module. And if the public data needs to be modified, only the logic corresponding to the public data verification module needs to be modified.
The code can be reconstructed by constructing a responsibility chain, and the problem of poor maintainability of the code caused by more accessed receiving objects and complicated design logic is solved.
The user can flexibly set configuration data through a visual interface according to the requirement of a received object, and the configuration data can comprise field information and a data format, wherein the field information can comprise a field length, a field name and the like.
The system can perform data customization processing, such as field length verification, field name conversion and the like, according to configuration data set by a user through a visual interface, and acquire target order data required by a receiving object. Therefore, the problems that a large amount of human resources and time are input to carry out development, test and combined debugging work due to some simple requirement changes are effectively solved. Not only saves research and development cost, but also can respond to business change requirements more quickly.
And S240, distributing the target order data to the receiving object through the message queue according to the distribution sequence of the order data of the processed orders.
The message queue has asynchronous, decoupling and peak clipping functions, and can decouple the distribution processing logic of the received object for asynchronous processing. When the external system is unavailable, the after-sales operation system cannot send the order data to the external system, the order data is decoupled through the WINDQ message queue and then sent in a follow-up attempt, the use of the after-sales operation system is not influenced, the availability of the system is greatly improved, the response time of an interface is greatly improved, and the high concurrent processing capacity is improved. The message queue may be a WINDQ message queue.
According to the distribution sequence of the order data of the processed orders, the target order data are distributed to the receiving object through the message queue, so that the data can be distributed without omission, and the availability of the system can be improved.
It can be seen that, in the embodiment of the present application, when it is determined that order data of a processed order is distributed to a receiving object, it is determined whether a distributed lock is acquired, and when the distributed lock is acquired, a distribution order of the order data of the processed order is determined according to request order information and number information of the processed order recorded in the distributed lock in advance. According to configuration data preset by a user through a visual interface, target order data required by a receiving object are obtained based on a responsibility chain, and the target order data are distributed to the receiving object through a message queue according to the distribution sequence of the order data of the processed orders, so that the timeliness and the sequence of data transmission can be ensured, and the availability and the stability of an after-sale operating system are improved.
The steps in the above-described process flow are described in detail below. First, the above step S220, namely, "determining the distribution order of the order data of the processed order according to the request order information and the number information of the processed order recorded in the distributed lock in advance", will be described in detail with reference to the embodiment.
The request sequence information comprises at least one request single number and at least one request serial number corresponding to the request single number, and the numbering information comprises a preset single number and a preset serial number.
As an implementation manner, the distribution sequence of the order data of the processed order is determined according to the size relationship between at least one request serial number corresponding to the request order number identical to the preset order number and the preset serial number.
Sequencing the size relation between at least one request serial number and a preset serial number, and if the preset serial number is the minimum, sending order data of a processed order first; and if at least one request serial number has a request serial number smaller than the preset serial number, sending order data of the processed order at a later time.
The above step S230, that is, "obtaining target order data required by the receiving object based on the responsibility chain according to the configuration data preset by the user through the visual interface", will be described in detail with reference to the embodiment.
As an achievable mode, acquiring order data to be sent required by a receiving object based on a responsibility chain according to field information preset by a user through a visual interface;
and packaging the order data to be sent according to a data format preset by a user through a visual interface to obtain target order data.
The field information includes a mandatory field, a field length, a field name, and the like. According to a mandatory field preset by a user through a visual interface, acquiring order data to be sent required by a receiving object based on a responsibility chain, and checking the order data to be sent according to the field length, the field name and the like, so that the field length and the field name of the order data to be sent are consistent with those of system data of the receiving object, and accurate distribution of the data is ensured.
The order data to be sent are packaged according to the data format preset by the user through the visual interface to obtain the target order data, so that the format of the target order data is consistent with the interface data format of the receiving object, and the transmission is carried out by calling the corresponding interface, so that the transmission efficiency can be improved, and the timeliness of data distribution can be improved.
The above step S240, that is, "distributing target order data to a receiving object through a message queue according to a distribution order of order data of processed orders" is described in detail with reference to the embodiment.
As an achievable mode, when the distribution sequence of the order data of the processed order is not the first, the target order data is moved to the queue to be processed through the message queue;
and polling the queue to be processed at regular time until the distribution sequence of the order data of the processed order is the first, and distributing the target order data to the receiving object through the message queue.
When the distribution sequence of the order data of the processed order is not the first order, it indicates that the order data of the processed order is not distributed before other order data of the processed order, and the order data of the processed order cannot be distributed temporarily. And transferring the order data to a queue to be processed through the message queue, periodically polling the queue to be processed until the distribution sequence of the order data of the processed order is the first one, and distributing the target order data to the receiving object through the message queue. When the pending queue is empty, polling is stopped. Therefore, the sequentiality of data distribution is effectively ensured.
As an implementation manner, after the target order data is distributed to the receiving object through the message queue, the request sequence information in the distributed lock, which is the same as the number information of the processed order, is deleted to release the distributed lock, so that when the order data of the order is processed subsequently, the distributed lock is acquired, and the data distribution method is executed.
It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in a strict order unless explicitly stated in the application, and may be performed in other orders. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
Fig. 3 is a schematic structural diagram of a data distribution apparatus according to an embodiment of the present application, configured to execute the method flow shown in fig. 1. As shown in fig. 3, the apparatus 300 may include: the determining module 310, the determining module 320, the obtaining module 330, and the distributing module 340 may further include: and deleting the module. The main functions of each component module are as follows:
a determining module 310, configured to determine whether a distributed lock is acquired when it is determined that order data of a processed order is distributed to a receiving object;
a determining module 320, configured to determine, when the distributed lock is obtained, a distribution order of order data of the processed order according to request order information and number information of the processed order that are pre-recorded in the distributed lock;
the obtaining module 330 is configured to obtain target order data required by the receiving object based on the responsibility chain according to configuration data preset by the user through the visual interface;
the distributing module 340 is configured to distribute the target order data to the receiving object through the message queue according to a distribution order of the order data of the processed order.
As an implementation manner, the request sequence information includes at least one request form number and at least one request sequence number corresponding to the request form number, and the numbering information includes a preset form number and a preset sequence number; the determining module 320 is specifically configured to determine a distribution sequence of order data of the processed order according to a size relationship between at least one request serial number corresponding to a request order number that is the same as the preset order number and the preset serial number.
As an implementable manner, the distributing module 340 is specifically configured to, when the distribution order of the order data of the processed order is not the first one, transfer the target order data to the queue to be processed through the message queue;
and polling the queue to be processed at regular time until the distribution sequence of the order data of the processed order is the first, and distributing the target order data to the receiving object through the message queue.
As an implementation manner, the apparatus further includes a deleting module, configured to delete the request sequence information in the distributed lock that is the same as the number information of the processed order to release the distributed lock after distributing the target order data to the receiving object through the message queue.
As one way of accomplishing this, the configuration data includes field information and data format; the obtaining module 330 is specifically configured to obtain order data to be sent, which is required by a receiving object, based on a responsibility chain according to field information preset by a user through a visual interface;
and packaging the order data to be sent according to a data format preset by a user through a visual interface to obtain target order data.
The same and similar parts among the various embodiments are referred to each other, and each embodiment focuses on differences from other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
It should be noted that, in the embodiments of the present application, the use of user data may be involved, and in practical applications, the user-specific personal data may be used in the scheme described herein within the scope permitted by applicable laws and regulations, under the condition of meeting the requirements of applicable laws and regulations in the country (for example, the user explicitly agrees, the user is informed, the user explicitly authorizes, etc.).
According to an embodiment of the present application, a computer device and a computer-readable storage medium are also provided.
As shown in fig. 4, a block diagram of a computer device according to an embodiment of the present application is shown. Computer apparatus is intended to represent various forms of digital computers or mobile devices. Which may include desktop computers, laptop computers, workstations, personal digital assistants, servers, mainframe computers, and other suitable computers. Mobile devices may include tablet computers, smart phones, wearable devices, and the like.
As shown in fig. 4, the apparatus 400 includes a computing unit 401, a ROM 402, a RAM 403, a bus 404, and an input/output (I/O) interface 405, the computing unit 401, the ROM 402, and the RAM 403 being connected to each other via the bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The calculation unit 401 may execute various processes in the method embodiments of the present application according to computer instructions stored in a Read Only Memory (ROM) 402 or computer instructions loaded from a storage unit 408 into a Random Access Memory (RAM) 403. Computing unit 401 may be a variety of general and/or special purpose processing components with processing and computing capabilities. The computing unit 401 may include, but is not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. In some embodiments, the methods provided by embodiments of the present application may be implemented as a computer software program tangibly embodied in a computer-readable storage medium, such as storage unit 408.
The RAM 403 may also store various programs and data necessary for the operation of the device 400. Part or all of the computer program may be loaded and/or installed onto the device 400 via the ROM 802 and/or the communication unit 409.
An input unit 406, an output unit 407, a storage unit 408 and a communication unit 409 in the device 400 may be connected to the I/O interface 405. The input unit 406 may be, for example, a keyboard, a mouse, a touch screen, a microphone, or the like; the output unit 407 may be, for example, a display, a speaker, an indicator lamp, or the like. The device 400 is capable of exchanging information, data, etc. with other devices via the communication unit 409.
It should be noted that the device may also include other components necessary for normal operation. It may also contain only the components necessary to implement the solution of the present application and not necessarily all of the components shown in the figures.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof.
Computer instructions for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer instructions may be provided to the computing unit 401 such that the computer instructions, when executed by the computing unit 401 such as a processor, cause the steps involved in embodiments of the method of the present application to be performed.
The computer-readable storage medium provided herein may be a tangible medium that may contain, or store, computer instructions for performing the steps involved in the method embodiments of the present application. The computer readable storage medium may include, but is not limited to, storage media in the form of electronic, magnetic, optical, electromagnetic, and the like.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method for data distribution, the method comprising:
when the order data of the processed order is determined to be distributed to the receiving object, judging whether a distributed lock is acquired;
when the distributed lock is obtained, determining the distribution sequence of order data of the processed order according to the request sequence information and the number information of the processed order pre-recorded in the distributed lock;
acquiring target order data required by the receiving object based on a responsibility chain according to configuration data preset by a user through a visual interface;
and distributing the target order data to the receiving object through a message queue according to the distribution sequence of the order data of the processed order.
2. The method according to claim 1, wherein the request sequence information includes at least one request ticket number and at least one request sequence number corresponding to the request ticket number, and the number information includes a preset ticket number and a preset sequence number; the determining a distribution sequence of the order data of the processed order according to the request sequence information and the number information of the processed order pre-recorded in the distributed lock includes:
and determining the distribution sequence of the order data of the processed order according to the size relationship between at least one request sequence number corresponding to the request order number which is the same as the preset order number and the preset sequence number.
3. The method of claim 1, wherein said distributing said target order data to said receiving object via a message queue according to a distribution order of order data of said processed orders comprises:
when the distribution sequence of the order data of the processed order is not the first, the target order data is transferred to a queue to be processed through the message queue;
and polling the queue to be processed at regular time until the order data distribution sequence of the processed order is the first one, and distributing the target order data to the receiving object through a message queue.
4. The method of claim 1, wherein after distributing the target order data to the receiving object via a message queue, the method further comprises:
and deleting the request sequence information in the distributed lock, which is the same as the number information of the processed order, so as to release the distributed lock.
5. The method of claim 1, wherein the configuration data comprises field information and a data format; the acquiring target order data required by the receiving object based on the responsibility chain according to configuration data preset by a user through a visual interface comprises the following steps:
acquiring order data to be sent required by the receiving object based on a responsibility chain according to field information preset by a user through a visual interface;
and packaging the order data to be sent according to a data format preset by a user through a visual interface to obtain target order data.
6. The method of claim 1, further comprising:
when the distributed lock is not acquired, the order data is transferred to a queue to be processed through the message queue;
and polling the order data of the queue to be processed at regular time until the distributed lock is obtained.
7. The method of claim 1, wherein the message queue comprises a WINDQ message queue, and wherein the distributed lock is a redis distributed lock.
8. A data distribution apparatus, characterized in that the apparatus comprises:
the judging module is used for judging whether the distributed lock is acquired or not when the order data of the processed order is determined to be distributed to the receiving object;
the determining module is used for determining the distribution sequence of the order data of the processed order according to the request sequence information and the number information of the processed order, which are recorded in the distributed lock in advance, when the distributed lock is acquired;
the acquisition module is used for acquiring target order data required by the receiving object based on the responsibility chain according to configuration data preset by a user through a visual interface;
and the distribution module is used for distributing the target order data to the receiving object through a message queue according to the distribution sequence of the order data of the processed order.
9. A computer device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores computer instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A computer-readable storage medium having computer instructions stored thereon for causing a computer to perform the method of any one of claims 1 to 7.
CN202210646837.8A 2022-06-08 2022-06-08 Data distribution method, device, equipment and storage medium Pending CN115170152A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210646837.8A CN115170152A (en) 2022-06-08 2022-06-08 Data distribution method, device, equipment and storage medium
CA3202557A CA3202557A1 (en) 2022-06-08 2023-06-08 A data distribution method, apparatus, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210646837.8A CN115170152A (en) 2022-06-08 2022-06-08 Data distribution method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115170152A true CN115170152A (en) 2022-10-11

Family

ID=83485880

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210646837.8A Pending CN115170152A (en) 2022-06-08 2022-06-08 Data distribution method, device, equipment and storage medium

Country Status (2)

Country Link
CN (1) CN115170152A (en)
CA (1) CA3202557A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117541356A (en) * 2023-12-04 2024-02-09 广州方舟信息科技有限公司 Order execution method, system, electronic equipment and storage medium

Also Published As

Publication number Publication date
CA3202557A1 (en) 2023-08-11

Similar Documents

Publication Publication Date Title
CN111125057B (en) Method and device for processing service request and computer system
US12001450B2 (en) Distributed table storage processing method, device and system
CN110753084A (en) Uplink data reading method, cache server and computer readable storage medium
CN111338834B (en) Data storage method and device
CN112035405A (en) Document transcoding method and device, scheduling server and storage medium
CN111966653A (en) Data processing method, device, server and storage medium for micro-service call link
CN115170152A (en) Data distribution method, device, equipment and storage medium
CN110888972A (en) Sensitive content identification method and device based on Spark Streaming
CN112860412B (en) Service data processing method and device, electronic equipment and storage medium
CN113282589A (en) Data acquisition method and device
CN112650804A (en) Big data access method, device, system and storage medium
CN113760522A (en) Task processing method and device
CN113157405A (en) Method and device for retrying breakpoint of business process
CN111767126A (en) System and method for distributed batch processing
CN112445860A (en) Method and device for processing distributed transaction
CN112148705A (en) Data migration method and device
CN112540839B (en) Information changing method, device, electronic equipment and storage medium
CN111061576B (en) Method and system for creating entity object
CN110727694B (en) Data processing method, device, electronic equipment and storage medium
CN113986833A (en) File merging method, system, computer system and storage medium
CN108959405B (en) Strong consistency reading method of data and terminal equipment
CA3202557C (en) A data distribution method, apparatus, device and storage medium
CN113760487A (en) Service processing method and device
CN117472617B (en) Message processing method and device, electronic equipment and readable storage medium
CN112948430B (en) Date data query method and device

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