WO2017156927A1 - Method and device for generating counting event - Google Patents

Method and device for generating counting event Download PDF

Info

Publication number
WO2017156927A1
WO2017156927A1 PCT/CN2016/088490 CN2016088490W WO2017156927A1 WO 2017156927 A1 WO2017156927 A1 WO 2017156927A1 CN 2016088490 W CN2016088490 W CN 2016088490W WO 2017156927 A1 WO2017156927 A1 WO 2017156927A1
Authority
WO
WIPO (PCT)
Prior art keywords
counting
count
target
identifier
subject
Prior art date
Application number
PCT/CN2016/088490
Other languages
French (fr)
Chinese (zh)
Inventor
杨宗鉴
Original Assignee
乐视控股(北京)有限公司
乐视网信息技术(北京)股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 乐视控股(北京)有限公司, 乐视网信息技术(北京)股份有限公司 filed Critical 乐视控股(北京)有限公司
Priority to US15/242,241 priority Critical patent/US20170263068A1/en
Publication of WO2017156927A1 publication Critical patent/WO2017156927A1/en

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C13/00Voting apparatus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Definitions

  • the embodiments of the present invention relate to the field of network communication technologies, and in particular, to a method and an apparatus for generating a counting event.
  • the present invention provides a method and apparatus for generating a counting event to solve the technical problem that the voting and other functions are less efficient in development.
  • a method of generating a counting event comprising:
  • the counting rule corresponding to the counting rule identifier, the counting option corresponding to the counting option identifier, wherein the counting subject corresponds to the counting subject identifier, wherein The counting subject is associated with the subscription content;
  • the target count event identifier includes a target count rule identifier, a target count subject identifier, and a target count option identifier;
  • a target count event is generated according to the target count rule, the target count subject, and the target count option, and the target count event is used to count the target count option sent by the user for the target count subject according to the target count rule.
  • an apparatus for generating a counting event comprising:
  • a data storage unit configured to store preset counting rules, counting options, and counting topics in a counting database, where the counting rules correspond to a counting rule identifier, the counting option corresponding to a counting option identifier, the counting subject and counting The subject identifier corresponds to, wherein the counting subject is associated with the subscription content;
  • a count event identifier obtaining unit configured to acquire a target count event identifier, where the target count event identifier includes a target count rule identifier, a target count subject identifier, and a target count option identifier;
  • a counting event definition unit configured to acquire, according to the target counting event identifier, a corresponding target counting rule, a target counting subject, and a target counting option from the counting database
  • a count event creation unit configured to generate a target count event according to the target count rule, the target count subject, and the target count option, wherein the target count event is used to count the target count option sent by the user for the target count subject according to a target
  • the rules are counted.
  • a server includes: the apparatus for generating a counting event according to the second aspect of the embodiment of the present invention.
  • voting, etc. is essentially a quantity or a pair
  • the counting of the ID so the present invention separates this set of ID and counting logic separately, realizes the stripping of "logic” and "content”, and the content-related parts (such as voting title, options, etc.) can be separately maintained.
  • the developer only needs to generate three types of identifiers according to preset rules, and then combines the three types of identifiers to obtain a count event identifier, which can be input to the system. By parsing the count event identifier, the system can automatically read the vote. Topics, voting rules, etc., to automatically create count events.
  • the logic and content stripping design of the present invention is highly adaptable, and is applicable not only to regular voting but also to Disguised voting, such as scoring, play count statistics, etc. (because it is essentially a count of an ID), allows developers to easily and flexibly create a variety of votes.
  • FIG. 1 is a flowchart of a method for generating a counting event according to an exemplary embodiment of the present invention
  • FIG. 2 is a flowchart of a method for generating a counting event according to an exemplary embodiment of the present invention
  • FIG. 3 is a flowchart of a method for generating a counting event according to an exemplary embodiment of the present invention
  • FIG. 4 is a flowchart of a method for generating a counting event according to an exemplary embodiment of the present invention
  • FIG. 5 is a schematic diagram of an apparatus for generating a counting event according to an exemplary embodiment of the present invention.
  • FIG. 6 is a schematic diagram of an apparatus for generating a counting event according to an exemplary embodiment of the present invention.
  • FIG. 7 is a schematic diagram of an apparatus for generating a counting event according to an exemplary embodiment of the present invention.
  • FIG. 1 is a flow chart showing a method of generating a counting event, according to an exemplary embodiment. This method can be used, for example, for a server or the like.
  • the method can include:
  • Step S101 The preset counting rule, the counting option, and the counting subject are stored in a counting database, where the counting rule corresponds to the counting rule identifier, the counting option corresponds to the counting option identifier, and the counting subject corresponds to the counting topic identifier. Wherein the counting subject is associated with the subscription content.
  • the counting subject may be a vote for a question.
  • the counting subject may correspond to an identifier, or an identifier may be assigned to the counting subject, and the identifier may be an ID (Identification, ID), and a number. Wait.
  • ID Identification, ID
  • the content of the voting question can be stored separately and the content is associated with the counting topic.
  • Step S102 Acquire a target count event identifier, where the target count event identifier includes a target count rule identifier, a target count subject identifier, and a target count option identifier.
  • the count event identifier (also referred to as the count event ID) can be entered by the technician.
  • the count can be one of the following:
  • the count is a vote
  • the count subject is a voting subject
  • the counting option is a voting option
  • the counting subject is a favorite object
  • the counting option includes at least one or two of praise, step
  • the counting subject is a play object, and the counting option is playing once;
  • the count is a score
  • the count subject is a scoring object
  • the count options include different scores.
  • the present invention can completely decouple the voting content and the voting counting function.
  • a vote is essentially a count of an identifier (or a data volume, an ID), and the content data of the vote itself (such as title, description, option content, etc.) is maintained by the caller, in the present invention only Maintenance vote
  • the piece ID can be related to the number of votes.
  • the voting event ID may be designed as a structure of A_B_C:
  • A is a rule ID (ie, a counting rule identifier), the ID may represent multiple rules;
  • B is a topic ID (ie, a counting subject identifier), or may be abstracted as The album ID, video ID, etc. can be freely set according to the specific voting requirements;
  • C is the option ID (ie, the counting option identifier), for example, who can be voted for, or can be abstracted as praise, step, and the like.
  • the specific form of the ID/identity is not limited in this embodiment, and may be, for example, a letter and a number, as long as the counting rule/counting subject/counting option represented by the identifier can be correspondingly found according to the identifier.
  • Step S103 Acquire, according to the target count event identifier, a corresponding target count rule, a target count subject, and a target count option from the count database.
  • the counting rule may include one or more of the following:
  • the regulations on whether or not to log in the restrictions on the IP address, the upper limit on the user count, the limit on the frequency of the user count, the statute of the count, the rule on the count consumption, and the limit on the count area.
  • the specific rule corresponding to the counting rule identifier may be various combinations of the above rules.
  • Step S104 Generate a target count event according to the target count rule, the target count subject, and the target count option, where the target count event is used to count the target count option sent by the user for the target count subject according to a target count rule.
  • the counting event identifier input by the technician is “12345_45678_5050”, and the server can find out from the back-end database that the corresponding voting rule is “votable after login” according to “12345”, and can be found from the background database according to “45678”.
  • the voting theme is "Which favorite show you like this week", according to "5050", you can find the voting option from the background as "(1) Tomb Notes (2) Pretender (3) ⁇ list", so there is After these three items, you can automatically create a count event, that is, create a voting event for "Which favorite show you like this week.” After the user sees the vote on the web page, the voting option can be selected on the web page, thereby completing the action of the target counting option sent to the server.
  • the acquiring, according to the target count event identifier, obtaining a corresponding target count rule, a target count subject, and a target from the count database Counting options can include:
  • Step S201 Parse the target count rule identifier, the target count subject identifier, and the target count option identifier according to a preset rule.
  • Step S202 Acquire a corresponding counting rule, a counting subject, and a counting option from the counting database according to the result of the parsing.
  • the logo is often a combination of symbols or symbols. It is more abstract and more concise. What does a logo mean? It usually needs to be resolved according to the preset rules.
  • the specific content of how to design each identifier and the preset rule is not limited in this embodiment, and those skilled in the art can design according to different situations.
  • the count event input by the developer is identified as "acef_452508_ZCL", where a stands for “requires login”, c stands for “can only vote once”, e stands for “does not consume points”, and f stands for “limit for IP”. Then “acef” is parsed out as a combination voting rule that requires “login, can only vote once, does not consume points, and limits IP”; “Z” stands for “like” and “C” stands for "step”, “L” “On behalf of "passing by”, then "ZCL” parsing is the vote has "like” "step” "pass” three options.
  • the method may further include:
  • Step S301 outputting a counting result of the counting event.
  • the back-end database can use redis, use its ordered collection to store the voting result data, and calculate the voting rank of the option in real time. If it belongs to a registered vote (requires user login, and limits the number of single-user voting, such as each user can only vote 1 time), you can use the ordered collection to store user voting behavior data, and calculate user rankings in real time.
  • FIG. 4 is a flowchart of a method of creating count information, according to an exemplary embodiment.
  • step S401 voting rules and voting options are set in advance.
  • the technician can pre-set a variety of voting rules such as "login, IP restriction, number of votes, frequency, cap, time limit, points, regional restrictions".
  • step S402 a voting theme ID, a voting rule ID, and a voting option ID are created.
  • each ID can be randomly generated or arbitrarily designated by a technician, as long as the only one does not conflict.
  • the voting subject ID may be "45678”
  • the voting rule ID may be "12345”
  • the voting option ID may be "5050”.
  • Step S403 binding the voting rule ID and the voting option ID to some preset voting rules and voting options, and associating the voting subject ID with a certain content, and combining to generate a voting event ID.
  • the three IDs are combined to obtain the voting event ID "12345_45678_5050", that is, the event identifier is counted.
  • Step S404 the voting event ID is input into the system, and the system parses the voting event ID to create a voting event.
  • Step S405 receiving a vote of each user.
  • the system can be based on the redis database, as well as the PHP (Hypertext Preprocessor) operating environment.
  • the installation and deployment have open source solutions. After the deployment is complete, the code package is deployed to the web folder for simple configuration. use.
  • asynchronous queue mode can be adopted, and the voting operation of 1 million/second can be handled asynchronously, and the message queue in the background can ensure the final consistency of the data.
  • step S406 the voting result and the ranking are output in real time or periodically.
  • voting system After the voting system is put into use, up to now, all voting requirements of operators and product personnel do not require additional development by the server; more than 10 operational voting requirements for different rule combinations have been achieved. And the voting system can be used to achieve user likes, video (album) praise stepping, number of play records, score records, graphic live likes, etc., without the need for the server to do any development work.
  • the embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium can store a program, and the implementation of the method for generating a counting event provided by the embodiment shown in FIG. 1 to FIG. Some or all of the steps in the way.
  • FIG. 5 is a schematic diagram of an apparatus for generating a counting event, according to an exemplary embodiment.
  • the device can be used, for example, for a server.
  • the apparatus can include:
  • the data storage unit 501 is configured to store preset counting rules, counting options, and counting topics in a counting database, where the counting rules correspond to a counting rule identifier, and the counting option corresponds to a counting option identifier, and the counting theme is The counting topic identifier corresponds to, wherein the counting subject is associated with the subscription content.
  • the count event identifier obtaining unit 502 is configured to acquire a target count event identifier, where the target count event identifier includes a target count rule identifier, a target count subject identifier, and a target count option identifier.
  • the count event identifier (also referred to as the count event ID) can be entered by the technician.
  • a vote is essentially a count of an identifier (or a data volume, an ID), and the content data of the vote itself (such as title, description, option content, etc.) is maintained by the caller, in the present invention only Maintain the voting event ID and the number of votes.
  • the voting event ID may be designed as a structure of A_B_C:
  • A is a rule ID (ie, a counting rule identifier), the ID may represent multiple rules;
  • B is a topic ID (ie, a counting subject identifier), or may be abstracted as The album ID, video ID, etc. can be freely set according to the specific voting requirements;
  • C is the option ID (ie, the counting option identifier), for example, who can be voted for, or can be abstracted as praise, step, and the like.
  • the specific form of the ID/identity is not limited in this embodiment, and may be, for example, a letter and a number, as long as the counting rule/counting subject/counting option represented by the identifier can be correspondingly found according to the identifier.
  • the count can be one of the following:
  • the count is a vote
  • the count subject is a voting subject
  • the counting option is a voting option
  • the counting subject is a favorite object
  • the counting option includes at least one or two of praise, step
  • the counting subject is a play object, and the counting option is playing once;
  • the count is a score
  • the count subject is a scoring object
  • the count options include different scores.
  • the counting event definition unit 503 is configured to acquire a corresponding target counting rule, a target counting subject, and a target counting option from the counting database according to the target counting event identifier.
  • the counting rule may include one or more of the following:
  • the regulations on whether or not to log in the restrictions on the IP address, the upper limit on the user count, the limit on the frequency of the user count, the statute of the count, the rule on the count consumption, and the limit on the count area.
  • the specific rule corresponding to the counting rule identifier may be a combination of the above rules.
  • the count event creation unit 504 is configured to generate a target count event according to the target count rule, the target count subject, and the target count option, where the target count event is used according to a target count option sent by the user for the target count subject. Counting rules are counted.
  • the counting event identifier input by the technician is “12345_45678_5050”, and the server can find out from the back-end database that the corresponding voting rule is “votable after login” according to “12345”, and can be found from the background database according to “45678”.
  • the voting theme is "Which favorite show you like this week", according to "5050", you can find the voting option from the background as "(1) Tomb Notes (2) Pretender (3) ⁇ list", so there is After these three items, you can automatically create a count event, that is, create a voting event for "Which favorite show you like this week.” After the user sees the vote on the web page, the voting option can be selected on the web page, thereby completing the action of the target counting option sent to the server.
  • the counting event definition unit 503 may include:
  • the parsing subunit 5031 is configured to parse the target count rule identifier, the target count subject identifier, and the target count option identifier according to a preset rule;
  • the database reading subunit 5032 is configured to obtain a corresponding counting rule, a counting subject, and a counting option from the counting database according to the result of the parsing.
  • the count event input by the developer is identified as "acef_452508_ZCL", where a represents “needs To log in, c means “can only vote once”, e means “do not consume points”, f stands for “restriction on IP”, then “acef” resolves is “requires login, can only vote once, does not consume points "Combined voting rules for IP restrictions”; “Z” stands for “Like”, “C” stands for “Tread”, and “L” stands for "PASS”. Then "ZCL” resolves that the vote has "Like” "Tread” "pass by” three options.
  • the apparatus may further include:
  • the result output unit 505 is configured to output a counting result of the counting event.
  • the back-end database can use redis, use its ordered collection to store the voting result data, and calculate the voting rank of the option in real time. If it belongs to a registered vote (requires user login, and limits the number of single-user voting, such as each user can only vote 1 time), you can use the ordered collection to store user voting behavior data, and calculate user rankings in real time.
  • an embodiment of the present invention further provides a server, where the server includes: the device for generating a counting event according to any one of the foregoing device embodiments.

