CN112084217A - Data processing method and related device - Google Patents

Data processing method and related device Download PDF

Info

Publication number
CN112084217A
CN112084217A CN202010981825.1A CN202010981825A CN112084217A CN 112084217 A CN112084217 A CN 112084217A CN 202010981825 A CN202010981825 A CN 202010981825A CN 112084217 A CN112084217 A CN 112084217A
Authority
CN
China
Prior art keywords
target
user
acquisition request
object acquisition
value
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
CN202010981825.1A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010981825.1A priority Critical patent/CN112084217A/en
Publication of CN112084217A publication Critical patent/CN112084217A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24539Query rewriting; Transformation using cached or materialised query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • 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
    • 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)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a data processing method and a related device, aiming at a scene of high-concurrency target object acquisition, if an object acquisition request aiming at the target object is acquired, the object acquisition request is written into a message queue in a cache space. When the object acquisition request can be processed, the object acquisition request is taken out from the message queue, so that the asynchronous processing of the object acquisition request is realized. Therefore, the effect of peak clipping and valley filling is realized, and the impact on the database is reduced. Besides the high concurrency of the object acquisition requests in the peak period, a large number of content query requests can also appear in a correlated manner, and the processing result aiming at the object acquisition requests is cached in the cache space, so that the content-based query result can be directly searched in the cache space. And the extra data interaction with the database for storing the processing result is not needed any more, so that the access amount to the database is reduced, the database is effectively protected in a peak period, and the query response efficiency is improved.

Description

一种数据处理方法和相关装置A data processing method and related device

技术领域technical field

本申请涉及数据处理领域,特别是涉及一种数据处理方法和相关装置。The present application relates to the field of data processing, and in particular, to a data processing method and related apparatus.

背景技术Background technique

随着互联网技术的发展,用户可以便捷的通过互联网平台获取自身所需的对象,该对象可以是产品、虚拟物品、服务等。With the development of Internet technology, users can easily obtain the objects they need through the Internet platform, and the objects can be products, virtual items, services, etc.

在一些场景下,会有海量用户对某些对象产生强烈的获取需求,例如特定的公共环境问题时,特定对象非常流行时。在这种情况下,提供这类对象的互联网平台会在短时间内获取大量针对这类对象的用户请求,这种高并发的情况非常容易导致互联网平台的服务器宕机。In some scenarios, there will be a large number of users who have a strong demand for certain objects, such as when a specific public environment problem or when a specific object is very popular. In this case, an Internet platform that provides such objects will obtain a large number of user requests for such objects in a short period of time, and this high concurrency situation can easily lead to server downtime of the Internet platform.

由此可见,如何应对高并发情况是互联网平台亟需解决的问题。It can be seen that how to deal with high concurrency is an urgent problem for Internet platforms to solve.

发明内容SUMMARY OF THE INVENTION

为了解决上述技术问题,本申请提供了一种数据处理方法和相关装置,用于应对互联网平台的高并发情况。In order to solve the above technical problems, the present application provides a data processing method and related apparatus, which are used to deal with the high concurrency situation of the Internet platform.

本申请实施例公开了如下技术方案:The embodiments of the present application disclose the following technical solutions:

一方面,本申请实施例提供了一种数据处理方法,所述方法包括:On the one hand, an embodiment of the present application provides a data processing method, the method comprising:

获取针对目标对象的对象获取请求;Get the object acquisition request for the target object;

将所述对象获取请求写入处于缓存空间中的消息队列;writing the object acquisition request into the message queue in the cache space;

从所述消息队列中取出所述对象获取请求进行对应处理,将得到的处理结果缓存在所述缓存空间中;Take out the object acquisition request from the message queue for corresponding processing, and cache the obtained processing result in the cache space;

根据针对所述目标对象的内容查询请求,在所述缓存空间中查询目标处理结果。According to the content query request for the target object, query the target processing result in the cache space.

另一方面,本申请实施例提供了一种数据处理装置,所述装置包括获取单元、写入单元、第一处理单元和第二处理单元:On the other hand, an embodiment of the present application provides a data processing apparatus, the apparatus includes an acquisition unit, a writing unit, a first processing unit, and a second processing unit:

所述获取单元,用于获取针对目标对象的对象获取请求;The obtaining unit is used to obtain an object obtaining request for the target object;

所述写入单元,用于将所述对象获取请求写入处于缓存空间中的消息队列;the writing unit, configured to write the object acquisition request into a message queue in the cache space;

所述第一处理单元,用于从所述消息队列中取出所述对象获取请求进行对应处理,将得到的处理结果缓存在所述缓存空间中;The first processing unit is configured to take out the object acquisition request from the message queue for corresponding processing, and cache the obtained processing result in the cache space;

所述第二处理单元,用于根据针对所述目标对象的内容查询请求,在所述缓存空间中查询目标处理结果。The second processing unit is configured to query the cache space for the target processing result according to the content query request for the target object.

另一方面,本申请实施例提供了一种用于数据处理的设备,所述设备包括处理器以及存储器:On the other hand, an embodiment of the present application provides a device for data processing, the device includes a processor and a memory:

所述存储器用于存储程序代码,并将所述程序代码传输给所述处理器;the memory is used to store program code and transmit the program code to the processor;

所述处理器用于根据所述程序代码中的指令执行上述方面所述的方法。The processor is configured to execute the method described in the above aspects according to the instructions in the program code.

另一方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序,所述计算机程序用于执行上述方面所述的方法。On the other hand, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method described in the foregoing aspects.

另一方面,本申请实施例提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方面所述的方法。On the other hand, an embodiment of the present application provides a computer program product or computer program, where the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method described in the above aspects.

由上述技术方案可以看出,针对高并发获取目标对象的场景,若获取针对目标对象的对象获取请求,并不同步进行是否提供目标对象的处理,而是将对象获取请求写入处于缓存空间中的消息队列中。在可以处理时再从消息队列中取出该对象获取请求,从而实现了对该对象获取请求的异步处理。由此即使在接收对象获取请求的高峰期也可以通过该异步处理机制实现了削峰的效果,降低对数据库的冲击,而且即使在高峰期后接收的对象获取请求骤减,也可以继续处理消息队列中留存的对象获取请求,实现了填谷的作用。在高峰期除了对象获取请求会出现高并发的情况外,海量的内容查询请求也会关联出现,通过将针对对象获取请求的处理结果缓存在缓存空间中,可以在基于内容查询结果直接在缓存空间查找。而不再需要和保存处理结果的数据库进行额外的数据交互,减少了对数据库的访问量,从而在高峰期有效保护了数据库,并提高了查询响应效率。It can be seen from the above technical solutions that, in the scenario of acquiring the target object with high concurrency, if an object acquisition request for the target object is acquired, the processing of whether to provide the target object is not performed synchronously, but the object acquisition request is written in the cache space. in the message queue. The object acquisition request is taken out from the message queue when it can be processed, thereby realizing asynchronous processing of the object acquisition request. Therefore, even in the peak period of receiving object acquisition requests, the asynchronous processing mechanism can achieve the effect of peak shaving, reduce the impact on the database, and even if the received object acquisition requests drop sharply after the peak period, messages can continue to be processed The object acquisition request retained in the queue realizes the role of filling the valley. In addition to the high concurrency of object acquisition requests during peak periods, a large number of content query requests will also appear in association. By caching the processing results of object acquisition requests in the cache space, the content-based query results can be directly stored in the cache space. Find. There is no need for additional data interaction with the database that saves the processing results, which reduces the amount of access to the database, thus effectively protecting the database during peak periods and improving query response efficiency.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1为本申请实施例提供的一种数据处理方法的场景示意图;1 is a schematic diagram of a scenario of a data processing method provided by an embodiment of the present application;

图2为本申请实施例提供的一种数据处理方法的流程图;2 is a flowchart of a data processing method provided by an embodiment of the present application;

图3为本申请实施例提供的一种服务器分层架构图;FIG. 3 is a diagram of a layered architecture of a server provided by an embodiment of the present application;

图4为本申请实施例提供的一种第一模式的示意图;4 is a schematic diagram of a first mode provided by an embodiment of the present application;

图5为本申请实施例提供的一种第一模式的方法流程图;5 is a flowchart of a method in a first mode provided by an embodiment of the present application;

图6为本申请实施例提供的一种第一模式的方法流程图;6 is a flowchart of a method in a first mode provided by an embodiment of the present application;

图7为本申请实时例提供的一种摇号方式的示意图;7 is a schematic diagram of a lottery method provided by the real-time example of this application;

图8为本申请实时例提供的一种摇号方式的示意图;8 is a schematic diagram of a lottery method provided by a real-time example of this application;

图9为本申请实时例提供的一种摇号方式的示意图;9 is a schematic diagram of a lottery method provided by a real-time example of this application;

图10为本申请实施例提供的一种切换模式的示意图;10 is a schematic diagram of a switching mode provided by an embodiment of the present application;

图11为本申请实施例提供的一种通过小程序购买口罩的流程图;11 is a flowchart of purchasing a mask through a small program provided by the embodiment of the application;

图12为本申请实施例提供的一种小程序页面的示意图;12 is a schematic diagram of a small program page provided by an embodiment of the present application;

图13为本申请实施例提供的一种小程序页面的示意图;13 is a schematic diagram of a small program page provided by an embodiment of the present application;

图14为本申请实施例提供的一种数据处理方法的流程图;14 is a flowchart of a data processing method provided by an embodiment of the present application;

图15为本申请实施例提供的一种小程序页面的示意图;15 is a schematic diagram of a small program page provided by an embodiment of the present application;

图16为本申请实施例提供的一种小程序页面的示意图;16 is a schematic diagram of a small program page provided by an embodiment of the present application;

图17为本申请实施例提供的一种小程序页面的示意图;17 is a schematic diagram of a small program page provided by an embodiment of the present application;

图18为本申请实施例提供的一种小程序页面的示意图;18 is a schematic diagram of a small program page provided by an embodiment of the present application;

图19为本申请实施例提供的一种小程序页面的示意图;19 is a schematic diagram of a small program page provided by an embodiment of the present application;

图20为本申请实施例提供的一种小程序页面的示意图;20 is a schematic diagram of a small program page provided by an embodiment of the present application;

图21为本申请实施例提供的一种小程序页面的示意图;21 is a schematic diagram of a small program page provided by an embodiment of the present application;

图22为本申请实施例提供的一种小程序页面的示意图;22 is a schematic diagram of a small program page provided by an embodiment of the present application;

图23为本申请实施例提供的一种抢购模式的流程示意图;FIG. 23 is a schematic flowchart of a snap-purchase mode provided by an embodiment of the present application;

图24为本申请实施例提供的一种摇号模式的流程示意图;24 is a schematic flowchart of a lottery mode provided by an embodiment of the present application;

图25为本申请实施例提供的一种数据处理装置的示意图;FIG. 25 is a schematic diagram of a data processing apparatus provided by an embodiment of the present application;

图26为本申请实施例提供的服务器的结构示意图;FIG. 26 is a schematic structural diagram of a server provided by an embodiment of the present application;

图27为本申请实施例提供的终端设备的结构示意图。FIG. 27 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.

具体实施方式Detailed ways

下面结合附图,对本申请的实施例进行描述。The embodiments of the present application will be described below with reference to the accompanying drawings.

互联网技术的发展为人们的生活提供了便利,用户可以通过互联网平台获取自身所需的对象,例如衣服、游戏装备、文章润色服务等。但是,在一些如疫情期间抢购口罩、流行商品秒杀、抢票等高并发场景下,对应的互联网平台不仅在短时间内有大量的用户针对目标对象的对象获取请求,用户还会在短时间内多次访问对应的互联网平台以获取目标对象相关联的内容查询结果,从而导致高并发的原因多元化。The development of Internet technology has provided convenience for people's lives, and users can obtain the objects they need through the Internet platform, such as clothes, game equipment, and article editing services. However, in some high-concurrency scenarios such as rushing to buy masks during the epidemic, flash sales of popular commodities, and rushing tickets, the corresponding Internet platforms not only have a large number of users' object acquisition requests for target objects in a short period of time, but also users in a short period of time. Multiple access to the corresponding Internet platform to obtain the content query results associated with the target object, resulting in multiple causes of high concurrency.

为了解决上述技术问题,本申请提供一种数据处理方法,不仅能够基于消息队列异步处理大量的用户针对目标对象的获取请求,还能够将对应的处理结果缓存在缓存空间中,以便用户可以从缓存空间中直接获取对应的处理结果,减少访问数据库的次数,从而应对高并发原因多元化的目标对象获取场景。In order to solve the above technical problems, the present application provides a data processing method, which can not only asynchronously process a large number of user acquisition requests for a target object based on a message queue, but also cache the corresponding processing results in the cache space, so that users can access the cache from the cache. The corresponding processing results are directly obtained in the space, reducing the number of database accesses, so as to cope with the target object acquisition scenarios with diversified high concurrency reasons.

本申请实施例提供的数据处理方法可以应用于具有数据处理能力的处理设备上,例如可以是具有数据处理功能的终端设备或服务器。该方法可以通过终端设备或服务器独立执行,也可以应用于终端设备和服务器通信的网络场景,通过终端设备和服务器配合执行。其中,终端设备可以为智能手机、笔记本电脑、台式电脑、个人数字助理(PersonalDigital Assistant,简称PDA)、平板电脑等设备。服务器可以理解为是应用服务器,也可以为Web服务器,在实际部署时,该服务器可以为独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云计算服务的云服务器。终端以及服务器可以通过有线或无线通信方式进行直接或间接地连接,本申请在此不做限制。The data processing method provided in the embodiment of the present application may be applied to a processing device with data processing capability, for example, may be a terminal device or a server with data processing function. The method can be independently executed by a terminal device or a server, and can also be applied to a network scenario in which the terminal device and the server communicate, and the terminal device and the server can cooperate to execute. The terminal device may be a smart phone, a notebook computer, a desktop computer, a personal digital assistant (Personal Digital Assistant, PDA for short), a tablet computer and other devices. The server can be understood as an application server or a web server. In actual deployment, the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud computing server. service cloud server. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited in this application.

此外,本申请提供的技术方案还涉及到云技术领域,如云计算、数据库等领域。In addition, the technical solutions provided in this application also relate to the field of cloud technology, such as cloud computing, database and other fields.

云计算(cloud computing)指IT基础设施的交付和使用模式,指通过网络以按需、易扩展的方式获得所需资源;广义云计算指服务的交付和使用模式,指通过网络以按需、易扩展的方式获得所需服务。这种服务可以是IT和软件、互联网相关,也可是其他服务。云计算是网格计算(Grid Computing)、分布式计算(DistributedComputing)、并行计算(Parallel Computing)、效用计算(Utility Computing)、网络存储(Network StorageTechnologies)、虚拟化(Virtualization)、负载均衡(Load Balance)等传统计算机和网络技术发展融合的产物。Cloud computing refers to the delivery and use mode of IT infrastructure, which refers to obtaining the required resources in an on-demand and easy-to-expand way through the network; cloud computing in a broad sense refers to the delivery and use mode of services, which refers to the on-demand, Get the services you need in an easily scalable way. Such services can be IT and software, Internet-related, or other services. Cloud computing is Grid Computing, Distributed Computing, Parallel Computing, Utility Computing, Network Storage Technologies, Virtualization, Load Balance ) and other products of the integration of traditional computer and network technology development.

