# US 2025/0156434 A1 · Query method and related device

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

- Number: US 2025/0156434 A1
- Document ID: US20250156434A1
- Status: Published application
- Kind: A1
- Application number: 19/023,767
- Filed: 2025-01-16
- Published: 2025-05-15
- Earliest claimed: 2022-07-19
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Meng HAN; Xinyu ZHANG; Yongkang WU; Zikai GUO
- Web page: https://patentgrep.com/patent/US20250156434A1

## CPC

- G06F 16/248: Presentation of query results
- G06N 5/022: Knowledge engineering; Knowledge acquisition
- G06F 16/2237: {Vectors, bitmaps or matrices}
- G06N 3/045: Combinations of networks
- G06N 3/08: Learning methods
- G06N 5/00: Computing arrangements using knowledge-based models
- G06N 5/041: {Abduction}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

This application relates to the field of artificial intelligence and computer search technologies, and provides a query method and a related device. The method includes: obtaining a query of a user; and generating a query result, where the query result includes a first answer to the query, a first major premise and a first minor premise used to obtain the first answer through deductive reasoning, a first major premise evidence for proving the first major premise, and a first minor premise evidence for proving the first minor premise; or the query result includes a first answer to the query, a first major premise and a first minor premise used to obtain the first answer through deductive reasoning, and a first minor premise evidence for proving the first minor premise.

## Claims

### Claim 1

A query method, applied to a first electronic device, wherein the method comprises:
obtaining a query of a user; and
generating a query result, wherein the query result comprises a first answer to the query, a first major premise and a first minor premise used to obtain the first answer through deductive reasoning, a first major premise evidence for proving the first major premise, and a first minor premise evidence for proving the first minor premise; or
the query result comprises a first answer to the query, a first major premise and a first minor premise used to obtain the first answer through deductive reasoning, and a first minor premise evidence for proving the first minor premise.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the generating a query result comprises:
obtaining N second major premises based on a first vector, wherein the first vector represents a target text, the target text indicates the query, the N second major premises comprise the first major premise, and N is a positive integer;
performing retrieval in a first database based on N second vectors, to obtain P second minor premise evidences, wherein the N second vectors correspond to the N second major premises, any one of the N second vectors represents the target text and a second major premise corresponding to the any second vector, the P second minor premise evidences comprise the first minor premise evidence, and P is a positive integer;
generating M second minor premises based on the target text, the N second major premises, and the P second minor premise evidences, wherein the M second minor premises comprise the first minor premise, and M is a positive integer less than or equal to P; and
performing deductive reasoning based on the N second major premises and the M second minor premises, to obtain the first answer, wherein
the first major premise evidence is obtained through retrieval in the first database based on the first vector.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the obtaining N second major premises based on a first vector comprises:
performing retrieval in the first database based on the first vector, to obtain L second major premise evidences, wherein Lis a positive integer greater than or equal to N; and
performing inductive reasoning based on the L second major premise evidences, to obtain the N second major premises.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the performing inductive reasoning based on the L second major premise evidences, to obtain the N second major premises comprises:
performing retrieval in the first database based on the first vector, to obtain a negative example of a third major premise evidence, wherein the L second major premise evidences comprise the third major premise evidence, and the third major premise evidence is used to obtain a third major premise through inductive reasoning; and
performing inductive reasoning based on the negative example of the third major premise evidence, to obtain a fourth major premise, wherein
if the third major premise does not conflict with the fourth major premise, the third major premise is one of the N second major premises; or
if the third major premise conflicts with the fourth major premise, retrieval is performed in the first database based on the first vector, to obtain a fourth major premise evidence, and inductive reasoning is performed based on the fourth major premise evidence, to obtain a fifth major premise, wherein the fifth major premise is one of the N second major premises.

### Claim 5 (depends on 2)

The method according to claim 2, wherein the obtaining N second major premises based on a first vector comprises:
performing retrieval in the first database based on the first vector, to obtain R second major premise evidences, wherein R is a positive integer;
performing retrieval in a second database based on the first vector, to obtain target common sense information; and
performing inductive reasoning based on the R second major premise evidences and the target common sense information, to obtain Q second major premises, wherein Q is a positive integer less than or equal to R, wherein
the N second major premises comprise the target common sense information and the Q second major premises.

### Claim 6 (depends on 2)

