Commercial tenant illegal behavior identification method and system based on consumer comments

By combining local and global semantic relevance encoding methods with Bi-LSTM and Transformer models, the problem of low efficiency in identifying merchant violations in traditional methods is solved, and more efficient identification of merchant violations in consumer reviews is achieved.

CN120873191APending Publication Date: 2025-10-31HAINAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511003059.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Existing methods for detecting illegal merchant behavior rely on sampling inspections and consumer complaints, which are inefficient. Furthermore, traditional text classification methods struggle to effectively identify subtle and distinctive features in consumer reviews, neglecting fine-grained semantic differences.

Method used

By employing local semantic relevance encoding and global semantic relevance vector construction methods, combined with Bi-LSTM and Transformer models, local and global semantic features in consumer reviews are learned. Preprocessing is performed using the BERT model to construct a merchant violation identification system based on consumer reviews.

Benefits of technology

It improves the accuracy, recall, and precision of identifying merchant violations, effectively identifying merchant violations in consumer reviews and enhancing the identification effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120873191A_ABST
    Figure CN120873191A_ABST
Patent Text Reader

Abstract

The invention discloses a merchant illegal behavior identification method and system based on consumer comments. The method comprises the following steps: obtaining consumer comment data and preprocessing the consumer comment data to obtain input comments; the input comments are input into a pre-trained word embedding module for tensorization, and high-dimensional word vectors are obtained; the high-dimensional word vector is input into a local semantic correlation coding module for local semantic correlation coding to obtain a bidirectional coding vector; inputting the high-dimensional word vector and the bidirectional coding vector into a global semantic correlation coding module at the same time to obtain a global semantic correlation vector; inputting the global semantic relevance vector into an MLP network to obtain probability distribution of categories; and determining the category of the merchant behavior based on the probability distribution of the category. According to the method, merchant violation behaviors reported in consumer comments can be more effectively mined and identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of text classification technology, and in particular to a method and system for identifying merchant violations based on consumer reviews. Background Technology

[0002] Existing methods for detecting merchant misconduct typically rely on sampling inspections by regulatory agencies or consumer complaints. This is time-consuming and inefficient. To address this challenge, this invention identifies merchant violations from consumer reviews. Consumers often like to share their direct experiences online, providing data support for building social dynamics models based on data science. However, consumer reviews are often ambiguous and complex, resulting in small inter-class discrepancies between different categories of data. This necessitates detection methods that focus on learning subtle and distinguishable features, differentiating not only at the sentence level but, importantly, at the feature level, discerning fine-grained semantic differences between different fraudulent behaviors. However, traditional text classification methods are primarily used for classification tasks with clear sample boundaries, such as topic classification and sentiment classification. This makes them prone to overlooking the semantic relationships between different fine-grained features and subtle semantic differences between different categories of behavior. Therefore, a method specifically designed and implemented for detecting merchant misconduct is needed. Summary of the Invention

[0003] To address the aforementioned technical problems, this invention proposes a method and system for identifying merchant violations based on consumer reviews. It encodes key features of consumer reviews using local semantic relevance and constructs a global semantic relevance vector by combining local semantic information. This allows the invention to focus on learning subtle and differentiated features, distinguishing not only at the sentence level but, more importantly, at the feature level, differentiating between instances with varying degrees of fine-grained semantic differences. This enables more effective mining and identification of merchant violations reported in consumer reviews.

[0004] To achieve the above objectives, the technical solution of the present invention is as follows:

[0005] A method for identifying merchant violations based on consumer reviews includes the following steps:

[0006] Acquire and preprocess consumer review data to obtain input reviews;

[0007] The input comments are fed into a pre-trained character embedding module for tensor quantization to obtain high-dimensional character vectors;

[0008] The high-dimensional character vector is input into the local semantic relevance encoding module for local semantic relevance encoding to obtain a bidirectional encoded vector.

[0009] The high-dimensional character vector and the bidirectional encoding vector are simultaneously input into the global semantic relevance encoding module to obtain the global semantic relevance vector; the global semantic relevance vector is then input into the MLP network to obtain the probability distribution of the categories.

