CN106570060B - Random extraction method and device for data in information flow - Google Patents

Random extraction method and device for data in information flow Download PDF

Info

Publication number
CN106570060B
CN106570060B CN201610873839.5A CN201610873839A CN106570060B CN 106570060 B CN106570060 B CN 106570060B CN 201610873839 A CN201610873839 A CN 201610873839A CN 106570060 B CN106570060 B CN 106570060B
Authority
CN
China
Prior art keywords
data
cache
random
logical page
randomly
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.)
Active
Application number
CN201610873839.5A
Other languages
Chinese (zh)
Other versions
CN106570060A (en
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.)
Weibo Internet Technology China Co Ltd
Original Assignee
Weibo Internet Technology China 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 Weibo Internet Technology China Co Ltd filed Critical Weibo Internet Technology China Co Ltd
Priority to CN201610873839.5A priority Critical patent/CN106570060B/en
Publication of CN106570060A publication Critical patent/CN106570060A/en
Application granted granted Critical
Publication of CN106570060B publication Critical patent/CN106570060B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/25Integrating or interfacing systems involving database management systems
    • G06F16/254Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Computing Systems (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明实施例提供一种信息流中数据的随机抽取方法及装置,用以有效降低内存和数据库带宽消耗,提升数据读取性能。信息流中数据的随机抽取方法,包括:根据信息流中随机抽取数据的业务需求设置随机抽取参数,包括:最新动态数据总量和随机抽取数量;根据最新动态数据总量、以及随机抽取数量确定分页数量,并根据确定出的分页数量随机选取逻辑页码;根据所述逻辑页码查询对应的缓存键值是否有缓存数据,如果有,则直接在缓存中读取缓存键值对应的缓存数据进行展示;否则,按照所述逻辑页码和随机抽取数量在数据库内读取分页数据进行展示,并将读取出的分页数据存储到缓存中,缓存键值包括业务唯一标识码和所述逻辑页码。

Figure 201610873839

Embodiments of the present invention provide a method and device for randomly extracting data in an information stream, so as to effectively reduce memory and database bandwidth consumption and improve data reading performance. The random extraction method of data in the information flow, including: setting random extraction parameters according to the business requirements of randomly extracting data in the information flow, including: the total amount of the latest dynamic data and the number of random extractions; determined according to the total amount of the latest dynamic data and the number of random extractions The number of pages, and the logical page number is randomly selected according to the determined number of pages; according to the logical page number, the corresponding cache key value is queried whether there is cache data, and if so, the cache data corresponding to the cache key value is directly read in the cache for display. ; Otherwise, read the paging data in the database for display according to the logical page number and the randomly selected quantity, and store the read paging data in the cache, and the cache key value includes the service unique identification code and the logical page number.

Figure 201610873839

Description

一种信息流中数据的随机抽取方法及装置Method and device for random extraction of data in information flow

技术领域technical field

本发明属于计算机技术领域,尤其涉及一种信息流中数据的随机抽取方法及装置。The invention belongs to the technical field of computers, and in particular relates to a method and device for randomly extracting data in an information stream.

背景技术Background technique

随着互联网技术的进步,社交网络(Social Network Service,SNS)的发展引人注目。社交网络在人们的生活中扮演着重要的角色,已成为覆盖用户最广、传播影响最大、商业价值最高的网络业务。With the advancement of Internet technology, the development of social network (Social Network Service, SNS) is eye-catching. Social networks play an important role in people's lives, and have become the network business with the widest coverage, the greatest influence, and the highest commercial value.

目前社交网络中信息流(News Feed)的生产和传播速度非常快,以微博平台为例,在微博大屏幕(又称微博墙,是在展会、音乐会、行业峰会、电视直播、婚礼现场等场所展示特定主题微博的大屏幕)和其他互动产品中,通常需要从信息流的最新动态数据内随机抽取部分数据进行展示。例如,从信息流的最新1000条数据内随机抽取10条数据进行展示,或者从信息流的最新10000条数据内随机抽取50条数据进行展示,等等。At present, the production and dissemination of news feeds in social networks is very fast. Taking the Weibo platform as an example, the big screen of Weibo (also known as Weibo Wall) is used in exhibitions, concerts, industry summits, live TV, weddings, etc. It is usually necessary to randomly select part of the data from the latest dynamic data of the information flow for display in the large screen of microblogs with a specific theme) and other interactive products in places such as the scene. For example, randomly select 10 pieces of data from the latest 1,000 pieces of data in the information flow for display, or randomly select 50 pieces of data from the latest 10,000 pieces of data in the information flow for display, and so on.

本发明实施例中,可以将从信息流的最新动态数据内随机抽取部分数据进行展示的实际需求简称为“信息流中随机抽取数据的业务需求”。假设信息流中随机抽取数据的业务需求为:从信息流的最新N条数据内随机抽取n条数据进行展示。现有技术中提供的解决方案为:In this embodiment of the present invention, the actual requirement of randomly extracting part of the data from the latest dynamic data of the information flow for display may be referred to as "the business requirement of randomly extracting data from the information flow" for short. Assume that the business requirement of randomly extracting data in the information flow is: randomly extract n pieces of data from the latest N pieces of data in the information flow for display. The solutions provided in the prior art are:

步骤1、按业务需求从数据库内信息流读取最新N条数据,得到读取总数N;为了提升性能,一般读取的最新N条数据会缓存起来。Step 1. Read the latest N pieces of data from the information flow in the database according to business requirements, and obtain the total number N of reads; in order to improve performance, the latest N pieces of data generally read will be cached.

步骤2、使用随机函数产生(0,N)范围内要求的n个随机数(n小于N),根据随机的n个序号从缓存的N条数据中查询需要抽取的n条数据进行展示。Step 2. Use a random function to generate n random numbers (n is less than N) required in the range of (0, N), and query the n pieces of data to be extracted from the N pieces of cached data according to the random n serial numbers for display.