The method according to claim 2, wherein the performing deductive reasoning based on the N second major premises and the M second minor premises, to obtain the first answer comprises:
determining a first premise combination from N×M premise combinations, wherein the N×M premise combinations are obtained by combining each of the N second major premises with each of the M second minor premises, and the first premise combination comprises the first major premise and the first minor premise; and
performing deductive reasoning based on the first premise combination, to obtain the first answer.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the performing deductive reasoning based on the first premise combination, to obtain the first answer comprises:
inputting a term graph into a deductor, to obtain the first answer, wherein the term graph represents the first premise combination, and the deductor is a neural network model for deductive reasoning.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the method further comprises:
calculating a loss based on term graph coding and syllogism text coding, wherein the term graph coding is a coding representation of the term graph, and the syllogism text coding is a coding representation of a syllogism text comprising the first answer, the first major premise, and the first minor premise; and
adjusting a model parameter of the deductor based on the loss.

### Claim 9 (depends on 6)

The method according to claim 6, wherein the determining a first premise combination from N×M premise combinations comprises:
determining a second premise combination from the N×M premise combinations;
performing deductive reasoning based on the second premise combination, to obtain a second answer; and
determining the first premise combination from the N×M premise combinations based on feedback from the user and/or feedback from an answer verification module for the second answer, wherein the answer verification module is configured to determine whether an answer obtained through deductive reasoning conforms to factual logic.

### Claim 10 (depends on 1)

The method according to claim 1, wherein the method further comprises:
presenting a query interface on a screen of the first electronic device, wherein the query interface comprises the query result.

### Claim 11 (depends on 1)

The method according to claim 1, wherein
the obtaining a query of a user comprises: receiving the query from a second electronic device; and
the method further comprises: sending the query result to the second electronic device.

### Claim 12

A query method, applied to a second electronic device, wherein the method comprises:
obtaining a query of a user;
sending the query to a first electronic device;
receiving a query result from the first electronic device, wherein the query result comprises a first answer to the query, a first major premise and a first minor premise of the first answer, a first major premise evidence for proving the first major premise, and a first minor premise evidence for proving the first minor premise; or the query result comprises a first answer to the query, a first major premise and a first minor premise of the first answer, and a first minor premise evidence for proving the first minor premise; and
presenting a query interface on a screen of the second electronic device, wherein the query interface comprises the query result.

### Claim 13

A query method, applied to an electronic device, wherein the electronic device comprises a screen, the screen displays an input box, and the method comprises:
obtaining a query input by a user in the input box; and
displaying, on the screen, an answer to the query, a major premise and a minor premise of the answer, and a major premise evidence and a minor premise evidence, wherein the major premise evidence is for proving the major premise, and the minor premise evidence is for proving the minor premise; or
displaying, on the screen, an answer to the query, a major premise and a minor premise of the answer, and a minor premise evidence, wherein the minor premise evidence is for proving the minor premise.

### Claim 14 (depends on 13)

The method according to claim 13, wherein the screen displays a first presentation box, a second presentation box, and a third presentation box, the first presentation box presents the answer, the second presentation box presents the major premise and the minor premise, and the third presentation box presents the major premise evidence and the minor premise evidence, or the third presentation box presents the minor premise evidence.

### Claim 15 (depends on 13)

The method according to claim 13, wherein the screen displays a fourth presentation box, and the fourth presentation box presents the answer, the major premise, the minor premise, the major premise evidence, and the minor premise evidence, or the fourth presentation box presents the answer, the major premise, the minor premise, and the minor premise evidence.

### Claim 16 (depends on 13)

The method according to claim 13, wherein the screen displays a fifth presentation box and a sixth presentation box, the sixth presentation box is a pop-up presentation box of the fifth presentation box, the fifth presentation box presents the answer, and the fifth presentation box presents the major premise, the minor premise, the major premise evidence, and the minor premise evidence, or the fifth presentation box presents the major premise, the minor premise, and the minor premise evidence.

### Claim 17 (depends on 13)

The method according to claim 13, wherein the method further comprises:
displaying a direct evidence on the screen, wherein the direct evidence is for proving the answer.

### Claim 18 (depends on 17)

The method according to claim 17, wherein the screen further displays a seventh presentation box, and the seventh presentation box presents the direct evidence.

### Claim 19 (depends on 17)

The method according to claim 17, wherein the fourth presentation box further presents the direct evidence.

### Claim 20 (depends on 17)

The method according to claim 17, wherein the sixth presentation box further presents the direct evidence.