随着互联网、实时数据流、连接设备多样化的发展,以及搜索服务、社会网络、移动商务和开放协作等需求的推动,云计算迅速发展起来。不同于以往的并行分布式计算,云计算的产生从理念上将推动整个互联网模式、企业管理模式发生革命性的变革。Cloud computing has grown rapidly with the development of the Internet, real-time data streaming, the diversity of connected devices, and the need for search services, social networking, mobile commerce, and open collaboration. Different from the parallel distributed computing in the past, the emergence of cloud computing will promote revolutionary changes in the entire Internet model and enterprise management model.

数据库(Database),简而言之可视为电子化的文件柜——存储电子文件的处所,用户可以对文件中的数据进行新增、查询、更新、删除等操作。所谓“数据库”是以一定方式储存在一起、能与多个用户共享、具有尽可能小的冗余度、与应用程序彼此独立的数据集合。Database, in short, can be regarded as an electronic filing cabinet—a place where electronic files are stored, and users can perform operations such as adding, querying, updating, and deleting data in the files. The so-called "database" is a collection of data that is stored together in a certain way, can be shared with multiple users, has as little redundancy as possible, and is independent of applications.

数据库管理系统(英语:Database Management System,简称DBMS)是为管理数据库而设计的电脑软件系统,一般具有存储、截取、安全保障、备份等基础功能。数据库管理系统可以依据它所支持的数据库模型来作分类,例如关系式、XML(Extensible MarkupLanguage,即可扩展标记语言);或依据所支持的计算机类型来作分类,例如服务器群集、移动电话;或依据所用查询语言来作分类,例如SQL(结构化查询语言(Structured QueryLanguage)、XQuery;或依据性能冲量重点来作分类,例如最大规模、最高运行速度;亦或其他的分类方式。不论使用哪种分类方式,一些DBMS能够跨类别,例如,同时支持多种查询语言。Database management system (English: Database Management System, referred to as DBMS) is a computer software system designed for database management, generally with basic functions such as storage, interception, security, backup and so on. A database management system can be classified according to the database model it supports, such as relational, XML (Extensible Markup Language); or according to the type of computer it supports, such as server clusters, mobile phones; or Classify according to the query language used, such as SQL (Structured QueryLanguage), XQuery; or classify according to the focus of performance impulse, such as the largest scale, the highest running speed; or other classification methods. No matter which one is used Categorically, some DBMSs are able to cross-category, for example, simultaneously support multiple query languages.

在本申请实施例中,通过云计算技术获取、处理对象获取请求和内容查询请求等,通过数据库存储对应的处理结果。In the embodiments of the present application, the cloud computing technology is used to acquire and process object acquisition requests and content query requests, and the corresponding processing results are stored in a database.

为了便于理解本申请的技术方案,下面将结合实际应用场景,对本申请实施例提供的数据处理方法进行介绍。In order to facilitate the understanding of the technical solutions of the present application, the data processing methods provided by the embodiments of the present application will be introduced below in combination with actual application scenarios.

参见图1,图1为本申请实施例提供的一种数据处理方法的场景示意图。该实际应用场景可以为大量的用户通过电子设备抢购口罩的场景。其中,电子设备可以是智能手机、平板电脑、笔记本电脑、台式电脑等设备。在该场景中,前述处理设备为服务器110,服务器110可以是内容分发网络(Content Delivery Network,CDN)服务器。Referring to FIG. 1 , FIG. 1 is a schematic diagram of a scenario of a data processing method provided by an embodiment of the present application. This practical application scenario can be a scenario in which a large number of users snap up masks through electronic devices. The electronic device may be a smartphone, a tablet computer, a notebook computer, a desktop computer, or other devices. In this scenario, the aforementioned processing device is the server 110, and the server 110 may be a content delivery network (Content Delivery Network, CDN) server.

服务器110中至少包括前端服务进程111、配置有消息队列的缓存空间112、后端服务进程113和数据库114。其中,前端服务进程111用于与电子设备交互,后端服务进程113用于与数据库114交互,缓存空间112用于连接前端服务进程111和后端服务进程113。示例地,在本申请实施例中以两个用户表征大量用户对抢购口罩的场景进行说明。其中,用户A通过智能手机121抢购口罩,用户B通过智能手机122抢购口罩。The server 110 at least includes a front-end service process 111 , a buffer space 112 configured with a message queue, a back-end service process 113 and a database 114 . The front-end service process 111 is used to interact with the electronic device, the back-end service process 113 is used to interact with the database 114 , and the cache space 112 is used to connect the front-end service process 111 and the back-end service process 113 . For example, in the embodiment of the present application, two users are used to represent a large number of users to describe the scene of panic buying of masks. Among them, user A purchases masks through smartphone 121 , and user B purchases masks through smartphone 122 .

当服务器110的前端服务进程111在获取智能手机121和智能手机122发送针对口罩的对象获取请求后,不会立即处理对象获取请求,而是分别将用户A的对象获取请求I和用户B的对象获取请求II写入到处于缓存空间112的消息队列中。后端服务进程113可以从消息队列中按照一定机制,如先进先出的机制分别取出对象获取请求I和对象获取请求II,并分别对应处理对象获取请求I和对象获取请求II,使得后端服务进程113可以在能力范围之内分批处理不同用户通过电子设备发送的对象获取请求,即异步处理大量的对象获取请求。When the front-end service process 111 of the server 110 sends the object acquisition request for the mask after acquiring the smart phone 121 and the smart phone 122, it will not process the object acquisition request immediately, but will obtain the object acquisition request I of user A and the object of user B respectively. The get request II is written to the message queue in the buffer space 112 . The back-end service process 113 can take out the object acquisition request I and the object acquisition request II respectively from the message queue according to a certain mechanism, such as the first-in-first-out mechanism, and respectively process the object acquisition request I and the object acquisition request II, so that the back-end service The process 113 can batch process the object acquisition requests sent by different users through the electronic device within the scope of its capability, that is, asynchronously process a large number of object acquisition requests.

由此,可以在对象获取请求的高峰期通过异步处理机制实现了削峰的效果,在后续对象获取请求的低谷期继续对高峰期未处理的对象获取请求进行处理,实现了填谷的效果,从而可以降低服务器110的处理压力,提高服务器110的响应速度。同时,通过缓存空间112还可以解耦前端服务进程111和后端服务进程113,便于前端服务进程111和后端服务进程113的独立维护。In this way, the effect of peak shaving can be achieved through the asynchronous processing mechanism during the peak period of object acquisition requests, and the object acquisition requests that have not been processed during the peak period can continue to be processed during the trough period of subsequent object acquisition requests, thereby realizing the effect of filling the valley. Therefore, the processing pressure of the server 110 can be reduced, and the response speed of the server 110 can be improved. At the same time, the front-end service process 111 and the back-end service process 113 can be decoupled through the cache space 112 , which facilitates the independent maintenance of the front-end service process 111 and the back-end service process 113 .

用户不仅通过电子设备向服务器110发送针对口罩的对象获取请求,还会通过电子设备向服务器110发送口罩的内容查询请求,例如查询口罩是否抢购成功等。同一个用户会在短时间内多次通过电子设备访问服务器110,当用户数量急剧增多时,即大量的电子设备在短时间内多次访问服务器110时,服务器110的访问数量在短时间内会呈几何级数增长,导致服务器110宕机。也就是说,高并发的原因不仅与用户的数量急剧增多有关,还与用户在短时间内多次访问互联网平台有关。The user not only sends the object acquisition request for the mask to the server 110 through the electronic device, but also sends the content query request of the mask to the server 110 through the electronic device, for example, to check whether the mask has been successfully purchased. The same user may access the server 110 through electronic devices multiple times in a short period of time. When the number of users increases sharply, that is, when a large number of electronic devices access the server 110 multiple times in a short period of time, the number of accesses to the server 110 will be increased in a short period of time. It grows exponentially, causing server 110 to go down. That is to say, the reason for high concurrency is not only related to the sharp increase in the number of users, but also related to users accessing the Internet platform multiple times in a short period of time.

基于此,后端服务进程113将得到的处理结果I和处理结果II,不再仅存储在数据库114中,而是将处理结果I和处理结果II存储在数据库114的同时,还将处理结果I和处理结果II缓存在缓存空间112中,以便用户B通过智能手机122在发送针对口罩的内容查询请求后,可以直接在缓存空间112中获取到处理结果II,还可以返回给智能手机122对应的内容查询响应。从而不需要和数据库114进行额外的数据交互,减少了对数据库114的访问次数,从而在对象获取请求高峰期有效保护数据库114,并提高了查询响应效率,降低了服务器110的负担。Based on this, the back-end service process 113 will not only store the processing result I and the processing result II in the database 114, but will store the processing result I and the processing result II in the database 114, and also store the processing result I in the database 114. and the processing result II are cached in the cache space 112, so that the user B can directly obtain the processing result II in the cache space 112 after sending the content query request for the mask through the smartphone 122, and can also return it to the corresponding smartphone 122. Content query response. Therefore, additional data interaction with the database 114 is not required, the number of visits to the database 114 is reduced, the database 114 is effectively protected during the peak period of object acquisition requests, the query response efficiency is improved, and the load on the server 110 is reduced.

下面结合图1所示的应用场景对本申请实施例提供的数据处理方法进行介绍。参见图2,该图为本申请实施例提供的一种数据处理方法的流程图。在图2所示的方法中,包括以下步骤:The data processing method provided by the embodiment of the present application will be introduced below with reference to the application scenario shown in FIG. 1 . Referring to FIG. 2 , which is a flowchart of a data processing method provided by an embodiment of the present application. In the method shown in Figure 2, the following steps are included:

S201:获取针对目标对象的对象获取请求。S201: Acquire an object acquisition request for a target object.

海量用户对某些对象产生强烈的获取需求,会导致供不应求的情况。当这些对象被通过互联网平台供应给用户时,在对应的互联网平台开始供应这些对象的短时间内,用户会不停的通过电子设备向该互联网平台的服务器发送针对目标对象的对象获取请求,从而加重服务器的负担,甚至导致服务器宕机。A large number of users have a strong demand for certain objects, which will lead to a situation in which the supply exceeds the demand. When these objects are supplied to the user through the Internet platform, within a short period of time when the corresponding Internet platform starts to supply these objects, the user will continuously send the object acquisition request for the target object to the server of the Internet platform through the electronic device, thereby Increase the burden on the server, and even lead to server downtime.

为了应对上述高并发的场景,即为了应对短时间内获取的针对目标对象的对象获取请求剧增的场景,参见图3,该图为本申请实施例提供的一种服务器分层架构图。本申请对服务器进行设计,使其至少包括前端服务进程(preorder services)111、缓存空间112、后端服务进程(spoorder services)113和数据库114。其中,前端服务进程111用于与客户端交互,客户端通过网关(Gateway)301,例如Rio Gateway发送针对目标对象的对象获取请求给前端服务进程111。后端服务进程113用于与数据库114交互。缓存空间112用于连接前端服务进程111和后端服务进程113,可以采用远程字典服务(Remote Dictionary Server,Redis)、卡夫卡(Kafka)等技术。例如,前端服务进程111将修改类的操作,如对象获取请求写入kafka中,查询类的操作从Redis中取出。后端服务进程112从kafka中取出对象获取请求,并与Redis交互,通过缓存空间可以解耦前端服务进程和后端服务进程,便于前端服务进程和后端服务进程的独立维护。数据库114用于存储后端服务进程的处理结果,可以采用MySQL数据库。In order to cope with the above-mentioned high concurrency scenario, that is, to cope with a scenario in which object acquisition requests for a target object acquired in a short period of time rapidly increase, refer to FIG. In this application, the server is designed to include at least a front-end service process (preorder services) 111 , a cache space 112 , a back-end service process (spoorder services) 113 and a database 114 . The front-end service process 111 is used to interact with the client, and the client sends an object acquisition request for the target object to the front-end service process 111 through a gateway (Gateway) 301, such as a Rio Gateway. The backend service process 113 is used to interact with the database 114 . The cache space 112 is used to connect the front-end service process 111 and the back-end service process 113, and may adopt technologies such as Remote Dictionary Server (Redis), Kafka (Kafka). For example, the front-end service process 111 writes operations to modify classes, such as object acquisition requests, into kafka, and operations to query classes are retrieved from Redis. The back-end service process 112 takes out the object acquisition request from kafka, and interacts with Redis. The front-end service process and the back-end service process can be decoupled through the cache space, which facilitates the independent maintenance of the front-end service process and the back-end service process. The database 114 is used to store the processing results of the backend service process, and a MySQL database can be used.

前端服务进程接收来自于客户端针对目标对象的对象获取请求。例如,给客户端提交登记、查询结果等服务提供接口,前端服务进程不直接与数据库进行交互,可以避免在超高并发的情况下查询数据库,降低服务器的负担。The front-end service process receives object acquisition requests from the client for the target object. For example, it provides an interface for the client to submit registration, query results and other services, and the front-end service process does not directly interact with the database, which can avoid querying the database in the case of ultra-high concurrency and reduce the burden on the server.

S202:将所述对象获取请求写入处于缓存空间中的消息队列。S202: Write the object acquisition request into a message queue in the buffer space.

相关技术中,在获取到针对目标对象的对象获取请求后,会立即处理对象获取请求,从而导致后续获取对象获取请求速度越来越慢,甚至导致服务器出现宕机的情况。In the related art, after an object acquisition request for a target object is acquired, the object acquisition request is processed immediately, resulting in slower and slower speed of subsequent object acquisition requests, and even a server downtime.

为了保证获取对象获取请求的响应速度,在本申请中,前端服务进程不再立即处理获取到的对象获取请求,而是将对象获取请求写入到消息队列中,该消息队列处于缓存空间,能够暂时以消息队列的形式存储来自于前端服务进程的对象获取请求,便于后端服务进程从消息队列中取出对象获取请求,从而实现异步处理对象获取请求,保证服务器能够响应大量的对象获取请求而不出现宕机的情况。In order to ensure the response speed of the object acquisition request, in this application, the front-end service process no longer immediately processes the acquired object acquisition request, but writes the object acquisition request into the message queue, which is in the cache space and can Temporarily store the object acquisition request from the front-end service process in the form of a message queue, so that the back-end service process can take out the object acquisition request from the message queue, so as to realize the asynchronous processing of the object acquisition request and ensure that the server can respond to a large number of object acquisition requests without Downtime occurs.

该消息队列在缓存空间中可以中间件的形式进行构建,也可以采用其他实现先进先出的算法技术构建。The message queue can be constructed in the form of middleware in the cache space, and can also be constructed by other algorithm technologies that implement first-in, first-out.

本申请不具体限定前端服务进程的数量。例如,在图3中,前端服务进程111使用16个虚拟机(Virtual Machine,VM)。为了保证对象获取请求的响应速度,不仅可以通过增加VM的数量,还可以通过分片技术(如Kafka的Partition、Redis的集群)将数据分散到不同的分片(分区),实现水平扩容,以根据并发量来配置不同数量的服务器资源。This application does not specifically limit the number of front-end service processes. For example, in FIG. 3 , the front-end service process 111 uses 16 virtual machines (Virtual Machine, VM). In order to ensure the response speed of object acquisition requests, not only can the number of VMs be increased, but also data can be distributed to different shards (partitions) through sharding technologies (such as Kafka's Partition and Redis' cluster) to achieve horizontal expansion to Configure different numbers of server resources according to the amount of concurrency.

S203:从所述消息队列中取出所述对象获取请求进行对应处理,将得到的处理结果缓存在所述缓存空间中。S203: Take out the object acquisition request from the message queue to perform corresponding processing, and cache the obtained processing result in the cache space.

无论前端服务进程在获取对象获取请求的高峰期还是低谷期,后端服务进程均可以根据自己的处理能力从消息队列中取出对象获取请求进行处理,从而实现异步处理。由此,即使在对象获取请求的高峰期也可以通过该异步处理机制实现了削峰的效果,在高峰期后获取的对象获取请求骤减,也可以继续处理消息队列中留存的对象获取请求,实现了填谷的作用,进而保证服务器的响应速度。Regardless of whether the front-end service process is in the peak period or the trough period of acquiring the object acquisition request, the back-end service process can process the object acquisition request from the message queue according to its own processing capability, thereby realizing asynchronous processing. Therefore, even in the peak period of object acquisition requests, the effect of peak shaving can be achieved through the asynchronous processing mechanism. After the peak period, the object acquisition requests acquired after the peak period have dropped sharply, and the object acquisition requests retained in the message queue can be continued to be processed. The function of filling the valley is realized, thereby ensuring the response speed of the server.

后端服务进程可以通过订阅消息队列的方式从消息队列中取出对象获取请求进行对应的处理,并将得到的处理结果缓存在缓存空间中,以便前端服务进程直接在缓存空间中查找。从而减少数据库的并发查询操作,保证高并发状态下的查询速度。后端服务进程还可以根据对象获取请求的处理时限要求以及数据库的压力配置所需数量的服务器资源。例如,在图3中,后端服务进程113使用4个VM。The back-end service process can take out the object acquisition request from the message queue for corresponding processing by subscribing to the message queue, and cache the obtained processing result in the cache space, so that the front-end service process can directly search in the cache space. Thereby, the concurrent query operations of the database are reduced, and the query speed in a high concurrency state is guaranteed. The backend service process can also configure the required number of server resources according to the processing time limit of the object acquisition request and the pressure of the database. For example, in Figure 3, the backend service process 113 uses 4 VMs.

在后端服务进程不仅将得到的处理结果缓存到缓存空间中,还将得到的处理结果存储到对应的数据库中。例如,后端服务进程从消息队列中取出针对口罩的对象获取请求后,进行对应的处理后将每一单的处理结果,如获取口罩成功或获取口罩失败存储到数据库中和缓存到缓存空间中。当用户想要查询自己的订单是否成功时,通过客户端向前端服务进程发送口罩订单的查询请求,前端服务进程可以直接在缓存空间中查找到对应的处理结果并返回给对应的客户端。为了提高处理结果写入数据库的速度,可以将得到的处理结果按照处理次序依次更新到目标对象对应的数据库中,由于采用顺序插入处理结果的方式,数据库不需要在存储处理结果的同时对处理结果进行修改和删除操作,从而可以最大化保证数据库写入处理结果的速度。The back-end service process not only caches the obtained processing results in the cache space, but also stores the obtained processing results in the corresponding database. For example, after the back-end service process takes out the object acquisition request for masks from the message queue, and performs corresponding processing, the processing results of each order, such as successful mask acquisition or mask acquisition failure, are stored in the database and cached in the cache space . When the user wants to check whether his order is successful, the client sends a query request for the mask order to the front-end service process, and the front-end service process can directly find the corresponding processing result in the cache space and return it to the corresponding client. In order to improve the speed at which the processing results are written into the database, the obtained processing results can be sequentially updated to the database corresponding to the target object according to the processing order. Since the processing results are inserted sequentially, the database does not need to store the processing results and simultaneously update the processing results. Modify and delete operations are performed to maximize the speed at which the database writes the processing results.

S204:根据针对所述目标对象的内容查询请求,在所述缓存空间中查询目标处理结果。S204: Query the target processing result in the cache space according to the content query request for the target object.

在获取对象获取请求的高峰期时,在短时间内,不仅获取到大量的针对目标对象的对象获取请求,还会关联出现海量的针对目标对象的内容查询请求,例如用于查询对象获取请求是否成功、当前处理状态等,从而导致高并发的原因多元化。During the peak period of object acquisition requests, not only a large number of object acquisition requests for the target object are obtained in a short period of time, but also a large number of content query requests for the target object are associated, such as for querying whether the object acquisition request is Success, current processing status, etc., resulting in a variety of reasons for high concurrency.

为了应对高并发原因的多元化,后端服务进程从消息队列中取出对象获取请求并进行对应的处理后,还会将得到的处理结果缓存在缓存空间中,从而前端服务进程可以直接在缓存空间中查询对应的目标处理结果。从而将需要处理的对象获取请求写入到消息队列中,将与之关联的内容查询请求从缓存中取出,不再需要和保存处理结果的数据库进行额外的数据交互,能够规避超高并发的情况下出现的数据库的瓶颈,减少数据库的并发查询操作,保证高并发状态下的查询速度。In order to deal with the diversification of high concurrency reasons, after the back-end service process takes out the object acquisition request from the message queue and performs corresponding processing, it will also cache the obtained processing result in the cache space, so that the front-end service process can directly store in the cache space. Query the corresponding target processing result in . In this way, the object acquisition request that needs to be processed is written into the message queue, and the content query request associated with it is taken out of the cache. It is no longer necessary to perform additional data interaction with the database that saves the processing results, which can avoid the situation of ultra-high concurrency. It can reduce the bottleneck of the database that appears under the condition, reduce the concurrent query operation of the database, and ensure the query speed in the high concurrency state.

当获取到针对目标对象的内容查询请求后,不仅可以根据内容查询请求在缓存空间中查询对应的目标处理结果,还可以基于目标处理结果返回对应的内容查询相应,以便内容查询请求方获得对应的内容查询响应结果,从而不再多次发送内容查询请求,降低服务器的压力。After obtaining the content query request for the target object, not only can the corresponding target processing result be queried in the cache space according to the content query request, but also the corresponding content query response can be returned based on the target processing result, so that the content query requester can obtain the corresponding content query response. Content query response results, so that content query requests are no longer sent multiple times, reducing the pressure on the server.

由上述技术方案可以看出,针对高并发获取目标对象的场景,若获取针对目标对象的对象获取请求,并不同步进行是否提供目标对象的处理,而是将对象获取请求写入处于缓存空间中的消息队列中。在可以处理时再从消息队列中取出该对象获取请求,从而实现了对该对象获取请求的异步处理。由此即使在接收对象获取请求的高峰期也可以通过该异步处理机制实现了削峰的效果,降低对数据库的冲击,而且即使在高峰期后接收的对象获取请求骤减,也可以继续处理消息队列中留存的对象获取请求,实现了填谷的作用。在高峰期除了对象获取请求会出现高并发的情况外,海量的内容查询请求也会关联出现,通过将针对对象获取请求的处理结果缓存在缓存空间中,可以在基于内容查询结果直接在缓存空间查找、返回。而不再需要和保存处理结果的数据库进行额外的数据交互,减少了对数据库的访问量,从而在高峰期有效保护了数据库,并提高了查询响应效率。It can be seen from the above technical solutions that, in the scenario of acquiring the target object with high concurrency, if an object acquisition request for the target object is acquired, the processing of whether to provide the target object is not performed synchronously, but the object acquisition request is written in the cache space. in the message queue. The object acquisition request is taken out from the message queue when it can be processed, thereby realizing asynchronous processing of the object acquisition request. Therefore, even in the peak period of receiving object acquisition requests, the asynchronous processing mechanism can achieve the effect of peak shaving, reduce the impact on the database, and even if the received object acquisition requests drop sharply after the peak period, messages can continue to be processed The object acquisition request retained in the queue realizes the role of filling the valley. In addition to the high concurrency of object acquisition requests during peak periods, a large number of content query requests will also appear in association. By caching the processing results of object acquisition requests in the cache space, the content-based query results can be directly stored in the cache space. Find and return. There is no need for additional data interaction with the database that saves the processing results, which reduces the amount of access to the database, thus effectively protecting the database during peak periods and improving query response efficiency.

由于用户在获取目标对象一般是采用按照先后顺序减库存的模式,所以导致大量用户会在目标对象在互联网平台开始供应的短时间内,不断向互联网平台的服务器发送对象获取请求或内容查询请求,导致服务器处理压力增加。为了降低服务器的负担,本申请还提供一种第一模式,使用户不再是通过拼手速获得目标对象,而是在通过预约后由电视台或公证处监督的方式摇号获得目标对象,从而中签用户(即,通过摇号选中的用户)向服务器发送对象获取请求,降低用户向服务器发送对象获取请求或内容查询请求的数量,减轻服务器的压力。下面结合图4对第一模式进行介绍。Because users generally use the mode of reducing inventory in order to obtain target objects, a large number of users will continue to send object acquisition requests or content query requests to the server of the Internet platform within a short period of time when the target objects start to be supplied on the Internet platform. Causes increased server processing pressure. In order to reduce the burden on the server, the present application also provides a first mode, so that the user no longer obtains the target object by fighting hands quickly, but obtains the target object by lottery by means of supervision by a TV station or a notary office after making an appointment, thereby winning the lottery The user (ie, the user selected through the lottery) sends an object acquisition request to the server, which reduces the number of object acquisition requests or content query requests sent by the user to the server and reduces the pressure on the server. The first mode will be described below with reference to FIG. 4 .

参见图4,该图为本申请实施例提供的一种第一模式的示意图。Referring to FIG. 4 , this figure is a schematic diagram of a first mode provided by an embodiment of the present application.

第一模式属于一种预约模式,用户在摇号之前,需要进行身份登记,例如,在图4中通过客户端填写登记单。需要说明的是,其他方式也可以进行身份登记。该登记单以对象获取请求的形式发送给前端服务进程,前端服务进程在获得填写后的登记单后,将登记单放入到消息队列中,以便后端服务进程对登记单进行处理。为了能够在大量的用户中快速筛选出中签用户,本申请提供一种通过采用两次摇号形式快速筛选中签用户的第一模式。下面结合图5对第一次摇号进行介绍,结合图6对第二次摇号进行介绍。The first mode belongs to a reservation mode, and the user needs to perform identity registration before the lottery, for example, fill in the registration form through the client in FIG. 4 . It should be noted that identity registration can also be performed in other ways. The registration form is sent to the front-end service process in the form of an object acquisition request. After obtaining the filled-in registration form, the front-end service process puts the registration form into the message queue, so that the back-end service process can process the registration form. In order to quickly screen out winning users among a large number of users, the present application provides a first mode for quickly screening winning users by using two lottery forms. The first lottery will be introduced below with reference to FIG. 5 , and the second lottery will be introduced with reference to FIG. 6 .

参见图5,该图为本申请实施例提供的一种第一模式的方法流程图。Referring to FIG. 5 , which is a flowchart of a method of a first mode provided by an embodiment of the present application.

S501:为所述对象获取请求所携带的用户标识分配第一摇号数值。S501: Allocate a first lottery value to the user identifier carried in the object acquisition request.

在后端服务进程从消息队列中获得对象获取请求时,为对象获取请求携带的用户标识进行第一次摇号,分配第一摇号数值。该对象获取请求携带着对应用户的用户标识,以便通过用户标识确定登记单的所属用户。When the back-end service process obtains the object acquisition request from the message queue, the first lottery is performed for the user ID carried in the object acquisition request, and the first lottery value is allocated. The object acquisition request carries the user ID of the corresponding user, so that the user to which the registration form belongs can be determined through the user ID.

本申请不具体限定第一摇号数值的区间。例如,第一摇号数值的区间可以为0-1023,为每个用户标识随机分配0-1023中任一个整数。This application does not specifically limit the range of the first lottery value. For example, the range of the first lottery value may be 0-1023, and any integer from 0-1023 is randomly assigned to each user ID.

若对象获取请求数量较多,也可以通过前端服务进程将对象获取请求写入到缓存空间中的消息队列,以方便后端服务进程在摇号时可以从消息队列中取出对象获取请求,为该对象获取请求所携带的用户标识分配第一摇号数据。If there are a large number of object acquisition requests, the front-end service process can also write the object acquisition request to the message queue in the cache space, so that the back-end service process can take out the object acquisition request from the message queue when the lottery is drawn, as the object Obtain the first lottery data of the user identification carried in the acquisition request.

S502:基于所述第一摇号数值将所述对象获取请求划分至多个用户集合中。S502: Divide the object acquisition request into multiple user sets based on the first lottery value.

基于对象获取请求中每个用户标识的第一摇号数值,将具有相同的第一摇号数值的对象获取请求划分同一个用户集合中。所确定出用户集合的总数量可以与第一摇号数值所在区间的整数值个数相等。以上述第一摇号数值的区间为0-1023为例,可以将对象获取请求划分至1024个用户集合中。Based on the first lottery value of each user identifier in the object acquisition request, object acquisition requests with the same first lottery value are divided into the same user set. The determined total number of user sets may be equal to the number of integer values in the interval where the first lottery value is located. Taking the range of the value of the first lottery number as 0-1023 as an example, the object acquisition request can be divided into 1024 user sets.

S503:在确定所述目标对象的实际获取用户时,根据从所述第一摇号数值中确定目标数值,从所述多个用户集合中选取所述目标数值对应的第一目标用户集合。S503: When determining the actual acquired user of the target object, according to determining the target value from the first lottery value, select a first target user set corresponding to the target value from the multiple user sets.

在确定目标对象的实际获取用户时,不再从所有用户中进行摇号(第二次摇号)选取,而是从多个第一摇号数值中确定一个作为目标数值,然后从目标数值对应的用户集合,即第一目标用户集合中进行摇号选取,从而减少进行摇号的用户的数量,提高摇号的效率。例如,有一千万用户预约登记,第一次摇号的数值区间长度为100,将一千万用户的对象获取请求平均划分至100个用户集合中,在确定目标数值为1时,使用第一个用户集合进行摇号,而非使用所有用户进行摇号,从而将摇号用户数量从一千万降低到十万,提高了摇号效率。When determining the actual acquired user of the target object, the lottery (the second lottery) is no longer selected from all users, but one of the first lottery values is determined as the target value, and then the set of users corresponding to the target value is selected. , that is, lottery selection is performed in the first target user set, thereby reducing the number of users performing lottery and improving the efficiency of lottery. For example, if 10 million users make an appointment for registration, the length of the numerical interval of the first lottery is 100, and the object acquisition requests of 10 million users are equally divided into 100 user sets. When the target value is determined to be 1, the first Instead of using all users for lottery, the number of lottery users is reduced from 10 million to 100,000, and the lottery efficiency is improved.

目标对象可以是一类对象的集合,也可以是该类对象中一种型号的集合。例如,目标对象可以是口罩,还可以是口罩中的N95型号口罩。The target object can be a collection of objects of a class, or a collection of a type of objects of that class. For example, the target object can be a mask, or it can be an N95 type mask among the masks.

第一目标用户集合不仅可以根据目标数值进行确定,还可以根据店铺标识、目标对象的型号以及用户是否服从分配等条件共同确定。The first target user set can be determined not only according to the target value, but also jointly determined according to conditions such as the shop logo, the model of the target object, and whether the user obeys the allocation.

S504:根据提供所述目标对象的店铺标识,确定所述店铺标识所对应店铺中具备所述目标对象的可分配数值。S504: According to the store identifier that provides the target object, determine that the store corresponding to the store identifier has an assignable value of the target object.

当互联网平台统一筹划所有目标对象的分配时,例如,在疫情期间,互联网平台将多家店铺的口罩集合在一起,统一进行分配。然后按照店铺的顺序逐一进行摇号,根据目标对象的店铺标识,确定该店铺中目标对象的可分配数量,以便于能够保证供应给用户的目标对象数量不超过该家店铺的实际库存量。When the Internet platform plans the distribution of all target objects in a unified manner, for example, during the epidemic, the Internet platform collects masks from multiple stores and distributes them uniformly. Then, the lottery is carried out one by one according to the order of the stores, and the assignable quantity of the target objects in the store is determined according to the store identification of the target object, so as to ensure that the number of target objects supplied to the user does not exceed the actual inventory of the store.

S505:根据所述可分配数值,从所述第一目标用户集合中确定获取所述店铺所提供所述目标对象的实际获取用户。S505: According to the assignable value, determine the actual acquisition user who acquires the target object provided by the store from the first target user set.

根据可分配数值,在之前随机选中的第一目标用户集合中确定实际获取用户,该实际获取用户可以获取该家店铺中的目标对象。例如,若该家店铺中的目标对象数量为100个,规定每个用户可以获取1个目标对象,从而可以将可分配数值定为100,即在第一目标集合中确定100个实际获取用户。若该家店铺中的目标对象数量为100个,规定每个用户可以获取5个目标对象,从而可以将可分配数值定为20,即在第一目标集合中确定20个实际获取用户。According to the assignable value, the actual acquired user is determined in the first set of target users randomly selected before, and the actual acquired user can acquire the target object in the store. For example, if the number of target objects in the store is 100, it is stipulated that each user can obtain 1 target object, so that the assignable value can be set as 100, that is, 100 actual users are determined in the first target set. If the number of target objects in the store is 100, it is stipulated that each user can obtain 5 target objects, so that the assignable value can be set as 20, that is, 20 actual users are determined in the first target set.

本申请不具体限定实际获取用户获取目标对象的方式。例如,可以通过互联网平台在线上预定目标对象,预定成功后在线下的实体店铺中获取目标对象。再如,还可以通过互联网平台在线上预定目标对象,通过网络邮寄的方式获取目标对象。The present application does not specifically limit the manner in which the target object acquired by the user is actually acquired. For example, the target object can be reserved online through the Internet platform, and the target object can be obtained from the offline physical store after the reservation is successful. For another example, the target object can also be booked online through the Internet platform, and the target object can be obtained by mailing through the Internet.

下面结合图6介绍一种通过摇号方式在第一目标集合中选取实际获取用户的方法,即图6所示的方法为S505中的一种方式。In the following, a method for selecting users from the first target set by lottery is introduced with reference to FIG. 6 , that is, the method shown in FIG. 6 is a method in S505 .

为了能够进一步提高摇号的效率,继续参见图4,通过摇号方式从库存表中先将一家店铺中的目标对象的可分配数量全部一一确定出实际获取用户后,再对下一家店铺中的目标对象的可分配数量全部一一确定出实际获取用户,直至所有的目标对象的可分配数量均分配完毕。In order to further improve the efficiency of the lottery, continue to refer to Figure 4, first determine all the assignable quantities of target objects in a store from the inventory table through lottery, after the actual acquisition of users is determined, and then the target objects in the next store are determined. All the allocatable quantities of the objects are determined one by one to actually acquire the users until all the allocatable quantities of the target objects are allocated.

甚至还可以在一家店铺中的第一种型号目标对象的可分配数量全部一一确定出实际获取用户后,再对下一种型号目标对象的可分配数量全部一一确定出实际获取用户,直至该家店铺的所有型号目标对象的可分配数量均分配完毕。通过按照目标对象的每一种型号和/或每一家店铺的顺序,逐一进行摇号,不用反复摇号从而提高摇号效率。It is even possible to determine the actual acquired users for all the assignable quantities of the first type of target objects in a store, and then determine the actual acquired users for all the assignable quantities of the next type of target objects, until the actual acquired users are determined. The allocable quantities of all model target objects in this store have been allocated. By performing lottery one by one according to the order of each model and/or each store of the target object, lottery efficiency is improved without repeated lottery.

参见图6,该图为本申请实施例提供的一种第一模式的方法流程图。Referring to FIG. 6 , which is a flowchart of a method of a first mode provided by an embodiment of the present application.

S601:若所述第一目标用户集合中对象获取请求所请求的目标对象总数值大于所述可分配数值,通过对所述第一目标用户集合中的用户标识再次摇号,从所述第一目标用户集合中确定出所述实际获取用户。S601: If the total value of the target objects requested by the object acquisition request in the first target user set is greater than the assignable value, the user IDs in the first target user set are re-rolled, and the first target user The actual acquired user is determined from the user set.

若第一目标用户集合中对象获取请求所请求的目标对象总数大于可分配数值,说明该目标对象可以通过第一目标用户集合中的用户全部分配完毕,则再次进行摇号,即通过对第一目标用户集合中用户标识再次摇号,通过第二次摇号从第一目标用户集合中确定出实际获取用户。继续参见图4,可以将第二次摇号数值记录在Roll点记录表中。例如,根据第二次摇号的数值大小,将第一目标用户集合中的用户按照顺序放入待摇号数组,然后按数组顺序从前到后逐一匹配,直至可分配数值分配完毕。If the total number of target objects requested by the object acquisition request in the first target user set is greater than the assignable value, it means that the target object can be allocated by all the users in the first target user set, and the lottery will be performed again, that is, the first target The user ID in the user set is drawn again, and the actual acquired user is determined from the first target user set through the second draw. Continuing to refer to FIG. 4, the second lottery value can be recorded in the Roll point record table. For example, according to the numerical value of the second lottery, put the users in the first target user set into the to-be-lottery array in order, and then match one by one from front to back in the array order until the assignable values are allocated.

S602:若所述第一目标用户集合中对象获取请求所请求的目标对象总数值小于所述可分配数值,通过调整所述目标数值从所述多个用户集合中获取第二目标用户集合。S602: If the total value of the target objects requested by the object acquisition request in the first target user set is less than the assignable value, obtain a second target user set from the multiple user sets by adjusting the target value.

若第一目标用户集合中对象获取请求所请求的目标对象总数小于可分配数值,说明该目标对象无法通过第一目标用户集合中的用户全部分配完毕,则需要扩大用户数量,以便所有目标对象能够分配完毕。从而无需对该目标对象进行多次的摇号分配,以提高摇号效率。If the total number of target objects requested by the object acquisition request in the first target user set is less than the assignable value, it means that the target object cannot be allocated by all the users in the first target user set, and the number of users needs to be expanded so that all target objects can Allocated. Therefore, it is not necessary to perform lottery allocation for the target object for many times, so as to improve the lottery efficiency.

作为一种扩大用户集合中对象获取请求数量的方式,可以调整目标数值,再从多个用户集合中根据调整后的目标数值获取第二目标用户集合。第二目标用户集合可以是多个用户集合,以保证第一目标数量集合和第二目标用户集合中的对象获取请求总数大于可分配数值,从而所有目标对象能够分配完毕。As a way to expand the number of object acquisition requests in the user set, the target value can be adjusted, and then a second target user set can be obtained from multiple user sets according to the adjusted target value. The second target user set may be multiple user sets, to ensure that the total number of object acquisition requests in the first target quantity set and the second target user set is greater than the assignable value, so that all target objects can be allocated.

作为另一种扩大用户集合中对象获取请求数量的方式,为每个用户标识随机分配0-1023中任一个整数后,将该整数以四进制的形式存入长度固定为5的字符串中,如20121、00230等。扩大用户集合中对象获取请求数量时,通过字符串左移一位匹配,如:取出的是31231,左移一位就是模糊查询3123%,左移两位就是312%。直到该数大于或等于可分配数值,以保证所有目标对象能够分配完毕。As another way to expand the number of object acquisition requests in the user set, after randomly assigning any integer from 0 to 1023 to each user ID, the integer is stored in a string with a fixed length of 5 in quaternary form. , such as 20121, 00230, etc. When expanding the number of object acquisition requests in the user set, the string is shifted to the left by one bit to match, for example, 31231 is retrieved, a left shift is 3123%, and a left shift is 312%. Until the number is greater than or equal to the assignable value, to ensure that all target objects can be allocated.

S603:据所述可分配数值,从所述第一目标用户集合和所述第二目标用户集合中确定获取所述店铺所提供所述目标对象的实际获取用户。S603: According to the assignable value, determine the actual acquiring user who acquires the target object provided by the store from the first target user set and the second target user set.

继续参见图4,可以将实际获取用户写入到摇号结果表中,存储到缓存空间中,以便前端服务进程查询结果。Continuing to refer to FIG. 4, the actual acquired user can be written into the lottery result table and stored in the cache space, so that the front-end service process can query the result.

通过二次摇号方式能够在大量的用户中快速筛选出中签用户,从而提高摇号的效率。参见图7-图9,该图为本申请实时例提供的一种摇号方式的示意图。其中,图7为准备开始摇号的示意图,图8为正在摇号的示意图,图9为摇号完成的示意图,还可以提供中签名单的下载。Through the second lottery method, the winning users can be quickly screened out among a large number of users, thereby improving the efficiency of the lottery. Referring to FIG. 7 to FIG. 9 , the figures are schematic diagrams of a lottery method provided by the real-time example of the present application. Among them, FIG. 7 is a schematic diagram of preparing to start the lottery, FIG. 8 is a schematic diagram of the lottery being performed, and FIG. 9 is a schematic diagram of the completion of the lottery, and the download of the signature form can also be provided.

为了应对高并发场景,本申请提供了获取目标对象的两种模式,分别是第一模式和第二模式,第一模式和第二模式采用不同的对象获取方式,例如第一模式通过随机抽取随机数的方式(如摇号模式)获取对象获取请求,第二模式是采用同一时间同步购买的方式(如抢购模式)获取对象获取请求,以降低服务器的压力。参见图10,该图为本申请实施例提供的一种切换模式的示意图。为了能够通过切换两种模式从而应对不同的需求,将两种模式写入到能够标识目标对象的规则参数的配置文件中,通过获取针对目标对象的配置文件,若获取到模式切换请求,可以根据配置文件以切换获取目标对象的模式为第一模式还是第二模式。In order to cope with high concurrency scenarios, this application provides two modes for acquiring target objects, namely the first mode and the second mode. The first mode and the second mode use different object acquisition methods. The second mode is to use the method of simultaneous purchase at the same time (such as the snap-buy mode) to obtain the object acquisition request to reduce the pressure on the server. Referring to FIG. 10 , this figure is a schematic diagram of a switching mode provided by an embodiment of the present application. In order to be able to respond to different needs by switching the two modes, write the two modes into the configuration file that can identify the rule parameters of the target object, and obtain the configuration file for the target object. The configuration file is configured to switch whether the mode of acquiring the target object is the first mode or the second mode.

目标对象供不应求,如果通过更新客户端的版本更新获取目标对象的规则参数,更新速度较慢,从而影响用户及时获取目标对象。因为客户端更新需要走审核流程,审核流程会花费大量的时间,而且在客户端更新后,用户也不一定能立即使用最新版的客户端。所以,对于一些可能会变动的规则参数,例如目标对象的文案、控制开关、时间变量、中奖概率等,将其写入到配置文件中,发布到服务器。当获取来自客户端的规则参数更新请求时,无需对客户端的版本进行改动,而是根据规则参数更新请求指示,对配置文件进行更新,从而减少客户端版本更新影响相关功能的上线,提高更新速度。The target object is in short supply. If the rule parameters of the target object are obtained by updating the version of the client, the update speed will be slow, thus affecting the user to obtain the target object in time. Because the client update needs to go through the review process, the review process will take a lot of time, and after the client update, users may not be able to use the latest version of the client immediately. Therefore, for some rule parameters that may change, such as the target object's copywriting, control switches, time variables, winning probability, etc., write it into the configuration file and publish it to the server. When obtaining the rule parameter update request from the client, there is no need to change the client version, but according to the rule parameter update request instruction, the configuration file is updated, thereby reducing the impact of the client version update on the online of related functions and improving the update speed.

若用户通过客户端查看目标对象的相关消息时,服务器会不断获取到来自客户端针对目标对象的内容查询请求,从而加重服务器的负担。为了降低客户端与服务器间的交互次数,可以在获取到客户端发送的文件获取请求后,向客户端发送配置文件,使配置文件能够缓存在客户端本地第一预定时长。从而当用户在第一预定时长内再次查看针对目标对象的相关消息时,客户端不会在向服务器发送针对目标对象的内容查询请求,而是读取本地中缓存的配置文件来展示针对目标对象的相关信息,从而降低客户端与服务器之间的交互次数,降低服务器的负担。If the user views the relevant messages of the target object through the client, the server will continuously obtain content query requests from the client for the target object, thereby increasing the burden on the server. In order to reduce the number of interactions between the client and the server, after obtaining the file obtaining request sent by the client, a configuration file may be sent to the client, so that the configuration file can be cached locally on the client for a predetermined period of time. Therefore, when the user views the relevant messages for the target object again within the first predetermined period of time, the client does not send a content query request for the target object to the server, but reads the locally cached configuration file to display the target object. related information, thereby reducing the number of interactions between the client and the server and reducing the burden on the server.

为了减少用户在获取对应的内容查询响应后,不停地通过客户端刷新查询结果加重服务器的负担,可以使内容查询响应能够缓存在客户端本地第二预定时长,以便当客户端在第一次获取到内容查询响应请求后,在第二预定时长内,不会再请求服务器获取查询响应请求,而是在客户端本地的缓存中获取目标处理结果,显示给用户,从而降低客户端与服务器之间的交互次数,降低服务器的负担。In order to reduce the burden on the server that the user constantly refreshes the query results through the client after obtaining the corresponding content query response, the content query response can be cached locally on the client for a second predetermined period of time, so that when the client responds for the first time After the content query response request is obtained, within the second predetermined period of time, the server will not be requested to obtain the query response request, but the target processing result will be obtained in the local cache of the client and displayed to the user, thereby reducing the relationship between the client and the server. The number of interactions between them reduces the burden on the server.

为了进一步降低服务器的负担,本申请对客户端进行了优化,使客户端能够控制分批随机发送针对目标对象的对象获取请求给服务器,从而降低服务器的压力。下面结合图11以通过小程序购买口罩为例进行具体说明。In order to further reduce the burden on the server, the present application optimizes the client, so that the client can control to randomly send object acquisition requests for the target object to the server in batches, thereby reducing the pressure on the server. In the following, a specific description will be given by taking the purchase of masks through the applet as an example in conjunction with FIG. 11 .

参见图11,该图为本申请实施例提供的一种通过小程序购买口罩的流程图。Referring to FIG. 11 , this figure is a flowchart of purchasing a mask through a small program provided in the embodiment of the present application.

该小程序在发送针对目标对象的对象获取请求之前,会经历三个页面,分别是首页、说明页和登记表单页。Before the applet sends an object acquisition request for the target object, it will go through three pages, namely the home page, the description page and the registration form page.

在首页中,当用户开始购买口罩时,通过小程序获取到针对口罩的配置文件,并将配置文件缓存在小程序本地中,从而降低小程序与服务器的交互次数,减轻服务器的压力。如图12所示,在首页,在获取到针对口罩的配置文件后,可以选择购买口罩的药店、口罩型号和购买数量等规则参数。同时,在选择药店、口罩型号和购买数量等规则参数也不再做库存校验,以降低服务器的压力。On the homepage, when the user starts to buy masks, the configuration file for the mask is obtained through the applet, and the configuration file is cached locally in the applet, thereby reducing the number of interactions between the applet and the server and reducing the pressure on the server. As shown in Figure 12, on the home page, after obtaining the configuration file for the mask, you can select the pharmacy where the mask is purchased, the mask model and the purchase quantity and other rule parameters. At the same time, inventory verification is no longer required for the selection of pharmacies, mask models and purchase quantities, etc., to reduce the pressure on the server.

在说明页,将填写个人健康申报作为预抢购口罩的前置条件,让更多用户及时上报健康数据,帮助监管机构监控疫情,具体地,设置用户是否在疫情期间进行自查上报,如果用户没有自查上报过,引导用户去进行自查上报。分流这部分用户,从而降低抢购口罩用户的数量,进而降低服务器的压力。如果用户自查上报过,则引导判断用户是否满足购买能力,如果不符合条件,则弹框提示原因,如果符合条件,则跳转到登记表单页。On the instruction page, filling in the personal health declaration is a prerequisite for pre-purchasing masks, allowing more users to report their health data in a timely manner and helping regulators monitor the epidemic. After self-inspection and report, guide users to carry out self-inspection and report. Divert these users, thereby reducing the number of users who snap up masks, thereby reducing the pressure on the server. If the user has self-checked and reported it, it will be guided to determine whether the user meets the purchasing ability. If the user does not meet the conditions, a pop-up box will prompt the reason. If the conditions are met, it will jump to the registration form page.

在登记表单页,可以使用小程序的信息快速填写(autofill)能力,保存用户上次填写的信息,以便用户可以选择上次填写过的身份证、姓名等信息,达到快速填写的效果,提升用户体验。在用户输入完所有信息,提交信息的时候,通过分批随机放行的策略实现有损服务。具体地,在配置文件中,设置了提交用户信息的成功概率。例如将成功概率设置为0-100%之间,让用户按照一定的概率才能把表单数据提交到服务器。如果本次提交没有命中成功概率,小程序会提示用户一段时间后再试。例如,当成功概率设置为40%时,100个用户通过小程序发送针对目标对象的对象获取请求,只有40个用户能成功发送,小程序会提示剩余60个用户一段时间后再试。如图13所示。从而小程序不会将针对口罩的对象获取请求发送给服务器,在用户量很多的情况下降低客户端与服务器交互的次数,从而降低服务器的负担。如果当前时段的服务器压力降低,可以将成功概率调整为100%,从而客户端会将针对目标对象的对象获取请求全部发送给服务器。On the registration form page, you can use the autofill capability of the applet to save the information that the user filled in last time, so that the user can select the information such as ID card, name and other information filled in last time, so as to achieve the effect of fast filling and improve the user experience. experience. When the user enters all the information and submits the information, the lossy service is realized through the strategy of random release in batches. Specifically, in the configuration file, the success probability of submitting user information is set. For example, the success probability is set between 0-100%, so that the user can submit the form data to the server according to a certain probability. If this submission does not hit the probability of success, the applet will prompt the user to try again after a period of time. For example, when the success probability is set to 40%, 100 users send an object acquisition request for the target object through the applet, only 40 users can successfully send it, and the applet will prompt the remaining 60 users to try again after a period of time. As shown in Figure 13. Therefore, the applet will not send the object acquisition request for the mask to the server, and in the case of a large number of users, the number of interactions between the client and the server is reduced, thereby reducing the burden on the server. If the server pressure in the current period decreases, the success probability can be adjusted to 100%, so that the client sends all object acquisition requests for the target object to the server.

接下来,将结合具体场景对本申请实施例提供的数据处理方法进行介绍,该场景为用户通过小程序抢购口罩的场景。其中,第一模式为摇号模式,第二模式为抢购模式。Next, the data processing method provided by the embodiment of the present application will be introduced in conjunction with a specific scenario, where the scenario is a scenario in which a user snaps up a mask through a small program. Among them, the first mode is the lottery mode, and the second mode is the snap-up mode.

参见下表,为小程序提供给用户的功能,以方便用户抢购口罩。See the table below for the functions provided to users by the Mini Program to facilitate users to snap up masks.

Figure BDA0002687790140000161
Figure BDA0002687790140000161

Figure BDA0002687790140000171
Figure BDA0002687790140000171

Figure BDA0002687790140000181
Figure BDA0002687790140000181

Figure BDA0002687790140000191
Figure BDA0002687790140000191

下面结合附图说明用户通过小程序获得口罩的流程。The following describes the process for a user to obtain a mask through a small program with reference to the accompanying drawings.

参见图14,该图为本申请实施例提供的一种数据处理的流程图。Referring to FIG. 14 , which is a flowchart of a data processing provided by an embodiment of the present application.

S1401:进入抢购口罩小程序。S1401: Enter the mini-program to buy masks.

参见图15,该图为本申请实施例提供的一种小程序页面的示意图。小程序可以具备我的健康码、健康上报自查、疫情线索上报、口罩预约购买等选项。Referring to FIG. 15 , this figure is a schematic diagram of a small program page provided by an embodiment of the present application. The applet can have options such as my health code, health report self-check, epidemic clue report, and mask purchase appointment.

S1402:向前端服务进程发送针对目标对象的对象获取请求。S1402: Send an object acquisition request for the target object to the front-end service process.

参见图16,该图为本申请实施例提供的一种小程序页面的示意图。引导用户填写所在区域、口罩型号、口罩数量、邮寄信息等相关信息,信息填写成功后可以点击提交。Referring to FIG. 16 , this figure is a schematic diagram of a small program page provided by an embodiment of the present application. Guide users to fill in relevant information such as the area, mask model, number of masks, mailing information, etc. After filling in the information successfully, you can click Submit.

参见图17,该图为本申请实施例提供的一种小程序页面的示意图。在用户提交相关信息后,可以让用户选择是否发送一次口罩预约结果通知,以方便用户及时知晓抢购结果。Referring to FIG. 17 , this figure is a schematic diagram of a small program page provided by an embodiment of the present application. After the user submits the relevant information, the user can choose whether to send a notification of the mask reservation result, so that the user can know the result of the panic purchase in time.

S1403:前端校验用户的相关信息。S1403: The front end verifies the relevant information of the user.

S1404:如果校验失败,或存放消息队列失败,则返回小程序,显示预约购买结果。S1404: If the verification fails or the message queue fails to be stored, return to the applet to display the reservation purchase result.

S1405:如果校验成功,则发送对象获取请求给缓存空间中的消息队列。S1405: If the verification is successful, send the object acquisition request to the message queue in the buffer space.

S1406:后端服务进程按照先进先出的机制从处于缓存空间中的消息队列中取出待处理的对象获取请求。S1406: The back-end service process takes out the object acquisition request to be processed from the message queue in the buffer space according to the first-in-first-out mechanism.

S1407:后端服务进程对应处理对象获取请求,得到对应的处理结果。S1407: The back-end service process corresponds to the processing object acquisition request, and obtains a corresponding processing result.

参见图18,该图为本申请实施例提供的一种小程序页面的示意图。当后端服务进程异步处理对象获取请求时,小程序端可以显示在排队中的界面。Referring to FIG. 18 , this figure is a schematic diagram of a small program page provided by an embodiment of the present application. When the backend service process asynchronously processes the object acquisition request, the applet side can display the interface in the queue.

参见图19,该图为本申请实施例提供的一种小程序页面的示意图。若此次抢购方式为摇号模式,则可以在摇号结束后向用户展示摇号结果,如用户已中签等信息。Referring to FIG. 19 , this figure is a schematic diagram of a small program page provided by an embodiment of the present application. If the snap-up method is the lottery mode, the result of the lottery can be displayed to the user after the lottery, such as the user has won the lottery and other information.

参见图20,该图为本申请实施例提供的一种小程序页面的示意图。若此次抢购方式为抢购模式,则可以在抢购结束后向用户展示抢购结果,如用户抢购已结束等信息。后续会结合附23和图24详细说明摇号模式和抢购模式的异同,在此不再赘述。Referring to FIG. 20 , this figure is a schematic diagram of a small program page provided by an embodiment of the present application. If the snap-buying method is the snap-buying mode, the snap-buying result can be displayed to the user after the snap-buying is over, such as information such as the user's snap-buying has ended. The similarities and differences between the lottery mode and the snap-up mode will be described in detail later in conjunction with Appendix 23 and Figure 24, and will not be repeated here.

下面介绍结合图21和图22分别介绍两种用户获得口罩的方式。The following introduces two ways for users to obtain masks in conjunction with Figure 21 and Figure 22.

参见图21,该图为本申请实施例提供的一种小程序页面的示意图。在用户中签后,用户可以选择邮寄方式获得口罩,此时需要用户在“我的预约”界面中进行付款操作,查看邮寄地址等信息。Referring to FIG. 21 , this figure is a schematic diagram of a small program page provided by an embodiment of the present application. After the user is selected, the user can choose to get the mask by mail. At this time, the user needs to make a payment operation in the "My Appointment" interface and check the mailing address and other information.

参见图22,该图为本申请实施例提供的一种小程序页面的示意图。在用户中签后,用户可以选择邮寄方式获得口罩,此时需要用户在“我的预约”界面中进行付款操作后,会获得预约码,从而通过预约码在线下药店获取口罩。小程序还可以提供到点导航等相关信息,以方便用户获取到口罩。Referring to FIG. 22 , this figure is a schematic diagram of a small program page provided by an embodiment of the present application. After the user is selected, the user can choose to get the mask by mail. At this time, the user needs to make a payment operation in the "My Appointment" interface, and then the appointment code will be obtained, so that the mask can be obtained from the offline pharmacy through the appointment code. The applet can also provide relevant information such as point-to-point navigation to facilitate users to obtain masks.

S1408:后端服务进程将对应的处理结果分别存储在缓存空间和数据库中。S1408: The back-end service process stores the corresponding processing results in the cache space and the database respectively.

由此,通过小程序在疫情期间为广大用户提供口罩预约、购买功能。一方面,开通线上口罩预约、购买的服务满足用户口罩物资的刚需,同时在支持用户到药店购买的基础上,增加邮寄到家服务,可有效避免排队买口罩带来的疫情风险;另一方面又借助口罩预约、购买收集普查用户的健康状态,支撑监管机构针对特定症状根据情况安排相关服务,从而保障用户的健康安全。下面结合图23和图24分别说明通过小程序抢购口罩两种方式的异同。As a result, the mini program provides users with mask reservation and purchase functions during the epidemic. On the one hand, the opening of online mask reservation and purchase services meets the rigid needs of users for mask materials. At the same time, on the basis of supporting users to purchase masks from pharmacies, adding mail to home services can effectively avoid the epidemic risk caused by queuing up to buy masks; on the other hand With the help of mask reservation and purchase, the health status of users in the census is collected, and the regulatory agencies are supported to arrange relevant services according to the situation according to specific symptoms, so as to ensure the health and safety of users. The similarities and differences between the two methods of snapping up masks through the applet are described below with reference to Figure 23 and Figure 24.

参见图23,该图为本申请实施例提供的一种抢购模式的流程示意图。Referring to FIG. 23 , which is a schematic flowchart of a snap-purchase mode provided by an embodiment of the present application.

在小程序侧:On the applet side:

用户注册:若用户首次注册,则可以通过调用微信获取用户手机号;若用户非首次注册,则可以跳过此步骤。User registration: If the user registers for the first time, you can obtain the user's mobile phone number by calling WeChat; if the user does not register for the first time, you can skip this step.

进入小程序:1、首先查看抢购说明。2、在抢购时间X点前,抢购按钮设置为灰色,用户无法点击抢购按钮。当时间为X点时,用户可以点击抢购按钮。3、判断用户Y天内是否填写个人健康申报,若没有填报则先引导用户提交个人健康申报。Entering the applet: 1. First, check the snap-up instructions. 2. Before X point of the snap-up time, the snap-up button is set to gray, and the user cannot click the snap-up button. When the time is X o'clock, the user can click the snap button. 3. Determine whether the user has filled in the personal health declaration within Y days, and if not, guide the user to submit the personal health declaration first.

获取配置文件:1、此步骤不做库存校验,用户可以选择任何型号的口罩。2、提供选项“若所选型号库存不足,接收随机分配其他型号”。Obtaining the configuration file: 1. This step does not do inventory verification, and the user can choose any type of mask. 2. Provide the option "if the selected model is insufficient in stock, receive random distribution of other models".

发送对象获取请求:分配随机放行:1、按XX%的比例放行,XX可动态配置。2、如果没有放行,提示“当前抢购用户较多,请稍后再试”;且5秒内按钮置灰不可点击,按钮显示倒计时“请(5)秒后再试”。Send object acquisition request: assign random release: 1. Release according to the proportion of XX%, XX can be dynamically configured. 2. If it is not released, it will prompt "There are many users who are currently snapping up, please try again later"; and the button is grayed out and cannot be clicked within 5 seconds, and the button displays a countdown "Please try again in (5) seconds".

在服务器侧:On the server side:

抢购:1:后台返回抢购是否已经开始,如果未开始,返回未开始信息。2、由后台返回是否已抢购结束。满足以下两个条件之一:a、抢购库存已用完。b、已到设定的抢购结束时间。3、如果已结束直接显示预约结束页面;如果为未结束,则提交到下一步。Snap-buying: 1: The background returns whether the rush-buying has started, and if it has not started, returns the information that it has not started. 2. It will be returned from the background whether the snap-up has ended. One of the following two conditions is met: a. The panic buying stock has been used up. b. It has reached the set end time of snap-up. 3. If it has been completed, the reservation end page will be displayed directly; if it is not completed, submit it to the next step.

抢购登记完成:告知“抢购登记完成、系统正在排队处理,抢购结果半小时后公布,请稍后在”个人中心-》我的抢购中查看。Snap-buying registration is complete: inform "The rush-buying registration is complete and the system is queuing for processing. The rush-buying result will be announced in half an hour. Please check it later in "Personal Center -" My rush-buying.

排队处理:优先安排用户所选型号,若不足,同时用户选择“接收分配”,则按库存多到少,依次分配其他型号给用户。Queue processing: Prioritize the model selected by the user. If the model is insufficient, and the user selects "receive distribution", other models will be allocated to the user in turn according to the inventory.

返回结果给用户:用户在“个人中心-》我的抢购”中查看。Return the result to the user: the user can view it in "Personal Center-"My Purchases".

参见图24,该图为本申请实施例提供的一种摇号模式的流程示意图。Referring to FIG. 24 , which is a schematic flowchart of a lottery mode provided by an embodiment of the present application.

在小程序侧:On the applet side:

用户注册:若用户首次注册,则可以通过调用微信获取用户手机号;若用户非首次注册,则可以跳过此步骤。User registration: If the user registers for the first time, you can obtain the user's mobile phone number by calling WeChat; if the user does not register for the first time, you can skip this step.

进入小程序:1、查看预约购买说明。2、不在预约时间内按钮置灰,预约时间内按钮可点击。Enter the applet: 1. Check the reservation purchase instructions. 2. The button is grayed out outside the appointment time, and the button can be clicked during the appointment time.

获取配置文件:1、此步骤不做库存校验,用户可以选择任何型号的口罩。2、提供选项“若所选型号库存不足,接收随机分配其他型号”。3、增加到达支付还是邮寄的选择(针对订单)。4、如果是选择邮寄的,邮寄地址增加本市判断,非本市不能提交。发送对象获取请求:分配放行:1、按XX%的比例放行,XX可动态配置。2、需让用户必须允许接收通知,否则不能提交;如果用户选择了,一直不出现通知接收确认框,则放行提交。Obtaining the configuration file: 1. This step does not do inventory verification, and the user can choose any type of mask. 2. Provide the option "if the selected model is insufficient in stock, receive random distribution of other models". 3. Increase the choice of arrival payment or mailing (for orders). 4. If mailing is selected, the mailing address should be judged by this city, and it cannot be submitted outside the city. Sending an object acquisition request: Allocating release: 1. Release according to the proportion of XX%, XX can be dynamically configured. 2. The user must be allowed to receive the notification, otherwise the submission cannot be submitted; if the user chooses, the notification reception confirmation box does not appear, then the submission is released.

在服务器侧:On the server side:

抢购:1、后台返回预约是否已经开始,如果未开始返回未开始信息。2、如果已结束直接显示预约结束页面;如果未结束,则提交到下一步。Snap purchase: 1. The background returns whether the appointment has already started, and if it has not started, return the unstarted information. 2. If it has ended, the reservation end page will be displayed directly; if not, submit it to the next step.

抢购登记完成:告知“抢购登记完成,X天内不需要重复提交预约。每天XX:XX公布摇号结果,请在“个人中心-》我的预约”中查看。Snap-buying registration is completed: inform "The rush-buying registration is completed, and there is no need to submit an appointment again within X days. Every day XX: XX announces the lottery result, please check it in "Personal Center-"My Appointment".

排队处理:1、使用公开摇号算法进行摇号。2、X天内已中签用户不得重复摇号(含XX岁以上)。3、X天内已提交预约未中签的,无需重复提交。4、XX岁以上用户,只需提交一次,记录一直生效。5、提供摇号web后天给公证处使用。Queue processing: 1. Use the public lottery algorithm for lottery. 2. Users who have won the lottery within X days cannot repeat the lottery (including those over XX years old). 3. If the appointment has been submitted within X days but has not been selected, there is no need to submit it again. 4. Users over the age of XX only need to submit once, and the record will always take effect. 5. Provide the lottery web to the notary office the day after tomorrow.

返回结果给用户:通过订阅通知推送用户,需提供web后台触发。2、在个人中心展示结果,调整文案,增加预约码。Return the result to the user: To push the user through subscription notifications, a web background trigger is required. 2. Display the results in the personal center, adjust the copywriting, and add an appointment code.

邮寄选择分为邮寄给用户和用户到店领取(凭我的预约信息到线下门店领取)。The mailing options are divided into mailing to the user and the user picking up at the store (according to my appointment information to pick up at the offline store).

提供管理后台修改状态,可以修改为已邮寄或已领取。Provides the management background modification status, which can be modified to have been mailed or received.

我的预约中同步更新状态。Sync update status in my appointments.

基于前述实施例提供的数据处理方法,对本申请实施例提供的相关装置进行介绍。Based on the data processing methods provided by the foregoing embodiments, the related apparatuses provided by the embodiments of the present application are introduced.

本实施例提供一种数据处理装置2500,参见图25,所述装置2500包括获取单元2501、写入单元2502、第一处理单元2503和第二处理单元2504:This embodiment provides a data processing apparatus 2500. Referring to FIG. 25, the apparatus 2500 includes an acquiring unit 2501, a writing unit 2502, a first processing unit 2503, and a second processing unit 2504:

所述获取单元2501,用于获取针对目标对象的对象获取请求;The obtaining unit 2501 is used to obtain an object obtaining request for the target object;

所述写入单元2502,用于将所述对象获取请求写入处于缓存空间中的消息队列;The writing unit 2502 is configured to write the object acquisition request into a message queue in the cache space;

所述第一处理单元2503,用于从所述消息队列中取出所述对象获取请求进行对应处理,将得到的处理结果缓存在所述缓存空间中;The first processing unit 2503 is configured to take out the object acquisition request from the message queue for corresponding processing, and cache the obtained processing result in the cache space;

所述第二处理单元2504,用于根据针对所述目标对象的内容查询请求,在所述缓存空间中查询目标处理结果。The second processing unit 2504 is configured to query the cache space for the target processing result according to the content query request for the target object.

在一种可能的实现方式中,所述写入单元2502具体用于将得到的所述处理结果按照处理次序依次更新到所述目标对象对应的数据库中。In a possible implementation manner, the writing unit 2502 is specifically configured to sequentially update the obtained processing results to the database corresponding to the target object according to the processing order.

在一种可能的实现方式中,若所述对象获取请求是通过第一模式获取的,所述装置还包括摇号单元,具体用于为所述对象获取请求所携带的用户标识分配第一摇号数值;基于所述第一摇号数值将所述对象获取请求划分至多个用户集合中;在确定所述目标对象的实际获取用户时,根据从所述第一摇号数值中确定目标数值,从所述多个用户集合中选取所述目标数值对应的第一目标用户集合;根据提供所述目标对象的店铺标识,确定所述店铺标识所对应店铺中具备所述目标对象的可分配数值;根据所述可分配数值,从所述第一目标用户集合中确定获取所述店铺所提供所述目标对象的实际获取用户。In a possible implementation manner, if the object acquisition request is acquired through the first mode, the apparatus further includes a lottery unit, which is specifically configured to assign a first lottery value to the user ID carried in the object acquisition request ; Divide the object acquisition request into a plurality of user sets based on the first lottery value; When determining the actual acquisition user of the target object, according to determining the target value from the first lottery value, from the multiple Select the first target user set corresponding to the target value from the user sets; according to the store identifier that provides the target object, determine that the store corresponding to the store identifier has the assignable value of the target object; A numerical value is assigned, and the actual acquiring user who acquires the target object provided by the store is determined from the first target user set.

在一种可能的实现方式中,所述摇号单元,还用于若所述第一目标用户集合中对象获取请求所请求的目标对象总数值大于所述可分配数值,通过对所述第一目标用户集合中的用户标识再次摇号,从所述第一目标用户集合中确定出所述实际获取用户;若所述第一目标用户集合中对象获取请求所请求的目标对象总数值小于所述可分配数值,通过调整所述目标数值从所述多个用户集合中获取第二目标用户集合;据所述可分配数值,从所述第一目标用户集合和所述第二目标用户集合中确定获取所述店铺所提供所述目标对象的实际获取用户。In a possible implementation manner, the lottery unit is further configured to: if the total value of the target objects requested by the object acquisition request in the first target user set is greater than the assignable value The user identifiers in the user set are drawn again, and the actual acquired user is determined from the first target user set; if the total value of the target objects requested by the object acquisition request in the first target user set is less than the allocatable value, obtain a second target user set from the multiple user sets by adjusting the target value; according to the assignable value, determine and obtain the target user set from the first target user set and the second target user set The actual acquisition user of the target object provided by the store.

在一种可能的实现方式中,所述装置还包括配置文件单元,用于获取针对所述目标对象的配置文件,所述配置文件标识用于获取所述目标对象的规则参数;若获取模式切换请求,根据所述配置文件切换获取所述目标对象的模式,所述模式包括第一模式或第二模式。In a possible implementation manner, the apparatus further includes a configuration file unit, configured to obtain a configuration file for the target object, where the configuration file identifies a rule parameter used to obtain the target object; if the obtaining mode is switched request, switch a mode for acquiring the target object according to the configuration file, where the mode includes a first mode or a second mode.

在一种可能的实现方式中,所述配置文件单元,还用于获取来自客户端的规则参数更新请求;根据所述规则参数更新请求的指示,对所述配置文件进行更新。In a possible implementation manner, the configuration file unit is further configured to obtain a rule parameter update request from a client; and update the configuration file according to an indication of the rule parameter update request.

在一种可能的实现方式中,所述配置文件单元,还用于获取客户端发送的文件获取请求;向所述客户端发送所述配置文件,用于指示所述客户端在本地对所述配置文件进行第一预订时长的缓存。In a possible implementation manner, the configuration file unit is further configured to obtain a file obtaining request sent by a client; sending the configuration file to the client is used to instruct the client to The configuration file is cached for the duration of the first subscription.

在一种可能的实现方式中,所述内容查询响应还用于指示获取所述内容查询响应的客户端在本地对所述目标处理结果进行第二预定时长的缓存。In a possible implementation manner, the content query response is further used to instruct the client that obtains the content query response to locally cache the target processing result for a second predetermined period of time.

在一种可能的实现方式中,所述装置还包括概率指示单元,用于在所述获取针对目标对象的对象获取请求之前,向所述客户端发送概率指示信息,所述概率指示信息用于指示所述客户端提交所述对象获取请求的提交成功概率。In a possible implementation manner, the apparatus further includes a probability indication unit, configured to send probability indication information to the client before obtaining the object acquisition request for the target object, where the probability indication information is used for Indicates the submission success probability of the client to submit the object acquisition request.

上述实施例提供的数据处理装置,针对高并发获取目标对象的场景,若获取针对目标对象的对象获取请求,并不同步进行是否提供目标对象的处理,而是将对象获取请求写入处于缓存空间中的消息队列中。在可以处理时再从消息队列中取出该对象获取请求,从而实现了对该对象获取请求的异步处理。由此即使在接收对象获取请求的高峰期也可以通过该异步处理机制实现了削峰的效果,降低对数据库的冲击,而且即使在高峰期后接收的对象获取请求骤减,也可以继续处理消息队列中留存的对象获取请求,实现了填谷的作用。在高峰期除了对象获取请求会出现高并发的情况外,海量的内容查询请求也会关联出现,通过将针对对象获取请求的处理结果缓存在缓存空间中,可以在基于内容查询结果直接在缓存空间查找、返回。而不再需要和保存处理结果的数据库进行额外的数据交互,减少了对数据库的访问量,从而在高峰期有效保护了数据库,并提高了查询响应效率。The data processing apparatus provided by the above embodiment, for the scenario of acquiring the target object with high concurrency, if an object acquisition request for the target object is acquired, the processing of whether to provide the target object is not performed synchronously, but the object acquisition request is written in the cache space. in the message queue. The object acquisition request is taken out from the message queue when it can be processed, thereby realizing asynchronous processing of the object acquisition request. Therefore, even in the peak period of receiving object acquisition requests, the asynchronous processing mechanism can achieve the effect of peak shaving, reduce the impact on the database, and even if the received object acquisition requests drop sharply after the peak period, messages can continue to be processed The object acquisition request retained in the queue realizes the role of filling the valley. In addition to the high concurrency of object acquisition requests during peak periods, a large number of content query requests will also appear in association. By caching the processing results of object acquisition requests in the cache space, the content-based query results can be directly stored in the cache space. Find and return. There is no need for additional data interaction with the database that saves the processing results, which reduces the amount of access to the database, thus effectively protecting the database during peak periods and improving query response efficiency.

本申请实施例还提供了一种用于数据处理的设备,下面将从硬件实体化的角度对本申请实施例提供的用于数据处理的设备进行介绍。The embodiment of the present application further provides a device for data processing, and the following will introduce the device for data processing provided by the embodiment of the present application from the perspective of hardware materialization.

参见图26,图26是本申请实施例提供的一种服务器结构示意图,该服务器1400可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(centralprocessing units,CPU)1422(例如,一个或一个以上处理器)和存储器1432,一个或一个以上存储应用程序1442或数据1444的存储介质1430(例如一个或一个以上海量存储设备)。其中,存储器1432和存储介质1430可以是短暂存储或持久存储。存储在存储介质1430的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器1422可以设置为与存储介质1430通信,在服务器1400上执行存储介质1430中的一系列指令操作。Referring to FIG. 26 , FIG. 26 is a schematic structural diagram of a server provided by an embodiment of the present application. The server 1400 may vary greatly due to different configurations or performance, and may include one or more central processing units (CPUs) 1422 (eg, one or more processors) and memory 1432, one or more storage media 1430 (eg, one or more mass storage devices) storing applications 1442 or data 1444. Among them, the memory 1432 and the storage medium 1430 may be short-term storage or persistent storage. The program stored in the storage medium 1430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1422 may be configured to communicate with the storage medium 1430 to execute a series of instruction operations in the storage medium 1430 on the server 1400 .

服务器1400还可以包括一个或一个以上电源1426,一个或一个以上有线或无线网络接口1450,一个或一个以上输入输出接口1458,和/或,一个或一个以上操作系统1441,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。Server 1400 may also include one or more power supplies 1426, one or more wired or wireless network interfaces 1450, one or more input and output interfaces 1458, and/or, one or more operating systems 1441, such as Windows Server™, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and so on.

上述实施例中由服务器所执行的步骤可以基于该图26所示的服务器结构。The steps performed by the server in the above embodiment may be based on the server structure shown in FIG. 26 .

其中,CPU 1422用于执行如下步骤:Among them, the CPU 1422 is used to perform the following steps:

获取针对目标对象的对象获取请求;Get the object acquisition request for the target object;

将所述对象获取请求写入处于缓存空间中的消息队列;writing the object acquisition request into the message queue in the cache space;

从所述消息队列中取出所述对象获取请求进行对应处理,将得到的处理结果缓存在所述缓存空间中;Take out the object acquisition request from the message queue for corresponding processing, and cache the obtained processing result in the cache space;

根据针对所述目标对象的内容查询请求,在所述缓存空间中查询目标处理结果。According to the content query request for the target object, query the target processing result in the cache space.

可选的,CPU 1422还可以执行本申请实施例中数据处理方法任一具体实现方式的方法步骤。Optionally, the CPU 1422 may also execute the method steps of any specific implementation manner of the data processing method in the embodiments of the present application.

针对上文描述的数据处理方法,本申请实施例还提供了一种用于数据处理的终端设备,以使上述数据处理方法在实际中实现以及应用。For the data processing method described above, an embodiment of the present application further provides a terminal device for data processing, so that the above data processing method can be implemented and applied in practice.

参见图27,图27为本申请实施例提供的一种终端设备的结构示意图。为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该终端设备可以为包括手机、平板电脑、个人数字助理(Personal DigitalAssistant,简称PDA)等任意终端设备,以终端设备为手机为例:Referring to FIG. 27, FIG. 27 is a schematic structural diagram of a terminal device provided by an embodiment of the present application. For the convenience of description, only the parts related to the embodiments of the present application are shown, and the specific technical details are not disclosed, please refer to the method part of the embodiments of the present application. The terminal device can be any terminal device including a mobile phone, a tablet computer, a personal digital assistant (Personal Digital Assistant, PDA for short), etc. The terminal device is a mobile phone as an example:

图27示出的是与本申请实施例提供的终端设备相关的手机的部分结构的框图。参考图27,该手机包括:射频(Radio Frequency,简称RF)电路1510、存储器1520、输入单元1530、显示单元1540、传感器1550、音频电路1560、无线保真(wireless fidelity,简称WiFi)模块1570、处理器1580、以及电源1590等部件。本领域技术人员可以理解,图27中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。FIG. 27 is a block diagram showing a partial structure of a mobile phone related to a terminal device provided by an embodiment of the present application. Referring to FIG. 27 , the mobile phone includes: a radio frequency (Radio Frequency, RF for short) circuit 1510, a memory 1520, an input unit 1530, a display unit 1540, a sensor 1550, an audio circuit 1560, a wireless fidelity (wireless fidelity, WiFi for short) module 1570, The processor 1580, the power supply 1590 and other components. Those skilled in the art can understand that the structure of the mobile phone shown in FIG. 27 does not constitute a limitation on the mobile phone, and may include more or less components than the one shown, or combine some components, or arrange different components.

下面结合图27对手机的各个构成部件进行具体的介绍:The following is a detailed introduction to each component of the mobile phone in conjunction with Figure 27:

RF电路1510可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器1580处理;另外,将设计上行的数据发送给基站。通常,RF电路1510包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low NoiseAmplifier,简称LNA)、双工器等。此外,RF电路1510还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,简称GSM)、通用分组无线服务(GeneralPacket Radio Service,简称GPRS)、码分多址(Code Division Multiple Access,简称CDMA)、宽带码分多址(Wideband Code Division Multiple Access,简称WCDMA)、长期演进(Long Term Evolution,简称LTE)、电子邮件、短消息服务(Short Messaging Service,简称SMS)等。The RF circuit 1510 can be used for receiving and sending signals during the process of sending and receiving information or talking. In particular, after receiving the downlink information of the base station, it is processed by the processor 1580; in addition, it sends the designed uplink data to the base station. Generally, the RF circuit 1510 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA for short), a duplexer, and the like. In addition, RF circuitry 1510 may also communicate with networks and other devices via wireless communications. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM for short), General Packet Radio Service (GPRS for short), Code Division Multiple Access (Code Division Multiple Access) Division Multiple Access (CDMA for short), Wideband Code Division Multiple Access (WCDMA for short), Long Term Evolution (LTE for short), E-mail, Short Messaging Service (Short Messaging Service, SMS for short), etc. .