现有技术提供的解决方案中,存在如下问题:In the solutions provided by the prior art, there are the following problems:

1、在从数据库内信息流读取最新N条数据的过程中,内存使用较大、数据库带宽传输成本消耗较高。1. In the process of reading the latest N pieces of data from the information flow in the database, the memory usage is large and the database bandwidth transmission cost is high.

2、在随机产生n个随机数后,使用循环方式从最新N条数据中逐一获取n条数据的过程开销比较大。2. After randomly generating n random numbers, the process of obtaining n pieces of data one by one from the latest N pieces of data in a circular manner is relatively expensive.

3、由于从信息流中读取的最新N条数据会缓存起来,在缓存期间信息流的最新动态数据在流动速度较大的情况下,就无法得到曝光机会。3. Since the latest N pieces of data read from the information flow will be cached, the latest dynamic data of the information flow during the buffering period cannot get exposure opportunities when the flow speed is high.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明提供一种信息流中数据的随机抽取方法及装置,用以有效降低内存和数据库带宽消耗,提升数据读取性能。In view of this, the present invention provides a method and device for randomly extracting data in an information stream, so as to effectively reduce memory and database bandwidth consumption and improve data reading performance.

为了实现上述目的,本发明提供一种信息流中数据的随机抽取方法,包括:In order to achieve the above object, the present invention provides a method for randomly extracting data in an information flow, including:

根据信息流中随机抽取数据的业务需求设置随机抽取参数,所述随机抽取参数包括:最新动态数据总量和随机抽取数量;Set random extraction parameters according to the business requirements of randomly extracting data in the information flow, and the random extraction parameters include: the total amount of the latest dynamic data and the number of random extractions;

根据最新动态数据总量、以及随机抽取数量确定分页数量,并根据确定出的分页数量随机选取逻辑页码;Determine the number of paging according to the total amount of the latest dynamic data and the number of random extractions, and randomly select the logical page number according to the determined number of paging;

根据随机选取的逻辑页码查询对应的缓存键值是否有缓存数据,如果有,则直接在缓存中读取缓存键值对应的缓存数据进行展示;According to the randomly selected logical page number, query whether the corresponding cache key has cached data, and if so, directly read the cached data corresponding to the cached key in the cache for display;

否则,按照随机选取的逻辑页码和随机抽取数量在数据库内读取分页数据进行展示,并将读取出的分页数据存储到缓存中,其中,缓存的分页数据对应的缓存键值包括业务唯一标识码和所述逻辑页码。Otherwise, read the paging data in the database according to the randomly selected logical page number and the randomly selected quantity for display, and store the read paging data in the cache, where the cache key value corresponding to the cached paging data includes the unique business identifier code and the logical page number.

进一步地,所述随机抽取参数还包括每页缓存时间;以及,缓存的分页数据对应的过期时间根据所述每页缓存时间设置。Further, the random extraction parameter further includes the cache time of each page; and the expiration time corresponding to the cached paging data is set according to the cache time of each page.

进一步地,所述根据最新动态数据总量、以及随机抽取数量确定分页数量,具体通过如下公式实现:Further, determining the number of paging according to the total amount of the latest dynamic data and the number of random extractions is specifically implemented by the following formula:

P=int(N/n)+1P=int(N/n)+1

其中,P表示分页数量,N表示最新动态数据总量,n表示随机抽取数量,int()为取整函数。Among them, P represents the number of pages, N represents the total amount of the latest dynamic data, n represents the number of random extractions, and int() is the rounding function.

进一步地,所述根据确定出的分页数量随机选取逻辑页码,具体通过如下公式实现:Further, randomly selecting the logical page number according to the determined paging quantity is specifically realized by the following formula:

p=rand(0,P)p=rand(0, P)

其中,p表示随机选取的逻辑页码,P表示分页数量,rand()为用于产生随机数的随机函数。Among them, p represents a randomly selected logical page number, P represents the number of pages, and rand() is a random function for generating random numbers.

进一步地,所述按照随机选取的逻辑页码和随机抽取数量在数据库内读取分页数据进行展示,具体包括:Further, the page data is read and displayed in the database according to the randomly selected logical page number and the randomly selected quantity, which specifically includes:

按照随机选取的逻辑页码和随机抽取数量确定索引位置,具体通过如下公式实现:The index position is determined according to the randomly selected logical page number and the randomly selected number, which is specifically realized by the following formula:

S=(p-1)*nS=(p-1)*n

其中,S表示索引位置,p表示随机选取的逻辑页码,n表示随机抽取数量;Among them, S represents the index position, p represents the randomly selected logical page number, and n represents the number of random selections;

确定读取长度与所述随机抽取数量一致;Determine that the read length is consistent with the random sampling number;

根据确定出的索引位置、以及读取长度在数据库内读取分页数据进行展示。According to the determined index position and read length, the paging data is read in the database for display.

基于同一技术构思,本发明还提供了一种信息流中数据的随机抽取装置,包括:Based on the same technical concept, the present invention also provides a device for randomly extracting data in an information stream, including:

设置单元,用于根据信息流中随机抽取数据的业务需求设置随机抽取参数,所述随机抽取参数包括:最新动态数据总量和随机抽取数量;a setting unit, configured to set random extraction parameters according to the business requirements of randomly extracting data in the information flow, and the random extraction parameters include: the total amount of the latest dynamic data and the number of random extractions;

分页数量确定单元,用于根据最新动态数据总量、以及随机抽取数量确定分页数量;The unit for determining the number of pages is used to determine the number of pages according to the total amount of the latest dynamic data and the number of random extractions;