[0010] The category of merchant behavior is determined based on the probability distribution of the categories.

[0011] Preferably, the preprocessing involves removing special characters and stop words, and adjusting the consumer review data to a fixed length.

[0012] Preferably, the word embedding module adopts the BERT model.

[0013] Preferably, the processing procedure of the local semantic relevance encoding module includes the following steps:

[0014] The high-dimensional word vector is input into the forward LSTM network of the Bi-LSTM model to obtain the forward semantic relevance encoding vector;

[0015] The high-dimensional word vector is input into the backward LSTM network of the Bi-LSTM model to obtain the backward semantic relevance encoding vector;

[0016] The forward semantic relevance encoding vector and the backward semantic relevance encoding vector are added together and input into the MLP network to obtain a bidirectional encoding vector.

[0017] Preferably, the number of LSTM units in both the forward LSTM network and the backward LSTM network in the Bi-LSTM model is consistent with the number of units of a fixed length.

[0018] Preferably, the processing procedure of the global semantic relevance encoding module includes the following steps:

[0019] The high-dimensional character vector and bidirectional coding vector are positionally encoded using sine and cosine functions to obtain the position vector of each character and the position vector of local semantics.

[0020] The sentence vector is obtained by adding the high-dimensional character vector and the character position vector; the semantic relevance vector is obtained by adding the bidirectional encoding vector and the local semantic position vector.

[0021] The sentence vector and semantic relevance vector are input into the Transformer Encoder layer to obtain a fused semantic feature vector, wherein the sentence vector is used to calculate K and V in the attention mechanism; and the semantic relevance vector is used to calculate Q in the attention mechanism.

[0022] The fused semantic feature vector is input into the Transformer architecture to obtain a global semantic relevance vector.

[0023] Preferably, the Transformer architecture includes four stacked Transformer Encoder layers.

[0024] Based on the above, the present invention also discloses a merchant violation identification system based on consumer reviews, comprising:

[0025] The preprocessing module is used to acquire and preprocess consumer review data to obtain input reviews;

[0026] The recognition module is used to input the input comment into a pre-trained character embedding module for tensor quantization to obtain a high-dimensional character vector; the high-dimensional character vector is input into a local semantic relevance encoding module for local semantic relevance encoding to obtain a bidirectional encoding vector; the high-dimensional character vector and the bidirectional encoding vector are simultaneously input into a global semantic relevance encoding module to obtain a global semantic relevance vector; the global semantic relevance vector is input into an MLP network to obtain the probability distribution of the category;

[0027] The determination module is used to determine the category of merchant behavior based on the probability distribution of the category.

[0028] Based on the above technical solution, the beneficial effects of this invention are as follows: This invention provides a method and system for identifying merchant violations based on consumer reviews. First, it utilizes the short-range semantic relevance encoding capability of the Bi-LSTM model to construct short-range semantic relevance of consumer review data, enabling our method to construct local contextual semantic relevance between each word. Second, unlike the existing Bi-LSTM-Transformer architecture, this invention integrates the output of the Bi-LSTM model into the Transformer architecture, rather than directly using the former's output as the latter's input. This allows local semantic relevance to be used as a dependency for constructing global relevance. Specifically, we use the local semantic vector as Q in the attention module, and the original semantic vector as K and V in the attention module. This allows this invention to construct global semantic relevance (i.e., long-range semantic relevance) at the entire sentence level based on the local contextual semantic relevance between each word. This enables this invention to focus on learning subtle and differentiated features, distinguishing not only at the sentence level but, importantly, at the feature level, differentiating fine-grained semantic differences between class instances, thus more effectively mining and identifying merchant violations reported in consumer reviews.

[0029] Experimental results using merchant social media review data in Hainan Province show that, compared to traditional Bi-LSTM-Transformer (where the output of Bi-LSTM is used as the input of Transformer), Bi-LSTM, and Transformer models, the present invention improves accuracy by 3.21%-5.15%, recall by 1.86%-7.7%, and precision by 5.22%-5.63%. Attached Figure Description

[0030] Figure 1 This is a flowchart of a method for identifying merchant violations based on consumer reviews in one embodiment;