存储器1520可用于存储软件程序以及模块,处理器1580通过运行存储在存储器1520的软件程序以及模块,从而实现手机的各种功能应用以及数据处理。存储器1520可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器1520可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 1520 may be used to store software programs and modules, and the processor 1580 implements various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1520 . The memory 1520 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required for at least one function, and the like; Data created by the use of the mobile phone (such as audio data, phone book, etc.), etc. Additionally, memory 1520 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.

输入单元1530可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元1530可包括触控面板1531以及其他输入设备1532。触控面板1531,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1531上或在触控面板1531附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板1531可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1580,并能接收处理器1580发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1531。除了触控面板1531,输入单元1530还可以包括其他输入设备1532。具体地,其他输入设备1532可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 1530 may be used for receiving inputted numerical or character information, and generating key signal input related to user setting and function control of the mobile phone. Specifically, the input unit 1530 may include a touch panel 1531 and other input devices 1532 . The touch panel 1531, also known as a touch screen, can collect the user's touch operations on or near it (such as the user's finger, stylus, etc., any suitable object or accessory on or near the touch panel 1531). operation), and drive the corresponding connection device according to the preset program. Optionally, the touch panel 1531 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the touch controller. To the processor 1580, and can receive the command sent by the processor 1580 and execute it. In addition, the touch panel 1531 can be realized by various types of resistive, capacitive, infrared, and surface acoustic waves. Besides the touch panel 1531 , the input unit 1530 may also include other input devices 1532 . Specifically, other input devices 1532 may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, and the like.