页码随机选取单元,用于根据确定出的分页数量随机选取逻辑页码;The page number random selection unit is used to randomly select the logical page number according to the determined number of pages;

缓存查询单元,用于根据随机选取的逻辑页码查询对应的缓存键值是否有缓存数据,如果有,则直接在缓存中读取缓存键值对应的缓存数据进行展示;否则,触发数据库读取单元;The cache query unit is used to query whether the corresponding cache key value has cache data according to the randomly selected logical page number. If there is, directly read the cache data corresponding to the cache key value in the cache for display; otherwise, trigger the database reading unit ;

数据库读取单元,用于按照随机选取的逻辑页码和随机抽取数量在数据库内读取分页数据进行展示,并将读取出的分页数据存储到缓存中,其中,缓存的分页数据对应的缓存键值包括业务唯一标识码和所述逻辑页码。The database reading unit is used to read the paging data in the database for display according to the randomly selected logical page number and the randomly selected number, and store the read paging data in the cache, wherein the cache key corresponding to the cached paging data The value includes the business unique identification code and the logical page number.

进一步地,所述设置单元设置的随机抽取参数还包括每页缓存时间;以及,Further, the random extraction parameter set by the setting unit also includes the cache time per page; and,

所述数据库读取单元缓存的分页数据对应的过期时间根据所述每页缓存时间设置。The expiration time corresponding to the paged data cached by the database reading unit is set according to the cache time of each page.

进一步地,所述分页数量确定单元具体通过如下公式实现:Further, the unit for determining the number of pages is specifically implemented by the following formula:

P=int(N/n)+1P=int(N/n)+1

其中,P表示分页数量,N表示最新动态数据总量,n表示随机抽取数量,int()为取整函数。Among them, P represents the number of pages, N represents the total amount of the latest dynamic data, n represents the number of random extractions, and int() is the rounding function.

进一步地,所述页码随机选取单元具体通过如下公式实现:Further, the page number random selection unit is specifically realized by the following formula:

p=rand(0,P)p=rand(0, P)

其中,p表示随机选取的逻辑页码,P表示分页数量,rand()为用于产生随机数的随机函数。Among them, p represents a randomly selected logical page number, P represents the number of pages, and rand() is a random function for generating random numbers.

进一步地,所述数据库读取单元,具体包括:Further, the database reading unit specifically includes:

索引位置确定子单元,用于按照随机选取的逻辑页码和随机抽取数量确定索引位置,具体通过公式S=(p-1)*n实现,其中S表示索引位置,p表示随机选取的逻辑页码,n表示随机抽取数量;The index position determination subunit is used to determine the index position according to the randomly selected logical page number and the randomly selected number, which is specifically realized by the formula S=(p-1)*n, where S represents the index position, p represents the randomly selected logical page number, n represents the number of random draws;

读取长度确定子单元,用于确定读取长度与所述随机抽取数量一致;a read length determination subunit, used to determine that the read length is consistent with the random extraction quantity;

读取子单元,用于根据确定出的索引位置、以及读取长度在数据库内读取动态数据进行展示;The reading subunit is used to read the dynamic data in the database for display according to the determined index position and the reading length;

存储子单元,用于将读取出的分页数据存储到缓存中,其中,缓存的分页数据对应的缓存键值包括业务唯一标识码和所述逻辑页码。The storage subunit is configured to store the read paging data in the cache, wherein the cache key value corresponding to the cached paging data includes the service unique identification code and the logical page number.

本发明提供的信息流中数据的随机抽取方法及装置,针对信息流中随机抽取数据的业务需求,采用对信息流中的最新动态数据在逻辑层面进行分页划分方式实现。首先根据最新动态数据总量、以及随机抽取数量确定分页数量,并根据确定出的分页数量随机选取逻辑页码;按照逻辑页码和随机抽取数量在数据库内直接读取分页数据进行展示,并将读取出的分页数据存储到缓存中即可,从数据库内读取分页数据则无需遍历全部最新动态数据,并且仅缓存读取出的分页数据,从而降低了内存和服务器带宽消耗;并且,由于读取出的分页数据进行了缓存存储,如果根据逻辑页码查询到对应的缓存键值有缓存数据,还可以直接读取缓存数据进行展示,大大提高了读取性能。相比现有技术,本方案无需将数据库内信息流中的最新动态数据全部读取到缓存中;也无需在根据随机抽取数量产生相应的随机数后,使用循环方式从缓存的最新动态数据中逐一抽取各条数据,因此能够有效降低内存和数据库带宽消耗,提升数据读取性能。The method and device for randomly extracting data in the information flow provided by the present invention are implemented by paging and dividing the latest dynamic data in the information flow at the logical level according to the business requirement of randomly extracting data in the information flow. First, determine the number of pages according to the total amount of the latest dynamic data and the number of random extractions, and randomly select the logical page number according to the determined number of pages; directly read the paged data in the database for display according to the logical page number and the number of random extractions, and read The paging data can be stored in the cache, and reading the paging data from the database does not need to traverse all the latest dynamic data, and only caches the paging data read out, thereby reducing memory and server bandwidth consumption; The output paging data is cached and stored. If the corresponding cache key value has cached data according to the logical page number query, the cached data can also be directly read for display, which greatly improves the reading performance. Compared with the prior art, this solution does not need to read all the latest dynamic data in the information flow in the database into the cache; it also does not need to use a circular method to retrieve the latest dynamic data from the cache after generating corresponding random numbers according to the randomly selected quantity. Each piece of data is extracted one by one, which can effectively reduce memory and database bandwidth consumption and improve data read performance.

