CN108829932A - Interest matching method, device, computer equipment and storage medium - Google Patents

Interest matching method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN108829932A
CN108829932A CN201810492258.6A CN201810492258A CN108829932A CN 108829932 A CN108829932 A CN 108829932A CN 201810492258 A CN201810492258 A CN 201810492258A CN 108829932 A CN108829932 A CN 108829932A
Authority
CN
China
Prior art keywords
area
parameter
parameter list
list
mapping
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.)
Granted
Application number
CN201810492258.6A
Other languages
Chinese (zh)
Other versions
CN108829932B (en
Inventor
唐文杰
姚益平
朱峰
李田林
曲庆军
姚锋
张孟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National University of Defense Technology
Original Assignee
National University of Defense Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by National University of Defense Technology filed Critical National University of Defense Technology
Priority to CN201810492258.6A priority Critical patent/CN108829932B/en
Publication of CN108829932A publication Critical patent/CN108829932A/en
Application granted granted Critical
Publication of CN108829932B publication Critical patent/CN108829932B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请涉及一种兴趣匹配方法、装置、计算机设备和存储介质。方法包括:获取待匹配的第一区域与第二区域的边界参数,按照预设排序规则,分别对边界参数进行排序,分别获得参数列表,根据参数列表中各边界参数的数值大小以及对应的排序位置,确定第一区域参数列表的上界参数和下界参数在第二区域参数列表中对应的第一映射区间,并确定第二区域参数列表的上下界参数在第一区域参数列表中对应的第二映射区间,根据第一映射区间与第二映射区间,确定第一区域与第二区域的兴趣匹配结果。通过对参数排序提高匹配结果精确度,以及通过映射结果来判定兴趣匹配结果,显著减少待排序列表的长度或数目,减少排序开销,减小了数据处理量,从而提高了匹配效率。

The present application relates to an interest matching method, device, computer equipment and storage medium. The method includes: obtaining the boundary parameters of the first area and the second area to be matched, respectively sorting the boundary parameters according to the preset sorting rules, obtaining parameter lists respectively, and according to the numerical value of each boundary parameter in the parameter list and the corresponding sorting position, determine the first mapping interval corresponding to the upper and lower bound parameters of the first area parameter list in the second area parameter list, and determine the corresponding first mapping interval of the upper and lower bound parameters in the second area parameter list in the first area parameter list The second mapping interval, according to the first mapping interval and the second mapping interval, determine the interest matching result between the first area and the second area. By sorting the parameters to improve the accuracy of the matching results, and by mapping the results to determine the matching results of interest, the length or number of the list to be sorted is significantly reduced, the sorting overhead is reduced, and the amount of data processing is reduced, thereby improving the matching efficiency.

Description

兴趣匹配方法、装置、计算机设备和存储介质Interest matching method, device, computer equipment and storage medium

技术领域technical field

本申请涉及数据处理技术领域,特别是涉及一种兴趣匹配方法、装置、计算机设备和存储介质。The present application relates to the technical field of data processing, in particular to an interest matching method, device, computer equipment and storage medium.

背景技术Background technique

在分布式仿真中,基于公布/订购的通信将产生大量不相关的数据传输,从而降低仿真运行性能。HLA(High Level Architecture,高层体系结构)标准提供数据分发管理服务来过滤不必要的数据传输,减少联邦间的通信开销。数据生产者利用数据分发管理服务来维护其发送数据的属性(公布区域),而数据消费者可以利用数据分发管理服务来指定他们的数据需求(订购区域)。然后,运行支撑环境根据这些区域的兴趣匹配关系将生产者的数据分发给数据消费者。因此,兴趣匹配在数据分配管理中起着关键作用。In distributed simulation, publish/subscribe based communication will generate a large number of irrelevant data transfers, thereby degrading the performance of the simulation run. The HLA (High Level Architecture) standard provides data distribution management services to filter unnecessary data transmission and reduce communication overhead between federations. Data producers use the data distribution management service to maintain the attributes of the data they send (publication area), while data consumers can use the data distribution management service to specify their data requirements (subscription area). Then, the runtime support environment distributes the producer's data to the data consumer according to the interest matching relationship of these regions. Therefore, interest matching plays a key role in data distribution management.

然而,传统的兴趣匹配方法主要通过基于区域、基于网格等方式来实现,在实现兴趣匹配结果的同时,存在着匹配效率较低的问题。However, the traditional methods of interest matching are mainly realized by means of region-based and grid-based methods. While achieving the results of interest matching, there is a problem of low matching efficiency.

发明内容Contents of the invention

基于此,有必要针对兴趣匹配效率较低的技术问题,提供一种能够提高兴趣匹配效率的兴趣匹配方法、装置、计算机设备和存储介质。Based on this, it is necessary to provide an interest matching method, device, computer equipment and storage medium capable of improving the efficiency of interest matching for the technical problem of low efficiency of interest matching.

一种兴趣匹配方法,所述方法包括:A method for interest matching, the method comprising:

获取待匹配的第一区域与第二区域的边界参数,所述边界参数包括一一对应的上界参数与下界参数,其中,所述第一区域为公布区域且所述第二区域为订购区域,或所述第一区域为订购区域且所述第二区域为公布区域;Obtain boundary parameters of the first area to be matched and the second area, where the boundary parameters include one-to-one corresponding upper bound parameters and lower bound parameters, wherein the first area is a publishing area and the second area is a subscription area , or the first area is a subscription area and the second area is a publishing area;

按照预设排序规则,分别对所述第一区域与第二区域的边界参数进行排序,获得第一区域参数列表与第二区域参数列表,所述预设排序规则包括按照数值大小对下界参数进行排序或按照数值大小对上界参数进行排序;Sorting the boundary parameters of the first area and the second area respectively according to a preset sorting rule to obtain a first area parameter list and a second area parameter list, the preset sorting rule includes sorting the lower bound parameters according to the numerical value Sort or sort the upper bound parameters according to their numerical value;

根据所述第一区域参数列表与第二区域参数列表中各边界参数的数值大小以及对应的排序位置,确定所述第一区域参数列表的上界参数和下界参数在所述第二区域参数列表中对应的第一映射区间,并确定所述第二区域参数列表的上界参数和下界参数在所述第一区域参数列表中对应的第二映射区间;According to the numerical value and the corresponding sorting position of each boundary parameter in the first area parameter list and the second area parameter list, determine the upper bound parameter and the lower bound parameter of the first area parameter list in the second area parameter list The corresponding first mapping interval in the first area parameter list, and determine the second mapping interval corresponding to the upper bound parameter and the lower bound parameter of the second area parameter list in the first area parameter list;

根据所述第一映射区间与所述第二映射区间,确定所述第一区域与所述第二区域的兴趣匹配结果。Determine an interest matching result between the first area and the second area according to the first mapping interval and the second mapping interval.

在其中一个实施例中,所述根据所述第一区域参数列表与第二区域参数列表中各边界参数的数值大小以及对应的排序位置,确定所述第一区域参数列表的上界参数和下界参数在所述第二区域参数列表中对应的第一映射区间,并确定所述第二区域参数列表的上界参数和下界参数在所述第一区域参数列表中对应的第二映射区间包括:In one of the embodiments, the upper bound parameter and the lower bound of the first area parameter list are determined according to the numerical value and the corresponding sorting position of each boundary parameter in the first area parameter list and the second area parameter list The first mapping interval corresponding to the parameter in the second area parameter list, and determining the second mapping interval corresponding to the upper bound parameter and lower bound parameter of the second area parameter list in the first area parameter list include:

根据所述预设排序规则中确定的排序边界,确定待映射的第二区域的边界参数列表;determining a boundary parameter list of the second area to be mapped according to the sorting boundary determined in the preset sorting rule;

根据参数的数值大小,通过交替比较和二分查找确定所述第一区域参数列表中的上界参数和下界参数在所述第二区域的边界参数列表中对应的第一映射区间;According to the numerical value of the parameter, the first mapping interval corresponding to the upper bound parameter and the lower bound parameter in the first area parameter list in the boundary parameter list of the second area is determined through alternate comparison and binary search;

同理,确定所述第二区域参数列表的上界参数和下界参数在所述第一区域参数列表中对应的第二映射区间。Similarly, the second mapping interval corresponding to the upper bound parameter and the lower bound parameter of the second area parameter list in the first area parameter list is determined.

在其中一个实施例中,当预设排序规则为按照升序对下界参数进行排序时,待映射的第二区域的边界参数列表为下界列表,所述根据参数的数值大小,通过交替比较和二分查找确定所述第一区域参数列表中的上界参数和下界参数在所述第二区域的边界参数列表中对应的第一映射区间包括:In one of the embodiments, when the preset sorting rule is to sort the lower bound parameters in ascending order, the boundary parameter list of the second area to be mapped is a lower bound list, and according to the numerical value of the parameters, through alternate comparison and binary search Determining the first mapping interval corresponding to the upper bound parameter and lower bound parameter in the first area parameter list in the boundary parameter list of the second area includes:

通过交替比较所述第一区域参数列表中的下界参数和所述第二区域参数列表中的下界参数,确定所述第一区域参数列表中的下界参数在第二区域的下界列表中的第一映射位置;所述第一映射位置为所述第二区域的下界列表中数值不小于所述第一区域参数列表中的下界参数的参数对应位置;By alternately comparing the lower bound parameters in the first area parameter list with the lower bound parameters in the second area parameter list, it is determined that the lower bound parameter in the first area parameter list is the first in the lower bound list in the second area. Mapping position; the first mapping position is a position corresponding to a parameter whose value in the lower bound list of the second area is not less than the lower bound parameter in the first area parameter list;

以所述第一映射位置为起点,通过二分查找,确定所述第一区域参数列表中的上界参数在第二区域的下界列表中的第二映射位置;Using the first mapping position as a starting point, determine a second mapping position of the upper bound parameter in the first area parameter list in the lower bound list of the second area through binary search;

根据所述第一映射位置与所述第二映射位置,确定所述第一区域参数列表中的上界参数和下界参数在所述第二区域的边界参数列表中对应的第一映射区间。According to the first mapping position and the second mapping position, determine a first mapping interval corresponding to the upper bound parameter and the lower bound parameter in the first area parameter list in the boundary parameter list of the second area.

在其中一个实施例中,所述根据所述第一映射区间与所述第二映射区间,确定所述第一区域与所述第二区域的兴趣匹配结果包括:In one of the embodiments, the determining the interest matching result between the first area and the second area according to the first mapping interval and the second mapping interval includes:

根据所述第一映射区间与所述第二映射区间,生成覆盖信息矩阵;generating a coverage information matrix according to the first mapping interval and the second mapping interval;

根据所述覆盖信息矩阵,获得所述第一区域与所述第二区域的兴趣匹配结果。According to the coverage information matrix, an interest matching result between the first area and the second area is obtained.

在其中一个实施例中,所述根据所述第一映射区间与所述第二映射区间,生成覆盖信息矩阵包括:In one of the embodiments, the generating a coverage information matrix according to the first mapping interval and the second mapping interval includes:

根据所述第一区域与所述第二区域的边界参数数量,确定所述覆盖信息矩阵的行数和列数;determining the number of rows and columns of the coverage information matrix according to the number of boundary parameters between the first area and the second area;

获取所述第一映射区间与所述第二映射区间对应的id(identification,身份标识)参数列表,根据所述id参数列表确定所述覆盖信息矩阵的各组成元素;Obtain an id (identification, identity) parameter list corresponding to the first mapping interval and the second mapping interval, and determine each component element of the coverage information matrix according to the id parameter list;

根据所述覆盖信息矩阵的行数和列数、以及所述覆盖信息矩阵的各组成元素,生成覆盖信息矩阵。A coverage information matrix is generated according to the number of rows and columns of the coverage information matrix and each component element of the coverage information matrix.

在其中一个实施例中,所述获取所述第一映射区间与所述第二映射区间对应的id参数列表,根据所述id参数列表确定所述覆盖信息矩阵的各组成元素包括:In one of the embodiments, the obtaining the id parameter list corresponding to the first mapping interval and the second mapping interval, and determining each component element of the coverage information matrix according to the id parameter list includes:

获取初始化的覆盖信息矩阵以及所述第一映射区间与所述第二映射区间对应的id参数列表;Obtain an initialized coverage information matrix and an id parameter list corresponding to the first mapping interval and the second mapping interval;

根据所述第一映射区间以及对应的id参数列表,将所述初始化的覆盖信息矩阵中第一映射区间的对应元素更新为预设值;Updating corresponding elements of the first mapping interval in the initialized coverage information matrix to preset values according to the first mapping interval and the corresponding id parameter list;

根据所述第二映射区间以及对应的id参数列表,将所述更新的覆盖信息矩阵中第二映射区间的对应元素更新为所述预设值,以确定所述覆盖信息矩阵的各组成元素。According to the second mapping interval and the corresponding id parameter list, update the corresponding elements in the second mapping interval in the updated coverage information matrix to the preset values, so as to determine the constituent elements of the coverage information matrix.

在其中一个实施例中,所述根据所述覆盖信息矩阵,获得所述第一区域与所述第二区域的兴趣匹配结果包括:In one of the embodiments, the obtaining the interest matching result between the first area and the second area according to the coverage information matrix includes:

分别获取各维度的覆盖信息矩阵的组成元素,并根据所述各维度的覆盖信息矩阵的相同组成元素确定所述第一区域与所述第二区域的兴趣匹配结果。The constituent elements of the coverage information matrix of each dimension are obtained respectively, and the interest matching results of the first region and the second region are determined according to the same constituent elements of the coverage information matrix of each dimension.

一种兴趣匹配装置,所述装置包括:An interest matching device, the device comprising:

边界参数获取模块,用于获取待匹配的第一区域与第二区域的边界参数,所述边界参数包括一一对应的上界参数与下界参数,其中,所述第一区域为公布区域且所述第二区域为订购区域,或所述第一区域为订购区域且所述第二区域为公布区域;The boundary parameter acquisition module is used to acquire the boundary parameters of the first area to be matched and the second area, and the boundary parameters include a one-to-one corresponding upper bound parameter and lower bound parameter, wherein the first area is a published area and the The second area is a subscription area, or the first area is a subscription area and the second area is a publication area;

参数排序处理模块,用于按照预设排序规则,分别对所述第一区域与第二区域的边界参数进行排序,获得第一区域参数列表与第二区域参数列表,所述预设排序规则包括按照数值大小对下界参数进行排序或按照数值大小对上界参数进行排序;A parameter sorting processing module, configured to sort the boundary parameters of the first region and the second region respectively according to a preset sorting rule, and obtain a first region parameter list and a second region parameter list, and the preset sorting rule includes Sort the lower bound parameters according to the numerical value or sort the upper bound parameters according to the numerical value;

映射区间确定模块,用于根据所述第一区域参数列表与第二区域参数列表中各边界参数的数值大小以及对应的排序位置,确定所述第一区域参数列表的上界参数和下界参数在所述第二区域参数列表中对应的第一映射区间,并确定所述第二区域参数列表的上界参数和下界参数在所述第一区域参数列表中对应的第二映射区间;A mapping interval determination module, configured to determine the upper bound parameter and the lower bound parameter of the first area parameter list according to the numerical value of each boundary parameter in the first area parameter list and the second area parameter list and the corresponding sorting position. The corresponding first mapping interval in the second area parameter list, and determine the second mapping interval corresponding to the upper bound parameter and lower bound parameter of the second area parameter list in the first area parameter list;

兴趣匹配结果确定模块,用于根据所述第一映射区间与所述第二映射区间,确定所述第一区域与所述第二区域的兴趣匹配结果。An interest matching result determining module, configured to determine an interest matching result between the first area and the second area according to the first mapping interval and the second mapping interval.

一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时以下步骤。A computer device includes a memory and a processor, the memory stores a computer program, and the processor performs the following steps when executing the computer program.

获取待匹配的第一区域与第二区域的边界参数,所述边界参数包括一一对应的上界参数与下界参数,其中,所述第一区域为公布区域且所述第二区域为订购区域,或所述第一区域为订购区域且所述第二区域为公布区域;Obtain boundary parameters of the first area to be matched and the second area, where the boundary parameters include one-to-one corresponding upper bound parameters and lower bound parameters, wherein the first area is a publishing area and the second area is a subscription area , or the first area is a subscription area and the second area is a publishing area;

按照预设排序规则,分别对所述第一区域与第二区域的边界参数进行排序,获得第一区域参数列表与第二区域参数列表,所述预设排序规则包括按照数值大小对下界参数进行排序或按照数值大小对上界参数进行排序;Sorting the boundary parameters of the first area and the second area respectively according to a preset sorting rule to obtain a first area parameter list and a second area parameter list, the preset sorting rule includes sorting the lower bound parameters according to the numerical value Sort or sort the upper bound parameters according to their numerical value;

根据所述第一区域参数列表与第二区域参数列表中各边界参数的数值大小以及对应的排序位置,确定所述第一区域参数列表的上界参数和下界参数在所述第二区域参数列表中对应的第一映射区间,并确定所述第二区域参数列表的上界参数和下界参数在所述第一区域参数列表中对应的第二映射区间;According to the numerical value and the corresponding sorting position of each boundary parameter in the first area parameter list and the second area parameter list, determine the upper bound parameter and the lower bound parameter of the first area parameter list in the second area parameter list The corresponding first mapping interval in the first area parameter list, and determine the second mapping interval corresponding to the upper bound parameter and the lower bound parameter of the second area parameter list in the first area parameter list;

根据所述第一映射区间与所述第二映射区间,确定所述第一区域与所述第二区域的兴趣匹配结果。Determine an interest matching result between the first area and the second area according to the first mapping interval and the second mapping interval.

一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤。A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are realized.

获取待匹配的第一区域与第二区域的边界参数,所述边界参数包括一一对应的上界参数与下界参数,其中,所述第一区域为公布区域且所述第二区域为订购区域,或所述第一区域为订购区域且所述第二区域为公布区域;Obtain boundary parameters of the first area to be matched and the second area, where the boundary parameters include one-to-one corresponding upper bound parameters and lower bound parameters, wherein the first area is a publishing area and the second area is a subscription area , or the first area is a subscription area and the second area is a publishing area;

按照预设排序规则,分别对所述第一区域与第二区域的边界参数进行排序,获得第一区域参数列表与第二区域参数列表,所述预设排序规则包括按照数值大小对下界参数进行排序或按照数值大小对上界参数进行排序;Sorting the boundary parameters of the first area and the second area respectively according to a preset sorting rule to obtain a first area parameter list and a second area parameter list, the preset sorting rule includes sorting the lower bound parameters according to the numerical value Sort or sort the upper bound parameters according to their numerical value;

根据所述第一区域参数列表与第二区域参数列表中各边界参数的数值大小以及对应的排序位置,确定所述第一区域参数列表的上界参数和下界参数在所述第二区域参数列表中对应的第一映射区间,并确定所述第二区域参数列表的上界参数和下界参数在所述第一区域参数列表中对应的第二映射区间;According to the numerical value and the corresponding sorting position of each boundary parameter in the first area parameter list and the second area parameter list, determine the upper bound parameter and the lower bound parameter of the first area parameter list in the second area parameter list The corresponding first mapping interval in the first area parameter list, and determine the second mapping interval corresponding to the upper bound parameter and the lower bound parameter of the second area parameter list in the first area parameter list;

根据所述第一映射区间与所述第二映射区间,确定所述第一区域与所述第二区域的兴趣匹配结果。Determine an interest matching result between the first area and the second area according to the first mapping interval and the second mapping interval.

上述兴趣匹配方法、装置、计算机设备和存储介质,通过获取待匹配的第一区域与第二区域的边界参数,并采用按照数值大小对下界参数进行排序或按照数值大小对上界参数进行排序对参数进行排序,根据参数列表中参数的数值大小和所在位置,确定第一区域参数列表的上界参数和下界参数在第二区域参数列表中的映射区间,以及第二区域参数列表的上界参数和下界参数在第一区域参数列表中对应的第二映射区间,通过对参数排序提高匹配结果精确度,以及通过第一区域参数与第二区域参数的映射结果来判定兴趣匹配结果,显著减少待排序列表的长度或数目,减少排序开销,减小了数据处理量,从而提高了匹配效率。The above interest matching method, device, computer equipment, and storage medium obtain the boundary parameters of the first region to be matched and the second region, and sort the lower bound parameters according to the numerical value or sort the upper bound parameters according to the numerical value. The parameters are sorted, and according to the numerical value and location of the parameters in the parameter list, determine the mapping interval of the upper bound parameter and lower bound parameter of the first area parameter list in the second area parameter list, and the upper bound parameter of the second area parameter list In the second mapping interval corresponding to the lower bound parameter in the first area parameter list, the accuracy of the matching result is improved by sorting the parameters, and the matching result of the interest is determined by the mapping result of the first area parameter and the second area parameter, which significantly reduces waiting times. The length or number of the sorted list reduces sorting overhead, reduces the amount of data processing, and thus improves matching efficiency.

附图说明Description of drawings

图1为本申请一个实施例中兴趣匹配方法的流程示意图;FIG. 1 is a schematic flow diagram of an interest matching method in an embodiment of the present application;

图2为本申请另一个实施例中兴趣匹配方法的流程示意图;FIG. 2 is a schematic flow diagram of an interest matching method in another embodiment of the present application;

图3为本申请另一个实施例中兴趣匹配方法的流程示意图;FIG. 3 is a schematic flow diagram of an interest matching method in another embodiment of the present application;

图4为本申请一个实施例中兴趣匹配方法的步骤S750的流程示意图;FIG. 4 is a schematic flow chart of step S750 of the interest matching method in an embodiment of the present application;

图5为本申请一个应用实例中兴趣匹配方法的分类原理示意图;FIG. 5 is a schematic diagram of the classification principle of the interest matching method in an application example of the present application;

图6为本申请一个应用实例中兴趣匹配方法的参数排序列表示意图;FIG. 6 is a schematic diagram of a parameter sorting list of an interest matching method in an application example of the present application;

图7为本申请一个应用实例中兴趣匹配方法的参数映射位置示意图;Fig. 7 is a schematic diagram of the parameter mapping position of the interest matching method in an application example of the present application;

图8为本申请一个实施例中兴趣匹配装置的结构框图;FIG. 8 is a structural block diagram of an interest matching device in an embodiment of the present application;

图9为本申请一个实施例中计算机设备的内部结构图。FIG. 9 is an internal structure diagram of a computer device in an embodiment of the present application.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.

分布交互仿真环境是仿真技术和网络技术相结合的产物,由分散在各地的仿真设备通过局域网或广域网互联而成。由于分布交互仿真技术自身的优越性和实用性,目前已由军事领域的应用研发推广应用到教育、医疗、商业等非军事领域。随着仿真规模的扩大和仿真精度的提高,仿真网络的数据流量日益膨胀。在分布式仿真中,基于公布/订购的通信将产生大量不相关的数据传输,从而降低仿真运行性能。HLA标准提供数据分发管理(DataDistribution Management,简称DDM)服务来过滤不必要的数据传输,减少联邦间的通信开销。数据生产者利用DDM服务来维护其发送数据的属性(公布区域),而数据消费者可以利用DDM服务来指定他们的数据需求(订购区域)。然后,RTI(Run-Time Infrastructure,运行支撑环境)根据这些区域的兴趣匹配关系将生产者的数据分发给数据消费者。因此,兴趣匹配在数据分配管理中起着关键作用。没有兴趣匹配机制,会产生大量不必要的数据分发,这将严重降低仿真运行性能。但是,如果没有高效的兴趣匹配算法,仿真运行性能同样也会受到影响。The distributed interactive simulation environment is the product of the combination of simulation technology and network technology. It is formed by interconnecting simulation devices scattered in various places through LAN or WAN. Due to the superiority and practicability of the distributed interactive simulation technology itself, it has been promoted from the application research and development in the military field to non-military fields such as education, medical treatment, and commerce. With the expansion of simulation scale and improvement of simulation accuracy, the data flow of simulation network is expanding day by day. In distributed simulation, publish/subscribe based communication will generate a large number of irrelevant data transfers, thereby degrading the performance of the simulation run. The HLA standard provides Data Distribution Management (DDM for short) service to filter unnecessary data transmission and reduce communication overhead between federations. Data producers use DDM services to maintain the attributes of the data they send (publishing areas), while data consumers can use DDM services to specify their data requirements (ordering areas). Then, RTI (Run-Time Infrastructure, running support environment) distributes the producer's data to the data consumer according to the interest matching relationship of these areas. Therefore, interest matching plays a key role in data distribution management. Without an interest matching mechanism, a large amount of unnecessary data distribution will be generated, which will seriously degrade the simulation running performance. However, without efficient interest-matching algorithms, simulation runtime performance will suffer as well.

在一个实施例中,如图1所示,提供了一种兴趣匹配方法,方法包括:In one embodiment, as shown in FIG. 1 , an interest matching method is provided, which includes:

步骤S100,获取待匹配的第一区域与第二区域的边界参数,边界参数包括一一对应的上界参数与下界参数,其中,第一区域为公布区域且第二区域为订购区域,或第一区域为订购区域且第二区域为公布区域。Step S100, obtain the boundary parameters of the first area and the second area to be matched, the boundary parameters include one-to-one corresponding upper bound parameters and lower bound parameters, wherein, the first area is the publishing area and the second area is the subscription area, or the second area One area is the subscription area and the second area is the publishing area.

在联邦仿真中,区域是指接收的数据和可以发送的数据的限制范围,联邦成员可以通过区域定义向RTI声明自己的兴趣,包括希望接收的数据和可以发送的数据的限制条件。区域包括公布区域和订购区域,订购区域通过定义路径空间坐标区间来表达订购联邦成员的数据需求,公布区域通过定义路径空间坐标区间来维护发送数据的属性,第一区域可以是指订购区域也可以是指公布区域,由于订购区域与公布区域为待匹配区域,故当第一区域为公布区域时第二区域为订购区域,第一区域为订购区域时第二区域为公布区域。第一区域与第二区域均有若干参数构成,包括最小值对应的下界参数以及最大值对应的上界参数。可以理解,第一区域并不局限于一个区域,是同一类区域(订购或公布)的统称,第一区域可以包括若干个同类子区域,同一个子区域上界参数与下界参数一一对应。In the federated simulation, the area refers to the restricted range of data received and data that can be sent. Federation members can declare their interests to RTI through the area definition, including the data they want to receive and the data that can be sent. The area includes the publishing area and the ordering area. The ordering area expresses the data requirements of ordering federation members by defining the path space coordinate interval. The publishing area maintains the attributes of the sent data by defining the path space coordinate interval. The first area can refer to the ordering area or Refers to the release area. Since the order area and the release area are areas to be matched, when the first area is the release area, the second area is the order area, and when the first area is the order area, the second area is the release area. Both the first area and the second area are composed of several parameters, including a lower bound parameter corresponding to the minimum value and an upper bound parameter corresponding to the maximum value. It can be understood that the first area is not limited to one area, and is a general term for the same type of area (subscription or release). The first area may include several sub-areas of the same type, and the upper bound parameter and the lower bound parameter of the same sub-area correspond one-to-one.

步骤S300,按照预设排序规则,分别对第一区域与第二区域的边界参数进行排序,获得第一区域参数列表与第二区域参数列表,预设排序规则包括按照数值大小对下界参数进行排序或按照数值大小对上界参数进行排序。Step S300, respectively sort the boundary parameters of the first area and the second area according to the preset sorting rules, and obtain the first area parameter list and the second area parameter list. The preset sorting rules include sorting the lower bound parameters according to the numerical value Or sort the upper bound parameters according to their numerical value.

第一区域中包括若干子区域,每个子区域包括上界参数与下界参数,通过预设的排序规则,如按照数值大小对下界参数分别对第一区域与第二区域的边界参数进行排序,由于上界参数与下界参数一一对应,当对下界参数按照数值大小进行排序时,上界区域也对应重新排列,得到参数列表,参数列表包括升序或降序排列的下参数列表以及对应的上参数列表,同理,可按照升序或降序对上界参数进行排序,获得第一区域参数列表与第二区域参数列表。The first area includes several sub-areas, and each sub-area includes an upper bound parameter and a lower bound parameter. Through the preset sorting rules, such as sorting the boundary parameters of the first area and the second area according to the numerical value of the lower bound parameter, because There is a one-to-one correspondence between the upper bound parameters and the lower bound parameters. When the lower bound parameters are sorted according to the numerical value, the upper bound area is also rearranged accordingly to obtain the parameter list. The parameter list includes the lower parameter list in ascending or descending order and the corresponding upper parameters. Similarly, the upper bound parameters can be sorted in ascending or descending order to obtain the first area parameter list and the second area parameter list.

步骤S500,根据第一区域参数列表与第二区域参数列表中各边界参数的数值大小以及对应的排序位置,确定第一区域参数列表的上界参数和下界参数在第二区域参数列表中对应的第一映射区间,并确定第二区域参数列表的上界参数和下界参数在第一区域参数列表中对应的第二映射区间。Step S500, according to the numerical value and the corresponding sorting position of each boundary parameter in the first area parameter list and the second area parameter list, determine the corresponding upper bound parameter and lower bound parameter in the first area parameter list in the second area parameter list The first mapping interval, and determining the second mapping interval corresponding to the upper bound parameter and the lower bound parameter of the second area parameter list in the first area parameter list.

映射区间是指上下界参数在对应待映射参数列表中的映射位置构成的区间,举例来说,将第一区域的上下界参数映射到第二区域的参数列表,映射区间的确定方法为:第一区域的上界参数的映射位置为第二区域待映射参数列表中不小于该上界参数的最大参数对应的位置,第一区域的下界参数的映射位置为第二区域待映射参数列表中大于或等于该下界参数的最小参数对应的位置,上下参数的映射位置构成映射区间。The mapping interval refers to the interval formed by the mapping positions of the upper and lower bound parameters in the corresponding parameter list to be mapped. For example, to map the upper and lower bound parameters of the first area to the parameter list of the second area, the method for determining the mapping interval is: The mapping position of the upper bound parameter of a region is the position corresponding to the largest parameter not smaller than the upper bound parameter in the parameter list to be mapped in the second region, and the mapping position of the lower bound parameter of the first region is greater than Or equal to the position corresponding to the minimum parameter of the lower bound parameter, and the mapping positions of the upper and lower parameters constitute the mapping interval.

步骤S700,根据第一映射区间与第二映射区间,确定第一区域与第二区域的兴趣匹配结果。Step S700, according to the first mapping interval and the second mapping interval, determine the interest matching result between the first area and the second area.

根据判定条件,为了获得匹配信息,核心工作是确定每个订购区域包含了哪些公布区域的下界以及每个公布区域包含了哪些订购区域的下界,即对应的映射区间。通过第一映射区间与第二映射区间,可以判断两个区域是否重叠,从而得到兴趣匹配结果。According to the judgment conditions, in order to obtain the matching information, the core work is to determine the lower bounds of the announced areas included in each ordered area and the lower bounds of the ordered areas included in each announced area, that is, the corresponding mapping interval. Through the first mapping interval and the second mapping interval, it can be judged whether the two regions overlap, so as to obtain the interest matching result.

上述兴趣匹配方法,通过获取待匹配的第一区域与第二区域的边界参数,并采用按照数值大小对下界参数进行排序或按照数值大小对上界参数进行排序对参数进行排序,根据参数列表中参数的数值大小和所在位置,确定第一区域参数列表的上界参数和下界参数在第二区域参数列表中的映射区间,以及第二区域参数列表的上界参数和下界参数在第一区域参数列表中对应的第二映射区间,通过对参数排序提高匹配结果精确度,以及通过第一区域参数与第二区域参数的映射结果来判定兴趣匹配结果,显著减少待排序列表的长度或数目,减少排序开销,减小了数据处理量,从而提高了匹配效率。The above interest matching method obtains the boundary parameters of the first area and the second area to be matched, and sorts the parameters by sorting the lower bound parameters according to the numerical value or sorting the upper bound parameters according to the numerical value, and sorts the parameters according to the parameter list The numerical value and location of the parameter determine the mapping interval of the upper bound parameter and lower bound parameter of the first area parameter list in the second area parameter list, and the upper bound parameter and lower bound parameter of the second area parameter list are in the first area parameter In the second mapping interval corresponding to the list, the accuracy of the matching result is improved by sorting the parameters, and the matching result of the interest is determined by the mapping result of the first area parameter and the second area parameter, which significantly reduces the length or number of the list to be sorted, and reduces Sorting overhead reduces the amount of data processing, thereby improving matching efficiency.

如图2所示,在一个实施例中,步骤S500包括:As shown in Figure 2, in one embodiment, step S500 includes:

步骤S520,根据预设排序规则中确定的排序边界,确定待映射的第二区域的边界参数列表。Step S520, according to the sorting boundaries determined in the preset sorting rules, determine the boundary parameter list of the second area to be mapped.

排序规则包括按照升序或降序对下界参数进行排序,或按照升序或降序对上界参数进行排序,根据确定的排序规则,可以确定排序边界为上界还是下界。排序边界与待映射边界参数列表对应的边界相同,当排序边界为上界时,待映射边界参数列表为上界列表。The sorting rules include sorting the lower bound parameters in ascending or descending order, or sorting the upper bound parameters in ascending or descending order. According to the determined sorting rules, it can be determined whether the sorting boundary is the upper bound or the lower bound. The sorting boundary is the same as the boundary corresponding to the boundary parameter list to be mapped, and when the sorting boundary is an upper bound, the boundary parameter list to be mapped is an upper bound list.

步骤S540,根据参数的数值大小,通过交替比较和二分查找确定第一区域参数列表中的上界参数和下界参数在第二区域的边界参数列表中对应的第一映射区间。Step S540, according to the numerical value of the parameter, determine the first mapping interval corresponding to the upper bound parameter and the lower bound parameter in the first area parameter list in the second area boundary parameter list through alternate comparison and binary search.

同理,确定第二区域参数列表的上界参数和下界参数在第一区域参数列表中对应的第二映射区间。Similarly, the second mapping interval corresponding to the upper bound parameter and the lower bound parameter of the second area parameter list in the first area parameter list is determined.

二分查找也称折半查找,是一种效率较高的查找方法,折半查找要求线性表必须采用顺序存储结构,而且表中元素按关键字有序排列,假设待映射的第二区域的下界列表中元素是按升序排列,将该下界列表中间位置记录的参数值与第一区域的上界参数值比较,如果两者相等,则该参数列表值对应位置为该上界参数映射位置,如果该参数列表值大于该上界值且该参数列表值的相邻参数列表值小于该上界值,则该相邻参数列表值对应位置为该上参数映射位置,为查找成功;否则利用中间位置记录将表分成前、后两个子表,如果中间位置记录的参数值大于该上界参数值,则进一步查找前一子表,否则进一步查找后一子表,重复以上过程,直到找到满足条件的记录。Binary search, also known as binary search, is a more efficient search method. Binary search requires that the linear table must adopt a sequential storage structure, and the elements in the table are arranged in order according to the keywords. Assuming that the lower bound list of the second area to be mapped is The elements are arranged in ascending order, and the parameter value recorded in the middle position of the lower bound list is compared with the upper bound parameter value of the first area. If the two are equal, the corresponding position of the parameter list value is the mapping position of the upper bound parameter. If the parameter If the list value is greater than the upper limit value and the adjacent parameter list value of the parameter list value is smaller than the upper limit value, then the corresponding position of the adjacent parameter list value is the mapping position of the upper parameter, and the search is successful; otherwise, the intermediate position record will be The table is divided into two sub-tables, front and back. If the parameter value recorded in the middle position is greater than the upper bound parameter value, the previous sub-table is further searched, otherwise, the latter sub-table is further searched, and the above process is repeated until a record satisfying the condition is found.

在一个实施例中,当预设排序规则为按照升序对下界参数进行排序时,待映射的第二区域的边界参数列表为下界列表,步骤S540包括:In one embodiment, when the preset sorting rule is to sort the lower bound parameters in ascending order, the list of bounding parameters of the second region to be mapped is a lower bound list, and step S540 includes:

通过交替比较第一区域参数列表中的下界参数和第二区域参数列表中的下界参数,确定第一区域参数列表中的下界参数在第二区域的下界列表中的第一映射位置,第一映射位置为第二区域的下界列表中数值不小于第一区域参数列表中的下界参数的参数对应位置。By alternately comparing the lower bound parameter in the first area parameter list with the lower bound parameter in the second area parameter list, determine the first mapping position of the lower bound parameter in the first area parameter list in the lower bound list of the second area, the first mapping The position is the position corresponding to the parameter whose value in the lower bound list of the second area is not less than the lower bound parameter in the parameter list of the first area.

以第一映射位置为起点,通过二分查找,确定第一区域参数列表中的上界参数在第二区域的下界列表中的第二映射位置,第二映射位置为第二区域的下界列表中数值不大于第一区域参数列表中的上界参数的参数对应位置。Starting from the first mapping position, determine the second mapping position of the upper bound parameter in the parameter list of the first area in the lower bound list of the second area through binary search, and the second mapping position is the value in the lower bound list of the second area The corresponding position of the parameter not greater than the upper bound parameter in the parameter list of the first area.

根据第一映射位置与第二映射位置,确定第一区域参数列表中的上界参数和下界参数在第二区域的边界参数列表中对应的第一映射区间。According to the first mapping position and the second mapping position, determine the first mapping interval corresponding to the upper bound parameter and the lower bound parameter in the first area parameter list in the boundary parameter list of the second area.

在一个实施例中,根据不同的预设排序规则,第一映射位置与第二映射位置的确定方法分别为:In one embodiment, according to different preset sorting rules, the methods for determining the first mapping position and the second mapping position are respectively:

当预设排序规则为按照降序对下界参数进行排序时,待映射的第二区域的边界参数列表为下界列表时:When the default sorting rule is to sort lower bound parameters in descending order, and the bound parameter list of the second area to be mapped is a lower bound list:

通过交替比较第一区域参数列表中的下界参数和第二区域参数列表中的下界参数,确定第二区域的下界列表中数值不大于第一区域参数列表中的下界参数的参数对应位置为第一映射位置;以第一映射位置为起点,通过二分查找,确定第二区域的下界列表中数值不小于第一区域参数列表中的上界参数的参数对应位置位第二映射位置。By alternately comparing the lower bound parameters in the first area parameter list and the lower bound parameters in the second area parameter list, it is determined that the corresponding position of the parameter whose value in the lower bound list of the second area is not greater than the lower bound parameter in the first area parameter list is the first Mapping position: starting from the first mapping position, through binary search, it is determined that the corresponding position of the parameter whose value in the lower bound list of the second area is not less than the upper bound parameter in the parameter list of the first area is set as the second mapping position.

当预设排序规则为按照升序对上界参数进行排序时,待映射的第二区域的边界参数列表为上界列表时:When the default sorting rule is to sort the upper bound parameters in ascending order, and the bound parameter list of the second area to be mapped is the upper bound list:

通过交替比较第一区域参数列表中的上界参数和第二区域参数列表中的上界参数,确定第二区域的上界列表中数值不小于第一区域参数列表中的上界参数的参数对应位置为第一映射位置;以第一映射位置为起点,通过二分查找,确定第二区域的上界列表中数值不大于第一区域参数列表中的下界参数的参数对应位置位第二映射位置。By alternately comparing the upper bound parameter in the first area parameter list with the upper bound parameter in the second area parameter list, determine the parameter corresponding to the parameter whose value in the upper bound list of the second area is not smaller than the upper bound parameter in the first area parameter list The position is the first mapping position; starting from the first mapping position, through binary search, it is determined that the corresponding position of the parameter whose value in the upper bound list of the second area is not greater than the lower bound parameter in the first area parameter list is set as the second mapping position.

当预设排序规则为按照降序对上界参数进行排序时,待映射的第二区域的边界参数列表为上界列表时:When the default sorting rule is to sort the upper bound parameters in descending order, and the bound parameter list of the second area to be mapped is the upper bound list:

通过交替比较第一区域参数列表中的上界参数和第二区域参数列表中的上界参数,确定第二区域的上界列表中数值不大于第一区域参数列表中的上界参数的参数对应位置为第一映射位置;以第一映射位置为起点,通过二分查找,确定第二区域的上界列表中数值不小于第一区域参数列表中的下界参数的参数对应位置位第二映射位置。By alternately comparing the upper bound parameter in the first area parameter list with the upper bound parameter in the second area parameter list, determine the parameter corresponding to the parameter whose value in the upper bound list of the second area is not greater than the upper bound parameter in the first area parameter list The position is the first mapping position; starting from the first mapping position, through binary search, it is determined that the corresponding position of the parameter whose value in the upper bound list of the second area is not less than the lower bound parameter in the first area parameter list is set as the second mapping position.

在一个应用实例中,为方便理解,将两个区域分别命名为公布区域U和订购区域S,其中,区域U的范围是[ULB(下界),UUB(上界)],S的范围为[SLB,SUB]。如图5所示,当U与S重叠时,总共有四种情况。研究发现,这四种情况可以进一步分为两种情况,一种是U的下界位于区域S中,另一种是S的下界位于U中。根据深入研究,提供了两个互斥的充分必要的条件来判断区域的重叠关系:In an application example, for the convenience of understanding, the two areas are respectively named as the publishing area U and the subscription area S, wherein the range of the area U is [U LB (lower bound), U UB (upper bound)], and the range of S is [S LB , S UB ]. As shown in Figure 5, when U overlaps S, there are four cases in total. It is found that these four cases can be further divided into two cases, one is that the lower bound of U is located in region S, and the other is that the lower bound of S is located in U. According to in-depth research, two mutually exclusive sufficient and necessary conditions are provided to judge the overlapping relationship of regions:

ULB∈[SLB,SUB) (1)U LB ∈ [S LB , S UB ) (1)

SLB∈[ULB,UUB) (2)S LB ∈ [U LB , U UB ) (2)

由于两个条件是互斥的,只需要满足其中任意一个条件,即可以用来判断重叠关系。Since the two conditions are mutually exclusive, only one of the conditions needs to be met to judge the overlapping relationship.

为描述方便,订购区域下界记为SL,订购区域上界记为SU,公布区域记为U,公布区域下界记为UL,公布区域上界记为UU。假设U包含了一组订购区域下界{SLi,SLi+1,SLi+2,…,SLi+k},值i和i+k分别代表了将U的上下界值映射到SL列表上的位置,引入两个参数表示映射区间对应位置,比较索引下界(CIL)和比较索引上界(CIU),分别表示将U的上下界值映射到SL列表上的位置,即第一映射位置和第二映射位置,此处即为i和i+k。如图7所示,区域[UL0,UU0]的CIL和CIU分别是2和5,同样,区间[SL0,SU0]的CIL和CIU分别是0和1。因此,区域[SL2,SU2],[SL3,SU3],[SL4,SU4]和[SL5,SU5]与[UL0,UU0)存在重叠参数,而[UL0,UU0)和[UL1,UU1)与[SL0,SU0)存在重叠参数。当获得所有公布和订购区域的CIL和CIU值时,可以获得所有区域在这一维上的匹配关系,在计算每个公布和订购区域的CIL和CIU值的过程中,鉴于列表SL和UL已经排序,通过将SL中的值与UL中的值进行交替比较可以很容易地获得CIL值。在计算CIU值时,如果将区域的上限与SL或UL中的值逐个比较,计算N个区域的CIU值将在最差情况下产生O(N2)计算复杂度。由于SL和UL列表已经排好序,二分查找能有效地定位到CIU值。考虑到区域的CIL值已经确定,随着区域下界值的增大,对应的CIL值也会相应地变大,所以搜索范围会变小,获取单个区域的CIU的计算复杂度理论上小于O(logN)。即使在最坏的情况下,计算单个CIU值的计算复杂度为O(logN)。For the convenience of description, the lower bound of the subscription area is marked as SL, the upper bound of the ordered area is marked as SU, the published area is marked as U, the lower bound of the public area is marked as UL, and the upper bound of the public area is marked as UU. Assuming that U contains a set of order area lower bounds {SL i , SL i+1 , SL i+2 , ..., SL i+k }, the values i and i+k respectively represent the mapping of the upper and lower bounds of U to the SL list Introducing two parameters to indicate the corresponding position of the mapping interval, the lower bound of the comparison index (CIL) and the upper bound of the comparison index (CIU), which respectively represent the positions where the upper and lower bounds of U are mapped to the SL list, that is, the first mapping position and the second mapping position, i and i+k here. As shown in FIG. 7 , the CIL and CIU of the area [UL 0 , UU 0 ] are 2 and 5, respectively, and similarly, the CIL and CIU of the interval [SL 0 , SU 0 ] are 0 and 1, respectively. Therefore, the areas [SL 2 , SU 2 ], [SL 3 , SU 3 ], [SL 4 , SU 4 ] and [SL 5 , SU 5 ] have overlapping parameters with [UL 0 , UU 0 ), while [UL 0 , UU 0 ) and [UL 1 , UU 1 ) have overlapping parameters with [SL 0 , SU 0 ). When the CIL and CIU values of all announced and subscribed areas are obtained, the matching relationship of all areas on this dimension can be obtained. In the process of calculating the CIL and CIU values of each announced and ordered area, given that the lists SL and UL have Sorting, the CIL value is easily obtained by alternately comparing the value in SL with the value in UL. When calculating the CIU value, if the upper limit of the area is compared with the value in SL or UL one by one, calculating the CIU value of N areas will generate O(N 2 ) computational complexity in the worst case. Since the SL and UL lists are sorted, binary search can efficiently locate the CIU value. Considering that the CIL value of the area has been determined, as the lower limit value of the area increases, the corresponding CIL value will also increase accordingly, so the search range will become smaller, and the computational complexity of obtaining the CIU of a single area is theoretically less than O( logN). Even in the worst case, the computational complexity of computing a single CIU value is O(logN).

如图2所示,在一个实施例中,步骤S700包括步骤S720和步骤S780。As shown in FIG. 2, in one embodiment, step S700 includes step S720 and step S780.

步骤S720,根据第一映射区间与第二映射区间,生成覆盖信息矩阵。Step S720, generating a coverage information matrix according to the first mapping interval and the second mapping interval.

第一映射区间与第二映射区间用于判断两个区域是否重合,第一映射区间与第二映射区间可以确定覆盖信息矩阵的组成。The first mapping interval and the second mapping interval are used to determine whether two areas overlap, and the first mapping interval and the second mapping interval can determine the composition of the coverage information matrix.

如图3所示,在其中一个实施例中,步骤S720包括步骤S730、步骤S750以及步骤S770。As shown in FIG. 3 , in one embodiment, step S720 includes step S730 , step S750 and step S770 .

步骤S730,根据第一区域与第二区域的边界参数数量,确定覆盖信息矩阵的行数和列数。Step S730: Determine the number of rows and columns of the coverage information matrix according to the number of boundary parameters between the first area and the second area.

第一区域可以由多个公布区域或多个订购区域构成,为方便描述,以下称第一区域的多个独立的公布区域或订购区域为子区域,需要强调的是,每个公布区域或订购区域都是独立的个体。每个子区域包括一个上界参数和一个下界参数,上界参数或下界参数的数量即为第一区域的子区域的数量,同理,可确定第二区域的子区域的数量,覆盖信息矩阵的行数与列数,与第一区域和第二区域的子区域数量相同,根据第一区域与第二区域的边界参数数量,确定覆盖信息矩阵的行数和列数,矩阵的各元素即第一区域与第二区域的重叠信息。The first area can be composed of multiple publishing areas or multiple ordering areas. For the convenience of description, multiple independent publishing areas or ordering areas of the first area are referred to as sub-areas. Regions are independent entities. Each sub-area includes an upper bound parameter and a lower bound parameter, and the number of the upper bound parameter or the lower bound parameter is the number of sub-areas in the first area. Similarly, the number of sub-areas in the second area can be determined to cover the information matrix. The number of rows and columns is the same as the number of sub-regions in the first region and the second region. According to the number of boundary parameters between the first region and the second region, the number of rows and columns of the coverage information matrix is determined. Each element of the matrix is the first Overlapping information of a region and a second region.

步骤S750,获取第一映射区间与第二映射区间对应的id参数列表,根据id参数列表确定覆盖信息矩阵的各组成元素。In step S750, the id parameter list corresponding to the first mapping interval and the second mapping interval is obtained, and each component element of the coverage information matrix is determined according to the id parameter list.

第一映射区间是第一区域参数列表的上界参数和下界参数在第二区域参数列表中对应的映射位置构成的区间,即第二区域参数列表中该区间对应的子区域,与第一区域参数列表的上界参数和下界参数所在的子区域有重叠部分。id参数列表是用于存储对应的第一区域各参数对应的id和第二区域各参数对应的id的辅助列表,每个区域都对应一个id标识来区分,通过id参数列表可以确定覆盖信息矩阵的各组成元素的位置。The first mapping interval is the interval formed by the corresponding mapping positions of the upper bound parameter and the lower bound parameter of the first area parameter list in the second area parameter list, that is, the sub-area corresponding to this interval in the second area parameter list, and the first area The subregions where the upper and lower bound parameters of the parameter list overlap. The id parameter list is an auxiliary list used to store the corresponding id corresponding to each parameter in the first area and the id corresponding to each parameter in the second area. Each area corresponds to an id identifier to distinguish, and the coverage information matrix can be determined through the id parameter list The position of each component element of .

如图4所示,在其中一个实施例中,步骤S750包括:As shown in Figure 4, in one embodiment, step S750 includes:

步骤S752,获取初始化的覆盖信息矩阵以及第一映射区间与第二映射区间对应的id参数列表。Step S752, obtaining an initialized coverage information matrix and an id parameter list corresponding to the first mapping interval and the second mapping interval.

初始化的覆盖信息矩阵是指对矩阵的所有元素进行初始化,其中,初始化的元素对应的信息为第一区域与第二区域的参数不重叠。在实施例中,可以用“1”或“0”表示重叠与不重叠,或是用“true”或“false”表示重叠与不重叠。The initialized coverage information matrix means to initialize all the elements of the matrix, wherein the information corresponding to the initialized elements is that the parameters of the first area and the second area do not overlap. In an embodiment, "1" or "0" may be used to indicate overlapping or non-overlapping, or "true" or "false" may be used to indicate overlapping or non-overlapping.

步骤S754,根据第一映射区间以及对应的id参数列表,将初始化的覆盖信息矩阵中第一映射区间的对应元素更新为预设值。Step S754, according to the first mapping interval and the corresponding id parameter list, update the corresponding elements of the first mapping interval in the initialized coverage information matrix to preset values.

步骤S756,根据第二映射区间以及对应的id参数列表,将更新的覆盖信息矩阵中第二映射区间的对应元素更新为预设值,以确定覆盖信息矩阵的各组成元素。Step S756, according to the second mapping interval and the corresponding id parameter list, update the corresponding elements in the updated coverage information matrix in the second mapping interval to preset values, so as to determine the constituent elements of the coverage information matrix.

在一个应用实例中,第一区域的数量为M,第二区域的数量为N,M*N的位矩阵用于存储覆盖信息,矩阵元素值表示第一区域和第二区域之间的覆盖关系,采用“true”或“false”表示重叠与不重叠,初始化的矩阵的各元素均为“false”。第一映射区间表示第一区域的各子区域在第二区域的映射位置,例如第一区域的第5个子区域在第二区域的映射位置的映射区间为[4,8],则将M*N矩阵的第5行的第4列至第8列对应的元素更新为“true”,同理,可将M*N矩阵的每一行参数进行更新。第二映射区间表示第二区域的各子区域在第一区域的映射位置,同理,可将M*N矩阵的每一列参数进行更新,由于确定的第一映射区间和第二映射区间为判断第一区域与第二区域重叠的互斥的两个充分必要条件,所以根据第一映射区间与第二映射区间对覆盖信息单元进行二次赋值,即可确定覆盖信息矩阵的各组成元素,从而得到兴趣匹配结果。In an application example, the number of the first area is M, the number of the second area is N, the M*N bit matrix is used to store the coverage information, and the matrix element value represents the coverage relationship between the first area and the second area , using "true" or "false" to indicate overlapping or non-overlapping, and each element of the initialized matrix is "false". The first mapping interval indicates the mapping position of each sub-area of the first area in the second area. For example, the mapping interval of the mapping position of the fifth sub-area of the first area in the second area is [4,8], then M* The elements corresponding to the fourth column to the eighth column of the fifth row of the N matrix are updated to "true". Similarly, the parameters of each row of the M*N matrix can be updated. The second mapping interval indicates the mapping position of each sub-area of the second area in the first area. Similarly, each column parameter of the M*N matrix can be updated, because the determined first mapping interval and the second mapping interval are judged There are two mutually exclusive sufficient and necessary conditions for the overlapping of the first area and the second area, so the second assignment of the coverage information unit according to the first mapping interval and the second mapping interval can determine the elements of the coverage information matrix, so that Get interest matching results.

步骤S770,根据覆盖信息矩阵的行数和列数、以及覆盖信息矩阵的各组成元素,生成覆盖信息矩阵。Step S770, generating a coverage information matrix according to the number of rows and columns of the coverage information matrix and each component element of the coverage information matrix.

根据矩阵的行数与列数,可以确定矩阵的基本构成,获取矩阵的各组成元素,对初始化的元素进行赋值更新,即可生成所需的覆盖信息矩阵。According to the number of rows and columns of the matrix, the basic composition of the matrix can be determined, each component element of the matrix can be obtained, and the initialized elements can be assigned and updated to generate the required coverage information matrix.

步骤S780,根据覆盖信息矩阵,获得第一区域与第二区域的兴趣匹配结果。Step S780, according to the coverage information matrix, the interest matching result between the first area and the second area is obtained.

覆盖信息矩阵可以直观的记录与表征第一区域与第二区域的兴趣匹配结果,只需通过查找矩阵中各组成元素,即可判断第一区域与第二区域的各子区域是否重叠,得到兴趣匹配结果。The coverage information matrix can intuitively record and characterize the interest matching results of the first area and the second area. Just by looking up the elements in the matrix, you can judge whether the sub-areas of the first area and the second area overlap, and get the interest matching results.

如图3所示,在一个实施例中,步骤S780包括步骤S790,分别获取各维度的覆盖信息矩阵的组成元素,并根据各维度的覆盖信息矩阵的相同组成元素确定第一区域与第二区域的兴趣匹配结果。As shown in FIG. 3 , in one embodiment, step S780 includes step S790, respectively obtaining the constituent elements of the coverage information matrix of each dimension, and determining the first area and the second area according to the same constituent elements of the coverage information matrix of each dimension interest matching results.

在应用过程中,兴趣匹配包含多个维度的信息,每一维度的兴趣匹配方法相同,通过确定多个维度的同一矩阵位置的元素的交集,可以判断多维度下的第一区域与第二区域的兴趣匹配结果,即公布区域与订购区域的兴趣匹配结果。In the application process, interest matching includes information of multiple dimensions, and the method of interest matching in each dimension is the same. By determining the intersection of elements in the same matrix position in multiple dimensions, the first area and the second area under multi-dimensionality can be judged The interest matching result of , that is, the interest matching result of the announcement area and the subscription area.

本申请提出的兴趣匹配算法,并采用两个互斥的区域重叠判定条件作为判定公布区域和订购区域的匹配关系的充分必要条件,旨在减少排序开销、避免不必要的位操作、以及避免因过滤不正确匹配所产生的开销只有两个长度为N的边界值列表需要进行排序,可以显着减少待排序列表的长度或数目。而且采用两个互斥的判定条件作为两个区域重叠的判定条件,满足其中一个即可确定两个区域重叠,兴趣匹配成功,根据这两个判定条件,通过二分查找,可以更快速地获取公布订购区域之间的匹配关系,不需要再借助于位数组操作。The interest matching algorithm proposed in this application adopts two mutually exclusive area overlap judgment conditions as the sufficient and necessary conditions for judging the matching relationship between the announcement area and the subscription area, aiming at reducing sorting overhead, avoiding unnecessary bit operations, and avoiding The overhead generated by filtering incorrect matches is only two lists of boundary values of length N to be sorted, which can significantly reduce the length or number of lists to be sorted. Moreover, two mutually exclusive judging conditions are used as the judging condition for the overlapping of two regions. If one of them is met, it can be determined that the two regions overlap, and the interest matching is successful. According to these two judging conditions, through binary search, the announcement can be obtained more quickly. The matching relationship between order areas does not need to rely on bit array operations.

在一个应用实例中,订购区域记为S,公布区域记为U,通过按照升序对下界参数排序获取公布区域与订购区域的兴趣匹配结果为例,进行说明:对于兴趣空间的每一维,获取所所有公布区域与订购区域的边界参数,对所有公布区域的下界参数进行升序排序、所有订购区域的下界参数按升序进行排序,可以得到4个边界值列表,如图6所示,分别是SL,SU,UL,UU,其中SL是指按升序排列的订购区域的下界列表,SU列表存储相对应的订购区域上界参数,类似地,UL和UU用于存储所有公布区域的下界参数和上界参数。此外,还有两个辅助列表用于存储对应的公布区域id和订购区域id。采用二分查找法,分别求出每个公布区域和订购区域的比较索引上界(CIU)和比较索引下界(CIL),分别表示将公布区域或订购区域的上下界值映射到SL列表或UL列表上的位置,如图7所示,以将公布区域上下界参数映射到SL列表为例,首先将UL和SL进行交替比较,可以快速获取所有UL列表中的值映射到SL列表中的位置,查找到UL0对应的映射位置为SL2。在将[UU0,UL0]映射到SL列表过程中,只需要采用二分查找法,查找UU0对应的映射位置时,由于UU0大于UL0,故UU0的查找范围为[[SL2,SLn]。采用二分法进行查找,提高了查找效率,通过先获取UL0在SL上的映射位置,再查找UU0在SL上的映射位置,减小了查找范围,进一步提高了查找效率,查找结果即为CIU和CIL(第一映射位置和第二映射位置)。通过将公布区域每一个上下界参数映射到SL列表中,以及将订购区域每一个上下界参数映射到UL列表中,得到每个公布区域和订购区域的CIL和CIU,根据公布区域与订购区域子区域的数量,构建M*N的覆盖信息矩阵,M代表公布区域的子区域数量,N代表订购区域的子区域数量,每个公布子区域对应一行,每个订购子区域对应一列,矩阵元素表示公布和订购区域之间的覆盖关系,false代表区域不重叠,true代表区域重叠,矩阵的所有元素都被初始化为false。当公布区域与一个订购区域重叠时,对应的位设置为true,用于存储匹配信息。对于每一个公布区域和订购区域,根据它们的CIL和CIU值对位矩阵中相应的位置赋值为true。对每一维度都进行上述操作,即可得到最终的覆盖信息矩阵,确定兴趣匹配结果。In an application example, the subscription area is denoted as S, and the release area is denoted as U. By sorting the lower bound parameters in ascending order to obtain the interest matching results of the release area and the order area as an example, for illustration: for each dimension of the interest space, get For the boundary parameters of all announced areas and order areas, the lower bound parameters of all announced areas are sorted in ascending order, and the lower bound parameters of all ordered areas are sorted in ascending order, and four lists of boundary values can be obtained, as shown in Figure 6, which are SL , SU, UL, UU, where SL refers to the lower bound list of the subscription area in ascending order, the SU list stores the corresponding upper bound parameters of the subscription area, similarly, UL and UU are used to store the lower bound parameters and upper bound parameters of all published areas Boundary parameters. In addition, there are two auxiliary lists for storing corresponding publishing area ids and ordering area ids. Use the binary search method to find the comparison index upper bound (CIU) and comparison index lower bound (CIL) of each announcement area and order area, respectively, indicating that the upper and lower bounds of the announcement area or order area are mapped to the SL list or UL list As shown in Figure 7, taking the mapping of the upper and lower boundary parameters of the published area to the SL list as an example, first compare the UL and SL alternately, and quickly obtain the positions in which all the values in the UL list are mapped to the SL list. It is found that the mapping position corresponding to UL 0 is SL 2 . In the process of mapping [UU 0 , UL 0 ] to the SL list, you only need to use the binary search method to find the mapping position corresponding to UU 0. Since UU 0 is greater than UL 0 , the search range of UU 0 is [[SL 2 , SL n ]. The binary search method is used to improve the search efficiency. By first obtaining the mapping position of UL 0 on the SL, and then searching for the mapping position of UU 0 on the SL, the search range is reduced and the search efficiency is further improved. The search result is CIU and CIL (first mapped location and second mapped location). By mapping each upper and lower boundary parameter of the announcement area to the SL list, and mapping each upper and lower boundary parameter of the subscription area to the UL list, the CIL and CIU of each announcement area and subscription area are obtained. The number of areas, build M*N coverage information matrix, M represents the number of sub-areas in the announcement area, N represents the number of sub-areas in the order area, each announcement sub-area corresponds to a row, each order sub-area corresponds to a column, and the matrix elements represent The coverage relationship between the announced and ordered areas, false means that the areas do not overlap, true means that the areas overlap, and all elements of the matrix are initialized to false. When the published area overlaps with an ordered area, the corresponding bit is set to true for storing matching information. For each published region and subscribed region, assign true to the corresponding position in the bit matrix according to their CIL and CIU values. By performing the above operations on each dimension, the final coverage information matrix can be obtained, and the interest matching result can be determined.

应该理解的是,虽然图1-4的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图1-4中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flow charts of FIGS. 1-4 are displayed sequentially as indicated by the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in Figures 1-4 may include a plurality of sub-steps or stages, these sub-steps or stages are not necessarily performed at the same time, but may be performed at different times, these sub-steps or stages The order of execution is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.

在一个实施例中,如图8所示,提供了一种兴趣匹配装置,装置包括:In one embodiment, as shown in FIG. 8 , an interest matching device is provided, which includes:

边界参数获取模块100,用于获取待匹配的第一区域与第二区域的边界参数,边界参数包括一一对应的上界参数与下界参数,其中,第一区域为公布区域且第二区域为订购区域,或第一区域为订购区域且第二区域为公布区域。The boundary parameter acquisition module 100 is used to acquire the boundary parameters of the first area and the second area to be matched, and the boundary parameters include one-to-one corresponding upper bound parameter and lower bound parameter, wherein, the first area is the published area and the second area is The subscription area, or the first area is the subscription area and the second area is the publication area.

参数排序处理模块300,用于按照预设排序规则,分别对第一区域与第二区域的边界参数进行排序,获得第一区域参数列表与第二区域参数列表,预设排序规则包括按照数值大小对下界参数进行排序或按照数值大小对上界参数进行排序。The parameter sorting processing module 300 is configured to sort the boundary parameters of the first area and the second area respectively according to preset sorting rules, and obtain the first area parameter list and the second area parameter list. The preset sorting rules include Sort the lower bound parameters or sort the upper bound parameters by numerical magnitude.

映射区间确定模块500,用于根据第一区域参数列表与第二区域参数列表中各边界参数的数值大小以及对应的排序位置,确定第一区域参数列表的上界参数和下界参数在第二区域参数列表中对应的第一映射区间,并确定第二区域参数列表的上界参数和下界参数在第一区域参数列表中对应的第二映射区间。The mapping interval determination module 500 is configured to determine the upper bound parameter and the lower bound parameter of the first area parameter list in the second area according to the numerical value of each boundary parameter in the first area parameter list and the second area parameter list and the corresponding sorting position. The corresponding first mapping interval in the parameter list, and determine the second mapping interval corresponding to the upper bound parameter and the lower bound parameter in the second area parameter list in the first area parameter list.

兴趣匹配结果确定模块700,用于根据第一映射区间与第二映射区间,确定第一区域与第二区域的兴趣匹配结果。The interest matching result determining module 700 is configured to determine the interest matching result between the first area and the second area according to the first mapping interval and the second mapping interval.

在一个实施例中,映射区间确定模块500还包括:In one embodiment, the mapping interval determination module 500 also includes:

第一映射区间确定单元,用于根据预设排序规则中确定的排序边界,确定待映射的第二区域的边界参数列表,根据参数的数值大小,通过交替比较和二分查找确定第一区域参数列表中的上界参数和下界参数在第二区域的边界参数列表中对应的第一映射区间。The first mapping interval determination unit is configured to determine the boundary parameter list of the second area to be mapped according to the sorting boundary determined in the preset sorting rule, and determine the first area parameter list through alternate comparison and binary search according to the numerical value of the parameter. The upper bound parameter and the lower bound parameter in are in the first mapping interval corresponding to the bound parameter list of the second area.

第二映射区间确定单元,用于确定第二区域参数列表的上界参数和下界参数在第一区域参数列表中对应的第二映射区间。The second mapping interval determination unit is configured to determine the second mapping interval corresponding to the upper bound parameter and the lower bound parameter of the second area parameter list in the first area parameter list.

在一个实施例中,当预设排序规则为按照升序对下界参数进行排序时,待映射的第二区域的边界参数列表为下界列表,第一映射区间确定单元,包括:In one embodiment, when the preset sorting rule is to sort the lower bound parameters in ascending order, the bound parameter list of the second area to be mapped is a lower bound list, and the first mapping interval determination unit includes:

第一映射位置确定子单元,通过交替比较第一区域参数列表中的下界参数和第二区域参数列表中的下界参数,确定第一区域参数列表中的下界参数在第二区域的下界列表中的第一映射位置,第一映射位置为第二区域的下界列表中数值不小于第一区域参数列表中的下界参数的参数对应位置。The first mapping position determining subunit, by alternately comparing the lower bound parameter in the first area parameter list and the lower bound parameter in the second area parameter list, determines that the lower bound parameter in the first area parameter list is in the lower bound list of the second area The first mapping position, the first mapping position is the position corresponding to the parameter whose value in the lower bound list of the second area is not less than the lower bound parameter in the first area parameter list.

第二映射位置确定子单元,用于以第一映射位置为起点,通过二分查找,确定第一区域参数列表中的上界参数在第二区域的下界列表中的第二映射位置。The second mapping position determining subunit is configured to determine the second mapping position of the upper bound parameter in the first area parameter list in the lower bound list of the second area by binary search starting from the first mapping position.

第一映射区间确定子单元,用于根据第一映射位置与第二映射位置,确定第一区域参数列表中的上界参数和下界参数在第二区域的边界参数列表中对应的第一映射区间。The first mapping interval determination subunit is configured to determine the first mapping interval corresponding to the upper bound parameter and the lower bound parameter in the first area parameter list in the boundary parameter list of the second area according to the first mapping position and the second mapping position .

在一个实施例中,兴趣匹配结果确定模块700,包括:In one embodiment, the interest matching result determination module 700 includes:

覆盖信息矩阵生成单元,用于根据第一映射区间与第二映射区间,生成覆盖信息矩阵;a coverage information matrix generating unit, configured to generate a coverage information matrix according to the first mapping interval and the second mapping interval;

兴趣匹配结果获取单元,用于根据覆盖信息矩阵,获得第一区域与第二区域的兴趣匹配结果。The interest matching result obtaining unit is configured to obtain the interest matching result between the first area and the second area according to the coverage information matrix.

在一个实施例中,覆盖信息矩阵生成单元,包括:In one embodiment, the coverage information matrix generation unit includes:

矩阵的行数和列数确定子单元,用于根据第一区域与第二区域的边界参数数量,确定覆盖信息矩阵的行数和列数;The number of rows and the number of columns of the matrix determine the subunit, which is used to determine the number of rows and the number of columns of the coverage information matrix according to the number of boundary parameters between the first area and the second area;

矩阵的各组成元素确定子单元,用于获取第一映射区间与第二映射区间对应的id参数列表,根据id参数列表确定覆盖信息矩阵的各组成元素;Each constituent element of the matrix determines a subunit, which is used to obtain an id parameter list corresponding to the first mapping interval and the second mapping interval, and determine each constituent element of the coverage information matrix according to the id parameter list;

覆盖信息矩阵生成子单元,用于根据覆盖信息矩阵的行数和列数、以及覆盖信息矩阵的各组成元素,生成覆盖信息矩阵。The coverage information matrix generating subunit is configured to generate the coverage information matrix according to the number of rows and columns of the coverage information matrix and each component element of the coverage information matrix.

在一个实施例中,矩阵的各组成元素确定子单元,用于还获取初始化的覆盖信息矩阵以及第一映射区间与第二映射区间对应的id参数列表,根据第一映射区间以及对应的id参数列表,将初始化的覆盖信息矩阵中第一映射区间的对应元素更新为预设值以及对应的id参数列表,根据第二映射区间,将更新的覆盖信息矩阵中第二映射区间的对应元素更新为预设值,以确定覆盖信息矩阵的各组成元素。In one embodiment, each component element of the matrix determines a subunit, which is used to also obtain the initialized coverage information matrix and the id parameter list corresponding to the first mapping interval and the second mapping interval, according to the first mapping interval and the corresponding id parameter List, update the corresponding elements of the first mapping interval in the initialized coverage information matrix to preset values and the corresponding id parameter list, and update the corresponding elements of the second mapping interval in the updated coverage information matrix according to the second mapping interval as Preset values to determine the constituent elements of the coverage information matrix.

在一个实施例中,兴趣匹配结果获取单元,还用于分别获取各维度的覆盖信息矩阵的组成元素,并根据各维度的覆盖信息矩阵的相同组成元素确定第一区域与第二区域的兴趣匹配结果。In one embodiment, the interest matching result acquisition unit is further configured to respectively acquire the constituent elements of the coverage information matrix of each dimension, and determine the interest matching between the first region and the second region according to the same constituent elements of the coverage information matrix of each dimension result.

上述兴趣匹配装置,通过获取待匹配的第一区域与第二区域的边界参数,并采用按照数值大小对下界参数进行排序或按照数值大小对上界参数进行排序对参数进行排序,根据参数列表中参数的数值大小和所在位置,确定第一区域参数列表的上界参数和下界参数在第二区域参数列表中的映射区间,以及第二区域参数列表的上界参数和下界参数在第一区域参数列表中对应的第二映射区间,通过对参数排序提高匹配结果精确度,以及通过第一区域参数与第二区域参数的映射结果来判定兴趣匹配结果,显著减少待排序列表的长度或数目,减少排序开销,减小了数据处理量,从而提高了匹配效率。The above interest matching device obtains the boundary parameters of the first region to be matched and the second region, and sorts the parameters by sorting the lower bound parameters according to the numerical value or sorting the upper bound parameters according to the numerical value, and sorts the parameters according to the parameter list The numerical value and location of the parameter determine the mapping interval of the upper bound parameter and lower bound parameter of the first area parameter list in the second area parameter list, and the upper bound parameter and lower bound parameter of the second area parameter list are in the first area parameter In the second mapping interval corresponding to the list, the accuracy of the matching result is improved by sorting the parameters, and the matching result of the interest is determined by the mapping result of the first area parameter and the second area parameter, which significantly reduces the length or number of the list to be sorted, and reduces Sorting overhead reduces the amount of data processing, thereby improving matching efficiency.

关于兴趣匹配装置的具体限定可以参见上文中对于兴趣匹配方法的限定,在此不再赘述。上述兴趣匹配装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitations of the interest matching device, please refer to the above definition of the interest matching method, which will not be repeated here. Each module in the above-mentioned interest matching device can be fully or partially realized by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.

在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图9所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种兴趣匹配方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure may be as shown in FIG. 9 . The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Wherein, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. The computer program implements an interest matching method when executed by a processor. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a button, a trackball or a touch pad provided on the casing of the computer device , and can also be an external keyboard, touchpad, or mouse.

本领域技术人员可以理解,图9中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 9 is only a block diagram of a part of the structure related to the solution of this application, and does not constitute a limitation on the computer equipment on which the solution of this application is applied. The specific computer equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.

在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现以下步骤:In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the computer program, the following steps are implemented:

获取待匹配的第一区域与第二区域的边界参数,边界参数包括一一对应的上界参数与下界参数,其中,第一区域为公布区域且第二区域为订购区域,或第一区域为订购区域且第二区域为公布区域;Obtain the boundary parameters of the first area and the second area to be matched, the boundary parameters include one-to-one corresponding upper bound parameters and lower bound parameters, wherein, the first area is the publishing area and the second area is the subscription area, or the first area is Subscription area and the second area is the published area;

按照预设排序规则,分别对第一区域与第二区域的边界参数进行排序,获得第一区域参数列表与第二区域参数列表,预设排序规则包括按照数值大小对下界参数进行排序或按照数值大小对上界参数进行排序;According to the preset sorting rules, the boundary parameters of the first area and the second area are respectively sorted to obtain the parameter list of the first area and the parameter list of the second area. The preset sorting rules include sorting the lower bound parameters according to the numerical value or Size sorts the upper bound parameter;

根据第一区域参数列表与第二区域参数列表中各边界参数的数值大小以及对应的排序位置,确定第一区域参数列表的上界参数和下界参数在第二区域参数列表中对应的第一映射区间,并确定第二区域参数列表的上界参数和下界参数在第一区域参数列表中对应的第二映射区间;According to the numerical value of each boundary parameter in the first area parameter list and the second area parameter list and the corresponding sorting position, determine the first mapping corresponding to the upper bound parameter and the lower bound parameter in the first area parameter list in the second area parameter list interval, and determine the second mapping interval corresponding to the upper bound parameter and the lower bound parameter of the second area parameter list in the first area parameter list;

根据第一映射区间与第二映射区间,确定第一区域与第二区域的兴趣匹配结果。According to the first mapping interval and the second mapping interval, an interest matching result between the first area and the second area is determined.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the following steps are also implemented when the processor executes the computer program:

根据预设排序规则中确定的排序边界,确定待映射的第二区域的边界参数列表;Determine the boundary parameter list of the second area to be mapped according to the sorting boundaries determined in the preset sorting rules;

根据参数的数值大小,通过交替比较和二分查找确定第一区域参数列表中的上界参数和下界参数在第二区域的边界参数列表中对应的第一映射区间;According to the numerical value of the parameter, determine the first mapping interval corresponding to the upper bound parameter and the lower bound parameter in the boundary parameter list of the second area in the first area parameter list through alternate comparison and binary search;

同理,确定第二区域参数列表的上界参数和下界参数在第一区域参数列表中对应的第二映射区间。Similarly, the second mapping interval corresponding to the upper bound parameter and the lower bound parameter of the second area parameter list in the first area parameter list is determined.

在一个实施例中,当预设排序规则为按照升序对下界参数进行排序时,待映射的第二区域的边界参数列表为下界列表,处理器执行计算机程序时还实现以下步骤:In one embodiment, when the preset sorting rule is to sort the lower bound parameters in ascending order, the boundary parameter list of the second area to be mapped is a lower bound list, and the processor also implements the following steps when executing the computer program:

通过交替比较第一区域参数列表中的下界参数和第二区域参数列表中的下界参数确定第一区域参数列表中的下界参数在第二区域的下界列表中的第一映射位置,第一映射位置为第二区域的下界列表中数值不小于第一区域参数列表中的下界参数的参数对应位置;Determine the first mapping position of the lower bound parameter in the first area parameter list in the lower bound list of the second area by alternately comparing the lower bound parameter in the first area parameter list with the lower bound parameter in the second area parameter list, the first mapping position It is the corresponding position of the parameter whose value in the lower bound list of the second area is not less than the lower bound parameter in the parameter list of the first area;

以第一映射位置为起点,通过二分查找,确定第一区域参数列表中的上界参数在第二区域的下界列表中的第二映射位置;Taking the first mapping position as a starting point, through binary search, determine the second mapping position of the upper bound parameter in the first area parameter list in the lower bound list of the second area;

根据第一映射位置与第二映射位置,确定第一区域参数列表中的上界参数和下界参数在第二区域的边界参数列表中对应的第一映射区间。According to the first mapping position and the second mapping position, determine the first mapping interval corresponding to the upper bound parameter and the lower bound parameter in the first area parameter list in the boundary parameter list of the second area.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the following steps are also implemented when the processor executes the computer program:

根据第一映射区间与第二映射区间,生成覆盖信息矩阵;generating a coverage information matrix according to the first mapping interval and the second mapping interval;

根据覆盖信息矩阵,获得第一区域与第二区域的兴趣匹配结果。According to the coverage information matrix, an interest matching result between the first area and the second area is obtained.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the following steps are also implemented when the processor executes the computer program:

根据第一区域与第二区域的边界参数数量,确定覆盖信息矩阵的行数和列数;Determine the number of rows and columns of the coverage information matrix according to the number of boundary parameters between the first area and the second area;

获取第一映射区间与第二映射区间对应的id参数列表,根据id参数列表确定覆盖信息矩阵的各组成元素;Obtain the id parameter list corresponding to the first mapping interval and the second mapping interval, and determine each component element of the coverage information matrix according to the id parameter list;

根据覆盖信息矩阵的行数和列数、以及覆盖信息矩阵的各组成元素,生成覆盖信息矩阵。A coverage information matrix is generated according to the number of rows and columns of the coverage information matrix and each component element of the coverage information matrix.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the following steps are also implemented when the processor executes the computer program:

获取初始化的覆盖信息矩阵以及第一映射区间与第二映射区间对应的id参数列表;Obtain the initialized coverage information matrix and the id parameter list corresponding to the first mapping interval and the second mapping interval;

根据第一映射区间以及对应的id参数列表,将初始化的覆盖信息矩阵中第一映射区间的对应元素更新为预设值;Updating corresponding elements of the first mapping interval in the initialized coverage information matrix to preset values according to the first mapping interval and the corresponding id parameter list;

根据第二映射区间以及对应的id参数列表,将更新的覆盖信息矩阵中第二映射区间的对应元素更新为预设值,以确定覆盖信息矩阵的各组成元素。According to the second mapping interval and the corresponding id parameter list, the corresponding elements in the updated coverage information matrix in the second mapping interval are updated to preset values, so as to determine the constituent elements of the coverage information matrix.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the following steps are also implemented when the processor executes the computer program:

分别获取各维度的覆盖信息矩阵的组成元素,并根据各维度的覆盖信息矩阵的相同组成元素确定第一区域与第二区域的兴趣匹配结果。The constituent elements of the coverage information matrix of each dimension are obtained respectively, and the interest matching results of the first region and the second region are determined according to the same constituent elements of the coverage information matrix of each dimension.

上述用于实现兴趣匹配方法的计算机设备,通过获取待匹配的第一区域与第二区域的边界参数,并采用按照数值大小对下界参数进行排序或按照数值大小对上界参数进行排序对参数进行排序,根据参数列表中参数的数值大小和所在位置,确定第一区域参数列表的上界参数和下界参数在第二区域参数列表中的映射区间,以及第二区域参数列表的上界参数和下界参数在第一区域参数列表中对应的第二映射区间,通过对参数排序提高匹配结果精确度,以及通过第一区域参数与第二区域参数的映射结果来判定兴趣匹配结果,显著减少待排序列表的长度或数目,减少排序开销,减小了数据处理量,从而提高了匹配效率。The above computer equipment for implementing the interest matching method obtains the boundary parameters of the first region to be matched and the second region, and sorts the lower bound parameters according to the numerical value or sorts the upper bound parameters according to the numerical value. Sorting, according to the numerical value and location of the parameters in the parameter list, determine the mapping interval of the upper bound parameter and lower bound parameter of the first area parameter list in the second area parameter list, and the upper bound parameter and lower bound of the second area parameter list The parameter is in the second mapping interval corresponding to the parameter list of the first area. By sorting the parameters, the accuracy of the matching result is improved, and the matching result of the interest is determined by the mapping result of the first area parameter and the second area parameter, which significantly reduces the list to be sorted The length or number of data can reduce the overhead of sorting, reduce the amount of data processing, and thus improve the matching efficiency.

在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

获取待匹配的第一区域与第二区域的边界参数,边界参数包括一一对应的上界参数与下界参数,其中,第一区域为公布区域且第二区域为订购区域,或第一区域为订购区域且第二区域为公布区域;Obtain the boundary parameters of the first area and the second area to be matched, the boundary parameters include one-to-one corresponding upper bound parameters and lower bound parameters, wherein, the first area is the publishing area and the second area is the subscription area, or the first area is Subscription area and the second area is the published area;

按照预设排序规则,分别对第一区域与第二区域的边界参数进行排序,获得第一区域参数列表与第二区域参数列表,预设排序规则包括按照数值大小对下界参数进行排序或按照数值大小对上界参数进行排序;According to the preset sorting rules, the boundary parameters of the first area and the second area are respectively sorted to obtain the parameter list of the first area and the parameter list of the second area. The preset sorting rules include sorting the lower bound parameters according to the numerical value or Size sorts the upper bound parameter;

根据第一区域参数列表与第二区域参数列表中各边界参数的数值大小以及对应的排序位置,确定第一区域参数列表的上界参数和下界参数在第二区域参数列表中对应的第一映射区间,并确定第二区域参数列表的上界参数和下界参数在第一区域参数列表中对应的第二映射区间;According to the numerical value of each boundary parameter in the first area parameter list and the second area parameter list and the corresponding sorting position, determine the first mapping corresponding to the upper bound parameter and the lower bound parameter in the first area parameter list in the second area parameter list interval, and determine the second mapping interval corresponding to the upper bound parameter and the lower bound parameter of the second area parameter list in the first area parameter list;

根据第一映射区间与第二映射区间,确定第一区域与第二区域的兴趣匹配结果。According to the first mapping interval and the second mapping interval, an interest matching result between the first area and the second area is determined.

在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, when the computer program is executed by the processor, the following steps are also implemented:

根据预设排序规则中确定的排序边界,确定待映射的第二区域的边界参数列表;Determine the boundary parameter list of the second area to be mapped according to the sorting boundaries determined in the preset sorting rules;

根据参数的数值大小,通过交替比较和二分查找确定第一区域参数列表中的上界参数和下界参数在第二区域的边界参数列表中对应的第一映射区间;According to the numerical value of the parameter, determine the first mapping interval corresponding to the upper bound parameter and the lower bound parameter in the boundary parameter list of the second area in the first area parameter list through alternate comparison and binary search;

同理,确定第二区域参数列表的上界参数和下界参数在第一区域参数列表中对应的第二映射区间。Similarly, the second mapping interval corresponding to the upper bound parameter and the lower bound parameter of the second area parameter list in the first area parameter list is determined.

在一个实施例中,当预设排序规则为按照升序对下界参数进行排序时,待映射的第二区域的边界参数列表为下界列表,计算机程序被处理器执行时还实现以下步骤:In one embodiment, when the preset sorting rule is to sort the lower bound parameters in ascending order, the boundary parameter list of the second region to be mapped is a lower bound list, and the computer program is executed by the processor to further implement the following steps:

通过交替比较第一区域参数列表中的下界参数和第二区域参数列表中的下界参数,确定第一区域参数列表中的下界参数在第二区域的下界列表中的第一映射位置,第一映射位置为第二区域的下界列表中数值不小于第一区域参数列表中的下界参数的参数对应位置;By alternately comparing the lower bound parameter in the first area parameter list with the lower bound parameter in the second area parameter list, determine the first mapping position of the lower bound parameter in the first area parameter list in the lower bound list of the second area, the first mapping The position corresponds to the parameter whose value in the lower bound list of the second area is not less than the lower bound parameter in the parameter list of the first area;

以第一映射位置为起点,通过二分查找,确定第一区域参数列表中的上界参数在第二区域的下界列表中的第二映射位置;Taking the first mapping position as a starting point, through binary search, determine the second mapping position of the upper bound parameter in the first area parameter list in the lower bound list of the second area;

根据第一映射位置与第二映射位置,确定第一区域参数列表中的上界参数和下界参数在第二区域的边界参数列表中对应的第一映射区间。According to the first mapping position and the second mapping position, determine the first mapping interval corresponding to the upper bound parameter and the lower bound parameter in the first area parameter list in the boundary parameter list of the second area.

在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, when the computer program is executed by the processor, the following steps are also implemented:

根据第一映射区间与第二映射区间,生成覆盖信息矩阵;generating a coverage information matrix according to the first mapping interval and the second mapping interval;

根据覆盖信息矩阵,获得第一区域与第二区域的兴趣匹配结果。According to the coverage information matrix, an interest matching result between the first area and the second area is obtained.

在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, when the computer program is executed by the processor, the following steps are also implemented:

根据第一区域与第二区域的边界参数数量,确定覆盖信息矩阵的行数和列数;Determine the number of rows and columns of the coverage information matrix according to the number of boundary parameters between the first area and the second area;

获取第一映射区间与第二映射区间对应的id参数列表,根据id参数列表确定覆盖信息矩阵的各组成元素;Obtain the id parameter list corresponding to the first mapping interval and the second mapping interval, and determine each component element of the coverage information matrix according to the id parameter list;

根据覆盖信息矩阵的行数和列数、以及覆盖信息矩阵的各组成元素,生成覆盖信息矩阵。A coverage information matrix is generated according to the number of rows and columns of the coverage information matrix and each component element of the coverage information matrix.

在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, when the computer program is executed by the processor, the following steps are also implemented:

获取初始化的覆盖信息矩阵以及第一映射区间与第二映射区间对应的id参数列表;Obtain the initialized coverage information matrix and the id parameter list corresponding to the first mapping interval and the second mapping interval;

根据第一映射区间以及对应的id参数列表,将初始化的覆盖信息矩阵中第一映射区间的对应元素更新为预设值;Updating corresponding elements of the first mapping interval in the initialized coverage information matrix to preset values according to the first mapping interval and the corresponding id parameter list;

根据第二映射区间以及对应的id参数列表,将更新的覆盖信息矩阵中第二映射区间的对应元素更新为预设值,以确定覆盖信息矩阵的各组成元素。According to the second mapping interval and the corresponding id parameter list, the corresponding elements in the updated coverage information matrix in the second mapping interval are updated to preset values, so as to determine the constituent elements of the coverage information matrix.

在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, when the computer program is executed by the processor, the following steps are also implemented:

分别获取各维度的覆盖信息矩阵的组成元素,并根据各维度的覆盖信息矩阵的相同组成元素确定第一区域与第二区域的兴趣匹配结果。The constituent elements of the coverage information matrix of each dimension are obtained respectively, and the interest matching results of the first region and the second region are determined according to the same constituent elements of the coverage information matrix of each dimension.

上述用于实现兴趣匹配方法的存储介质,通过获取待匹配的第一区域与第二区域的边界参数,并采用按照数值大小对下界参数进行排序或按照数值大小对上界参数进行排序对参数进行排序,根据参数列表中参数的数值大小和所在位置,确定第一区域参数列表的上界参数和下界参数在第二区域参数列表中的映射区间,以及第二区域参数列表的上界参数和下界参数在第一区域参数列表中对应的第二映射区间,通过对参数排序提高匹配结果精确度,以及通过第一区域参数与第二区域参数的映射结果来判定兴趣匹配结果,显著减少待排序列表的长度或数目,减少排序开销,减小了数据处理量,从而提高了匹配效率。The above-mentioned storage medium used to implement the interest matching method obtains the boundary parameters of the first region to be matched and the second region, and sorts the lower bound parameters according to the numerical value or sorts the upper bound parameters according to the numerical value. Sorting, according to the numerical value and location of the parameters in the parameter list, determine the mapping interval of the upper bound parameter and lower bound parameter of the first area parameter list in the second area parameter list, and the upper bound parameter and lower bound of the second area parameter list The parameter is in the second mapping interval corresponding to the parameter list of the first area. By sorting the parameters, the accuracy of the matching result is improved, and the matching result of the interest is determined by the mapping result of the first area parameter and the second area parameter, which significantly reduces the list to be sorted The length or number of data can reduce the overhead of sorting, reduce the amount of data processing, and thus improve the matching efficiency.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware. The computer programs can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it may include the procedures of the embodiments of the above-mentioned methods. Wherein, any references to memory, storage, database or other media used in the various embodiments provided in the present application may include non-volatile and/or volatile memory. Nonvolatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Chain Synchlink DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered to be within the range described in this specification.

以上实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above examples only express several implementation modes of the present application, and the description thereof is relatively specific and detailed, but should not be construed as limiting the scope of the patent for the invention. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the scope of protection of the patent application should be based on the appended claims.

Claims (10)

1.一种兴趣匹配方法,其特征在于,所述方法包括:1. An interest matching method, characterized in that the method comprises: 获取待匹配的第一区域与第二区域的边界参数,所述边界参数包括一一对应的上界参数与下界参数,其中,所述第一区域为公布区域且所述第二区域为订购区域,或所述第一区域为订购区域且所述第二区域为公布区域;Obtain boundary parameters of the first area to be matched and the second area, where the boundary parameters include one-to-one corresponding upper bound parameters and lower bound parameters, wherein the first area is a publishing area and the second area is a subscription area , or the first area is a subscription area and the second area is a publishing area; 按照预设排序规则,分别对所述第一区域与第二区域的边界参数进行排序,获得第一区域参数列表与第二区域参数列表,所述预设排序规则包括按照数值大小对下界参数进行排序或按照数值大小对上界参数进行排序;Sorting the boundary parameters of the first area and the second area respectively according to a preset sorting rule to obtain a first area parameter list and a second area parameter list, the preset sorting rule includes sorting the lower bound parameters according to the numerical value Sort or sort the upper bound parameters according to their numerical value; 根据所述第一区域参数列表与第二区域参数列表中各边界参数的数值大小以及对应的排序位置,确定所述第一区域参数列表的上界参数和下界参数在所述第二区域参数列表中对应的第一映射区间,并确定所述第二区域参数列表的上界参数和下界参数在所述第一区域参数列表中对应的第二映射区间;According to the numerical value and the corresponding sorting position of each boundary parameter in the first area parameter list and the second area parameter list, determine the upper bound parameter and the lower bound parameter of the first area parameter list in the second area parameter list The corresponding first mapping interval in the first area parameter list, and determine the second mapping interval corresponding to the upper bound parameter and the lower bound parameter of the second area parameter list in the first area parameter list; 根据所述第一映射区间与所述第二映射区间,确定所述第一区域与所述第二区域的兴趣匹配结果。Determine an interest matching result between the first area and the second area according to the first mapping interval and the second mapping interval. 2.根据权利要求1所述的兴趣匹配方法,其特征在于,所述根据所述第一区域参数列表与第二区域参数列表中各边界参数的数值大小以及对应的排序位置,确定所述第一区域参数列表的上界参数和下界参数在所述第二区域参数列表中对应的第一映射区间,并确定所述第二区域参数列表的上界参数和下界参数在所述第一区域参数列表中对应的第二映射区间包括:2. The interest matching method according to claim 1, characterized in that, according to the numerical value and corresponding sorting position of each boundary parameter in the first area parameter list and the second area parameter list, determine the first The upper bound parameter and the lower bound parameter of an area parameter list are in the first mapping interval corresponding to the second area parameter list, and the upper bound parameter and the lower bound parameter of the second area parameter list are determined in the first area parameter list The corresponding second mapping interval in the list includes: 根据所述预设排序规则中确定的排序边界,确定待映射的第二区域的边界参数列表;determining a boundary parameter list of the second area to be mapped according to the sorting boundary determined in the preset sorting rule; 根据参数的数值大小,通过交替比较和二分查找确定所述第一区域参数列表中的上界参数和下界参数在所述第二区域的边界参数列表中对应的第一映射区间;According to the numerical value of the parameter, the first mapping interval corresponding to the upper bound parameter and the lower bound parameter in the first area parameter list in the boundary parameter list of the second area is determined through alternate comparison and binary search; 同理,确定所述第二区域参数列表的上界参数和下界参数在所述第一区域参数列表中对应的第二映射区间。Similarly, the second mapping interval corresponding to the upper bound parameter and the lower bound parameter of the second area parameter list in the first area parameter list is determined. 3.根据权利要求2所述的兴趣匹配方法,其特征在于,当预设排序规则为按照升序对下界参数进行排序时,待映射的第二区域的边界参数列表为下界列表,所述根据参数的数值大小,通过交替比较和二分查找确定所述第一区域参数列表中的上界参数和下界参数在所述第二区域的边界参数列表中对应的第一映射区间包括:3. The interest matching method according to claim 2, wherein when the preset sorting rule is to sort the lower bound parameters in ascending order, the boundary parameter list of the second area to be mapped is a lower bound list, and the parameter according to The value of the upper bound parameter and the lower bound parameter in the first area parameter list are determined by alternate comparison and binary search, and the corresponding first mapping interval in the boundary parameter list of the second area includes: 通过交替比较所述第一区域参数列表中的下界参数和所述第二区域参数列表中的下界参数,确定所述第一区域参数列表中的下界参数在第二区域的下界列表中的第一映射位置,所述第一映射位置为所述第二区域的下界列表中数值不小于所述第一区域参数列表中的下界参数的参数对应位置;By alternately comparing the lower bound parameters in the first area parameter list with the lower bound parameters in the second area parameter list, it is determined that the lower bound parameter in the first area parameter list is the first in the lower bound list in the second area. Mapping position, the first mapping position is the position corresponding to the parameter whose value in the lower bound list of the second area is not less than the lower bound parameter in the parameter list of the first area; 以所述第一映射位置为起点,通过二分查找,确定所述第一区域参数列表中的上界参数在第二区域的下界列表中的第二映射位置;Using the first mapping position as a starting point, determine a second mapping position of the upper bound parameter in the first area parameter list in the lower bound list of the second area through binary search; 根据所述第一映射位置与所述第二映射位置,确定所述第一区域参数列表中的上界参数和下界参数在所述第二区域的边界参数列表中对应的第一映射区间。According to the first mapping position and the second mapping position, determine a first mapping interval corresponding to the upper bound parameter and the lower bound parameter in the first area parameter list in the boundary parameter list of the second area. 4.根据权利要求1所述的兴趣匹配方法,其特征在于,所述根据所述第一映射区间与所述第二映射区间,确定所述第一区域与所述第二区域的兴趣匹配结果包括:4. The interest matching method according to claim 1, wherein the interest matching result between the first area and the second area is determined according to the first mapping interval and the second mapping interval include: 根据所述第一映射区间与所述第二映射区间,生成覆盖信息矩阵;generating a coverage information matrix according to the first mapping interval and the second mapping interval; 根据所述覆盖信息矩阵,获得所述第一区域与所述第二区域的兴趣匹配结果。According to the coverage information matrix, an interest matching result between the first area and the second area is obtained. 5.根据权利要求4所述的兴趣匹配方法,其特征在于,所述根据所述第一映射区间与所述第二映射区间,生成覆盖信息矩阵包括:5. The interest matching method according to claim 4, wherein said generating a coverage information matrix according to said first mapping interval and said second mapping interval comprises: 根据所述第一区域与所述第二区域的边界参数数量,确定所述覆盖信息矩阵的行数和列数;determining the number of rows and columns of the coverage information matrix according to the number of boundary parameters between the first area and the second area; 获取所述第一映射区间与所述第二映射区间对应的id参数列表,根据所述id参数列表确定所述覆盖信息矩阵的各组成元素;Obtain an id parameter list corresponding to the first mapping interval and the second mapping interval, and determine each component element of the coverage information matrix according to the id parameter list; 根据所述覆盖信息矩阵的行数和列数、以及所述覆盖信息矩阵的各组成元素,生成覆盖信息矩阵。A coverage information matrix is generated according to the number of rows and columns of the coverage information matrix and each component element of the coverage information matrix. 6.根据权利要求5所述的兴趣匹配方法,其特征在于,所述获取所述第一映射区间与所述第二映射区间对应的id参数列表,根据所述id参数列表确定所述覆盖信息矩阵的各组成元素,包括:6. The interest matching method according to claim 5, wherein the acquisition of the id parameter list corresponding to the first mapping interval and the second mapping interval determines the coverage information according to the id parameter list The elements of the matrix include: 获取初始化的覆盖信息矩阵以及所述第一映射区间与所述第二映射区间对应的id参数列表;Obtain an initialized coverage information matrix and an id parameter list corresponding to the first mapping interval and the second mapping interval; 根据所述第一映射区间以及对应的id参数列表,将所述初始化的覆盖信息矩阵中第一映射区间的对应元素更新为预设值;Updating corresponding elements of the first mapping interval in the initialized coverage information matrix to preset values according to the first mapping interval and the corresponding id parameter list; 根据所述第二映射区间以及对应的id参数列表,将所述更新的覆盖信息矩阵中第二映射区间的对应元素更新为所述预设值,以确定所述覆盖信息矩阵的各组成元素。According to the second mapping interval and the corresponding id parameter list, update the corresponding elements in the second mapping interval in the updated coverage information matrix to the preset values, so as to determine the constituent elements of the coverage information matrix. 7.根据权利要求4所述的兴趣匹配方法,其特征在于,所述根据所述覆盖信息矩阵,获得所述第一区域与所述第二区域的兴趣匹配结果包括:7. The interest matching method according to claim 4, wherein the obtaining the interest matching result of the first area and the second area according to the coverage information matrix comprises: 分别获取各维度的覆盖信息矩阵的组成元素,并根据所述各维度的覆盖信息矩阵的相同组成元素确定所述第一区域与所述第二区域的兴趣匹配结果。The constituent elements of the coverage information matrix of each dimension are obtained respectively, and the interest matching results of the first region and the second region are determined according to the same constituent elements of the coverage information matrix of each dimension. 8.一种兴趣匹配装置,其特征在于,所述装置包括:8. An interest matching device, characterized in that the device comprises: 边界参数获取模块,用于获取待匹配的第一区域与第二区域的边界参数,所述边界参数包括一一对应的上界参数与下界参数,其中,所述第一区域为公布区域且所述第二区域为订购区域,或所述第一区域为订购区域且所述第二区域为公布区域;The boundary parameter acquisition module is used to acquire the boundary parameters of the first area to be matched and the second area, and the boundary parameters include a one-to-one corresponding upper bound parameter and lower bound parameter, wherein the first area is a published area and the The second area is a subscription area, or the first area is a subscription area and the second area is a publication area; 参数排序处理模块,用于按照预设排序规则,分别对所述第一区域与第二区域的边界参数进行排序,获得第一区域参数列表与第二区域参数列表,所述预设排序规则包括按照数值大小对下界参数进行排序或按照数值大小对上界参数进行排序;A parameter sorting processing module, configured to sort the boundary parameters of the first region and the second region respectively according to a preset sorting rule, and obtain a first region parameter list and a second region parameter list, and the preset sorting rule includes Sort the lower bound parameters according to the numerical value or sort the upper bound parameters according to the numerical value; 映射区间确定模块,用于根据所述第一区域参数列表与第二区域参数列表中各边界参数的数值大小以及对应的排序位置,确定所述第一区域参数列表的上界参数和下界参数在所述第二区域参数列表中对应的第一映射区间,并确定所述第二区域参数列表的上界参数和下界参数在所述第一区域参数列表中对应的第二映射区间;A mapping interval determination module, configured to determine the upper bound parameter and the lower bound parameter of the first area parameter list according to the numerical value of each boundary parameter in the first area parameter list and the second area parameter list and the corresponding sorting position. The corresponding first mapping interval in the second area parameter list, and determine the second mapping interval corresponding to the upper bound parameter and lower bound parameter of the second area parameter list in the first area parameter list; 兴趣匹配结果确定模块,用于根据所述第一映射区间与所述第二映射区间,确定所述第一区域与所述第二区域的兴趣匹配结果。An interest matching result determining module, configured to determine an interest matching result between the first area and the second area according to the first mapping interval and the second mapping interval. 9.一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至7中任一项所述方法的步骤。9. A computer device, comprising a memory and a processor, the memory stores a computer program, wherein the steps of the method according to any one of claims 1 to 7 are realized when the processor executes the computer program . 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的方法的步骤。10. A computer-readable storage medium, on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
CN201810492258.6A 2018-05-22 2018-05-22 Interest matching method, apparatus, computer equipment and storage medium Active CN108829932B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810492258.6A CN108829932B (en) 2018-05-22 2018-05-22 Interest matching method, apparatus, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810492258.6A CN108829932B (en) 2018-05-22 2018-05-22 Interest matching method, apparatus, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108829932A true CN108829932A (en) 2018-11-16
CN108829932B CN108829932B (en) 2022-11-08

Family

ID=64148950

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810492258.6A Active CN108829932B (en) 2018-05-22 2018-05-22 Interest matching method, apparatus, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108829932B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111291085A (en) * 2020-01-15 2020-06-16 中国人民解放军国防科技大学 Hierarchical interest matching method, apparatus, computer equipment and storage medium
CN111884940A (en) * 2020-07-17 2020-11-03 中国人民解放军国防科技大学 Interest matching method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1391162A (en) * 2002-07-26 2003-01-15 中国人民解放军国防科学技术大学 Method for implementing hierarchical distributed simulation operation support environment based on interoperation protocol
CN1750008A (en) * 2005-10-10 2006-03-22 中国人民解放军国防科学技术大学 Realization method of dynamic region matcher based on moving intersection information
CN103347042A (en) * 2013-05-29 2013-10-09 镇江福人网络科技有限公司 Large-scale information release network platform based on 3D
CN103870512A (en) * 2012-12-18 2014-06-18 腾讯科技(深圳)有限公司 Method and device for generating user interest label
US20160171707A1 (en) * 2014-12-10 2016-06-16 Ricoh Co., Ltd. Realogram Scene Analysis of Images: Superpixel Scene Analysis
CN107547748A (en) * 2017-09-07 2018-01-05 深圳市金立通信设备有限公司 A kind of picture management method, terminal and computer-readable recording medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1391162A (en) * 2002-07-26 2003-01-15 中国人民解放军国防科学技术大学 Method for implementing hierarchical distributed simulation operation support environment based on interoperation protocol
CN1750008A (en) * 2005-10-10 2006-03-22 中国人民解放军国防科学技术大学 Realization method of dynamic region matcher based on moving intersection information
CN103870512A (en) * 2012-12-18 2014-06-18 腾讯科技(深圳)有限公司 Method and device for generating user interest label
CN103347042A (en) * 2013-05-29 2013-10-09 镇江福人网络科技有限公司 Large-scale information release network platform based on 3D
US20160171707A1 (en) * 2014-12-10 2016-06-16 Ricoh Co., Ltd. Realogram Scene Analysis of Images: Superpixel Scene Analysis
CN107547748A (en) * 2017-09-07 2018-01-05 深圳市金立通信设备有限公司 A kind of picture management method, terminal and computer-readable recording medium

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
姚益平: "基于索引排序的快速动态区域匹配算法", 《计算机学报》 *
张琳: "基于位移残差的数据分发管理区域匹配及传输", 《中国科学》 *
李开生等: "高层体系结构中DDM数据过滤方法", 《系统仿真学报》 *
梁洪波: "一种面向大规模HLA仿真的并行区域匹配算法", 《国防科技大学学报》 *
王磊: "一种改进排序匹配算法在DDM中的应用与实现", 《计算机工程与应用》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111291085A (en) * 2020-01-15 2020-06-16 中国人民解放军国防科技大学 Hierarchical interest matching method, apparatus, computer equipment and storage medium
CN111291085B (en) * 2020-01-15 2023-10-17 中国人民解放军国防科技大学 Hierarchical interest matching method, device, computer equipment and storage medium
CN111884940A (en) * 2020-07-17 2020-11-03 中国人民解放军国防科技大学 Interest matching method and device, computer equipment and storage medium
CN111884940B (en) * 2020-07-17 2022-03-22 中国人民解放军国防科技大学 Interest matching method, apparatus, computer equipment and storage medium

Also Published As

Publication number Publication date
CN108829932B (en) 2022-11-08

Similar Documents

Publication Publication Date Title
Eldawy SpatialHadoop: towards flexible and scalable spatial processing using mapreduce
US10789231B2 (en) Spatial indexing for distributed storage using local indexes
JP6508661B2 (en) Data processing system, computing node and data processing method
CN109241159B (en) Partition query method and system for data cube and terminal equipment
CN106471501B (en) Data query method, data object storage method and data system
CN110188100A (en) Data processing method, device and computer storage medium
CN104160398A (en) Structured large object (lob) data
CN108829932B (en) Interest matching method, apparatus, computer equipment and storage medium
Eldawy et al. The ecosystem of SpatialHadoop
CN114238334A (en) Heterogeneous data encoding and decoding method and apparatus, computer equipment and storage medium
CN106980540B (en) A Calculation Method for Distributed Multidimensional Discrete Data
CN114510525B (en) Data format conversion method and device, computer equipment and storage medium
CN110069523A (en) A kind of data query method, apparatus and inquiry system
CN112699195B (en) Geospatial data processing method, device, computer equipment and storage medium
CN110245151A (en) Data point group query method, device, computer equipment and storage medium
CN111967045A (en) Big data-based data publishing privacy protection algorithm and system
CN117390011A (en) Report data processing method, device, computer equipment and storage medium
CN114791915B (en) Data aggregation method and device, computer equipment and storage medium
WO2016170600A1 (en) Data analysis assistance system and data analysis assistance method
CN111884940B (en) Interest matching method, apparatus, computer equipment and storage medium
CN114547066A (en) Nuclear power business data standardization method and device and computer equipment
CN110874370B (en) Data query method and device, computer equipment and readable storage medium
EP4356264A1 (en) Generating and presenting multi-dimensional representations for complex entities
Ge et al. Federated genetic algorithm: Two-layer privacy-preserving trajectory data publishing
CN117540056B (en) Method, device, computer equipment and storage medium for data query

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant