WO2016101811A1 - Information arrangement method and apparatus - Google Patents

Information arrangement method and apparatus Download PDF

Info

Publication number
WO2016101811A1
WO2016101811A1 PCT/CN2015/097480 CN2015097480W WO2016101811A1 WO 2016101811 A1 WO2016101811 A1 WO 2016101811A1 CN 2015097480 W CN2015097480 W CN 2015097480W WO 2016101811 A1 WO2016101811 A1 WO 2016101811A1
Authority
WO
WIPO (PCT)
Prior art keywords
rule
sorting
condition
information
sub
Prior art date
Application number
PCT/CN2015/097480
Other languages
French (fr)
Chinese (zh)
Inventor
姜冬金
Original Assignee
阿里巴巴集团控股有限公司
姜冬金
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司, 姜冬金 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2016101811A1 publication Critical patent/WO2016101811A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/16Payments settled via telecommunication systems

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

An information arrangement method and apparatus are used to improve flexibility of information arrangement. The method comprises: acquiring service data, and an information set corresponding to the service data (S101), where the information set is a payment tool information set; determining, from preset arrangement rules, an arrangement rule matching the service data (S102); and arranging information in the information set according to the determined arrangement rule (S103). In this way, information arranged in a different order can be dynamically provided to a different service scenario, so that flexibility of arranging information can be effectively improved.

Description

