CN111177515B - Product label matching method, device, computer equipment and storage medium - Google Patents

Product label matching method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN111177515B
CN111177515B CN201911356733.8A CN201911356733A CN111177515B CN 111177515 B CN111177515 B CN 111177515B CN 201911356733 A CN201911356733 A CN 201911356733A CN 111177515 B CN111177515 B CN 111177515B
Authority
CN
China
Prior art keywords
product
matching
data set
priority
data
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
CN201911356733.8A
Other languages
Chinese (zh)
Other versions
CN111177515A (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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN201911356733.8A priority Critical patent/CN111177515B/en
Publication of CN111177515A publication Critical patent/CN111177515A/en
Application granted granted Critical
Publication of CN111177515B publication Critical patent/CN111177515B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/283Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a product label matching method, a device, computer equipment and a medium; obtaining a product matching request, wherein the product matching request comprises a product identifier and data to be matched; acquiring a product priority code, a cyclic matching data set and a product data set from a local cache according to the product identifier; determining a cyclic matching code and a product priority code from the cyclic matching data set to match; determining candidate matching information from the data to be matched according to the matching information; matching is carried out in the product data set by adopting candidate matching information; if the data corresponding to the candidate matching information is not matched in the product data set, determining a new cyclic matching code according to a preset strategy; returning to the step of matching the cyclic matching code and the product priority code until the data corresponding to the candidate matching information is matched in the product data set, and determining the data corresponding to the candidate matching information as target product label data; thereby improving the efficiency of data matching.

Description

Product label matching method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of data analysis, and in particular, to a method, an apparatus, a computer device, and a storage medium for product tag matching.
Background
With the rapid development of computer technology, the scenes of product data are more and more diversified, and the background product data are more and more detailed. Therefore, when product data of a certain scene is required to be acquired, tens or hundreds of times of matching is often required to be performed by calling the multi-dimensional product label, so that correct target product data can be acquired. At present, most of the traditional product label matching methods enumerate product labels under all scenes, and record the product labels one by one to form a product label set with a certain scale. When a specific use scene is encountered, recursion matching is performed according to priority relationships, upper and lower level inclusion relationships and the like of each dimension in the scene. However, such a product tag matching method often needs to maintain a large amount of basic data, frequently changes dimensions during matching and then makes recursive calls, the implementation logic is complex, the basic data and the recursive logic are difficult to maintain, and due to various association relations between the dimensions, the probability of errors is high, and the matching efficiency is low, so that the operation and maintenance costs are increased.
Disclosure of Invention
The embodiment of the invention provides a method, a device, computer equipment and a storage medium for matching product labels, which are used for solving the problem of low data matching efficiency of product data.
A product tag matching method comprising:
obtaining a product matching request, wherein the product matching request comprises a product identifier and data to be matched, the data to be matched comprises N dimensions of information to be matched, and N is a positive integer;
acquiring a product priority code, a cycle matching data set and a product data set from a local cache according to the product identifier;
determining a cyclic matching code from the cyclic matching data set, and matching the cyclic matching code with the product priority code to obtain matching information;
candidate matching information of M dimensions is determined from the data to be matched according to the matching information, and M is less than or equal to N;
matching is carried out in the product data set by adopting the candidate matching information of the M dimensions;
if the data corresponding to the candidate matching information of the M dimensions are not matched in the product data set, determining a new cyclic matching code from the cyclic matching data set according to a preset strategy;
And returning to the step of matching the cyclic matching code with the product priority code until the data corresponding to the candidate matching information of the M dimensions are matched in the product data set, and determining the data corresponding to the candidate matching information of the M dimensions as target product label data.
A product label matching apparatus comprising:
the product matching request acquisition module is used for acquiring a product matching request, wherein the product matching request comprises a product identifier and data to be matched, the data to be matched comprises N dimensions of information to be matched, and N is a positive integer;
the data acquisition module is used for acquiring a product priority code, a cycle matching data set and a product data set from the local cache according to the product identifier;
the first matching module is used for determining a cyclic matching code from the cyclic matching data set, and matching the cyclic matching code with the product priority code to obtain matching information;
the candidate matching information determining module is used for determining candidate matching information with M dimensions from the data to be matched according to the matching information, wherein M is less than or equal to N;
the second matching module is used for matching in the product data set by adopting the candidate matching information of the M dimensions;
The cyclic matching code determining module is used for determining a new cyclic matching code from the cyclic matching data set according to a preset strategy when the data corresponding to the candidate matching information of the M dimensions are not matched in the product data set;
and the target product label data determining module is used for returning to the step of matching the cyclic matching code with the product priority code until the data corresponding to the candidate matching information of the M dimensions are matched in the product data set, and determining the data corresponding to the candidate matching information of the M dimensions as target product label data.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the product tag matching method described above when executing the computer program.
A computer readable storage medium storing a computer program which when executed by a processor implements the product tag matching method described above.
The product tag matching method, the device, the computer equipment and the storage medium acquire a product matching request, wherein the product matching request comprises a product identifier and data to be matched, the data to be matched comprises N dimensions of information to be matched, and N is a positive integer; acquiring a product priority code, a cyclic matching data set and a product data set from a local cache according to the product identifier; determining a cyclic matching code from the cyclic matching data set, and matching the cyclic matching code with the product priority code to obtain matching information; candidate matching information of M dimensions is determined from the data to be matched according to the matching information, and M is less than or equal to N; matching is carried out in the product data set by adopting candidate matching information with M dimensions; if the data corresponding to the candidate matching information of M dimensions are not matched in the product data set, determining a new cyclic matching code from the cyclic matching data set according to a preset strategy; returning to the step of matching the cyclic matching code and the product priority code until the data corresponding to the candidate matching information of the M dimensions are matched in the product data set, and determining the data corresponding to the candidate matching information of the M dimensions as target product label data; therefore, the number of times of carrying out data cycle matching on multi-dimensional product data is reduced, and the data matching efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic view of an application environment of a product tag matching method according to an embodiment of the present invention;
FIG. 2 is a diagram of an example of a method of matching product labels in an embodiment of the present invention;
FIG. 3 is another exemplary diagram of a method for matching product labels in accordance with one embodiment of the present invention;
FIG. 4 is another exemplary diagram of a method for matching product labels in accordance with one embodiment of the present invention;
FIG. 5 is another exemplary diagram of a method for matching product labels in an embodiment of the present invention;
FIG. 6 is another exemplary diagram of a method for matching product labels in an embodiment of the present invention;
FIG. 7 is a schematic block diagram of a product tag matching apparatus in accordance with an embodiment of the present invention;
FIG. 8 is another functional block diagram of a product tag matching apparatus in accordance with one embodiment of the present invention;
FIG. 9 is another functional block diagram of a product tag matching apparatus in accordance with one embodiment of the present invention;
FIG. 10 is a schematic diagram of a computer device in accordance with an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The product label matching method provided by the embodiment of the invention can be applied to an application environment shown in figure 1. Specifically, the product tag matching method is applied to a product tag matching system, the product tag matching system comprises a client and a server as shown in fig. 1, and the client and the server communicate through a network to solve the problem of low data matching efficiency of product data. The client is also called a user end, and refers to a program corresponding to the server end for providing local service for the client. The client may be installed on, but is not limited to, various personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices. The server may be implemented by a stand-alone server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, a method for matching product labels is provided, and the method is applied to the server in fig. 1, and includes the following steps:
s10: obtaining a product matching request, wherein the product matching request comprises a product identifier and data to be matched, the data to be matched comprises N-dimension information to be matched, and N is a positive integer.
The product matching request refers to a triggering request for matching the product label. Optionally, the product matching request may be sent to the server by the client, or may be set by the client to trigger at a fixed time, or set a triggering condition to trigger. The trigger condition may be data amount, time, or the like. For example, the client may send the product matching request to the server periodically according to a trigger period and a specific trigger time by setting a trigger period and a specific trigger time. For example: setting the triggering period as one month and the triggering time as 1 number of each month, the client side can send a product matching request to the server side at 1 number of each month.
Product identification refers to identification information for uniquely identifying a certain product. Alternatively, the product identification may be represented by a specific code of the product, for example: the product is identified as isPolicyBeforePayfee. The data to be matched refers to product data to be matched. The data to be matched comprises N dimensions of information to be matched, and N is a positive integer. For example: the data to be matched can consist of information to be matched in 4 dimensions of product model number, source channel, product price and product size. For example: the product model may be iPhone6, the source channel may be XX agent, the product price may be 5000 yuan, and the product size may be 2.0 inches.
In an application scenario, a user can trigger the product matching request by clicking a confirm button or inputting a corresponding control instruction through a command line after inputting or selecting a product identifier and data to be matched on a client page, and the product matching request is sent to a server, so that the server receives the product matching request, and the server can execute the operation of product tag matching according to the product matching request.
S20: and acquiring the product priority code, the cyclic matching data set and the product data set from the local cache according to the product identification.
Wherein, the product data set refers to a product information set contained in a certain type of product acquired in advance. For example: the product data set may be a product information set contained in a pre-acquired smart phone. In one embodiment, the product data set is preset with product labels with multiple dimensions, and each product label correspondingly comprises a plurality of sample product data. The product label refers to preset characteristic information capable of reflecting product properties of the product data set. For example: if the obtained product data set is an intelligent terminal data set, the product label contained in the product data set can be a product model, a source channel, a product price or a product size. It can be understood that the number of dimensions of the product tag contained in the product data set obtained from the local cache according to the product identifier is equal to the number of dimensions of the information to be matched contained in the corresponding data to be matched.
The product priority code refers to the code corresponding to the product label for each dimension in the product dataset. For example: if a product data set of a product includes a product label with 5 dimensions, the priority codes corresponding to the product data set may be 00001, 00010, 00100, 01000, and 10000. The loop matching data set refers to a data set for which data loop matching is performed, which is determined based on priority encoding. For example: if the priority codes of the product data sets are 00001, 00010, 00100, 01000 and 10000, the corresponding cycle matching data sets are 0 to 31. In a specific embodiment, the same type of product data sets have been preset with corresponding product priority encoding and cycle matching data sets; and the product identifier, the product data set, the product priority code and the cycle matching data set are stored in a local cache in an associated manner, and after the service end obtains the product identifier carried by the product matching request, the service end can directly obtain the corresponding product priority code, cycle matching data set and product data set from the local cache according to the product identifier.
S30: and determining a cyclic matching code from the cyclic matching data set, and matching the cyclic matching code with the product priority code to obtain matching information.
Specifically, after the cyclic match data set is determined, a cyclic match code is determined from the cyclic match data set. It will be appreciated that the cyclic matching code is any code data in the cyclic matching data set. Preferably, in the present embodiment, after the cyclic matching data set is determined, the code having the smallest value determined from the cyclic matching data set is the cyclic matching code. For example: if the cyclic matching data set is 0-31, the determined cyclic matching code is 0.
Further, after determining the cyclic matching code, the cyclic matching code is matched with the product priority code obtained according to step S20. In this embodiment, before matching the cyclic matching code with the product priority code, the cyclic matching code and the product priority code are converted into binary digital codes, respectively, and then the binary cyclic matching code and the binary product priority code are matched. Specifically, matching the cyclic matching code with the product priority code means logically ANDed the cyclic matching code with the product priority code, thereby obtaining matching information. Illustratively, if the cyclic matching code is 0, the product-first code is 00001, 00010, 00100, 01000, and 10000, the cyclic matching code is 0,0 after the cyclic matching code and the product-priority code are converted into binary digital codes, respectively; the product first-order codes are 1,1; then, the cyclic matching codes 0,0 and the product first-order codes 1,1 are logically and-ed, thus obtaining matching information of 0,0.
S40: and determining candidate matching information of M dimensions from the data to be matched according to the matching information, wherein M is less than or equal to N.
Because the product priority codes are codes corresponding to the product labels of each dimension in the product data set, the dimension number of the product labels contained in the product data set is equal to the dimension number of the information to be matched contained in the corresponding data to be matched. Therefore, the number of dimensions of the matching information obtained according to step S30 is the same as the number of dimensions of the product tag included in the product data set and the number of dimensions of the information to be matched included in the data to be matched, and corresponds to one another. Specifically, after the matching information is determined, the information to be matched of the dimension corresponding to 0 in the matching information is determined as candidate matching information. For example, if the data to be matched is composed of AA, BB, CC, DD and EE 5 dimensions of information to be matched, and the matching information obtained in step S30 is 0, and both AA, BB, CC, DD and EE 5 dimensions of information to be matched in the data to be matched are determined as candidate matching information; if the matching information is 0,1,0, determining the information to be matched of AA, BB, DD and EE 4 dimensions in the matching data as candidate matching information. It is understood that the dimension number M of the candidate matching information determined from the data to be matched according to the matching information is equal to or smaller than the total dimension number N of the information to be matched contained in the data to be matched, that is, m+.n.
S50: and matching in the product data set by adopting candidate matching information with M dimensions.
After the candidate matching information of the M dimensions is determined, matching is performed in the product dataset using the candidate matching information of the M dimensions. Specifically, determining the dimension priority of candidate matching information of each dimension, and then inquiring a product label with the same dimension priority as the information to be matched of each dimension from a product data set; and finally, matching the information to be matched in each dimension with sample product data under the product label in the corresponding dimension. In a specific embodiment, the dimension priority of the candidate matching information of each dimension and the dimension priority corresponding to the product label of each dimension in the product dataset are determined in advance.
For example, if the M dimensions of candidate matching information are AA, BB, CC, DD and EE, and the dimension of candidate matching information AA is 0, the dimension of candidate matching information BB is 1, the dimension of candidate matching information CC is 2, the dimension of candidate matching information DD is 3, and the dimension of candidate matching information EE is 4; inquiring the product label with the same dimension as the candidate matching information AA from the product data set to be A; the product label with the same dimension as the candidate matching information BB is B; the product label with the same dimension as the selected matching information CC is C; the product label with the same dimension as the candidate matching information DD is D; the product label with the same dimension as the candidate matching information EE is E. Finally, matching AA with a plurality of sample product data under the product label A; matching BB with a plurality of sample product data under the product label B; matching the CC with a plurality of sample product data under the product label C; matching DD with a plurality of sample product data under the product label D; and matching EE with a plurality of sample product data under the product label E.
S60: if the data corresponding to the candidate matching information of M dimensions is not matched in the product data set, determining a new cyclic matching code from the cyclic matching data set according to a preset strategy.
Specifically, matching is performed in the product data set by adopting candidate matching information of M dimensions, and if data corresponding to the to-be-matched information of the M dimensions are not matched in the product data set, namely the to-be-matched information of any dimension is not matched with the corresponding data in the product data set, a new cyclic matching code is determined from the cyclic matching data set according to a preset strategy. Wherein the new cyclic match code refers to another cyclic match code than the used cyclic match code determined from the cyclic match data set. Preferably, in this embodiment, the preset strategy is to determine, in the cyclic matching data set, the code obtained by adding 1 to the previous cyclic matching code as a new cyclic matching code, and so on, gradually increasing. For example: if the cyclic matching code determined in step S30 is 0, the new cyclic matching code determined in this step is 1.
In a specific embodiment, if the data matched with the information to be matched of the M dimensions is matched in the product data set, the data matched with the information to be matched of the M dimensions is directly determined to be the target product tag data. It is understood that only the data corresponding to the M dimensions of the information to be matched is determined as the target product tag data if the data identical to the information to be matched of each dimension is matched in the product data set.
S70: and returning to the step of matching the cyclic matching code and the product priority code until the data corresponding to the candidate matching information of the M dimensions are matched in the product data set, and determining the data corresponding to the candidate matching information of the M dimensions as target product label data.
The target product tag data refers to target data matched from a product data set according to data to be matched. It can be understood that if matching is performed from the product data set to data identical to the N dimensions of the to-be-matched information included in the to-be-matched data, that is, when matching is performed in the product data set using the M dimensions of the candidate matching information, m=n, the target product data is identical to the to-be-matched data.
Specifically, after a new cyclic matching code is determined from the cyclic matching data set according to a preset strategy, a step of matching the cyclic matching code with the product priority code is returned, namely, the new cyclic matching code is matched with the product priority code, so that new matching information is obtained. And then, determining M-dimension candidate matching information from the data to be matched according to the new matching information, adopting the M-dimension candidate matching information to match in a product data set until the data corresponding to the M-dimension candidate matching information is matched in the product data set, and determining the data corresponding to the M-dimension candidate matching information as target product data.
In this embodiment, a product matching request is obtained, where the product matching request includes a product identifier and data to be matched, the data to be matched includes N dimensions of information to be matched, and N is a positive integer; acquiring a product priority code, a cyclic matching data set and a product data set from a local cache according to the product identifier; determining a cyclic matching code from the cyclic matching data set, and matching the cyclic matching code with the product priority code to obtain matching information; candidate matching information of M dimensions is determined from the data to be matched according to the matching information, and M is less than or equal to N; matching is carried out in the product data set by adopting candidate matching information with M dimensions; if the data corresponding to the candidate matching information of M dimensions are not matched in the product data set, determining a new cyclic matching code from the cyclic matching data set according to a preset strategy; returning to the step of matching the cyclic matching code and the product priority code until the data corresponding to the candidate matching information of the M dimensions are matched in the product data set, and determining the data corresponding to the candidate matching information of the M dimensions as target product label data; therefore, the number of times of carrying out data cycle matching on multi-dimensional product data is reduced, and the data matching efficiency is improved.
In one embodiment, as shown in fig. 3, matching is performed in a product dataset by using candidate matching information with M dimensions, and specifically includes the following steps:
s501: the dimension priority of the candidate matching information of each dimension is determined.
The dimension priority refers to a priority determined in advance according to the dimension priority of the product label contained in the corresponding product data set. The priority of the product label contained in the product data set is equal to the dimension number of the information to be matched contained in the corresponding data to be matched. Therefore, in this embodiment, the dimension priorities of the N pieces of information to be matched included in the data to be matched are the same as and correspond to the dimension priorities of the product tags included in the product data set. In one embodiment, the product data set includes product tags that have a predetermined dimensional priority. It will be appreciated that since the candidate matching information is determined from the information to be matched contained in the data to be matched. Therefore, the dimension priority of the candidate matching information of each dimension can be determined directly according to the dimension priority of the information to be matched of each dimension contained in the data to be matched. For example: the dimension of the candidate matching information AA is 0, the dimension of the candidate matching information BB is 1, the dimension of the candidate matching information CC is 2, the dimension of the candidate matching information DD is 3, and the dimension of the candidate matching information EE is 4.
S502: sample product data having the same dimensional priority as the candidate matching information for each dimension is queried from the product data set.
Specifically, after determining the dimension priority of the candidate matching information of each dimension, matching the dimension priority of the candidate matching information of each dimension with the dimension priority of each product label contained in the product data set, and determining a plurality of sample product data under the successfully matched product label as sample product data corresponding to the candidate matching information of the dimension. It can be appreciated that the dimensional priorities of the information to be matched for each dimension are the same as, and in one-to-one correspondence with, the dimensional priorities of the product tags in the product dataset. Thus, candidate matching information for each dimension can be queried in the product data set for a plurality of sample product data with the same dimension priority.
S503: and matching the candidate matching information of each dimension with sample product data corresponding to the same dimension priority.
Specifically, after the sample product data corresponding to the candidate matching information of each dimension is determined, matching the to-be-matched information of each dimension with a plurality of sample product data corresponding to the same-dimension priority one by one to determine target product label data.
In the embodiment, determining the dimension priority of candidate matching information of each dimension; querying sample product data with the same dimension priority as the candidate matching information of each dimension from a product data set; matching the candidate matching information of each dimension with sample product data corresponding to the same dimension priority; after the dimension priority of the candidate matching information of each dimension is determined, matching is carried out from sample product data with the same dimension priority, so that the accuracy of data matching is improved.
In one embodiment, as shown in fig. 4, before the product priority code, the cycle matching data set and the product data set are obtained from the local cache according to the product identifier, the product tag matching method specifically includes the following steps:
s21: a sample product dataset is obtained, the sample product dataset comprising product identifications.
Wherein the sample product data set refers to a product data set to be subjected to a storage process. Product identification refers to an identification used to distinguish between different types of sample product data sets. The product identity corresponding to each type of sample product data set is uniquely determined. In particular, the product identifier may consist of at least one of a number, letter, text or symbol. In a specific embodiment, various types of product data sets may be collected in advance, and then corresponding product identifiers are set for each type of product data set, and stored in a database of the server. When the sample product data set is required to be acquired, the required product data set is directly acquired from a database of the server side and is used as the sample product data set.
S22: and according to a preset coding strategy, sequencing the priority of each product label in the sample product data set to obtain the dimension priority of each product label in the sample product data set.
The product label refers to preset characteristic information capable of reflecting product properties of the sample product data set. For example: if the obtained sample product data set is a product data set corresponding to the smart phone, the product label of the sample product data set can be a product model, a source channel, a product price, a product size and the like.
Specifically, the preset encoding strategy may be to prioritize each product label in the sample product data set according to the importance degree thereof, or prioritize each product label in the sample product data set according to the size of the data range included therein, so as to obtain the dimensional priority of each product label in the sample product data set. For example: the obtained sample product data set product labels comprise product model numbers, source channels, product prices and product size; if each product label in the sample product data set is subjected to priority ranking according to the importance degree; the dimension priority of the product model in the sample product data set is 0, the dimension priority of the source channel is 1, the dimension priority of the product price is 2, and the product size of the product attribute is 3. Optionally, each product label in the sample product data set may be input into a preset gradient boost decision model for training, and the importance degree of each product label is determined according to the importance average value of each product label in each tree of the gradient boost decision model.
S23: and encoding each product label based on the dimension priority of each product label in the sample product data set to obtain the product priority code of the sample product data set.
After the dimensional priority of each product label in the sample product data set is determined, each product label is encoded, and then the priority codes obtained after each product label is encoded are integrated, so that the product priority codes of the sample product data set can be obtained. Specifically, the encoding of each product label refers to taking the dimension priority of each product label as the exponential power of 2, so as to obtain the priority code corresponding to each product label.
Illustratively, if the dimension priority of the product model in the sample product dataset is 0, the dimension priority of the source channel is 1, the dimension priority of the product price is 2, and the dimension priority of the product size is 3; then after each product label in the sample product data set is encoded, the priority of the product model is obtained, the priority of the product model is encoded to be equal to 1 to the 0 th power of 2, the priority of the source channel is encoded to be equal to 2 to the 1 th power of 2, the priority of the product price is encoded to be equal to 4 to the 2 th power of 2, and the dimension priority of the product size is encoded to be equal to 8 to the 3 rd power of 2; and finally integrating the priority codes obtained after the codes of the product labels to obtain the product priority codes of the sample product data set as [1,2,4,8].
S24: a cycle matching dataset of the sample product dataset is determined based on the product priority encoding of the sample product dataset.
Specifically, after determining the product priority code of the sample product data set, summing the product priority codes of the sample product data set to obtain a maximum cyclic matching code; and then determining a loop matching dataset for the sample product dataset based on the maximum loop matching encoding. Illustratively, if the product priority code of a sample product data set is [1,2,4,8], the largest cyclic match code resulting from summing the product priority codes of the sample product data set is 15, the cyclic match data set of the sample product data set is {0,1,2, 3..15 }.
S25: and associating the sample product data set with the corresponding product identification, product priority coding and cycle matching data set, and storing the sample product data set into a local cache.
Specifically, after the product priority code and the cycle matching data set corresponding to the sample product data set are determined, the sample product data set is associated with the corresponding product identifier, the product priority code and the cycle matching data set and is cached into the local cache, so that the corresponding product priority code, the cycle matching data set and the sample product data set can be obtained from the local cache directly according to the product identifier.
In this embodiment, a sample product dataset is obtained, the sample product dataset comprising product identifications; according to a preset coding strategy, sequencing the priority of each product label in the sample product data set to obtain the dimension priority of each product label in the sample product data set; coding each product label based on the dimension priority of each product label in the sample product data set to obtain a product priority code of the sample product data set; determining a cycle matching dataset of the sample product dataset according to the product priority encoding of the sample product dataset; and associating the sample product data set with the corresponding product identification, product priority coding and cycle matching data set, and storing the sample product data set into a local cache.
In one embodiment, as shown in fig. 5, according to a preset encoding strategy, each product label in the sample product data set is prioritized to obtain a dimensional priority of each product label in the sample product data set, which specifically includes the following steps:
s221, determining the hierarchical relationship of each product label in the sample product data set.
In a particular embodiment, there may be a hierarchical relationship between product tags of different dimensions contained in the sample product dataset. For example: if the product label included in the sample product data is the product model, the source channel, the product price or the product size; then a product under the same product model may contain multiple source channels, a product under the same product price may contain multiple product models, a product under the same product model may contain multiple product sizes, etc.
S222, determining the data range contained in each product label based on the hierarchical relationship of each product label.
Specifically, after determining the hierarchical relationship of each product label in the sample product data set, determining the data range included in each product label according to the hierarchical relationship of each product label. Illustratively, since a product under the same source channel may contain multiple product models, it may be determined that the product models contain a larger range of data than the source channel; since a product at the same product price may contain multiple product models, it may be determined that the product price contains a larger range of data than the product model.
And S223, according to the data range contained in each product label from small to large, sequencing the priority of each product label in the sample product data set to obtain the dimension priority of each product label in the sample product data set.
Specifically, after the data range included in each product tag is determined, the data range included in each product tag is sorted from small to large, and then the priority of each product tag in the sample product data set is sorted according to the data range included in each product tag from small to large, so that the dimensional priority of each product tag in the sample product data set is obtained. Illustratively, if the data ranges included in the product tags in the sample product data set are sorted from small to large, the data ranges included in each product tag in the sample product data set are: and (3) sorting the priority of each product label in the sample product data set to obtain the dimension priority of each product label in the sample product data set as 0, 1, 2 and 3. It will be appreciated that the smaller the range of data contained in a product tag, the higher its corresponding priority.
In this embodiment, by determining the hierarchical relationship of each product tag in the sample product dataset; determining a data range contained in each product label based on the hierarchical relationship of each product label; according to the small-to-large data range contained in each product label, sequencing the priority of each product label in the sample product data set to obtain the dimension priority of each product label in the sample product data set; thereby improving the accuracy of the dimensional priority of each product label in the sample product dataset.
In one embodiment, as shown in fig. 6, determining the cycle matching dataset of the sample product dataset according to the product priority encoding of the sample product dataset specifically comprises the steps of:
s241: the product priority codes of the sample product data sets are summed to determine a maximum cyclic matching code.
In particular, a summation function may be employed to sum with the product priority codes of the sample product dataset to determine a maximum cyclic matching code. For example: if the product priority code of the sample product dataset is [1,2,4,8], the maximum cyclic matching code determined by summing the product priority codes of the sample product dataset is 15.
S242: a loop-matching dataset of the sample product dataset is determined based on the maximum loop-matching encoding.
After the maximum cyclic matching code is determined, the data set contained in the 0-to-maximum cyclic matching code is determined as the cyclic matching data set of the sample product data set. For example: if the determined maximum cyclic match code is 15, the cyclic match data set for the sample product data set is {0,1,2, 3..15 }.
In this embodiment, a maximum cyclic matching code is determined by summing the product priority codes of the sample product data sets, and then a cyclic matching data set of the sample product data set is determined based on the maximum cyclic matching code; thereby ensuring the accuracy of the determined circular matching dataset.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
In one embodiment, a product tag matching apparatus is provided, which corresponds to the product tag matching method in the above embodiment one by one. As shown in fig. 7, the product tag matching apparatus includes a product matching request acquisition module 10, a data acquisition module 20, a first matching module 30, a candidate matching information determination module 40, a second matching module 50, a cyclic matching code determination module 60, and a target product tag data determination module 70. The functional modules are described in detail as follows:
The product matching request acquisition module 10 is configured to acquire a product matching request, where the product matching request includes a product identifier and data to be matched, the data to be matched includes information to be matched in N dimensions, and N is a positive integer;
a data acquisition module 20, configured to acquire a product priority code, a cycle matching data set, and a product data set from the local cache according to the product identifier;
a first matching module 30, configured to determine a cyclic matching code from the cyclic matching data set, and match the cyclic matching code with the product priority code to obtain matching information;
a candidate matching information determining module 40, configured to determine candidate matching information of M dimensions from the data to be matched according to the matching information, where M is less than or equal to N;
a second matching module 50, configured to match in the product dataset using candidate matching information of M dimensions;
the cyclic matching code determining module 60 is configured to determine a new cyclic matching code from the cyclic matching data set according to a preset policy when the product data set is not matched with data corresponding to the candidate matching information of M dimensions;
the target product tag data determining module 70 is configured to return to the step of matching the cyclic matching code and the product priority code until data corresponding to the candidate matching information of M dimensions is matched in the product dataset, and determine the data corresponding to the candidate matching information of M dimensions as target product tag data.
Preferably, as shown in fig. 8, the second matching module 50 includes:
a dimension priority determining unit 501, configured to determine a dimension priority of candidate matching information of each dimension;
a query unit 502, configured to query, from the product data set, sample product data having the same dimension priority as the candidate matching information of each dimension;
and a matching unit 503, configured to match the candidate matching information of each dimension with sample product data corresponding to the same dimension priority.
Preferably, as shown in fig. 9, the product tag matching device further includes:
a sample product data set acquisition module 21 for acquiring a sample product data set comprising a product identification;
the priority ranking module 22 is configured to rank the priority of each product label in the sample product data set according to a preset encoding policy, so as to obtain a dimensional priority of each product label in the sample product data set;
the encoding module 23 is configured to encode each product tag based on the dimensional priority of each product tag in the sample product data set, so as to obtain a product priority code of the sample product data set;
a loop matching dataset determination module 24 for determining a loop matching dataset of the sample product dataset based on the product priority encoding of the sample product dataset;
The association module 25 is configured to associate the sample product data set with the corresponding product identifier, product priority code, and cycle matching data set, and store the sample product data set in the local cache.
Preferably, the prioritization module 22 comprises:
a hierarchical relationship determination unit for determining a hierarchical relationship of each product tag in the sample product data set;
a data range determining unit, configured to determine a data range included in each product tag based on a hierarchical relationship of each product tag;
and the priority ranking unit is used for ranking the priority of each product label in the sample product data set according to the range of the data contained in each product label from small to large, so as to obtain the dimension priority of each product label in the sample product data set.
Preferably, the loop matching dataset determination module 24 comprises:
the summing unit is used for summing the product priority codes of the sample product data set and determining the maximum cyclic matching code;
and a loop matching data set determining unit for determining a loop matching data set of the sample product data set based on the maximum loop matching code.
For specific limitations of the product tag matching apparatus, reference may be made to the above limitations of the product tag matching method, and no further description is given here. The respective modules in the above-described product tag matching apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 10. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing 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, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for the data used in the product tag matching method in the above embodiment. 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 a product tag matching method.
In one embodiment, a computer device is provided that includes a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the product tag matching method of the above embodiments when executing the computer program.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, implements the product tag matching method of the above embodiments.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The 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 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), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (7)