显示单元1540可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元1540可包括显示面板1541,可选的,可以采用液晶显示器(LiquidCrystal Display,简称LCD)、有机发光二极管(Organic Light-Emitting Diode,简称OLED)等形式来配置显示面板1541。进一步的,触控面板1531可覆盖显示面板1541,当触控面板1531检测到在其上或附近的触摸操作后,传送给处理器1580以确定触摸事件的类型,随后处理器1580根据触摸事件的类型在显示面板1541上提供相应的视觉输出。虽然在图27中,触控面板1531与显示面板1541是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板1531与显示面板1541集成而实现手机的输入和输出功能。The display unit 1540 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 1540 may include a display panel 1541 . Optionally, the display panel 1541 may be configured in the form of a liquid crystal display (LCD for short), an organic light-emitting diode (OLED for short). Further, the touch panel 1531 may cover the display panel 1541. When the touch panel 1531 detects a touch operation on or near it, it transmits it to the processor 1580 to determine the type of the touch event, and then the processor 1580 determines the type of the touch event according to the touch event. Type provides corresponding visual output on display panel 1541. Although in FIG. 27, the touch panel 1531 and the display panel 1541 are used as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 1531 and the display panel 1541 can be integrated to form Realize the input and output functions of the mobile phone.

手机还可包括至少一种传感器1550,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1541的亮度,接近传感器可在手机移动到耳边时,关闭显示面板1541和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The cell phone may also include at least one sensor 1550, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1541 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 1541 and/or when the mobile phone is moved to the ear. or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes), and can detect the magnitude and direction of gravity when it is stationary. games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. Repeat.

