# US 12,118,578 B2 · Method and apparatus for processing commodity information, device and storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,118,578 B2
- Document ID: US12118578B2
- Status: Granted
- Kind: B2
- Application number: 17/822,507
- Filed: 2022-08-26
- Published: 2022-12-22
- Granted: 2024-10-15
- Earliest claimed: 2021-08-30
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science Technology Co., Ltd.
- Inventors: Jing Qu; Mengbo Liu; Zhi Feng
- Web page: https://patentgrep.com/patent/US12118578B2

## CPC

- G06Q 30/0207: Discounts or incentives, e.g. coupons or rebates
- G06Q 30/0605: {Pooling transaction partners, e.g. group buying or group selling}
- G06F 16/245: Query processing
- G06F 16/9027: {Trees}
- G06Q: INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for processing commodity information includes: obtaining commodity information of a commodity, in which the commodity information includes a target commodity configuration and a configuration value; obtaining a composite structure of matching conditions associated with the commodity, in which the composite structure is a tree structure of matching conditions with respect to commodity configurations, non-leaf nodes of the tree structure are in an AND-OR relationship, leaf nodes of the tree structure store Boolean expressions, each Boolean expression includes a commodity configuration, a matching value and a matching operator; obtaining a target expression having an AND-OR relationship by traversing the matching conditions in the composite structure; and obtaining a matching result by performing a matching process based on the target expression, the target commodity configuration and the configuration value of the commodity.

## Claims

### Claim 1

A method for processing commodity information, comprising:
obtaining commodity information of a commodity, wherein the commodity information comprises a target commodity configuration and a configuration value;
dynamically generating and storing in a data storage system, by a processor, a composite structure of matching conditions associated with the commodity based on obtained matching conditions, the composite structure is a tree structure of matching conditions with respect to commodity configurations, non-leaf nodes of the tree structure are in an AND-OR relationship, leaf nodes of the tree structure store Boolean expressions, and each Boolean expression comprises a commodity configuration, a matching value and a matching operator;
obtaining, from the data storage system, the composite structure;
obtaining a target expression having an AND-OR relationship by traversing the matching conditions in the composite structure; and
obtaining a matching result by performing a matching process based on the target expression, the target commodity configuration and the configuration value of the commodity;
wherein generating the composite structure of matching conditions comprises:
obtaining matching condition records based on an identifier of a matching condition container;
de-serializing the matching condition records into a matching condition list;
in response to an expression type of a matching condition record being a string type, interpreting the matching condition list item as a matching condition containing one sub-matching condition; and
in response to the expression type of the matching condition record not being the string type, interpreting the matching condition item as a sub-matching condition containing one or two expressions.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
establishing a cache for caching the composite structure.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
obtaining commodity configurations, such that matching conditions associated with the commodities are set based on the commodity configurations; and
receiving and storing set matching conditions associated with the commodities.

### Claim 4 (depends on 1)

The method of claim 1, wherein obtaining the target expression comprises:
obtaining the target expression having the AND-OR relationship by traversing the matching conditions of the composite structure by a matching condition parsing engine.

### Claim 5 (depends on 1)

The method of claim 1, wherein the AND-OR relationship is related to a depth of each non-leaf node.

### Claim 6 (depends on 5)

The method of claim 5, wherein the composite structure comprises at least one matching condition, each matching condition is set with respect to each commodity configuration of the commodity, and the at least one matching condition is in an AND relationship; each matching condition comprises at least one sub-matching condition, each sub-matching condition is a range of the configuration value of the commodity configuration, and the at least one sub-matching condition is in an OR relationship; each sub-matching condition comprises at least one expression, and the at least one expression is in an AND relationship.

### Claim 7

