CN108829932B - 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
CN108829932B
CN108829932B CN201810492258.6A CN201810492258A CN108829932B CN 108829932 B CN108829932 B CN 108829932B CN 201810492258 A CN201810492258 A CN 201810492258A CN 108829932 B CN108829932 B CN 108829932B
Authority
CN
China
Prior art keywords
area
parameter
parameter list
boundary
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.)
Active
Application number
CN201810492258.6A
Other languages
Chinese (zh)
Other versions
CN108829932A (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

Images

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 application relates to an interest matching method, an interest matching device, computer equipment and a storage medium. The method comprises the following steps: the method comprises the steps of obtaining boundary parameters of a first area and a second area to be matched, sorting the boundary parameters according to a preset sorting rule, obtaining parameter lists respectively, determining a first mapping interval of an upper boundary parameter and a lower boundary parameter of the first area parameter list in the second area parameter list according to the numerical value of each boundary parameter in the parameter lists and the corresponding sorting position, determining a second mapping interval of the upper boundary parameter and the lower boundary parameter of the second area parameter list in the first area parameter list, and determining interest matching results of the first area and the second area according to the first mapping interval and the second mapping interval. The accuracy of the matching result is improved by sorting the parameters, and the interest matching result is judged by the mapping result, so that the length or the number of the list to be sorted is obviously reduced, the sorting overhead is reduced, the data processing capacity is reduced, and the matching efficiency is improved.

Description

Interest matching method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to an interest matching method, apparatus, computer device, and storage medium.
Background
In distributed simulation, publish/subscribe based communication will result in large amounts of irrelevant data transfers, thereby reducing simulation run performance. The HLA (High Level Architecture) standard provides data distribution management services to filter unnecessary data transmissions and reduce inter-federal communication overhead. Data producers utilize data distribution management services to maintain attributes (publishing areas) for sending data, while data consumers can utilize data distribution management services to specify their data requirements (ordering areas). The runtime support environment then distributes the producer's data to the data consumers according to the interest-matching relationships of these regions. Therefore, interest matching plays a key role in data distribution management.
However, the conventional interest matching method is mainly implemented by a region-based method, a grid-based method, and the like, and has a problem of low matching efficiency while implementing the interest matching result.
Disclosure of Invention
In view of the above, it is necessary to provide an interest matching method, an apparatus, a computer device, and a storage medium capable of improving interest matching efficiency for a technical problem of low interest matching efficiency.
A method of interest matching, the method comprising:
acquiring boundary parameters of a first area and a second area to be matched, wherein the boundary parameters comprise upper boundary parameters and lower boundary parameters which are in one-to-one correspondence, and the first area is a publishing area and the second area is an ordering area, or the first area is an ordering 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, wherein the preset sorting rule comprises sorting the lower boundary parameters according to the numerical values or sorting the upper boundary parameters according to the numerical values;
determining a first mapping interval corresponding to an upper bound parameter and a lower bound parameter of the first area parameter list in the second 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, and determining a 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;
and determining an interest matching result of the first region and the second region according to the first mapping interval and the second mapping interval.
In one embodiment, the determining, according to the numerical values and the corresponding sorting positions of the boundary parameters in the first area parameter list and the second area parameter list, a first mapping interval of an upper bound parameter and a lower bound parameter of the first area parameter list in the second area parameter list, and a second mapping interval of the upper bound parameter and the lower bound parameter of the second area parameter list in the first area parameter list includes:
determining a boundary parameter list of a second area to be mapped according to the determined sorting boundary in the preset sorting rule;
according to the numerical value of the parameter, determining a first mapping interval corresponding to an upper bound parameter and a lower bound parameter in the first area parameter list in the boundary parameter list of the second area through alternate comparison and binary search;
similarly, a 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 ordering rule is to order the lower bound parameters in ascending order, the boundary parameter list of the second region to be mapped is the lower bound list, and determining, according to the value of the parameter, a first mapping interval corresponding to the upper bound parameter and the lower bound parameter in the first region parameter list in the boundary parameter list of the second region by alternate comparison and binary search includes:
determining a 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 is a parameter corresponding position of a numerical value in a lower bound list of the second area, which is not less than a lower bound parameter in a parameter list of the first area;
determining a second mapping position of an upper bound parameter in the first area parameter list in a lower bound list of a second area by taking the first mapping position as a starting point through binary search;
and determining 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 according to the first mapping position and the second mapping position.
In one embodiment, the determining the interest matching result of the first region and the second region 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;
and obtaining an interest matching result of the first area and the second area according to the coverage information matrix.
In one embodiment, 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 of the first area and the second area;
acquiring an id (identity) parameter list corresponding to the first mapping interval and the second mapping interval, and determining each constituent element of the coverage information matrix according to the id parameter list;
and generating a coverage information matrix according to the row number and the column number of the coverage information matrix and each constituent element of the coverage information matrix.
In one embodiment, the obtaining an id parameter list corresponding to the first mapping interval and the second mapping interval, and determining each constituent element of the coverage information matrix according to the id parameter list includes:
acquiring an initialized coverage information matrix and an id parameter list corresponding to the first mapping interval and the second mapping interval;
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;
and updating corresponding elements of the second mapping interval in the updated coverage information matrix to the preset values according to the second mapping interval and the corresponding id parameter list so as to determine all the constituent elements of the coverage information matrix.
In one embodiment, the obtaining of the interest matching result between the first area and the second area according to the coverage information matrix includes:
and respectively obtaining the constituent elements of the coverage information matrix of each dimension, and determining the interest matching result of the first area and the second area according to the same constituent elements of the coverage information matrix of each dimension.
An interest matching apparatus, the apparatus comprising:
a boundary parameter obtaining module, configured to obtain boundary parameters of a first area and a second area to be matched, where the boundary parameters include an upper boundary parameter and a lower boundary parameter that correspond to each other one to one, where the first area is a publishing area and the second area is an ordering area, or the first area is an ordering area and the second area is a publishing area;
the parameter sorting processing module is used for 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, wherein the preset sorting rule comprises sorting the lower boundary parameters according to the numerical values or sorting the upper boundary parameters according to the numerical values;
a mapping interval determining module, configured to determine, according to the numerical values and the corresponding sorting positions of the boundary parameters in the first area parameter list and the second area parameter list, a first mapping interval in which an upper bound parameter and a lower bound parameter of the first area parameter list correspond to each other in the second area parameter list, and determine a second mapping interval in which an upper bound parameter and a lower bound parameter of the second area parameter list correspond to each other in the first area parameter list;
and the interest matching result determining module is used for determining the interest matching result of the first area and the second area according to the first mapping interval and the second mapping interval.
A computer device comprising a memory storing a computer program and a processor executing the computer program the following steps.
Acquiring boundary parameters of a first area and a second area to be matched, wherein the boundary parameters comprise upper boundary parameters and lower boundary parameters which are in one-to-one correspondence, and the first area is a publishing area and the second area is an ordering area, or the first area is an ordering 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, wherein the preset sorting rule comprises sorting the lower boundary parameters according to the numerical values or sorting the upper boundary parameters according to the numerical values;
determining a first mapping interval corresponding to an upper bound parameter and a lower bound parameter of the first area parameter list in the second 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, and determining a 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;
and determining an interest matching result of the first region and the second region according to the first mapping interval and the second mapping interval.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the following steps.
Acquiring boundary parameters of a first area and a second area to be matched, wherein the boundary parameters comprise upper boundary parameters and lower boundary parameters which are in one-to-one correspondence, and the first area is a publishing area and the second area is an ordering area, or the first area is an ordering 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, wherein the preset sorting rule comprises sorting the lower boundary parameters according to the numerical values or sorting the upper boundary parameters according to the numerical values;
determining a first mapping interval of an upper bound parameter and a lower bound parameter of the first area parameter list in the second area parameter list 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, and determining a second mapping interval of the upper bound parameter and the lower bound parameter of the second area parameter list in the first area parameter list;
and determining the interest matching result of the first region and the second region according to the first mapping interval and the second mapping interval.
According to the interest matching method, the interest matching device, the interest matching computer equipment and the storage medium, the boundary parameters of the first region and the second region to be matched are obtained, the lower bound parameters are sequenced according to the numerical values or the upper bound parameters are sequenced according to the numerical values, the mapping intervals of the upper bound parameters and the lower bound parameters of the first region parameter list in the second region parameter list and the corresponding second mapping intervals of the upper bound parameters and the lower bound parameters of the second region parameter list in the first region parameter list are determined according to the numerical values and the positions of the parameters in the parameter list, the accuracy of the matching results is improved through sequencing the parameters, the interest matching results are judged through the mapping results of the first region parameters and the second region parameters, the length or the number of the sequence list to be sequenced are obviously reduced, the sequencing overhead is reduced, the data processing amount is reduced, and the matching efficiency is improved.
Drawings
FIG. 1 is a schematic flow chart diagram of an interest matching method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram of an interest matching method according to another embodiment of the present application;
FIG. 3 is a schematic flow chart diagram of an interest matching method according to another embodiment of the present application;
FIG. 4 is a flowchart illustrating the step S750 of the interest matching method according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating the classification principle of the interest match method in an application example of the present application;
FIG. 6 is a schematic diagram of an ordered parameter table of a interest matching method in an application example of the present application;
FIG. 7 is a diagram illustrating a mapping position of a parameter of an interest matching method according to an embodiment of the present application;
FIG. 8 is a block diagram of an interest matching apparatus according to an embodiment of the present application;
fig. 9 is an internal structural diagram of a computer device in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The distributed interactive simulation environment is a product of combination of simulation technology and network technology, and is formed by interconnection of simulation equipment dispersed in various places through a local area network or a wide area network. Due to the superiority and practicability of the distributed interactive simulation technology, the distributed interactive simulation technology is currently applied to non-military fields such as education, medical treatment, commerce and the like by application, research and development of the military field. With the expansion of simulation scale and the improvement of simulation precision, the data flow of a simulation network increasingly expands. In distributed simulation, publish/subscribe based communication will result in large amounts of unrelated data transmissions, thereby degrading simulation run performance. The HLA standard provides Data Distribution Management (DDM) services to filter unnecessary Data transmissions and reduce inter-federal communication overhead. Data producers use DDM services to maintain their attributes for sending data (publishing area), while data consumers can use DDM services to specify their data requirements (subscribing area). Then, the RTI (Run-Time Infrastructure) distributes the producer's data to the data consumers according to the interest matching relationship of the regions. Therefore, interest matching plays a key role in data distribution management. Without the interest matching mechanism, a large amount of unnecessary data distribution is generated, which seriously reduces the simulation running performance. However, without an efficient interest matching algorithm, the simulation run performance is also affected.
In one embodiment, as shown in fig. 1, there is provided an interest matching method, the method comprising:
step S100, obtaining boundary parameters of a first area and a second area to be matched, where the boundary parameters include upper boundary parameters and lower boundary parameters corresponding to each other, where the first area is a publishing area and the second area is an ordering area, or the first area is an ordering area and the second area is a publishing area.
In federal simulation, a region refers to a limited range of received data and data that can be transmitted, and federal members can declare their interests to the RTI through region definition, including the limit conditions of the data desired to be received and the data that can be transmitted. The areas comprise a publishing area and an ordering area, the ordering area expresses the data requirement of ordering federates by defining a path space coordinate interval, the publishing area maintains the attribute of sending data by defining the path space coordinate interval, the first area can be the ordering area or the publishing area, and since the ordering area and the publishing area are to-be-matched areas, the second area is the ordering area when the first area is the publishing area and the second area is the publishing area when the first area is the ordering area. The first area and the second area are both composed of a plurality of parameters, including a lower bound parameter corresponding to the minimum value and an upper bound parameter corresponding to the maximum value. It is understood that the first area is not limited to a single area, and is a generic area (subscription or publication), and 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.
Step S300, sequencing the boundary parameters of the first area and the second area respectively according to a preset sequencing rule to obtain a first area parameter list and a second area parameter list, wherein the preset sequencing rule comprises sequencing the lower boundary parameters according to the numerical value or sequencing the upper boundary parameters according to the numerical value.
The first area comprises a plurality of sub-areas, each sub-area comprises an upper boundary parameter and a lower boundary parameter, the boundary parameters of the first area and the second area are respectively sequenced according to the numerical values through a preset sequencing rule, if the lower boundary parameters are sequenced according to the numerical values, because the upper boundary parameters are in one-to-one correspondence with the lower boundary parameters, when the lower boundary parameters are sequenced according to the numerical values, the upper boundary areas are also correspondingly rearranged to obtain a parameter list, the parameter list comprises a lower parameter list which is arranged in an ascending or descending order and a corresponding upper parameter list, and similarly, the upper boundary parameters can be sequenced according to the ascending or descending order to obtain a first area parameter list and a second area parameter list.
Step S500, 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, determining a first mapping interval of the upper bound parameter and the lower bound parameter of the first area parameter list in the second area parameter list, and determining a second mapping interval of 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 an interval formed by mapping positions of upper and lower boundary parameters in a corresponding parameter list to be mapped, for example, the upper and lower boundary parameters of a first region are mapped to a parameter list of a second region, and the determination method of the mapping interval is as follows: the mapping position of the upper bound parameter of the first area is a position corresponding to the maximum parameter which is not less than the upper bound parameter in the parameter list to be mapped of the second area, the mapping position of the lower bound parameter of the first area is a position corresponding to the minimum parameter which is greater than or equal to the lower bound parameter in the parameter list to be mapped of the second area, and the mapping positions of the upper bound parameter and the lower bound parameter form a mapping interval.
Step S700, determining an interest matching result between the first region and the second region according to the first mapping interval and the second mapping interval.
According to the decision conditions, in order to obtain matching information, the core work is to determine which lower bound of the published area each subscription area contains and which lower bound of the subscription area each published area contains, i.e. the corresponding mapping interval. Whether the two areas are overlapped can be judged through the first mapping interval and the second mapping interval, and therefore an interest matching result is obtained.
According to the interest matching method, the boundary parameters of the first area and the second area to be matched are obtained, the lower bound parameters are sequenced according to the numerical value or the upper bound parameters are sequenced according to the numerical value, the mapping intervals of the upper bound parameters and the lower bound parameters of the first area parameter list in the second area parameter list and the corresponding second mapping intervals of the upper bound parameters and the lower bound parameters of the second area parameter list in the first area parameter list are determined according to the numerical value and the position of the parameters in the parameter list, the accuracy of the matching results is improved through sequencing the parameters, the interest matching results are judged through the mapping results of the first area parameters and the second area parameters, the length or the number of the list to be sequenced are obviously reduced, the sequencing overhead is reduced, the data processing amount is reduced, and therefore the matching efficiency is improved.
As shown in fig. 2, in one embodiment, step S500 includes:
step S520, determining a boundary parameter list of the second region to be mapped according to the determined sorting boundary in the preset sorting rule.
The sorting rule comprises sorting the lower bound parameters in an ascending or descending order, or sorting the upper bound parameters in an ascending or descending order, and according to the determined sorting rule, determining whether the sorting boundary is the upper bound or the lower bound. The sequencing boundary is the same as the boundary corresponding to the boundary parameter list to be mapped, and when the sequencing boundary is an upper boundary, the boundary parameter list to be mapped is an upper boundary list.
Step S540, according to the value of the parameter, determining 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 by alternate comparison and binary search.
Similarly, a 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.
The binary search is also called as a binary search, and is a search method with higher efficiency, the binary search requires a linear table to adopt a sequential storage structure, elements in the table are arranged in order according to keywords, the elements in a lower bound list of a second area to be mapped are supposed to be arranged in ascending order, a parameter value recorded in the middle position of the lower bound list is compared with an upper bound parameter value of a first area, if the two are equal, the position corresponding to the parameter list value is the upper bound parameter mapping position, and if the parameter list value is greater than the upper bound value and the adjacent parameter list value of the parameter list value is less than the upper bound value, the position corresponding to the adjacent parameter list value is the upper bound parameter mapping position, and the search is successful; otherwise, the table is divided into a front sub-table and a rear sub-table by using the middle position record, if the parameter value recorded in the middle position is larger than the upper limit parameter value, the front sub-table is further searched, otherwise, the rear sub-table is further searched, and the processes are repeated until the record meeting the conditions is found.
In an embodiment, when the preset sorting rule is to sort the lower bound parameters according to ascending order, the boundary parameter list of the second area to be mapped is the lower bound list, and step S540 includes:
and determining a 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, wherein the first mapping position is a position corresponding to the parameter of which the numerical value in the lower bound list of the second area is not less than the lower bound parameter in the first area parameter list.
And determining a second mapping position of the upper bound parameter in the first area parameter list in the lower bound list of the second area by taking the first mapping position as a starting point through binary search, wherein the second mapping position is a position corresponding to the parameter of which the value in the lower bound list of the second area is not more than the upper bound parameter in the first area parameter list.
And determining 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 according to the first mapping position and the second mapping position.
In one embodiment, according to different preset sorting rules, the determination methods of the first mapping position and the second mapping position are respectively as follows:
when the preset sorting rule is that the lower bound parameters are sorted according to descending order, and the boundary parameter list of the second area to be mapped is the lower bound list:
determining a parameter corresponding position, in the lower boundary list of the second area, of which the value is not greater than the lower boundary parameter in the first area parameter list as a first mapping position by alternately comparing the lower boundary parameter in the first area parameter list with the lower boundary parameter in the second area parameter list; and determining a second mapping position of a position corresponding to a parameter, the numerical value of which is not less than the upper-bound parameter in the first area parameter list, in the lower-bound list of the second area by taking the first mapping position as a starting point through binary search.
When the preset ordering rule is that the upper bound parameters are ordered according to ascending order, and the boundary parameter list of the second area to be mapped is the upper bound list:
determining a position corresponding to a parameter of which the numerical value is not less than the upper-bound parameter in the first area parameter list in the upper-bound list of the second area as a first mapping position by alternately comparing the upper-bound parameter in the first area parameter list with the upper-bound parameter in the second area parameter list; and determining a second mapping position of a position corresponding to a parameter of which the numerical value is not more than the lower-bound parameter in the first area parameter list in the upper-bound list of the second area by taking the first mapping position as a starting point through binary search.
When the preset sorting rule is that the upper bound parameters are sorted according to descending order, and the boundary parameter list of the second area to be mapped is an upper bound list:
determining a position corresponding to a parameter of which the numerical value is not greater than the upper-bound parameter in the first area parameter list in the upper-bound list of the second area as a first mapping position by alternately comparing the upper-bound parameter in the first area parameter list with the upper-bound parameter in the second area parameter list; and determining a second mapping position of a position corresponding to the parameter, the numerical value of which is not less than the lower-bound parameter in the parameter list of the first area, in the upper-bound list of the second area by taking the first mapping position as a starting point through binary search.
In one example of application, for ease of understanding, two fields are named publishing field U and subscription field S, respectively, where field U ranges from [ U LB (lower bound), U UB (Upper boundary)]S is in the range of [ S LB ,S UB ]. As shown in fig. 5, when U overlaps S, there are four cases in total. The four cases can be further divided into two cases, one is that the lower boundary of U is located in the region S, and the other is that the lower boundary of S is located in U. According to intensive research, two mutually exclusive sufficiently necessary conditions are provided to judge the overlapping relationship of regions:
U LB ∈[S LB ,S UB ) (1)
S LB ∈[U LB ,U UB ) (2)
because the two conditions are mutually exclusive, the overlapping relation can be judged only by meeting any one of the conditions.
For convenience of description, the lower subscription area boundary is SL, the upper subscription area boundary is SU, the publish area is U, the lower publish area boundary is UL, and the upper publish area boundary is UU. Suppose U contains a set of lower bound of subscription area SL i ,SL i+1 ,SL i+2 ,…,SL i+k And the values i and i + k respectively represent positions for mapping the upper and lower boundary values of U to the SL list, two parameters are introduced to represent corresponding positions of the mapping interval, and a comparison index lower boundary (CIL) and a comparison index upper boundary (CIU) respectively represent positions for mapping the upper and lower boundary values of U to the SL list, namely a first mapping position and a second mapping position, namely i and i + k. As shown in fig. 7, region [ UL ] 0 ,UU 0 ]Are 2 and 5, respectively, and likewise the interval [ SL 0 ,SU 0 ]CIL and CIU of (1) are 0 and 1, respectively. Thus, region [ SL ] 2 ,SU 2 ],[SL 3 ,SU 3 ],[SL 4 ,SU 4 ]And [ SL ] 5 ,SU 5 ]And [ UL 0 ,UU 0 ) There are overlapping parameters, and [ UL ] 0 ,UU 0 ) And [ UL 1 ,UU 1 ) And [ SL ] 0 ,SU 0 ) There are overlapping parameters. When CIL and CIU values of all publish and subscribe areas are obtained, a matching relationship of all areas in this dimension can be obtained, and in calculating the CIL and CIU values of each publish and subscribe area, the CIL value can be easily obtained by alternately comparing the value in SL with the value in UL, given that the lists SL and UL have been sorted. In calculating CIU values, calculating CIU values for N regions will yield O (N) in the worst case if the upper limit of the region is compared against the values in SL or UL one by one 2 ) The complexity of the computation. Since the SL and UL lists are already ordered, the binary search can effectively locate the CIU value. Considering that the CIL values of the regions are already determined, as the lower bound value of the region increases, the corresponding CIL value also becomes correspondingly larger, so the search range becomes smaller, and the computational complexity of acquiring the CIU of a single region is theoretically smaller than O (logN). Even in the worst case, the computational complexity of computing a single CIU value is O (logN).
As shown in FIG. 2, in one embodiment, step S700 includes step S720 and step S780.
Step S720, a coverage information matrix is generated according to the first mapping interval and the second mapping interval.
The first mapping interval and the second mapping interval are used for judging whether the two areas are overlapped, and the first mapping interval and the second mapping interval can determine the composition of the coverage information matrix.
As shown in fig. 3, in one embodiment, step S720 includes step S730, step S750, and step S770.
Step S730, determining the number of rows and columns of the coverage information matrix according to the number of boundary parameters of the first area and the second area.
The first region may be composed of a plurality of publishing regions or a plurality of ordering regions, and for convenience of description, a plurality of independent publishing regions or ordering regions of the first region are referred to as sub-regions, and it is emphasized that each publishing region or ordering region is an independent individual. Each subregion comprises an upper bound parameter and a lower bound parameter, the number of the upper bound parameter or the lower bound parameter is the number of the subregions of the first region, similarly, the number of the subregions of the second region can be determined, the number of rows and columns of the coverage information matrix is the same as the number of the subregions of the first region and the second region, the number of the rows and the columns of the coverage information matrix are determined according to the number of the boundary parameters of the first region and the second region, and each element of the matrix is the overlapping information of the first region and the second region.
Step S750, an id parameter list corresponding to the first mapping interval and the second mapping interval is obtained, and each constituent element of the coverage information matrix is determined according to the id parameter list.
The first mapping interval is an interval formed by mapping positions of the upper bound parameter and the lower bound parameter of the first area parameter list in the second area parameter list, namely, a sub-area corresponding to the interval in the second area parameter list has an overlapping part with the sub-area where the upper bound parameter and the lower bound parameter of the first area parameter list are located. The id parameter list is an auxiliary list used for storing corresponding ids corresponding to the parameters of the first area and corresponding ids corresponding to the parameters of the second area, each area is distinguished by corresponding to an id identifier, and the positions of the constituent elements of the coverage information matrix can be determined through the id parameter list.
As shown in fig. 4, in one embodiment, step S750 includes:
step S752, obtain the initialized coverage information matrix and the id parameter list corresponding to the first mapping interval and the second mapping interval.
The initialized coverage information matrix refers to initializing all elements of the matrix, wherein the initialized elements correspond to information that parameters of the first area and the second area are not overlapped. In embodiments, overlap and non-overlap may be represented by a "1" or "0" or by "true" or "false".
Step S754, according to the first mapping interval and the corresponding id parameter list, updating the corresponding element of the first mapping interval in the initialized coverage information matrix to a preset value.
Step S756, updating the corresponding elements of the second mapping interval in the updated coverage information matrix to preset values according to the second mapping interval and the corresponding id parameter list, so as to determine each constituent element of the coverage information matrix.
In an application example, the number of the first areas is M, the number of the second areas is N, an M × N bit matrix is used for storing coverage information, matrix element values represent coverage relations between the first areas and the second areas, overlap and non-overlap are represented by "true" or "false", and each element of the initialized matrix is "false". The first mapping interval represents a mapping position of each sub-region of the first region in the second region, for example, the mapping interval of the mapping position of the 5 th sub-region of the first region in the second region is [4,8], then the corresponding elements from the 4 th column to the 8 th column of the 5 th row of the M × N matrix are updated to "true", and similarly, each row parameter of the M × N matrix can be updated. And in a similar way, each column of parameters of the M x N matrix can be updated, and because the determined first mapping interval and the second mapping interval are two sufficient necessary conditions for judging the mutual exclusion of the overlapping of the first area and the second area, the covering information unit is subjected to secondary assignment according to the first mapping interval and the second mapping interval, so that each constituent element of the covering information matrix can be determined, and the interest matching result is obtained.
Step S770, generating a coverage information matrix according to the number of rows and columns of the coverage information matrix and each constituent element of the coverage information matrix.
According to the number of rows and columns of the matrix, the basic structure of the matrix can be determined, all the constituent elements of the matrix are obtained, and the initialized elements are assigned and updated, so that the required coverage information matrix can be generated.
Step S780, obtaining an interest matching result between the first region and the second region according to the coverage information matrix.
The coverage information matrix can visually record and represent interest matching results of the first area and the second area, and whether sub-areas of the first area and the second area are overlapped can be judged only by searching all constituent elements in the matrix, so that the interest matching results are obtained.
As shown in fig. 3, in an embodiment, step S780 includes step S790, respectively obtaining constituent elements of the coverage information matrix of each dimension, and determining an interest matching result between the first area and the second area according to the same constituent elements of the coverage information matrix of each dimension.
In the application process, the interest matching comprises information of multiple dimensions, the interest matching method of each dimension is the same, and the interest matching result of a first region and a second region under the multiple dimensions, namely the interest matching result of a published region and an ordered region, can be judged by determining the intersection of elements of the same matrix position of the multiple dimensions.
The interest matching algorithm provided by the application adopts two mutually exclusive region overlapping judgment conditions as sufficient necessary conditions for judging the matching relationship between the published region and the ordered region, aims to reduce the sorting expense, avoid unnecessary bit operation, avoid the expense generated by filtering incorrect matching and only need to sort two boundary value lists with the length of N, and can obviously reduce the length or the number of the lists to be sorted. And two mutually exclusive judging conditions are adopted as the judging conditions for overlapping the two areas, the two areas can be determined to be overlapped when one of the two judging conditions is met, the interest matching is successful, according to the two judging conditions, the matching relation between the published ordering areas can be acquired more quickly through binary search, and the digital array operation is not needed.
In an application example, the subscription area is denoted as S, the publishing area is denoted as U, and the interest matching result between the publishing area and the subscription area is obtained by sorting the lower bound parameters in ascending order, for example, to explain: for each dimension of the interest space, boundary parameters of all the publishing areas and the subscribing areas are obtained, the lower boundary parameters of all the publishing areas are sorted in an ascending order, and the lower boundary parameters of all the subscribing areas are sorted in an ascending order, so that 4 boundary value lists can be obtained, as shown in fig. 6, SL, SU, UL, and UU are respectively, where SL is the lower boundary list of the subscribing areas arranged in an ascending order, the SU list stores the corresponding upper boundary parameters of the subscribing areas, and similarly, UL and UU are used for storing the lower boundary parameters and the upper boundary parameters of all the publishing areas. In addition, there are two secondary lists for storing the corresponding publishing area-id and subscription area-id. Using binary searchThe method comprises the steps of respectively solving a comparison index upper bound (CIU) and a comparison index lower bound (CIL) of each publishing area and each ordering area, respectively representing the positions of mapping the upper and lower bound values of the publishing area or the ordering area to the SL list or the UL list, as shown in FIG. 7, taking the mapping of the upper and lower bound parameters of the publishing area to the SL list as an example, firstly, alternately comparing UL and SL, quickly obtaining the positions of mapping the values in all UL lists to the SL list, and finding UL 0 The corresponding mapping position is SL 2 . Is sending [ UU 0 ,UL 0 ]In the process of mapping to the SL list, only a binary search method is needed to search for the UU 0 At the corresponding mapping position, because UU 0 Greater than UL 0 Therefore, UU 0 Is found in the range of [ [ SL ] 2 ,SL n ]. The search is carried out by adopting a dichotomy method, the search efficiency is improved, and UL is obtained firstly 0 At the mapping position on SL, UU is searched 0 At the mapping position on SL, the search range is reduced, the search efficiency is further improved, and the search results are CIU and CIL (the first mapping position and the second mapping position). The method comprises the steps of mapping each upper and lower bound parameter of a publishing area to a SL list and mapping each upper and lower bound parameter of an ordering area to a UL list to obtain CIL and CIU of each publishing area and each ordering area, constructing a M N coverage information matrix according to the number of sub-areas of the publishing area and the ordering area, wherein M represents the number of the sub-areas of the publishing area, N represents the number of the sub-areas of the ordering area, each publishing sub-area corresponds to one row, each ordering sub-area corresponds to one column, matrix elements represent the coverage relation between the publishing area and the ordering area, false represents that the areas are not overlapped, true represents that the areas are overlapped, and all elements of the matrix are initialized to false. When the publish area overlaps with one subscribe area, the corresponding bit is set to true for storing match information. For each publish area and subscribe area, a value of true is assigned to the corresponding location in the bitmap according to their CIL and CIU values. And performing the operation on each dimension to obtain a final coverage information matrix and determine an interest matching result.
It should be understood that although the various steps in the flow diagrams of fig. 1-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least some of the steps in fig. 1-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 8, there is provided an interest matching apparatus including:
the boundary parameter acquiring module 100 is configured to acquire boundary parameters of a first area and a second area to be matched, where the boundary parameters include upper boundary parameters and lower boundary parameters that correspond to each other one to one, where the first area is a publishing area and the second area is an ordering area, or the first area is an ordering area and the second area is a publishing area.
The parameter sorting processing module 300 is configured to sort the boundary parameters of the first area and the second area respectively according to a preset sorting rule, so as to obtain a first area parameter list and a second area parameter list, where the preset sorting rule includes sorting the lower boundary parameters according to the magnitude of the value or sorting the upper boundary parameters according to the magnitude of the value.
The mapping interval determining module 500 is configured to determine, according to the numerical values and the corresponding sorting positions of the boundary parameters in the first area parameter list and the second area parameter list, a first mapping interval in which the upper boundary parameter and the lower boundary parameter of the first area parameter list correspond to each other in the second area parameter list, and determine a second mapping interval in which the upper boundary parameter and the lower boundary parameter of the second area parameter list correspond to each other in the first area parameter list.
The interest matching result determining module 700 is configured to determine an interest matching result between the first region and the second region according to the first mapping interval and the second mapping interval.
In one embodiment, the mapping interval determining module 500 further comprises:
and the first mapping interval determining unit is used for determining a boundary parameter list of the second area to be mapped according to the determined sorting boundary in the preset sorting rule, and determining a first mapping interval corresponding to the upper boundary parameter and the lower boundary parameter in the first area parameter list in the boundary parameter list of the second area through alternate comparison and binary search according to the numerical value of the parameters.
And the second mapping interval determining unit is used for determining a 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 ordering rule is to order the lower bound parameters in ascending order, the boundary parameter list of the second region to be mapped is the lower bound list, and the first mapping interval determining unit includes:
and the first mapping position determining subunit determines a 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, wherein the first mapping position is a parameter corresponding position of the lower bound parameter in the second area list, and the numerical value of the first mapping position is not less than that of the lower bound parameter in the first area parameter list.
And the second mapping position determining subunit is used for determining a second mapping position of the upper bound parameter in the first area parameter list in the lower bound list of the second area by taking the first mapping position as a starting point through binary search.
And the first mapping interval determining subunit is configured to determine, according to the first mapping position and the second mapping position, a first mapping interval in which the upper bound parameter and the lower bound parameter in the first area parameter list correspond to each other in the boundary parameter list of the second area.
In one embodiment, the interest matching result determining 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;
and the interest matching result acquisition unit is used for acquiring the interest matching results of the first area and the second area according to the coverage information matrix.
In one embodiment, the coverage information matrix generating unit includes:
the line number and column number determining subunit is used for determining the line number and column number of the coverage information matrix according to the boundary parameter number of the first area and the second area;
each component element determining subunit of the matrix is used for acquiring an 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;
and the coverage information matrix generating subunit is used for generating a coverage information matrix according to the row number and the column number of the coverage information matrix and each constituent element of the coverage information matrix.
In an embodiment, each constituent element determining subunit of the matrix is configured to further obtain an initialized coverage information matrix and an id parameter list corresponding to the first mapping interval and the second mapping interval, update a corresponding element of the first mapping interval in the initialized coverage information matrix to a preset value and a corresponding id parameter list according to the first mapping interval and the corresponding id parameter list, and update a corresponding element of the second mapping interval in the updated coverage information matrix to a preset value according to the second mapping interval, so as to determine each constituent element of the coverage information matrix.
In an embodiment, the interest matching result obtaining unit is further configured to obtain constituent elements of the coverage information matrices of the dimensions, and determine the interest matching results of the first area and the second area according to the same constituent elements of the coverage information matrices of the dimensions.
According to the interest matching device, the boundary parameters of the first area and the second area to be matched are obtained, the lower bound parameters are sequenced according to the numerical values or the upper bound parameters are sequenced according to the numerical values, the mapping intervals of the upper bound parameters and the lower bound parameters of the first area parameter list in the second area parameter list and the corresponding second mapping intervals of the upper bound parameters and the lower bound parameters of the second area parameter list in the first area parameter list are determined according to the numerical values and the positions of the parameters in the parameter list, the accuracy of the matching results is improved through sequencing the parameters, the interest matching results are judged through the mapping results of the first area parameters and the second area parameters, the length or the number of the sequence list to be sequenced are obviously reduced, the sequencing overhead is reduced, the data processing amount is reduced, and therefore the matching efficiency is improved.
For the specific definition of the interest matching device, the above definition of the interest matching method can be referred to, and is not described herein again. The various modules in the interest matching apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 9. The computer device comprises a processor, a memory, a network interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an interest matching method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring boundary parameters of a first area and a second area to be matched, wherein the boundary parameters comprise upper boundary parameters and lower boundary parameters which are in one-to-one correspondence, and the first area is a publishing area and the second area is an ordering area, or the first area is an ordering area and the second area is a publishing area;
sequencing boundary parameters of the first area and the second area respectively according to a preset sequencing rule to obtain a first area parameter list and a second area parameter list, wherein the preset sequencing rule comprises sequencing lower bound parameters according to the numerical value or sequencing upper bound parameters according to the numerical value;
determining a first mapping interval corresponding to an upper bound parameter and a lower bound parameter of the first area parameter list in the second 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, and determining a 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;
and determining the interest matching result of the first region and the second region according to the first mapping interval and the second mapping interval.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
determining a boundary parameter list of a second area to be mapped according to the determined sorting boundary in the preset sorting rule;
determining a first mapping interval corresponding to an upper bound parameter and a lower bound parameter in a first area parameter list in a boundary parameter list of a second area through alternate comparison and binary search according to the numerical value of the parameter;
similarly, a 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 ordering rule is that the lower bound parameters are ordered according to ascending order, the boundary parameter list of the second region to be mapped is the lower bound list, and the processor executes the computer program to further implement the following steps:
determining a 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, wherein the first mapping position is a parameter corresponding position of the lower bound parameter in the second area list, and the numerical value of the first mapping position is not less than that of the lower bound parameter in the first area parameter list;
determining a second mapping position of an upper bound parameter in the first area parameter list in a lower bound list of a second area by taking the first mapping position as a starting point through binary search;
and determining 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 according to the first mapping position and the second mapping position.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
generating a coverage information matrix according to the first mapping interval and the second mapping interval;
and obtaining an interest matching result of the first area and the second area according to the coverage information matrix.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
determining the number of rows and columns of a coverage information matrix according to the number of boundary parameters of the first area and the second area;
acquiring an id parameter list corresponding to the first mapping interval and the second mapping interval, and determining each constituent element of the coverage information matrix according to the id parameter list;
and generating the coverage information matrix according to the row number and the column number of the coverage information matrix and each constituent element of the coverage information matrix.
In one embodiment, the processor when executing the computer program further performs the steps of:
acquiring an initialized coverage information matrix and an id parameter list corresponding to a first mapping interval and a second mapping interval;
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;
and updating corresponding elements of the second mapping interval in the updated coverage information matrix to preset values according to the second mapping interval and the corresponding id parameter list so as to determine each constituent element of the coverage information matrix.
In one embodiment, the processor when executing the computer program further performs the steps of:
and respectively obtaining the constituent elements of the coverage information matrix of each dimension, and determining the interest matching result of the first area and the second area according to the same constituent elements of the coverage information matrix of each dimension.
According to the computer equipment for realizing the interest matching method, the boundary parameters of the first area and the second area to be matched are obtained, the lower bound parameters are sequenced according to the numerical value or the upper bound parameters are sequenced according to the numerical value, the mapping interval of the upper bound parameters and the lower bound parameters of the first area parameter list in the second area parameter list and the corresponding second mapping interval of the upper bound parameters and the lower bound parameters of the second area parameter list in the first area parameter list are determined according to the numerical value and the position of the parameters in the parameter list, the accuracy of the matching result is improved through sequencing the parameters, the interest matching result is judged through the mapping result of the first area parameters and the second area parameters, the length or the number of the list to be sequenced are obviously reduced, the sequencing overhead is reduced, the data processing amount is reduced, and the matching efficiency is improved.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, performs the steps of:
acquiring boundary parameters of a first area and a second area to be matched, wherein the boundary parameters comprise upper boundary parameters and lower boundary parameters which are in one-to-one correspondence, and the first area is a publishing area and the second area is an ordering area, or the first area is an ordering area and the second area is a publishing area;
sorting 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, wherein the preset sorting rule comprises sorting lower boundary parameters according to the numerical value or sorting upper boundary parameters according to the numerical value;
determining a first mapping interval of an upper bound parameter and a lower bound parameter of the first area parameter list in the second 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, and determining a second mapping interval of the upper bound parameter and the lower bound parameter of the second area parameter list in the first area parameter list;
and determining the interest matching result of the first region and the second region according to the first mapping region and the second mapping region.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining a boundary parameter list of a second area to be mapped according to the determined sorting boundary in the preset sorting rule;
according to the numerical value of the parameter, determining a first mapping interval corresponding to an upper bound parameter and a lower bound parameter in a first area parameter list in a boundary parameter list of a second area through alternate comparison and binary search;
and similarly, determining a 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 ordering rule is that the lower bound parameters are ordered in ascending order, the boundary parameter list of the second region to be mapped is the lower bound list, and the computer program when executed by the processor further implements the following steps:
determining a 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, wherein the first mapping position is a position corresponding to the parameter of which the numerical value in the lower bound list of the second area is not less than the lower bound parameter in the first area parameter list;
determining a second mapping position of an upper bound parameter in the first area parameter list in a lower bound list of a second area by taking the first mapping position as a starting point through binary search;
and determining 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 according to the first mapping position and the second mapping position.
In one embodiment, the computer program when executed by the processor further performs the steps of:
generating a coverage information matrix according to the first mapping interval and the second mapping interval;
and obtaining an interest matching result of the first area and the second area according to the coverage information matrix.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining the number of rows and the number of columns of a coverage information matrix according to the number of boundary parameters of the first area and the second area;
acquiring an id parameter list corresponding to the first mapping interval and the second mapping interval, and determining each constituent element of the coverage information matrix according to the id parameter list;
and generating the coverage information matrix according to the row number and the column number of the coverage information matrix and each constituent element of the coverage information matrix.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring an initialized coverage information matrix and an id parameter list corresponding to a first mapping interval and a second mapping interval;
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;
and updating corresponding elements of the second mapping interval in the updated coverage information matrix to preset values according to the second mapping interval and the corresponding id parameter list so as to determine each constituent element of the coverage information matrix.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and respectively obtaining the constituent elements of the coverage information matrix of each dimension, and determining the interest matching result of the first area and the second area according to the same constituent elements of the coverage information matrix of each dimension.
According to the storage medium for realizing the interest matching method, the boundary parameters of the first area and the second area to be matched are obtained, the lower bound parameters are sequenced according to the numerical values or the upper bound parameters are sequenced according to the numerical values, the mapping intervals of the upper bound parameters and the lower bound parameters of the first area parameter list in the second area parameter list and the second mapping intervals corresponding to the upper bound parameters and the lower bound parameters of the second area parameter list in the first area parameter list are determined according to the numerical values and the positions of the parameters in the parameter list, the accuracy of the matching results is improved by sequencing the parameters, the interest matching results are judged according to the mapping results of the first area parameters and the second area parameters, the length or the number of the list to be sequenced are obviously reduced, the sequencing overhead is reduced, the data processing amount is reduced, and the matching efficiency is improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, and the computer program may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile 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 a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not to be construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An interest matching method, characterized in that the method comprises:
acquiring boundary parameters of a first area and a second area to be matched, wherein the boundary parameters comprise upper boundary parameters and lower boundary parameters which are in one-to-one correspondence, and the first area is a publishing area and the second area is an ordering area, or the first area is an ordering area and the second area is a publishing area;
sequencing the boundary parameters of the first area and the second area respectively according to a preset sequencing rule to obtain a first area parameter list and a second area parameter list, wherein the preset sequencing rule comprises sequencing the lower bound parameters according to the numerical values or sequencing the upper bound parameters according to the numerical values;
determining a boundary parameter list of a second area to be mapped and a boundary parameter list of a first area to be mapped according to the determined sorting boundary in the preset sorting rule; wherein the sorting boundary is the same as the boundary corresponding to the boundary parameter list;
determining a first mapping interval formed by mapping positions of upper and lower boundary parameters in the first area parameter list in the boundary parameter list of the second area and a second mapping interval formed by mapping positions of the upper and lower boundary parameters in the second area parameter list in the boundary parameter list of the first area by alternate comparison and binary search according to the numerical value of the parameters;
and determining the interest matching result of the first region and the second region according to the first mapping interval and the second mapping interval.
2. The interest matching method according to claim 1, wherein when the preset ordering rule is that the lower bound parameters are ordered according to ascending order, the boundary parameter list of the second area to be mapped is a lower bound list, and determining, according to the numerical value of the parameter, a first mapping interval in which the upper bound parameter and the lower bound parameter in the first area parameter list correspond to each other in the boundary parameter list of the second area by alternating comparison and binary search includes:
determining a 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, wherein the first mapping position is a parameter corresponding position of the lower bound parameter in the second area list, and the numerical value of the lower bound parameter is not less than that of the lower bound parameter in the first area parameter list;
determining a second mapping position of an upper bound parameter in the first area parameter list in a lower bound list of a second area by taking the first mapping position as a starting point through binary search;
and determining 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 according to the first mapping position and the second mapping position.
3. The interest matching method according to claim 1, wherein the determining the interest matching result of the first region and the second region according to the first mapping interval and the second mapping interval comprises:
generating a coverage information matrix according to the first mapping interval and the second mapping interval;
and obtaining an interest matching result of the first area and the second area according to the coverage information matrix.
4. The interest matching method according to claim 1, wherein the generating a coverage information matrix according to the first mapping interval and the second mapping interval comprises:
determining the number of rows and columns of the coverage information matrix according to the number of boundary parameters of the first area and the second area;
acquiring an id parameter list corresponding to the first mapping interval and the second mapping interval, and determining each constituent element of the coverage information matrix according to the id parameter list;
and generating a coverage information matrix according to the row number and the column number of the coverage information matrix and each constituent element of the coverage information matrix.
5. The interest matching method according to claim 4, wherein the obtaining an id parameter list corresponding to the first mapping interval and the second mapping interval, and determining each constituent element of the coverage information matrix according to the id parameter list includes:
acquiring an initialized coverage information matrix and an id parameter list corresponding to the first mapping interval and the second mapping interval;
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;
and updating corresponding elements of the second mapping interval in the updated coverage information matrix to the preset values according to the second mapping interval and the corresponding id parameter list so as to determine all the constituent elements of the coverage information matrix.
6. The method according to claim 3, wherein obtaining the interest matching result between the first region and the second region according to the coverage information matrix comprises:
and respectively obtaining the constituent elements of the coverage information matrix of each dimension, and determining the interest matching result of the first area and the second area according to the same constituent elements of the coverage information matrix of each dimension.
7. An interest matching apparatus, characterized in that the apparatus comprises:
a boundary parameter obtaining module, configured to obtain boundary parameters of a first area and a second area to be matched, where the boundary parameters include upper boundary parameters and lower boundary parameters that correspond to each other one to one, where the first area is a publishing area and the second area is an ordering area, or the first area is an ordering area and the second area is a publishing area;
the parameter sorting processing module is used for 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, wherein the preset sorting rule comprises sorting the lower boundary parameters according to the numerical values or sorting the upper boundary parameters according to the numerical values;
a mapping interval determining module, configured to determine, according to the numerical values and the corresponding sorting positions of the boundary parameters in the first area parameter list and the second area parameter list, a first mapping interval in which an upper bound parameter and a lower bound parameter of the first area parameter list correspond to each other in the second area parameter list, and determine a second mapping interval in which an upper bound parameter and a lower bound parameter of the second area parameter list correspond to each other in the first area parameter list;
and the interest matching result determining module is used for determining the interest matching result of the first area and the second area according to the first mapping interval and the second mapping interval.
8. The apparatus of claim 7, wherein the interest matching result determining module comprises:
a coverage information matrix generating unit, configured to generate a coverage information matrix according to the first mapping interval and the second mapping interval;
and the interest matching result acquisition unit is used for acquiring the interest matching results of the first area and the second area according to the coverage information matrix.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201810492258.6A 2018-05-22 2018-05-22 Interest matching method, device, 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, device, 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, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108829932A CN108829932A (en) 2018-11-16
CN108829932B true 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, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108829932B (en)

