CN112308707A - Information recommendation method, device and electronic device - Google Patents
Information recommendation method, device and electronic device Download PDFInfo
- Publication number
- CN112308707A CN112308707A CN202011310453.6A CN202011310453A CN112308707A CN 112308707 A CN112308707 A CN 112308707A CN 202011310453 A CN202011310453 A CN 202011310453A CN 112308707 A CN112308707 A CN 112308707A
- Authority
- CN
- China
- Prior art keywords
- resource
- container
- parameter
- share
- resource container
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 81
- 238000004590 computer program Methods 0.000 claims description 13
- 230000001174 ascending effect Effects 0.000 claims description 6
- 230000001360 synchronised effect Effects 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 6
- 230000005291 magnetic effect Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 239000002699 waste material Substances 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000012512 characterization method Methods 0.000 description 1
- 230000005294 ferromagnetic effect Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/03—Credit; Loans; Processing thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q10/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0631—Resource planning, allocation, distributing or scheduling for enterprises or organisations
- G06Q10/06312—Adjustment or analysis of established resource schedule, e.g. resource or task levelling, or dynamic rescheduling
Landscapes
- Business, Economics & Management (AREA)
- Human Resources & Organizations (AREA)
- Engineering & Computer Science (AREA)
- Economics (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Development Economics (AREA)
- Entrepreneurship & Innovation (AREA)
- Physics & Mathematics (AREA)
- Finance (AREA)
- General Physics & Mathematics (AREA)
- Marketing (AREA)
- Accounting & Taxation (AREA)
- Educational Administration (AREA)
- Technology Law (AREA)
- Game Theory and Decision Science (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Tourism & Hospitality (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明公开了一种信息推荐方法、装置和电子设备,其中,该方法包括:基于请求获取的第一资源的资源份额以及设定的第一比值,确定第一资源对应的第一参数;第一参数表征获取第一资源时要求锁定的最小资源份额;基于第一参数以及至少一个资源容器中每个资源容器对应的资源份额,输出关于M个第一资源容器集合的推荐信息;推荐信息用于确定获取第一资源时锁定的资源容器集合;其中,M个第一资源容器集合为N个资源容器集合中资源总份额最小的前M个资源容器集合;N个资源容器集合通过对至少一个资源容器进行组合得到;N个资源容器集合中的每个资源容器集合对应的资源总份额大于或等于第一参数;M和N均为正整数且N大于M。
The invention discloses an information recommendation method, device and electronic device, wherein the method includes: determining a first parameter corresponding to the first resource based on the resource share of the first resource obtained by request and the set first ratio; A parameter represents the minimum resource share required to be locked when acquiring the first resource; based on the first parameter and the resource share corresponding to each resource container in the at least one resource container, output recommendation information about M first resource container sets; The resource container set that is locked when determining the acquisition of the first resource; wherein, the M first resource container sets are the top M resource container sets with the smallest total resource share among the N resource container sets; the N resource container sets are obtained by comparing at least one Resource containers are combined to obtain; the total resource share corresponding to each resource container set in the N resource container sets is greater than or equal to the first parameter; M and N are both positive integers and N is greater than M.
Description
技术领域technical field
本发明涉及金融科技(Fintech)技术领域,尤其涉及一种信息推荐方法、装置及电子设备。The present invention relates to the technical field of financial technology (Fintech), and in particular, to an information recommendation method, device and electronic device.
背景技术Background technique
随着计算机技术的发展,越来越多的技术应用在金融领域,传统金融业正在逐步向金融科技转变,然而,由于金融行业的安全性、实时性要求,金融科技也对技术提出了更高的要求。金融科技领域下,在通过锁定一种资源换取另一种资源时,因锁定的资源过多,使得资源得不到充分利用,进而导致资源浪费。With the development of computer technology, more and more technologies are applied in the financial field, and the traditional financial industry is gradually transforming into financial technology. However, due to the security and real-time requirements of the financial industry, financial technology also puts forward higher technical requirements. requirements. In the field of financial technology, when one kind of resource is locked in exchange for another resource, too many locked resources make the resources not fully utilized, resulting in waste of resources.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明实施例期望提供一种信息推荐方法、装置及电子设备,以解决相关技术中因锁定的资源过多,资源得不到充分利用而导致资源浪费的技术问题。In view of this, the embodiments of the present invention are expected to provide an information recommendation method, apparatus, and electronic device to solve the technical problem of resource waste caused by too many locked resources and insufficient utilization of resources in the related art.
为达到上述目的,本发明的技术方案是这样实现的:In order to achieve the above object, the technical scheme of the present invention is achieved in this way:
本发明实施例提供一种信息推荐方法,包括:An embodiment of the present invention provides an information recommendation method, including:
基于请求获取的第一资源的资源份额以及设定的第一比值,确定所述第一资源对应的第一参数;所述第一参数表征获取所述第一资源时要求锁定的最小资源份额;Determine the first parameter corresponding to the first resource based on the resource share of the first resource requested to be obtained and the set first ratio; the first parameter represents the minimum resource share required to be locked when obtaining the first resource;
基于所述第一参数以及至少一个资源容器中每个资源容器对应的资源份额,输出关于M个第一资源容器集合的推荐信息;所述推荐信息用于确定获取所述第一资源时锁定的资源容器集合;其中,Based on the first parameter and the resource share corresponding to each resource container in the at least one resource container, output recommendation information about M first resource container sets; the recommendation information is used to determine the lock when acquiring the first resource. A collection of resource containers; where,
所述M个第一资源容器集合为N个资源容器集合中资源总份额最小的前M个资源容器集合;所述N个资源容器集合通过对所述至少一个资源容器进行组合得到;所述N个资源容器集合中的每个所述资源容器集合对应的资源总份额大于或等于所述第一参数;所述M和所述N均为正整数且所述N大于所述M。The M first resource container sets are the top M resource container sets with the smallest total resource share among the N resource container sets; the N resource container sets are obtained by combining the at least one resource container; the N resource container sets are obtained by combining the at least one resource container. The total resource share corresponding to each of the resource container sets in the resource container sets is greater than or equal to the first parameter; the M and the N are both positive integers, and the N is greater than the M.
上述方案中,所述基于所述第一参数以及至少一个资源容器中每个资源容器对应的资源份额,输出关于M个第一资源容器集合的推荐信息时,所述方法包括:In the above solution, when outputting recommendation information about M first resource container sets based on the first parameter and the resource share corresponding to each resource container in the at least one resource container, the method includes:
基于设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额,确定出M个第一资源容器集合;其中,M first resource container sets are determined based on the set threshold, the first parameter, and the resource share corresponding to each resource container in the at least one resource container; wherein,
所述设定阈值表征允许锁定的资源容器的最大数目;确定出的每个第一资源容器集合中的资源容器的总数小于或等于所述设定阈值。The set threshold represents the maximum number of resource containers allowed to be locked; the determined total number of resource containers in each first resource container set is less than or equal to the set threshold.
上述方案中,所述基于设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额,确定出M个第一资源容器集合时,所述方法包括:In the above solution, when the M first resource container sets are determined based on the set threshold, the first parameter, and the resource share corresponding to each resource container in the at least one resource container, the method includes:
在所述设定阈值为1的情况下,从资源份额大于或等于所述第一参数的资源容器中确定出N个资源容器集合;其中,确定出的每个资源容器集合包括一个资源容器。When the set threshold is 1, N resource container sets are determined from resource containers whose resource share is greater than or equal to the first parameter; wherein each determined resource container set includes one resource container.
上述方案中,所述基于设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额,确定出M个第一资源容器集合时,所述方法包括:In the above solution, when the M first resource container sets are determined based on the set threshold, the first parameter, and the resource share corresponding to each resource container in the at least one resource container, the method includes:
在所述设定阈值大于或等于2的情况下,按照资源份额从大到小的顺序,从资源份额小于所述第一参数的资源容器中,确定出第一数目的资源容器;其中,所述第一数目等于所述设定阈值;In the case where the set threshold is greater than or equal to 2, according to the order of resource shares from large to small, a first number of resource containers are determined from resource containers whose resource shares are smaller than the first parameter; the first number is equal to the set threshold;
在所述第一数目的资源容器对应的资源总份额大于或等于所述第一参数的情况下,基于所述设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额确定出M个第一资源容器集合;In the case that the total resource share corresponding to the first number of resource containers is greater than or equal to the first parameter, based on the set threshold, the first parameter, and each resource container in the at least one resource container The corresponding resource shares determine M first resource container sets;
在所述第一数目的资源容器对应的资源总份额小于所述第一参数,且未查找到资源份额大于或等于所述第一参数的资源容器情况下,输出提示信息;所述提示信息表征不存在第一资源容器集合;When the total resource share corresponding to the first number of resource containers is less than the first parameter, and no resource container with a resource share greater than or equal to the first parameter is found, output prompt information; the prompt information represents the first resource container set does not exist;
在所述第一数目的资源容器对应的资源总份额小于所述第一参数,且查找到资源份额大于或等于所述第一参数的资源容器情况下,基于从资源份额大于或等于所述第一参数的资源容器中确定出M个第一资源容器集合,确定出的每个第一资源容器集合中包括一个资源容器。In the case that the total resource share corresponding to the first number of resource containers is less than the first parameter, and a resource container whose resource share is greater than or equal to the first parameter is found, M first resource container sets are determined in the resource container of one parameter, and each determined first resource container set includes one resource container.
上述方案中,所述基于设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额,确定出M个第一资源容器集合,包括:In the above solution, the M first resource container sets are determined based on the set threshold, the first parameter and the resource share corresponding to each resource container in the at least one resource container, including:
在所述M为1的情况下,在所述至少一个资源容器中查找资源份额等于所述第一参数的第一资源容器;In the case where the M is 1, searching the at least one resource container for a first resource container whose resource share is equal to the first parameter;
在查找到所述第一资源容器的情况下,将所述第一资源容器确定为第一资源容器集合;In the case of finding the first resource container, determining the first resource container as a first resource container set;
在未查找到所述第一资源容器的情况下,基于设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额,确定出资源总份额最小的第一资源容器集合。In the case where the first resource container is not found, based on the set threshold, the first parameter, and the resource share corresponding to each resource container in the at least one resource container, determine the first resource with the smallest total share of resources A collection of resource containers.
上述方案中,所述基于设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额,确定出M个第一资源容器集合,包括:In the above solution, the M first resource container sets are determined based on the set threshold, the first parameter and the resource share corresponding to each resource container in the at least one resource container, including:
基于所述设定阈值和所述第一参数,对所述至少一个资源容器进行组合,得到所述N个资源容器集合;其中,每个资源容器集合中的资源容器的总数小于或等于所述设定阈值;Based on the set threshold and the first parameter, the at least one resource container is combined to obtain the N resource container sets; wherein, the total number of resource containers in each resource container set is less than or equal to the set threshold;
按照资源总份额从小到大的顺序,从所述N个资源容器集合中确定出M个第一资源容器集合。M first resource container sets are determined from the N resource container sets in an ascending order of the total resource share.
所述基于所述设定阈值和所述第一参数,对所述至少一个资源容器进行组合,得到所述N个资源容器集合,包括:The at least one resource container is combined based on the set threshold and the first parameter to obtain the N resource container sets, including:
从资源份额大于或等于所述第一参数的第二资源容器中,确定出资源容器集合;确定出的每个资源容器集合中包括一个第二资源容器;Determine a resource container set from the second resource container whose resource share is greater than or equal to the first parameter; each determined resource container set includes a second resource container;
基于所述设定阈值和所述第一参数,对资源份额小于所述第一参数的第三资源容器进行组合,得到资源总份额大于或等于所述第一参数的资源容器集合。Based on the set threshold and the first parameter, a third resource container with a resource share smaller than the first parameter is combined to obtain a resource container set with a total resource share greater than or equal to the first parameter.
上述方案中,所述从资源份额大于或等于所述第一参数的第二资源容器中,确定出资源容器集合,包括:In the above solution, determining the resource container set from the second resource container whose resource share is greater than or equal to the first parameter includes:
在所述M为1的情况下,从资源份额大于或等于所述第一参数的第二资源容器中,确定出资源份额最小的第二资源容器,得到一个资源容器集合。When the M is 1, a second resource container with the smallest resource share is determined from the second resource containers whose resource share is greater than or equal to the first parameter, and a set of resource containers is obtained.
上述方案中,所述基于所述设定阈值和所述第一参数,对资源份额小于所述第一参数的第三资源容器进行组合,得到资源总份额大于或等于所述第一参数的资源容器集合时,所述方法包括:In the above solution, based on the set threshold and the first parameter, a third resource container with a resource share smaller than the first parameter is combined to obtain a resource with a total resource share greater than or equal to the first parameter. When the container is set, the method includes:
确定出资源容器集合的第一元素;所述第一元素为资源份额最大的一个所述第三资源容器;Determine the first element of the resource container set; the first element is the third resource container with the largest resource share;
基于所述设定阈值和第一差值,对除所述第一元素之外的第三资源容器进行组合,得到资源容器集合的第二元素;其中,Based on the set threshold and the first difference, combine the third resource containers except the first element to obtain the second element of the resource container set; wherein,
所述第一差值表征所述第一参数和所述第一元素对应的资源份额的差值;The first difference represents the difference between the first parameter and the resource share corresponding to the first element;
所述第二元素中包括至少一个所述第三资源容器;所述第二元素中的第三资源容器的总数小于或等于,第一设定阈值与1之间的差值。The second element includes at least one of the third resource containers; the total number of third resource containers in the second element is less than or equal to the difference between the first set threshold and 1.
本发明实施例还提供了一种信息推荐装置,包括:The embodiment of the present invention also provides an information recommendation device, including:
确定单元,用于基于请求获取的第一资源的资源份额以及设定的第一比值,确定所述第一资源对应的第一参数;所述第一参数表征获取所述第一资源时要求锁定的最小资源份额;a determining unit, configured to determine a first parameter corresponding to the first resource based on the resource share of the first resource requested to be acquired and the set first ratio; the first parameter indicates that locking is required when acquiring the first resource the minimum share of resources;
推荐单元,用于基于所述第一参数以及至少一个资源容器中每个资源容器对应的资源份额,输出关于M个第一资源容器集合的推荐信息;所述推荐信息用于确定获取所述第一资源时锁定的资源容器集合;其中,A recommendation unit, configured to output recommendation information about M first resource container sets based on the first parameter and the resource share corresponding to each resource container in the at least one resource container; the recommendation information is used to determine the acquisition of the first resource container. A collection of resource containers locked at resource time; where,
所述M个第一资源容器集合为N个资源容器集合中资源总份额最小的前M个资源容器集合;所述N个资源容器集合通过对所述至少一个资源容器进行组合得到;所述N个资源容器集合中的每个所述资源容器集合对应的资源总份额大于或等于所述第一参数;所述M和所述N均为正整数且所述N大于所述M。The M first resource container sets are the top M resource container sets with the smallest total resource share among the N resource container sets; the N resource container sets are obtained by combining the at least one resource container; the N resource container sets are obtained by combining the at least one resource container. The total resource share corresponding to each of the resource container sets in the resource container sets is greater than or equal to the first parameter; the M and the N are both positive integers, and the N is greater than the M.
本发明实施例还提供了一种电子设备,包括:处理器和用于存储能够在处理器上运行的计算机程序的存储器,An embodiment of the present invention also provides an electronic device, including: a processor and a memory for storing a computer program that can be executed on the processor,
其中,所述处理器用于运行所述计算机程序时,执行上述任一种信息推荐方法的步骤。Wherein, the processor is configured to execute the steps of any one of the above information recommendation methods when running the computer program.
本发明实施例还提供了一种存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一种信息推荐方法的步骤。An embodiment of the present invention further provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of any one of the above information recommendation methods.
本发明实施例,基于请求获取的第一资源的资源份额以及设定的第一比值,确定出获取第一资源时要求锁定的最小资源份额;基于该最小资源份额和至少一个资源容器中每个资源容器对应的资源份额,输出关于M个第一资源容器集合的推荐信息,以供用户根据推荐信息确定获取第一资源时锁定的资源容器集合。由于M个第一资源容器集合为N个资源容器集合中资源总份额最小的前M个资源容器集合,N个资源容器集合中的每个资源容器集合对应的资源总份额大于或等于计算出的最小资源份额,因此,用户可以根据电子设备输出的推荐信息,将M个第一资源容器集合中资源总份额最小的第一资源容器集合,确定为获取第一资源时锁定的资源容器集合,可以提高资源利用率,从而避免锁定过多的资源容器,使得资源容器中的资源无法得到充分利用而导致资源浪费。In this embodiment of the present invention, based on the resource share of the first resource requested to be acquired and the set first ratio, the minimum resource share required to be locked when acquiring the first resource is determined; based on the minimum resource share and each of the at least one resource container The resource share corresponding to the resource container, and output recommendation information about the M first resource container sets, so that the user can determine the resource container set locked when acquiring the first resource according to the recommendation information. Since the M first resource container sets are the top M resource container sets with the smallest total resource share among the N resource container sets, the total resource share corresponding to each resource container set in the N resource container sets is greater than or equal to the calculated Minimum resource share, therefore, the user can determine, according to the recommendation information output by the electronic device, the first resource container set with the smallest total resource share among the M first resource container sets as the resource container set locked when acquiring the first resource. Improve resource utilization, so as to avoid locking too many resource containers, so that the resources in the resource containers cannot be fully utilized and resources are wasted.
附图说明Description of drawings
图1为本发明实施例提供的信息推荐方法的实现流程示意图;FIG. 1 is a schematic flowchart of an implementation of an information recommendation method provided by an embodiment of the present invention;
图2为本发明实施例提供的信息推荐方法中确定M个第一资源容器集合的实现流程示意图;2 is a schematic flowchart of an implementation of determining M first resource container sets in an information recommendation method provided by an embodiment of the present invention;
图3为本发明另一实施例提供的信息推荐方法中确定M个第一资源容器集合的实现流程示意图;3 is a schematic flowchart of an implementation of determining M first resource container sets in an information recommendation method provided by another embodiment of the present invention;
图4为本发明再一实施例提供的信息推荐方法中确定M个第一资源容器集合的实现流程示意图;4 is a schematic flowchart of an implementation of determining M first resource container sets in an information recommendation method provided by still another embodiment of the present invention;
图5为本发明实施例提供的信息推荐方法中确定N个资源容器集合的实现流程示意图;5 is a schematic flowchart of an implementation of determining N resource container sets in an information recommendation method provided by an embodiment of the present invention;
图6为本发明另一实施例提供的信息推荐方法中确定N个资源容器集合的实现流程示意图;6 is a schematic flowchart of an implementation of determining N resource container sets in an information recommendation method provided by another embodiment of the present invention;
图7为本发明应用实施例提供的信息推荐方法的实现流程示意图;FIG. 7 is a schematic flowchart of an implementation of an information recommendation method provided by an application embodiment of the present invention;
图8为本发明实施例提供的信息推荐装置的结构示意图;8 is a schematic structural diagram of an information recommendation apparatus provided by an embodiment of the present invention;
图9为本发明实施例提供的电子设备的硬件组成结构示意图。FIG. 9 is a schematic structural diagram of a hardware composition of an electronic device according to an embodiment of the present invention.
具体实施方式Detailed ways
相关技术中,在通过锁定一种资源换取另一种资源的场景下,通常要求被锁定的资源的资源总份额大于或等于最小资源份额。其中,最小资源份额为正整数,且最小资源份额大于或等于,请求获取的资源的资源份额与设定比值之间的商。然而,在实际操作中,被锁定的资源的资源总份额通常远大于最小资源份额,由于被锁定的资源无法进行流转,从而使得超出最小资源份额的资源得不到充分利用,进而导致资源浪费。In the related art, in a scenario where one resource is locked in exchange for another resource, the total resource share of the locked resources is generally required to be greater than or equal to the minimum resource share. The minimum resource share is a positive integer, and the minimum resource share is greater than or equal to the quotient between the resource share of the requested resource and the set ratio. However, in practice, the total resource share of the locked resources is usually much larger than the minimum resource share. Since the locked resources cannot be transferred, the resources exceeding the minimum resource share cannot be fully utilized, resulting in waste of resources.
本发明实施例中,提供了一种信息推荐方法,可以基于请求获取的第一资源的资源份额以及设定的第一比值,确定出获取第一资源时要求锁定的最小资源份额;基于该最小资源份额和至少一个资源容器中每个资源容器对应的资源份额,输出关于M个第一资源容器集合的推荐信息,以供用户根据推荐信息确定获取第一资源时锁定的资源容器集合。由于M个第一资源容器集合为N个资源容器集合中资源总份额最小的前M个资源容器集合,N个资源容器集合中的每个资源容器集合对应的资源总份额大于或等于计算出的最小资源份额,因此,用户可以根据电子设备输出的推荐信息,将M个第一资源容器集合中资源总份额最小的第一资源容器集合,确定为获取第一资源时锁定的资源容器集合,可以提高资源利用率,从而避免锁定过多的资源容器,使得资源容器中的资源无法得到充分利用而导致资源浪费。In the embodiment of the present invention, an information recommendation method is provided, which can determine the minimum resource share required to be locked when obtaining the first resource based on the resource share of the first resource requested to be obtained and the set first ratio; The resource share and the resource share corresponding to each resource container in the at least one resource container, output recommendation information about the M first resource container sets, for the user to determine the resource container set locked when acquiring the first resource according to the recommendation information. Since the M first resource container sets are the top M resource container sets with the smallest total resource share among the N resource container sets, the total resource share corresponding to each resource container set in the N resource container sets is greater than or equal to the calculated Minimum resource share, therefore, the user can determine, according to the recommendation information output by the electronic device, the first resource container set with the smallest total resource share among the M first resource container sets as the resource container set locked when acquiring the first resource. Improve resource utilization, so as to avoid locking too many resource containers, so that the resources in the resource containers cannot be fully utilized and resources are wasted.
以下结合说明书附图及具体实施例对本发明的技术方案做进一步的详细阐述。The technical solutions of the present invention will be further elaborated below with reference to the accompanying drawings and specific embodiments of the description.
图1示出了本发明实施例提供的信息推荐方法的实现流程示意图。在本发明实施例中,信息推荐方法的执行主体为电子设备,电子设备包括终端、服务器等,终端包括手机、平板电脑等终端。FIG. 1 shows a schematic diagram of an implementation flow of an information recommendation method provided by an embodiment of the present invention. In the embodiment of the present invention, the execution body of the information recommendation method is an electronic device, the electronic device includes a terminal, a server, etc., and the terminal includes a terminal such as a mobile phone and a tablet computer.
参照图1,本申请实施例提供的信息推荐方法包括:Referring to FIG. 1 , the information recommendation method provided by the embodiment of the present application includes:
S101:基于请求获取的第一资源的资源份额以及设定的第一比值,确定所述第一资源对应的第一参数;所述第一参数表征获取所述第一资源时要求锁定的最小资源份额。S101: Determine a first parameter corresponding to the first resource based on the resource share of the first resource requested to be acquired and the set first ratio; the first parameter represents the minimum resource that requires locking when acquiring the first resource share.
这里,电子设备计算请求获取的第一资源的资源份额与设定的第一比值之间的商,基于计算出的商确定出第一参数。其中,当计算出的商为小数时,将大于计算出的商的最小正整数确定为第一资源对应的第一参数;当计算出的商为整数时,将该商确定为第一资源对应的第一参数。Here, the electronic device calculates the quotient between the resource share of the requested first resource and the set first ratio, and determines the first parameter based on the calculated quotient. Wherein, when the calculated quotient is a decimal, the smallest positive integer greater than the calculated quotient is determined as the first parameter corresponding to the first resource; when the calculated quotient is an integer, the quotient is determined as the first parameter corresponding to the first resource the first parameter of .
设定的第一比值是在通过锁定至少一个资源容器换取第一资源的场景下对应的比值。The set first ratio is a corresponding ratio in a scenario where the first resource is exchanged by locking at least one resource container.
S102:基于所述第一参数以及至少一个资源容器中每个资源容器对应的资源份额,输出关于M个第一资源容器集合的推荐信息;所述推荐信息用于确定获取所述第一资源时锁定的资源容器集合;其中,S102: Based on the first parameter and the resource share corresponding to each resource container in the at least one resource container, output recommendation information about M first resource container sets; the recommendation information is used to determine when acquiring the first resource A collection of locked resource containers; where,
所述M个第一资源容器集合为N个资源容器集合中资源总份额最小的前M个资源容器集合;所述N个资源容器集合通过对所述至少一个资源容器进行组合得到;所述N个资源容器集合中的每个所述资源容器集合对应的资源总份额大于或等于所述第一参数;所述M和所述N均为正整数且所述N大于所述M。The M first resource container sets are the top M resource container sets with the smallest total resource share among the N resource container sets; the N resource container sets are obtained by combining the at least one resource container; the N resource container sets are obtained by combining the at least one resource container. The total resource share corresponding to each of the resource container sets in the resource container sets is greater than or equal to the first parameter; the M and the N are both positive integers, and the N is greater than the M.
N表征资源总份额大于或等于所述第一参数的资源容器集合的总数。N indicates that the total resource share is greater than or equal to the total number of resource container sets of the first parameter.
这里,电子设备可以基于请求获取第一资源的用户的唯一身份标识,获取与用户的唯一身份标识关联的至少一个第一资源容器,其中,唯一身份标识可以为身份证号码。Here, the electronic device may acquire at least one first resource container associated with the unique identifier of the user based on the unique identifier of the user who requests to acquire the first resource, where the unique identifier may be an ID card number.
在获取到至少一个第一资源容器的情况下,电子设备可以基于第一参数,对获取到的所有第一资源容器进行组合,得到N个资源总份额大于或等于第一参数的资源容器集合。这里,每个组合结果对应的资源容器集合对应的资源总份额大于或等于第一参数。In the case of acquiring at least one first resource container, the electronic device may combine all the acquired first resource containers based on the first parameter to obtain N resource container sets whose total resource share is greater than or equal to the first parameter. Here, the total resource share corresponding to the resource container set corresponding to each combination result is greater than or equal to the first parameter.
在获取到至少一个第一资源容器的情况下,电子设备也可以对获取到的所有第一资源容器进行组合,得到至少一个组合结果;基于每个第一资源容器的资源份额,计算每个组合结果对应的资源总份额;基于第一参数和每个组合结果对应的资源总份额,从所有组合结果中确定出N个资源总份额大于或等于第一参数的组合结果,得到N个资源容器集合。In the case of acquiring at least one first resource container, the electronic device may also combine all the acquired first resource containers to obtain at least one combination result; based on the resource share of each first resource container, calculate each combination The total share of resources corresponding to the result; based on the first parameter and the total share of resources corresponding to each combination result, determine from all combination results N combination results whose total share of resources is greater than or equal to the first parameter, and obtain N resource container sets .
电子设备在确定出N个资源容器集合的情况下,按照资源总份额从小到大的顺序,从N个资源容器集合中选出M个资源总份额最小的第一资源容器集合。其中,当M为1时,第一资源容器集合为N个资源容器集合中资源总份额最小的资源容器集合。当M大于或等于2时,可以按照资源总份额从小到大的顺序对N个资源容器集合进行排序,从排序后的N个资源容器集合中选出前M个资源容器集合,得到M个第一资源容器集合。当然,电子设备也可以按照资源总份额从大到小的顺序对N个资源容器集合进行排序,从排序后的N个资源容器集合中,依次选出M个资源总份额最小的资源容器集合。In the case of determining N resource container sets, the electronic device selects M first resource container sets with the smallest total resource share from the N resource container sets in order of increasing total resource share. Wherein, when M is 1, the first resource container set is the resource container set with the smallest total resource share among the N resource container sets. When M is greater than or equal to 2, the N resource container sets can be sorted in ascending order of the total resource share, and the first M resource container sets are selected from the sorted N resource container sets to obtain the M-th resource container sets. A collection of resource containers. Of course, the electronic device may also sort the N resource container sets in descending order of the total resource share, and select the M resource container sets with the smallest total resource share in turn from the sorted N resource container sets.
需要说明的是,资源容器集合中可以包括一个资源容器,资源容器集合中也可以包括至少两个资源容器。当资源容器集合中包括一个资源容器时,表征该资源容器的资源份额大于或等于第一参数。当资源容器集合中包括至少两个资源容器时,一个资源容器的资源份额可以大于或等于第一参数,也可以小于第一参数,只要资源容器集合中的所有资源容器的资源总份额大于或等于第一参数即可。It should be noted that the resource container set may include one resource container, and the resource container set may also include at least two resource containers. When the resource container set includes one resource container, the resource share representing the resource container is greater than or equal to the first parameter. When the resource container set includes at least two resource containers, the resource share of one resource container may be greater than or equal to the first parameter, or may be less than the first parameter, as long as the total resource share of all resource containers in the resource container set is greater than or equal to The first parameter is sufficient.
电子设备在确定出M个第一资源容器集合的情况下,输出关于M个第一资源容器集合的推荐信息,以供用户基于该推荐信息确定出获取第一资源时锁定的资源容器集合。In the case of determining the M first resource container sets, the electronic device outputs recommendation information about the M first resource container sets, so that the user can determine the resource container set locked when acquiring the first resource based on the recommendation information.
需要说明的是,在质押贷款的场景下,第一资源的资源份额对应于贷款金额,设定的第一比值对应于质押率,,第一参数对应于获取贷款时要求冻结或抵押的物品的最低金额。该物品可以是实体物品,也可以是虚拟产品。在实际应用中,该物品可以是不动产的凭证(例如,房产证)、定期存单、已购买的理财产品的证明凭证等。第一资源容器对应于上述物品。当第一资源容器为定期存单时,第一资源容器的资源份额对应为定期存单的金额。当第一资源容器为房产证时,第一资源容器的资源份额对应为房产的总额。It should be noted that, in the scenario of a pledge loan, the resource share of the first resource corresponds to the loan amount, the set first ratio corresponds to the pledge rate, and the first parameter corresponds to the amount of the item that needs to be frozen or pledged when obtaining the loan. Minimum amount. The item can be a physical item or a virtual product. In practical applications, the item may be a certificate of real estate (for example, a real estate certificate), a time deposit certificate, a certificate of a purchased wealth management product, and the like. The first resource container corresponds to the above-mentioned item. When the first resource container is a time deposit certificate, the resource share of the first resource container corresponds to the amount of the time deposit certificate. When the first resource container is a real estate certificate, the resource share of the first resource container corresponds to the total amount of the real estate.
例如,在用户需要贷款8000元,质押率为0.8,用户具有金额分别为20000元、9000元、6000元、5000元和800元的五笔存单的情况下,电子设备计算8000与0.8的商,得到10000。电子设备获取8000元贷款时要求冻结的最小质押金额为10000元。电子设备基于确定出的最小质押金额,对用户的五笔存单金额组合,得到19个总额大于或等于10000元的存单集合。这19份存单集合分别为:{20000元}、{20000元,9000元}、{20000元,6000元}、{20000元,5000元}、{20000元,800元}、{20000元,9000元,6000元}、{20000元,9000元,5000元}、{20000元,9000元,800元}、{20000元,6000元,5000元}、{20000元,6000元,800元}、{20000元,5000元,800元}、{20000元,9000元,6000元,5000元,800元}、{9000元,6000元}、{9000元,5000元}、{9000元,6000元,5000元}、{9000元,6000元,800元}、{9000元,6000元,5000元,800元}、{6000元,5000元}、{6000元,5000元,800元}。For example, if the user needs a loan of 8,000 yuan, the pledge rate is 0.8, and the user has five certificates of deposit of 20,000 yuan, 9,000 yuan, 6,000 yuan, 5,000 yuan, and 800 yuan, the electronic device calculates the quotient of 8,000 and 0.8, and obtains 10000. When an electronic device obtains a loan of 8,000 yuan, the minimum pledge amount required to be frozen is 10,000 yuan. Based on the determined minimum pledge amount, the electronic device combines the user's five deposit certificates to obtain 19 deposit certificate sets with a total amount greater than or equal to 10,000 yuan. The 19 sets of certificates of deposit are: {20,000 yuan}, {20,000 yuan, 9,000 yuan}, {20,000 yuan, 6,000 yuan}, {20,000 yuan, 5,000 yuan}, {20,000 yuan, 800 yuan}, {20,000 yuan, 9,000 yuan yuan, 6000 yuan}, {20000 yuan, 9000 yuan, 5000 yuan}, {20000 yuan, 9000 yuan, 800 yuan}, {20000 yuan, 6000 yuan, 5000 yuan}, {20000 yuan, 6000 yuan, 800 yuan}, {20000 yuan, 5000 yuan, 800 yuan}, {20000 yuan, 9000 yuan, 6000 yuan, 5000 yuan, 800 yuan}, {9000 yuan, 6000 yuan}, {9000 yuan, 5000 yuan}, {9000 yuan, 6000 yuan , 5000 yuan}, {9000 yuan, 6000 yuan, 800 yuan}, {9000 yuan, 6000 yuan, 5000 yuan, 800 yuan}, {6000 yuan, 5000 yuan}, {6000 yuan, 5000 yuan, 800 yuan}.
当电子设备从总额大于或等于10000元的19存单集合中选出的3个第一存单集合时,3个第一存单集合:{6000元,5000元}、{6000元,5000元,800元}、{9000元,5000元}。When the electronic device selects 3 first deposit receipt sets from 19 deposit receipt sets whose total amount is greater than or equal to 10000 yuan, the 3 first deposit receipt sets: {6000 yuan, 5000 yuan}, {6000 yuan, 5000 yuan, 800 yuan }, {9000 yuan, 5000 yuan}.
本实施例提供的方案中,基于请求获取的第一资源的资源份额以及设定的第一比值,确定出第一参数;基于第一参数和至少一个资源容器中每个资源容器对应的资源份额,输出关于M个第一资源容器集合的推荐信息,以供用户根据推荐信息确定获取第一资源时锁定的资源容器集合。由于M个第一资源容器集合为N个资源容器集合中资源总份额最小的前M个资源容器集合,N个资源容器集合中的每个资源容器集合对应的资源总份额大于或等于计算出的最小资源份额,因此,用户可以根据电子设备输出的推荐信息,将M个第一资源容器集合中资源总份额最小的第一资源容器集合,确定为获取第一资源时锁定的资源容器集合,可以提高资源利用率,从而避免锁定过多的资源容器,使得资源容器中的资源无法得到充分利用而导致资源浪费。In the solution provided by this embodiment, the first parameter is determined based on the resource share of the first resource obtained by the request and the set first ratio; based on the first parameter and the resource share corresponding to each resource container in the at least one resource container , and output recommendation information about the M first resource container sets, so that the user can determine the resource container set locked when acquiring the first resource according to the recommendation information. Since the M first resource container sets are the top M resource container sets with the smallest total resource share among the N resource container sets, the total resource share corresponding to each resource container set in the N resource container sets is greater than or equal to the calculated Minimum resource share, therefore, the user can determine, according to the recommendation information output by the electronic device, the first resource container set with the smallest total resource share among the M first resource container sets as the resource container set locked when acquiring the first resource. Improve resource utilization, so as to avoid locking too many resource containers, so that the resources in the resource containers cannot be fully utilized and resources are wasted.
作为本发明的另一实施例,在获取到设定阈值的情况下,所述基于所述第一参数以及至少一个资源容器中每个资源容器对应的资源份额,输出关于M个第一资源容器集合的推荐信息时,所述方法包括:As another embodiment of the present invention, when the set threshold is obtained, outputting information about the M first resource containers based on the first parameter and the resource share corresponding to each resource container in the at least one resource container When collecting recommended information, the method includes:
基于设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额,确定出M个第一资源容器集合;其中,M first resource container sets are determined based on the set threshold, the first parameter, and the resource share corresponding to each resource container in the at least one resource container; wherein,
所述设定阈值表征允许锁定的资源容器的最大数目;确定出的每个第一资源容器集合中的资源容器的总数小于或等于所述设定阈值。The set threshold represents the maximum number of resource containers allowed to be locked; the determined total number of resource containers in each first resource container set is less than or equal to the set threshold.
这里,电子设备在设置了通过锁定至少一个资源容器获取第一资源的应用场景下对应的设定阈值的情况下,基于设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额,确定出M个第一资源容器集合。设定阈值表征允许锁定的资源容器的最大数目,设定阈值为整数。本实施例与上一实施例S102的区别在于,确定出的M个第一资源容器集合中每个第一资源容器集合中包含的资源容器的总数小于或等于设定阈值。也就是说,电子设备可以在S102中确定出资源总份额大于或等于第一参数的N个资源容器集合的基础上,基于设定阈值,从N个资源容器集合中,筛选出资源容器的总数小于或等于设定阈值的资源容器集合,从筛选出的资源容器集合中,确定出资源总份额最小的前M个资源容器集合。Here, in the case where the electronic device sets the corresponding set threshold in the application scenario in which the first resource is acquired by locking at least one resource container, the electronic device is based on the set threshold, the first parameter, and each of the at least one resource container. The resource shares corresponding to the resource containers are determined, and M first resource container sets are determined. The set threshold represents the maximum number of resource containers allowed to be locked, and the set threshold is an integer. The difference between this embodiment and the previous embodiment S102 is that the total number of resource containers included in each of the determined M first resource container sets is less than or equal to the set threshold. That is, the electronic device may, on the basis of determining in S102 that the total resource share is greater than or equal to the N resource container sets of the first parameter, and based on the set threshold, from the N resource container sets, screen out the total number of resource containers. For resource container sets less than or equal to the set threshold, from the filtered resource container sets, determine the top M resource container sets with the smallest total resource share.
需要说明的是,资源总份额大于或等于第一参数的N个资源容器集合中包含的资源容器的总数,可以小于或等于设定阈值,也可以大于设定阈值。It should be noted that the total resource share is greater than or equal to the total number of resource containers included in the N resource container sets of the first parameter, and may be less than or equal to the set threshold, or may be greater than the set threshold.
例如,在质押贷款的场景下,当设定阈值为2时,表征总额大于或等于最小质押金额的存单集合中包含的存单的总数小于或等于2,在最小质押金额为1000元,电子设备从总额大于或等于10000元的19存单集合的情况下,电子设备从19份存单集合中选出的2个第一存单组合,分别为:{6000元,5000元}、{9000元,5000元}。For example, in the mortgage loan scenario, when the threshold is set to 2, the total number of certificates of deposit included in the set of certificates of deposit whose total amount is greater than or equal to the minimum pledge amount is less than or equal to 2. When the minimum pledge amount is 1,000 yuan, the electronic device will In the case of 19 deposit receipt sets with a total amount greater than or equal to 10,000 yuan, the electronic device selects 2 first deposit receipt combinations from the 19 deposit receipt sets, respectively: {6000 yuan, 5000 yuan}, {9000 yuan, 5000 yuan} .
在一实施例中,所述基于设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额,确定出M个第一资源容器集合时,所述方法包括:In an embodiment, when the M first resource container sets are determined based on the set threshold, the first parameter, and the resource share corresponding to each resource container in the at least one resource container, the method includes: :
在所述设定阈值为1的情况下,从资源份额大于或等于所述第一参数的资源容器中确定出N个资源容器集合;其中,确定出的每个资源容器集合包括一个资源容器。When the set threshold is 1, N resource container sets are determined from resource containers whose resource share is greater than or equal to the first parameter; wherein each determined resource container set includes one resource container.
这里,由于当设定阈值为1时,第一资源容器集合中包含的资源容器只有一个,因此,为了减少电子设备的计算量,电子设备基于第一参数,从获取到的所有资源容器中,筛选出N个资源份额大于或等于第一参数的资源容器,得到N个资源容器集合,从而按照资源份额从小到大的顺序,依次从N个资源容器集合中确定出M个第一资源容器集合。其中,N个资源容器集合中的每个资源容器集合包括一个资源容器。Here, when the threshold is set to 1, there is only one resource container included in the first resource container set. Therefore, in order to reduce the calculation amount of the electronic device, the electronic device, based on the first parameter, from all the acquired resource containers, Filter out N resource containers whose resource shares are greater than or equal to the first parameter, and obtain N resource container sets, so as to sequentially determine M first resource container sets from the N resource container sets in the order of the resource shares from small to large . Wherein, each resource container set in the N resource container sets includes one resource container.
本实施例提供的方案中,在所述设定阈值为1的情况下,从资源份额大于或等于所述第一参数的资源容器中确定出N个资源容器集合,电子设备不需要对所有的资源容器集合进行组合,可以减小电子设备的计算量,提高电子设备的数据处理效率,还可以减少电子设备的功耗。In the solution provided by this embodiment, when the set threshold is 1, N resource container sets are determined from resource containers whose resource share is greater than or equal to the first parameter, and the electronic device does not need to check all resource containers. Combining the resource container sets can reduce the calculation amount of the electronic device, improve the data processing efficiency of the electronic device, and also reduce the power consumption of the electronic device.
作为本发明的另一实施例,图2示出了本发明实施例提供的信息推荐方法中确定M个第一资源容器集合的实现流程示意图。参照图2,在一实施例中,所述基于设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额,确定出M个第一资源容器集合时,所述方法包括:As another embodiment of the present invention, FIG. 2 shows a schematic flowchart of an implementation of determining M first resource container sets in the information recommendation method provided by the embodiment of the present invention. Referring to FIG. 2, in an embodiment, when the M first resource container sets are determined based on the set threshold, the first parameter, and the resource share corresponding to each resource container in the at least one resource container, The method includes:
S201:在所述设定阈值大于或等于2的情况下,按照资源份额从大到小的顺序,从资源份额小于所述第一参数的资源容器中,确定出第一数目的资源容器;其中,所述第一数目等于所述设定阈值。S201: In the case that the set threshold is greater than or equal to 2, according to the order of resource shares from large to small, from resource containers with resource shares smaller than the first parameter, determine a first number of resource containers; wherein , the first number is equal to the set threshold.
这里,电子设备从获取到的所有第一资源容器中,确定出资源份额小于第一参数的资源容器,按照资源份额从大到小的顺序,从资源份额小于第一参数的资源容器中,依次确定出第一数目的资源容器。Here, the electronic device determines, from all the acquired first resource containers, the resource containers whose resource share is smaller than the first parameter, and in the order of the resource share from the largest to the smallest, from the resource containers whose resource share is smaller than the first parameter, in order A first number of resource containers is determined.
在确定出第一数目的资源容器的情况下,计算第一数目的资源容器对应的资源总份额,并将第一数目的资源容器对应的资源总份额与第一参数进行比较,得到比较结果。When the first number of resource containers is determined, the total resource shares corresponding to the first number of resource containers are calculated, and the total resource shares corresponding to the first number of resource containers are compared with the first parameter to obtain a comparison result.
当比较结果表征第一数目的资源容器对应的资源总份额大于或等于第一参数时,表征可以从资源份额小于第一参数的所有资源容器中,确定出资源总份额大于或等于第一参数的资源容器集合,此时执行S202。When the comparison result indicates that the total resource share corresponding to the first number of resource containers is greater than or equal to the first parameter, it indicates that the resource total share greater than or equal to the first parameter can be determined from all resource containers whose resource share is less than the first parameter. The resource container collection is performed, at this time, S202 is performed.
当比较结果表征第一数目的资源容器对应的资源总份额小于第一参数时,表征无法从资源份额小于第一参数的所有资源容器中,确定出资源总份额大于或等于第一参数的资源容器集合,此时,电子设备从获取到的资源容器中查找资源份额大于或等于第一参数的资源容器,当未查找到资源份额大于或等于第一参数的资源容器时,表征从获取到的所有资源容器中,无法得到资源总份额大于或等于第一参数的资源容器集合,执行S203;当查找到资源份额大于或等于第一参数的资源容器时,表征可以从获取到的所有资源容器中,得到资源总份额大于或等于第一参数的资源容器集合,执行S204。When the comparison result indicates that the total resource share corresponding to the first number of resource containers is less than the first parameter, it means that the resource container whose total resource share is greater than or equal to the first parameter cannot be determined from all resource containers whose resource share is less than the first parameter. Set, at this time, the electronic device searches the obtained resource containers for a resource container whose resource share is greater than or equal to the first parameter. When no resource container with a resource share greater than or equal to the first parameter is found, it represents all the obtained Among the resource containers, a set of resource containers whose total resource share is greater than or equal to the first parameter cannot be obtained, and S203 is executed; when a resource container whose resource share is greater than or equal to the first parameter is found, it indicates that it can be obtained from all the resource containers obtained, Obtain a resource container set whose total resource share is greater than or equal to the first parameter, and execute S204.
S202:在所述第一数目的资源容器对应的资源总份额大于或等于所述第一参数的情况下,基于所述设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额确定出M个第一资源容器集合。S202: In the case that the total resource share corresponding to the first number of resource containers is greater than or equal to the first parameter, based on the set threshold, the first parameter, and each of the at least one resource container The resource shares corresponding to the resource containers determine the M first resource container sets.
这里,电子设备确定M个第一资源容器集合的实现方式请参照上述实施例中的相关描述,此处不赘述。确定出的第一资源容器集合中可以只包括一个资源份额大于或等于第一参数的资源容器;第一资源容器集合中也可以包括至少两个资源份额小于第一参数的资源容器。Here, for the implementation manner of the electronic device determining the M first resource container sets, please refer to the relevant descriptions in the foregoing embodiments, and details are not described here. The determined first resource container set may include only one resource container whose resource share is greater than or equal to the first parameter; the first resource container set may also include at least two resource containers whose resource share is smaller than the first parameter.
S203:在所述第一数目的资源容器对应的资源总份额小于所述第一参数,且未查找到资源份额大于或等于所述第一参数的资源容器情况下,输出提示信息;所述提示信息表征不存在第一资源容器集合。S203: When the total resource share corresponding to the first number of resource containers is less than the first parameter, and no resource container with a resource share greater than or equal to the first parameter is found, output prompt information; the prompt The information indicates that the first set of resource containers does not exist.
由于在第一数目的资源容器对应的资源总份额小于第一参数,且未查找到资源份额大于或等于第一参数的资源容器情况下,表征电子设备无法从获取到的所有资源容器中确定出资源总份额大于或等于第一参数的资源容器集合,也就无法得到第一资源容器集合,因此,输出提示信息。Since the total resource share corresponding to the first number of resource containers is less than the first parameter, and no resource container with a resource share greater than or equal to the first parameter is found, it means that the electronic device cannot determine from all the obtained resource containers. If the total resource share is greater than or equal to the resource container set of the first parameter, the first resource container set cannot be obtained. Therefore, a prompt message is output.
S204:在所述第一数目的资源容器对应的资源总份额小于所述第一参数,且查找到资源份额大于或等于所述第一参数的资源容器情况下,从资源份额大于或等于所述第一参数的资源容器中确定出M个第一资源容器集合;确定出的每个第一资源容器集合中包括一个资源容器。S204: In the case that the total resource share corresponding to the first number of resource containers is less than the first parameter, and a resource container whose resource share is greater than or equal to the first parameter is found, select the resource share greater than or equal to the first parameter M first resource container sets are determined in the resource containers of the first parameter; each determined first resource container set includes one resource container.
这里,在第一数目的资源容器对应的资源总份额小于第一参数,且查找到资源份额大于或等于第一参数的资源容器情况下,表征电子设备可以从获取到的资源容器中,确定出资源总份额大于或等于第一参数的资源容器集合。Here, when the total resource share corresponding to the first number of resource containers is less than the first parameter, and a resource container with a resource share greater than or equal to the first parameter is found, it means that the electronic device can determine from the obtained resource containers A set of resource containers whose total resource share is greater than or equal to the first parameter.
电子设备可以从资源份额大于第一参数的资源容器,确定出M个第一资源容器集合,每个第一资源容器集合中包括一个资源份额大于第一参数的资源容器。The electronic device may determine M first resource container sets from resource containers with a resource share greater than the first parameter, and each first resource container set includes a resource container with a resource share greater than the first parameter.
本实施例提供的方案中,通过将第一数目的资源容器对应的资源总份额与第一参数进行比较结果,可以根据比较结果确定出当前是否可以确定出资源总份额大于或等于第一参数的资源容器集合,可以避免在对获取到的资源容器进行组合后无法得到资源总份额大于或等于第一参数的资源容器集合的情况出现。In the solution provided by this embodiment, by comparing the total resource shares corresponding to the first number of resource containers with the first parameter, it can be determined whether it is currently possible to determine whether the total resource share is greater than or equal to the first parameter according to the comparison result. The resource container set can avoid the situation that the resource container set whose total resource share is greater than or equal to the first parameter cannot be obtained after combining the acquired resource containers.
作为本发明的另一实施例,图3示出了本发明另一实施例提供的信息推荐方法中确定M个第一资源容器集合的实现流程示意图。参照图3,所述基于设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额,确定出M个第一资源容器集合,包括:As another embodiment of the present invention, FIG. 3 shows a schematic flowchart of an implementation of determining M first resource container sets in an information recommendation method provided by another embodiment of the present invention. Referring to FIG. 3 , the M first resource container sets are determined based on the set threshold, the first parameter, and the resource share corresponding to each resource container in the at least one resource container, including:
S301:在所述M为1的情况下,在所述至少一个资源容器中查找资源份额等于所述第一参数的第一资源容器。S301: In the case where the M is 1, search for a first resource container whose resource share is equal to the first parameter in the at least one resource container.
这里,在M为1的情况下,电子设备只需要输出N个资源容器集合中,资源总份额最小的第一容器集合。Here, when M is 1, the electronic device only needs to output the first container set with the smallest total resource share among the N resource container sets.
电子设备在M为1的情况下,在获取到的所有资源容器中查找资源份额等于第一参数的第一资源容器,当查找到第一资源容器时,执行S302;当未查找到第一资源容器时,执行S303。When M is 1, the electronic device searches for a first resource container whose resource share is equal to the first parameter among all the acquired resource containers, and when the first resource container is found, executes S302; when the first resource is not found In the case of a container, execute S303.
S302:在查找到所述第一资源容器的情况下,将所述第一资源容器确定为第一资源容器集合。S302: In the case that the first resource container is found, determine the first resource container as a first resource container set.
这里,电子设备可以直接输出关于资源份额等于第一参数的第一资源容器的推荐信息。Here, the electronic device may directly output recommendation information about the first resource container whose resource share is equal to the first parameter.
S303:在未查找到所述第一资源容器的情况下,基于设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额,确定出资源总份额最小的第一资源容器集合。S303: In the case where the first resource container is not found, based on the set threshold, the first parameter, and the resource share corresponding to each resource container in the at least one resource container, determine the resource with the smallest total resource share The first set of resource containers.
这里,电子设备基于设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额,确定出N个资源容器集合,具体实现方式请参照上述实施例中的相关描述,此处不赘述。在确定出N个资源容器集合的情况下,将N个资源容器集合中资源总份额最小的一个资源容器集合,确定为第一资源容器集合。Here, the electronic device determines N resource container sets based on the set threshold, the first parameter, and the resource share corresponding to each resource container in the at least one resource container. description, which is not repeated here. When N resource container sets are determined, a resource container set with the smallest total resource share among the N resource container sets is determined as the first resource container set.
本实施例提供的方案中,在M等于取得情况下,电子设备在查找到资源份额等于第一参数的资源容器时,可以快速确定出第一资源容器。In the solution provided by this embodiment, in the case where M is equal to acquisition, the electronic device can quickly determine the first resource container when finding a resource container whose resource share is equal to the first parameter.
作为本发明的另一实施例,图4示出了本发明再一实施例提供的信息推荐方法中确定M个第一资源容器集合的实现流程示意图。参照图4,所述基于设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额,确定出M个第一资源容器集合,包括:As another embodiment of the present invention, FIG. 4 shows a schematic flowchart of an implementation of determining M first resource container sets in an information recommendation method provided by another embodiment of the present invention. Referring to FIG. 4 , the M first resource container sets are determined based on the set threshold, the first parameter, and the resource share corresponding to each resource container in the at least one resource container, including:
S401:基于所述设定阈值和所述第一参数,对所述至少一个资源容器进行组合,得到所述N个资源容器集合;其中,每个资源容器集合中的资源容器的总数小于或等于所述设定阈值。S401: Based on the set threshold and the first parameter, combine the at least one resource container to obtain the N resource container sets; wherein, the total number of resource containers in each resource container set is less than or equal to the set threshold.
这里,电子设备可以基于设定阈值和第一参数,对获取到的所有第一资源容器进行组合,得到N个资源总份额大于或等于第一参数的资源容器集合。这里,每个组合结果对应的资源容器集合对应的资源总份额大于或等于第一参数,且每个资源容器集合中资源容器的总数小于或等于设定阈值。Here, the electronic device may combine all the acquired first resource containers based on the set threshold and the first parameter to obtain N resource container sets whose total resource share is greater than or equal to the first parameter. Here, the total resource share corresponding to the resource container set corresponding to each combination result is greater than or equal to the first parameter, and the total number of resource containers in each resource container set is less than or equal to the set threshold.
电子设备也可以基于第一参数对获取到的所有第一资源容器进行组合,得到资源总份额大于或等于第一参数的资源容器集合,从资源总份额大于或等于第一参数的资源容器集合中,确定出N个资源容器的总数小于或等于设定阈值的资源容器集合。The electronic device may also combine all the acquired first resource containers based on the first parameter to obtain a resource container set with a total resource share greater than or equal to the first parameter, from the resource container set with a total resource share greater than or equal to the first parameter. , and determine the resource container set in which the total number of N resource containers is less than or equal to the set threshold.
电子设备还可以对获取到的所有第一资源容器进行组合,得到至少一个组合结果;基于每个第一资源容器的资源份额,计算每个组合结果对应的资源总份额;基于第一参数和每个组合结果对应的资源总份额,从所有组合结果中确定出资源总份额大于或等于第一参数的组合结果,从资源总份额大于或等于第一参数的组合结果中,确定出资源容器的总数小于或等于设定阈值的N个资源容器集合。The electronic device may also combine all the acquired first resource containers to obtain at least one combination result; based on the resource share of each first resource container, calculate the total resource share corresponding to each combination result; based on the first parameter and each The total resource share corresponding to each combination result, determine the combination result whose total resource share is greater than or equal to the first parameter from all the combination results, and determine the total number of resource containers from the combination result where the total resource share is greater than or equal to the first parameter Sets of N resource containers less than or equal to the set threshold.
S402:按照资源总份额从小到大的顺序,从所述N个资源容器集合中确定出M个第一资源容器集合。S402: Determine M first resource container sets from the N resource container sets in an ascending order of the total resource share.
这里,电子设备基于N个资源容器集合中每个资源容器集合对应的资源总份额,按照资源总份额从小到大的顺序从N个资源容器集合中,依次确定出资源总份额最小的第一资源容器,得到M个第一资源容器集合。Here, based on the total resource share corresponding to each resource container set in the N resource container sets, the electronic device sequentially determines the first resource with the smallest total resource share from the N resource container sets in order of the total resource share from small to large. container, to obtain M first resource container sets.
其中,电子设备可以对N个资源容器集合进行排序,从排序后的N个资源容器集合中,按照总份额从小到大的顺序选出M个第一资源容器。The electronic device may sort the N resource container sets, and from the sorted N resource container sets, select M first resource containers in ascending order of total shares.
本实施例提供的方案中,按照资源总份额从小到大的顺序,从N个资源容器集合中确定出M个第一资源容器集合,可以提高确定M个第一资源容器集合的效率。In the solution provided by this embodiment, M first resource container sets are determined from the N resource container sets in order of the total resource share from small to large, which can improve the efficiency of determining the M first resource container sets.
作为本发明的另一实施例,图5示出了本发明实施例提供的信息推荐方法中确定N个资源容器集合的实现流程示意图。参照图5,所述基于所述设定阈值和所述第一参数,对所述至少一个资源容器进行组合,得到所述N个资源容器集合,包括:As another embodiment of the present invention, FIG. 5 shows a schematic flowchart of an implementation of determining N resource container sets in the information recommendation method provided by the embodiment of the present invention. Referring to FIG. 5 , the combination of the at least one resource container based on the set threshold and the first parameter to obtain the N resource container sets includes:
S501:从资源份额大于或等于所述第一参数的第二资源容器中,确定出资源容器集合;确定出的每个资源容器集合中包括一个第二资源容器。S501: Determine a resource container set from the second resource containers whose resource share is greater than or equal to the first parameter; each determined resource container set includes a second resource container.
这里,电子设备从获取到的所有资源容器中,确定出资源份额大于或等于所述第一参数的第二资源容器;在确定出第二资源容器的情况下,从确定出的第二资源容器中确定出资源容器集合。其中,确定出的每个资源容器集合中包括一个第二资源容器。Here, the electronic device determines, from all the acquired resource containers, a second resource container whose resource share is greater than or equal to the first parameter; in the case of determining the second resource container, from the determined second resource container Determines the resource container set in . Wherein, each determined resource container set includes a second resource container.
需要说明的是,当获取到的所有资源容器中存在第二资源容器,且不存在资源份额小于所述第一参数的第三资源容器时,电子设备执行S501之后结束处理流程。当获取到的所有资源容器中不存在第二资源容器,且存在资源份额小于第一参数的第三资源容器时,执行S502。当获取到的所有资源容器中存在第二资源容器,且存在第三资源容器时,执行S501和S502。It should be noted that, when the second resource container exists in all the acquired resource containers, and there is no third resource container whose resource share is smaller than the first parameter, the electronic device ends the processing flow after performing S501. When there is no second resource container in all the acquired resource containers, and there is a third resource container whose resource share is smaller than the first parameter, execute S502. When the second resource container and the third resource container exist in all the acquired resource containers, S501 and S502 are performed.
在一实施例中,所述从资源份额大于或等于所述第一参数的第二资源容器中,确定出资源容器集合,包括:In an embodiment, the determining the resource container set from the second resource container whose resource share is greater than or equal to the first parameter includes:
在所述M为1的情况下,从资源份额大于或等于所述第一参数的第二资源容器中,确定出资源份额最小的一个第二资源容器,得到一个资源容器集合。When the M is 1, a second resource container with the smallest resource share is determined from the second resource containers whose resource share is greater than or equal to the first parameter, and a set of resource containers is obtained.
这里,当电子设备获取到的所有资源容器中包括资源份额等于第一参数的第二资源容器时,将资源份额等于第一参数的第二资源容器确定为第一资源容器集合。当电子设备获取到的所有资源容器中未包括资源份额等于第一参数的第二资源容器时,将资源份额最小的第二资源容器确定为第一资源容器集合。Here, when all the resource containers acquired by the electronic device include a second resource container whose resource share is equal to the first parameter, the second resource container whose resource share is equal to the first parameter is determined as the first resource container set. When all resource containers acquired by the electronic device do not include a second resource container with a resource share equal to the first parameter, the second resource container with the smallest resource share is determined as the first resource container set.
S502:基于所述设定阈值和所述第一参数,对资源份额小于所述第一参数的第三资源容器进行组合,得到资源总份额大于或等于所述第一参数的资源容器集合。S502: Based on the set threshold and the first parameter, combine third resource containers with a resource share smaller than the first parameter to obtain a resource container set with a total resource share greater than or equal to the first parameter.
这里,S502中确定资源总份额大于或等于第一参数的资源容器集合的实现方式与上述实施例中,基于设定阈值和第一参数对资源容器进行组合,得到N个资源容器集合的实现方式类似,具体请参照上述实施例的相关描述,此处不赘述。Here, the implementation of determining the resource container set whose total resource share is greater than or equal to the first parameter in S502 is the same as the implementation of combining the resource containers based on the set threshold and the first parameter to obtain N resource container sets in the above-mentioned embodiment. Similarly, for details, please refer to the relevant descriptions of the foregoing embodiments, which will not be repeated here.
本实施例提供的方案中,电子设备不再对资源份额大于或等于第一参数的第二资源容器进行组合,可以减少电子设备的数据处理量,提高数据处理效率。In the solution provided by this embodiment, the electronic device no longer combines the second resource containers whose resource share is greater than or equal to the first parameter, which can reduce the data processing amount of the electronic device and improve the data processing efficiency.
作为本发明的另一实施例,图6示出了本发明另一实施例提供的信息推荐方法中确定N个资源容器集合的实现流程示意图。参照图6,所述基于所述设定阈值和所述第一参数,对资源份额小于所述第一参数的第三资源容器进行组合,得到资源总份额大于或等于所述第一参数的资源容器集合时,所述方法包括:As another embodiment of the present invention, FIG. 6 shows a schematic flowchart of an implementation of determining N resource container sets in an information recommendation method provided by another embodiment of the present invention. Referring to FIG. 6 , based on the set threshold and the first parameter, a third resource container whose resource share is smaller than the first parameter is combined to obtain a resource whose total resource share is greater than or equal to the first parameter When the container is set, the method includes:
S601:确定出资源容器集合的第一元素;所述第一元素为资源份额最大的一个所述第三资源容器。S601: Determine the first element of the resource container set; the first element is the third resource container with the largest resource share.
这里,电子设备基于第一参数,从获取到的所有资源容器中确定出资源份额小于第一参数的所有第三资源容器,从确定出的所有第三资源容器中,确定出一个资源份额最大的第三资源容器,将该资源份额最大的第三资源容器,确定为资源容器集合的第一元素。Here, based on the first parameter, the electronic device determines, from all the acquired resource containers, all third resource containers with a resource share smaller than the first parameter, and from all the determined third resource containers, determines one with the largest resource share. For the third resource container, the third resource container with the largest resource share is determined as the first element of the resource container set.
S602:基于所述设定阈值和第一差值,对除所述第一元素之外的第三资源容器进行组合,得到资源容器集合的第二元素;其中,S602: Based on the set threshold and the first difference, combine the third resource containers except the first element to obtain the second element of the resource container set; wherein,
所述第一差值表征所述第一参数和所述第一元素对应的资源份额的差值;The first difference represents the difference between the first parameter and the resource share corresponding to the first element;
所述第二元素中包括至少一个所述第三资源容器;所述第二元素中的第三资源容器的总数小于或等于,第一设定阈值与1之间的差值。The second element includes at least one of the third resource containers; the total number of third resource containers in the second element is less than or equal to the difference between the first set threshold and 1.
这里,由于在S601中确定出了资源容器集合中的其中一个资源容器,因此,资源容器集合的第二元素中包括的资源容器的总数小于或等于K-1,K表征设定阈值。Here, since one resource container in the resource container set is determined in S601, the total number of resource containers included in the second element of the resource container set is less than or equal to K-1, where K represents the set threshold.
这里,在S602中,电子设备计算第一参数和第一元素对应的资源份额之间的差值,得到第一差值;从资源份额小于第一参数的所有第三资源容器中删除确定出的第一元素,基于第一差值对资源份额小于第一参数的第三资源容器进行组合,确定出资源总份额大于或等于第一差值的资源容器组合,从确定出的资源容器组合中,确定出资源容器的总数小于或等于K-1的资源容器组合,得到资源容器集合的第二元素。Here, in S602, the electronic device calculates the difference between the first parameter and the resource share corresponding to the first element to obtain the first difference; deletes the determined value from all third resource containers whose resource share is smaller than the first parameter. The first element, based on the first difference value, combines the third resource containers whose resource share is smaller than the first parameter, and determines the resource container combination whose total resource share is greater than or equal to the first difference value, and from the determined resource container combination, Determine the resource container combination in which the total number of resource containers is less than or equal to K-1, and obtain the second element of the resource container set.
其中,当资源份额最大的第三资源容器的数量为至少两个时,在基于第一差值对资源份额小于第一参数的第三资源容器进行组合时,可以删除所有资源份额最大的第三资源容器,以减少电子设备的计算量。Wherein, when the number of third resource containers with the largest resource share is at least two, when combining third resource containers with a resource share smaller than the first parameter based on the first difference, all third resource containers with the largest resource share may be deleted. Resource container to reduce the computational load of electronic devices.
需要说明的是,N个资源容器集合中每个资源容器集合由一个第一元素和一个第二元素构成。It should be noted that each resource container set in the N resource container sets is composed of a first element and a second element.
确定出K-1个资源容器,得到资源容器集合的第二元素,K-1个资源容器对应的资源总份额大于或等于第一差值。K-1 resource containers are determined, and the second element of the resource container set is obtained, and the total resource shares corresponding to the K-1 resource containers are greater than or equal to the first difference.
本实施例提供的方案中,在从资源份额小于第一参数的资源容器中,确定出资源总份额大于或等于第一参数的资源容器集合时,电子设备将一个资源份额最大的第三资源容器确定为资源容器集合的第一元素,基于第一参数与第一元素之间的差值、设定阈值,对除第一元素之外的第三资源容器进行组合,得到资源容器集合的第二元素,可以减少确定资源容器集合所需要的时间,提高确定出N个资源容器集合的速率。In the solution provided by this embodiment, when a set of resource containers whose total resource share is greater than or equal to the first parameter is determined from the resource containers whose resource share is less than the first parameter, the electronic device assigns a third resource container with the largest resource share to the set of resource containers. Determined as the first element of the resource container set, based on the difference between the first parameter and the first element and the set threshold, combine the third resource containers except the first element to obtain the second resource container set. element, which can reduce the time required to determine the resource container set and improve the rate of determining N resource container sets.
作为本发明的应用实施例,图7示出了本发明应用实施例提供的信息推荐方法的实现流程示意图。参照图7,信息推荐方法包括:As an application embodiment of the present invention, FIG. 7 shows a schematic flowchart of the implementation of the information recommendation method provided by the application embodiment of the present invention. 7, the information recommendation method includes:
S701:基于请求获取的第一资源的资源份额以及设定的第一比值,确定所述第一资源对应的第一参数;所述第一参数表征获取所述第一资源时要求锁定的最小资源份额。S701: Determine a first parameter corresponding to the first resource based on the resource share of the first resource requested to be obtained and the set first ratio; the first parameter represents the minimum resource that needs to be locked when obtaining the first resource share.
这里,S701与图1对应的实施例中的S101相同,具体请参照S101中的相关描述,此处不赘述。Here, S701 is the same as S101 in the embodiment corresponding to FIG. 1 . For details, please refer to the relevant description in S101 , which is not repeated here.
S702:判断获取到的至少一个资源容器中是否存在资源份额大于或等于所述第一参数的资源容器。S702: Determine whether there is a resource container with a resource share greater than or equal to the first parameter in the at least one acquired resource container.
电子设备基于获取到的每个资源容器的资源份额,判断获取到的所有资源容器中是否存在资源份额大于或等于所述第一参数的资源容器,得到第一判断结果。Based on the obtained resource share of each resource container, the electronic device judges whether there is a resource container with a resource share greater than or equal to the first parameter among all the obtained resource containers, and obtains a first judgment result.
当第一判断结果表征存在资源份额等于第一参数的资源容器时,执行S703;当第一判断结果表征存在资源份额大于第一参数的资源容器时,执行S704;当第一判断结果表征不存在资源份额大于或等于第一参数的资源容器时,执行S704。When the first judgment result indicates that a resource container with a resource share equal to the first parameter exists, execute S703; when the first judgment result indicates that a resource container with a resource share greater than the first parameter exists, execute S704; when the first judgment result indicates that there is no resource container When the resource share is greater than or equal to the resource container of the first parameter, execute S704.
S703:输出关于资源份额等于第一参数的第一资源容器的推荐信息;所述推荐信息用于确定获取所述第一资源时锁定的资源容器集合。S703: Output recommendation information about a first resource container whose resource share is equal to a first parameter; the recommendation information is used to determine a set of resource containers locked when acquiring the first resource.
S704:判断设定阈值是否为1。S704: Determine whether the set threshold value is 1.
这里,设定阈值表征允许锁定的资源容器的最大数目。电子设备判断获取到的设定阈值是否等于1,得到第二判断结果。Here, the threshold is set to characterize the maximum number of resource containers that are allowed to be locked. The electronic device determines whether the acquired set threshold is equal to 1, and obtains a second determination result.
当第一判断结果表征不存在资源份额大于第一参数的资源容器,且第二判断结果表征设定阈值等于1时,表征不存在由一个资源份额大于或等于第一参数的资源容器构成的资源容器集合,执行S705。When the first judgment result indicates that there is no resource container with a resource share greater than the first parameter, and the second judgment result indicates that the set threshold is equal to 1, it indicates that there is no resource consisting of a resource container with a resource share greater than or equal to the first parameter. Container collection, go to S705.
当第一判断结果表征存在资源份额大于第一参数的资源容器,且第二判断结果表征设定阈值等于1时,执行S706。When the first judgment result indicates that there is a resource container with a resource share greater than the first parameter, and the second judgment result indicates that the set threshold is equal to 1, S706 is executed.
当第一判断结果表征存在资源份额大于第一参数的资源容器,且第二判断结果表征设定阈值大于或等于2时,执行S707~S709。When the first judgment result indicates that there is a resource container with a resource share greater than the first parameter, and the second judgment result indicates that the set threshold is greater than or equal to 2, S707-S709 are performed.
当第一判断结果表征不存在资源份额大于第一参数的资源容器,且第二判断结果表征设定阈值大于或等于2时,执行S708~S709。When the first judgment result indicates that there is no resource container with a resource share greater than the first parameter, and the second judgment result indicates that the set threshold is greater than or equal to 2, S708 to S709 are performed.
S705:输出第一提示信息,所述第一提示信息表征无法获取到用于获取第一资源的资源容器。S705: Output first prompt information, where the first prompt information represents that the resource container for acquiring the first resource cannot be obtained.
S706:输出资源份额最小的第二资源容器的推荐信息;其中,第二资源容器表征资源份额大于第一参数的资源容器。S706: Output recommendation information of the second resource container with the smallest resource share; wherein the second resource container represents a resource container with a resource share greater than the first parameter.
这里,电子设备从资源份额大于第一参数的第二资源容器中,确定出资源份额最小的第二资源容器,输出资源份额最小的第二资源容器的推荐信息。Here, the electronic device determines the second resource container with the smallest resource share from the second resource containers whose resource share is greater than the first parameter, and outputs recommendation information of the second resource container with the smallest resource share.
S707:将资源份额最小的第二资源容器确定为第一资源容器集合。S707: Determine the second resource container with the smallest resource share as the first resource container set.
这里,S707中确定出的第一资源容器集合包括一个资源份额最小的第二资源容器,也就是说,在S707中确定出的第一资源容器集合是集合U1的最优解,集合U1由资源份额大于第一参数的所有资源容器构成。Here, the first resource container set determined in S707 includes a second resource container with the smallest resource share, that is, the first resource container set determined in S707 is the optimal solution of the set U1, the set U1 It consists of all resource containers whose resource share is greater than the first parameter.
S708:按照资源份额从大到小的顺序,从资源份额小于所述第一参数的第三资源容器中,确定出第一数目的资源容器;所述第一数目等于所述设定阈值。S708: Determine a first number of resource containers from third resource containers whose resource shares are smaller than the first parameter in descending order of resource shares; the first number is equal to the set threshold.
这里,S708的实现方法与图2对应的实施例中的S201相同,请参照S201中的相关描述,此处不赘述。Here, the implementation method of S708 is the same as that of S201 in the embodiment corresponding to FIG. 2 , please refer to the relevant description in S201 , which is not repeated here.
S709:判断所述第一数目的资源容器对应的资源总份额是否大于或等于所述第一参数。S709: Determine whether the total resource shares corresponding to the first number of resource containers are greater than or equal to the first parameter.
这里,电子设备基于每个资源容器的资源份额,计算第一数目的资源容器对应的资源总份额,判断第一数目的资源容器对应的资源总份额是否大于或等于第一参数,得到第三判断结果。Here, the electronic device calculates the total resource share corresponding to the first number of resource containers based on the resource share of each resource container, determines whether the total resource share corresponding to the first number of resource containers is greater than or equal to the first parameter, and obtains a third judgment result.
当第三判断结果表征第一数目的资源容器对应的资源总份额大于或等于第一参数时,表征可以从资源份额小于第一参数的资源容器中确定出第一资源容器集合,执行S710。When the third judgment result indicates that the total resource share corresponding to the first number of resource containers is greater than or equal to the first parameter, it indicates that the first resource container set can be determined from the resource containers with the resource share smaller than the first parameter, and S710 is executed.
当第三判断结果表征第一数目的资源容器对应的资源总份额大于或等于第一参数时,表征无法从资源份额小于第一参数的资源容器中确定出第一资源容器集合,执行S706。When the third judgment result indicates that the total resource share corresponding to the first number of resource containers is greater than or equal to the first parameter, it indicates that the first resource container set cannot be determined from the resource containers with the resource share smaller than the first parameter, and S706 is executed.
S710:从资源份额小于所述第一参数的第三资源容器中,确定出第一资源容器集合。S710: Determine a first resource container set from the third resource containers whose resource share is smaller than the first parameter.
这里,从资源份额小于所述第一参数的第三资源容器中,确定出第一资源容器集合的方法如下:Here, the method for determining the first resource container set from the third resource container whose resource share is smaller than the first parameter is as follows:
电子设备从资源份额小于第一参数的第三资源容器中,确定出资源份额最大的第三资源容器Ai;将资源份额小于第一参数的资源容器划分为集合U2和集合U3。电子设备分别确定出集合U2和集合U3的最优解,得到第一资源容器集合。其中,The electronic device determines the third resource container A i with the largest resource share from the third resource containers whose resource share is less than the first parameter; divides the resource container with the resource share less than the first parameter into a set U 2 and a set U 3 . The electronic device determines the optimal solutions of the set U 2 and the set U 3 respectively, and obtains the first resource container set. in,
集合U2={Ai}∪{A1,A2,A3,……,Ai-2,Ai-1}Set U 2 ={A i }∪{A 1 ,A 2 ,A 3 ,...,A i-2 ,A i-1 }
集合U3={A1,A2,A3,……,Ai-2,Ai-1}Set U 3 ={A 1 , A 2 , A 3 ,..., A i-2 , A i-1 }
第一资源容器集合包括集合U2的最优解和集合U3的最优解。集合U2的最优解是集合U2中资源总份额大于或等于第一参数的资源容器集合中,资源总份额最小的资源容器集合。集合U3的最优解是集合U3中资源总份额大于或等于第一参数的资源容器集合中,资源总份额最小的资源容器集合。The first set of resource containers includes the optimal solution of set U 2 and the optimal solution of set U 3 . The optimal solution of the set U 2 is the resource container set with the smallest total resource share among the resource container sets whose total resource share is greater than or equal to the first parameter in the set U 2 . The optimal solution of the set U3 is the resource container set with the smallest total resource share among the resource container sets whose total resource share is greater than or equal to the first parameter in the set U3.
其中,电子设备确定出集合U2的最优解的方法为:将集合U2中资源份额最大第三资源容器Ai确定第一资源容器集合中的第一元素;基于集合U2中的{A1,A2,A3,……,Ai-2,Ai-1}确定出资源总份额大于或等于第一差值的第二元素,第一差值表征第一参数与第一元素对应的资源份额之间的差值。这里,确定资源总份额大于或等于第一差值的第二元素的方法,与S602中确定出资源容器集合的第二元素的方法类似,请参照S602的相关描述,此处不赘述。电子设备子在确定出资源总份额大于或等于第一差值的第二元素的情况下,将资源总份额最小的第二元素,确定为第一资源容器集合中的第二元素。Wherein, the method for the electronic device to determine the optimal solution of the set U 2 is: determining the first element in the first resource container set from the third resource container A i with the largest resource share in the set U 2 ; A 1 , A 2 , A 3 , ..., A i-2 , A i-1 } determine the second element whose total resource share is greater than or equal to the first difference, which represents the difference between the first parameter and the first The difference between the resource shares corresponding to the element. Here, the method of determining the second element of the total resource share greater than or equal to the first difference is similar to the method of determining the second element of the resource container set in S602, please refer to the relevant description of S602, and will not be repeated here. In the case of determining that the total resource share is greater than or equal to the second element of the first difference, the electronic device determines the second element with the smallest total resource share as the second element in the first resource container set.
其中,电子设备确定出集合U3的最优解的方法为:Wherein, the method for the electronic device to determine the optimal solution of the set U 3 is:
电子设备按照资源份额从大到小的顺序,从集合U3中,确定出第二数目的资源容器,其中,第二数目等于设定阈值。基于每个资源容器的资源份额,计算出第二数目的资源容器对应的资源总份额。The electronic device determines a second number of resource containers from the set U3 in descending order of resource shares, where the second number is equal to the set threshold. Based on the resource share of each resource container, the total resource share corresponding to the second number of resource containers is calculated.
当第二数目的资源容器对应的资源总份额小于第一参数时,表征集合U3无解,也就是说,无法从集合U3中确定出第一资源容器集合。这里,第一资源容器集合中包括的资源容器的总数小于或等于设定阈值,且第一资源容器集合对应的资源总份额大于或等于第一参数。When the total resource share corresponding to the second number of resource containers is less than the first parameter, it means that the set U 3 has no solution, that is, the first set of resource containers cannot be determined from the set U 3 . Here, the total number of resource containers included in the first resource container set is less than or equal to the set threshold, and the total resource share corresponding to the first resource container set is greater than or equal to the first parameter.
当第二数目的资源容器对应的资源总份额大于或等于第一参数时,表征集合U3有最优解,电子设备计算集合U3的最优解。其中,When the total resource share corresponding to the second number of resource containers is greater than or equal to the first parameter, it indicates that the set U3 has an optimal solution, and the electronic device calculates the optimal solution of the set U3 . in,
电子设备计算集合U3的最优解的方法可以是:基于第一参数和设定阈值,对集合U3中的第三资源容器进行组合,确定出资源总份额大于或等于第一参数的第一资源容器集合,将确定出的第一资源容器集合中,资源总份额最小的第一资源容器集合确定为U3的最优解。The method for calculating the optimal solution of the set U3 by the electronic device may be: based on the first parameter and the set threshold, combine the third resource containers in the set U3, and determine that the total resource share is greater than or equal to the first parameter. A set of resource containers, and among the determined first resource container sets, the first resource container set with the smallest total resource share is determined as the optimal solution of U 3 .
电子设备计算集合U3的最优解的方法也可以是:将集合U3划分为集合U′1、集合U′2和集合U′3,分别计算集合U′1、集合U′2和集合U′3的最优解。其中,The method for calculating the optimal solution of the set U 3 by the electronic device may also be: dividing the set U 3 into the set U' 1 , the set U' 2 and the set U' 3 , and calculating the set U' 1 , the set U' 2 and the set respectively The optimal solution of U'3. in,
集合U′1={}set U′ 1 ={}
集合U′2={Ai-1}∪{A1,A2,A3,……,Ai-2}Set U' 2 ={A i-1 }∪{A 1 , A 2 , A 3 ,...,A i-2 }
集合U′3={A1,A2,A3,……,Ai-2}Set U′ 3 = {A 1 , A 2 , A 3 , …, A i-2 }
电子设备计算集合U′2的最优解的方法与上述计算集合U2的最优解的方法类似,具体请参照上述计算集合U2的最优解的相关描述,此处不赘述。The method for calculating the optimal solution of the set U' 2 by the electronic device is similar to the above -mentioned method for calculating the optimal solution of the set U 2 .
电子设备在计算集合U′3的最优解时,按照资源份额从大到小的顺序,从集合U′3中,确定出第三数目的资源容器,其中,第三数目等于设定阈值。基于每个资源容器的资源份额,计算出第三数目的资源容器对应的资源总份额。当第三数目的资源容器对应的资源总份额小于第一参数时,表征集合U′3无解,也就是说,无法从集合U′3中确定出第一资源容器集合。当第二数目的资源容器对应的资源总份额大于或等于第一参数时,表征集合U′3有最优解。电子设备计算集合U′3的最优解的方法与计算集合U3的最优解的方法类似,具体请参照上述计算集合U3的最优解的相关描述,此处不赘述。When calculating the optimal solution of the set U'3, the electronic device determines a third number of resource containers from the set U'3 in descending order of resource shares, where the third number is equal to the set threshold. Based on the resource share of each resource container, the total resource share corresponding to the third number of resource containers is calculated. When the total share of resources corresponding to the third number of resource containers is less than the first parameter, the character set U'3 has no solution, that is, the first resource container set cannot be determined from the set U'3 . When the total resource share corresponding to the second number of resource containers is greater than or equal to the first parameter, the characterization set U′ 3 has an optimal solution. The method for calculating the optimal solution of the set U′ 3 by the electronic device is similar to the method for calculating the optimal solution of the set U 3 . For details, please refer to the above description of calculating the optimal solution of the set U 3 , which is not repeated here.
S711:基于确定出的第一资源容器集合,输出关于第一资源容器集合的推荐信息。S711: Based on the determined first resource container set, output recommendation information about the first resource container set.
这里,电子设备也可以基于确定出的第一资源容器集合,输出关于资源总份额最小的第一资源容器集合的推荐信息。Here, the electronic device may also output recommendation information about the first resource container set with the smallest total resource share based on the determined first resource container set.
其中,电子设备比较确定出的所有第一资源容器集合对应的资源总份额,从所有第一资源容器集合中确定出资源总份额最小的第一资源容器集合,并输出资源总份额最小的第一资源容器集合的推荐信息。The electronic device compares the determined total resource shares corresponding to all the first resource container sets, determines the first resource container set with the smallest total resource share from all the first resource container sets, and outputs the first resource container set with the smallest total resource share. Recommended information for resource container collections.
当第一判断结果表征不存在资源份额大于第一参数的资源容器,且第二判断结果表征设定阈值大于或等于2时,确定出的第一资源容器集合包括执行S707和S710确定出的所有第一资源容器集合。When the first judgment result indicates that there is no resource container with a resource share greater than the first parameter, and the second judgment result indicates that the set threshold is greater than or equal to 2, the determined first resource container set includes all the resources determined by performing S707 and S710. The first set of resource containers.
当第一判断结果表征不存在资源份额大于第一参数的资源容器,且第二判断结果表征设定阈值大于或等于2时,确定出的第一资源容器集合为执行S710中确定出的第一资源容器集合。When the first judgment result indicates that there is no resource container with a resource share greater than the first parameter, and the second judgment result indicates that the set threshold value is greater than or equal to 2, the determined first resource container set is the first determined in S710. A collection of resource containers.
需要说明的是,在输出关于资源总份额最小的第一资源容器集合的推荐信息时,当资源总份额最小的第一资源容器集合的数量为至少两个时,输出的推荐信息中的第一资源容器集合对应的资源总份额均相同,且为均最小值。It should be noted that when outputting recommendation information about the first resource container set with the smallest total resource share, when the number of the first resource container set with the smallest total resource share is at least two, the first The total resource shares corresponding to the resource container sets are all the same and have the minimum average value.
下面以在质押贷款的场景下,通过锁定定期存单换取贷款为例,对图7的信息推荐方法进行说明。The information recommendation method in FIG. 7 will be described below by taking the example of exchanging a loan by locking a certificate of deposit in the scenario of a pledged loan.
其中,贷款对应上述第一资源,定期存单对应上述资源容器,在通过锁定定期存单换取贷款时的质押率对应于上述设定的第一比值。Wherein, the loan corresponds to the above-mentioned first resource, the time deposit certificate corresponds to the above-mentioned resource container, and the pledge rate when exchanging the loan by locking the time deposit certificate corresponds to the above-mentioned set first ratio.
例如,在用户具有七笔定期存单,用户需要贷款8000元,一笔贷款最多允许质押两笔定期存单的情况下,其中,设定阈值对应为2,七笔定期存单的金额分别为:50000元,20000元、9000元、6000元、5000元、800元、600元,电子设备按照以下方式进行信息推荐:For example, if the user has seven time deposit certificates, the user needs a loan of 8,000 yuan, and one loan is allowed to pledge two time deposit certificates at most, the set threshold corresponds to 2, and the amounts of the seven time deposit certificates are: 50,000 yuan. , 20,000 yuan, 9,000 yuan, 6,000 yuan, 5,000 yuan, 800 yuan, 600 yuan, and electronic equipment recommends information in the following ways:
这里,电子设备执行S701计算8000与0.8之间的商,得到第一参数,即最小质押金额。其中,第一参数P=8000/0.8=10000元。Here, the electronic device executes S701 to calculate the quotient between 8000 and 0.8 to obtain the first parameter, that is, the minimum pledge amount. Among them, the first parameter P=8000/0.8=10000 yuan.
电子设备对用户的七笔存单按照金额从小到达的顺序进行排序,得到存单集合DEP={600,800,5000,6000,9000,20000,50000}。The electronic device sorts the user's seven deposit certificates in the order of the amount from the smallest to obtain the deposit certificate set DEP={600, 800, 5000, 6000, 9000, 20000, 50000}.
电子设备执行S702判断存单集合DEP中是否存在金额大于或等于10000的第一存单,得到第一判断结果。The electronic device executes S702 to determine whether there is a first deposit certificate with an amount greater than or equal to 10,000 in the deposit certificate set DEP, and obtains a first judgment result.
由于存单集合DEP中包括金额为20000和50000的存单,且不包括金额为10000的存单,因此,第一判断结果表征不存在金额等于第一参数的存单,且存在金额大于第一参数的存单,电子设备执行S704判断设定阈值是否为1,得到第二判断结果。由于一笔贷款最多允许质押两笔定期存单,因此,设定阈值为2,第二判断结果表征设定阈值等于2,由于第一判断结果表征存在金额大于第一参数的存单,且第二判断结果表征设定阈值等于2,因此,电子设备执行S707~S709。Since the certificate of deposit set DEP includes certificates of deposit with an amount of 20,000 and 50,000, and does not include certificates of deposit with an amount of 10,000, the first judgment result indicates that there is no certificate of deposit with an amount equal to the first parameter, and there is a certificate of deposit with an amount greater than the first parameter. The electronic device executes S704 to determine whether the set threshold is 1, and obtains a second determination result. Since a loan is allowed to pledge two certificates of deposit at most, the set threshold is 2, and the second judgment result indicates that the set threshold is 2. Since the first judgment result indicates that there are certificates of deposit with an amount greater than the first parameter, and the second judgment The result indicates that the set threshold value is equal to 2, therefore, the electronic device executes S707-S709.
电子设备基于存单集合DEP,确定出集合U1、集合U2和集合U3,分别计算集合U1、集合U2和集合U3各自对应的最优解,从计算出的最优解中,确定出总金额最小的最优解,输出关于总金额最小的最优解的推荐信息。其中,The electronic device determines the set U 1 , the set U 2 and the set U 3 based on the set of deposit receipts DEP, and calculates the respective optimal solutions corresponding to the set U 1 , the set U 2 and the set U 3 respectively. From the calculated optimal solutions, Determine the optimal solution with the smallest total amount, and output recommendation information about the optimal solution with the smallest total amount. in,
集合U1={20000,50000}Set U 1 = {20000, 50000}
集合U2={9000}∪{600,800,5000,6000}Set U 2 ={9000}∪{600, 800, 5000, 6000}
集合U3={600,800,5000,6000}。Set U3 = {600, 800, 5000, 6000}.
这里,集合U1的最优解表征集合U1中金额最小的存单。集合U1的最优解的表达式为:F({20000,50000},10000,2)。电子设备将金额为20000的存单确定为集合U1的最优解。集合U1的最优解为{20000}。Here, the optimal solution of the set U1 represents the certificate of deposit with the smallest amount in the set U1. The expression of the optimal solution of the set U 1 is: F({20000, 50000}, 10000, 2). The electronic device determines the deposit certificate with an amount of 20,000 as the optimal solution of the set U1. The optimal solution for set U 1 is {20000}.
集合U2的最优解表征集合U2中总金额大于或等于第一参数的存单组合中总金额最小的存单组合。集合U2的最优解的表达式为:F(({9000}∪{600,800,5000,6000}),1000,1)。集合U2的最优解由金额为9000的第一存单,和另一个金额最小的第二存单构成,第二存单表征金额大于或等于1000的存单。这里,由于,电子设备将从集合U2中的{600,800,5000,6000}中确定出金额大于或等于1000的第二存单包括金额5000的存单和金额为6000的存单,而5000小于6000,因此,电子设备将金额为5000的存单确定为第二存单,故,电子设备计算出的集合U2的最优解为{9000,5000}。 The optimal solution of the set U2 represents the certificate - of-deposit combination with the smallest total amount among the certificate-of-deposit combinations in the set U2 whose total amount is greater than or equal to the first parameter. The expression of the optimal solution of the set U 2 is: F(({9000}∪{600, 800, 5000, 6000}), 1000, 1). The optimal solution of set U2 consists of a first deposit certificate with an amount of 9000, and another second deposit certificate with the smallest amount, and the second deposit certificate represents a deposit certificate with an amount greater than or equal to 1000. Here, since, the electronic device will determine from {600, 800, 5000, 6000} in the set U2 that the second certificate of deposit with an amount greater than or equal to 1000 includes a certificate of deposit with an amount of 5000 and a certificate of deposit with an amount of 6000, while 5000 is less than 6000 , therefore, the electronic device determines the deposit certificate with an amount of 5000 as the second deposit certificate, so the optimal solution of the set U 2 calculated by the electronic device is {9000, 5000}.
集合U3的最优解表征集合U3中集合U2中总金额大于或等于第一参数的存单组合中总金额最小的存单组合。集合U3的最优解的表达式为:F({600,800,5000,6000},10000,2)。这里,电子设备按照金额从大到小的顺序,集合U3中确定出2份存单,这2份存单分别为金额为6000的存单和金额为5000的存单,由于这两份存单的总金额为11000,总金额大于10000,因此,集合U3存在最优解。电子设备按照以下方式计算集合U3的最优解:The optimal solution of the set U3 represents the combination of certificates of deposit with the smallest total amount in the combination of certificates of deposit in the set U3 whose total amount is greater than or equal to the first parameter in the set U2. The expression for the optimal solution of the set U 3 is: F({600, 800, 5000, 6000}, 10000, 2). Here, the electronic device determines 2 certificates of deposit from the set U 3 in descending order of the amount. The two certificates of deposit are the certificate of deposit with an amount of 6000 and the certificate of deposit with an amount of 5000. Since the total amount of the two certificates of deposit is 11000, the total amount is greater than 10000, therefore, there is an optimal solution for set U3 . The electronic device calculates the optimal solution for set U3 as follows:
将集合U3划分为集合U′1、集合U′2、和集合U′3:Divide set U 3 into set U' 1 , set U' 2 , and set U' 3 :
集合U′1={}set U′ 1 ={}
集合U′2={6000}∪{600,800,5000}Set U′ 2 ={6000}∪{600, 800, 5000}
集合U′3={600,800,5000}Set U' 3 = {600, 800, 5000}
由于集合U′1不存在金额大于10000的存单,因此,集合U′1为空集。Since there is no deposit certificate with an amount greater than 10,000 in the set U' 1 , the set U' 1 is an empty set.
集合U′2的最优解的表达式为:F(({6000}∪{600,800,5000}),4000,1),表征金额为6000的存单确定为集合U′2最优解中的第一元素,集合U′2最优解中的第二元素为金额大于或等于4000的存单中,金额最小的存单。这里,电子设备确定出的集合U′2最优解中的第二元素为金额为5000的存单。因此,集合U′2最优解为{6000,5000}。The expression of the optimal solution of the set U' 2 is: F(({6000}∪{600, 800, 5000}), 4000, 1), and the deposit certificate representing the amount of 6000 is determined to be in the optimal solution of the set U' 2 The first element of , the second element in the optimal solution of the set U′ 2 is the certificate of deposit with the smallest amount among the certificates of deposit with an amount greater than or equal to 4000. Here, the second element in the optimal solution of the set U′ 2 determined by the electronic device is a certificate of deposit with an amount of 5,000. Therefore, the optimal solution for the set U' 2 is {6000, 5000}.
集合U′3的最优解的表达式为:F({600,800,5000},10000,2),由于{600,800,5000}中金额最大的两份存单的总金额小于10000,因此,集合U′3无解,即,集合U′3的最优解={}。The expression of the optimal solution of the set U' 3 is: F({600, 800, 5000}, 10000, 2). Since the total amount of the two certificates of deposit with the largest amount in {600, 800, 5000} is less than 10,000, so , the set U' 3 has no solution, that is, the optimal solution of the set U' 3 = {}.
在确定出所有最优解的情况下,电子设备可以输出关于M个最优解的推荐信息,M小于或等于确定出的最优解的总数N。When all optimal solutions are determined, the electronic device may output recommendation information about M optimal solutions, where M is less than or equal to the total number N of the determined optimal solutions.
在确定出所有最优解的情况下,电子设备也可以从所有最优解中,确定出总金额最小的最优解对应的存单集合,并输出关于总金额最小的最优解对应的存单集合的推荐信息。When all optimal solutions are determined, the electronic device can also determine the set of deposit certificates corresponding to the optimal solution with the smallest total amount from all the optimal solutions, and output the set of deposit certificates corresponding to the optimal solution with the smallest total amount recommended information.
这里,电子设备确定出的最优解包括:{20000}、{9000,5000}和{6000,5000},由于最优解{6000,5000}的总金额最小,因此,输出关于存单集合{6000,5000}的推荐信息。Here, the optimal solutions determined by the electronic device include: {20000}, {9000, 5000} and {6000, 5000}, since the total amount of the optimal solution {6000, 5000} is the smallest, therefore, output about the set of deposit certificates {6000 , 5000} of recommended information.
本实施例提供的方案中,电子设备可以将资源容器划分为多个集合,并求解每个集合的最优解,基于确定出的最优解对应的第一资源容器集合,输出关于M个第一资源容器集合的推荐信息,这种方式,可以减少电子设备对资源容器进行组合时的计算量,减少确定出M个第一资源容器集合所需的时长,从而提高确定出M个第一资源容器集合的速率。In the solution provided by this embodiment, the electronic device may divide the resource containers into multiple sets, solve the optimal solution for each set, and output information about the Mth set based on the first resource container set corresponding to the determined optimal solution. Recommendation information for a set of resource containers. In this way, the amount of calculation when the electronic device assembles the resource containers can be reduced, the time required to determine the M first resource container sets can be reduced, and the determination of the M first resource containers can be improved. The velocity of the container collection.
为实现本发明实施例的方法,本发明实施例还提供了一种信息推荐装置,设置在电子设备上,如图8所示,该信息推荐装置包括:In order to implement the method of the embodiment of the present invention, the embodiment of the present invention further provides an information recommendation apparatus, which is set on an electronic device. As shown in FIG. 8 , the information recommendation apparatus includes:
确定单元81,用于基于请求获取的第一资源的资源份额以及设定的第一比值,确定所述第一资源对应的第一参数;所述第一参数表征获取所述第一资源时要求锁定的最小资源份额;A
推荐单元82,用于基于所述第一参数以及至少一个资源容器中每个资源容器对应的资源份额,输出关于M个第一资源容器集合的推荐信息;所述推荐信息用于确定获取所述第一资源时锁定的资源容器集合;其中,A recommending
所述M个第一资源容器集合为N个资源容器集合中资源总份额最小的前M个资源容器集合;所述N个资源容器集合通过对所述至少一个资源容器进行组合得到;所述N个资源容器集合中的每个所述资源容器集合对应的资源总份额大于或等于所述第一参数;所述M和所述N均为正整数且所述N大于所述M。The M first resource container sets are the top M resource container sets with the smallest total resource share among the N resource container sets; the N resource container sets are obtained by combining the at least one resource container; the N resource container sets are obtained by combining the at least one resource container. The total resource share corresponding to each of the resource container sets in the resource container sets is greater than or equal to the first parameter; the M and the N are both positive integers, and the N is greater than the M.
在一实施例中,推荐单元82用于:In one embodiment, the recommending
基于设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额,确定出M个第一资源容器集合;其中,M first resource container sets are determined based on the set threshold, the first parameter, and the resource share corresponding to each resource container in the at least one resource container; wherein,
所述设定阈值表征允许锁定的资源容器的最大数目;确定出的每个第一资源容器集合中的资源容器的总数小于或等于所述设定阈值。The set threshold represents the maximum number of resource containers allowed to be locked; the determined total number of resource containers in each first resource container set is less than or equal to the set threshold.
在一实施例中,推荐单元82用于:In one embodiment, the recommending
在所述设定阈值为1的情况下,从资源份额大于或等于所述第一参数的资源容器中确定出N个资源容器集合;其中,确定出的每个资源容器集合包括一个资源容器。When the set threshold is 1, N resource container sets are determined from resource containers whose resource share is greater than or equal to the first parameter; wherein each determined resource container set includes one resource container.
在一实施例中,推荐单元82用于:In one embodiment, the recommending
在所述设定阈值大于或等于2的情况下,按照资源份额从大到小的顺序,从资源份额小于所述第一参数的资源容器中,确定出第一数目的资源容器;其中,所述第一数目等于所述设定阈值;In the case where the set threshold is greater than or equal to 2, according to the order of resource shares from large to small, a first number of resource containers are determined from resource containers whose resource shares are smaller than the first parameter; the first number is equal to the set threshold;
在所述第一数目的资源容器对应的资源总份额大于或等于所述第一参数的情况下,基于所述设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额确定出M个第一资源容器集合;In the case that the total resource share corresponding to the first number of resource containers is greater than or equal to the first parameter, based on the set threshold, the first parameter, and each resource container in the at least one resource container The corresponding resource shares determine M first resource container sets;
在所述第一数目的资源容器对应的资源总份额小于所述第一参数,且未查找到资源份额大于或等于所述第一参数的资源容器情况下,输出提示信息;所述提示信息表征不存在第一资源容器集合;When the total resource share corresponding to the first number of resource containers is less than the first parameter, and no resource container with a resource share greater than or equal to the first parameter is found, output prompt information; the prompt information represents the first resource container set does not exist;
在所述第一数目的资源容器对应的资源总份额小于所述第一参数,且查找到资源份额大于或等于所述第一参数的资源容器情况下,基于从资源份额大于或等于所述第一参数的资源容器中确定出M个第一资源容器集合,确定出的每个第一资源容器集合中包括一个资源容器。In the case that the total resource share corresponding to the first number of resource containers is less than the first parameter, and a resource container whose resource share is greater than or equal to the first parameter is found, M first resource container sets are determined in the resource container of one parameter, and each determined first resource container set includes one resource container.
在一实施例中,推荐单元82用于:In one embodiment, the recommending
在所述M为1的情况下,在所述至少一个资源容器中查找资源份额等于所述第一参数的第一资源容器;In the case where the M is 1, searching the at least one resource container for a first resource container whose resource share is equal to the first parameter;
在查找到所述第一资源容器的情况下,将所述第一资源容器确定为第一资源容器集合;In the case of finding the first resource container, determining the first resource container as a first resource container set;
在未查找到所述第一资源容器的情况下,基于设定阈值、所述第一参数以及所述至少一个资源容器中每个资源容器对应的资源份额,确定出资源总份额最小的第一资源容器集合。In the case where the first resource container is not found, based on the set threshold, the first parameter, and the resource share corresponding to each resource container in the at least one resource container, determine the first resource with the smallest total share of resources A collection of resource containers.
在一实施例中,推荐单元82用于:In one embodiment, the recommending
基于所述设定阈值和所述第一参数,对所述至少一个资源容器进行组合,得到所述N个资源容器集合;其中,每个资源容器集合中的资源容器的总数小于或等于所述设定阈值;Based on the set threshold and the first parameter, the at least one resource container is combined to obtain the N resource container sets; wherein, the total number of resource containers in each resource container set is less than or equal to the set threshold;
按照资源总份额从小到大的顺序,从所述N个资源容器集合中确定出M个第一资源容器集合。M first resource container sets are determined from the N resource container sets in an ascending order of the total resource share.
在一实施例中,推荐单元82用于:In one embodiment, the recommending
从资源份额大于或等于所述第一参数的第二资源容器中,确定出资源容器集合;确定出的每个资源容器集合中包括一个第二资源容器;Determine a resource container set from the second resource container whose resource share is greater than or equal to the first parameter; each determined resource container set includes a second resource container;
基于所述设定阈值和所述第一参数,对资源份额小于所述第一参数的第三资源容器进行组合,得到资源总份额大于或等于所述第一参数的资源容器集合。Based on the set threshold and the first parameter, a third resource container with a resource share smaller than the first parameter is combined to obtain a resource container set with a total resource share greater than or equal to the first parameter.
在一实施例中,推荐单元82用于:在所述M为1的情况下,从资源份额大于或等于所述第一参数的第二资源容器中,确定出资源份额最小的第二资源容器,得到一个资源容器集合。In one embodiment, the recommending
在一实施例中,推荐单元82用于:In one embodiment, the recommending
确定出资源容器集合的第一元素;所述第一元素为资源份额最大的一个所述第三资源容器;Determine the first element of the resource container set; the first element is the third resource container with the largest resource share;
基于所述设定阈值和第一差值,对除所述第一元素之外的第三资源容器进行组合,得到资源容器集合的第二元素;其中,Based on the set threshold and the first difference, combine the third resource containers except the first element to obtain the second element of the resource container set; wherein,
所述第一差值表征所述第一参数和所述第一元素对应的资源份额的差值;The first difference represents the difference between the first parameter and the resource share corresponding to the first element;
所述第二元素中包括至少一个所述第三资源容器;所述第二元素中的第三资源容器的总数小于或等于,第一设定阈值与1之间的差值。The second element includes at least one of the third resource containers; the total number of third resource containers in the second element is less than or equal to the difference between the first set threshold and 1.
实际应用时,确定单元和推荐单元可由信息推荐装置中的处理器来实现。当然,处理器需要运行存储器中存储的程序来实现上述各程序模块的功能。In practical application, the determining unit and the recommending unit may be implemented by a processor in the information recommending apparatus. Of course, the processor needs to run the program stored in the memory to realize the functions of the above program modules.
需要说明的是:上述实施例提供的信息推荐装置在采集人脸图像时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将信息推荐装置的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的信息推荐装置与信息推荐方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: when the information recommendation device provided in the above embodiment collects face images, only the division of the above program modules is used as an example for illustration. In practical applications, the above processing can be allocated to different program modules according to needs. , that is, dividing the internal structure of the information recommendation device into different program modules to complete all or part of the above-described processing. In addition, the information recommending apparatus and the information recommending method embodiments provided by the above embodiments belong to the same concept, and the specific implementation process thereof is detailed in the method embodiments, which will not be repeated here.
基于上述程序模块的硬件实现,且为了实现本发明实施例的方法,本发明实施例还提供了一种电子设备。图9为本发明实施例提供的电子设备的硬件组成结构示意图,如图9所示,电子设备包括:Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the present invention, the embodiment of the present invention further provides an electronic device. FIG. 9 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present invention. As shown in FIG. 9 , the electronic device includes:
通信接口1,能够与其它设备比如服务器、终端等进行信息交互;
处理器2,与通信接口1连接,以实现与其它设备进行信息交互,用于运行计算机程序时,执行上述一个或多个技术方案提供的信息推荐方法。而所述计算机程序存储在存储器3上。The
当然,实际应用时,电子设备中的各个组件通过总线系统4耦合在一起。可理解,总线系统4用于实现这些组件之间的连接通信。总线系统4除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图9中将各种总线都标为总线系统4。Of course, in practical application, various components in the electronic device are coupled together through the
本发明实施例中的存储器3用于存储各种类型的数据以支持电子设备的操作。这些数据的示例包括:用于在电子设备上操作的任何计算机程序。The
可以理解,存储器3可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、磁性随机存取存储器(FRAM,ferromagnetic random access memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory);磁表面存储器可以是磁盘存储器或磁带存储器。易失性存储器可以是随机存取存储器(RAM,Random AccessMemory),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(SRAM,Static Random Access Memory)、同步静态随机存取存储器(SSRAM,Synchronous Static Random Access Memory)、动态随机存取存储器(DRAM,Dynamic Random Access Memory)、同步动态随机存取存储器(SDRAM,SynchronousDynamic Random Access Memory)、双倍数据速率同步动态随机存取存储器(DDRSDRAM,Double Data Rate Synchronous Dynamic Random Access Memory)、增强型同步动态随机存取存储器(ESDRAM,Enhanced Synchronous Dynamic Random Access Memory)、同步连接动态随机存取存储器(SLDRAM,Sync Link Dynamic Random Access Memory)、直接内存总线随机存取存储器(DRRAM,Direct Rambus Random Access Memory)。本发明实施例描述的存储器3旨在包括但不限于这些和任意其它适合类型的存储器。It is understood that the
上述本发明实施例揭示的方法可以应用于处理器2中,或者由处理器2实现。处理器2可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器2中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器2可以是通用处理器、DSP,或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。处理器2可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本发明实施例所公开的方法的步骤,可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储介质中,该存储介质位于存储器3,处理器2读取存储器3中的程序,结合其硬件完成前述方法的步骤。The methods disclosed in the above embodiments of the present invention may be applied to the
处理器2执行所述程序时实现本发明实施例的各个方法中多核处理器对应的流程,为了简洁,在此不再赘述。When the
在示例性实施例中,本发明实施例还提供了一种存储介质,即计算机存储介质,具体为计算机可读存储介质,例如包括存储计算机程序的存储器3,上述计算机程序可由处理器2执行,以完成前述图1至图7对应的实施例中的所述步骤。计算机可读存储介质可以是FRAM、ROM、PROM、EPROM、EEPROM、Flash Memory、磁表面存储器、光盘、或CD-ROM等存储器。In an exemplary embodiment, an embodiment of the present invention further provides a storage medium, that is, a computer storage medium, specifically a computer-readable storage medium, for example, including a
在本发明所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored, or not implemented. In addition, the coupling, or direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical or other forms. of.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The unit described above as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本发明各实施例中的各功能单元可以全部集成在一个处理模块中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may all be integrated into one processing module, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integration The unit can be implemented either in the form of hardware or in the form of hardware plus software functional units.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by program instructions related to hardware, the aforementioned program can be stored in a computer-readable storage medium, and when the program is executed, execute Including the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: a mobile storage device, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk and other various A medium on which program code can be stored.
需要说明的是,本发明实施例所记载的技术方案之间,在不冲突的情况下,可以任意组合。It should be noted that, the technical solutions described in the embodiments of the present invention may be combined arbitrarily if there is no conflict.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention. should be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011310453.6A CN112308707A (en) | 2020-11-20 | 2020-11-20 | Information recommendation method, device and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011310453.6A CN112308707A (en) | 2020-11-20 | 2020-11-20 | Information recommendation method, device and electronic device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112308707A true CN112308707A (en) | 2021-02-02 |
Family
ID=74335129
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011310453.6A Pending CN112308707A (en) | 2020-11-20 | 2020-11-20 | Information recommendation method, device and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112308707A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110106690A1 (en) * | 2009-04-16 | 2011-05-05 | Jason Fisher | Preterm loan system and method of using the same |
CN109005214A (en) * | 2018-07-03 | 2018-12-14 | 阿里巴巴集团控股有限公司 | A kind of resource regulating method and device |
CN109389488A (en) * | 2018-09-14 | 2019-02-26 | 阿里巴巴集团控股有限公司 | Based on resource transfers method, system and the electronic equipment dynamically pledged |
CN109670850A (en) * | 2018-09-25 | 2019-04-23 | 深圳平安财富宝投资咨询有限公司 | Products Show method, apparatus, equipment and computer readable storage medium |
CN111507828A (en) * | 2020-04-21 | 2020-08-07 | 北京易点淘网络技术有限公司 | Pledge financing method and device for rental assets, storage medium and electronic equipment |
-
2020
- 2020-11-20 CN CN202011310453.6A patent/CN112308707A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110106690A1 (en) * | 2009-04-16 | 2011-05-05 | Jason Fisher | Preterm loan system and method of using the same |
CN109005214A (en) * | 2018-07-03 | 2018-12-14 | 阿里巴巴集团控股有限公司 | A kind of resource regulating method and device |
CN109389488A (en) * | 2018-09-14 | 2019-02-26 | 阿里巴巴集团控股有限公司 | Based on resource transfers method, system and the electronic equipment dynamically pledged |
CN109670850A (en) * | 2018-09-25 | 2019-04-23 | 深圳平安财富宝投资咨询有限公司 | Products Show method, apparatus, equipment and computer readable storage medium |
CN111507828A (en) * | 2020-04-21 | 2020-08-07 | 北京易点淘网络技术有限公司 | Pledge financing method and device for rental assets, storage medium and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112153085B (en) | Data processing method, node and block chain system | |
CN109150971B (en) | Super node voting and election method and device and network node | |
CN111586091B (en) | Edge computing gateway system for realizing computing power assembly | |
US11494403B2 (en) | Method and apparatus for storing off-chain data | |
WO2022142001A1 (en) | Target object evaluation method based on multi-score card fusion, and related device therefor | |
CN111752944B (en) | Data allocation method, device, computer equipment and storage medium | |
CN111788791A (en) | Computer-implemented voting process and system | |
CN116955361A (en) | Method and system for searching key range in memory | |
CN113608670B (en) | Blockchain data storage method based on fairness and access popularity | |
CN104077723A (en) | Social network recommending system and social network recommending method | |
WO2021217933A1 (en) | Community division method and apparatus for homogeneous network, and computer device and storage medium | |
CN105117489B (en) | Database management method and device and electronic equipment | |
CN106156317B (en) | A data security storage method based on attribute division | |
CN113434471B (en) | Data processing method, device, equipment and computer storage medium | |
CN112286457B (en) | Object deduplication method and device, electronic equipment and machine-readable storage medium | |
CN113326064A (en) | Method for dividing business logic module, electronic equipment and storage medium | |
CN112308707A (en) | Information recommendation method, device and electronic device | |
CN110069466B (en) | A small file storage method and device for distributed file system | |
CN114070847A (en) | Current limiting method, device, equipment and storage medium of server | |
CN113392138B (en) | Statistical analysis method, device, server and storage medium for private data | |
CN113064554B (en) | Optimal storage node matching method, device and medium based on distributed storage | |
CN113515716B (en) | Target pattern matching system and method with privacy protection function | |
CN111652741B (en) | User preference analysis method, device and readable storage medium | |
CN113873025A (en) | Data processing method and device, storage medium and electronic equipment | |
Sujatha et al. | An efficient Cloud Storage Model for GOP-Level Video deduplication using adaptive GOP structure |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210202 |
|
RJ01 | Rejection of invention patent application after publication |