Abstract

Provided in the present invention are a method and a device for generating a counting event. The method comprises: storing, in a counting database, preset counting rules, counting options and counting topics; acquiring a target counting event identifier, including a target counting rule identifier, a target counting topic identifier and a target counting option identifier; acquiring, from the counting database, and on the basis of the target counting event identifier, a corresponding target counting rule, target counting topic and target counting option; and generating a target counting event. Voting is, in essence, the counting of IDs; in this regard, the present invention abstracts out the logic relating to IDs and counting, separating the logic from the content, and separately maintains content-related parts (such as the topic and options of a vote). In this way, when voting is initiated, there is no need to develop corresponding code for each voting instance. The invention is highly adaptable, and is suitable for both ordinary voting and disguised voting such as ratings, play count statistics and the like.

Description

一种生成计数事件的方法及装置Method and device for generating counting event
本申请要求于2016年3月14日提交中国专利局、申请号为201610144976.5、发明名称为“一种生成计数事件的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201610144976.5, entitled "A Method and Apparatus for Generating Counting Events", filed on March 14, 2016, the entire contents of which is incorporated herein by reference. In the application.
技术领域Technical field
本发明实施例涉及网络通信技术领域,尤其涉及一种生成计数事件的方法及装置。The embodiments of the present invention relate to the field of network communication technologies, and in particular, to a method and an apparatus for generating a counting event.
背景技术Background technique
随着互联网技术的飞速发展,在网站上或APP(Application,应用软件)中,越来越多的内容都需要用户参与,尤其是希望用户表达自己的看法和意见。不过让用户发表留言或评论的方式较为繁琐,通常更简单的方式是提供简单的交互选项供用户选择,如针对某主题设置投票页面让用户投票,或者在新闻、视频等页面上设置“赞”“踩”及评分等按钮,这样用户只需点击鼠标或点击屏幕即可完成意见的表达。另外在播放视频界面中,也通常会有对该视频被点播次数的统计,这也相当于一种变相的投票。With the rapid development of Internet technology, more and more content needs users to participate in websites or applications (applications), especially users are expected to express their opinions and opinions. However, it is more cumbersome to let users post comments or comments. Usually, the simpler way is to provide simple interactive options for users to choose, such as setting a voting page for a topic to let users vote, or setting "likes" on news, video, etc. Buttons such as "step" and rating, so that users can complete the expression by clicking the mouse or tapping the screen. In addition, in the playback video interface, there is usually a count of the number of times the video is clicked, which is equivalent to a disguised voting.
在现有技术中,当需要创建一个投票时,往往都必须开发相应的代码,且这些代码与系统(如网站或APP)代码耦合性较强,换句话说,投票代码与系统代码结合的较为紧密,完成后再想修改也较为困难,同时,因为投票的场景有很多,除了常规的投票之外,还有上文所提过的点赞、打分、播放次数统计等多种形式的变相的投票,导致开发繁琐,效率不高。In the prior art, when a vote needs to be created, it is often necessary to develop corresponding code, and the code is more coupled with the system (such as a website or APP) code. In other words, the voting code is combined with the system code. Close, it is more difficult to modify it after completion. At the same time, because there are many voting scenes, in addition to the regular voting, there are various forms of disguise, such as praise, scoring, and statistics of the number of plays mentioned above. Voting leads to cumbersome development and inefficiency.
发明内容Summary of the invention
为克服现有技术中存在的问题,本发明提供一种生成计数事件的方法及装置,以解决投票等功能在开发时效率较低的技术问题。In order to overcome the problems existing in the prior art, the present invention provides a method and apparatus for generating a counting event to solve the technical problem that the voting and other functions are less efficient in development.
根据本发明实施例的第一方面,提供一种生成计数事件的方法,所述方法包括: According to a first aspect of the embodiments of the present invention, a method of generating a counting event is provided, the method comprising:
将预设的计数规则、计数选项和计数主题存储在计数数据库中,所述计数规则与计数规则标识对应,所述计数选项与计数选项标识对应,所述计数主题与计数主题标识对应,其中,所述计数主题与预订内容关联;Storing a preset counting rule, a counting option, and a counting subject in a counting database, the counting rule corresponding to the counting rule identifier, the counting option corresponding to the counting option identifier, wherein the counting subject corresponds to the counting subject identifier, wherein The counting subject is associated with the subscription content;
获取目标计数事件标识,所述目标计数事件标识包括目标计数规则标识、目标计数主题标识以及目标计数选项标识;Obtaining a target count event identifier, where the target count event identifier includes a target count rule identifier, a target count subject identifier, and a target count option identifier;
根据所述目标计数事件标识,从所述计数数据库中获取对应的目标计数规则、目标计数主题及目标计数选项;Obtaining, according to the target count event identifier, a corresponding target count rule, a target count subject, and a target count option from the count database;
根据所述目标计数规则、目标计数主题及目标计数选项,生成目标计数事件,所述目标计数事件用于对用户针对所述目标计数主题发送的目标计数选项按照目标计数规则进行计数。A target count event is generated according to the target count rule, the target count subject, and the target count option, and the target count event is used to count the target count option sent by the user for the target count subject according to the target count rule.
根据本发明实施例的第二方面,提供一种生成计数事件的装置,所述装置包括:According to a second aspect of the embodiments of the present invention, there is provided an apparatus for generating a counting event, the apparatus comprising:
数据存储单元,用于将预设的计数规则、计数选项和计数主题存储在计数数据库中,所述计数规则与计数规则标识对应,所述计数选项与计数选项标识对应,所述计数主题与计数主题标识对应,其中,所述计数主题与预订内容关联;a data storage unit, configured to store preset counting rules, counting options, and counting topics in a counting database, where the counting rules correspond to a counting rule identifier, the counting option corresponding to a counting option identifier, the counting subject and counting The subject identifier corresponds to, wherein the counting subject is associated with the subscription content;
计数事件标识获取单元,用于获取目标计数事件标识,所述目标计数事件标识包括目标计数规则标识、目标计数主题标识以及目标计数选项标识;a count event identifier obtaining unit, configured to acquire a target count event identifier, where the target count event identifier includes a target count rule identifier, a target count subject identifier, and a target count option identifier;
计数事件定义单元,用于根据所述目标计数事件标识,从所述计数数据库中获取对应的目标计数规则、目标计数主题及目标计数选项;a counting event definition unit, configured to acquire, according to the target counting event identifier, a corresponding target counting rule, a target counting subject, and a target counting option from the counting database;
计数事件创建单元,用于根据所述目标计数规则、目标计数主题及目标计数选项,生成目标计数事件,所述目标计数事件用于对用户针对所述目标计数主题发送的目标计数选项按照目标计数规则进行计数。a count event creation unit, configured to generate a target count event according to the target count rule, the target count subject, and the target count option, wherein the target count event is used to count the target count option sent by the user for the target count subject according to a target The rules are counted.
根据本发明实施例的第三方面,提供一种服务器;所述服务器包括:以上本发明实施例的第二方面所述的生成计数事件的装置。According to a third aspect of the embodiments of the present invention, a server is provided; the server includes: the apparatus for generating a counting event according to the second aspect of the embodiment of the present invention.
本发明的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
发明人在实现本发明的过程中发现,投票等本质上就是对一个量或者说是对一个 ID的计数,因此本发明将这个ID以及计数这一套逻辑单独抽象出来,实现“逻辑”与“内容”的剥离,与内容相关的部分(如投票的标题、选项等)另行维护即可,而在本发明中开发人员只需要依照预设规则等生成三种标识,然后将三种标识组合起来得到计数事件标识,输入给系统即可,通过解析该计数事件标识,系统可自动读取投票主题、投票规则等,从而自动创建计数事件。这样当需要发起一个投票时,无需每次都开发相应的代码,提高了开发人员的工作效率;同时本发明这种逻辑与内容剥离的设计适应性强,不但适用于常规的投票,也适用于打分、播放次数统计等变相的投票(因为本质上都是对一个ID的计数),使得开发人员可以方便灵活的创建各种投票。The inventor found in the process of implementing the invention that voting, etc. is essentially a quantity or a pair The counting of the ID, so the present invention separates this set of ID and counting logic separately, realizes the stripping of "logic" and "content", and the content-related parts (such as voting title, options, etc.) can be separately maintained. In the present invention, the developer only needs to generate three types of identifiers according to preset rules, and then combines the three types of identifiers to obtain a count event identifier, which can be input to the system. By parsing the count event identifier, the system can automatically read the vote. Topics, voting rules, etc., to automatically create count events. In this way, when a vote needs to be initiated, it is not necessary to develop corresponding code every time, which improves the working efficiency of the developer; at the same time, the logic and content stripping design of the present invention is highly adaptable, and is applicable not only to regular voting but also to Disguised voting, such as scoring, play count statistics, etc. (because it is essentially a count of an ID), allows developers to easily and flexibly create a variety of votes.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本发明。The above general description and the following detailed description are intended to be illustrative and not restrictive.
附图说明DRAWINGS
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in the specification of FIG
图1是本发明根据一示例性实施例示出的一种生成计数事件的方法的流程图;FIG. 1 is a flowchart of a method for generating a counting event according to an exemplary embodiment of the present invention;
图2是本发明根据一示例性实施例示出的一种生成计数事件的方法的流程图;FIG. 2 is a flowchart of a method for generating a counting event according to an exemplary embodiment of the present invention; FIG.
图3是本发明根据一示例性实施例示出的一种生成计数事件的方法的流程图;FIG. 3 is a flowchart of a method for generating a counting event according to an exemplary embodiment of the present invention; FIG.
图4是本发明根据一示例性实施例示出的一种生成计数事件的方法的流程图;FIG. 4 is a flowchart of a method for generating a counting event according to an exemplary embodiment of the present invention; FIG.
图5是本发明根据一示例性实施例示出的一种生成计数事件的装置的示意图;FIG. 5 is a schematic diagram of an apparatus for generating a counting event according to an exemplary embodiment of the present invention; FIG.
图6是本发明根据一示例性实施例示出的一种生成计数事件的装置的示意图;FIG. 6 is a schematic diagram of an apparatus for generating a counting event according to an exemplary embodiment of the present invention; FIG.
图7是本发明根据一示例性实施例示出的一种生成计数事件的装置的示意图。FIG. 7 is a schematic diagram of an apparatus for generating a counting event according to an exemplary embodiment of the present invention.
具体实施方式detailed description
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。 Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. The following description refers to the same or similar elements in the different figures unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with aspects of the invention as detailed in the appended claims.
图1是根据一示例性实施例示出的一种生成计数事件的方法的流程图。该方法例如可以用于服务器等。FIG. 1 is a flow chart showing a method of generating a counting event, according to an exemplary embodiment. This method can be used, for example, for a server or the like.
参见图1所示,该方法可以包括:Referring to Figure 1, the method can include:
步骤S101,将预设的计数规则、计数选项和计数主题存储在计数数据库中,所述计数规则与计数规则标识对应,所述计数选项与计数选项标识对应,所述计数主题与计数主题标识对应,其中,所述计数主题与预订内容关联。Step S101: The preset counting rule, the counting option, and the counting subject are stored in a counting database, where the counting rule corresponds to the counting rule identifier, the counting option corresponds to the counting option identifier, and the counting subject corresponds to the counting topic identifier. Wherein the counting subject is associated with the subscription content.
例如计数主题可以是对一个问题的投票,为了方便使用,该计数主题会对应一个标识,或者说是会为该计数主题赋予一个标识,该标识具体可以是ID(Identification,身份标识码)、编号等。而该投票问题的内容则可以另行存储,并使该内容与该计数主题建立关联。For example, the counting subject may be a vote for a question. For convenience of use, the counting subject may correspond to an identifier, or an identifier may be assigned to the counting subject, and the identifier may be an ID (Identification, ID), and a number. Wait. The content of the voting question can be stored separately and the content is associated with the counting topic.
步骤S102,获取目标计数事件标识,所述目标计数事件标识包括目标计数规则标识、目标计数主题标识以及目标计数选项标识。Step S102: Acquire a target count event identifier, where the target count event identifier includes a target count rule identifier, a target count subject identifier, and a target count option identifier.
例如计数事件标识(也可称为计数事件ID)可以由技术人员负责输入。For example, the count event identifier (also referred to as the count event ID) can be entered by the technician.
作为示例,所述计数可以为以下其中一种:As an example, the count can be one of the following:
投票,点赞,播放次数,评分。Vote, like, play, score.
当所述计数为投票时,所述计数主题为投票主题,所述计数选项为投票选项;When the count is a vote, the count subject is a voting subject, and the counting option is a voting option;
当所述计数为点赞时,所述计数主题为点赞对象,所述计数选项至少包括赞、踩中的一种或两种;When the count is a like, the counting subject is a favorite object, and the counting option includes at least one or two of praise, step, and
当所述计数为播放次数时,所述计数主题为播放对象,所述计数选项为播放一次;When the count is the number of times of play, the counting subject is a play object, and the counting option is playing once;
当所述计数为评分时,所述计数主题为评分对象,所述计数选项包括不同的分数。When the count is a score, the count subject is a scoring object, and the count options include different scores.
以投票为例,本发明可使投票内容和投票计数功能完全独立,实现解耦。一个投票本质上即为对一个标识(或者说是一个数据量、一个ID)的计数,而投票本身的内容数据(如标题、描述、选项内容等)由调用方维护,在本发明中只需维护投票事 件ID与票数关系即可。Taking voting as an example, the present invention can completely decouple the voting content and the voting counting function. A vote is essentially a count of an identifier (or a data volume, an ID), and the content data of the vote itself (such as title, description, option content, etc.) is maintained by the caller, in the present invention only Maintenance vote The piece ID can be related to the number of votes.
在具体实施时,可以将投票事件ID设计为A_B_C的结构:A为规则ID(即计数规则标识),该ID可以代表多种规则;B为题目ID(即计数主题标识),也可以抽象为专辑ID、视频ID等,可以根据具体投票需求做自由设定;C为选项ID(即计数选项标识),例如可以为投给谁,也可以抽象为赞、踩等。对于ID/标识的具体形式本实施例并不进行限制,例如可以是字母及数字,只要是根据标识可以对应查到该标识所代表的计数规则/计数主题/计数选项即可。In a specific implementation, the voting event ID may be designed as a structure of A_B_C: A is a rule ID (ie, a counting rule identifier), the ID may represent multiple rules; B is a topic ID (ie, a counting subject identifier), or may be abstracted as The album ID, video ID, etc. can be freely set according to the specific voting requirements; C is the option ID (ie, the counting option identifier), for example, who can be voted for, or can be abstracted as praise, step, and the like. The specific form of the ID/identity is not limited in this embodiment, and may be, for example, a letter and a number, as long as the counting rule/counting subject/counting option represented by the identifier can be correspondingly found according to the identifier.
步骤S103,根据所述目标计数事件标识,从所述计数数据库中获取对应的目标计数规则、目标计数主题及目标计数选项。Step S103: Acquire, according to the target count event identifier, a corresponding target count rule, a target count subject, and a target count option from the count database.
例如,所述计数规则可以包括以下一种或多种:For example, the counting rule may include one or more of the following:
对是否需要登录的规定,对IP地址的限制,对用户计数上限的规定,对用户计数频次的限制、对计数时效的规定、对计数消耗积分的规定、对计数地区的限制。The regulations on whether or not to log in, the restrictions on the IP address, the upper limit on the user count, the limit on the frequency of the user count, the statute of the count, the rule on the count consumption, and the limit on the count area.
换句话说,计数规则标识所对应的具体规则可以是上述这些规则的各种组合。In other words, the specific rule corresponding to the counting rule identifier may be various combinations of the above rules.
步骤S104,根据所述目标计数规则、目标计数主题及目标计数选项,生成目标计数事件,所述目标计数事件用于对用户针对所述目标计数主题发送的目标计数选项按照目标计数规则进行计数。Step S104: Generate a target count event according to the target count rule, the target count subject, and the target count option, where the target count event is used to count the target count option sent by the user for the target count subject according to a target count rule.
例如,技术人员输入的计数事件标识为“12345_45678_5050”,服务器根据其中的“12345”可以从后台数据库查到其对应的投票规则为“登录后可投票”,根据“45678”可以从后台数据库查到其投票主题是“本周你最喜欢哪部热播剧”,根据“5050”可以从后台查到其投票选项为“(1)盗墓笔记(2)伪装者(3)琅琊榜”,这样有了这三项后便可以自动创建一个计数事件了,也即创建一个针对“本周你最喜欢哪部热播剧”的投票事件。用户从网页上看到该投票后,可以在网页上对投票选项进行选择,从而完成了向服务器发送的目标计数选项的动作。For example, the counting event identifier input by the technician is “12345_45678_5050”, and the server can find out from the back-end database that the corresponding voting rule is “votable after login” according to “12345”, and can be found from the background database according to “45678”. The voting theme is "Which favorite show you like this week", according to "5050", you can find the voting option from the background as "(1) Tomb Notes (2) Pretender (3) 琅琊 list", so there is After these three items, you can automatically create a count event, that is, create a voting event for "Which favorite show you like this week." After the user sees the vote on the web page, the voting option can be selected on the web page, thereby completing the action of the target counting option sent to the server.
参见图2所示,在本实施例或本发明其他某些实施例中,所述所述根据所述目标计数事件标识,从所述计数数据库中获取对应的目标计数规则、目标计数主题及目标计数选项,可以包括: Referring to FIG. 2, in this embodiment or some other embodiments of the present invention, the acquiring, according to the target count event identifier, obtaining a corresponding target count rule, a target count subject, and a target from the count database Counting options can include:
步骤S201,根据预设规则解析所述目标计数规则标识、所述目标计数主题标识、所述目标计数选项标识。Step S201: Parse the target count rule identifier, the target count subject identifier, and the target count option identifier according to a preset rule.
步骤S202,根据所述解析的结果从所述计数数据库中获取对应的计数规则、计数主题及计数选项。Step S202: Acquire a corresponding counting rule, a counting subject, and a counting option from the counting database according to the result of the parsing.
标识往往是某种符号或符号的组合,比较抽象也比较简练,一个标识代表什么意思,通常需要根据预设规则进行解析后才知晓。对于如何设计各标识以及预设规则的具体内容本实施例并不进行限制,本领域技术人员可以根据不同情况自行进行设计。The logo is often a combination of symbols or symbols. It is more abstract and more concise. What does a logo mean? It usually needs to be resolved according to the preset rules. The specific content of how to design each identifier and the preset rule is not limited in this embodiment, and those skilled in the art can design according to different situations.
举例来讲,开发人员输入的计数事件标识为“acef_452508_ZCL”,其中a代表“需要登录”,c代表“只能投票一次”,e代表“不消耗积分”,f代表“对IP进行限制”,那么“acef”解析出来便是“需要登录,只能投票一次,不消耗积分,且对IP进行限制”的组合投票规则;“Z”代表“赞”,“C”代表“踩”,“L”代表“路过”,那么“ZCL”解析出来便是该投票有“赞”“踩”“路过”三个选项。For example, the count event input by the developer is identified as "acef_452508_ZCL", where a stands for "requires login", c stands for "can only vote once", e stands for "does not consume points", and f stands for "limit for IP". Then "acef" is parsed out as a combination voting rule that requires "login, can only vote once, does not consume points, and limits IP"; "Z" stands for "like" and "C" stands for "step", "L" "On behalf of "passing by", then "ZCL" parsing is the vote has "like" "step" "pass" three options.
此外参见图3所示,在本实施例或本发明其他某些实施例中,所述方法还可以包括:In addition, as shown in FIG. 3, in this embodiment or some other embodiments of the present invention, the method may further include:
步骤S301,输出所述计数事件的计数结果。Step S301, outputting a counting result of the counting event.
例如,后台数据库可以采用redis,使用其有序集合来存储投票结果数据,实时计算出选项的投票排行,如果属于记名投票(需要用户登录,并限制单用户投票次数,如每个用户只能投1次),可以使用有序集合储存用户投票行为数据,实时计算出用户排行等。For example, the back-end database can use redis, use its ordered collection to store the voting result data, and calculate the voting rank of the option in real time. If it belongs to a registered vote (requires user login, and limits the number of single-user voting, such as each user can only vote 1 time), you can use the ordered collection to store user voting behavior data, and calculate user rankings in real time.
下面结合具体场景对本发明方案作进一步描述。The solution of the present invention is further described below in conjunction with specific scenarios.
图4是根据一示例性实施例示出的一种创建计数信息的方法的流程图。FIG. 4 is a flowchart of a method of creating count information, according to an exemplary embodiment.
步骤S401,预先设置投票规则、投票选项。In step S401, voting rules and voting options are set in advance.
例如技术人员可以预先设置“登陆、IP限制、投票次数、频次、上限、时效、积分、地区限制”等多种投票规则。For example, the technician can pre-set a variety of voting rules such as "login, IP restriction, number of votes, frequency, cap, time limit, points, regional restrictions".
步骤S402,创建投票主题ID、投票规则ID、投票选项ID。 In step S402, a voting theme ID, a voting rule ID, and a voting option ID are created.
例如各ID可随机生成,或由技术人员任意指定,只要唯一不冲突即可。如投票主题ID可以为“45678”,投票规则ID可以为“12345”,投票选项ID可以为“5050”。For example, each ID can be randomly generated or arbitrarily designated by a technician, as long as the only one does not conflict. For example, the voting subject ID may be "45678", the voting rule ID may be "12345", and the voting option ID may be "5050".
步骤S403,将投票规则ID、投票选项ID分别与一些预设的投票规则、投票选项相绑定,并令投票主题ID与某内容相关联,组合后生成一个投票事件ID。Step S403, binding the voting rule ID and the voting option ID to some preset voting rules and voting options, and associating the voting subject ID with a certain content, and combining to generate a voting event ID.
例如三个ID组合起来得到投票事件ID“12345_45678_5050”,也即计数事件标识。For example, the three IDs are combined to obtain the voting event ID "12345_45678_5050", that is, the event identifier is counted.
步骤S404,将投票事件ID输入系统,系统对该投票事件ID进行解析,从而创建一个投票事件。Step S404, the voting event ID is input into the system, and the system parses the voting event ID to create a voting event.
步骤S405,接收各用户的投票。Step S405, receiving a vote of each user.
该系统可以基于redis数据库,以及PHP(PHP:Hypertext Preprocessor,超文本预处理器)运行环境,安装部署均有开源方案,依赖部署完成后将代码包部署到web文件夹,进行简单配置即可生效使用。The system can be based on the redis database, as well as the PHP (Hypertext Preprocessor) operating environment. The installation and deployment have open source solutions. After the deployment is complete, the code package is deployed to the web folder for simple configuration. use.
另外为了应对大流量冲击,可以采用异步队列方式,能异步处理100万/秒的投票操作,后台处理消息队列保证数据最终一致性。In addition, in order to cope with the impact of large traffic, asynchronous queue mode can be adopted, and the voting operation of 1 million/second can be handled asynchronously, and the message queue in the background can ensure the final consistency of the data.
步骤S406,实时或定期输出投票结果与排行。In step S406, the voting result and the ranking are output in real time or periodically.
例如可以调用rank接口查看投票排行,调用num接口查看结果。For example, you can call the rank interface to view the voting rankings, and call the num interface to view the results.
投票系统投入使用后,截止到目前,运营人员、产品人员的所有投票需求均不需要服务器端进行额外开发;实现了超过10次不同规则组合的运营投票需求。并可以将投票系统用于实现用户点赞、视频(专辑)的赞踩、播放数记录、评分数记录、图文直播点赞等等需求,而不需要服务端做任何开发工作。After the voting system is put into use, up to now, all voting requirements of operators and product personnel do not require additional development by the server; more than 10 operational voting requirements for different rule combinations have been achieved. And the voting system can be used to achieve user likes, video (album) praise stepping, number of play records, score records, graphic live likes, etc., without the need for the server to do any development work.
另外,本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时可实现图1至图4所示实施例提供的生成计数事件的方法的各实现方式中的部分或全部步骤。In addition, the embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium can store a program, and the implementation of the method for generating a counting event provided by the embodiment shown in FIG. 1 to FIG. Some or all of the steps in the way.
下述为本发明装置实施例,可以用于执行本发明方法实施例。对于本发明装置实 施例中未披露的细节,请参照本发明方法实施例。The following is an embodiment of the apparatus of the present invention, which can be used to carry out the method embodiments of the present invention. For the device of the present invention For details not disclosed in the examples, please refer to the method embodiment of the present invention.
图5是根据一示例性实施例示出的一种生成计数事件的装置的示意图。该装置例如可以用于服务器。FIG. 5 is a schematic diagram of an apparatus for generating a counting event, according to an exemplary embodiment. The device can be used, for example, for a server.
参见图5所示,该装置可以包括:Referring to Figure 5, the apparatus can include:
数据存储单元501,用于将预设的计数规则、计数选项和计数主题存储在计数数据库中,所述计数规则与计数规则标识对应,所述计数选项与计数选项标识对应,所述计数主题与计数主题标识对应,其中,所述计数主题与预订内容关联。The data storage unit 501 is configured to store preset counting rules, counting options, and counting topics in a counting database, where the counting rules correspond to a counting rule identifier, and the counting option corresponds to a counting option identifier, and the counting theme is The counting topic identifier corresponds to, wherein the counting subject is associated with the subscription content.
计数事件标识获取单元502,用于获取目标计数事件标识,所述目标计数事件标识包括目标计数规则标识、目标计数主题标识以及目标计数选项标识。The count event identifier obtaining unit 502 is configured to acquire a target count event identifier, where the target count event identifier includes a target count rule identifier, a target count subject identifier, and a target count option identifier.
例如计数事件标识(也可称为计数事件ID)可以由技术人员负责输入。For example, the count event identifier (also referred to as the count event ID) can be entered by the technician.
以投票为例,本发明可使投票内容和投票计数功能完全独立,实现解耦。一个投票本质上即为对一个标识(或者说是一个数据量、一个ID)的计数,而投票本身的内容数据(如标题、描述、选项内容等)由调用方维护,在本发明中只需维护投票事件ID与票数关系即可。Taking voting as an example, the present invention can completely decouple the voting content and the voting counting function. A vote is essentially a count of an identifier (or a data volume, an ID), and the content data of the vote itself (such as title, description, option content, etc.) is maintained by the caller, in the present invention only Maintain the voting event ID and the number of votes.
在具体实施时,可以将投票事件ID设计为A_B_C的结构:A为规则ID(即计数规则标识),该ID可以代表多种规则;B为题目ID(即计数主题标识),也可以抽象为专辑ID、视频ID等,可以根据具体投票需求做自由设定;C为选项ID(即计数选项标识),例如可以为投给谁,也可以抽象为赞、踩等。对于ID/标识的具体形式本实施例并不进行限制,例如可以是字母及数字,只要是根据标识可以对应查到该标识所代表的计数规则/计数主题/计数选项即可。In a specific implementation, the voting event ID may be designed as a structure of A_B_C: A is a rule ID (ie, a counting rule identifier), the ID may represent multiple rules; B is a topic ID (ie, a counting subject identifier), or may be abstracted as The album ID, video ID, etc. can be freely set according to the specific voting requirements; C is the option ID (ie, the counting option identifier), for example, who can be voted for, or can be abstracted as praise, step, and the like. The specific form of the ID/identity is not limited in this embodiment, and may be, for example, a letter and a number, as long as the counting rule/counting subject/counting option represented by the identifier can be correspondingly found according to the identifier.
作为示例,所述计数可以为以下其中一种:As an example, the count can be one of the following:
投票,点赞,播放次数,评分;Vote, like, play, score;
当所述计数为投票时,所述计数主题为投票主题,所述计数选项为投票选项;When the count is a vote, the count subject is a voting subject, and the counting option is a voting option;
当所述计数为点赞时,所述计数主题为点赞对象,所述计数选项至少包括赞、踩中的一种或两种; When the count is a like, the counting subject is a favorite object, and the counting option includes at least one or two of praise, step, and
当所述计数为播放次数时,所述计数主题为播放对象,所述计数选项为播放一次;When the count is the number of times of play, the counting subject is a play object, and the counting option is playing once;
当所述计数为评分时,所述计数主题为评分对象,所述计数选项包括不同的分数。When the count is a score, the count subject is a scoring object, and the count options include different scores.
计数事件定义单元503,用于根据所述目标计数事件标识,从所述计数数据库中获取对应的目标计数规则、目标计数主题及目标计数选项。The counting event definition unit 503 is configured to acquire a corresponding target counting rule, a target counting subject, and a target counting option from the counting database according to the target counting event identifier.
例如,所述计数规则可以包括以下一种或多种:For example, the counting rule may include one or more of the following:
对是否需要登录的规定,对IP地址的限制,对用户计数上限的规定,对用户计数频次的限制、对计数时效的规定、对计数消耗积分的规定、对计数地区的限制。The regulations on whether or not to log in, the restrictions on the IP address, the upper limit on the user count, the limit on the frequency of the user count, the statute of the count, the rule on the count consumption, and the limit on the count area.
换句话说,计数规则标识所对应的具体规则可以是上述这些规则的组合。In other words, the specific rule corresponding to the counting rule identifier may be a combination of the above rules.
计数事件创建单元504,用于根据所述目标计数规则、目标计数主题及目标计数选项,生成目标计数事件,所述目标计数事件用于对用户针对所述目标计数主题发送的目标计数选项按照目标计数规则进行计数。The count event creation unit 504 is configured to generate a target count event according to the target count rule, the target count subject, and the target count option, where the target count event is used according to a target count option sent by the user for the target count subject. Counting rules are counted.
例如,技术人员输入的计数事件标识为“12345_45678_5050”,服务器根据其中的“12345”可以从后台数据库查到其对应的投票规则为“登录后可投票”,根据“45678”可以从后台数据库查到其投票主题是“本周你最喜欢哪部热播剧”,根据“5050”可以从后台查到其投票选项为“(1)盗墓笔记(2)伪装者(3)琅琊榜”,这样有了这三项后便可以自动创建一个计数事件了,也即创建一个针对“本周你最喜欢哪部热播剧”的投票事件。用户从网页上看到该投票后,可以在网页上对投票选项进行选择,从而完成了向服务器发送的目标计数选项的动作。For example, the counting event identifier input by the technician is “12345_45678_5050”, and the server can find out from the back-end database that the corresponding voting rule is “votable after login” according to “12345”, and can be found from the background database according to “45678”. The voting theme is "Which favorite show you like this week", according to "5050", you can find the voting option from the background as "(1) Tomb Notes (2) Pretender (3) 琅琊 list", so there is After these three items, you can automatically create a count event, that is, create a voting event for "Which favorite show you like this week." After the user sees the vote on the web page, the voting option can be selected on the web page, thereby completing the action of the target counting option sent to the server.
参见图6所示,在本实施例或本发明其他某些实施例中,所述计数事件定义单元503可以包括:Referring to FIG. 6, in the embodiment or some other embodiments of the present invention, the counting event definition unit 503 may include:
解析子单元5031,用于根据预设规则解析所述目标计数规则标识、所述目标计数主题标识、所述目标计数选项标识;The parsing subunit 5031 is configured to parse the target count rule identifier, the target count subject identifier, and the target count option identifier according to a preset rule;
数据库读取子单元5032,用于根据所述解析的结果从所述计数数据库中获取对应的计数规则、计数主题及计数选项。The database reading subunit 5032 is configured to obtain a corresponding counting rule, a counting subject, and a counting option from the counting database according to the result of the parsing.
举例来讲,开发人员输入的计数事件标识为“acef_452508_ZCL”,其中a代表“需 要登录”,c代表“只能投票一次”,e代表“不消耗积分”,f代表“对IP进行限制”,那么“acef”解析出来便是“需要登录,只能投票一次,不消耗积分,且对IP进行限制”的组合投票规则;“Z”代表“赞”,“C”代表“踩”,“L”代表“路过”。那么“ZCL”解析出来便是该投票有“赞”“踩”“路过”三个选项。For example, the count event input by the developer is identified as "acef_452508_ZCL", where a represents "needs To log in, c means "can only vote once", e means "do not consume points", f stands for "restriction on IP", then "acef" resolves is "requires login, can only vote once, does not consume points "Combined voting rules for IP restrictions"; "Z" stands for "Like", "C" stands for "Tread", and "L" stands for "PASS". Then "ZCL" resolves that the vote has "Like" "Tread" "pass by" three options.
此外参见图7所示,在本实施例或本发明其他某些实施例中,所述装置还可以包括:In addition, as shown in FIG. 7, in this embodiment or some other embodiments of the present invention, the apparatus may further include:
结果输出单元505,用于输出所述计数事件的计数结果。The result output unit 505 is configured to output a counting result of the counting event.
例如,后台数据库可以采用redis,使用其有序集合来存储投票结果数据,实时计算出选项的投票排行,如果属于记名投票(需要用户登录,并限制单用户投票次数,如每个用户只能投1次),可以使用有序集合储存用户投票行为数据,实时计算出用户排行等。For example, the back-end database can use redis, use its ordered collection to store the voting result data, and calculate the voting rank of the option in real time. If it belongs to a registered vote (requires user login, and limits the number of single-user voting, such as each user can only vote 1 time), you can use the ordered collection to store user voting behavior data, and calculate user rankings in real time.
关于上述实施例中的装置,其中各个单元执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。With regard to the apparatus in the above embodiments, the specific manner in which the operations are performed by the respective units has been described in detail in the embodiment relating to the method, and will not be explained in detail herein.
另外,本发明实施例还提供一种服务器;所述服务器包括:以上任一装置实施例所述的生成计数事件的装置。In addition, an embodiment of the present invention further provides a server, where the server includes: the device for generating a counting event according to any one of the foregoing device embodiments.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本发明未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由所附的权利要求指出。Other embodiments of the invention will be apparent to those skilled in the <RTIgt; The present application is intended to cover any variations, uses, or adaptations of the present invention, which are in accordance with the general principles of the present invention and include common general knowledge or conventional technical means in the art that are not disclosed in the present invention. . The specification and examples are to be considered as illustrative only,
应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。 It is to be understood that the invention is not limited to the details of the details of The scope of the invention is limited only by the appended claims.