1. A method of product tag matching comprising:
obtaining a product matching request, wherein the product matching request comprises a product identifier and data to be matched, the data to be matched comprises N dimensions of information to be matched, and N is a positive integer;
Obtaining a sample product dataset, the sample product dataset comprising product identifications;
according to a preset coding strategy, sequencing the priority of each product label in the sample product data set to obtain the dimension priority of each product label in the sample product data set;
encoding each product label based on the dimensional priority of each product label in the sample product data set to obtain a product priority code of the sample product data set;
summing the product priority codes of the sample product data sets, and determining a maximum cyclic matching code;
determining a cycle matching dataset of the sample product dataset based on the maximum cycle matching encoding;
associating the sample product data set with the corresponding product identifier, product priority code and cycle matching data set, and storing the sample product data set in a local cache;
acquiring a product priority code, a cycle matching data set and a product data set from a local cache according to the product identifier;
determining a cyclic matching code from the cyclic matching data set, and matching the cyclic matching code with the product priority code to obtain matching information;
Candidate matching information of M dimensions is determined from the data to be matched according to the matching information, and M is less than or equal to N;
matching is carried out in the product data set by adopting the candidate matching information of the M dimensions;
if the data corresponding to the candidate matching information of the M dimensions are not matched in the product data set, determining a new cyclic matching code from the cyclic matching data set according to a preset strategy;
and returning to the step of matching the cyclic matching code with the product priority code until the data corresponding to the candidate matching information of the M dimensions are matched in the product data set, and determining the data corresponding to the candidate matching information of the M dimensions as target product label data.
2. The product tag matching method of claim 1, wherein said matching candidate matching information in said M dimensions in said product dataset comprises:
determining the dimension priority of the candidate matching information of each dimension;
querying sample product data from the product data set that has the same priority as the dimension of the candidate matching information for each dimension;
And matching the candidate matching information of each dimension with the sample product data corresponding to the same dimension priority.
3. The product tag matching method of claim 1, wherein prioritizing each product tag in the sample product data set according to a preset encoding strategy to obtain a dimensional priority of each product tag in the sample product data set, comprises:
determining a hierarchical relationship for each of the product tags in the sample product dataset;
determining a data range contained by each product label based on the hierarchical relationship of each product label;
and sequencing the priority of each product label in the sample product data set according to the range of the data contained in each product label from small to large, so as to obtain the dimensional priority of each product label in the sample product data set.
4. A product label matching apparatus, comprising:
the product matching request acquisition module is used for acquiring a product matching request, wherein the product matching request comprises a product identifier and data to be matched, the data to be matched comprises N dimensions of information to be matched, and N is a positive integer;
A sample product data set acquisition module for acquiring a sample product data set, the sample product data set comprising a product identification;
the priority ordering module is used for ordering the priority of each product label in the sample product data set according to a preset coding strategy to obtain the dimension priority of each product label in the sample product data set;
the encoding module is used for encoding each product label based on the dimension priority of each product label in the sample product data set to obtain a product priority code of the sample product data set;
the cyclic matching data set determining module is used for summing the product priority codes of the sample product data set and determining the maximum cyclic matching code; determining a cycle matching dataset of the sample product dataset based on the maximum cycle matching encoding;
the association module is used for associating the sample product data set with the corresponding product identifier, the corresponding product priority code and the corresponding cycle matching data set, and storing the sample product data set into a local cache;
the data acquisition module is used for acquiring a product priority code, a cycle matching data set and a product data set from the local cache according to the product identifier;
The first matching module is used for determining a cyclic matching code from the cyclic matching data set, and matching the cyclic matching code with the product priority code to obtain matching information;
the candidate matching information determining module is used for determining candidate matching information with M dimensions from the data to be matched according to the matching information, wherein M is less than or equal to N;
the second matching module is used for matching in the product data set by adopting the candidate matching information of the M dimensions;
the cyclic matching code determining module is used for determining a new cyclic matching code from the cyclic matching data set according to a preset strategy when the data corresponding to the candidate matching information of the M dimensions are not matched in the product data set;
and the target product label data determining module is used for returning to the step of matching the cyclic matching code with the product priority code until the data corresponding to the candidate matching information of the M dimensions are matched in the product data set, and determining the data corresponding to the candidate matching information of the M dimensions as target product label data.
5. The product tag matching apparatus of claim 4, wherein said second matching module comprises:
A dimension priority determining unit, configured to determine a dimension priority of the candidate matching information of each dimension;
a query unit configured to query, from the product data set, sample product data having the same dimension priority as the candidate matching information of each dimension;
and the matching unit is used for matching the candidate matching information of each dimension with the sample product data corresponding to the same dimension priority.
6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the product tag matching method of any of claims 1 to 3 when the computer program is executed.
7. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the product tag matching method of any one of claims 1 to 3.
CN201911356733.8A 2019-12-25 2019-12-25 Product label matching method, device, computer equipment and storage medium Active CN111177515B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911356733.8A CN111177515B (en) 2019-12-25 2019-12-25 Product label matching method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911356733.8A CN111177515B (en) 2019-12-25 2019-12-25 Product label matching method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111177515A CN111177515A (en) 2020-05-19
CN111177515B true CN111177515B (en) 2023-07-21