音频电路1560、扬声器1561,传声器1562可提供用户与手机之间的音频接口。音频电路1560可将接收到的音频数据转换后的电信号,传输到扬声器1561,由扬声器1561转换为声音信号输出;另一方面,传声器1562将收集的声音信号转换为电信号,由音频电路1560接收后转换为音频数据,再将音频数据输出处理器1580处理后,经RF电路1510以发送给比如另一手机,或者将音频数据输出至存储器1520以便进一步处理。The audio circuit 1560, the speaker 1561, and the microphone 1562 can provide an audio interface between the user and the mobile phone. The audio circuit 1560 can convert the received audio data into an electrical signal, and transmit it to the speaker 1561, and the speaker 1561 converts it into a sound signal for output; on the other hand, the microphone 1562 converts the collected sound signal into an electrical signal, which is converted by the audio circuit 1560 After receiving, it is converted into audio data, and then the audio data is output to the processor 1580 for processing, and then sent to, for example, another mobile phone through the RF circuit 1510, or the audio data is output to the memory 1520 for further processing.

WiFi属于短距离无线传输技术,手机通过WiFi模块1570可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图27示出了WiFi模块1570,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-distance wireless transmission technology. The mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 1570. It provides users with wireless broadband Internet access. Although FIG. 27 shows the WiFi module 1570, it can be understood that it is not a necessary component of the mobile phone, and can be completely omitted as required within the scope of not changing the essence of the invention.