[0031] Figure 2 This is a flowchart illustrating a method for identifying merchant violations based on consumer reviews in one embodiment. Detailed Implementation

[0032] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0033] like Figure 1 , 2 As shown, this embodiment provides a method for identifying merchant violations based on consumer reviews, specifically including the following steps:

[0034] Step 1: Data acquisition and processing model, which preprocesses the input consumer review data.

[0035] Step 1.1: Remove special characters from the data and remove stop words from the data according to the stop word list of Harbin Institute of Technology;

[0036] Step 1.2: Fix the length of the data processed in Step 1.1. We will remove comments with more than 52 characters and add 0 characters to comments with less than 52 characters.

[0037] Step 2: Vectorize the text data.

[0038] The comment data from step 1 is input into BERT (a pre-trained large language model) to obtain a 768-dimensional high-dimensional character vector X∈R. 52×768 .

[0039] Step 3: Local semantic relevance encoding. Based on the high-dimensional word vector X obtained in Step 2 and the excellent short-range semantic relevance encoding capability of Bi-LSTM, a local semantic relevance vector is constructed to obtain the bidirectional encoding vector X. S ∈R 52×768 .

[0040] Step 3.1: Input X sequentially from front to back into the encoding network consisting of 52 LSTM units to obtain the forward semantic relevance encoding vector X. S1 ∈R 52×768 ;

[0041] Step 3.2: Input X sequentially into the encoding network consisting of 52 LSTM units from back to front to obtain the backward semantic relevance encoding vector X. S2 ∈R 52×768 ;

[0042] Step 3.3: Place X S1 and X S2 The sums are then fed into an MLP network to obtain a bidirectional encoded vector X. S ∈R 52×768 .

[0043] Step 4: Global semantic relevance encoding that integrates local semantic information, based on the bidirectional encoding vector X obtained in Step 3. s The high-dimensional character vector X is obtained from step 2, and a global semantic relevance vector X is constructed using Transformer. L ∈R 52×768 .

[0044] Step 4.1: Use sine and cosine functions to apply the high-dimensional word vector X and the bidirectional encoded vector X obtained in step 3. S Perform positional encoding to obtain the word position vector PE X ∈R 52×768 and the local semantic location vector PE XS ∈R 52×768 The encoding method for the sine and cosine functions is as follows:

[0045]

[0046] Where i represents the index position of the character in the input, and j represents the index position of the element in the character vector;

[0047] Step 4.2: Convert the character's position vector PE X The sentence vector PX is obtained by adding the word vector X to the sentence vector PX, and the local semantic position vector PE is also added. XS and bidirectional encoded vector X S The addition yields a new semantic relevance vector PX. S ;

[0048] Step 4.3: Combine the sentence vector PX and the semantic relevance vector PX S The input is fed into the Transformer Encoder layer to obtain the fused semantic feature vector FX∈R. 52×768 The sentence vector PX is used to calculate K and V in the attention mechanism; PXS Used to calculate Q in the attention mechanism;

[0049] Step 4.4: Input the fused semantic feature vector FX into a module consisting of four stacked standard Transformer Encoder layers to obtain the global semantic relevance vector X. L ∈R 52×768 ;

[0050] Step 4.5: Transfer the global semantic relevance vector X L The probability distribution Y∈R of the class is obtained by inputting into the MLP network. 1 ×6 .

[0051] Step 5: Classify merchant violations. Calculate the category of merchant behavior contained in consumer reviews from the probability distribution Y of the categories obtained in Step 4.

[0052] Consumer reviews categorize merchant behavior into six types: normal merchant behavior, selling goods that do not meet national hygiene standards, selling counterfeit goods, unclear pricing of goods, selling goods that are short-weight, and behavior related to invoices.

[0053] It should be understood that although the steps in the flowchart above are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart above may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0054] One embodiment provides a merchant violation identification system based on consumer reviews, including:

[0055] The preprocessing module is used to acquire and preprocess consumer review data to obtain input reviews;