Family

ID=70650447

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911356733.8A Active CN111177515B (en) 2019-12-25 2019-12-25 Product label matching method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111177515B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2833357A1 (en) * 2012-11-14 2014-05-14 Homer Tlc, Inc. System and method for automatic product matching
CN104331429A (en) * 2014-10-21 2015-02-04 北京奇虎科技有限公司 Method and device for performing multi-characteristic dimension quantization on network object
EP3220292A1 (en) * 2016-03-18 2017-09-20 Palantir Technologies, Inc. Systems and methods for organizing and identifying documents via hierarchies and dimensions of tags
CN110310145A (en) * 2019-05-23 2019-10-08 中国平安人寿保险股份有限公司 Product various dimensions configuration method, device, computer equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9047211B2 (en) * 2013-03-15 2015-06-02 SanDisk Technologies, Inc. Managing data reliability

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2833357A1 (en) * 2012-11-14 2014-05-14 Homer Tlc, Inc. System and method for automatic product matching
CN104331429A (en) * 2014-10-21 2015-02-04 北京奇虎科技有限公司 Method and device for performing multi-characteristic dimension quantization on network object
EP3220292A1 (en) * 2016-03-18 2017-09-20 Palantir Technologies, Inc. Systems and methods for organizing and identifying documents via hierarchies and dimensions of tags
CN110310145A (en) * 2019-05-23 2019-10-08 中国平安人寿保险股份有限公司 Product various dimensions configuration method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111177515A (en) 2020-05-19