Claims (11)

  1. 一种生成计数事件的方法,其特征在于,所述方法包括:A method of generating a counting event, the method comprising:
    将预设的计数规则、计数选项和计数主题存储在计数数据库中,所述计数规则与计数规则标识对应,所述计数选项与计数选项标识对应,所述计数主题与计数主题标识对应,其中,所述计数主题与预订内容关联;Storing a preset counting rule, a counting option, and a counting subject in a counting database, the counting rule corresponding to the counting rule identifier, the counting option corresponding to the counting option identifier, wherein the counting subject corresponds to the counting subject identifier, wherein The counting subject is associated with the subscription content;
    获取目标计数事件标识,所述目标计数事件标识包括目标计数规则标识、目标计数主题标识以及目标计数选项标识;Obtaining a target count event identifier, where the target count event identifier includes a target count rule identifier, a target count subject identifier, and a target count option identifier;
    根据所述目标计数事件标识,从所述计数数据库中获取对应的目标计数规则、目标计数主题及目标计数选项;Obtaining, according to the target count event identifier, a corresponding target count rule, a target count subject, and a target count option from the count database;
    根据所述目标计数规则、目标计数主题及目标计数选项,生成目标计数事件,所述目标计数事件用于对用户针对所述目标计数主题发送的目标计数选项按照目标计数规则进行计数。A target count event is generated according to the target count rule, the target count subject, and the target count option, and the target count event is used to count the target count option sent by the user for the target count subject according to the target count rule.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述目标计数事件标识,从所述计数数据库中获取对应的目标计数规则、目标计数主题及目标计数选项,包括:The method according to claim 1, wherein the obtaining, according to the target count event identifier, the corresponding target count rule, the target count subject, and the target count option from the count database, including:
    根据预设规则解析所述目标计数规则标识、所述目标计数主题标识、所述目标计数选项标识;Parsing the target count rule identifier, the target count subject identifier, and the target count option identifier according to a preset rule;
    根据所述解析的结果从所述计数数据库中获取对应的计数规则、计数主题及计数选项。Corresponding counting rules, counting topics, and counting options are obtained from the counting database according to the result of the parsing.
  3. 根据权利要求1所述的方法,其特征在于,The method of claim 1 wherein
    所述计数主题为投票主题,所述计数选项为投票选项;或者,The counting subject is a voting subject, and the counting option is a voting option; or,
    所述计数主题为点赞对象,所述计数选项至少包括赞、踩中的一种或两种;或者,The counting subject is a favorite object, and the counting option includes at least one or two of praise, stepping, or;
    所述计数主题为播放对象,所述计数选项为播放一次;或者,The counting subject is a play object, and the counting option is to play once; or,
    所述计数主题为评分对象,所述计数选项包括不同的分数。The counting subject is a scoring object, and the counting options include different scores.
  4. 根据权利要求1所述的方法,其特征在于,所述计数规则包括以下一种或多种: The method of claim 1 wherein said counting rules comprise one or more of the following:
    对是否需要登录的规定,对IP地址的限制,对用户计数上限的规定,对用户计数频次的限制、对计数时效的规定、对计数消耗积分的规定、对计数地区的限制。The regulations on whether or not to log in, the restrictions on the IP address, the upper limit on the user count, the limit on the frequency of the user count, the statute of the count, the rule on the count consumption, and the limit on the count area.
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising:
    输出所述计数事件的计数结果。The count result of the count event is output.
  6. 一种生成计数事件的装置,其特征在于,所述装置包括:A device for generating a counting event, the device comprising:
    数据存储单元,用于将预设的计数规则、计数选项和计数主题存储在计数数据库中,所述计数规则与计数规则标识对应,所述计数选项与计数选项标识对应,所述计数主题与计数主题标识对应,其中,所述计数主题与预订内容关联;a data storage unit, configured to store preset counting rules, counting options, and counting topics in a counting database, where the counting rules correspond to a counting rule identifier, the counting option corresponding to a counting option identifier, the counting subject and counting The subject identifier corresponds to, wherein the counting subject is associated with the subscription content;
    计数事件标识获取单元,用于获取目标计数事件标识,所述目标计数事件标识包括目标计数规则标识、目标计数主题标识以及目标计数选项标识;a count event identifier obtaining unit, configured to acquire a target count event identifier, where the target count event identifier includes a target count rule identifier, a target count subject identifier, and a target count option identifier;
    计数事件定义单元,用于根据所述目标计数事件标识,从所述计数数据库中获取对应的目标计数规则、目标计数主题及目标计数选项;a counting event definition unit, configured to acquire, according to the target counting event identifier, a corresponding target counting rule, a target counting subject, and a target counting option from the counting database;
    计数事件创建单元,用于根据所述目标计数规则、目标计数主题及目标计数选项,生成目标计数事件,所述目标计数事件用于对用户针对所述目标计数主题发送的目标计数选项按照目标计数规则进行计数。a count event creation unit, configured to generate a target count event according to the target count rule, the target count subject, and the target count option, wherein the target count event is used to count the target count option sent by the user for the target count subject according to a target The rules are counted.
  7. 根据权利要求6所述的装置,其特征在于,所述计数事件定义单元包括:The apparatus according to claim 6, wherein the counting event definition unit comprises:
    解析子单元,用于根据预设规则解析所述目标计数规则标识、所述目标计数主题标识、所述目标计数选项标识;a parsing subunit, configured to parse the target count rule identifier, the target count subject identifier, and the target count option identifier according to a preset rule;
    数据库读取子单元,用于根据所述解析的结果从所述计数数据库中获取对应的计数规则、计数主题及计数选项。The database reading subunit is configured to obtain a corresponding counting rule, a counting subject, and a counting option from the counting database according to the result of the parsing.
  8. 根据权利要求6所述的装置,其特征在于,The device of claim 6 wherein:
    所述计数主题为投票主题,所述计数选项为投票选项;或者,The counting subject is a voting subject, and the counting option is a voting option; or,
    所述计数主题为点赞对象,所述计数选项至少包括赞、踩中的一种或两种;或者, The counting subject is a favorite object, and the counting option includes at least one or two of praise, stepping, or;
    所述计数主题为播放对象,所述计数选项为播放一次;或者,The counting subject is a play object, and the counting option is to play once; or,
    当所述计数为评分时,所述计数主题为评分对象,所述计数选项包括不同的分数。When the count is a score, the count subject is a scoring object, and the count options include different scores.
  9. 根据权利要求6所述的装置,其特征在于,所述计数规则包括以下一种或多种:The apparatus according to claim 6, wherein said counting rule comprises one or more of the following:
    对是否需要登录的规定,对IP地址的限制,对用户计数上限的规定,对用户计数频次的限制、对计数时效的规定、对计数消耗积分的规定、对计数地区的限制。The regulations on whether or not to log in, the restrictions on the IP address, the upper limit on the user count, the limit on the frequency of the user count, the statute of the count, the rule on the count consumption, and the limit on the count area.
  10. 根据权利要求6所述的装置,其特征在于,所述装置还包括:The device according to claim 6, wherein the device further comprises:
    结果输出单元,用于输出所述计数事件的计数结果。a result output unit, configured to output a count result of the count event.
  11. 一种服务器,其特征在于,包括:如权利要求6至10任一项所述的生成计数事件的装置。 A server, comprising: means for generating a counting event according to any one of claims 6 to 10.