[0056] The recognition module is used to input the input comment into a pre-trained character embedding module for tensor quantization to obtain a high-dimensional character vector; the high-dimensional character vector is input into a local semantic relevance encoding module for local semantic relevance encoding to obtain a bidirectional encoding vector; the high-dimensional character vector and the bidirectional encoding vector are simultaneously input into a global semantic relevance encoding module to obtain a global semantic relevance vector; the global semantic relevance vector is input into an MLP network to obtain the probability distribution of the category;

[0057] The determination module is used to determine the category of merchant behavior based on the probability distribution of the category.

[0058] The above description is merely a preferred embodiment of a method and system for identifying merchant violations based on consumer reviews disclosed in this invention, and is not intended to limit the scope of protection of the embodiments in this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments in this specification should be included within the scope of protection of the embodiments in this specification.

Claims

1. A method for identifying merchant violations based on consumer reviews, characterized in that, Includes the following steps: Acquire and preprocess consumer review data to obtain input reviews; The input comments are fed into a pre-trained character embedding module for tensor quantization to obtain high-dimensional character vectors; The high-dimensional character vector is input into the local semantic relevance encoding module for local semantic relevance encoding to obtain a bidirectional encoded vector. The high-dimensional character vector and the bidirectional encoding vector are simultaneously input into the global semantic relevance encoding module to obtain the global semantic relevance vector; the global semantic relevance vector is then input into the MLP network to obtain the probability distribution of the categories. The category of merchant behavior is determined based on the probability distribution of the categories.

2. The method for identifying merchant violations based on consumer reviews according to claim 1, characterized in that, The preprocessing includes removing special characters and stop words; Adjust consumer review data to a fixed length.

3. The method for identifying merchant violations based on consumer reviews according to claim 1, characterized in that, The word embedding module uses the BERT model.

4. The method for identifying merchant violations based on consumer reviews according to claim 1, characterized in that, The processing procedure of the local semantic relevance encoding module includes the following steps: The high-dimensional word vector is input into the forward LSTM network of the Bi-LSTM model to obtain the forward semantic relevance encoding vector; The high-dimensional word vector is input into the backward LSTM network of the Bi-LSTM model to obtain the backward semantic relevance encoding vector; The forward semantic relevance encoding vector and the backward semantic relevance encoding vector are added together and input into the MLP network to obtain a bidirectional encoding vector.

5. The method for identifying merchant violations based on consumer reviews according to claim 4, characterized in that, In the Bi-LSTM model, the number of LSTM units in both the forward LSTM network and the backward LSTM network is consistent with the number of units of a fixed length.

6. The method for identifying merchant violations based on consumer reviews according to claim 1, characterized in that, The processing procedure of the global semantic relevance encoding module includes the following steps: The high-dimensional character vector and bidirectional coding vector are positionally encoded using sine and cosine functions to obtain the position vector of each character and the position vector of local semantics. The sentence vector is obtained by adding the high-dimensional character vector and the position vector of each character; the semantic relevance vector is obtained by adding the bidirectional encoding vector and the position vector of the local semantics. The sentence vector and semantic relevance vector are input into the Transformer Encoder layer to obtain a fused semantic feature vector, wherein the sentence vector is used to calculate K and V in the attention mechanism; and the semantic relevance vector is used to calculate Q in the attention mechanism. The fused semantic feature vector is input into the Transformer architecture to obtain a global semantic relevance vector.

7. The method for identifying merchant violations based on consumer reviews according to claim 6, characterized in that, The Transformer architecture consists of four stacked Transformer Encoder layers.

8. A merchant violation identification system based on consumer reviews, characterized in that, include: The preprocessing module is used to acquire and preprocess consumer review data to obtain input reviews; The recognition module is used to input the input comment into a pre-trained character embedding module for tensor quantization to obtain a high-dimensional character vector; the high-dimensional character vector is input into a local semantic relevance encoding module for local semantic relevance encoding to obtain a bidirectional encoding vector; the high-dimensional character vector and the bidirectional encoding vector are simultaneously input into a global semantic relevance encoding module to obtain a global semantic relevance vector; the global semantic relevance vector is input into an MLP network to obtain the probability distribution of the category; The determination module is used to determine the category of merchant behavior based on the probability distribution of the category.