Similar Documents

Publication Publication Date Title
CN109408746B (en) Image information query method, image information query device, computer equipment and storage medium
CN109474578B (en) Message checking method, device, computer equipment and storage medium
WO2020186786A1 (en) File processing method and apparatus, computer device and storage medium
CN109873904A (en) User of message status report process method, device and the storage medium of message push
CN110659133B (en) Resource allocation method and allocation device, storage medium and electronic equipment
WO2020024356A1 (en) Warehouse asset inventory method and apparatus, computer device and storage medium
CN112541745A (en) User behavior data analysis method and device, electronic equipment and readable storage medium
CN109325042B (en) Processing template acquisition method, form processing method, device, equipment and medium
CN106997431B (en) Data processing method and device
CN112286934A (en) Database table importing method, device, equipment and medium
CN111209929A (en) Access data processing method and device, computer equipment and storage medium
CN113190426B (en) Stability monitoring method for big data scoring system
CN110727526A (en) Big data computing task processing method and system
CN112650777A (en) Data warehouse manufacturing method and device, terminal equipment and computer storage medium
CN113111078B (en) Resource data processing method and device, computer equipment and storage medium
CN108897772B (en) Data source supplementing method and device, computer equipment and storage medium
CN111177515B (en) Product label matching method, device, computer equipment and storage medium
CN113064984A (en) Intention recognition method and device, electronic equipment and readable storage medium
CN116595106A (en) User grouping method, device and storage medium
CN114203304B (en) Information pushing method based on smart medical big data and smart medical cloud server
CN111460088A (en) Similar text retrieval method, device and system
CN109885710B (en) User image depicting method based on differential evolution algorithm and server
CN111078984B (en) Network model issuing method, device, computer equipment and storage medium
CN114513578A (en) Outbound method, device, computer equipment and storage medium
CN112528100A (en) Label strategy recommending and marking method, terminal equipment and storage medium

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