处理器1580是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1520内的软件程序和/或模块,以及调用存储在存储器1520内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器1580可包括一个或多个处理单元;优选的,处理器1580可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1580中。The processor 1580 is the control center of the mobile phone, using various interfaces and lines to connect various parts of the entire mobile phone, by running or executing the software programs and/or modules stored in the memory 1520, and calling the data stored in the memory 1520. Various functions of the mobile phone and processing data, so as to monitor the mobile phone as a whole. Optionally, the processor 1580 may include one or more processing units; preferably, the processor 1580 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc. , the modem processor mainly deals with wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 1580.

手机还包括给各个部件供电的电源1590(比如电池),优选的,电源可以通过电源管理系统与处理器1580逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone also includes a power supply 1590 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 1580 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system.

尽管未示出,手机还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown, the mobile phone may also include a camera, a Bluetooth module, and the like, which will not be repeated here.

在本申请实施例中,该手机所包括的存储器1520可以存储程序代码,并将所述程序代码传输给所述处理器。In this embodiment of the present application, the memory 1520 included in the mobile phone may store program codes, and transmit the program codes to the processor.

该手机所包括的处理器1580可以根据所述程序代码中的指令执行上述实施例提供的数据处理方法。The processor 1580 included in the mobile phone can execute the data processing method provided by the foregoing embodiment according to the instructions in the program code.