Families Citing this family (2)

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

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1169049C (en) * 2002-07-26 2004-09-29 中国人民解放军国防科学技术大学 Method for implementing hierarchical distributed simulation operation support environment based on interoperation protocol
CN1750008A (en) * 2005-10-10 2006-03-22 中国人民解放军国防科学技术大学 Method for realizing dynamic zonc matching box based on mobile cross 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
US9811754B2 (en) * 2014-12-10 2017-11-07 Ricoh Co., Ltd. Realogram scene analysis of images: shelf and label finding
CN107547748A (en) * 2017-09-07 2018-01-05 深圳市金立通信设备有限公司 A kind of picture management method, terminal and computer-readable recording medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于位移残差的数据分发管理区域匹配及传输;张琳;《中国科学》;20120620;第717–729页 *
高层体系结构中DDM数据过滤方法;李开生等;《系统仿真学报》;20090420(第08期);第143-147页 *

Also Published As

Publication number Publication date
CN108829932A (en) 2018-11-16

Similar Documents

Publication Publication Date Title
Ye et al. Applying simulated annealing and parallel computing to the mobile sequential recommendation
JP6508661B2 (en) Data processing system, computing node and data processing method
CN108829932B (en) Interest matching method, device, computer equipment and storage medium
CN103597474A (en) Efficient indexing and searching of access control listed documents
CN105550225A (en) Index construction method and query method and apparatus
CN111242165A (en) Merchant clustering method and device, computer equipment and storage medium
CN103390271B (en) Remote Sensing Image Segmentation and device
CN107766528B (en) Data loading method and terminal for waterfall flow page and computer readable storage medium
CN106980540B (en) Distributed multi-dimensional discrete data calculation method
CN110838041B (en) Virtual resource activity processing method and device, computer equipment and storage medium
CN111984659A (en) Data updating method and device, computer equipment and storage medium
CN112699195A (en) Geospatial data processing method, geospatial data processing device, computer equipment and storage medium
CN110321405B (en) Model matching method, model matching device, computer-readable storage medium and computer equipment
CN116772815A (en) Unmanned aerial vehicle remote sensing mapping method, device and system
CN117390011A (en) Report data processing method, device, computer equipment and storage medium
CN111475720A (en) Recommendation method, recommendation device, server and storage medium
CN111339064A (en) Data tilt correction method, device and computer readable storage medium
Whang et al. Disinformation techniques for entity resolution
Goncalves et al. Making recommendations using location-based skyline queries
CN110874370B (en) Data query method and device, computer equipment and readable storage medium
CN113254732A (en) Method and device for determining enterprise relationship, computer equipment and storage medium
CN111797192A (en) GIS point data rendering method and device, computer equipment and storage medium
CN114003305B (en) Device similarity calculation method, computer device, and storage medium
CN111884940B (en) Interest matching method and device, computer equipment and storage medium
US11163808B2 (en) Hexagon clustering of spatial data

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