本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。Other features and advantages of the present application will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the present application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description, claims, and drawings.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。附图用来提供对本发明的进一步理解,并且构成说明书的一部分,与本发明的实施例一起用于解释本发明,并不构成对本发明的限制。在附图中:In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts. The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the specification, and are used to explain the present invention together with the embodiments of the present invention, and do not constitute a limitation to the present invention. In the attached image:

图1是本发明实施例中信息流中随机抽取数据的业务需求解决方案示意图;1 is a schematic diagram of a business requirement solution for randomly extracting data from an information flow in an embodiment of the present invention;

图2是本发明实施例中信息流中数据的随机抽取方法流程图;Fig. 2 is the flow chart of the random extraction method of data in the information flow in the embodiment of the present invention;

图3是本发明实施例中从信息流的最新N条数据内随机抽取n条数据的方法流程图;3 is a flowchart of a method for randomly extracting n pieces of data from the latest N pieces of data in an information flow in an embodiment of the present invention;

图4是本发明实施例中信息流中数据的随机抽取装置框图;4 is a block diagram of a random extraction device for data in an information flow in an embodiment of the present invention;

图5是本发明实施例中数据库读取单元的一种可能结构示意图。FIG. 5 is a schematic structural diagram of a possible structure of a database reading unit in an embodiment of the present invention.

具体实施方式Detailed ways

本发明实施例提供一种信息流中数据的随机抽取方法及装置,用以有效降低内存和数据库带宽消耗,提升数据读取性能。Embodiments of the present invention provide a method and device for randomly extracting data in an information stream, so as to effectively reduce memory and database bandwidth consumption and improve data reading performance.

以下结合说明书附图对本发明的优选实施例进行说明,应当理解,此处所描述的优选实施例仅用于说明和解释本发明,并不用于限定本发明。并且在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, but not to limit the present invention. And the embodiments in this application and the features in the embodiments may be combined with each other without conflict.

针对从信息流的最新动态数据内随机抽取部分数据进行展示的实际需求即“信息流中随机抽取数据的业务需求”,为了有效降低内存和数据库带宽消耗,提升数据读取性能,本发明实施例提供了相应的解决方案,示意图如图1所示。本方案对信息流中的最新动态数据在逻辑层面进行分页划分,然后随机选取逻辑页码,最后按照随机选取的逻辑页码进行分页数据的读取,实现从信息流的最新动态数据内随机抽取部分数据的目的。In order to effectively reduce the consumption of memory and database bandwidth, and improve the data reading performance, the embodiment of the present invention is aimed at the actual requirement of randomly extracting part of the data from the latest dynamic data of the information flow for display, that is, "the business requirement of randomly extracting data from the information flow". Corresponding solutions are provided, and the schematic diagram is shown in Figure 1. This scheme divides the latest dynamic data in the information flow into logical pages, then randomly selects the logical page number, and finally reads the paging data according to the randomly selected logical page number, so as to randomly extract part of the data from the latest dynamic data of the information flow the goal of.

本发明实施例提供的信息流中数据的随机抽取方法,如图2所示,包括:The method for randomly extracting data in an information flow provided by an embodiment of the present invention, as shown in FIG. 2 , includes:

S201、根据信息流中随机抽取数据的业务需求设置随机抽取参数;所述的随机抽取参数包括:最新动态数据总量和随机抽取数量。S201. Set random extraction parameters according to the business requirements of randomly extracting data in the information flow; the random extraction parameters include: the total amount of the latest dynamic data and the number of random extractions.

S202、根据最新动态数据总量、以及随机抽取数量确定分页数量。S202. Determine the number of pages according to the total amount of the latest dynamic data and the number of random extractions.

S203、根据确定出的分页数量随机选取逻辑页码。S203: Randomly select a logical page number according to the determined number of pages.

S204、根据随机选取的逻辑页码查询对应的缓存键值是否有缓存数据,如果有,则执行S205,否则,执行S206。S204: Query whether the corresponding cache key value has cached data according to the randomly selected logical page number, and if so, execute S205, otherwise, execute S206.

S205、直接在缓存中读取缓存键值对应的缓存数据进行展示。S205, directly reading the cache data corresponding to the cache key value in the cache for display.

S206、按照随机选取的逻辑页码和随机抽取数量在数据库内读取分页数据进行展示,并将读取出的分页数据存储到缓存中,其中,缓存的分页数据对应的缓存键值包括业务唯一标识码和逻辑页码;S206. Read the paging data in the database for display according to the randomly selected logical page number and the randomly selected quantity, and store the read paging data in the cache, wherein the cache key value corresponding to the cached paging data includes the service unique identifier code and logical page numbers;

较佳的,随机抽取参数还可以包括每页缓存时间,相应的,缓存的分页数据对应的过期时间根据每页缓存时间设置;如果随机抽取参数中未包括每页缓存时间,则,缓存的分页数据对应的过期时间可以设置为系统缺省值。Preferably, the random extraction parameter may also include the cache time of each page, and accordingly, the expiration time corresponding to the cached paging data is set according to the cache time of each page; if the random extraction parameter does not include the cache time of each page, then the cached page The expiration time corresponding to the data can be set to the system default value.

本领域普通技术人员可以理解,所述的“按照随机选取的逻辑页码和随机抽取数量在数据库内读取分页数据进行展示”是指按照随机选取的逻辑页码和随机抽取数量在数据库内信息流的最新动态数据中读取分页数据进行展示。需要说明的是,在数据库内读取数据时,仅能指定索引位置和读取长度,具体实施中,需要首先将随机选取的逻辑页码和随机抽取数量转换为数据库能够识别的索引位置和读取长度,再进行分页数据的读取。具体的,按照随机选取的逻辑页码和随机抽取数量确定索引位置,以及确定读取长度与随机抽取数量一致。Those of ordinary skill in the art can understand that the "reading and displaying paging data in the database according to the randomly selected logical page number and the randomly selected quantity" refers to the information flow in the database according to the randomly selected logical page number and the randomly selected quantity. Read the paging data from the latest dynamic data for display. It should be noted that when reading data in the database, only the index position and read length can be specified. In the specific implementation, it is necessary to first convert the randomly selected logical page number and the randomly selected number into the index position and read number that the database can recognize. length, and then read the paging data. Specifically, the index position is determined according to the randomly selected logical page number and the randomly selected number, and the read length is determined to be consistent with the randomly selected number.