本申请实施例还提供一种计算机可读存储介质,用于存储计算机程序,该计算机程序用于执行上述实施例提供的数据处理方法。Embodiments of the present application further provide a computer-readable storage medium for storing a computer program, where the computer program is used to execute the data processing method provided by the foregoing embodiments.

本申请实施例还提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方面的各种可选实现方式中提供的数据处理方法。Embodiments of the present application also provide a computer program product or computer program, where the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data processing methods provided in various optional implementations of the above aspects.

本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质可以是下述介质中的至少一种:只读存储器(英文:read-only memory,缩写:ROM)、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by program instructions related to hardware, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the execution includes: The steps of the above method embodiment; and the aforementioned storage medium may be at least one of the following media: read-only memory (English: read-only memory, abbreviation: ROM), RAM, magnetic disk or optical disk and other various storage media medium of program code.

需要说明的是,本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于设备及系统实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的设备及系统实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。It should be noted that each embodiment in this specification is described in a progressive manner, and the same and similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. place. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for related parts. The device and system embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.

以上所述,仅为本申请的一种具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应该以权利要求的保护范围为准。The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited to this. Substitutions should be covered within the protection scope of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (15)

1.一种数据处理方法,其特征在于,所述方法包括:1. a data processing method, is characterized in that, described method comprises: 获取针对目标对象的对象获取请求;Get the object acquisition request for the target object; 将所述对象获取请求写入处于缓存空间中的消息队列;writing the object acquisition request into the message queue in the cache space; 从所述消息队列中取出所述对象获取请求进行对应处理,将得到的处理结果缓存在所述缓存空间中;Take out the object acquisition request from the message queue for corresponding processing, and cache the obtained processing result in the cache space; 根据针对所述目标对象的内容查询请求,在所述缓存空间中查询目标处理结果。According to the content query request for the target object, query the target processing result in the cache space. 2.根据权利要求1所述的方法,其特征在于,所述方法还包括:2. The method according to claim 1, wherein the method further comprises: 将得到的所述处理结果按照处理次序依次更新到所述目标对象对应的数据库中。The obtained processing results are sequentially updated to the database corresponding to the target object according to the processing order. 3.根据权利要求1所述的方法,其特征在于,若所述对象获取请求是通过第一模式获取的,所述方法还包括:3. The method according to claim 1, wherein if the object acquisition request is acquired through the first mode, the method further comprises: 为所述对象获取请求所携带的用户标识分配第一摇号数值;Allocate the first lottery value for the user ID carried in the object acquisition request; 基于所述第一摇号数值将所述对象获取请求划分至多个用户集合中;dividing the object acquisition request into a plurality of user sets based on the first lottery value; 在确定所述目标对象的实际获取用户时,根据从所述第一摇号数值中确定目标数值,从所述多个用户集合中选取所述目标数值对应的第一目标用户集合;When determining the actual acquired user of the target object, according to determining the target value from the first lottery value, select a first target user set corresponding to the target value from the multiple user sets; 根据提供所述目标对象的店铺标识,确定所述店铺标识所对应店铺中具备所述目标对象的可分配数值;According to the store identifier that provides the target object, determine that the store corresponding to the store identifier has an assignable value of the target object; 根据所述可分配数值,从所述第一目标用户集合中确定获取所述店铺所提供所述目标对象的实际获取用户。According to the assignable value, the actual acquiring user who acquires the target object provided by the store is determined from the first target user set. 4.根据权利要求3所述的方法,其特征在于,所述根据所述可分配数值,从所述第一目标用户集合中确定获取所述店铺所提供所述目标对象的实际获取用户,包括:4 . The method according to claim 3 , wherein, according to the assignable value, determining the actual user who obtains the target object provided by the store from the first target user set, comprising: 4 . : 若所述第一目标用户集合中对象获取请求所请求的目标对象总数值大于所述可分配数值,通过对所述第一目标用户集合中的用户标识再次摇号,从所述第一目标用户集合中确定出所述实际获取用户;If the total value of the target objects requested by the object acquisition request in the first target user set is greater than the allocatable value, the user IDs in the first target user set are drawn again from the first target user set. determine the actual acquired user; 若所述第一目标用户集合中对象获取请求所请求的目标对象总数值小于所述可分配数值,通过调整所述目标数值从所述多个用户集合中获取第二目标用户集合;If the total value of the target objects requested by the object acquisition request in the first target user set is less than the assignable value, obtain a second target user set from the multiple user sets by adjusting the target value; 据所述可分配数值,从所述第一目标用户集合和所述第二目标用户集合中确定获取所述店铺所提供所述目标对象的实际获取用户。According to the assignable value, the actual acquiring user who acquires the target object provided by the store is determined from the first target user set and the second target user set. 5.根据权利要求1-4任意一项所述的方法,其特征在于,所述方法还包括:5. The method according to any one of claims 1-4, wherein the method further comprises: 获取针对所述目标对象的配置文件,所述配置文件标识用于获取所述目标对象的规则参数;obtaining a configuration file for the target object, the configuration file identifying a rule parameter for obtaining the target object; 若获取模式切换请求,根据所述配置文件切换获取所述目标对象的模式,所述模式包括第一模式或第二模式,所述第一模式和所述第二模式采用不同的对象获取方式。If a mode switching request is acquired, the mode for acquiring the target object is switched according to the configuration file, the mode includes a first mode or a second mode, and the first mode and the second mode use different object acquisition methods. 6.根据权利要求5所述的方法,其特征在于,所述方法还包括:6. The method according to claim 5, wherein the method further comprises: 获取来自客户端的规则参数更新请求;Get the rule parameter update request from the client; 根据所述规则参数更新请求的指示,对所述配置文件进行更新。The configuration file is updated according to the indication of the rule parameter update request. 7.根据权利要求5所述的方法,其特征在于,所述方法还包括:7. The method according to claim 5, wherein the method further comprises: 获取客户端发送的文件获取请求;Get the file acquisition request sent by the client; 向所述客户端发送所述配置文件,用于指示所述客户端在本地对所述配置文件进行第一预订时长的缓存。Sending the configuration file to the client is used to instruct the client to locally cache the configuration file for the first predetermined duration. 8.根据权利要求1-4任意一项所述的方法,其特征在于,所述内容查询响应还用于指示获取所述内容查询响应的客户端在本地对所述目标处理结果进行第二预定时长的缓存。8 . The method according to claim 1 , wherein the content query response is further used to instruct a client that obtains the content query response to perform a second reservation on the target processing result locally. 9 . long-term cache. 9.根据权利要求1所述的方法,其特征在于,在所述获取针对目标对象的对象获取请求之前,所述方法还包括:9. The method according to claim 1, characterized in that, before the acquiring the object acquisition request for the target object, the method further comprises: 向所述客户端发送概率指示信息,所述概率指示信息用于指示所述客户端提交所述对象获取请求的提交成功概率。Send probability indication information to the client, where the probability indication information is used to indicate the success probability of submitting the object acquisition request to the client. 10.一种数据处理装置,其特征在于,所述装置包括获取单元、写入单元、第一处理单元和第二处理单元:10. A data processing device, characterized in that the device comprises an acquisition unit, a writing unit, a first processing unit and a second processing unit: 所述获取单元,用于获取针对目标对象的对象获取请求;The obtaining unit is used to obtain an object obtaining request for the target object; 所述写入单元,用于将所述对象获取请求写入处于缓存空间中的消息队列;the writing unit, configured to write the object acquisition request into a message queue in the cache space; 所述第一处理单元,用于从所述消息队列中取出所述对象获取请求进行对应处理,将得到的处理结果缓存在所述缓存空间中;The first processing unit is configured to take out the object acquisition request from the message queue for corresponding processing, and cache the obtained processing result in the cache space; 所述第二处理单元,用于根据针对所述目标对象的内容查询请求,在所述缓存空间中查询目标处理结果。The second processing unit is configured to query the cache space for the target processing result according to the content query request for the target object. 11.根据权利要求10所述的装置,其特征在于,所述写入单元具体用于:11. The device according to claim 10, wherein the writing unit is specifically used for: 将得到的所述处理结果按照处理次序依次更新到所述目标对象对应的数据库中。The obtained processing results are sequentially updated to the database corresponding to the target object according to the processing order. 12.根据权利要求10所述的装置,其特征在于,若所述对象获取请求是通过第一模式获取的,所述装置还包括摇号单元,具体用于:12. The apparatus according to claim 10, wherein if the object acquisition request is acquired through the first mode, the apparatus further comprises a lottery unit, which is specifically configured to: 为所述对象获取请求所携带的用户标识分配第一摇号数值;Allocate the first lottery value for the user ID carried in the object acquisition request; 基于所述第一摇号数值将所述对象获取请求划分至多个用户集合中;dividing the object acquisition request into a plurality of user sets based on the first lottery value; 在确定所述目标对象的实际获取用户时,根据从所述第一摇号数值中确定目标数值,从所述多个用户集合中选取所述目标数值对应的第一目标用户集合;When determining the actual acquired user of the target object, according to determining the target value from the first lottery value, select a first target user set corresponding to the target value from the multiple user sets; 根据提供所述目标对象的店铺标识,确定所述店铺标识所对应店铺中具备所述目标对象的可分配数值;According to the store identifier that provides the target object, determine that the store corresponding to the store identifier has an assignable value of the target object; 根据所述可分配数值,从所述第一目标用户集合中确定获取所述店铺所提供所述目标对象的实际获取用户。According to the assignable value, the actual acquiring user who acquires the target object provided by the store is determined from the first target user set. 13.根据权利要求12所述的装置,其特征在于,所述摇号单元还用于:13. The device according to claim 12, wherein the lottery unit is further used for: 若所述第一目标用户集合中对象获取请求所请求的目标对象总数值大于所述可分配数值,通过对所述第一目标用户集合中的用户标识再次摇号,从所述第一目标用户集合中确定出所述实际获取用户;If the total value of the target objects requested by the object acquisition request in the first target user set is greater than the allocatable value, the user IDs in the first target user set are drawn again from the first target user set. determine the actual acquired user; 若所述第一目标用户集合中对象获取请求所请求的目标对象总数值小于所述可分配数值,通过调整所述目标数值从所述多个用户集合中获取第二目标用户集合;If the total value of the target objects requested by the object acquisition request in the first target user set is less than the assignable value, obtain a second target user set from the multiple user sets by adjusting the target value; 据所述可分配数值,从所述第一目标用户集合和所述第二目标用户集合中确定获取所述店铺所提供所述目标对象的实际获取用户。According to the assignable value, the actual acquiring user who acquires the target object provided by the store is determined from the first target user set and the second target user set. 14.一种用于数据处理的设备,其特征在于,所述设备包括处理器以及存储器:14. A device for data processing, characterized in that the device comprises a processor and a memory: 所述存储器用于存储程序代码,并将所述程序代码传输给所述处理器;the memory is used to store program code and transmit the program code to the processor; 所述处理器用于根据所述程序代码中的指令执行权利要求1-9任意一项所述的方法。The processor is configured to execute the method of any one of claims 1-9 according to instructions in the program code. 15.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储计算机程序,所述计算机程序用于执行权利要求1-9任意一项所述的方法。15. A computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method of any one of claims 1-9.
CN202010981825.1A 2020-09-17 2020-09-17 Data processing method and related device Pending CN112084217A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010981825.1A CN112084217A (en) 2020-09-17 2020-09-17 Data processing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010981825.1A CN112084217A (en) 2020-09-17 2020-09-17 Data processing method and related device

