WO2019001256A1 - High-concurrency data processing method and apparatus, and computer readable storage medium - Google Patents

High-concurrency data processing method and apparatus, and computer readable storage medium Download PDF

Info

Publication number
WO2019001256A1
WO2019001256A1 PCT/CN2018/090692 CN2018090692W WO2019001256A1 WO 2019001256 A1 WO2019001256 A1 WO 2019001256A1 CN 2018090692 W CN2018090692 W CN 2018090692W WO 2019001256 A1 WO2019001256 A1 WO 2019001256A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
data processing
message queue
high concurrent
concurrent data
Prior art date
Application number
PCT/CN2018/090692
Other languages
French (fr)
Chinese (zh)
Inventor
刘四根
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019001256A1 publication Critical patent/WO2019001256A1/en

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/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • 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
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/56Queue scheduling implementing delay-aware scheduling
    • H04L47/562Attaching a time tag to queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources

Definitions

  • the present application relates to data processing technologies, and in particular, to a high concurrent data processing method, apparatus, and computer readable storage medium.
  • the present application provides a high concurrent data processing method, apparatus, and computer readable storage medium, the main purpose of which is to reduce the concurrent pressure of the server, thereby ensuring the availability and throughput of the application system.
  • the present application provides a high concurrent data processing method, which is applied to a data processing apparatus, and the method includes:
  • Receiving step receiving an access request sent by the client
  • Queue management step storing the received access request as a message to the message queue
  • the first processing step calling a preset number of threads to process the message in the message queue, reading the relevant data from the database, and feeding back the processing result to the client.
  • the present application also provides a high concurrent data processing method, which is applied to a data processing apparatus, and the method includes:
  • Receiving step receiving an access request sent by the client
  • Queue management step storing the received access request in a message manner to the message queue
  • Request merge step merge the same message in the message queue with the same access request to form multiple message groups
  • the second processing step calling a preset number of threads to process the plurality of message groups, reading related data from the database, and feeding back the processing result to the client.
  • the present application provides a high concurrent data processing apparatus, the apparatus comprising a memory, a processor, and a high concurrent data processing system stored on the memory and operable on the processor, the high concurrent data processing system
  • the method includes: a receiving module, a queue management module, and a first processing module.
  • Receiving step receiving an access request sent by the client
  • Queue management step storing the received access request as a message to the message queue
  • the first processing step calling a preset number of threads to process the message in the message queue, reading the relevant data from the database, and feeding back the processing result to the client.
  • the present application also provides a high concurrent data processing apparatus, the apparatus comprising a memory, a processor, and a high concurrent data processing system stored on the memory and operable on the processor, the high concurrent data processing system comprising : a receiving module, a queue management module, a request combining module, and a second processing module.
  • Receiving step receiving an access request sent by the client
  • Queue management step storing the received access request in a message manner to the message queue
  • Request merge step merge the same message in the message queue with the same access request to form multiple message groups
  • the second processing step calling a preset number of threads to process the plurality of message groups, reading related data from the database, and feeding back the processing result to the client.
  • the present application also provides a computer readable storage medium storing a high concurrent data processing system, the high concurrent data processing system being executable by at least one processor to implement the following steps:
  • Receiving step receiving an access request sent by the client
  • Queue management step storing the received access request as a message to the message queue
  • the first processing step invoking a preset number of threads to process the message in the message queue, reading the relevant data from the database, and feeding back the processing result to the client.
  • the application further provides a computer readable storage medium storing a high concurrent data processing system, the high concurrent data processing system being executable by at least one processor to implement the following steps:
  • Receiving step receiving an access request sent by the client
  • Queue management step storing the received access request in a message manner to the message queue
  • Request merge step merge the same message in the message queue with the same access request to form multiple message groups
  • the second processing step calling a preset number of threads to process the plurality of message groups, reading related data from the database, and feeding back the processing result to the client.
  • the high concurrent data processing method, apparatus and computer readable storage medium use an asynchronous queue to manage client data access requests, merge the same data access requests, and call a preset number.
  • the thread processes the message in the message queue, so that when the server receives a large amount of data access requests at the same time, the concurrent pressure of the server can be effectively reduced, the time for the end user to participate in the interface interaction is saved, and the computing resources of the server are fully utilized. Reduce the interaction between users under high load to ensure the availability and throughput of the application system.
  • FIG. 1 is a schematic diagram of a preferred embodiment of a high concurrent data processing apparatus of the present application.
  • FIG. 2 is a block diagram of a preferred embodiment of a high concurrent data processing system of the present application.
  • FIG. 3 is a block diagram of another preferred embodiment of the high concurrent data processing system of the present application.
  • FIG. 4 is a flow chart of a preferred embodiment of a high concurrent data processing method of the present application.
  • FIG. 5 is a flowchart of another preferred embodiment of a high concurrent data processing method of the present application.
  • FIG. 1 it is an exemplary diagram of a preferred embodiment of the high concurrent data processing apparatus 1 of the present application.
  • the high concurrent data processing apparatus 1 includes a memory 11, a processor 12, a communication bus 13, and a high concurrent data processing system 10 stored on the memory 11 and operable on the processor 12, the apparatus 1
  • the network 2 is connected to one or more clients 3 and is communicatively coupled to the database 4 via a communication bus 13.
  • the network 2 can be a network of a local area network, a wide area network, a metropolitan area network, etc., and can be a wired network or a wireless network.
  • the client 3 can be a desktop computer, a notebook, a tablet, a mobile phone, or other terminal device that can communicate with the device 1 via the network 2.
  • the processor 12 can be a Central Processing Unit (CPU), microprocessor or other data processing chip for running the high concurrent data processing system 10 stored in the memory 11, such as executing high concurrent data processing programs and the like.
  • CPU Central Processing Unit
  • microprocessor or other data processing chip for running the high concurrent data processing system 10 stored in the memory 11, such as executing high concurrent data processing programs and the like.
  • the memory 11 stores the program code of the high concurrent data processing system 10, the data of the client that issues the data request, such as customer identity information, account information, and data request information.
  • the memory 11 connected to the high concurrent data processing device 1 may be an internal storage unit of the terminal, such as a hard disk or a memory of the terminal, or may be a memory device independent of the aforementioned processor 12 connected through a network.
  • the memory 11 may include at least one type of storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), a static random access memory. (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • the processor 12 reads and executes the program code of the high concurrent data processing system 10 from the memory 11 to provide the following functions of the high concurrent data processing system 10.
  • Figure 1 shows only the high concurrent data processing device 1 with components 11-13 and a high concurrent data processing system, but it should be understood that not all illustrated components may be implemented, alternative implementations may be more or less s component.
  • FIG. 2 is a block diagram of a preferred embodiment of the high concurrent data processing system 10 of the present application.
  • the high concurrent data processing system 10 includes a receiving module 110, a queue management module 120, and a first processing module 130.
  • the receiving module 110 is configured to receive an access request sent by the client 3. For example, when a customer participates in an online online rushing activity of a merchant through the client 3, the receiving module 110 receives n snapping requests issued by the client.
  • the queue management module 120 is configured to store the received access request in a message manner to the message queue. For example, the queue management module 120 stores the n snap requests in chronological order and stores them in a message queue.
  • the first processing module 130 calls a preset number of threads to process the message in the message queue, reads the related data from the database 4, and feeds back the processing result to the client 3. For example, the first processing module 130 invokes a preset number of threads, processes the previous snap request in the message queue, reads the information of the snapped product from the database 4, and feeds the processing result back to the client. 3.
  • FIG. 3 is a block diagram of another preferred embodiment of the high concurrent data processing system 10 of the present application.
  • the high concurrent data processing system 10 includes:
  • the receiving module 110 is configured to receive an access request sent by the client 3. For example, when the customer participates in the online panning activity of a merchant through the client 3, the receiving module 110 receives n snap requests issued by the client.
  • the queue management module 120 is configured to store the received access request in a message manner to the message queue. For example, the queue management module 120 stores the n snap requests in chronological order and stores them in a message queue.
  • the request merge module 140 is configured to merge the same message in the message queue to form a plurality of message groups. For example, among the n snapping requests, there are 20 snapping requests to snap up product A, there are 10 snapping products B, and other snapping requests without the same request each constitute a message group, then the request combining module 140 snaps up the 20 pieces. The snap request of product A is merged into message group C, and the snap requests of the 10 snapped products B are merged into message group D. If the time of the first snap request in the message group C is earlier than the first snap request in any other message group, the message of the message group C will be processed in preference to the messages of other message groups.
  • the second processing module 150 is configured to invoke a preset number of threads to process the plurality of message groups, read related data from the database 4, and feed back the processing result to the client 3. For example, if the message group C is arranged at the head end of the message queue, the second processing module 150 calls a preset number of threads, extracts the information of the message group C for processing, and reads the snapped A from the database 4. The information of the product, and the processing result is fed back to all the clients 3 that issued the snap request.
  • FIG. 4 it is a flowchart of a preferred embodiment of the high concurrent data processing method of the present application.
  • the high concurrent data processing method includes the following steps:
  • Step S111 Receive a data access request sent by the client 3. For example, when a customer purchases a ticket through an application on the client 3 during the Spring Festival, the G6034 (Shenzhen-Yueyang) is taken as an example. When the ticketing time of the train is reached, the receiving module 110 instantaneously receives n ticket grab requests. When the client 3 makes a request, the client 3 interface displays "in queue".
  • Step S112 Store the received access request in a message manner to the message queue.
  • the queue management module 120 stores the n ticket rush requests in a chronological order in the form of a message to the message queue, wherein the information of each rushed train ticket represents a message in the message queue.
  • Step S113 Calling a preset number of threads to process the message in the message queue, reading the related data from the database 4, and feeding back the processing result to the client 3.
  • the first processing module 130 invokes a preset number of threads, processes the previous ticket rush request in the message queue, reads the remaining ticket information from the database 4, and feeds the processing result back to the client 3 .
  • FIG. 5 it is a flow chart of another preferred embodiment of the high concurrent data processing method of the present application.
  • the high concurrent data processing method includes the following steps:
  • Step S111 Receive a data access request sent by the client 3. For example, when a customer purchases a ticket on an APP through the client 3 during the Spring Festival, the G6034 (Shenzhen-Yueyang) is taken as an example. When the ticketing time of the train is reached, the receiving module 110 instantaneously receives n ticket grab requests. When the client 3 makes a request, the client 3 interface displays "in queue”.
  • Step S112 Store the received access request in a message manner to the message queue.
  • the queue management module 120 stores the n snap requests in chronological order and stores them in a message queue.
  • the queue management module 120 stores the n ticket rush requests in a chronological order in the form of a message to the message queue, wherein the information of each rushed train ticket represents a message in the message queue.
  • Step S114 Combine the messages with the same access request in the message queue to form a plurality of message groups. For example, among the n ticket rushing requests, 20 robbed requests to snap up the second-class seat of Shenzhen to Yueyang, and 10 rushed to buy the first-class seat of Shenzhen to Zhuzhou. Then, the request merging module 140 snapped the 20 pieces to Shenzhen.
  • the snap request to the second-class seat of Yueyang is merged into message group E, and the snap-up requests of 10 snapped products B are merged into message group F, and the other non-identical grab requests respectively form a message group, if the message group E is the first
  • the initiation time of the ticket rushing request is earlier than the initiation time of the first rush ticket request in any other message group, and the message in the message group E will be processed in preference to the messages of other message groups.
  • Step S115 Calling a preset number of threads to process the plurality of message groups, reading related data from the database 4, and feeding back the processing result to the client 3. For example, if the message group E is arranged at the head end of the message queue, the second processing module 150 calls a preset number of threads, extracts the information of the message group E for processing, and reads the remaining ticket information from the database 4. The processing result is fed back to all clients 3 that issued the snap request.
  • the application also includes a computer readable storage medium storing a high concurrent data processing system 10.
  • the high concurrent data processing system 10 is executed by at least one processor 12 to implement the following steps:
  • Step S111 Receive an access request sent by the client 3. For example, when a customer participates in an online online rushing activity of a merchant through the client 3, the receiving module 110 receives n snapping requests issued by the client.
  • Step S112 Store the received access request in a message manner to the message queue.
  • the queue management module 120 stores the n snap requests in chronological order and stores them in a message queue.
  • Step S113 Calling a preset number of threads to process the message, reading related data from the database 4, and feeding back the processing result to the client 3.
  • the first processing module 140 extracts and analyzes the key information of the first ticket rush request in the message queue, reads the remaining ticket information from the database 4, and feeds back the processing result to the client 3.
  • the high concurrent data processing system 10 is executed by at least one processor 12 to implement the following steps:
  • Step S111 Receive an access request sent by the client 3. For example, when a customer participates in an online online rushing activity of a merchant through the client 3, the receiving module 110 receives n snapping requests issued by the client.
  • Step S112 Store the received access request in a message manner to the message queue.
  • the queue management module 120 stores the n snap requests in chronological order and stores them in a message queue.
  • Step S114 Combine the messages with the same access request in the message queue to form a plurality of message groups. For example, among the n snapping requests, there are 20 snapping requests to snap up the product A, and 10 snapping the product B. Then, the merging module 140 merges the snapping requests of the 20 snapped products A into the message group C, the 10 The snap-up request for snapping up product B is merged into message group D. If the time of the first snap request in the message group C is earlier than the first snap request in the message group D, the message in the message group C will be processed in preference to the message of the message group D.
  • Step S115 Calling a preset number of threads to process the plurality of message groups, reading related data from the database 4, and feeding back the processing result to the client 3. For example, if the message group C is arranged at the head end of the message queue, the second processing module 150 extracts the key information of the message group C for processing, and reads the information of the snapped A product from the database 4, and feedback. To all clients 3 that issued the snap request.

Abstract

The present application provides a high-concurrency data processing method, which is applied to a data processing apparatus. The high-concurrency data processing method comprises the following steps: receiving an access request sent by a client; storing the received access request into a message queue in a message manner; and processing messages in the message queue by invoking a preset quantity of threads, reading related data from a database, and feeding back the processing result to the client. When a server receives a great quantity of data access requests at the same time, the concurrent pressure of the server can be effectively reduced, and the availability and the throughput of an application system are ensured. The present application also provides a high-concurrency data processing apparatus and a computer readable storage medium.

Description

高并发数据处理方法、装置及计算机可读存储介质High concurrent data processing method, device and computer readable storage medium
本申请要求于2017年6月25日提交中国专利局,申请号为201710490374.X、发明名称为“高并发数据处理方法、装置及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to Chinese Patent Application No. 201710490374.X, entitled "High Concurrency Data Processing Method, Apparatus, and Computer Readable Storage Medium", which is filed on June 25, 2017, the entire disclosure of which is incorporated herein by reference. The content is incorporated herein by reference.
技术领域Technical field
本申请涉及数据处理技术,尤其涉及一种高并发数据处理方法、装置及计算机可读存储介质。The present application relates to data processing technologies, and in particular, to a high concurrent data processing method, apparatus, and computer readable storage medium.
背景技术Background technique
随着信息化的逐步广泛和深入,出现多用户并发操作数据的情况越来越多,例如,网络购票,购物等,尤其是春运抢票或者限时抢购等业务,当到达开售时间,服务器接收到的用户请求访问量过大,会造成服务器线程堵塞、数据库异常等待事件等,用户请求迟迟得不到响应,甚至出现整个系统崩溃的情况。因此,需要一种高并发数据处理方法、装置及计算机可读存储介质,能够降低服务器的并发压力,从而保证应用系统的可用性和吞吐量。With the gradual wide-ranging and in-depth informationization, there are more and more cases of multi-user concurrent operation data, for example, online ticket purchase, shopping, etc., especially the Spring Festival ticket grab or time-limited snap-up business, when the sales time is reached, the server If the received user requests are too large, it will cause server thread congestion, database abnormal wait events, etc., the user request will not get a response, and even the entire system crashes. Therefore, there is a need for a highly concurrent data processing method, apparatus, and computer readable storage medium that can reduce the concurrency pressure of a server, thereby ensuring the availability and throughput of the application system.
发明内容Summary of the invention
本申请提供一种高并发数据处理方法、装置及计算机可读存储介质,其主要目的在于降低服务器的并发压力,从而保证应用系统的可用性和吞吐量。The present application provides a high concurrent data processing method, apparatus, and computer readable storage medium, the main purpose of which is to reduce the concurrent pressure of the server, thereby ensuring the availability and throughput of the application system.
为实现上述目的,本申请提供一种高并发数据处理方法,应用于一种数据处理装置,该方法包括:To achieve the above objective, the present application provides a high concurrent data processing method, which is applied to a data processing apparatus, and the method includes:
接收步骤:接收客户端发送的访问请求;Receiving step: receiving an access request sent by the client;
队列管理步骤:将接收到的访问请求以消息方式存储至消息队列;及Queue management step: storing the received access request as a message to the message queue; and
第一处理步骤:调用预设数量的线程对消息队列中的消息进行处理,从数据库读取相关数据,并将处理结果反馈至客户端。The first processing step: calling a preset number of threads to process the message in the message queue, reading the relevant data from the database, and feeding back the processing result to the client.
本申请还提供一种高并发数据处理方法,应用于一种数据处理装置,该方法包括:The present application also provides a high concurrent data processing method, which is applied to a data processing apparatus, and the method includes:
接收步骤:接收客户端发送的访问请求;Receiving step: receiving an access request sent by the client;
队列管理步骤:将接收到的访问请求以消息方式存储至消息队列;Queue management step: storing the received access request in a message manner to the message queue;
请求合并步骤:将消息队列中访问请求相同的消息进行合并,形成多个消息组;及Request merge step: merge the same message in the message queue with the same access request to form multiple message groups;
第二处理步骤:调用预设数量的线程对该多个消息组进行处理,从数据库读取相关数据,并将处理结果反馈至客户端。The second processing step: calling a preset number of threads to process the plurality of message groups, reading related data from the database, and feeding back the processing result to the client.
另外,本申请提供一种高并发数据处理装置,所述装置包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的高并发数据处理系统,该高并发数据处理系统包括:接收模块、队列管理模块及第一处理模块。In addition, the present application provides a high concurrent data processing apparatus, the apparatus comprising a memory, a processor, and a high concurrent data processing system stored on the memory and operable on the processor, the high concurrent data processing system The method includes: a receiving module, a queue management module, and a first processing module.
所述处理器执行所述高并发数据处理系统时,可实现如下步骤:When the processor executes the high concurrent data processing system, the following steps can be implemented:
接收步骤:接收客户端发送的访问请求;Receiving step: receiving an access request sent by the client;
队列管理步骤:将接收到的访问请求以消息方式存储至消息队列;及Queue management step: storing the received access request as a message to the message queue; and
第一处理步骤:调用预设数量的线程对消息队列中的消息进行处理,从数据库读取相关数据,并将处理结果反馈至客户端。The first processing step: calling a preset number of threads to process the message in the message queue, reading the relevant data from the database, and feeding back the processing result to the client.
本申请还提供一种高并发数据处理装置,所述装置包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的高并发数据处理系统,该高并发数据处理系统包括:接收模块、队列管理模块、请求合并模块及第二处理模块。The present application also provides a high concurrent data processing apparatus, the apparatus comprising a memory, a processor, and a high concurrent data processing system stored on the memory and operable on the processor, the high concurrent data processing system comprising : a receiving module, a queue management module, a request combining module, and a second processing module.
所述处理器执行所述高并发数据处理系统时,可实现如下步骤:When the processor executes the high concurrent data processing system, the following steps can be implemented:
接收步骤:接收客户端发送的访问请求;Receiving step: receiving an access request sent by the client;
队列管理步骤:将接收到的访问请求以消息方式存储至消息队列;Queue management step: storing the received access request in a message manner to the message queue;
请求合并步骤:将消息队列中访问请求相同的消息进行合并,形成多个消息组;及Request merge step: merge the same message in the message queue with the same access request to form multiple message groups;
第二处理步骤:调用预设数量的线程对该多个消息组进行处理,从数据库读取相关数据,并将处理结果反馈至客户端。The second processing step: calling a preset number of threads to process the plurality of message groups, reading related data from the database, and feeding back the processing result to the client.
此外,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有高并发数据处理系统,所述高并发数据处理系统可被至少一个处理器执行,以实现以下步骤:Moreover, the present application also provides a computer readable storage medium storing a high concurrent data processing system, the high concurrent data processing system being executable by at least one processor to implement the following steps:
接收步骤:接收客户端发送的访问请求;Receiving step: receiving an access request sent by the client;
队列管理步骤:将接收到的访问请求以消息方式存储至消息队列;及Queue management step: storing the received access request as a message to the message queue; and
第一处理步骤:调用预设数量的线程对消息队列中的消息进行处理,从 数据库读取相关数据,并将处理结果反馈至客户端。The first processing step: invoking a preset number of threads to process the message in the message queue, reading the relevant data from the database, and feeding back the processing result to the client.
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有高并发数据处理系统,所述高并发数据处理系统可被至少一个处理器执行,以实现以下步骤:The application further provides a computer readable storage medium storing a high concurrent data processing system, the high concurrent data processing system being executable by at least one processor to implement the following steps:
接收步骤:接收客户端发送的访问请求;Receiving step: receiving an access request sent by the client;
队列管理步骤:将接收到的访问请求以消息方式存储至消息队列;Queue management step: storing the received access request in a message manner to the message queue;
请求合并步骤:将消息队列中访问请求相同的消息进行合并,形成多个消息组;及Request merge step: merge the same message in the message queue with the same access request to form multiple message groups;
第二处理步骤:调用预设数量的线程对该多个消息组进行处理,从数据库读取相关数据,并将处理结果反馈至客户端。The second processing step: calling a preset number of threads to process the plurality of message groups, reading related data from the database, and feeding back the processing result to the client.
相较现有技术,本申请提供的高并发数据处理方法、装置及计算机可读存储介质,使用异步队列对客户端数据访问请求进行管理,对相同的数据访问请求进行合并,调用预设数量的线程对消息队列中的消息进行处理,从而在服务器同时收到的数据访问请求量大的情况下,可以有效降低服务器的并发压力,节省最终用户参与界面交互的时间,充分利用服务器端的运算资源,降低高负载下用户之间的相互影响,保证应用系统的可用性和吞吐量。Compared with the prior art, the high concurrent data processing method, apparatus and computer readable storage medium provided by the present application use an asynchronous queue to manage client data access requests, merge the same data access requests, and call a preset number. The thread processes the message in the message queue, so that when the server receives a large amount of data access requests at the same time, the concurrent pressure of the server can be effectively reduced, the time for the end user to participate in the interface interaction is saved, and the computing resources of the server are fully utilized. Reduce the interaction between users under high load to ensure the availability and throughput of the application system.
附图说明DRAWINGS
图1为本申请高并发数据处理装置较佳实施例的示意图。1 is a schematic diagram of a preferred embodiment of a high concurrent data processing apparatus of the present application.
图2为本申请高并发数据处理系统较佳实施例的模块图。2 is a block diagram of a preferred embodiment of a high concurrent data processing system of the present application.
图3为本申请高并发数据处理系统另一较佳实施例的模块图。3 is a block diagram of another preferred embodiment of the high concurrent data processing system of the present application.
图4为本申请高并发数据处理方法较佳实施例的流程图。4 is a flow chart of a preferred embodiment of a high concurrent data processing method of the present application.
图5为本申请高并发数据处理方法另一较佳实施例的流程图。FIG. 5 is a flowchart of another preferred embodiment of a high concurrent data processing method of the present application.
附图标记:Reference mark:
11 高并发数据处理装置High concurrent data processing device
22 网络The internet
33 客户端Client
44 数据库database
1111 存储器Memory
1212 处理器processor
1313 通信总线 Communication bus
1010 高并发数据处理系统High concurrent data processing system
110110 接收模块Receiving module
120120 队列管理模块Queue management module
130130 第一处理模块First processing module
140140 请求合并模块Request merge module
150150 第二处理模块Second processing module
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
如图1所示,是本申请高并发数据处理装置1较佳实施例的示例图。As shown in FIG. 1, it is an exemplary diagram of a preferred embodiment of the high concurrent data processing apparatus 1 of the present application.
所述高并发数据处理装置1包括:存储器11、处理器12、通信总线13及存储在所述存储器11上并可在所述处理器12上运行的高并发数据处理系统10,该装置1通过网络2连接一个或多个客户端3,通过通信总线13与数据库4通信连接。The high concurrent data processing apparatus 1 includes a memory 11, a processor 12, a communication bus 13, and a high concurrent data processing system 10 stored on the memory 11 and operable on the processor 12, the apparatus 1 The network 2 is connected to one or more clients 3 and is communicatively coupled to the database 4 via a communication bus 13.
网络2可以为局域网,广域网,城域网等等类型的网络,可以为有线网络,也可以为无线网络。The network 2 can be a network of a local area network, a wide area network, a metropolitan area network, etc., and can be a wired network or a wireless network.
客户端3可以为桌上型计算机、笔记本、平板电脑、手机,或其它可以通过网络2与装置1进行通信的终端装置。The client 3 can be a desktop computer, a notebook, a tablet, a mobile phone, or other terminal device that can communicate with the device 1 via the network 2.
处理器12可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行存储器11中存储的高并发数据处理系统10,例如执行高并发数据处理程序等。The processor 12 can be a Central Processing Unit (CPU), microprocessor or other data processing chip for running the high concurrent data processing system 10 stored in the memory 11, such as executing high concurrent data processing programs and the like.
存储器11存储高并发数据处理系统10的程序代码,发出数据请求的客户的资料,例如客户身份信息、账号信息及数据请求信息等资料。该高并发数据处理装置1连接的存储器11可以是终端的内部存储单元,例如终端的硬盘或者内存,也可以是通过网络连接的独立于前述处理器12的存储器设备。The memory 11 stores the program code of the high concurrent data processing system 10, the data of the client that issues the data request, such as customer identity information, account information, and data request information. The memory 11 connected to the high concurrent data processing device 1 may be an internal storage unit of the terminal, such as a hard disk or a memory of the terminal, or may be a memory device independent of the aforementioned processor 12 connected through a network.
该存储器11可以包括至少一种类型的存储介质,所述存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等等。处理器12从存储器11读取并执行高并发数据处理系统10的程序代码,提供高并发数据处理系统10的下述功能。The memory 11 may include at least one type of storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), a static random access memory. (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like. The processor 12 reads and executes the program code of the high concurrent data processing system 10 from the memory 11 to provide the following functions of the high concurrent data processing system 10.
图1仅示出了具有组件11-13以及高并发数据处理系统的高并发数据处理装置1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。Figure 1 shows only the high concurrent data processing device 1 with components 11-13 and a high concurrent data processing system, but it should be understood that not all illustrated components may be implemented, alternative implementations may be more or less s component.
如图2所示,是本申请高并发数据处理系统10较佳实施例的模块图。2 is a block diagram of a preferred embodiment of the high concurrent data processing system 10 of the present application.
在本实施例中,所述高并发数据处理系统10包括:接收模块110、队列管理模块120及第一处理模块130。In the embodiment, the high concurrent data processing system 10 includes a receiving module 110, a queue management module 120, and a first processing module 130.
接收模块110,用于接收客户端3发送的访问请求。例如,当客户通过客户端3参加某商家的线上抢购活动,活动开始时,所述接收模块110接收客户发出的n条抢购请求。The receiving module 110 is configured to receive an access request sent by the client 3. For example, when a customer participates in an online online rushing activity of a merchant through the client 3, the receiving module 110 receives n snapping requests issued by the client.
队列管理模块120,用于将接收到的访问请求以消息方式存储至消息队列。例如,所述队列管理模块120将该n条抢购请求按时间先后顺序,以消息的形式存储至消息队列。The queue management module 120 is configured to store the received access request in a message manner to the message queue. For example, the queue management module 120 stores the n snap requests in chronological order and stores them in a message queue.
第一处理模块130,调用预设数量的线程对消息队列中的消息进行处理,从数据库4读取相关数据,并将处理结果反馈至客户端3。例如,所述第一处理模块130调用预设数量的线程,对该消息队列中的靠前的抢购请求进行处理,从数据库4中读取被抢购产品的信息,并将处理结果反馈至客户端3。The first processing module 130 calls a preset number of threads to process the message in the message queue, reads the related data from the database 4, and feeds back the processing result to the client 3. For example, the first processing module 130 invokes a preset number of threads, processes the previous snap request in the message queue, reads the information of the snapped product from the database 4, and feeds the processing result back to the client. 3.
如图3所示,是本申请高并发数据处理系统10另一个较佳实施例的模块图。3 is a block diagram of another preferred embodiment of the high concurrent data processing system 10 of the present application.
在本实施例中,所述高并发数据处理系统10包括:In this embodiment, the high concurrent data processing system 10 includes:
接收模块110,用于接收客户端3发送的访问请求。例如,当客户通过客 户端3参加某商家的线上抢购活动,活动开始时,所述接收模块110接收客户发出的n条抢购请求。The receiving module 110 is configured to receive an access request sent by the client 3. For example, when the customer participates in the online panning activity of a merchant through the client 3, the receiving module 110 receives n snap requests issued by the client.
队列管理模块120,用于将接收到的访问请求以消息方式存储至消息队列。例如,所述队列管理模块120将该n条抢购请求按时间先后顺序,以消息的形式存储至消息队列。The queue management module 120 is configured to store the received access request in a message manner to the message queue. For example, the queue management module 120 stores the n snap requests in chronological order and stores them in a message queue.
请求合并模块140,用于将消息队列中访问请求相同的消息进行合并,形成多个消息组。例如,n条抢购请求中,有20条抢购请求抢购产品A,有10条抢购产品B,其他无相同请求的抢购请求各自组成一消息组,那么,所述请求合并模块140将该20条抢购产品A的抢购请求合并成消息组C,该10条抢购产品B的抢购请求合并成消息组D。其中,若消息组C中第一条抢购请求的时间早于其他任一消息组中的第一条抢购请求,则消息组C的消息将优先于其他消息组的消息进行处理。The request merge module 140 is configured to merge the same message in the message queue to form a plurality of message groups. For example, among the n snapping requests, there are 20 snapping requests to snap up product A, there are 10 snapping products B, and other snapping requests without the same request each constitute a message group, then the request combining module 140 snaps up the 20 pieces. The snap request of product A is merged into message group C, and the snap requests of the 10 snapped products B are merged into message group D. If the time of the first snap request in the message group C is earlier than the first snap request in any other message group, the message of the message group C will be processed in preference to the messages of other message groups.
第二处理模块150,用于调用预设数量的线程对该多个消息组进行处理,从数据库4读取相关数据,并将处理结果反馈至客户端3。例如,假设消息组C排列于该消息队列的首端,那么所述第二处理模块150调用预设数量的线程,提取该消息组C的信息进行处理,从数据库4中读取该被抢购A产品的信息,并将处理结果反馈至发出该抢购请求的所有客户端3。The second processing module 150 is configured to invoke a preset number of threads to process the plurality of message groups, read related data from the database 4, and feed back the processing result to the client 3. For example, if the message group C is arranged at the head end of the message queue, the second processing module 150 calls a preset number of threads, extracts the information of the message group C for processing, and reads the snapped A from the database 4. The information of the product, and the processing result is fed back to all the clients 3 that issued the snap request.
如图4所示,是本申请高并发数据处理方法较佳实施例的流程图。As shown in FIG. 4, it is a flowchart of a preferred embodiment of the high concurrent data processing method of the present application.
在本实施例中,所述高并发数据处理方法包括以下步骤:In this embodiment, the high concurrent data processing method includes the following steps:
步骤S111、接收客户端3发送的数据访问请求。例如,当客户春运期间通过客户端3某APP上进行网络购票,以G6034(深圳-岳阳)为例。当到达该趟列车的售票时间时,所述接收模块110瞬间接收到n条抢票请求。当客户端3发出请求后,客户端3界面显示“正在排队中”。Step S111: Receive a data access request sent by the client 3. For example, when a customer purchases a ticket through an application on the client 3 during the Spring Festival, the G6034 (Shenzhen-Yueyang) is taken as an example. When the ticketing time of the train is reached, the receiving module 110 instantaneously receives n ticket grab requests. When the client 3 makes a request, the client 3 interface displays "in queue".
步骤S112、将接收到的访问请求以消息方式存储至消息队列。例如,所述队列管理模块120将该n条抢票请求按时间先后顺序,以消息的形式存储至消息队列,其中,每抢一张火车票的信息都代表消息队列中的一条消息。Step S112: Store the received access request in a message manner to the message queue. For example, the queue management module 120 stores the n ticket rush requests in a chronological order in the form of a message to the message queue, wherein the information of each rushed train ticket represents a message in the message queue.
步骤S113、调用预设数量的线程对消息队列中的消息进行处理,从数据库4读取相关数据,并将处理结果反馈至客户端3。例如,所述第一处理模块130调用预设数量的线程,对该消息队列中的靠前的抢票请求进行处理,从数据库4中读取余票信息,并将处理结果反馈至客户端3。Step S113: Calling a preset number of threads to process the message in the message queue, reading the related data from the database 4, and feeding back the processing result to the client 3. For example, the first processing module 130 invokes a preset number of threads, processes the previous ticket rush request in the message queue, reads the remaining ticket information from the database 4, and feeds the processing result back to the client 3 .
如图5所示,是本申请高并发数据处理方法另一个较佳实施例的流程图。As shown in FIG. 5, it is a flow chart of another preferred embodiment of the high concurrent data processing method of the present application.
在本实施例中,所述高并发数据处理方法包括以下步骤:In this embodiment, the high concurrent data processing method includes the following steps:
步骤S111、接收客户端3发送的数据访问请求。例如,当客户春运期间通过客户端3在某APP上进行网络购票,以G6034(深圳-岳阳)为例。当到达该趟列车的售票时间时,所述接收模块110瞬间接收到n条抢票请求。当客户端3发出请求后,客户端3界面显示“正在排队中”。Step S111: Receive a data access request sent by the client 3. For example, when a customer purchases a ticket on an APP through the client 3 during the Spring Festival, the G6034 (Shenzhen-Yueyang) is taken as an example. When the ticketing time of the train is reached, the receiving module 110 instantaneously receives n ticket grab requests. When the client 3 makes a request, the client 3 interface displays "in queue".
步骤S112、将接收到的访问请求以消息方式存储至消息队列。例如,所述队列管理模块120将该n条抢购请求按时间先后顺序,以消息的形式存储至消息队列。例如,所述队列管理模块120将该n条抢票请求按时间先后顺序,以消息的形式存储至消息队列,其中,每抢一张火车票的信息都代表消息队列中的一条消息。Step S112: Store the received access request in a message manner to the message queue. For example, the queue management module 120 stores the n snap requests in chronological order and stores them in a message queue. For example, the queue management module 120 stores the n ticket rush requests in a chronological order in the form of a message to the message queue, wherein the information of each rushed train ticket represents a message in the message queue.
步骤S114、将消息队列中访问请求相同的消息进行合并,形成多个消息组。例如,n条抢票请求中,有20条抢票请求抢购深圳到岳阳的二等座,有10条抢购深圳到株洲的一等座,那么,所述请求合并模块140将该20条抢购深圳到岳阳的二等座的抢购请求合并成消息组E,将10条抢购产品B的抢购请求合并成消息组F,其他无相同的抢票请求各自组成一消息组,若消息组E中第一条抢票请求的发起时间早于其他任一消息组中的第一条抢票请求的发起时间,则消息组E中的消息将优先于其他消息组的消息进行处理。Step S114: Combine the messages with the same access request in the message queue to form a plurality of message groups. For example, among the n ticket rushing requests, 20 robbed requests to snap up the second-class seat of Shenzhen to Yueyang, and 10 rushed to buy the first-class seat of Shenzhen to Zhuzhou. Then, the request merging module 140 snapped the 20 pieces to Shenzhen. The snap request to the second-class seat of Yueyang is merged into message group E, and the snap-up requests of 10 snapped products B are merged into message group F, and the other non-identical grab requests respectively form a message group, if the message group E is the first The initiation time of the ticket rushing request is earlier than the initiation time of the first rush ticket request in any other message group, and the message in the message group E will be processed in preference to the messages of other message groups.
步骤S115、调用预设数量的线程对该多个消息组进行处理,从数据库4读取相关数据,并将处理结果反馈至客户端3。例如,假设消息组E排列于该消息队列的首端,那么所述第二处理模块150调用预设数量的线程,提取该消息组E的信息进行处理,从数据库4中读取余票信息,并将处理结果反馈至发出该抢购请求的所有客户端3。Step S115: Calling a preset number of threads to process the plurality of message groups, reading related data from the database 4, and feeding back the processing result to the client 3. For example, if the message group E is arranged at the head end of the message queue, the second processing module 150 calls a preset number of threads, extracts the information of the message group E for processing, and reads the remaining ticket information from the database 4. The processing result is fed back to all clients 3 that issued the snap request.
此外,本申请还包括一种计算机可读存储介质,该计算机可读存储介质存储有高并发数据处理系统10。Moreover, the application also includes a computer readable storage medium storing a high concurrent data processing system 10.
在本实施例中,该高并发数据处理系统10被至少一个处理器12执行,以实现以下步骤:In the present embodiment, the high concurrent data processing system 10 is executed by at least one processor 12 to implement the following steps:
步骤S111、接收客户端3发送的访问请求。例如,当客户通过客户端3参加某商家的线上抢购活动,活动开始时,所述接收模块110接收客户发出的n条抢购请求。Step S111: Receive an access request sent by the client 3. For example, when a customer participates in an online online rushing activity of a merchant through the client 3, the receiving module 110 receives n snapping requests issued by the client.
步骤S112、将接收到的访问请求以消息方式存储至消息队列。例如,所述队列管理模块120将该n条抢购请求按时间先后顺序,以消息的形式存储至消息队列。Step S112: Store the received access request in a message manner to the message queue. For example, the queue management module 120 stores the n snap requests in chronological order and stores them in a message queue.
步骤S113、调用预设数量的线程对该条消息进行处理,从数据库4读取相关数据,并将处理结果反馈至客户端3。例如,所述第一处理模块140提取该消息队列中的第一条抢票请求的关键信息并进行分析,从数据库4中读取余票信息,并将处理结果反馈至客户端3。Step S113: Calling a preset number of threads to process the message, reading related data from the database 4, and feeding back the processing result to the client 3. For example, the first processing module 140 extracts and analyzes the key information of the first ticket rush request in the message queue, reads the remaining ticket information from the database 4, and feeds back the processing result to the client 3.
在另一个较佳实施例中,该高并发数据处理系统10被至少一个处理器12执行,以实现以下步骤:In another preferred embodiment, the high concurrent data processing system 10 is executed by at least one processor 12 to implement the following steps:
步骤S111、接收客户端3发送的访问请求。例如,当客户通过客户端3参加某商家的线上抢购活动,活动开始时,所述接收模块110接收客户发出的n条抢购请求。Step S111: Receive an access request sent by the client 3. For example, when a customer participates in an online online rushing activity of a merchant through the client 3, the receiving module 110 receives n snapping requests issued by the client.
步骤S112、将接收到的访问请求以消息方式存储至消息队列。例如,所述队列管理模块120将该n条抢购请求按时间先后顺序,以消息的形式存储至消息队列。Step S112: Store the received access request in a message manner to the message queue. For example, the queue management module 120 stores the n snap requests in chronological order and stores them in a message queue.
步骤S114、将消息队列中访问请求相同的消息进行合并,形成多个消息组。例如,n条抢购请求中,有20条抢购请求抢购产品A,有10条抢购产品B,那么,所述合并模块140将该20条抢购产品A的抢购请求合并成消息组C,该10条抢购产品B的抢购请求合并成消息组D。其中,若消息组C中第一条抢购请求的时间早于消息组D中的第一条抢购请求,则消息组C中的消息将优先于消息组D的消息进行处理。Step S114: Combine the messages with the same access request in the message queue to form a plurality of message groups. For example, among the n snapping requests, there are 20 snapping requests to snap up the product A, and 10 snapping the product B. Then, the merging module 140 merges the snapping requests of the 20 snapped products A into the message group C, the 10 The snap-up request for snapping up product B is merged into message group D. If the time of the first snap request in the message group C is earlier than the first snap request in the message group D, the message in the message group C will be processed in preference to the message of the message group D.
步骤S115、调用预设数量的线程对该多个消息组进行处理,从数据库4读取相关数据,并将处理结果反馈至客户端3。例如,假设消息组C排列于该消息队列的首端,那么,所述第二处理模块150提取该消息组C的关键信息进行处理,从数据库4中读取被该抢购A产品的信息,反馈至发出该抢购请求的所有客户端3。Step S115: Calling a preset number of threads to process the plurality of message groups, reading related data from the database 4, and feeding back the processing result to the client 3. For example, if the message group C is arranged at the head end of the message queue, the second processing module 150 extracts the key information of the message group C for processing, and reads the information of the snapped A product from the database 4, and feedback. To all clients 3 that issued the snap request.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括 为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes those elements. It also includes other elements that are not explicitly listed, or elements that are inherent to such a process, method, article, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
本实施方式中提到的“一个实施例”、“另一个实施例”可以为相同的实施例,也可以为不同的实施例。The "one embodiment" and "another embodiment" mentioned in the embodiment may be the same embodiment or different embodiments.
最后所应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to be limiting, although the present application is described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technology of the present application can be applied. Modifications or equivalents are made without departing from the spirit and scope of the technical solutions of the present application.

Claims (20)

  1. 一种高并发数据处理方法,应用于一种数据处理装置,其特征在于,该方法包括:A high concurrent data processing method is applied to a data processing device, the method comprising:
    接收步骤:接收客户端发送的访问请求;Receiving step: receiving an access request sent by the client;
    队列管理步骤:将接收到的访问请求以消息方式存储至消息队列;及Queue management step: storing the received access request as a message to the message queue; and
    第一处理步骤:调用预设数量的线程对消息队列中的消息进行处理,从数据库读取相关数据,并将处理结果反馈至客户端。The first processing step: calling a preset number of threads to process the message in the message queue, reading the relevant data from the database, and feeding back the processing result to the client.
  2. 如权利要求1所述的高并发数据处理方法,其特征在于,所述消息队列中的消息是按照时间先后顺序存储的。The high concurrent data processing method according to claim 1, wherein the messages in the message queue are stored in chronological order.
  3. 如权利要求1所述的高并发数据处理方法,其特征在于,所述第一处理步骤对消息队列中的消息进行处理遵循先进先出的顺序。The high concurrent data processing method according to claim 1, wherein said first processing step processes the messages in the message queue in a first in first out order.
  4. 如权利要求2所述的高并发数据处理方法,其特征在于,所述第一处理步骤对消息队列中的消息进行处理遵循先进先出的顺序。The high concurrent data processing method according to claim 2, wherein said first processing step processes the messages in the message queue in a first in first out order.
  5. 一种高并发数据处理方法,应用于一种数据处理装置,其特征在于,该方法包括:A high concurrent data processing method is applied to a data processing device, the method comprising:
    接收步骤:接收客户端发送的访问请求;Receiving step: receiving an access request sent by the client;
    队列管理步骤:将接收到的访问请求以消息方式存储至消息队列;Queue management step: storing the received access request in a message manner to the message queue;
    请求合并步骤:将消息队列中访问请求相同的消息进行合并,形成多个消息组;及Request merge step: merge the same message in the message queue with the same access request to form multiple message groups;
    第二处理步骤:调用预设数量的线程对该多个消息组进行处理,从数据库读取相关数据,并将处理结果反馈至客户端。The second processing step: calling a preset number of threads to process the plurality of message groups, reading related data from the database, and feeding back the processing result to the client.
  6. 如权利要求5所述的高并发数据处理方法,其特征在于,所述消息队列中的消息是按照时间先后顺序存储的。The high concurrent data processing method according to claim 5, wherein the messages in the message queue are stored in chronological order.
  7. 如权利要求5所述的高并发数据处理方法,其特征在于,所述第二处理步骤对消息队列中的消息进行处理遵循先进先出的顺序。The high concurrent data processing method according to claim 5, wherein said second processing step processes the messages in the message queue in a first in first out order.
  8. 如权利要求6所述的高并发数据处理方法,其特征在于,所述第二处理步骤对消息队列中的消息进行处理遵循先进先出的顺序。The high concurrent data processing method according to claim 6, wherein said second processing step processes the messages in the message queue in a first in first out order.
  9. 一种高并发数据处理装置,其特征在于,所述装置包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的高并发数据处理系统, 所述处理器执行所述高并发数据处理系统时,可实现如下步骤:A high concurrent data processing apparatus, comprising: a memory, a processor, and a high concurrent data processing system stored on the memory and operative on the processor, the processor executing the When a concurrent data processing system is high, the following steps can be implemented:
    接收步骤:接收客户端发送的访问请求;Receiving step: receiving an access request sent by the client;
    队列管理步骤:将接收到的访问请求以消息方式存储至消息队列;及Queue management step: storing the received access request as a message to the message queue; and
    第一处理步骤:调用预设数量的线程对消息队列中的消息进行处理,从数据库读取相关数据,并将处理结果反馈至客户端。The first processing step: calling a preset number of threads to process the message in the message queue, reading the relevant data from the database, and feeding back the processing result to the client.
  10. 如权利要求9所述的高并发数据处理装置,其特征在于,所述消息队列中的消息是按照时间先后顺序存储的。The high concurrent data processing apparatus according to claim 9, wherein the messages in the message queue are stored in chronological order.
  11. 如权利要求9所述的高并发数据处理装置,其特征在于,所述第一处理步骤对消息队列中的消息进行处理遵循先进先出的顺序。The high concurrent data processing apparatus according to claim 9, wherein said first processing step processes the messages in the message queue in a first in first out order.
  12. 如权利要求10所述的高并发数据处理装置,其特征在于,所述第一处理步骤对消息队列中的消息进行处理遵循先进先出的顺序。The high concurrent data processing apparatus according to claim 10, wherein said first processing step processes the messages in the message queue in a first in first out order.
  13. 一种高并发数据处理装置,其特征在于,所述装置包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的高并发数据处理系统,所述处理器执行所述高并发数据处理系统时,可实现如下步骤:A high concurrent data processing apparatus, comprising: a memory, a processor, and a high concurrent data processing system stored on the memory and operative on the processor, the processor executing the When a concurrent data processing system is high, the following steps can be implemented:
    接收步骤:接收客户端发送的访问请求;Receiving step: receiving an access request sent by the client;
    队列管理步骤:将接收到的访问请求以消息方式存储至消息队列;Queue management step: storing the received access request in a message manner to the message queue;
    请求合并步骤:将消息队列中访问请求相同的消息进行合并,形成多个消息组;及Request merge step: merge the same message in the message queue with the same access request to form multiple message groups;
    第二处理步骤:调用预设数量的线程对该多个消息组进行处理,从数据库读取相关数据,并将处理结果反馈至客户端。The second processing step: calling a preset number of threads to process the plurality of message groups, reading related data from the database, and feeding back the processing result to the client.
  14. 如权利要求13所述的高并发数据处理装置,其特征在于,所述消息队列中的消息是按照时间先后顺序存储的。The high concurrent data processing apparatus according to claim 13, wherein the messages in the message queue are stored in chronological order.
  15. 如权利要求13所述的高并发数据处理装置,其特征在于,所述第二处理步骤对消息队列中的消息进行处理遵循先进先出的顺序。The high concurrent data processing apparatus according to claim 13, wherein said second processing step processes the messages in the message queue in a first in first out order.
  16. 如权利要求14所述的高并发数据处理装置,其特征在于,所述第二处理步骤对消息队列中的消息进行处理遵循先进先出的顺序。The high concurrent data processing apparatus of claim 14 wherein said second processing step processes the messages in the message queue in a first in first out order.
  17. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有高并发数据处理系统,所述高并发数据处理系统可被至少一个处理器执行,以实现以下步骤:A computer readable storage medium, characterized in that the computer readable storage medium stores a high concurrent data processing system, the high concurrent data processing system being executable by at least one processor to implement the following steps:
    接收步骤:接收客户端发送的访问请求;Receiving step: receiving an access request sent by the client;
    队列管理步骤:将接收到的访问请求以消息方式存储至消息队列;及Queue management step: storing the received access request as a message to the message queue; and
    第一处理步骤:调用预设数量的线程对消息队列中的消息进行处理,从数据库读取相关数据,并将处理结果反馈至客户端。The first processing step: calling a preset number of threads to process the message in the message queue, reading the relevant data from the database, and feeding back the processing result to the client.
  18. 如权利要求17所述的计算机可读存储介质,其特征在于,所述消息队列中的消息是按照时间先后顺序存储的,所述第一处理步骤对消息队列中的消息进行处理遵循先进先出的顺序。The computer readable storage medium according to claim 17, wherein the messages in the message queue are stored in chronological order, and the first processing step processes the messages in the message queue to comply with the first in first out order of.
  19. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有高并发数据处理系统,所述高并发数据处理系统可被至少一个处理器执行,以实现以下步骤:A computer readable storage medium, characterized in that the computer readable storage medium stores a high concurrent data processing system, the high concurrent data processing system being executable by at least one processor to implement the following steps:
    接收步骤:接收客户端发送的访问请求;Receiving step: receiving an access request sent by the client;
    队列管理步骤:将接收到的访问请求以消息方式存储至消息队列;Queue management step: storing the received access request in a message manner to the message queue;
    请求合并步骤:将消息队列中访问请求相同的消息进行合并,形成多个消息组;及Request merge step: merge the same message in the message queue with the same access request to form multiple message groups;
    第二处理步骤:调用预设数量的线程对该多个消息组进行处理,从数据库读取相关数据,并将处理结果反馈至客户端。The second processing step: calling a preset number of threads to process the plurality of message groups, reading related data from the database, and feeding back the processing result to the client.
  20. 如权利要求19所述的计算机可读存储介质,其特征在于,所述消息队列中的消息是按照时间先后顺序存储的,所述第二处理步骤对消息队列中的消息进行处理遵循先进先出的顺序。The computer readable storage medium of claim 19, wherein the messages in the message queue are stored in chronological order, and the second processing step processes the messages in the message queue to follow a first in first out order of.
PCT/CN2018/090692 2017-06-25 2018-06-11 High-concurrency data processing method and apparatus, and computer readable storage medium WO2019001256A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710490374.X 2017-06-25
CN201710490374.XA CN107872398A (en) 2017-06-25 2017-06-25 High concurrent data processing method, device and computer-readable recording medium

Publications (1)

Publication Number Publication Date
WO2019001256A1 true WO2019001256A1 (en) 2019-01-03

Family

ID=61762164

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/090692 WO2019001256A1 (en) 2017-06-25 2018-06-11 High-concurrency data processing method and apparatus, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN107872398A (en)
WO (1) WO2019001256A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069217A (en) * 2019-04-10 2019-07-30 新华三信息安全技术有限公司 A kind of date storage method and device
CN110740103A (en) * 2019-09-02 2020-01-31 深圳壹账通智能科技有限公司 Service request processing method and device, computer equipment and storage medium
CN110888704A (en) * 2019-11-08 2020-03-17 北京浪潮数据技术有限公司 High-concurrency interface processing method, device, equipment and storage medium
CN111831458A (en) * 2020-06-11 2020-10-27 武汉烽火技术服务有限公司 High-concurrency high-decoupling data processing method and data center system
CN111984433A (en) * 2020-07-31 2020-11-24 五八有限公司 Business data processing method, display method, device, electronic equipment and medium
CN113259229A (en) * 2020-02-13 2021-08-13 阿里巴巴集团控股有限公司 Data processing method and device and gateway equipment
CN113703947A (en) * 2021-09-01 2021-11-26 上海漫酷网络技术有限公司 Distributed task processing system, method, computer equipment and storage medium
CN114006946A (en) * 2021-10-29 2022-02-01 中国平安人寿保险股份有限公司 Method, device and equipment for processing homogeneous resource request and storage medium
CN115348220A (en) * 2022-08-25 2022-11-15 中国银行股份有限公司 Access request transmission method and device
CN115629890A (en) * 2022-10-27 2023-01-20 圣名科技(广州)有限责任公司 Sensor data acquisition method and device and electronic equipment

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107872398A (en) * 2017-06-25 2018-04-03 平安科技(深圳)有限公司 High concurrent data processing method, device and computer-readable recording medium
CN110505257A (en) * 2018-05-17 2019-11-26 北京国双科技有限公司 Request message processing method and processing device
CN109102402A (en) * 2018-07-26 2018-12-28 阿里巴巴集团控股有限公司 A kind of monitoring method of transaction risk, device and system
CN109510864B (en) * 2018-09-29 2022-07-19 网宿科技股份有限公司 Forwarding method, transmission method and related device of cache request
CN109617974B (en) * 2018-12-21 2021-12-28 珠海金山办公软件有限公司 Request processing method and device and server
CN110134531A (en) * 2019-05-06 2019-08-16 广州华多网络科技有限公司 Processing method, device and the computer equipment of fictitious assets circulation data
CN112019689A (en) * 2019-05-29 2020-12-01 北京奇虎科技有限公司 Incoming call show service processing system and method
CN112688982B (en) * 2019-10-18 2024-04-16 北京京东振世信息技术有限公司 User request processing method and device
CN111124702B (en) * 2019-11-22 2023-03-21 腾讯科技(深圳)有限公司 Performance data acquisition method, device and computer readable storage medium
CN112104731B (en) * 2020-09-11 2022-05-20 北京奇艺世纪科技有限公司 Request processing method and device, electronic equipment and storage medium
CN112422404B (en) * 2020-10-19 2022-08-19 上海哔哩哔哩科技有限公司 Message processing method and system
CN113691611B (en) * 2021-08-23 2022-11-22 湖南大学 Block chain distributed high-concurrency transaction processing method, system, equipment and storage medium
CN113722078A (en) * 2021-11-02 2021-11-30 西安热工研究院有限公司 High-concurrency database access method, system and equipment based on thread pool
CN114221885A (en) * 2021-12-07 2022-03-22 深圳市链融科技股份有限公司 Message asynchronous processing method and device, computer equipment and storage medium
CN116048819A (en) * 2023-03-30 2023-05-02 杭州西软计算机工程有限公司 High concurrency data storage method and system
CN116595099A (en) * 2023-05-22 2023-08-15 北京言子初科技有限公司 Asynchronous processing method and device for high concurrency data

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0849921A2 (en) * 1996-12-20 1998-06-24 International Business Machines Corporation Apparatus and method for dispatching client method calls within a server computer system
US20070168764A1 (en) * 2005-12-14 2007-07-19 Business Objects Apparatus and method for persistent report serving
CN101452555A (en) * 2008-12-31 2009-06-10 中国建设银行股份有限公司 Method for enquiring personal credit information, system and personal credit enquiring system
CN102394867A (en) * 2011-10-10 2012-03-28 深圳市金槌拍卖行有限公司 Technology for converting network concurrent communication request into tandem queue
CN103197968A (en) * 2013-03-18 2013-07-10 焦点科技股份有限公司 Thread pool processing method and system capable of fusing synchronous and asynchronous features
CN103218455A (en) * 2013-05-07 2013-07-24 中国人民解放军国防科学技术大学 Method of high-speed concurrent processing of user requests of Key-Value database
US20150212794A1 (en) * 2011-09-22 2015-07-30 Oracle International Corporation System and method for supporting a lazy sorting priority queue in a computing environment
CN105183549A (en) * 2015-08-27 2015-12-23 携程计算机技术(上海)有限公司 Automatic ticketing system based on task assignment
CN107341050A (en) * 2016-04-28 2017-11-10 北京京东尚科信息技术有限公司 Service processing method and device based on dynamic thread pool
CN107679931A (en) * 2017-08-17 2018-02-09 平安科技(深圳)有限公司 Method, apparatus, storage medium and the terminal of order asynchronous process
CN107872398A (en) * 2017-06-25 2018-04-03 平安科技(深圳)有限公司 High concurrent data processing method, device and computer-readable recording medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0849921A2 (en) * 1996-12-20 1998-06-24 International Business Machines Corporation Apparatus and method for dispatching client method calls within a server computer system
US20070168764A1 (en) * 2005-12-14 2007-07-19 Business Objects Apparatus and method for persistent report serving
CN101452555A (en) * 2008-12-31 2009-06-10 中国建设银行股份有限公司 Method for enquiring personal credit information, system and personal credit enquiring system
US20150212794A1 (en) * 2011-09-22 2015-07-30 Oracle International Corporation System and method for supporting a lazy sorting priority queue in a computing environment
CN102394867A (en) * 2011-10-10 2012-03-28 深圳市金槌拍卖行有限公司 Technology for converting network concurrent communication request into tandem queue
CN103197968A (en) * 2013-03-18 2013-07-10 焦点科技股份有限公司 Thread pool processing method and system capable of fusing synchronous and asynchronous features
CN103218455A (en) * 2013-05-07 2013-07-24 中国人民解放军国防科学技术大学 Method of high-speed concurrent processing of user requests of Key-Value database
CN105183549A (en) * 2015-08-27 2015-12-23 携程计算机技术(上海)有限公司 Automatic ticketing system based on task assignment
CN107341050A (en) * 2016-04-28 2017-11-10 北京京东尚科信息技术有限公司 Service processing method and device based on dynamic thread pool
CN107872398A (en) * 2017-06-25 2018-04-03 平安科技(深圳)有限公司 High concurrent data processing method, device and computer-readable recording medium
CN107679931A (en) * 2017-08-17 2018-02-09 平安科技(深圳)有限公司 Method, apparatus, storage medium and the terminal of order asynchronous process

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069217A (en) * 2019-04-10 2019-07-30 新华三信息安全技术有限公司 A kind of date storage method and device
CN110740103A (en) * 2019-09-02 2020-01-31 深圳壹账通智能科技有限公司 Service request processing method and device, computer equipment and storage medium
CN110888704A (en) * 2019-11-08 2020-03-17 北京浪潮数据技术有限公司 High-concurrency interface processing method, device, equipment and storage medium
CN113259229A (en) * 2020-02-13 2021-08-13 阿里巴巴集团控股有限公司 Data processing method and device and gateway equipment
CN111831458A (en) * 2020-06-11 2020-10-27 武汉烽火技术服务有限公司 High-concurrency high-decoupling data processing method and data center system
CN111831458B (en) * 2020-06-11 2024-04-26 武汉烽火技术服务有限公司 High-concurrency high-decoupling data processing method and data center system
CN111984433A (en) * 2020-07-31 2020-11-24 五八有限公司 Business data processing method, display method, device, electronic equipment and medium
CN113703947A (en) * 2021-09-01 2021-11-26 上海漫酷网络技术有限公司 Distributed task processing system, method, computer equipment and storage medium
CN114006946A (en) * 2021-10-29 2022-02-01 中国平安人寿保险股份有限公司 Method, device and equipment for processing homogeneous resource request and storage medium
CN114006946B (en) * 2021-10-29 2023-08-29 中国平安人寿保险股份有限公司 Method, device, equipment and storage medium for processing homogeneous resource request
CN115348220A (en) * 2022-08-25 2022-11-15 中国银行股份有限公司 Access request transmission method and device
CN115629890A (en) * 2022-10-27 2023-01-20 圣名科技(广州)有限责任公司 Sensor data acquisition method and device and electronic equipment

Also Published As

Publication number Publication date
CN107872398A (en) 2018-04-03

Similar Documents

Publication Publication Date Title
WO2019001256A1 (en) High-concurrency data processing method and apparatus, and computer readable storage medium
CN109344183B (en) Data interaction method and device, computer equipment and storage medium
US11689422B1 (en) Standby instances for auto-scaling groups
US8818940B2 (en) Systems and methods for performing record actions in a multi-tenant database and application system
WO2019205371A1 (en) Server, message allocation method, and storage medium
US7680848B2 (en) Reliable and scalable multi-tenant asynchronous processing
CN108090058B (en) High-concurrency activity interaction method
WO2019080415A1 (en) Client incoming call assignment method and system, computer device and storage medium
CN111045806A (en) Method and system for realizing delay message queue
CN107911406B (en) Network-based task flow method, equipment and storage medium
US10657537B2 (en) Systems and methods for asynchronous processing of events within networks
CN110851248A (en) Asynchronous task data processing method and device and computer readable storage medium
CN110795479A (en) Method and device for distributed ETL scheduling based on data
CN111930786B (en) Resource acquisition request processing system, method and device
WO2019080416A1 (en) Customer incoming call allocation method and system, computer device and storage medium
CN107239325B (en) Document data processing method and device
CN110716800A (en) Task scheduling method and device, storage medium and electronic equipment
CN112991064B (en) Service processing method, device, computer equipment and storage medium
CN113095936A (en) Entrusted order processing method, entrusted order processing device, computer equipment and storage medium
JP2017049730A (en) Notification program, notification method and notification system
US20170139808A1 (en) Method and dispatcher node for server processing management
US9292364B1 (en) Packaging application data and logic for offline support
CN108429780B (en) Data calling system and method between associated systems
WO2019169696A1 (en) Platform client data backflow method, electronic apparatus, device, and storage medium
US10979359B1 (en) Polling resource management system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18825528

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 23/06/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18825528

Country of ref document: EP

Kind code of ref document: A1