假设信息流中随机抽取数据的业务需求为:从信息流的最新N条数据内随机抽取n条数据进行展示,详细说明本发明实施例提供的信息流中数据的随机抽取方法,如图3所示,具体包括:Assume that the business requirement of randomly extracting data in the information flow is: randomly extract n pieces of data from the latest N pieces of data in the information flow for display, and describe in detail the method for randomly extracting data in the information flow provided by the embodiment of the present invention, as shown in FIG. 3 . display, including:

S301、根据信息流中随机抽取数据的业务需求设置随机抽取参数;所述的随机抽取参数包括:最新动态数据总量N、随机抽取数量n、以及每页缓存时间t。S301. Set random extraction parameters according to business requirements for randomly extracting data in the information flow; the random extraction parameters include: the total amount of latest dynamic data N, the number of random extractions n, and the cache time t per page.

S302、根据最新动态数据总量N、以及随机抽取数量n确定分页数量P,具体通过如下公式[1]实现:S302: Determine the number of pages P according to the latest dynamic data total amount N and the random extraction number n, which is specifically implemented by the following formula [1]:

P=int(N/n)+1 [1]P=int(N/n)+1 [1]

其中,int()为取整函数,是将一个数值向下取整为最接近的整数的函数。Among them, int() is the rounding function, which is a function that rounds down a value to the nearest integer.

S303、根据确定出的分页数量P随机选取逻辑页码p,具体通过如下公式[2]实现:S303. Randomly select the logical page number p according to the determined page number P, which is specifically implemented by the following formula [2]:

p=rand(0,P) [2]p=rand(0,P)[2]

其中,rand()为用于产生随机数的随机函数。Among them, rand() is a random function used to generate random numbers.

S304、根据随机选取的逻辑页码p查询对应的缓存key(键)值是否有缓存数据,如果有,则执行S305,否则,执行S306;S304, according to the randomly selected logical page number p, query whether the corresponding cache key (key) value has cached data, if so, execute S305, otherwise, execute S306;

由于缓存key值包括业务唯一标识码和逻辑页码p,由于业务唯一标识码是预先设定的,根据随机选取的逻辑页码p可以很容易地反推出对应的缓存key值,从而查询该缓存key值是否对应存储有缓存数据。Since the cache key value includes the service unique identification code and the logical page number p, and since the service unique identification code is preset, the corresponding cache key value can be easily deduced according to the randomly selected logical page number p, so as to query the cache key value Whether the cached data is stored correspondingly.

S305、直接在缓存中读取缓存key值对应的缓存数据进行展示。S305, directly reading the cache data corresponding to the cache key value in the cache for display.

S306、按照随机选取的逻辑页码p和随机抽取数量n在数据库内读取分页数据;具体包括如下步骤:S306, read the paging data in the database according to the randomly selected logical page number p and the randomly selected number n; specifically, the following steps are included:

步骤1、按照随机选取的逻辑页码p和随机抽取数量n确定索引位置S,具体通过如下公式[3]实现:Step 1. Determine the index position S according to the randomly selected logical page number p and the randomly selected number n, which is specifically realized by the following formula [3]:

S=(p-1)*n [3]S=(p-1)*n [3]

步骤2、确定读取长度L与随机抽取数量n一致,即L=n;Step 2. Determine that the read length L is consistent with the random sampling number n, that is, L=n;

步骤3、根据确定出的索引位置S、以及读取长度L在数据库内信息流的最新动态数据中读取分页数据进行展示。Step 3. According to the determined index position S and the read length L, the paging data is read and displayed from the latest dynamic data of the information flow in the database.

S307、将读取出的分页数据存储到缓存中;其中,缓存的分页数据对应的缓存key值包括业务唯一标识码和逻辑页码p,缓存的分页数据对应的过期时间根据所述每页缓存时间t设置;S307, storing the read paging data in the cache; wherein, the cache key value corresponding to the cached paging data includes a service unique identification code and a logical page number p, and the expiration time corresponding to the cached paging data is based on the cache time of each page tset;

过期时间是指缓存数据在cache(缓存)中保存的时长;所述的业务唯一标识码是指信息流中随机抽取数据业务唯一的标识码,可以预先灵活设定,只要能够与缓存中其他业务对应的缓存key值区分即可,例如将业务唯一标识码设定为“***”,则缓存的分页数据对应的缓存key值可以为“***-p”;The expiration time refers to the length of time that the cached data is stored in the cache (cache); the service unique identification code refers to the unique identification code of the randomly extracted data service in the information flow, which can be flexibly set in advance, as long as it can be compatible with other services in the cache. The corresponding cache key value can be distinguished. For example, if the service unique identification code is set to "***", the cache key value corresponding to the cached paging data can be "***-p";

本领域普通技术人员可以理解,由于信息流中随机抽取数据的业务需求是不断重复执行的,S304、S305中所涉及的缓存key值对应的缓存数据实质上是之前从数据库内读取并缓存、且尚未达到过期时间的分页数据。Those of ordinary skill in the art can understand that since the business requirement of randomly extracting data from the information flow is continuously repeated, the cached data corresponding to the cached key value involved in S304 and S305 is essentially read from the database before and cached, and paginated data that has not yet reached the expiration time.