PCT/CN2016/088490 2016-03-14 2016-07-04 Method and device for generating counting event WO2017156927A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/242,241 US20170263068A1 (en) 2016-03-14 2016-08-19 Method for generating counting events and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610144976.5A CN105824903A (en) 2016-03-14 2016-03-14 Method and device for generating counting events
CN201610144976.5 2016-03-14

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/242,241 Continuation US20170263068A1 (en) 2016-03-14 2016-08-19 Method for generating counting events and electronic device

Publications (1)

Publication Number Publication Date
WO2017156927A1 true WO2017156927A1 (en) 2017-09-21

Family

ID=56987307

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/088490 WO2017156927A1 (en) 2016-03-14 2016-07-04 Method and device for generating counting event

Country Status (2)

Country Link
CN (1) CN105824903A (en)
WO (1) WO2017156927A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107038065A (en) * 2017-03-01 2017-08-11 武汉斗鱼网络科技有限公司 Information processing method and device
CN110995781B (en) * 2019-11-01 2022-01-11 腾讯科技(深圳)有限公司 Praise information processing method, device and system
CN112579861A (en) * 2020-12-11 2021-03-30 北京字节跳动网络技术有限公司 Counting method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104134268A (en) * 2014-07-18 2014-11-05 小米科技有限责任公司 Network ballot method and apparatus
US20150100392A1 (en) * 2013-10-09 2015-04-09 TopwHats Inc. Dynamic Ballots for Voting
CN104731585A (en) * 2015-03-05 2015-06-24 天脉聚源(北京)传媒科技有限公司 Display method and device of vote page
CN104899956A (en) * 2015-04-15 2015-09-09 腾讯科技(深圳)有限公司 Voting achieving method and voting achieving apparatus

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101860612A (en) * 2009-04-08 2010-10-13 北京闻言科技有限公司 Method for counting user on-demand times according to period
US8510154B2 (en) * 2011-01-27 2013-08-13 Leroy Robinson Method and system for searching for, and monitoring assessment of, original content creators and the original content thereof
CN103686821B (en) * 2012-08-27 2016-08-31 上海亿动信息技术有限公司 The control method carrying out application rs traffic statistics is uniquely identified according to mobile terminal
CN104125313B (en) * 2014-07-11 2017-12-08 广州华多网络科技有限公司 Network voting method and apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150100392A1 (en) * 2013-10-09 2015-04-09 TopwHats Inc. Dynamic Ballots for Voting
CN104134268A (en) * 2014-07-18 2014-11-05 小米科技有限责任公司 Network ballot method and apparatus
CN104731585A (en) * 2015-03-05 2015-06-24 天脉聚源(北京)传媒科技有限公司 Display method and device of vote page
CN104899956A (en) * 2015-04-15 2015-09-09 腾讯科技(深圳)有限公司 Voting achieving method and voting achieving apparatus