Publications (1)

Publication Number Publication Date
CN112084217A true CN112084217A (en) 2020-12-15

Family

ID=73736605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010981825.1A Pending CN112084217A (en) 2020-09-17 2020-09-17 Data processing method and related device

Country Status (1)

Country Link
CN (1) CN112084217A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667681A (en) * 2020-12-21 2021-04-16 北京字跳网络技术有限公司 Data caching method and device and storage medium
CN112801753A (en) * 2021-02-09 2021-05-14 深圳市富途网络科技有限公司 Page display method, device and medium
CN112925578A (en) * 2021-01-28 2021-06-08 北京达佳互联信息技术有限公司 Task processing method and device and storage medium
CN113568939A (en) * 2021-08-05 2021-10-29 宁畅信息产业(北京)有限公司 Energy consumption monitoring method and device, server and computer readable storage medium
CN113886494A (en) * 2021-09-30 2022-01-04 完美世界(北京)软件科技发展有限公司 Message storage method, device, device and computer readable medium for instant messaging
CN113961595A (en) * 2021-10-19 2022-01-21 奇安信科技集团股份有限公司 Data query method, device, computer equipment and storage medium
CN114022250A (en) * 2021-11-09 2022-02-08 北京沃东天骏信息技术有限公司 Componentized drawing method, system, electronic equipment and computer readable medium
CN114896281A (en) * 2022-05-11 2022-08-12 中国农业银行股份有限公司 Data processing method and system and electronic equipment
CN115952202A (en) * 2023-02-24 2023-04-11 北京锐服信科技有限公司 Query method

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104835070A (en) * 2015-03-20 2015-08-12 邱世军 Grouped lottery system and method
US20150379059A1 (en) * 2014-06-27 2015-12-31 Sebastian Schroetel Accommodating concurrent changes in underlying data during reporting
CN107992517A (en) * 2017-10-26 2018-05-04 深圳市金立通信设备有限公司 A kind of data processing method, server and computer-readable medium
CN108133399A (en) * 2016-11-30 2018-06-08 北京京东尚科信息技术有限公司 The second of high concurrent fast-response kills the method, apparatus and system that inventory precisely reduces
CN108416643A (en) * 2018-01-10 2018-08-17 链家网(北京)科技有限公司 A kind of competition for orders method and system
CN108418821A (en) * 2018-03-06 2018-08-17 北京焦点新干线信息技术有限公司 Redis and Kafka-based high-concurrency scene processing method and device for online shopping system
CN109960487A (en) * 2017-12-14 2019-07-02 北京京东尚科信息技术有限公司 A kind of method and apparatus of extracting object
CN110704110A (en) * 2019-09-30 2020-01-17 浪潮软件股份有限公司 A method and device for improving the response speed of a system under high concurrency
CN110943934A (en) * 2019-11-19 2020-03-31 上海钧正网络科技有限公司 Service request processing method, system, terminal and readable storage medium
CN110968644A (en) * 2019-11-29 2020-04-07 腾讯科技(深圳)有限公司 Data processing method and equipment
US20200349160A1 (en) * 2018-01-19 2020-11-05 Alibaba Group Holding Limited Data query method, apparatus and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150379059A1 (en) * 2014-06-27 2015-12-31 Sebastian Schroetel Accommodating concurrent changes in underlying data during reporting
CN104835070A (en) * 2015-03-20 2015-08-12 邱世军 Grouped lottery system and method
CN108133399A (en) * 2016-11-30 2018-06-08 北京京东尚科信息技术有限公司 The second of high concurrent fast-response kills the method, apparatus and system that inventory precisely reduces
CN107992517A (en) * 2017-10-26 2018-05-04 深圳市金立通信设备有限公司 A kind of data processing method, server and computer-readable medium
CN109960487A (en) * 2017-12-14 2019-07-02 北京京东尚科信息技术有限公司 A kind of method and apparatus of extracting object
CN108416643A (en) * 2018-01-10 2018-08-17 链家网(北京)科技有限公司 A kind of competition for orders method and system
US20200349160A1 (en) * 2018-01-19 2020-11-05 Alibaba Group Holding Limited Data query method, apparatus and device
CN108418821A (en) * 2018-03-06 2018-08-17 北京焦点新干线信息技术有限公司 Redis and Kafka-based high-concurrency scene processing method and device for online shopping system
CN110704110A (en) * 2019-09-30 2020-01-17 浪潮软件股份有限公司 A method and device for improving the response speed of a system under high concurrency
CN110943934A (en) * 2019-11-19 2020-03-31 上海钧正网络科技有限公司 Service request processing method, system, terminal and readable storage medium
CN110968644A (en) * 2019-11-29 2020-04-07 腾讯科技(深圳)有限公司 Data processing method and equipment

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667681A (en) * 2020-12-21 2021-04-16 北京字跳网络技术有限公司 Data caching method and device and storage medium
CN112925578B (en) * 2021-01-28 2024-01-30 北京达佳互联信息技术有限公司 Task processing method, device and storage medium
CN112925578A (en) * 2021-01-28 2021-06-08 北京达佳互联信息技术有限公司 Task processing method and device and storage medium
CN112801753A (en) * 2021-02-09 2021-05-14 深圳市富途网络科技有限公司 Page display method, device and medium
CN112801753B (en) * 2021-02-09 2024-04-23 深圳市富途网络科技有限公司 Page display method, device and medium
CN113568939A (en) * 2021-08-05 2021-10-29 宁畅信息产业(北京)有限公司 Energy consumption monitoring method and device, server and computer readable storage medium
CN113568939B (en) * 2021-08-05 2024-05-24 宁畅信息产业(北京)有限公司 Energy consumption monitoring method, device, server and computer readable storage medium
CN113886494A (en) * 2021-09-30 2022-01-04 完美世界(北京)软件科技发展有限公司 Message storage method, device, device and computer readable medium for instant messaging
CN113961595A (en) * 2021-10-19 2022-01-21 奇安信科技集团股份有限公司 Data query method, device, computer equipment and storage medium
CN114022250A (en) * 2021-11-09 2022-02-08 北京沃东天骏信息技术有限公司 Componentized drawing method, system, electronic equipment and computer readable medium
CN114896281A (en) * 2022-05-11 2022-08-12 中国农业银行股份有限公司 Data processing method and system and electronic equipment
CN115952202B (en) * 2023-02-24 2023-08-22 北京锐服信科技有限公司 Big data fragment query method based on cache
CN115952202A (en) * 2023-02-24 2023-04-11 北京锐服信科技有限公司 Query method

Similar Documents

Publication Publication Date Title
CN112084217A (en) Data processing method and related device
US11537450B2 (en) Method, apparatus, and mobile terminal for associating notification messages
CN107025225B (en) A kind of parallel execution method and apparatus of terminal database
CN107896243B (en) Acceleration method and device for network data loading, storage medium and mobile terminal
CN108121803B (en) Method and server for determining page layout
CN113420051B (en) Data query method and device, electronic equipment and storage medium
WO2018097890A1 (en) Application program interface for managing complication data
CN115454286B (en) Application data processing method and device and terminal equipment
CN112597361B (en) Ordering processing method and device, electronic equipment and storage medium
AU2018352618A1 (en) Icon display method, device, and system
CN111124412A (en) Game page drawing method, device, equipment and storage medium
CN111459565A (en) Method and device for rendering client page and mobile terminal
CN111080429A (en) Virtual resource acquisition method, device and storage medium
CN112925878A (en) Data processing method and device
CN111367502A (en) Numerical value processing method and device
CN107368998A (en) Schedule management method and related products
CN117482498B (en) A cloud game processing method, cloud game local area network, device and storage medium
CN112306704B (en) Numerical packet transfer method, terminal, server, system and storage medium
CN116661840A (en) Offline data processing method and device and storage medium
CN109471708B (en) Task processing method, device and system
CN115105838A (en) List generation method and related device
WO2022151903A1 (en) Distributed file access method, and related device
CN116954781A (en) Multi-screen running method, device and equipment of program and storage medium
CN119226593A (en) A content recommendation method, device and related products
CN115525554A (en) Model automated testing method, system and storage medium

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