S308、将在数据库内读取的逻辑页码p对应的分页数据进行展示。S308, displaying the paging data corresponding to the logical page number p read in the database.

基于同一技术构思,本发明实施例提供了一种信息流中数据的随机抽取装置,由于该装置解决问题的原理与信息流中数据的随机抽取方法相一致,因此该装置的实施可以参见方法的实施,重复之处不在赘述。Based on the same technical concept, an embodiment of the present invention provides a device for randomly extracting data in an information stream. Since the principle of the device for solving problems is consistent with the method for randomly extracting data in an information stream, the implementation of the device can be referred to in the description of the method. Implementation, the repetition will not be repeated.

如图4所示,本发明实施例提供的信息流中数据的随机抽取装置,包括:As shown in FIG. 4 , an apparatus for randomly extracting data in an information stream provided by an embodiment of the present invention includes:

设置单元401,用于根据信息流中随机抽取数据的业务需求设置随机抽取参数,所述随机抽取参数包括:最新动态数据总量和随机抽取数量;The setting unit 401 is configured to set random extraction parameters according to the business requirements of randomly extracting data in the information flow, and the random extraction parameters include: the total amount of the latest dynamic data and the number of random extractions;

分页数量确定单元402,用于根据最新动态数据总量、以及随机抽取数量确定分页数量;a paging quantity determining unit 402, configured to determine the paging quantity according to the total amount of the latest dynamic data and the random extraction quantity;

页码随机选取单元403,用于根据确定出的分页数量随机选取逻辑页码;The page number random selection unit 403 is used to randomly select the logical page number according to the determined page number;

缓存查询单元404,用于根据随机选取的逻辑页码查询对应的缓存键值是否有缓存数据,如果有,则直接在缓存中读取缓存键值对应的缓存数据进行展示;否则,触发数据库读取单元405;The cache query unit 404 is configured to query whether the corresponding cache key value has cache data according to the randomly selected logical page number, and if so, directly read the cache data corresponding to the cache key value in the cache for display; otherwise, trigger the database to read unit 405;

数据库读取单元405,用于按照随机选取的逻辑页码和随机抽取数量在数据库内读取分页数据进行展示,并将读取出的分页数据存储到缓存中,其中,缓存的分页数据对应的缓存键值包括业务唯一标识码和所述逻辑页码。The database reading unit 405 is configured to read the paging data in the database for display according to the randomly selected logical page number and the randomly selected number, and store the read paging data in the cache, wherein the cache corresponding to the cached paging data The key value includes the business unique identification code and the logical page number.

具体实施中,该信息流中数据的随机抽取装置通常设置在网络侧的业务服务器中。In a specific implementation, the device for randomly extracting data in the information flow is usually set in the service server on the network side.

具体实施中,所述设置单元401设置的随机抽取参数还包括每页缓存时间;以及,所述数据库读取单元405缓存的分页数据对应的过期时间根据所述每页缓存时间设置。In a specific implementation, the random extraction parameter set by the setting unit 401 further includes the cache time per page; and the expiration time corresponding to the paged data cached by the database reading unit 405 is set according to the cache time per page.

具体实施中,所述分页数量确定单元402具体通过如下公式实现:P=int(N/n)+1,其中,P表示分页数量,N表示最新动态数据总量,n表示随机抽取数量,int()为取整函数。In a specific implementation, the page number determining unit 402 is specifically implemented by the following formula: P=int(N/n)+1, where P represents the number of pages, N represents the total amount of latest dynamic data, n represents the number of random extractions, and int () is the rounding function.

具体实施中,所述页码随机选取单元403具体通过如下公式实现:p=rand(0,P),其中,p表示随机选取的逻辑页码,P表示分页数量,rand()为用于产生随机数的随机函数。In a specific implementation, the page number random selection unit 403 is specifically implemented by the following formula: p=rand(0, P), where p represents a randomly selected logical page number, P represents the number of pages, and rand() is used to generate a random number random function.

具体实施中,所述数据库读取单元405的一种可能结构,如图5所示,具体包括:In a specific implementation, a possible structure of the database reading unit 405, as shown in FIG. 5, specifically includes:

索引位置确定子单元501,用于按照随机选取的逻辑页码和随机抽取数量确定索引位置,具体通过公式S=(p-1)*n实现,其中S表示索引位置,p表示随机选取的逻辑页码,n表示随机抽取数量;The index position determination subunit 501 is used to determine the index position according to the randomly selected logical page number and the randomly selected number, which is specifically realized by the formula S=(p-1)*n, where S represents the index position, and p represents the randomly selected logical page number , n represents the number of random draws;

读取长度确定子单元502,用于确定读取长度与所述随机抽取数量一致;a read length determination subunit 502, configured to determine that the read length is consistent with the random extraction quantity;

读取子单元503,用于根据确定出的索引位置、以及读取长度在数据库内读取分页数据进行展示;The reading subunit 503 is used to read the paging data in the database for presentation according to the determined index position and the reading length;

存储子单元504,用于将读取出的分页数据存储到缓存中,其中,缓存的分页数据对应的缓存键值包括业务唯一标识码和所述逻辑页码。The storage subunit 504 is configured to store the read paging data in the cache, wherein the cache key value corresponding to the cached paging data includes the service unique identification code and the logical page number.