一种信息排序方法及装置Information sorting method and device 技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种信息排序方法及装置。The present application relates to the field of computer technologies, and in particular, to an information sorting method and apparatus.
背景技术Background technique
在互联网技术领域,服务器往往通过在终端上展示页面来为用户提供各种服务。在某些业务场景中,页面中会展示一个信息集合(如,联系人信息集合、地址信息集合),展示的各信息往往按照一定的顺序依次排列,以提高用户操作时的便利性。In the field of Internet technology, servers often provide various services to users by displaying pages on the terminals. In some business scenarios, a collection of information (for example, a collection of contact information and a collection of address information) is displayed on the page, and the information displayed is often arranged in a certain order to improve the convenience of the user.
在不同的业务场景中,用户对同一信息集合中各信息的排序方式的需求也不同,这就需要设备(如,终端或服务器)根据不同的业务场景设置不同的排序顺序,按照不同的排序顺序对信息进行排序。In different service scenarios, users have different requirements for sorting information in the same information set. This requires devices (such as terminals or servers) to set different sorting orders according to different business scenarios, according to different sorting orders. Sort the information.
在现有技术中,预先为不同的业务场景配置了不同的排序顺序,也就是说,对于某一固定业务场景,相应的排序顺序是预先设定好的,终端只需根据预设的排序顺序对信息进行排序即可。例如,开发人员可预先为不同的业务场景配置不同的排序代码,将各排序代码置于页面代码中。所述的排序代码具体是用于实现对信息集合中的信息按某一方式进行排序的代码(如,按照信息建立时间的先后顺序对信息进行排序,或者按照信息使用频率大小顺序对信息进行排序等)。当终端需要展示信息时,服务器向终端发送包括排序代码的页面代码,终端可根据页面代码中的排序代码展示信息。In the prior art, different sorting orders are configured in advance for different service scenarios, that is, for a fixed service scenario, the corresponding sorting order is preset, and the terminal only needs to be according to a preset sorting order. Sort the information. For example, a developer can pre-configure different sorting codes for different business scenarios, placing each sorting code in the page code. The sorting code is specifically used to implement the sorting of the information in the information set in a certain manner (for example, sorting the information according to the order of information establishment time, or sorting the information according to the order of the frequency of use of the information) Wait). When the terminal needs to display information, the server sends a page code including the sort code to the terminal, and the terminal may display the information according to the sort code in the page code.
但是,考虑到在实际应用场景中,随着业务功能的不断变化(如,增加或升级),用户对排序方式的要求也在不断变化,这就需要开发人员及时更新每一个页面代码中的排序代码,若更新不够及时,服务器还会根据原来的排序代码进行业务处理,这样,就存在对信息排序不够灵活、服务质量较低、用户操作的便利性较低的问题。 However, considering the actual application scenario, as the business function changes (such as adding or upgrading), the user's requirements for the sorting method are also changing, which requires the developer to update the order in each page code in time. The code, if the update is not timely enough, the server will also perform business processing according to the original sorting code, so that there is a problem that the information sorting is not flexible enough, the service quality is low, and the user's operation convenience is low.
发明内容Summary of the invention
本申请实施例提供一种信息排序方法及装置,用以提高对信息排序的灵活性。The embodiment of the present application provides an information sorting method and device, which are used to improve the flexibility of sorting information.
本申请实施例提供的一种信息排序方法,包括:An information sorting method provided by an embodiment of the present application includes:
获取业务数据,以及所述业务数据对应的信息集合,其中,所述信息集合为支付工具信息集合;Obtaining service data, and a set of information corresponding to the service data, where the information set is a payment tool information set;
在预设的各排序规则中,确定出与所述业务数据相匹配的排序规则;Determining, in each preset collation, a sorting rule that matches the business data;
根据所述确定出的排序规则,对所述信息集合中的信息进行排序。Sorting information in the information set according to the determined sorting rule.
本申请实施例提供的一种信息排序装置,包括:An information sorting apparatus provided by an embodiment of the present application includes:
获取模块,用于获取业务数据,以及所述业务数据对应的信息集合,其中,所述信息集合为支付工具信息集合;An acquiring module, configured to obtain service data, and a set of information corresponding to the service data, where the information set is a payment tool information set;
确定模块,用于在预设的各排序规则中,确定出与所述业务数据相匹配的排序规则;a determining module, configured to determine, in each preset collation, a sorting rule that matches the service data;
排序模块,用于根据所述确定出的排序规则,对所述信息集合中的信息进行排序。a sorting module, configured to sort information in the information set according to the determined sorting rule.
本申请实施例提供的一种信息排序方法及装置,该方法预先设置与不同业务场景对应的多个排序规则,当服务器获取到业务数据时,在预设的各排序规则中,确定出与该业务数据相匹配的排序规则,并根据确定出的排序规则,对信息集合中的信息进行排序。这样,就可动态的为不同业务数据对应的不同业务场景提供不同排列顺序的信息,从而可有效提高对信息排序的灵活性,提高服务质量,相应的,也可有效提高用户操作的便利性。An information sorting method and device provided by the embodiment of the present application, the method pre-setting a plurality of sorting rules corresponding to different service scenarios, and when the server obtains the service data, determining, in the preset sorting rules, the The collation of the business data matches, and the information in the information collection is sorted according to the determined collation. In this way, different ordering information can be dynamically provided for different service scenarios corresponding to different service data, thereby effectively improving the flexibility of sorting information, improving service quality, and correspondingly, and effectively improving user convenience.
附图说明DRAWINGS
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中: The drawings described herein are intended to provide a further understanding of the present application, and are intended to be a part of this application. In the drawing:
图1为本申请实施例提供的一种信息排序方法流程示意图;FIG. 1 is a schematic flowchart of an information sorting method according to an embodiment of the present application;
图2为本申请实施例提供的规则表达式的语法树结构示意图;2 is a schematic diagram of a syntax tree structure of a rule expression according to an embodiment of the present application;
图3为本申请实施例提供的规则表达式的语法树结构示意图;FIG. 3 is a schematic diagram of a syntax tree structure of a rule expression according to an embodiment of the present disclosure;
图4为本申请实施例提供的规则表达式的语法树结构示意图;4 is a schematic diagram of a syntax tree structure of a rule expression according to an embodiment of the present application;
图5为本申请实施例提供的信息排序装置结构示意图。FIG. 5 is a schematic structural diagram of an information sorting apparatus according to an embodiment of the present application.
具体实施方式detailed description
为使本申请的目的、技术方案和优点更加清楚,以下将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions of the present application will be clearly and completely described in the following with reference to the specific embodiments of the present application and the corresponding drawings. It is apparent that the described embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
参见图1,为本申请实施例提供的信息排序方法流程示意图,包括以下步骤:1 is a schematic flowchart of an information sorting method provided by an embodiment of the present application, including the following steps:
S101:获取业务数据,以及该业务数据对应的信息集合。S101: Acquire service data, and a set of information corresponding to the service data.
考虑到在实际应用场景中,针对不同的业务,处理各业务产生的业务数据也不同。在本申请实施例中,获取业务数据为:服务器获取在某一个业务处理过程中产生的业务数据。Considering that in actual application scenarios, the service data generated by processing each service is different for different services. In the embodiment of the present application, the acquiring the service data is: the server acquires the service data generated in a certain service process.
在实际应用场景中,处理与支付有关的业务时,往往需要通过终端展示包括支付工具信息的信息集合(以下称为支付工具信息集合)。也就是说,本申请实施例所述的信息集合可包括支付工具信息集合。In a practical application scenario, when processing a service related to payment, it is often necessary to display a collection of information including payment instrument information (hereinafter referred to as a collection of payment instrument information) through the terminal. That is, the information set described in the embodiment of the present application may include a payment instrument information set.
则服务器获取业务数据时,可获取在支付有关的业务处理过程中产生的业务数据,获取该业务数据对应的信息集合时,可获取支付工具信息集合。与支付有关的业务具体可包括:与转账、充值、在线购物、还款等有关的业务。支付工具可包括银行卡、电子红包、优惠券等类型,这些类型的支付工具信息可构成支付工具信息集合。支付工具信息具体可以为支付工具的名称或标识符等 信息,例如,银行卡信息包括:中国工商银行、中国建设银行等银行卡名称,或者包括与中国工商银行和中国建设银行分别对应的标识符ICBC和CCB。When the server obtains the service data, the server may obtain the service data generated during the payment related business process, and obtain the payment tool information set when the information set corresponding to the service data is obtained. The business related to payment may specifically include: business related to transfer, recharge, online shopping, repayment, and the like. The payment instrument may include a bank card, an electronic red envelope, a coupon, etc., and these types of payment instrument information may constitute a collection of payment instrument information. The payment instrument information may specifically be the name or identifier of the payment instrument, etc. Information, for example, bank card information includes: the name of the bank card such as Industrial and Commercial Bank of China, China Construction Bank, or the identifier ICBC and CCB corresponding to ICBC and China Construction Bank respectively.
当然,在本申请实施例中,所述的业务数据也可以为处理其他类型的业务产生的业务数据,如,处理与添加联系人相关的业务产生的业务数据,相应的,所述的信息集合还可以为手机号码集合、电子邮箱地址集合、即时通讯账号集合等联系人信息集合。Of course, in the embodiment of the present application, the service data may also be service data generated by processing other types of services, for example, processing service data generated by a service related to adding a contact, and correspondingly, the information set. It can also be a collection of contact information such as a collection of mobile phone numbers, a collection of email addresses, and a collection of instant messaging accounts.
S102:在预设的各排序规则中,确定出与业务数据相匹配的排序规则。S102: Determine, in each preset collation, a collation that matches the business data.
考虑到实际应用场景中,不同的业务场景,用户对相同的信息集合中的各信息的排列顺序需求不同。例如,在处理与充值相关的业务时,用户往往习惯于优先使用电子红包进行充值,在处理与转账相关的业务时,用户通常会优先使用银行卡进行转账。这就需要服务器针对不同的业务场景,尽可能将用户可能优先使用的支付工具信息展示在所有支付工具信息中靠前的位置,来提高用户操作的便利性。Considering the different business scenarios in the actual application scenario, the user has different requirements for the order of the information in the same information set. For example, when dealing with recharge-related services, users are often accustomed to using electronic red packets for recharging. When dealing with transactions related to transfer, users usually prefer to use bank cards for transfer. This requires the server to display the payment instrument information that the user may preferentially use in the top position of all payment instrument information for different business scenarios, so as to improve the convenience of the user operation.
则在本申请实施例中,可预先针对不同的业务场景设置不同的排序规则,当服务器通过步骤S101获取业务数据后,可在预设的各排序规则中,确定出与该业务数据相匹配的排序规则。由于不同的业务数据可以反映不同的业务场景,因此,一旦确定出业务数据相匹配的排序规则,也就确定出该业务数据所反映的业务场景对应的排序规则。In the embodiment of the present application, different sorting rules may be set in advance for different service scenarios. After the server obtains the service data in step S101, the server may determine, in the preset sorting rules, the matching with the service data. Sorting rules. Since different service data can reflect different service scenarios, once the ordering rules for matching the service data are determined, the ordering rules corresponding to the service scenarios reflected by the service data are determined.
具体的,本申请实施例可根据不同的业务场景,为不同的排序规则分别预设规则条件,当服务器获取到的业务数据满足某一个规则条件时,可确定该规则条件对应的排序规则为与该业务数据相匹配的排序规则。Specifically, the embodiment of the present application may preset a rule condition for different sorting rules according to different service scenarios. When the service data obtained by the server satisfies a certain rule condition, the order rule corresponding to the rule condition may be determined as The business data matches the collation.
例如,针对手机充值、游戏充值、转账等不同业务,可对这些业务分别设置能够表达各业务的规则条件。当获取到与手机充值相关的业务数据时,根据该业务数据,在各预设的规则条件中,确定与该业务数据相匹配的规则条件,确定出的规则条件对应的排序规则,就是与该业务数据相匹配的排序规则,也就是与该手机充值业务对应的排序规则。 For example, for different services such as mobile phone recharge, game recharge, and transfer, rules for expressing each service can be set separately for these services. When the service data related to the mobile phone recharge is obtained, according to the service data, among the preset rule conditions, the rule condition matching the service data is determined, and the rule rule corresponding to the determined rule condition is The collation of the business data matching, that is, the collation corresponding to the mobile phone recharge service.
S103:根据确定出的排序规则,对信息集合中的信息进行排序。S103: Sort information in the information set according to the determined sorting rule.
例如,假设信息集合中仅包括一个银行卡信息和一个电子红包信息。针对转账和充值业务,预先设置排序规则1和排序规则2。排序规则1为:银行卡排在电子红包之前。排序规则2为:电子红包排在银行卡之前。For example, suppose that only one bank card information and one electronic red envelope information are included in the information set. For the transfer and recharge business, collation 1 and collation 2 are preset. The collation 1 is: the bank card is placed before the electronic red envelope. The collation 2 is: the electronic red envelope is placed before the bank card.
上例中,若服务器接收到的业务数据为与转账相关的业务数据,并确定与该业务数据相匹配的排序规则为排序规则1,则根据排序规则1将银行卡排在电子红包之前,并通过终端展示排序后的银行卡信息和电子红包信息。这样,显示在终端上的支付工具信息的排列顺序为:银行卡在前,电子红包在后。这样,用户在网页上选择支付工具时,就选择排在最前面的银行卡,从而提高了用户操作的便利性。In the above example, if the service data received by the server is the service data related to the transfer, and the collation matching the service data is determined to be the collation 1, the bank card is arranged before the electronic red envelope according to the collation 1 The sorted bank card information and electronic red envelope information are displayed through the terminal. In this way, the order of the payment instrument information displayed on the terminal is: the bank card is in front and the electronic red envelope is in the back. In this way, when the user selects the payment tool on the webpage, the bank card that is ranked first is selected, thereby improving the convenience of the user operation.
上述图1所示的方法,预先设置与不同业务场景对应的多个排序规则,当服务器获取到业务数据时,在预设的各排序规则中,确定出与该业务数据相匹配的排序规则,并根据确定出的排序规则,对信息集合中的信息进行排序。这样,就可动态的为不同业务场景提供不同排列顺序的信息,从而可有效提高对信息排序的灵活性,提高服务质量,从而可有效提高用户操作的便利性。In the method shown in FIG. 1 , a plurality of sorting rules corresponding to different service scenarios are set in advance. When the server obtains the service data, the sorting rules that match the service data are determined in the preset sorting rules. And sorting the information in the information collection according to the determined sorting rule. In this way, different ordering information can be dynamically provided for different business scenarios, thereby effectively improving the flexibility of sorting information and improving the quality of service, thereby effectively improving the convenience of user operations.
在本申请实施例中,上述的规则条件可以包括一个规则子条件,也可包括由运算符连接的多个规则子条件。In the embodiment of the present application, the foregoing rule condition may include a rule sub-condition, and may also include a plurality of rule sub-conditions connected by an operator.
所述规则子条件包括业务数据变量,规则子条件中的业务数据变量与业务数据中的业务数据变量相同。The rule sub-conditions include a business data variable, and the business data variable in the rule sub-condition is the same as the business data variable in the business data.
具体的,所述的规则条件可以是一个规则表达式,而规则子条件可以是条件表达式,也就是说,一个规则表达式包括至少一个条件表达式,以及用于连接各条件表达式的逻辑运算符,其中,逻辑运算符可以包括“!(非)”、“&&(与)”、“‖(或)”等,当然,规则表达式中还可以包括“()”、“{}”等运算符。Specifically, the rule condition may be a regular expression, and the rule sub-condition may be a conditional expression, that is, a rule expression includes at least one conditional expression, and logic for connecting each conditional expression Operators, where logical operators can include "! (not)", "&& (and)", "‖ (or)", etc., of course, regular expressions can also include "()", "{}" Operators.
条件表达式包括业务数据变量、关系运算符、比较值和类型符;其中,关系运算符用于对业务数据变量和比较值进行运算,类型符用于说明业务数据变 量的类型,关系运算符包括但不限于:“==(等于)”、“!=(不等于)”、“<”、“≤”、“>”、“≥”等。类型符可包括但不限于:字符串型(string)、整型(int)、日期型(date)、长整型(long)、布尔型(boolean)等。Conditional expressions include business data variables, relational operators, comparison values, and type characters; where, relational operators are used to operate on business data variables and comparison values, and type characters are used to describe business data changes. The type of quantity, relational operators include but are not limited to: "== (equal to)", "!= (not equal to)", "<", "≤", ">", "≥", and so on. Type symbols can include, but are not limited to, string (string), integer (int), date (date), long (long), boolean (boolean), and so on.
例如,string:A>1&&int:B!=2‖(date:C>201209&&date:C<201211)为一个规则表达式,该规则表达式中包括&&和‖这两种逻辑运算符,以及包括一个(),由&&和‖连接的条件表达式包括:“string:A>1”、B!=2”、“date:C>201209”和“C<201211”,其中,A、B、C为业务数据变量。For example, string:A>1&&int:B! =2‖(date:C>201209&&date:C<201211) is a regular expression that includes two logical operators, && and ,, and a conditional expression including a (), connected by && and ‖ The formula includes: "string: A>1", B! =2", "date:C>201209" and "C<201211", where A, B, and C are business data variables.
则服务器通过步骤S101获取业务数据后,在预设的各排序规则中,确定与业务数据相匹配的排序规则时,可将业务数据中的业务数据变量的值代入各规则表达式中,对各规则表达式进行运算,判断业务数据是否满足规则表达式,若是,可确定该业务数据与该规则表达式对应的排序规则相匹配,否则,与该排序规则不匹配。由于规则表达式的运算结果为布尔类型(即运算结果为“真”或“假”),因此,只有当规则表达式的运算结果为真时,可确定该业务数据满足规则表达式,否则,确定该业务数据不满足该规则表达式。After the server obtains the service data in step S101, when determining the collation matching the service data in the preset collation rules, the value of the service data variable in the service data may be substituted into each rule expression, for each The rule expression performs an operation to determine whether the service data satisfies the rule expression. If yes, it may be determined that the service data matches the collation rule corresponding to the rule expression; otherwise, the collation does not match. Since the operation result of the regular expression is a Boolean type (that is, the operation result is "true" or "false"), it can be determined that the service data satisfies the regular expression only when the operation result of the regular expression is true, otherwise, Determine that the business data does not satisfy the rule expression.
但是,在步骤S102中,针对某一个业务数据,从预设的各排序规则中,可能会确定出多个与业务数据相匹配的排序规则。However, in step S102, for a certain service data, a plurality of collation rules matching the service data may be determined from the preset collation rules.
例如,假设预设了规则表达式1和规则表达式2,规则表达式1为:string:A>1&&int:B!=2‖(date:C>201209&&date:C<201211),规则表达式2为:string:A>2&&int:B!=3。服务器针对某业务,获取的业务数据包括:A=3,B=1,C=201210。将A=3,B=1,C=201210代入规则表达式1和规则表达式2可知,业务数据中业务数据变量A、B、C的值均满足这两个规则表达式,从而可确定业务数据与这两个规则表达式对应的排序规则均匹配。For example, suppose the rule expression 1 and the regular expression 2 are preset, and the regular expression 1 is: string:A>1&&int:B! =2‖(date:C>201209&&date:C<201211), the regular expression 2 is: string:A>2&&int:B! =3. The service data acquired by the server for a certain service includes: A=3, B=1, C=201210. Substituting A=3, B=1, C=201210 into the regular expression 1 and the regular expression 2, the values of the business data variables A, B, and C in the service data satisfy the two rule expressions, thereby determining the service. The data matches the collation corresponding to the two rule expressions.
为了从业务数据匹配的多个排序规则中,确定出一个最能够满足用户在当前业务场景排序需求的排序规则。In order to select from the plurality of collation rules matched by the business data, a sorting rule that best satisfies the user's ranking requirements in the current business scene is determined.
则在本申请实施例中,可预先为各规则条件设置优先级,则在预设的各排序规则中,确定与业务数据相匹配的排序规则时,具体可针对预设的每个排序 规则,当确定业务数据满足该排序规则对应的规则条件时,将该排序规则作为待定排序规则;在确定的各待定排序规则中,选择出优先级最高的规则条件对应的排序规则,作为与业务数据相匹配的排序规则。In the embodiment of the present application, the priority may be set in advance for each rule condition, and in the preset collation rules, when the sorting rule matching the service data is determined, specifically, each of the presets may be sorted. a rule, when it is determined that the service data satisfies the rule condition corresponding to the collation rule, the collation rule is used as a to-be-determined collation rule; in the determined each of the to-be-determined collation rules, the collation rule corresponding to the rule condition with the highest priority is selected as the service The collation of the data matches.
各规则条件的优先级可根据各规则条件对应的权重值之和确定,具体的,可结合业务场景为各规则表达式中的不同的业务数据变量设置权重值,并计算每一个规则表达式中所有业务数据变量的权重值之和,权重值的和值越大说明该规则表达式对业务表达更详细,因此其优先级也越高;其中,在计算所有业务数据变量的权重值之和时,规则表达式中的每一个条件表达式中的业务数据变量都要参与计算。例如,在上例中,设规则表达式1中的业务数据变量A、B、C的权重值均为1,由于规则表达式1中出现了四个业务数据变量,分别为A、B、C、C,则权重值之和为4。The priority of each rule condition may be determined according to the sum of the weight values corresponding to the rule conditions. Specifically, the weight value may be set for different service data variables in each rule expression according to the service scenario, and each rule expression is calculated. The sum of the weight values of all business data variables, the greater the sum of the weight values indicates that the rule expression is more detailed for the business expression, so its priority is higher; wherein, when calculating the sum of the weight values of all business data variables The business data variables in each of the conditional expressions in the regular expression are involved in the calculation. For example, in the above example, it is assumed that the weight values of the business data variables A, B, and C in the regular expression 1 are all 1, because four business data variables appear in the regular expression 1, respectively, A, B, and C. , C, then the sum of the weight values is 4.
则本申请上述实施例,在各待定排序规则中,选择出优先级最高的规则条件对应的排序规则,具体包括:The foregoing embodiment of the present application, in each of the pending sorting rules, selects a sorting rule corresponding to the rule condition with the highest priority, and specifically includes:
针对每一个待定排序规则对应的规则条件,根据预设的业务数量变量的权重值,确定该规则条件中的各业务数量变量对应的权重值的和值;在各规则条件对应的和值中,确定最大的和值对应的规则条件为优先级最高的规则条件;将优先级最高的规则条件对应的排序规则,作为与业务数据相匹配的排序规则。For each rule condition corresponding to the to-be-ordered rule, the sum value of the weight value corresponding to each service quantity variable in the rule condition is determined according to the weight value of the preset service quantity variable; The rule condition corresponding to the largest sum value is determined as the rule condition with the highest priority; the collation corresponding to the rule condition with the highest priority is used as the collation matching the business data.
当然,本申请实施例在确定规则条件的优先级时,还可通过如下方式实现:Certainly, when determining the priority of the rule condition, the embodiment of the present application may also be implemented as follows:
确定每一个排序规则对应的规则条件中,包含的规则子条件的数量,根据规则子条件的数量由大到小的顺序为各规则条件设置从高到低的优先级。The number of rule sub-conditions included in each rule condition corresponding to each collation is determined, and the highest-to-low priority is set for each rule condition according to the order of the number of rule sub-conditions.
在本申请实施例中,为了提高处理效率,服务器获取业务数据后,判断业务数据是否满足排序规则对应的规则条件时,可通过如下方式实现。In the embodiment of the present application, in order to improve the processing efficiency, after the server obtains the service data, and determines whether the service data meets the rule condition corresponding to the collation rule, the method can be implemented as follows.
具体的,在确定业务数据满足排序规则对应的规则条件时,针对每一个规则条件,确定该规则条件中的规则子条件;根据各规则子条件和连接规则子条件的运算符,生成规则条件对应的语法树;对确定出的规则条件的各规则子条 件进行去重处理,根据业务数据分别对去重处理后的各规则子条件进行运算,得到每一个规则子条件对应的运算结果;根据各规则子条件对应的运算结果,对语法树进行运算,得到该语法树对应的运算结果;当语法树的运算结果为真时,确定业务数据满足该排序规则对应的规则条件;当语法树的运算结果为假时,确定业务数据不满足该排序规则对应的规则条件。Specifically, when it is determined that the service data meets the rule condition corresponding to the collation rule, the rule sub-conditions in the rule condition are determined for each rule condition; and the rule condition corresponding to each rule sub-condition and the connection rule sub-condition operator is generated. Syntax tree; rule clauses for the determined rule conditions The device performs de-reprocessing, and performs operation on each rule sub-condition after the de-duplication processing according to the service data, and obtains an operation result corresponding to each rule sub-condition; and performs operation on the syntax tree according to the operation result corresponding to each rule sub-condition, Obtaining an operation result corresponding to the syntax tree; determining that the service data satisfies the rule condition corresponding to the collation rule when the operation result of the syntax tree is true; and determining that the service data does not satisfy the collation rule when the operation result of the syntax tree is false Rule conditions.
以下将以确定业务数据是否满足规则表达式string:A>1&&int:B!=2‖(string:A>1&&int:B!=3)为例说明,可包括如下步骤:The following will determine if the business data satisfies the regular expression string:A>1&&int:B! =2‖(string:A>1&&int:B!=3) is an example, which can include the following steps:
步骤一:确定各条件表达式为:“string:A>1”、“int:B!=2”、“string:A>1”和“int:B!=3”。Step 1: Determine the conditional expressions as: "string: A>1", "int:B!=2", "string:A>1", and "int:B!=3".
步骤二:根据各条件表达式和连接各条件表达式的逻辑运算符&&和‖,生成如图2所示的语法树,图2所示的语法树为二叉树,各条件表达式为二叉树中的叶子节点,逻辑运算符&&和‖为二叉树中的中间节点和根节点。Step 2: According to each conditional expression and the logical operators && and 连接 connecting the conditional expressions, a syntax tree as shown in FIG. 2 is generated, and the syntax tree shown in FIG. 2 is a binary tree, and each conditional expression is in a binary tree. Leaf nodes, logical operators && and ‖ are intermediate nodes and root nodes in the binary tree.
其中,在生成语法树时,根据步骤一得到的多个独立的条件表达式和逻辑运算符,将条件表达式作为语法树的叶子节点,将逻辑运算符作为语法树的中间节点或根节点,生成语法树,由于生成语法树的方法为现有技术,因此这里不再赘述。Wherein, when generating the syntax tree, according to the multiple independent conditional expressions and logical operators obtained in step 1, the conditional expression is used as the leaf node of the syntax tree, and the logical operator is used as the intermediate node or the root node of the syntax tree. The syntax tree is generated. Since the method of generating the syntax tree is prior art, it will not be described here.
步骤三:根据步骤一确定出的各条件表达式,对各条件表达式进行去重处理,根据业务数据分别对去重处理后的各条件表达式进行运算,得到每一个条件表达式的运算结果。Step 3: Perform de-reprocessing on each conditional expression according to each conditional expression determined in step one, and perform operation on each conditional expression after de-duplication processing according to the service data to obtain an operation result of each conditional expression. .
上例中,由于规则表达式中的四个条件表达式“string:A>1”、“int:B!=2”、“string:A>1”和“int:B!=3”中,具有两个相同的条件表达式“string:A>1”,去重处理后的条件表达式包括“string:A>1”、“int:B!=2”和“int:B!=3”这三个条件表达式。In the above example, due to the four conditional expressions "string:A>1", "int:B!=2", "string:A>1", and "int:B!=3" in the regular expression, Has two identical conditional expressions "string:A>1", and the conditional expression after de-reprocessing includes "string:A>1", "int:B!=2", and "int:B!=3" These three conditional expressions.
假设某一业务,业务数据包括A=2,B=1,将A=2,B=1代入“string:A>1”、“int:B!=2”和“int:B!=3”这三个条件表达式进行运算,显然,A=2满足A>1,B=1满足B!=2且满足B!=3,因此,对“string:A>1”、“int:B!=2”和 “int:B!=3”的运算结果均为真。Suppose a service, business data includes A=2, B=1, A=2, B=1 into “string:A>1”, “int:B!=2” and “int:B!=3” These three conditional expressions operate, obviously, A=2 satisfies A>1, B=1 satisfies B! = 2 and meet B! =3, therefore, for "string:A>1", "int:B!=2" and The result of "int:B!=3" is true.
步骤四:则将各条件表达式的运算结果代入语法树中,对语法树进行运算,判断运算结果是否为真,若是,则确定业务数据满足排序规则对应的规则条件,否则,确定业务数据不满足排序规则对应的规则条件。Step 4: Substituting the operation result of each conditional expression into the syntax tree, performing an operation on the syntax tree to determine whether the operation result is true, and if so, determining that the service data satisfies the rule condition corresponding to the collation rule; otherwise, determining the service data is not Meet the rule conditions corresponding to the collation.
上例中,由于“string:A>1”、“int:B!=2”和“int:B!=3”的运算结果均为真,则语法树的运算结果也为真,可以确定业务数据满足排序规则对应的规则条件。In the above example, since the operations of "string:A>1", "int:B!=2", and "int:B!=3" are all true, the result of the syntax tree is also true, and the service can be determined. The data satisfies the rule conditions corresponding to the collation.
由上例可知,如果按照现有技术运算语法树,则需要分别计算“string:A>1”、“int:B!=2”、“string:A>1”和“int:B!=3”,可见,对“string:A>1”计算了两次,这样处理效率就较低。而本发明首先对各条件表达式进行去重处理,去掉一个重复的条件表达式“string:A>1”,运算各去重处理后的条件表达式“string:A>1”、“int:B!=2”和“int:B!=3”,可见,对“string:A>1”仅运算一次,可有效提高处理效率。As can be seen from the above example, if the syntax tree is calculated according to the prior art, it is necessary to calculate "string: A>1", "int: B!=2", "string: A>1", and "int: B!=3, respectively. ", it can be seen that "string: A>1" is calculated twice, so the processing efficiency is lower. The present invention first de-emphasizes each conditional expression, removes a repeated conditional expression "string: A>1", and operates each de-emphasized conditional expression "string: A>1", "int: B!=2" and "int:B!=3", it can be seen that the operation of "string:A>1" is only one time, which can effectively improve the processing efficiency.
上述确定业务数据是否满足规则表达式的过程中,在步骤二中生成语法树之后,可为语法树中的各条件表达式设置标识符,相同的条件表达式设置相同的标识符,例如,为“string:A>1”、“int:B!=2”、“string:A>1”和“int:B!=3”设置的标识符可分别为d1、d2、d1、d3。将图2所示的语法树中的叶子节点替换为标识符,得到的语法树如图3所示。由于去重处理后的各条件表达式进行运算结果均为真,则d1、d2、d3的值均为真。将d1、d2、d3的值代入图3所示的语法树,得到的语法树,如图4所示。在步骤四中对语法树进行计算时,即对图4所示的语法树进行运算时,由叶子节点逐层向上两两运算,确定的语法树的运算结果为真。In the above process of determining whether the service data satisfies the rule expression, after generating the syntax tree in step 2, an identifier may be set for each conditional expression in the syntax tree, and the same conditional expression sets the same identifier, for example, The identifiers set by "string: A>1", "int:B!=2", "string:A>1", and "int:B!=3" may be d1, d2, d1, and d3, respectively. The leaf node in the syntax tree shown in FIG. 2 is replaced with an identifier, and the obtained syntax tree is as shown in FIG. 3. Since the operation results of all the conditional expressions after deduplication are true, the values of d1, d2, and d3 are all true. The values of d1, d2, and d3 are substituted into the syntax tree shown in FIG. 3, and the obtained syntax tree is as shown in FIG. 4. When the syntax tree is calculated in step four, that is, when the syntax tree shown in FIG. 4 is operated, the leaf nodes are operated up by layer by layer, and the operation result of the determined syntax tree is true.
其中,上述的步骤一和步骤二的先后顺序不限,例如,可以首先根据规则表达式生成二叉树,二叉树的叶子节点为条件表达式。然后遍历每一个叶子节点,得到所有的条件表达式。The sequence of the first step and the second step is not limited. For example, the binary tree may be generated according to the rule expression, and the leaf node of the binary tree is a conditional expression. Then iterate through each leaf node to get all the conditional expressions.
在本申请实施例中,在步骤S103中,根据确定出的排序规则,对信息集 合中的信息进行排序时,上述已经举例说明,当信息集合中包括银行卡和电子红包时,可将银行卡排在红包的后面或前面。但是,考虑到实际应用场景中,当银行卡的数量不止一个,或者电子红包的数量也不止一个时,这就需要对相同类型的支付工具进行排序。则本申请实施例,可以预设排序规则包括:类别排序子规则和信息排序子规则,在根据确定出的排序规则,对信息集合中的信息进行排序时,首先可根据类别排序子规则对信息集合中的信息的类别进行排序,然后根据信息排序子规则对相同类别的信息进行排序。In the embodiment of the present application, in step S103, according to the determined sorting rule, the information set When sorting the information in the middle, the above has exemplified that when the information set includes a bank card and an electronic red envelope, the bank card can be placed behind or in front of the red envelope. However, considering the actual application scenario, when there are more than one bank card or more than one electronic red envelope, this requires sorting the same type of payment instrument. In this embodiment, the preset sorting rule may include: a category sorting sub-rule and an information sorting sub-rule. When sorting information in the information set according to the determined sorting rule, the sub-rule pair information may be first sorted according to the category. The categories of information in the collection are sorted, and then the information of the same category is sorted according to the information sorting sub-rule.
所述类别排序子规则中的类别可以包括:支付工具的类别(如银行卡、电子红包、优惠券等),或者支付工具的渠道(如,支付工具的提供者)。The categories in the category ordering sub-rule may include: a category of a payment instrument (such as a bank card, an electronic red envelope, a coupon, etc.), or a channel of a payment instrument (eg, a provider of a payment instrument).
例如,假设支付工具信息集合中包括:银行卡、电子红包和优惠券这三种类型的支付工具,且各类型支付工具的数量分别为2、1、2,且银行卡由提供者A1提供,电子红包和优惠券由提供者A2提供。For example, it is assumed that the payment instrument information set includes three types of payment instruments: a bank card, an electronic red envelope, and a coupon, and the number of each type of payment instrument is 2, 1, 2, respectively, and the bank card is provided by the provider A1. Electronic red envelopes and coupons are provided by provider A2.
类别排序规则可以为:银行卡>电子红包>优惠券,即银行卡排在电子红包前面,电子红包排在优惠券前面;类别排序规则还可以为:提供者A1>提供者A2,即提供者A1提供的支付工具排在提供者A2提供的支付工具的前面。The category collation can be: bank card > electronic red envelope > coupon, that is, the bank card is placed in front of the electronic red envelope, and the electronic red envelope is arranged in front of the coupon; the category sorting rule can also be: provider A1>provider A2, ie provider The payment instrument provided by A1 is placed in front of the payment instrument provided by provider A2.
信息排序子规则可以为:对于银行卡,按照用户使用频率的大小顺序排序,对于电子红包和优惠券,按照面值大小的先后顺序排序。The information sorting sub-rule may be: for bank cards, sorted according to the order of the user's frequency of use, and for electronic red envelopes and coupons, sorted according to the order of face value.
这样,当信息集合中信息数量较大时,可首先按照支付工具的类别进行排序,然后再对属于同一类别的不同支付工具信息进行排序,可有效提高排序的效率。In this way, when the amount of information in the information set is large, the sorting may be first performed according to the category of the payment instrument, and then the different payment instrument information belonging to the same category may be sorted, thereby effectively improving the sorting efficiency.
考虑到在现有技术中,要根据预设的排序规则对信息进行排序,就需要开发人员预先将排序规则对应的排序代码置于整个页面代码中,后续服务器向终端发送整个页面代码时,终端即可根据整个页面代码中的排序代码排序并展示信息。当开发人员需要维护排序代码时,就需要在每一个页面代码中维护排序代码,这样,对排序规则的维护难度就较大。Considering that in the prior art, the information is sorted according to a preset sorting rule, the developer needs to pre-place the sorting code corresponding to the sorting rule in the entire page code, and when the subsequent server sends the entire page code to the terminal, the terminal You can sort and present information based on the sorting code in the entire page code. When the developer needs to maintain the sorting code, it needs to maintain the sorting code in each page code, so that it is more difficult to maintain the sorting rules.
因此,在本申请实施例中,预设的各排序规则分别对应的排序代码独立于 页面代码。这样,服务器在向终端发送信息集合之前,会首先根据本申请实施例提供的信息排序方法确定与该业务数据相匹配的排序规则,并从预设存储区域调用该排序规则对应的排序代码,将该排序代码嵌入页面代码中,并发送给终端,以使得终端根据该页面代码中的排序代码对信息集合进行排序并展示。Therefore, in the embodiment of the present application, the preset sorting codes respectively correspond to the sorting codes independently of Page code. In this way, before the server sends the information set to the terminal, the server first determines the matching rule that matches the service data according to the information sorting method provided by the embodiment of the present application, and invokes the sorting code corresponding to the sorting rule from the preset storage area. The sorting code is embedded in the page code and sent to the terminal to cause the terminal to sort and display the set of information according to the sorting code in the page code.
显然,本申请实施例排序代码独立于页面代码,集中存储在上述的预设存储区中,当需要维护排序规则时,只需要在该预设存储区域中对排序代码进行维护,从而可有效降低了对排序规则的维护难度。并且,由于排序代码独立于页面代码,可及时对业务代码进行维护,及时为用户提供较准确的排序规则,从而可有效提高信息排序的灵活性、提高服务质量、相应的,可有效提高用户操作的便利性。Obviously, the ordering code of the embodiment of the present application is stored in the preset storage area independently of the page code. When the sorting rule needs to be maintained, only the sorting code needs to be maintained in the preset storage area, thereby effectively reducing It is difficult to maintain the sorting rules. Moreover, since the sorting code is independent of the page code, the business code can be maintained in time, and the user can be provided with more accurate sorting rules in time, thereby effectively improving the flexibility of information sorting, improving the quality of service, correspondingly, and effectively improving user operations. Convenience.
以上为本申请实施例提供的信息排序方法,基于同样的思路,本申请实施例还提供了一种信息排序装置,如图5所示。The above is the information sorting method provided by the embodiment of the present application. Based on the same idea, the embodiment of the present application further provides an information sorting apparatus, as shown in FIG. 5 .
本申请实施例提供的一种信息排序装置,包括:An information sorting apparatus provided by an embodiment of the present application includes:
获取模块51,用于获取业务数据,以及所述业务数据对应的信息集合,其中,所述信息集合为支付工具信息集合;The obtaining module 51 is configured to obtain service data, and a set of information corresponding to the service data, where the information set is a payment tool information set;
确定模块52,用于在预设的各排序规则中,确定出与所述业务数据相匹配的排序规则;a determining module 52, configured to determine, in the preset sorting rules, a sorting rule that matches the service data;
排序模块53,用于根据所述确定出的排序规则,对所述信息集合中的信息进行排序。The sorting module 53 is configured to sort the information in the information set according to the determined sorting rule.
可选的,所述确定模块52具体用于:Optionally, the determining module 52 is specifically configured to:
针对预设的每个排序规则,当确定所述业务数据满足该排序规则对应的规则条件时,将该排序规则作为待定排序规则;For each of the preset sorting rules, when it is determined that the service data meets the rule condition corresponding to the sorting rule, the sorting rule is used as a pending sorting rule;
在确定的各待定排序规则中,选择出优先级最高的规则条件对应的排序规则,作为与所述业务数据相匹配的排序规则。In the determined each of the determined sorting rules, the sorting rule corresponding to the rule condition with the highest priority is selected as the sorting rule that matches the service data.
可选的,所述规则条件包括一个规则子条件或者由运算符连接的多个规则子条件; Optionally, the rule condition includes a rule sub-condition or a plurality of rule sub-conditions connected by an operator;
每一个规则子条件包括:业务数据变量。Each rule sub-condition includes: a business data variable.
可选的,所述确定模块52具体用于:Optionally, the determining module 52 is specifically configured to:
针对每一个待定排序规则对应的规则条件,根据预设的业务数量变量的权重值,确定该规则条件中的各业务数量变量对应的权重值的和值;Determining a sum of weight values corresponding to each service quantity variable in the rule condition according to a weight value of the preset service quantity variable for each rule condition corresponding to the to-be-ordered rule;
在各规则条件对应的和值中,确定最大的和值对应的规则条件为优先级最高的规则条件;将所述优先级最高的规则条件对应的排序规则,作为与所述业务数据相匹配的排序规则。In the sum value corresponding to each rule condition, the rule condition corresponding to the largest sum value is determined as the rule condition with the highest priority; and the collation rule corresponding to the rule condition with the highest priority is matched as the service data. Sorting rules.
可选的,所述确定模块52具体用于:针对每一个规则条件,确定该规则条件中的规则子条件;Optionally, the determining module 52 is specifically configured to: determine, for each rule condition, a rule sub-condition in the rule condition;
根据各规则子条件和连接规则子条件的运算符,生成所述规则条件对应的语法树;Generating a syntax tree corresponding to the rule condition according to an operator of each rule sub-condition and a connection rule sub-condition;
对确定出的所述规则条件的各规则子条件进行去重处理,根据所述业务数据分别对所述去重处理后的各规则子条件进行运算,得到每一个规则子条件对应的运算结果;Performing de-duplication processing on each rule sub-condition of the determined rule condition, and performing operation on each rule sub-condition of the de-duplication process according to the service data, to obtain an operation result corresponding to each rule sub-condition;
根据所述各规则子条件对应的运算结果,对所述语法树进行运算,得到该语法树对应的运算结果;Performing an operation on the syntax tree according to an operation result corresponding to each rule sub-condition, and obtaining an operation result corresponding to the syntax tree;
当所述语法树的运算结果为真时,确定所述业务数据满足排序规则对应的规则条件。When the operation result of the syntax tree is true, it is determined that the service data satisfies a rule condition corresponding to the collation rule.
可选的,所述排序规则包括类别排序子规则和信息排序子规则;所述排序模块53具体用于:Optionally, the sorting rule includes a category sorting sub-rule and an information sorting sub-rule; and the sorting module 53 is specifically configured to:
根据所述类别排序子规则对所述信息集合中的信息的类别进行排序;根据所述信息排序子规则对相同类别的信息进行排序。Sorting the categories of the information in the information set according to the category sorting sub-rule; sorting the information of the same category according to the information sorting sub-rules.
可选的,所述预设的各排序规则分别对应的排序代码独立于页面代码。Optionally, the preset sorting codes of the preset sorting rules are independent of the page code.
综上所述,本申请实施例提供一种信息排序方法和装置,具体可预先设置与不同业务场景对应的多个排序规则,当服务器获取到业务数据时,在预设的各排序规则中,确定出与该业务数据相匹配的排序规则,并根据确定出的排序 规则,对信息集合中的信息进行排序。这样,就可动态的为不同业务场景提供不同排列顺序的信息,从而可有效提高对信息排序的灵活性,提高服务质量,从而可有效提高用户操作的便利性。In summary, the embodiment of the present application provides a method and device for sorting information. Specifically, multiple sorting rules corresponding to different service scenarios may be preset. When the server obtains service data, in the preset sorting rules, Determining a collation that matches the business data and sorting according to the determined A rule that sorts the information in a collection of information. In this way, different ordering information can be dynamically provided for different business scenarios, thereby effectively improving the flexibility of sorting information and improving the quality of service, thereby effectively improving the convenience of user operations.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器 (RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-persistent memory in a computer readable medium, random access memory Forms such as (RAM) and/or non-volatile memory, such as read only memory (ROM) or flash memory. Memory is an example of a computer readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer readable media includes both permanent and non-persistent, removable and non-removable media. Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It is also to be understood that the terms "comprises" or "comprising" or "comprising" or any other variations are intended to encompass a non-exclusive inclusion, such that a process, method, article, Other elements not explicitly listed, or elements that are inherent to such a process, method, commodity, or equipment. An element defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device including the element.
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system, or computer program product. Thus, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware. Moreover, the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。 The above description is only an embodiment of the present application and is not intended to limit the application. Various changes and modifications can be made to the present application by those skilled in the art. Any modifications, equivalents, improvements, etc. made within the spirit and scope of the present application are intended to be included within the scope of the appended claims.

Claims (14)

  1. 一种信息排序方法,其特征在于,包括:An information sorting method, comprising:
    获取业务数据,以及所述业务数据对应的信息集合,其中,所述信息集合为支付工具信息集合;Obtaining service data, and a set of information corresponding to the service data, where the information set is a payment tool information set;
    在预设的各排序规则中,确定出与所述业务数据相匹配的排序规则;Determining, in each preset collation, a sorting rule that matches the business data;
    根据所述确定出的排序规则,对所述信息集合中的信息进行排序。Sorting information in the information set according to the determined sorting rule.
  2. 如权利要求1所述的方法,其特征在于,在预设的各排序规则中,确定出与所述业务数据相匹配的排序规则,具体包括:The method according to claim 1, wherein in the preset collation rules, the collation rules that match the service data are determined, which specifically includes:
    针对预设的每个排序规则,当确定所述业务数据满足该排序规则对应的规则条件时,将该排序规则作为待定排序规则;For each of the preset sorting rules, when it is determined that the service data meets the rule condition corresponding to the sorting rule, the sorting rule is used as a pending sorting rule;
    在确定的各待定排序规则中,选择出优先级最高的规则条件对应的排序规则,作为与所述业务数据相匹配的排序规则。In the determined each of the determined sorting rules, the sorting rule corresponding to the rule condition with the highest priority is selected as the sorting rule that matches the service data.
  3. 如权利要求2所述的方法,其特征在于,所述规则条件包括一个规则子条件或者由运算符连接的多个规则子条件;The method of claim 2, wherein the rule condition comprises a rule sub-condition or a plurality of rule sub-conditions connected by an operator;
    每一个规则子条件包括:业务数据变量。Each rule sub-condition includes: a business data variable.
  4. 如权利要求3所述的方法,其特征在于,在确定的各待定排序规则中,选择出优先级最高的规则条件对应的排序规则,作为与所述业务数据相匹配的排序规则,具体包括:The method according to claim 3, wherein in the determined each of the determined sorting rules, the sorting rule corresponding to the rule condition with the highest priority is selected as the sorting rule that matches the service data, and specifically includes:
    针对每一个待定排序规则对应的规则条件,根据预设的业务数量变量的权重值,确定该规则条件中的各业务数量变量对应的权重值的和值;Determining a sum of weight values corresponding to each service quantity variable in the rule condition according to a weight value of the preset service quantity variable for each rule condition corresponding to the to-be-ordered rule;
    在各规则条件对应的和值中,确定最大的和值对应的规则条件为优先级最高的规则条件;将所述优先级最高的规则条件对应的排序规则,作为与所述业务数据相匹配的排序规则。In the sum value corresponding to each rule condition, the rule condition corresponding to the largest sum value is determined as the rule condition with the highest priority; and the collation rule corresponding to the rule condition with the highest priority is matched as the service data. Sorting rules.
  5. 如权利要求3所述的方法,其特征在于,确定所述业务数据满足排序规则对应的规则条件,具体包括:The method of claim 3, wherein determining that the service data meets a rule condition corresponding to the collation rule comprises:
    针对每一个规则条件,确定该规则条件中的规则子条件; Determining the rule sub-conditions in the rule condition for each rule condition;
    根据各规则子条件和连接规则子条件的运算符,生成所述规则条件对应的语法树;Generating a syntax tree corresponding to the rule condition according to an operator of each rule sub-condition and a connection rule sub-condition;
    对确定出的所述规则条件的各规则子条件进行去重处理,根据所述业务数据分别对所述去重处理后的各规则子条件进行运算,得到每一个规则子条件对应的运算结果;Performing de-duplication processing on each rule sub-condition of the determined rule condition, and performing operation on each rule sub-condition of the de-duplication process according to the service data, to obtain an operation result corresponding to each rule sub-condition;
    根据所述各规则子条件对应的运算结果,对所述语法树进行运算,得到该语法树对应的运算结果;Performing an operation on the syntax tree according to an operation result corresponding to each rule sub-condition, and obtaining an operation result corresponding to the syntax tree;
    当所述语法树的运算结果为真时,确定所述业务数据满足排序规则对应的规则条件。When the operation result of the syntax tree is true, it is determined that the service data satisfies a rule condition corresponding to the collation rule.
  6. 如权利要求1所述的方法,其特征在于,所述排序规则包括类别排序子规则和信息排序子规则;The method of claim 1 wherein said ordering rules comprise a category ordering sub-rule and an information ordering sub-rule;
    根据所述确定出的排序规则,对所述信息集合中的信息进行排序,具体包括:And sorting the information in the information set according to the determined sorting rule, specifically:
    根据所述类别排序子规则对所述信息集合中的信息的类别进行排序;Sorting the categories of information in the information set according to the category sorting sub-rule;
    根据所述信息排序子规则对相同类别的信息进行排序。The information of the same category is sorted according to the information sorting sub-rule.
  7. 如权利要求1所述的方法,其特征在于,所述预设的各排序规则分别对应的排序代码独立于页面代码。The method according to claim 1, wherein the preset sorting codes respectively correspond to the sorting code independently of the page code.
  8. 一种信息排序装置,其特征在于,包括:An information sorting device, comprising:
    获取模块,用于获取业务数据,以及所述业务数据对应的信息集合,其中,所述信息集合为支付工具信息集合;An acquiring module, configured to obtain service data, and a set of information corresponding to the service data, where the information set is a payment tool information set;
    确定模块,用于在预设的各排序规则中,确定出与所述业务数据相匹配的排序规则;a determining module, configured to determine, in each preset collation, a sorting rule that matches the service data;
    排序模块,用于根据所述确定出的排序规则,对所述信息集合中的信息进行排序。a sorting module, configured to sort information in the information set according to the determined sorting rule.
  9. 如权利要求8所述的装置,其特征在于,所述确定模块具体用于,针对预设的每个排序规则,当确定所述业务数据满足该排序规则对应的规则条件 时,将该排序规则作为待定排序规则,在确定的各待定排序规则中,选择出优先级最高的规则条件对应的排序规则,作为与所述业务数据相匹配的排序规则。The device according to claim 8, wherein the determining module is configured to determine, according to each preset rule, that the service data meets a rule condition corresponding to the sorting rule The sorting rule is used as the to-be-determined sorting rule, and the sorting rule corresponding to the rule condition with the highest priority is selected as the sorting rule matching the service data.
  10. 如权利要求9所述的装置,其特征在于,所述规则条件包括一个规则子条件或者由运算符连接的多个规则子条件;The apparatus according to claim 9, wherein said rule condition comprises a rule sub-condition or a plurality of rule sub-conditions connected by an operator;
    每一个规则子条件包括:业务数据变量。Each rule sub-condition includes: a business data variable.
  11. 如权利要求10所述的装置,其特征在于,所述确定模块具体用于,针对每一个待定排序规则对应的规则条件,根据预设的业务数量变量的权重值,确定该规则条件中的各业务数量变量对应的权重值的和值;在各规则条件对应的和值中,确定最大的和值对应的规则条件为优先级最高的规则条件;将所述优先级最高的规则条件对应的排序规则,作为与所述业务数据相匹配的排序规则。The device according to claim 10, wherein the determining module is configured to: determine, according to a rule condition corresponding to each of the to-be-ordered rules, a weight of each of the rule conditions according to a weight value of the preset service quantity variable The sum of the weight values corresponding to the service quantity variable; in the sum value corresponding to each rule condition, determining the rule condition corresponding to the largest sum value as the rule condition with the highest priority; sorting the rule condition corresponding to the highest priority A rule as a collation that matches the business data.
  12. 如权利要求10所述的装置,其特征在于,所述确定模块具体用于,针对每一个规则条件,确定该规则条件中的规则子条件;根据各规则子条件和连接规则子条件的运算符,生成所述规则条件对应的语法树;对确定出的所述规则条件的各规则子条件进行去重处理,根据所述业务数据分别对所述去重处理后的各规则子条件进行运算,得到每一个规则子条件对应的运算结果;根据所述各规则子条件对应的运算结果,对所述语法树进行运算,得到该语法树对应的运算结果;当所述语法树的运算结果为真时,确定所述业务数据满足排序规则对应的规则条件。The apparatus according to claim 10, wherein the determining module is specifically configured to: determine, for each rule condition, a rule sub-condition in the rule condition; an operator according to each rule sub-condition and a connection rule sub-condition Generating a syntax tree corresponding to the rule condition; performing deduplication processing on each rule sub-condition of the determined rule condition, and performing operation on each rule sub-condition of the de-duplication process according to the service data, Obtaining an operation result corresponding to each rule sub-condition; performing an operation on the syntax tree according to the operation result corresponding to each rule sub-condition, and obtaining an operation result corresponding to the syntax tree; when the operation result of the syntax tree is true And determining that the service data meets a rule condition corresponding to the collation rule.
  13. 如权利要求8所述的装置,其特征在于,所述排序规则包括类别排序子规则和信息排序子规则;The apparatus according to claim 8, wherein said sorting rule comprises a category sorting sub-rule and an information sorting sub-rule;
    所述排序模块具体用于,根据所述类别排序子规则对所述信息集合中的信息的类别进行排序,根据所述信息排序子规则对相同类别的信息进行排序。The sorting module is specifically configured to sort the categories of the information in the information set according to the category sorting sub-rule, and sort the information of the same category according to the information sorting sub-rules.
  14. 如权利要求8所述的装置,其特征在于,所述预设的各排序规则分别对应的排序代码独立于页面代码。 The apparatus according to claim 8, wherein the preset sorting codes respectively correspond to the sorting codes independently of the page codes.
PCT/CN2015/097480 2014-12-23 2015-12-15 Information arrangement method and apparatus WO2016101811A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410816107.3 2014-12-23
CN201410816107.3A CN105786868B (en) 2014-12-23 2014-12-23 A kind of information sorting method and device

Publications (1)

Publication Number Publication Date
WO2016101811A1 true WO2016101811A1 (en) 2016-06-30

Family

ID=56149236

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/097480 WO2016101811A1 (en) 2014-12-23 2015-12-15 Information arrangement method and apparatus

Country Status (2)

Country Link
CN (1) CN105786868B (en)
WO (1) WO2016101811A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111402000A (en) * 2020-03-13 2020-07-10 苏宁云计算有限公司 Method, device and system for generating business page and computer system
CN112114970A (en) * 2020-09-28 2020-12-22 中国建设银行股份有限公司 Rule configuration method and device

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109255511A (en) * 2018-07-09 2019-01-22 广州品唯软件有限公司 Business sort method and system based on policy of Central Government engine
CN109445797A (en) * 2018-10-24 2019-03-08 北京奇虎科技有限公司 Handle task executing method and device
CN111325595B (en) * 2018-12-17 2023-07-14 阿里巴巴(深圳)技术有限公司 User rights and interests information display method and device and electronic equipment
CN112115165A (en) * 2019-06-21 2020-12-22 北京京东振世信息技术有限公司 Data processing method and device
CN112035201B (en) * 2020-08-24 2021-08-24 珠海格力电器股份有限公司 Device parameter display method and device, computer device and storage medium
CN112561403B (en) * 2021-01-18 2024-03-19 杭银消费金融股份有限公司 Business work order processing method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102867252A (en) * 2012-09-14 2013-01-09 东莞宇龙通信科技有限公司 Payment server and payment channel acquisition method
CN103875010A (en) * 2011-07-27 2014-06-18 罗素·斯图尔特·古德温 Intelligent payment system
JP5578256B1 (en) * 2013-07-01 2014-08-27 富士ゼロックス株式会社 Information processing apparatus and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103875010A (en) * 2011-07-27 2014-06-18 罗素·斯图尔特·古德温 Intelligent payment system
CN102867252A (en) * 2012-09-14 2013-01-09 东莞宇龙通信科技有限公司 Payment server and payment channel acquisition method
JP5578256B1 (en) * 2013-07-01 2014-08-27 富士ゼロックス株式会社 Information processing apparatus and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111402000A (en) * 2020-03-13 2020-07-10 苏宁云计算有限公司 Method, device and system for generating business page and computer system
CN111402000B (en) * 2020-03-13 2023-05-23 苏宁云计算有限公司 Service page generation method, device and system and computer system
CN112114970A (en) * 2020-09-28 2020-12-22 中国建设银行股份有限公司 Rule configuration method and device

Also Published As

Publication number Publication date
CN105786868B (en) 2019-08-09
CN105786868A (en) 2016-07-20

Similar Documents

Publication Publication Date Title
WO2016101811A1 (en) Information arrangement method and apparatus
CN105573966B (en) Adaptive modification of content presented in a spreadsheet
JP2018117370A (en) Dynamic telephone number assignment
CN110019080B (en) Data access method and device
US20180102947A1 (en) Network based data traffic latency reduction
CN104579909B (en) Method and equipment for classifying user information and acquiring user grouping information
US11238402B2 (en) Information operation
CN110135590B (en) Information processing method, information processing apparatus, information processing medium, and electronic device
CN104283975A (en) File distribution method and device
WO2021023149A1 (en) Method and apparatus for dynamically returning message
US20170374001A1 (en) Providing communication ranking scheme based on relationship graph
US20160092960A1 (en) Product recommendations over multiple stores
CN111768258A (en) Method, device, electronic equipment and medium for identifying abnormal order
CN107111836A (en) Use message meta-data generation market details page
JP7237905B2 (en) Method, apparatus and system for data mapping
CN109753424B (en) AB test method and device
CN112347147A (en) Information pushing method and device based on user association relationship and electronic equipment
JP2015537313A (en) Third-party communication to social networking system users using user descriptors
US20190058687A1 (en) Personal web address management system
US20230281695A1 (en) Determining and presenting information related to a semantic context of electronic message text or voice data
CN110796543B (en) Custom information acquisition method and device based on relational network and electronic equipment
WO2018054352A1 (en) Item set determination method, apparatus, processing device, and storage medium
CN106779899A (en) The recognition methods of malice order and device
US9195734B2 (en) Associating a task completion step of a task with a task template of a group of similar tasks
CN107291923B (en) Information processing method and device

Legal Events

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

Ref document number: 15871879

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15871879

Country of ref document: EP

Kind code of ref document: A1