[go: up one dir, main page]

CN107316200B - Method and device for analyzing user behavior period - Google Patents

Method and device for analyzing user behavior period Download PDF

Info

Publication number
CN107316200B
CN107316200B CN201610266283.3A CN201610266283A CN107316200B CN 107316200 B CN107316200 B CN 107316200B CN 201610266283 A CN201610266283 A CN 201610266283A CN 107316200 B CN107316200 B CN 107316200B
Authority
CN
China
Prior art keywords
subsequence
time interval
periodic time
sequence
periodic
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
CN201610266283.3A
Other languages
Chinese (zh)
Other versions
CN107316200A (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610266283.3A priority Critical patent/CN107316200B/en
Publication of CN107316200A publication Critical patent/CN107316200A/en
Application granted granted Critical
Publication of CN107316200B publication Critical patent/CN107316200B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0224Discounts or incentives, e.g. coupons or rebates based on user history
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0251Targeted advertisements
    • G06Q30/0255Targeted advertisements based on user history
    • G06Q30/0256User search

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a method and a device for analyzing a user behavior cycle, wherein the method comprises the following steps: acquiring a time interval sequence of user behaviors; searching for a periodic time interval subsequence in which the fluctuation of adjacent elements in the time interval sequence meets a predetermined condition; calculating scores for all of the periodic time interval subsequences; and carrying out grading evaluation on the user according to the score. The method searches the subsequences presented in a periodic form in the sequence by judging whether the fluctuation degree of the user behavior time interval forming the sequence exceeds a threshold value, and scores all the subsequences, so that the analysis result of the user can be obtained.

Description

一种分析用户行为周期的方法和装置A method and device for analyzing user behavior cycle

技术领域technical field

本申请涉及用户行为分析技术领域,特别涉及一种分析用户行为周期的方法和装置。The present application relates to the technical field of user behavior analysis, and in particular, to a method and apparatus for analyzing a user behavior cycle.

背景技术Background technique

很多现有技术都试图通过分析用户的交易行为,得到用户的潜在交易行为倾向,但是由于用户很难一直以一个稳定周期产生交易行为,因此,例如使用快速傅里叶变换等快速计算时域序列周期的方法都不能很好的适用于用户交易行为的分析,因此很难准确的得到用户对商户或者平台的忠诚度等数据。Many existing technologies try to analyze the user's transaction behavior to obtain the user's potential transaction behavior tendency, but because it is difficult for the user to generate transaction behavior in a stable cycle, for example, use fast Fourier transform to quickly calculate time-domain sequences. None of the periodic methods can be well applied to the analysis of user transaction behavior, so it is difficult to accurately obtain data such as user loyalty to merchants or platforms.

发明内容SUMMARY OF THE INVENTION

为解决现有技术中的上述问题,本申请的一个目的在于提出一种分析用户行为周期的方法和装置,能够更加准确的分析用户行为以及评价用户,根据该评价结果可以指导商家调整生产,以对目标用户提供相对应的定制服务或者产品,从而可以提高生产服务的效率,降低盲目生产带来的资源浪费。In order to solve the above-mentioned problems in the prior art, one purpose of the present application is to propose a method and device for analyzing user behavior cycle, which can more accurately analyze user behavior and evaluate users, and can guide merchants to adjust production according to the evaluation results, so that Provide corresponding customized services or products to target users, so as to improve the efficiency of production services and reduce the waste of resources caused by blind production.

为达到上述目的,本申请实施例提出了一种分析用户行为周期的方法,包括:获取用户行为的时间间隔序列;寻找所述时间间隔序列中相邻元素的波动满足预定条件的周期时间间隔子序列;计算所有所述周期时间间隔子序列的分值;根据所述分值对用户进行分级评价。In order to achieve the above purpose, an embodiment of the present application proposes a method for analyzing a user behavior cycle, including: acquiring a time interval sequence of user behavior; searching for a periodic time interval sub-period where fluctuations of adjacent elements in the time interval sequence satisfy a predetermined condition. sequence; calculate the scores of all the subsequences of the periodic time interval; perform a graded evaluation on the user according to the scores.

为达到上述目的,本申请实施例提出了一种分析用户行为周期的装置,包括:获取单元,用于获取用户行为的时间间隔序列;子序列单元,用于寻找所述时间间隔序列中相邻元素的波动满足预定条件的周期时间间隔子序列;计算单元,用于计算所有所述周期时间间隔子序列的分值;评价单元,用于根据所述分值对用户进行分级评价。In order to achieve the above purpose, an embodiment of the present application proposes a device for analyzing a user behavior cycle, including: an acquisition unit for acquiring a time interval sequence of user behaviors; a subsequence unit for finding adjacent neighbors in the time interval sequence. A periodic time interval subsequence whose fluctuations of elements satisfy a predetermined condition; a calculation unit for calculating the scores of all the periodic time interval subsequences; and an evaluation unit for grading the user according to the scores.

由以上本申请实施例提供的技术方案可见,通过上述本申请实施例的方法,可以找到用户行为的周期特性,并对该周期性的行为进行打分,量化了对用户评价的过程,用数字化的方式描述了用户的特征,能够更加准确的分析用户行为以及评价用户,根据该评价结果可以指导商家调整生产,以对目标用户提供相对应的定制服务或者产品,从而可以提高生产服务的效率,降低盲目生产带来的资源浪费。It can be seen from the technical solutions provided by the above embodiments of the present application that the periodic characteristics of user behaviors can be found through the methods of the above embodiments of the present application, and the periodic behaviors can be scored, quantifying the process of evaluating users, and using digital The method describes the characteristics of users, which can more accurately analyze user behavior and evaluate users. According to the evaluation results, merchants can be guided to adjust production to provide corresponding customized services or products to target users, so as to improve the efficiency of production services and reduce costs. Waste of resources caused by blind production.

本申请附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。Additional aspects and advantages of the present application will be set forth, in part, in the following description, and in part will be apparent from the following description, or learned by practice of the present application.

当然实施本申请的任一产品或者方法必不一定需要同时达到以上所述的所有优点。Of course, implementing any product or method of the present application does not necessarily require achieving all of the above-mentioned advantages at the same time.

附图说明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 described in this application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1所示为本申请实施例一种分析用户行为周期的方法的流程图;FIG. 1 shows a flowchart of a method for analyzing a user behavior cycle according to an embodiment of the present application;

图2所示为本申请实施例一种分析用户行为周期的装置的结构示意图;FIG. 2 is a schematic structural diagram of an apparatus for analyzing a user behavior cycle according to an embodiment of the present application;

图3所示为本申请实施例一种分析用户行为周期方法的具体流程图;FIG. 3 shows a specific flowchart of a method for analyzing a user behavior cycle according to an embodiment of the present application;

图4所示为本申请实施例的用户消费行为的时间序列示意图;FIG. 4 is a schematic diagram of a time series of user consumption behaviors according to an embodiment of the present application;

图5所示为本申请实施例一种分析用户行为周期的方法的具体流程图。FIG. 5 shows a specific flowchart of a method for analyzing a user behavior cycle according to an embodiment of the present application.

具体实施方式Detailed ways

本申请实施例提供一种分析用户行为周期的方法及装置。Embodiments of the present application provide a method and apparatus for analyzing a user behavior cycle.

为了使本技术领域的人员更好地理解本申请中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described The embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the scope of protection of this application.

如图1所示为本申请实施例一种分析用户行为周期的方法的流程图,在本图中描述了通过对用户行为进行分析得到用户行为周期,以及根据该用户行为周期对用户进行分析评价的方法。在现有技术中通过EFM模型其中R代表最近一次消费(Recency),F代表消费频率(Frequency),M代表消费金额(Monetary),主要通过这三个指标来分析用户对于商户或者平台的忠诚度,该方法虽然能够在一定程度上描述用户的行为,但无法精确的刻画用户在整个时间轴上的行为分布。而且,由于用户行为的离散性,现有技术中的快速傅里叶变换也不能很好的应用于用户行为周期的分析之中。通过本申请实施例中的方法判断构成序列的用户行为时间间隔的波动程度是否超过门限值,来寻找所述序列中以周期形式呈现的子序列,并对所有子序列进行评分,从而可以得到对该用户的分析结果。FIG. 1 is a flowchart of a method for analyzing a user behavior cycle according to an embodiment of the present application. In this figure, it is described that the user behavior cycle is obtained by analyzing the user behavior, and the user is analyzed and evaluated according to the user behavior cycle. Methods. In the prior art, through the EFM model, where R represents the most recent consumption (Recency), F represents the consumption frequency (Frequency), and M represents the consumption amount (Monetary), these three indicators are mainly used to analyze the user's loyalty to the merchant or platform. , although this method can describe the user's behavior to a certain extent, it cannot accurately describe the user's behavior distribution on the entire time axis. Moreover, due to the discreteness of user behavior, the fast Fourier transform in the prior art cannot be well applied to the analysis of the user behavior cycle. Through the method in the embodiment of the present application, it is determined whether the fluctuation degree of the user behavior time interval constituting the sequence exceeds the threshold value, to find the subsequences in the sequence in periodic form, and to score all the subsequences, so as to obtain Analysis results for this user.

该方法具体包括步骤101,获取用户行为的时间间隔序列。The method specifically includes step 101, obtaining a time interval sequence of user behaviors.

步骤102,寻找所述时间间隔序列中相邻元素的波动满足预定条件的周期时间间隔子序列。Step 102: Find a periodic time interval subsequence whose fluctuations of adjacent elements in the time interval sequence satisfy a predetermined condition.

步骤103,计算所有所述周期时间间隔子序列的分值。Step 103: Calculate the scores of all the periodic time interval subsequences.

步骤104,根据所述分值对用户进行分级评价。Step 104: Perform a graded evaluation on the user according to the score.

作为本申请的一个实施例,所述寻找所述时间间隔序列中相邻元素的波动满足预定条件的周期时间间隔子序列进一步包括,当所述时间间隔序列的某段连续的子序列中相邻元素的波动小于预定值时,则该连续的子序列为周期时间间隔子序列。As an embodiment of the present application, the searching for a periodic time interval subsequence whose fluctuations of adjacent elements in the time interval sequence satisfy a predetermined condition further includes, when a certain continuous subsequence of the time interval sequence is adjacent to When the fluctuation of the element is less than the predetermined value, the continuous subsequence is a periodic time interval subsequence.

其中,用户行为的时间间隔序列可以例如为,用户在1月3号、1月7号,1月12号在肯德基有消费行为,以1月1号为起始日期,则生成相应用户行为的时间序列为(2,6,11),即计算消费日期与起始日期的时间差,而该用户行为的时间间隔序列为所述用户行为的时间序列中各用户行为时间之间的间隔,也就是说用户行为的时间间隔序列为(4,5),所述元素就是指时间间隔序列中的每个时间间隔。Wherein, the time interval sequence of user behaviors can be, for example, the user has consumption behaviors at KFC on January 3, January 7, and January 12, and with January 1 as the starting date, the corresponding user behaviors are generated. The time series is (2, 6, 11), that is, the time difference between the consumption date and the start date is calculated, and the time interval sequence of the user behavior is the interval between the user behavior times in the user behavior time series, that is, It is said that the time interval sequence of user behavior is (4, 5), and the element refers to each time interval in the time interval sequence.

作为本申请的一个实施例,所述波动包括所述子序列中相邻元素的方差,或者子序列中相邻元素的比值。As an embodiment of the present application, the fluctuation includes the variance of adjacent elements in the subsequence, or the ratio of adjacent elements in the subsequence.

其中,对于相邻元素的比值,可以使用相邻两个元素中较大的作为分子,较小的作为分母,从而可以得到两个相邻元素的比值,对于相邻元素波动的判断还可以采用其它现有技术中的方法,本申请实施例只是列举了几种方式,并不限定使用哪种方式得到相邻元素的波动。Among them, for the ratio of adjacent elements, the larger of the two adjacent elements can be used as the numerator, and the smaller one can be used as the denominator, so that the ratio of the two adjacent elements can be obtained, and the judgment of the fluctuation of adjacent elements can also be used. For other methods in the prior art, the embodiments of the present application only enumerate several methods, and do not limit which method is used to obtain the fluctuation of adjacent elements.

作为本申请的一个实施例,当所述时间间隔序列的某段连续的子序列中相邻元素的波动小于预定值时,则该连续的子序列为周期时间间隔子序列进一步包括,以时间间隔序列中某元素为头,另一元素为尾形成连续的子序列,计算当前子序列是否为周期时间间隔子序列,若所述子序列为周期时间间隔子序列,则不再计算该子序列中是否还存在其它周期时间间隔子序列。As an embodiment of the present application, when the fluctuation of adjacent elements in a certain continuous subsequence of the time interval sequence is less than a predetermined value, the continuous subsequence is a periodic time interval subsequence further comprising: One element in the sequence is the head, and the other element is the tail to form a continuous subsequence. Calculate whether the current subsequence is a periodic time interval subsequence. If the subsequence is a periodic time interval subsequence, no longer calculate the subsequence Whether there are other periodic time interval subsequences.

其中,计算子序列是否为周期时间间隔子序列是一个遍历过程,如果一个子序列为周期时间间隔子序列则该子序列中的任何一段都为周期时间间隔子序列,这样就可以避免在寻找周期时间间隔子序列时,在该子序列中重复的寻找计算更短的周期时间间隔子序列,从而减小了计算复杂度。Among them, calculating whether a subsequence is a periodic time interval subsequence is a traversal process. If a subsequence is a periodic time interval subsequence, any segment of the subsequence is a periodic time interval subsequence, so as to avoid searching for a periodic time interval subsequence. When a time interval subsequence is used, the subsequence with shorter periodic time interval is repeatedly searched and calculated in the subsequence, thereby reducing the computational complexity.

作为本申请的一个实施例,以时间间隔序列中某元素为头,另一元素为尾形成连续的子序列中进一步包括,选择所述子序列中头元素与尾元素时,以两者之间具有的元素越多越好。As an embodiment of the present application, forming a continuous subsequence with a certain element in the time interval sequence as the head and another element as the tail further includes, when selecting the head element and the tail element in the subsequence, taking the difference between the two elements. The more elements you have, the better.

其中,可以选择整个时间间隔序列的头和尾元素作为子序列中的头和尾元素,然后所述子序列中的头和尾元素变为其它元素进行遍历,通过选择遍历长序列,可以减少遍历计算的次数,从而可以进一步减少计算复杂度。Among them, the head and tail elements of the entire time interval sequence can be selected as the head and tail elements in the subsequence, and then the head and tail elements in the subsequence become other elements for traversal. By selecting and traversing a long sequence, the traversal can be reduced. The number of calculations can further reduce the computational complexity.

作为本申请的一个实施例,当所述时间间隔序列的某段连续的子序列中相邻元素的波动小于预定值时,则该连续的子序列为周期时间间隔子序列进一步包括,所述连续的子序列满足如下公式则为周期时间间隔子序列:As an embodiment of the present application, when the fluctuation of adjacent elements in a certain continuous subsequence of the time interval sequence is less than a predetermined value, the continuous subsequence is a periodic time interval subsequence further comprising, the continuous subsequence If the subsequence satisfies the following formula, it is a periodic time interval subsequence:

Variance(list)/mean(list)<epsilon/f(length(list))Variance(list)/mean(list)<epsilon/f(length(list))

其中,Variance(list)是指子序列中相邻元素的波动,mean(list)是指子序列中元素的均值,epsilon是指根据场景的预设值,f(length(list))是指考虑到子序列长度的惩罚值。Among them, Variance(list) refers to the fluctuation of adjacent elements in the subsequence, mean(list) refers to the mean value of the elements in the subsequence, epsilon refers to the preset value according to the scene, and f(length(list)) refers to the consideration Penalty to subsequence length.

其中,例如子序列为(1,1,2,2,4),则mean(list)为(1+1+2+2+4)/5=2,根据场景的不同epsilon的取值也不同,例如在用户消费行为的场景中epsilon可能取1,在用户进行水电费缴费的场景中epsilon可能取2或其它值;子序列如果越长f(length(list))就越小,可以是根据应用的场景不同而采用不同的运算,length(list)是指子序列长度,f(length(list))例如可能是子序列长度的开根运算,或者为其它运算,或者就等于子序列长度。Among them, for example, the subsequence is (1, 1, 2, 2, 4), then the mean(list) is (1+1+2+2+4)/5=2, and the value of epsilon varies according to the scene , for example, epsilon may take 1 in the scenario of user consumption behavior, and epsilon may take 2 or other values in the scenario where the user pays water and electricity bills; Different operations are used in different application scenarios. length(list) refers to the length of the subsequence, and f(length(list)), for example, may be the root operation of the length of the subsequence, or other operations, or equal to the length of the subsequence.

作为本申请的一个实施例,当所述时间间隔序列的某段连续的子序列中相邻元素的波动小于预定值时,则该连续的子序列为周期时间间隔子序列进一步包括,所述连续的子序列满足如下公式则为周期时间间隔子序列:As an embodiment of the present application, when the fluctuation of adjacent elements in a certain continuous subsequence of the time interval sequence is less than a predetermined value, the continuous subsequence is a periodic time interval subsequence further comprising, the continuous subsequence If the subsequence satisfies the following formula, it is a periodic time interval subsequence:

Variance(list)<epsilonVariance(list)<epsilon

其中,Variance(list)是指子序列中相邻元素的波动,epsilon是指根据场景的预设值。Among them, Variance(list) refers to the fluctuation of adjacent elements in the subsequence, and epsilon refers to the preset value according to the scene.

作为本申请的一个实施例,计算所有所述周期时间间隔子序列的分值进一步包括,提取所述周期时间间隔子序列的周期、波动以及长度,分配以不同的权重值,并获得所述周期时间间隔子序列结束至当前时间的时间信息,计算得到该周期时间间隔子序列的分值,并计算所有周期时间间隔子序列分值的和。As an embodiment of the present application, calculating the scores of all the periodic time interval subsequences further includes: extracting the period, fluctuation and length of the periodic time interval subsequences, assigning different weight values, and obtaining the period The time information from the end of the time interval subsequence to the current time is calculated to obtain the score of the periodic time interval subsequence, and the sum of the scores of all periodic time interval subsequences is calculated.

作为本申请的一个实施例,计算得到该周期时间间隔子序列的分值进一步包括,所述周期时间间隔子序列的分值符合以下公式:As an embodiment of the present application, calculating the score of the periodic time interval subsequence further includes that the score of the periodic time interval subsequence conforms to the following formula:

s=(a*period+b*variance+c*times)*f(toNow)s=(a*period+b*variance+c*times)*f(toNow)

其中,s为周期时间子序列的分值,a、b、c为权值,period为所述周期时间子序列的周期,variance为所述周期时间子序列中相邻元素的波动,times为所述周期时间子序列的元素个数;toNow为所述周期时间间隔子序列结束至当前时间的时间信息,f()为对所述时间信息的函数运算。Among them, s is the score of the periodic time subsequence, a, b, and c are the weights, period is the period of the periodic time subsequence, variance is the fluctuation of adjacent elements in the periodic time subsequence, and times is the is the number of elements of the periodic time subsequence; toNow is the time information from the end of the periodic time interval subsequence to the current time, and f() is the function operation on the time information.

所述period越小,说明用户行为越频繁,此项的值应当越大,a*period可以为负相关运算,例如y=1/x;variance越小,说明波动越小,此项的值应当越大,b*variance可以为负相关运算,例如y=1/x;times越大,说明周期越长,此项的值应当越大,c*times可以为正相关运算,例如y=x;所述toNow越大时,说明该周期时间间隔子序列的价值越低,该子序列的分值应道较低,f()可以为开根运算、取log运算、e-x运算等等,其中x为时间信息,该f()可以根据应用场景不同而不同。The smaller the period, the more frequent the user behavior, the larger the value of this item should be, a*period can be a negative correlation operation, for example, y=1/x; the smaller the variance, the smaller the fluctuation, the value of this item should be The larger the value is, the b*variance can be a negative correlation operation, for example, y=1/x; the larger the times, the longer the period, the larger the value of this item should be, and the c*times can be a positive correlation operation, such as y=x; When the toNow is larger, it means that the value of the periodic time interval subsequence is lower, and the score of the subsequence should be lower, and f() can be a root operation, a log operation, an e- x operation, etc., Where x is time information, and the f() can be different according to different application scenarios.

作为本申请的一个实施例,计算所有所述周期时间间隔子序列的分值进一步包括,记录所有所述周期时间间隔子序列的参数,包括用户ID,周期时间粒度,所述周期时间间隔子序列的周期、波动、元素个数、周期开始时间、周期结束时间。As an embodiment of the present application, calculating the scores of all the periodic time interval subsequences further includes recording parameters of all the periodic time interval subsequences, including user ID, periodic time granularity, and the periodic time interval subsequences period, fluctuation, number of elements, period start time, period end time.

其中,记录的内容还可以包括用户行为的客体,例如网购的商家ID,真实消费行为的商家ID等,还可以记录其它周期时间间隔子序列的参数,以便用于后期的数据分析。The recorded content may also include the object of user behavior, such as the merchant ID of online shopping, the merchant ID of real consumption behavior, etc., and the parameters of other periodic time interval subsequences may also be recorded for later data analysis.

通过上述本申请实施例的方法,可以找到用户行为的周期特性,并对该周期性的行为进行打分,量化了对用户评价的过程,用数字化的方式描述了用户的特征,能够更加准确的分析用户行为以及评价用户,根据该评价结果可以指导商家调整生产,以对目标用户提供相对应的定制服务或者产品,从而可以提高生产服务的效率,降低盲目生产带来的资源浪费。Through the method of the above embodiments of the present application, the periodic characteristics of user behaviors can be found, and the periodic behaviors can be scored, the process of evaluating users can be quantified, and the characteristics of users can be described in a digital way, which enables more accurate analysis. User behavior and evaluation of users, according to the evaluation results, can guide the business to adjust production to provide corresponding customized services or products to target users, thereby improving the efficiency of production services and reducing the waste of resources caused by blind production.

如图2所示为本申请实施例一种分析用户行为周期的装置的结构示意图,在本图中描述了通过寻找用户行为的周期性,可以对用户行为进行分析和评分,从而可以对用户进行分析和评价,其中各个功能单元均可以采用可编程逻辑器件实现,或者使用计算机或者计算机集群实现,并且各个功能单元可以集成在一台计算机之中,或者由多台计算机实现某个功能单元或者某几个功能单元的功能。FIG. 2 is a schematic structural diagram of an apparatus for analyzing user behavior cycle according to an embodiment of the present application. Analysis and evaluation, in which each functional unit can be realized by programmable logic device, or realized by computer or computer cluster, and each functional unit can be integrated in one computer, or a certain functional unit or a certain functional unit can be realized by multiple computers. The functions of several functional units.

该装置具体包括获取单元201,用于获取用户行为的时间间隔序列。The apparatus specifically includes an acquisition unit 201 for acquiring a time interval sequence of user behaviors.

子序列单元202,用于寻找所述时间间隔序列中相邻元素的波动满足预定条件的周期时间间隔子序列。The subsequence unit 202 is configured to search for a periodic time interval subsequence whose fluctuations of adjacent elements in the time interval sequence satisfy a predetermined condition.

计算单元203,用于计算所有所述周期时间间隔子序列的分值。The calculation unit 203 is configured to calculate the scores of all the subsequences of the periodic time interval.

评价单元204,用于根据所述分值对用户进行分级评价。The evaluation unit 204 is configured to perform a graded evaluation on the user according to the score.

作为本申请的一个实施例,所述子序列单元具体用于,当所述时间间隔序列的某段连续的子序列中相邻元素的波动小于预定值时,则该连续的子序列为周期时间间隔子序列。As an embodiment of the present application, the subsequence unit is specifically configured to: when the fluctuation of adjacent elements in a certain continuous subsequence of the time interval sequence is less than a predetermined value, the continuous subsequence is a periodic time spacer sequence.

作为本申请的一个实施例,所述波动包括所述子序列中相邻元素的方差,或者子序列中相邻元素的比值。As an embodiment of the present application, the fluctuation includes the variance of adjacent elements in the subsequence, or the ratio of adjacent elements in the subsequence.

作为本申请的一个实施例,所述子序列单元具体用于,以时间间隔序列中某元素为头,另一元素为尾形成连续的子序列,计算当前子序列是否为周期时间间隔子序列,若所述子序列为周期时间间隔子序列,则不再计算该子序列中是否还存在其它周期时间间隔子序列。As an embodiment of the present application, the subsequence unit is specifically used to calculate whether the current subsequence is a periodic time interval subsequence by taking an element in the time interval sequence as the head and another element as the tail to form a continuous subsequence, If the subsequence is a periodic time interval subsequence, it is not calculated whether there are other periodic time interval subsequences in the subsequence.

作为本申请的一个实施例,所述子序列单元具体用于,选择所述子序列中头元素与尾元素时,以两者之间具有的元素越多越好。As an embodiment of the present application, the subsequence unit is specifically configured to, when selecting the head element and the tail element in the subsequence, the more elements there are between the two, the better.

作为本申请的一个实施例,所述子序列单元具体用于,所述连续的子序列满足如下公式则为周期时间间隔子序列:As an embodiment of the present application, the subsequence unit is specifically used for, the continuous subsequence satisfies the following formula to be a periodic time interval subsequence:

Variance(list)/mean(list)<epsilon/f(length(list))Variance(list)/mean(list)<epsilon/f(length(list))

其中,Variance(list)是指子序列中相邻元素的波动,mean(list)是指子序列中元素的均值,epsilon是指根据场景的预设值,f(length(list))是指考虑到子序列长度的惩罚值。Among them, Variance(list) refers to the fluctuation of adjacent elements in the subsequence, mean(list) refers to the mean value of the elements in the subsequence, epsilon refers to the preset value according to the scene, and f(length(list)) refers to the consideration Penalty to subsequence length.

作为本申请的一个实施例,所述子序列单元具体用于,所述连续的子序列满足如下公式则为周期时间间隔子序列:As an embodiment of the present application, the subsequence unit is specifically used for, the continuous subsequence satisfies the following formula to be a periodic time interval subsequence:

Variance(list)<epsilonVariance(list)<epsilon

其中,Variance(list)是指子序列中相邻元素的波动,epsilon是指根据场景的预设值。Among them, Variance(list) refers to the fluctuation of adjacent elements in the subsequence, and epsilon refers to the preset value according to the scene.

作为本申请的一个实施例,所述计算单元具体用于,提取所述周期时间间隔子序列的周期、波动以及长度,分配以不同的权重值,并获得所述周期时间间隔子序列结束至当前时间的时间信息,计算得到该周期时间间隔子序列的分值,并计算所有周期时间间隔子序列分值的和。As an embodiment of the present application, the computing unit is specifically configured to extract the period, fluctuation and length of the periodic time interval subsequence, assign different weight values, and obtain the period from the end of the periodic time interval subsequence to the current The time information of the time, the score of the subsequence of the periodic time interval is calculated, and the sum of the scores of all the subsequences of the periodic time interval is calculated.

作为本申请的一个实施例,所述计算单元具体用于,计算得到该周期时间间隔子序列的分值进一步包括,所述周期时间间隔子序列的分值符合以下公式:As an embodiment of the present application, the calculation unit is specifically configured to calculate and obtain the score of the periodic time interval subsequence further comprising, the score of the periodic time interval subsequence conforms to the following formula:

s=(a*period+b*variance+c*times)*f(toNow)s=(a*period+b*variance+c*times)*f(toNow)

其中,s为周期时间子序列的分值,a、b、c为权值,period为所述周期时间子序列的周期,variance为所述周期时间子序列中相邻元素的波动,times为所述周期时间子序列的元素个数;toNow为所述周期时间间隔子序列结束至当前时间的时间信息,f()为对所述时间信息的函数运算。Among them, s is the score of the periodic time subsequence, a, b, and c are the weights, period is the period of the periodic time subsequence, variance is the fluctuation of adjacent elements in the periodic time subsequence, and times is the is the number of elements of the periodic time subsequence; toNow is the time information from the end of the periodic time interval subsequence to the current time, and f() is the function operation on the time information.

作为本申请的一个实施例,所述计算单元还用于,记录所有所述周期时间间隔子序列的参数,包括用户ID,周期时间粒度,所述周期时间间隔子序列的周期、波动、元素个数、周期开始时间、周期结束时间。As an embodiment of the present application, the computing unit is further configured to record all the parameters of the periodic time interval subsequence, including user ID, periodic time granularity, period, fluctuation, element number of the periodic time interval subsequence number, cycle start time, cycle end time.

通过上述本申请实施例的装置,可以找到用户行为的周期特性,并对该周期性的行为进行打分,量化了对用户评价的过程,用数字化的方式描述了用户的特征,能够更加准确的分析用户行为以及评价用户,根据该评价结果可以指导商家调整生产,以对目标用户提供相对应的定制服务或者产品,从而可以提高生产服务的效率,降低盲目生产带来的资源浪费。Through the device of the above embodiment of the present application, the periodic characteristics of user behavior can be found, and the periodic behavior can be scored, the process of user evaluation is quantified, the characteristics of users are described in a digital way, and more accurate analysis can be achieved User behavior and evaluation of users, according to the evaluation results, can guide the business to adjust production to provide corresponding customized services or products to target users, thereby improving the efficiency of production services and reducing the waste of resources caused by blind production.

如图3所示为本申请实施例一种分析用户行为周期的方法的具体流程图,在本图中描述了以用户的消费行为为例对用户进行分析的方法,在现实中,用户可能在某一时间段保持着每隔一天消费一次,渐而出现间断,之后又每隔两天消费一次,这种消费行为使用现有技术中的快速傅里叶变换是无法找到规律的,在本申请的方案中发明人提供了一种准遍历的周期寻找方法,可以找到用户消费行为中的周期子序列,从而可以细分用户的行为以及对具有相应行为的用户进行分级评价。Figure 3 shows a specific flowchart of a method for analyzing a user behavior cycle according to an embodiment of the present application. For a certain period of time, consumption is maintained once every other day, and then there is a discontinuity, and then consumption is once every two days. This consumption behavior cannot be found using the fast Fourier transform in the prior art. In this application In the solution of , the inventor provides a quasi-traversal period finding method, which can find the period subsequences in the user's consumption behavior, so that the user's behavior can be subdivided and users with corresponding behaviors can be graded and evaluated.

步骤301,获取用户消费行为的时间序列。Step 301, acquiring a time series of user consumption behaviors.

在本步骤中,用户的消费行为如图4所示开始时用户的消费行为周期为1,而在过了7天以后,用户的消费行为周期为2,该时间序列为(1,2,3,4,6,11,13,15),代表该用户的消费行为分别发生在1日,2日,3日,4日,6日,11日,13日,15日。In this step, as shown in Figure 4, the user's consumption behavior period is 1 at the beginning, and after 7 days, the user's consumption behavior period is 2, and the time series is (1, 2, 3 , 4, 6, 11, 13, 15), representing the user's consumption behavior occurred on the 1st, 2nd, 3rd, 4th, 6th, 11th, 13th, and 15th, respectively.

步骤302,根据所述用户消费行为的时间序列得到用户消费行为的时间间隔序列。Step 302: Obtain a time interval sequence of user consumption behaviors according to the time series of user consumption behaviors.

由于用户的行为为消费行为,则时间间隔序列的粒度为“天”。根据图4所示的消费行为的时间序列图,可以得到时间间隔序列(1,1,1,2,5,2,2),该时间间隔序列表示上述的时间序列的时间间隔。Since the user's behavior is consumption behavior, the granularity of the time interval sequence is "days". According to the time series diagram of consumption behavior shown in Fig. 4, a time interval sequence (1, 1, 1, 2, 5, 2, 2) can be obtained, and the time interval sequence represents the time interval of the above-mentioned time series.

步骤303,遍历时间间隔序列中的所有子序列,寻找其中的周期时间间隔子序列。Step 303 , traverse all the subsequences in the time interval sequence, and find the periodic time interval subsequence therein.

在本步骤中,遍历时间间隔序列的所有子序列,遍历的方式需满足一个原则:优先遍历长的子序列,如果该长的子序列为周期序列,则该子序列中所有的子序列都将不再判断;同时如果当前子序列是周期序列集合E中任一序列的子序列,也不再判断是否为周期序列,这样就可以有效的减小计算复杂度,因此将本算法命名为“准遍历法”。In this step, all subsequences of the time interval sequence are traversed, and the traversal method must satisfy a principle: traverse the long subsequence first. If the long subsequence is a periodic sequence, then all the subsequences in the subsequence will be At the same time, if the current subsequence is a subsequence of any sequence in the periodic sequence set E, it is no longer judged whether it is a periodic sequence, which can effectively reduce the computational complexity, so this algorithm is named "quasi-periodic sequence". Traversal".

具体流程可以参考如下伪程序:The specific process can refer to the following pseudo program:

输入:时间序列MInput: time series M

输出:周期时间序列集合E,及相应的周期参数Output: Periodic time series set E, and corresponding period parameters

Figure BDA0000974577780000071
Figure BDA0000974577780000071

其中,length(N)为取时间间隔序列的长度,list为子序列,E.append(list)为将list子序列放入序列集合E中,在本实施例中通过循环,从最长的时间间隔序列开始进行判断(参见上述程序第5行),逐步的减少时间间隔序列中的元素(从最后一位元素开始向前减少)构成时间间隔子序列(参见上述程序第4行),判断每个时间间隔子序列是否为周期时间间隔子序列,然后将时间间隔序列中的头元素向后移动(参见上述程序第3行),重新判断当前时间间隔子序列是否为周期时间间隔子序列,如果某个时间间隔子序列为周期时间间隔子序列则不再继续判断该子序列中是否还包括其它周期时间间隔子序列(参见上述程序第7行)。Among them, length(N) is the length of the time interval sequence, list is the subsequence, and E.append(list) is to put the list subsequence into the sequence set E. In this embodiment, through the loop, from the longest time The interval sequence starts to be judged (see the 5th line of the above program), and the elements in the time interval sequence are gradually reduced (reduced from the last element forward) to form a time interval subsequence (see the 4th line of the above program), and each time interval is judged. Whether the time interval subsequence is a periodic time interval subsequence, then move the head element in the time interval sequence backward (see the third line of the above program), and re-determine whether the current time interval subsequence is a periodic time interval subsequence, if If a certain time interval subsequence is a periodic time interval subsequence, it will not continue to judge whether the subsequence also includes other periodic time interval subsequences (see the seventh line of the above program).

判断子序列是否为周期时间间隔子序列具体方法可以为,判断时间间隔子序列的方差是否小于一预定值,即Variance(list)<epsilon,其中,Variance(list)是指子序列的方差,epsilon是指根据场景的预设值,在用户消费行为的场景中可以预设为1。The specific method for judging whether the subsequence is a periodic time interval subsequence may be: judging whether the variance of the time interval subsequence is less than a predetermined value, that is, Variance(list)<epsilon, where Variance(list) refers to the variance of the subsequence, epsilon It means that according to the preset value of the scene, it can be preset to 1 in the scene of the user's consumption behavior.

例如第一次循环时,时间间隔序列为(1,1,1,2,5,2,2),该时间间隔序列的均值为(1+1+1+2+5+2+2)/7=2,该时间间隔序列的方差为((2-1)2+(2-1)2+(2-1)2+(2-2)2+(5-2)2+(2-2)2+(2-2)2)/7=12/7,方差大于预设值1,该时间间隔序列不为周期时间间隔序列;在随后的某个循环中,时间间隔子序列为(1,1,1,2),该时间间隔子序列的均值为5/4,该时间间隔子序列的方差为3/16,方差小于预设值1,该时间间隔子序列(1,1,1,2)为周期时间间隔子序列。For example, in the first cycle, the time interval sequence is (1, 1, 1, 2, 5, 2, 2), and the mean of the time interval sequence is (1+1+1+2+5+2+2)/ 7=2, the variance of the time interval series is ((2-1) 2 +(2-1) 2 +(2-1) 2 +(2-2) 2 +(5-2) 2 +(2- 2) 2 +(2-2) 2 )/7=12/7, the variance is greater than the preset value 1, and the time interval sequence is not a periodic time interval sequence; in a subsequent cycle, the time interval subsequence is ( 1, 1, 1, 2), the mean of the time interval subsequence is 5/4, the variance of the time interval subsequence is 3/16, and the variance is less than the preset value 1, the time interval subsequence (1, 1, 1, 2) are periodic time interval subsequences.

通过类似的方法可以找到另一个周期时间间隔子序列(2,2)。Another periodic time interval subsequence (2,2) can be found by a similar method.

在另一个实施例中,还可以根据如下公式判断时间间隔子序列是否为周期时间间隔子序列:In another embodiment, it is also possible to judge whether the time interval subsequence is a periodic time interval subsequence according to the following formula:

Variance(list)/mean(list)<epsilon/f(length(list))Variance(list)/mean(list)<epsilon/f(length(list))

其中,Variance(list)是指子序列的方差,mean(list)是指子序列中元素的均值,epsilon是指根据场景的预设值,f(length(list))是指考虑到子序列长度的惩罚值。Among them, Variance(list) refers to the variance of the subsequence, mean(list) refers to the mean value of the elements in the subsequence, epsilon refers to the preset value according to the scene, and f(length(list)) refers to considering the length of the subsequence penalty value.

步骤304,计算上述寻找出的周期时间间隔子序列的分值。Step 304: Calculate the scores of the periodic time interval subsequences found above.

在本步骤中,周期时间间隔子序列的分值可以根据该子序列各项参数的权值计算,例如,参考该周期时间间隔子序列的周期、波动以及长度计算该子序列的分值,In this step, the score of the periodic time interval subsequence can be calculated according to the weights of the parameters of the subsequence, for example, the score of the subsequence is calculated with reference to the period, fluctuation and length of the periodic time interval subsequence,

s=a*period+b*variance+c*timess=a*period+b*variance+c*times

其中,a、b、c为权值,period为所述周期时间子序列的周期,variance为所述周期时间子序列的波动,times为所述周期时间子序列的元素个数。其中,period越小,说明用户行为越频繁,此项的值应当越大,a*period可以为负相关运算,例如y=1/x;variance越小,说明波动越小,此项的值应当越大,b*variance可以为负相关运算,例如y=1/x;times越大,说明周期越长,此项的值应当越大,c*times可以为正相关运算,例如y=x。Where, a, b, and c are weights, period is the period of the periodic time subsequence, variance is the fluctuation of the periodic time subsequence, and times is the number of elements of the periodic time subsequence. Among them, the smaller the period, the more frequent the user behavior, the larger the value of this item should be, a*period can be a negative correlation operation, such as y=1/x; the smaller the variance, the smaller the fluctuation, the value of this item should be The larger the value, b*variance can be a negative correlation operation, for example, y=1/x; the larger the times, the longer the period, the larger the value of this item should be, and c*times can be a positive correlation operation, for example, y=x.

按照相同的方式,计算其它周期时间间隔子序列的分值,将所有的周期时间间隔子序列的分值相加,得到该时间间隔序列的分值。In the same way, the scores of other periodic time interval subsequences are calculated, and the scores of all periodic time interval subsequences are added to obtain the score of the time interval sequence.

在另一个实施例中,还可以考虑所述周期时间间隔子序列结束至当前时间的惩罚值,即周期时间间隔子序列结束时间到当前时间越长,则分值应该相对较低,若周期时间间隔子序列结束时间到当前时间越短,则分值应该相对较高:In another embodiment, the penalty value from the end of the periodic time interval subsequence to the current time may also be considered, that is, the longer the end time of the periodic time interval subsequence to the current time, the score should be relatively low. The shorter the interval subsequence end time to the current time, the higher the score should be:

s=(a*period+b*variance+c*times)*f(toNow)s=(a*period+b*variance+c*times)*f(toNow)

其中,toNow为所述周期时间间隔子序列结束至当前时间的时间信息,f()为对所述时间信息的函数运算,可以为开根运算、取log运算、e-x运算等等,其中x为时间信息,该f()可以根据应用场景不同而不同。Wherein, toNow is the time information from the end of the periodic time interval subsequence to the current time, and f( ) is the function operation on the time information, which can be root operation, log operation, e- x operation, etc., wherein x is time information, and the f() can be different according to different application scenarios.

可以将上述用户消费行为的时间间隔子序列分别存储起来,例如可以存储入下表所示的表格1中,根据该表格可以方便其它用户评价算法进行评价。The time interval subsequences of the user's consumption behavior can be stored separately, for example, can be stored in Table 1 shown in the following table, and evaluation by other user evaluation algorithms can be facilitated according to the table.

表格1Table 1

Figure BDA0000974577780000091
Figure BDA0000974577780000091

步骤305,根据所述分值对用户进行分级评价。Step 305: Perform a graded evaluation on the user according to the score.

根据各个周期时间间隔子序列的参数可以分析得到用户的忠诚度,例如分值越高的用户忠诚度越高,并且可以根据上述表格中的各种参数对用户群体进行聚类,例如将周期值相同或者类似的用户分为一个类别,根据用户消费行为的波动划分等级,将用户分类或者分级后,可以根据分类或者分级向用户提供不同的服务,其中可以包括向用户发送不同的信息,给予客户不同的折扣等等,也就是说通过前述各个步骤可以对用户进行分级评价,之后可以利用上述的数据对用户提供各种服务。According to the parameters of the sub-sequences of each cycle time interval, the user's loyalty can be obtained by analysis, for example, the higher the score, the higher the user loyalty, and the user groups can be clustered according to the various parameters in the above table, for example Identical or similar users are divided into one category, and graded according to the fluctuation of user consumption behavior. After users are classified or graded, different services can be provided to users according to the classification or grade, which can include sending different information to users, giving customers Different discounts, etc., that is to say, users can be graded and evaluated through the foregoing steps, and then various services can be provided to users by using the above data.

如图5所示为本申请实施例一种分析用户行为周期方法的具体流程图,在本图中描述了以用户缴纳电费的行为为例对用户进行分析的方法,在本实施例中为了举例,假设用户可能在某一时间段保持着每隔一周缴纳电费一次,渐而出现间断,之后又每隔两周缴费一次,这种缴费行为使用现有技术中的快速傅里叶变换是无法找到规律的,在本申请的方案中发明人提供了一种准遍历的周期寻找方法,可以找到用户缴纳电费行为中的周期子序列,从而可以细分用户的行为以及对具有相应行为的用户进行分级评价。FIG. 5 is a specific flowchart of a method for analyzing a user behavior cycle according to an embodiment of the present application. In this figure, a method for analyzing a user is described by taking the behavior of a user paying electricity bills as an example. In this embodiment, for the sake of example , it is assumed that the user may keep paying the electricity bill every other week for a certain period of time, and then there will be discontinuities, and then the bill will be paid every two weeks. This kind of payment behavior cannot be found using the fast Fourier transform in the prior art. Regularly, in the solution of the present application, the inventor provides a quasi-traversal period search method, which can find the period subsequence in the user's electricity bill payment behavior, so that the user's behavior can be subdivided and users with corresponding behavior can be classified. Evaluation.

步骤501,获取用户缴费行为的时间序列。Step 501: Obtain a time series of user payment behaviors.

在本步骤中,为了简便说明时间序列还是以图4为例,所不同的是以周为粒度,代表该用户的缴费行为分别发生在第1周,第二周,第3周,第4周,第6周,第11周,第13周,第15周。In this step, in order to explain the time series simply, we still take Figure 4 as an example. , Week 6, Week 11, Week 13, Week 15.

步骤502,根据所述用户缴费行为的时间序列得到用户缴费行为的时间间隔序列。Step 502: Obtain a time interval sequence of user payment behaviors according to the time sequence of user payment behaviors.

在本步骤中,由于用户的行为为缴费行为,则时间间隔序列的粒度为“周”。可以得到时间间隔序列(1,1,1,2,5,2,2),该时间间隔序列表示上述的时间序列的时间间隔。In this step, since the user's behavior is payment behavior, the granularity of the time interval sequence is "week". A time interval sequence (1, 1, 1, 2, 5, 2, 2) can be obtained, and the time interval sequence represents the time interval of the above-mentioned time series.

步骤503,遍历时间间隔序列中的所有子序列,寻找其中的周期时间间隔子序列。Step 503, traverse all the subsequences in the time interval sequence, and find the periodic time interval subsequence therein.

在本步骤中,可以采用“贪婪法”遍历时间间隔序列寻找其中周期时间间隔子序列,或者直接遍历时间间隔序列寻找其中周期时间间隔子序列。In this step, the "greedy method" can be used to traverse the time interval sequence to find the periodic time interval subsequence, or directly traverse the time interval sequence to find the periodic time interval subsequence.

“贪婪法”是指在对问题求解时,总是做出在当前看来是最好的选择。利用“贪婪法”来提取序列的子序列,有效降低计算时间复杂度,但会遗漏一部分存在周期性的子序列。The "greedy method" means that when solving a problem, always make the best choice at the moment. The "greedy method" is used to extract the subsequences of the sequence, which effectively reduces the computational time complexity, but will miss some periodic subsequences.

为了简便说明,在本实施例中采用直接遍历的方法寻找周期时间间隔子序列,从时间间隔序列的头元素开始向后一个元素一个元素的判断相邻元素之间的波动,如果超过预定值,则以遍历过的时间间隔子序列为周期时间间隔子序列,并从波动超过预定值的元素开始继续向后寻找相邻元素的波动小于预定值的子序列。For the sake of simplicity, in this embodiment, the method of direct traversal is used to find the periodic time interval subsequence, and the fluctuation between adjacent elements is judged from the head element of the time interval sequence to the next element by one element. If it exceeds a predetermined value, Then take the traversed time interval subsequence as the periodic time interval subsequence, and start from the element whose fluctuation exceeds the predetermined value, and continue to search backwards for the subsequence whose adjacent element fluctuation is less than the predetermined value.

在本实施例中,相邻元素之间的波动可以以两个元素之间的比值进行判断,当两个元素的比值较大时,则认为这两个元素的波动较大,有可能周期性被破坏,比值较小时,则认为这两个元素之间的波动较小,有可能存在周期性。In this embodiment, the fluctuation between adjacent elements can be judged by the ratio between the two elements. When the ratio of the two elements is large, it is considered that the fluctuation of the two elements is large, which may be periodic When the ratio is small, it is considered that the fluctuation between the two elements is small, and there may be periodicity.

根据上述波动,可以直接根据相邻元素的比值与预定值的比较结果得到最后这个元素是否和前面已经遍历过的元素子序列构成周期时间间隔子序列。According to the above fluctuation, whether the last element and the previously traversed element subsequence constitute a periodic time interval subsequence can be obtained directly according to the comparison result between the ratio of the adjacent elements and the predetermined value.

步骤504,计算上述寻找出的周期时间间隔子序列的分值。Step 504: Calculate the scores of the periodic time interval subsequences found above.

本步骤可以参考上述图3所示实施例的相应步骤,在此不再赘述。For this step, reference may be made to the corresponding steps in the above-mentioned embodiment shown in FIG. 3 , which will not be repeated here.

步骤505,根据所述分值对用户进行分级评价。Step 505: Perform a graded evaluation on the user according to the score.

通过上述本申请实施例中的方法及装置,可以找到用户行为的周期特性,并对该周期性的行为进行打分,量化了对用户评价的过程,用数字化的方式描述了用户的特征,能够更加准确的分析用户行为以及评价用户,根据该评价结果可以指导商家调整生产,以对目标用户提供相对应的定制服务或者产品,从而可以提高生产服务的效率,降低盲目生产带来的资源浪费。Through the method and device in the above embodiments of the present application, the periodic characteristics of user behavior can be found, and the periodic behavior can be scored, the process of evaluating users can be quantified, the characteristics of users can be described in a digital way, and the user can be more Accurately analyze user behavior and evaluate users. According to the evaluation results, merchants can be guided to adjust production to provide corresponding customized services or products to target users, thereby improving the efficiency of production services and reducing the waste of resources caused by blind production.

对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(ProgrammableLogic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片2。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(HardwareDescription Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(AdvancedBoolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(JavaHardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby HardwareDescription Language)等,目前最普遍使用的是VHDL(Very-High-Speed IntegratedCircuit Hardware Description Language)与Verilog2。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。The improvement of a technology can be clearly distinguished from improvement in hardware (for example, improvement of circuit structures such as diodes, transistors, switches, etc.) or improvement in software (improvement in method flow). However, with the development of technology, the improvement of many methods and processes today can be regarded as a direct improvement of the hardware circuit structure. Designers almost get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be realized by hardware entity modules. For example, a Programmable Logic Device (PLD) (eg, Field Programmable Gate Array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device. It is programmed by the designer to "integrate" a digital system on a PLD without having to ask a chip manufacturer to design and manufacture a dedicated integrated circuit chip 2 . And, instead of making integrated circuit chips by hand, these days, most of this programming is done using "logic compiler" software, which is similar to the software compilers used in program development and writing, but before compiling The original code also has to be written in a specific programming language, which is called Hardware Description Language (HDL), and there is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (JavaHardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. Currently, the most commonly used is VHDL ( Very-High-Speed IntegratedCircuit Hardware Description Language) and Verilog2. It should also be clear to those skilled in the art that a hardware circuit for implementing the logic method process can be easily obtained by simply programming the method process in the above-mentioned several hardware description languages and programming it into the integrated circuit.

控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。The controller may be implemented in any suitable manner, for example, the controller may take the form of eg a microprocessor or processor and a computer readable medium storing computer readable program code (eg software or firmware) executable by the (micro)processor , logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers and embedded microcontrollers, examples of controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicon Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory.

本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。Those skilled in the art also know that, in addition to implementing the controller in the form of pure computer-readable program code, the controller can be implemented as logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded devices by logically programming the method steps. The same function can be realized in the form of a microcontroller, etc. Therefore, such a controller can be regarded as a hardware component, and the devices included therein for realizing various functions can also be regarded as a structure within the hardware component. Or even, the means for implementing various functions can be regarded as both a software module implementing a method and a structure within a hardware component.

上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。The systems, devices, modules or units described in the above embodiments may be specifically implemented by computer chips or entities, or by products with certain functions.

为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, when describing the above device, the functions are divided into various units and described respectively. Of course, when implementing the present application, the functions of each unit may be implemented in one or more software and/or hardware.

通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例或者实施例的某些部分所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products can be stored in storage media, such as ROM/RAM, magnetic disks , CD-ROM, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present application.

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for related parts, please refer to the partial descriptions of the method embodiments.

本申请可用于众多通用或专用的计算机系统环境或配置中。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、多处理器系统、基于微处理器的系统、置顶盒、可编程的消费电子设备、网络PC、小型计算机、大型计算机、包括以上任何系统或设备的分布式计算环境等等。The present application may be used in numerous general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, including A distributed computing environment for any of the above systems or devices, and the like.

本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including storage devices.

虽然通过实施例描绘了本申请,本领域普通技术人员知道,本申请有许多变形和变化而不脱离本申请的精神,希望所附的权利要求包括这些变形和变化而不脱离本申请的精神。Although the application has been described by way of examples, those of ordinary skill in the art will recognize that the application is subject to many modifications and variations without departing from the spirit of the application, and the appended claims are intended to include such modifications and changes without departing from the spirit of the application.

Claims (20)

1. A method of analyzing a period of user behavior, comprising:
acquiring a time interval sequence of user behaviors;
searching for a periodic time interval subsequence in which the fluctuation of adjacent elements in the time interval sequence meets a predetermined condition;
calculating scores for all of the periodic time interval subsequences;
grading evaluation is carried out on the user according to the score;
calculating scores for all of the periodic time interval subsequences further comprises: extracting the period, fluctuation and length of the periodic time interval subsequence, distributing different weight values, obtaining time information from the end of the periodic time interval subsequence to the current time, and calculating to obtain the score of the periodic time interval subsequence.
2. The method of claim 1, wherein finding a periodic time interval subsequence in which fluctuations of neighboring elements in the time interval sequence satisfy a predetermined condition further comprises, when fluctuations of neighboring elements in a certain continuous subsequence of the time interval sequence are less than a predetermined value, then the continuous subsequence is a periodic time interval subsequence.
3. The method of claim 2, wherein the fluctuation comprises a variance of adjacent elements in the subsequence, or a ratio of adjacent elements in the subsequence.
4. The method according to claim 2, wherein when the fluctuation of adjacent elements in a certain continuous subsequence of the time interval sequence is smaller than a predetermined value, the continuous subsequence is a periodic time interval subsequence, and the step of calculating whether the current subsequence is a periodic time interval subsequence is further included.
5. The method of claim 4, wherein forming a continuous subsequence with an element in the sequence of time intervals as a head and another element as a tail further comprises selecting the subsequence with the head element and the tail element as having the more elements in between.
6. The method of claim 2, wherein when the fluctuation of adjacent elements in a continuous subsequence of the time interval sequence is less than a predetermined value, then the continuous subsequence is a periodic time interval subsequence further comprising, if the continuous subsequence satisfies the following formula:
Variance(list)/mean(list)<epsilon/f(length(list))
where, variance (list) refers to fluctuation of adjacent elements in the subsequence, mean (list) refers to a mean value of elements in the subsequence, epsilon refers to a preset value according to a scene, and f (length (list)) refers to a penalty value considering the length of the subsequence.
7. The method of claim 2, wherein when the fluctuation of adjacent elements in a continuous subsequence of the time interval sequence is less than a predetermined value, then the continuous subsequence is a periodic time interval subsequence further comprising, if the continuous subsequence satisfies the following formula:
Variance(list)<epsilon
wherein, variance (list) refers to the fluctuation of adjacent elements in the subsequence, and epsilon refers to a preset value according to a scene.
8. The method of claim 1, wherein calculating scores for all of the periodic time interval subsequences further comprises calculating a sum of scores for all of the periodic time interval subsequences.
9. The method of claim 8, wherein calculating the score for the periodic time interval subsequence further comprises calculating the score for the periodic time interval subsequence according to the formula:
s=(a*period+b*variance+c*times)*f(toNow)
wherein s is the score of the periodic time subsequence, a, b and c are weights, period is the period of the periodic time subsequence, variance is the fluctuation of adjacent elements in the periodic time subsequence, and times is the number of the elements of the periodic time subsequence; toNow is time information from the end of the periodic time interval subsequence to the current time, and f () is a function operation on the time information.
10. The method of claim 1, wherein calculating scores for all of the periodic time interval subsequences further comprises recording parameters of all of the periodic time interval subsequences including user ID, periodic time granularity, period, fluctuation, element count, period start time, and period end time of the periodic time interval subsequences.
11. An apparatus for analyzing a period of user behavior, comprising:
the acquiring unit is used for acquiring a time interval sequence of user behaviors;
a sub-sequence unit for finding a periodic time interval sub-sequence in which fluctuations of adjacent elements in the time interval sequence satisfy a predetermined condition;
a calculating unit, configured to calculate scores of all the periodic time interval subsequences;
the evaluation unit is used for carrying out grading evaluation on the user according to the score;
the calculating unit is specifically configured to extract a period, fluctuation, and length of the periodic time interval subsequence, assign different weight values, obtain time information from the end of the periodic time interval subsequence to the current time, and calculate a score of the periodic time interval subsequence.
12. The apparatus according to claim 11, wherein the subsequence unit is configured to determine a period time interval subsequence if the fluctuation of adjacent elements in a certain continuous subsequence of the time interval sequence is smaller than a predetermined value.
13. The apparatus of claim 12, wherein the fluctuation comprises a variance of adjacent elements in the subsequence or a ratio of adjacent elements in the subsequence.
14. The apparatus according to claim 12, wherein the sub-sequence unit is specifically configured to form a continuous sub-sequence with an element in the time interval sequence as a head and another element as a tail, calculate whether the current sub-sequence is a periodic time interval sub-sequence, and if the sub-sequence is the periodic time interval sub-sequence, not calculate whether there are other periodic time interval sub-sequences in the sub-sequence.
15. The apparatus according to claim 14, wherein the subsequence unit is specifically configured to select the first element and the last element of the subsequence as having more elements in between.
16. The apparatus according to claim 12, wherein the subsequence unit is specifically configured to determine the consecutive subsequences as periodic time interval subsequences if the following formula is satisfied:
Variance(list)/mean(list)<epsilon/f(length(list))
where, variance (list) refers to fluctuation of adjacent elements in the subsequence, mean (list) refers to a mean value of elements in the subsequence, epsilon refers to a preset value according to a scene, and f (length (list)) refers to a penalty value considering the length of the subsequence.
17. The apparatus according to claim 12, wherein the subsequence unit is specifically configured to determine the consecutive subsequences as periodic time interval subsequences if the following formula is satisfied:
Variance(list)<epsilon
wherein, variance (list) refers to the fluctuation of adjacent elements in the subsequence, and epsilon refers to a preset value according to a scene.
18. The apparatus according to claim 11, wherein the calculation unit is specifically configured to calculate a sum of all periodic time interval subsequence scores.
19. The apparatus according to claim 18, wherein the calculating unit is specifically configured to calculate the score of the periodic time interval subsequence further includes that the score of the periodic time interval subsequence satisfies the following formula:
s=(a*period+b*variance+c*times)*f(toNow)
wherein s is the score of the periodic time subsequence, a, b and c are weights, period is the period of the periodic time subsequence, variance is the fluctuation of adjacent elements in the periodic time subsequence, and times is the number of the elements of the periodic time subsequence; toNow is time information from the end of the periodic time interval subsequence to the current time, and f () is a function operation on the time information.
20. The apparatus according to claim 11, wherein the computing unit is further configured to record parameters of all the periodic time interval subsequences, including user ID, periodic time granularity, period, fluctuation, element number, period start time, and period end time of the periodic time interval subsequences.
CN201610266283.3A 2016-04-26 2016-04-26 Method and device for analyzing user behavior period Active CN107316200B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610266283.3A CN107316200B (en) 2016-04-26 2016-04-26 Method and device for analyzing user behavior period

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610266283.3A CN107316200B (en) 2016-04-26 2016-04-26 Method and device for analyzing user behavior period

Publications (2)

Publication Number Publication Date
CN107316200A CN107316200A (en) 2017-11-03
CN107316200B true CN107316200B (en) 2020-07-03

Family

ID=60185332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610266283.3A Active CN107316200B (en) 2016-04-26 2016-04-26 Method and device for analyzing user behavior period

Country Status (1)

Country Link
CN (1) CN107316200B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108389060B (en) * 2018-02-28 2021-10-29 南京芝麻信息科技有限公司 Customer loyalty information processing method and device
CN111127056A (en) * 2018-10-31 2020-05-08 北京国双科技有限公司 User grade division method and device
CN110390160B (en) * 2019-07-19 2022-03-22 浪潮(北京)电子信息产业有限公司 Method and device for detecting period of time sequence signal and related equipment
CN111148045B (en) * 2019-12-30 2022-02-11 中国联合网络通信集团有限公司 User behavior cycle extraction method and device
CN111415236B (en) * 2020-03-17 2021-09-14 上海新致软件股份有限公司 Block chain big data financial user tag estimation method and system based on cloud computing
CN112541798A (en) * 2020-09-27 2021-03-23 深圳莱尔托特科技有限公司 Shared wardrobe service system
CN112288520A (en) * 2020-10-28 2021-01-29 北京每日优鲜电子商务有限公司 Item information card pushing method, apparatus, electronic device and computer-readable medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102439622A (en) * 2009-03-19 2012-05-02 标记公司 System and method for selecting relevant users for referring users in an online environment
CN105224685A (en) * 2015-10-28 2016-01-06 同济大学 A kind of system of digging user cyclic pattern and method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104717120B (en) * 2013-12-13 2019-03-01 阿里巴巴集团控股有限公司 Method and device for determining information transmission time

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102439622A (en) * 2009-03-19 2012-05-02 标记公司 System and method for selecting relevant users for referring users in an online environment
CN105224685A (en) * 2015-10-28 2016-01-06 同济大学 A kind of system of digging user cyclic pattern and method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Discovery of Periodic Patterns in Sequence Data: A Variance Based Approach";Yinghui (Catherine) Yang 等;《INFORMS Journal on Computing》;20121231;第24卷(第3期);图A3、表A1 *

Also Published As

Publication number Publication date
CN107316200A (en) 2017-11-03

Similar Documents

Publication Publication Date Title
CN107316200B (en) Method and device for analyzing user behavior period
CN110070399B (en) Coupon pushing method and device
CN110728458B (en) Target object risk monitoring method and device and electronic equipment
CN102193929B (en) Method and equipment for searching by using word information entropy
CN107358247B (en) Method and device for determining lost user
TW201833851A (en) Risk control event automatic processing method and apparatus
CN108460523A (en) A kind of air control rule generating method and device
CN110457287B (en) Expansion and contraction capacity processing method and device of database, computer equipment and readable medium
WO2019091177A1 (en) Risk identification model building method, apparatus and device and risk identification method, apparatus and device
CN109426912B (en) Wind control system optimization method, system and device and electronic equipment
CN105630458B (en) The Forecasting Methodology of average throughput under a kind of out-of order processor stable state based on artificial neural network
US20220391672A1 (en) Multi-task deployment method and electronic device
CN106033574B (en) Method and device for identifying cheating behavior
CN107451832A (en) The method and apparatus of pushed information
CN107563557A (en) Method and device for determining oil well production decline rate
CN107291533B (en) Method and device for determining upstream node bottleneck degree and system bottleneck degree
WO2017000828A1 (en) Rule-based data object verification method, apparatus, system and electronic device
CN107622413A (en) A kind of price sensitivity computational methods, device and its equipment
CN110490595B (en) A risk control method and device
JP2016224814A (en) Performance information generation program, performance information generation method and information processor
WO2018032897A1 (en) Method and device for evaluating packet forwarding performance and computer storage medium
CN110019670A (en) A kind of text searching method and device
CN110019665A (en) Text searching method and device
CN108564135B (en) A method for building skeleton programs and realizing high performance computing program runtime prediction
Chen et al. Using deep learning to predict and optimize hadoop data analytic service in a cloud platform

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: Greater Cayman, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.