本发明实施例提供的信息流中数据的随机抽取方法及装置,针对信息流中随机抽取数据的业务需求,采用对信息流中的最新动态数据在逻辑层面进行分页划分方式实现。首先根据最新动态数据总量、以及随机抽取数量确定分页数量,并根据确定出的分页数量随机选取逻辑页码;按照逻辑页码和随机抽取数量在数据库内直接读取分页数据进行展示,并将读取出的分页数据存储到缓存中即可,从数据库内读取分页数据则无需遍历全部最新动态数据,并且仅缓存读取出的分页数据,从而降低了内存和服务器带宽消耗;并且,由于读取出的分页数据进行了缓存存储,如果根据逻辑页码查询到对应的缓存键值有缓存数据,还可以直接读取缓存数据进行展示,大大提高了读取性能。相比现有技术,本方案无需将数据库内信息流中的最新动态数据全部读取到缓存中;也无需在根据随机抽取数量产生相应的随机数后,使用循环方式从缓存的最新动态数据中逐一抽取各条数据,因此能够有效降低内存和数据库带宽消耗,提升数据读取性能。The method and device for randomly extracting data in an information stream provided by the embodiments of the present invention are implemented by paging and dividing the latest dynamic data in the information stream at a logical level according to the business requirement of randomly extracting data in the information stream. First, determine the number of paging according to the total amount of the latest dynamic data and the number of random extractions, and randomly select the logical page number according to the determined number of pages; directly read the paging data in the database for display according to the logical page number and the number of random extractions, and then read The paging data can be stored in the cache, and reading the paging data from the database does not need to traverse all the latest dynamic data, and only caches the paging data read out, thereby reducing memory and server bandwidth consumption; The output paging data is cached and stored. If the corresponding cache key value has cached data according to the logical page number query, the cached data can be directly read for display, which greatly improves the read performance. Compared with the prior art, this solution does not need to read all the latest dynamic data in the information flow in the database into the cache; it also does not need to use a circular method to retrieve the latest dynamic data from the cache after generating corresponding random numbers according to the randomly selected quantity. Each piece of data is extracted one by one, which can effectively reduce memory and database bandwidth consumption and improve data read performance.

进一步地,由于设置了每页缓存时间,导致缓存中存储的各分页数据的过期时间不同,可以提高最新动态数据曝光的概率。Further, since the cache time of each page is set, the expiration time of each page data stored in the cache is different, which can improve the probability of exposure of the latest dynamic data.

本领域的技术人员应明白,本发明的实施例可提供为方法、装置或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本发明是参照根据本发明实施例的方法、装置(系统)和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.

尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。Although preferred embodiments of the present invention have been described, additional changes and modifications to these embodiments may occur to those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be construed to include the preferred embodiment and all changes and modifications that fall within the scope of the present invention.

显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit and scope of the invention. Thus, provided that these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims (10)

1. A method for randomly extracting data from an information stream, comprising:
setting random extraction parameters according to the service requirement of random extraction data in the information flow, wherein the random extraction parameters comprise: the total amount of the latest dynamic data and the random extraction amount;
determining the paging number according to the total amount of the latest dynamic data and the random extraction number, and randomly selecting a logical page number according to the determined paging number;
inquiring whether cache data exist in the corresponding cache key value according to the randomly selected logical page number, and if so, directly reading the cache data corresponding to the cache key value in the cache for display;
otherwise, reading the paging data in the database according to the randomly selected logical page number and the randomly extracted number for displaying, and storing the read paging data into a cache, wherein a cache key value corresponding to the cached paging data comprises the service unique identification code and the logical page number.
2. The method of claim 1, wherein the randomly chosen parameters further include a per-page buffer time; and setting the corresponding expiration time of the cached paging data according to the caching time of each page.
3. The method according to claim 1 or 2, wherein the determining the number of pages according to the latest total dynamic data amount and the random number is implemented by the following formula:
P=int(N/n)+1
wherein, P represents the number of pages, N represents the total amount of the latest dynamic data, N represents the number of random fetches, and int () is a rounding function.
4. The method according to claim 1 or 2, wherein said randomly selecting a logical page number according to the determined number of pages is implemented by the following formula:
p=rand(0,P)
where P represents a randomly selected logical page number, P represents the number of pages, and rand () is a random function for generating random numbers.
5. The method according to claim 1 or 2, wherein reading paging data for presentation in the database according to the randomly selected logical page number and the randomly drawn number comprises:
determining an index position according to the randomly selected logical page number and the randomly extracted number, and specifically realizing the following formula:
S=(p-1)*n
wherein S represents an index position, p represents a randomly selected logical page number, and n represents a random extraction number;
determining that the read length is consistent with the random number;
and reading paging data in the database for display according to the determined index position and the reading length.
6. An apparatus for randomly extracting data from an information stream, comprising:
a setting unit, configured to set a random extraction parameter according to a service requirement of randomly extracting data in an information flow, where the random extraction parameter includes: the total amount of the latest dynamic data and the random extraction amount;
the page quantity determining unit is used for determining the page quantity according to the total quantity of the latest dynamic data and the random extraction quantity;
the page random selection unit is used for randomly selecting a logic page according to the determined paging number;
the cache query unit is used for querying whether cache data exist in the corresponding cache key value according to the randomly selected logical page number, and if so, directly reading the cache data corresponding to the cache key value in the cache for display; otherwise, triggering a database reading unit;
and the database reading unit is used for reading the paging data in the database for display according to the randomly selected logical page numbers and the randomly extracted number, and storing the read paging data into a cache, wherein cache key values corresponding to the cached paging data comprise the service unique identification codes and the logical page numbers.
7. The apparatus according to claim 6, wherein the random extraction parameter set by the setting unit further includes a per-page buffer time; and the number of the first and second groups,
and setting the expiration time corresponding to the paging data cached by the database reading unit according to the caching time of each page.
8. The apparatus according to claim 6 or 7, wherein the page number determining unit is specifically implemented by the following formula:
P=int(N/n)+1
wherein, P represents the number of pages, N represents the total amount of the latest dynamic data, N represents the number of random fetches, and int () is a rounding function.
9. The apparatus according to claim 6 or 7, wherein the page number random selection unit is implemented by the following formula:
p=rand(0,P)
where P represents a randomly selected logical page number, P represents the number of pages, and rand () is a random function for generating random numbers.
10. The apparatus according to claim 6 or 7, wherein the database reading unit specifically includes:
an index position determining subunit, configured to determine an index position according to the randomly selected logical page number and the randomly extracted number, specifically by using a formula S ═ p-1 × n, where S denotes the index position, p denotes the randomly selected logical page number, and n denotes the randomly extracted number;
a read length determining subunit, configured to determine that the read length is consistent with the random number;
the reading subunit is used for reading the dynamic data in the database for display according to the determined index position and the reading length;
and the storage subunit is used for storing the read paging data into a cache, wherein a cache key value corresponding to the cached paging data comprises a service unique identification code and the logical page number.
CN201610873839.5A 2016-09-30 2016-09-30 Random extraction method and device for data in information flow Active CN106570060B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610873839.5A CN106570060B (en) 2016-09-30 2016-09-30 Random extraction method and device for data in information flow

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610873839.5A CN106570060B (en) 2016-09-30 2016-09-30 Random extraction method and device for data in information flow