An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor;
wherein, the memory stores instructions executable by the at least one processor, when the instructions are executed by the at least one processor, the at least one processor is configured to:
obtain commodity information of a commodity, wherein the commodity information comprises a target commodity configuration and a configuration value;
dynamically generate and store in a data storage system, a composite structure of matching conditions associated with the commodity based on obtained matching conditions, the composite structure is a tree structure of matching conditions with respect to commodity configurations, non-leaf nodes of the tree structure are in an AND-OR relationship, leaf nodes of the tree structure store Boolean expressions, and each Boolean expression comprises a commodity configuration, a matching value and a matching operator;
obtaining, from the data storage system, the composite structure;
obtain a target expression having an AND-OR relationship by traversing the matching conditions in the composite structure; and
obtain a matching result by performing a matching process based on the target expression, the target commodity configuration and the configuration value of the commodity;
wherein in generating the composite structure of matching conditions, the processor is further configured to:
obtain matching condition records based on an identifier of a matching condition container;
de-serialize the matching condition records into a matching condition list;
in response to an expression type of a matching condition record being a string type, interpret the matching condition list item as a matching condition containing one sub-matching condition; and
in response to the expression type of the matching condition record not being the string type, interpret the matching condition item as a sub-matching condition containing one or two expressions.

### Claim 8 (depends on 7)

The electronic device of claim 7, wherein the at least one processor is further configured to:
establish a cache for caching the composite structure.

### Claim 9 (depends on 7)

The electronic device of claim 7, wherein the at least one processor is further configured to:
obtain commodity configurations, such that matching conditions associated with the commodities are set based on the commodity configurations; and
receive and store set matching conditions associated with the commodities.

### Claim 10 (depends on 7)

The electronic device of claim 7, wherein the at least one processor is configured to:
obtain the target expression having the AND-OR relationship by traversing the matching conditions of the composite structure by a matching condition parsing engine.

### Claim 11 (depends on 7)

The electronic device of claim 7, wherein the AND-OR relationship is related to a depth of each non-leaf node.

### Claim 12 (depends on 11)

The electronic device of claim 11, wherein the composite structure comprises at least one matching condition, each matching condition is set with respect to each commodity configuration of the commodity, and the at least one matching condition is in an AND relationship; each matching condition comprises at least one sub-matching condition, each sub-matching condition is a range of the configuration value of the commodity configuration, and the at least one sub-matching condition is in an OR relationship; each sub-matching condition comprises at least one expression, and the at least one expression is in an AND relationship.

### Claim 13

A non-transitory computer readable storage medium storing computer instructions, wherein the computer instructions are configured to cause a computer to implement a method including:
obtaining commodity information of a commodity, wherein the commodity information comprises a target commodity configuration and a configuration value;
dynamically generating and storing in a data storage system by a processor of the computer, a composite structure of matching conditions associated with the commodity based on obtained matching conditions, the composite structure is a tree structure of matching conditions with respect to commodity configurations, non-leaf nodes of the tree structure are in an AND-OR relationship, leaf nodes of the tree structure store Boolean expressions, and each Boolean expression comprises a commodity configuration, a matching value and a matching operator;
obtaining, from the data storage system, the composite structure;
obtaining a target expression having an AND-OR relationship by traversing the matching conditions in the composite structure; and
obtaining a matching result by performing a matching process based on the target expression, the target commodity configuration and the configuration value of the commodity;
wherein generating the composite structure of matching conditions comprises:
obtaining matching condition records based on an identifier of a matching condition container;
de-serializing the matching condition records into a matching condition list;
in response to an expression type of a matching condition record being a string type, interpreting the matching condition list item as a matching condition containing one sub-matching condition; and
in response to the expression type of the matching condition record not being the string type, interpreting the matching condition item as a sub-matching condition containing one or two expressions.

### Claim 14 (depends on 13)

The non-transitory computer readable storage medium of claim 13, wherein the method further comprises:
establishing a cache for caching the composite structure.

### Claim 15 (depends on 13)

The non-transitory computer readable storage medium of claim 13, wherein the method further comprises:
obtaining commodity configurations, such that matching conditions associated with the commodities are set based on the commodity configurations; and
receiving and storing set matching conditions associated with the commodities.

### Claim 16 (depends on 13)

The non-transitory computer readable storage medium of claim 13, wherein obtaining the target expression comprises:
obtaining the target expression having the AND-OR relationship by traversing the matching conditions of the composite structure by a matching condition parsing engine.

### Claim 17 (depends on 13)

The non-transitory computer readable storage medium of claim 13, wherein the AND-OR relationship is related to a depth of each non-leaf node.