Also Published As

Publication number Publication date
CN105824903A (en) 2016-08-03

Similar Documents

Publication Publication Date Title
US10999634B2 (en) Media content recommendation method, server, client, and storage medium
US10575037B2 (en) Video recommending method, server, and storage media
CN109327714B (en) Method and system for supplementing live broadcast
WO2017166644A1 (en) Data acquisition method and system
US9424319B2 (en) Social media based content selection system
US9984427B2 (en) Data ingestion module for event detection and increased situational awareness
US20160034592A1 (en) Personal trends module
JPWO2007148817A1 (en) Content recommendation system, content recommendation method, and content recommendation program
Abel et al. Appropriation of mainstream news: How Saturday Night Live changed the political discussion
CN102098549A (en) Electronic program guide (EPG) system for providing social network service
WO2017156927A1 (en) Method and device for generating counting event
JP6158435B2 (en) Associating social messages with related multimedia flows
CN107172178B (en) A kind of content delivery method and device
TWI709905B (en) Data analysis method and data analysis system thereof
JP2018500696A (en) Method and apparatus for authenticating a user
KR101855479B1 (en) Method for recommending konwledge contents based on big data and system at the same
CN112135199B (en) Video playing method based on multiple types of video sources and related equipment
Mutsvairo Recapturing citizen journalism: Processes and patterns
KR101583238B1 (en) Method for providing multimedia contents with a popularity
Esteve Del Valle et al. Unpredictably Trump? Predicting clicktivist-like actions on Trump's Facebook posts during the 2016 US primary election
Grivolla et al. EUMSSI: a Platform for Multimodal Analysis and Recommendation using UIMA
Bhagvat Clustering of twitter technology tweets and the impact of stopwords on clusters
Davies Robinson et al. The Cyberseduce Collection: Sex Work Commentary on Major Social Media Platforms.
JP6335022B2 (en) Specific information collection device, posted information analysis device, specific information collection method, and program
Giglietto Social semantics in a networked space

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 16894089

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16894089

Country of ref document: EP

Kind code of ref document: A1