Publications (2)

Publication Number Publication Date
CN106570060A CN106570060A (en) 2017-04-19
CN106570060B true CN106570060B (en) 2020-03-10

Family

ID=58531585

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610873839.5A Active CN106570060B (en) 2016-09-30 2016-09-30 Random extraction method and device for data in information flow

Country Status (1)

Country Link
CN (1) CN106570060B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766486B (en) * 2017-10-16 2021-04-20 浪潮通用软件有限公司 Method, device, readable medium and storage controller for randomly extracting sample data
CN108595487B (en) * 2018-03-14 2022-04-29 武汉村助手科技有限公司 Method and system for accessing data under high concurrency of big data
CN110515974B (en) * 2019-07-15 2022-03-11 金蝶软件(中国)有限公司 Data extraction method and device, computer equipment and storage medium
CN111367952B (en) * 2020-03-02 2023-08-25 中国邮政储蓄银行股份有限公司 Paging query method, system and computer readable storage medium for cache data
CN114722186A (en) * 2022-04-11 2022-07-08 土巴兔集团股份有限公司 An article display method and related equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473227A (en) * 2012-06-06 2013-12-25 腾讯科技(深圳)有限公司 Method and device displaying microblog dynamics
CN105183764A (en) * 2015-07-29 2015-12-23 广州神马移动信息科技有限公司 Data paging method and apparatus
CN105468764A (en) * 2015-12-02 2016-04-06 广州华多网络科技有限公司 Data processing method and apparatus and cluster service system
CN105916057A (en) * 2016-04-18 2016-08-31 乐视控股(北京)有限公司 Video barrage display method and device
CN105976212A (en) * 2016-05-30 2016-09-28 北京京东尚科信息技术有限公司 Commodity displaying method and apparatus and electronic commerce platform
CN105979285A (en) * 2016-06-27 2016-09-28 乐视控股(北京)有限公司 Advertisement barrage display method, advertisement barrage display device and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8574074B2 (en) * 2005-09-30 2013-11-05 Sony Computer Entertainment America Llc Advertising impression determination

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473227A (en) * 2012-06-06 2013-12-25 腾讯科技(深圳)有限公司 Method and device displaying microblog dynamics
CN105183764A (en) * 2015-07-29 2015-12-23 广州神马移动信息科技有限公司 Data paging method and apparatus
CN105468764A (en) * 2015-12-02 2016-04-06 广州华多网络科技有限公司 Data processing method and apparatus and cluster service system
CN105916057A (en) * 2016-04-18 2016-08-31 乐视控股(北京)有限公司 Video barrage display method and device
CN105976212A (en) * 2016-05-30 2016-09-28 北京京东尚科信息技术有限公司 Commodity displaying method and apparatus and electronic commerce platform
CN105979285A (en) * 2016-06-27 2016-09-28 乐视控股(北京)有限公司 Advertisement barrage display method, advertisement barrage display device and terminal

Also Published As

Publication number Publication date
CN106570060A (en) 2017-04-19

Similar Documents

Publication Publication Date Title
CN106570060B (en) Random extraction method and device for data in information flow
US9842149B2 (en) Population and/or animation of spatial visualization(s)
WO2017185616A1 (en) File storage method and electronic equipment
CN106021421B (en) method and device for accelerating webpage rendering
CN110764708A (en) Data reading method, device, equipment and storage medium
JP2015519813A5 (en)
US10289739B1 (en) System to recommend content based on trending social media topics
JP6932360B2 (en) Object search method, device and server
CN106874348A (en) File is stored and the method for indexing means, device and reading file
CN106126731B (en) Method and device for acquiring Elasticissearch paging data
CN102831111B (en) A kind of image display method and device
CN112241419B (en) Service data processing method, device, computer equipment and storage medium
CN114404960B (en) Cloud game resource data processing method, device, computer equipment and storage medium
CN109947720A (en) A file pre-reading method, apparatus, device and readable storage medium
CN108600083B (en) Message reminder method and device
CN107221020B (en) Method and device for drawing character textures
CN104778252B (en) The storage method and device of index
CN108206776A (en) A kind of querying method and device of group history message
US10467279B2 (en) Selecting digital content for inclusion in media presentations
WO2015154682A1 (en) Network request processing method, network server, and network system
CN112883307B (en) Cache updating method and device and social network system
CN107291870B (en) Method for reading files in distributed storage in batch
CN107800742B (en) Game data storage caching method
CN111723315A (en) Assisted reading and display method, device and computing device
CN107153674B (en) A method and system for displaying live room information

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
GR01 Patent grant
GR01 Patent grant
OSZAR »