String similarity determination method, apparatus, program product, and related device

CN116029304BActive Publication Date: 2026-06-19TENCENT CLOUD COMPUTING (CHANGSHA) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT CLOUD COMPUTING (CHANGSHA) CO LTD
Filing Date
2023-01-12
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing edit distance algorithms treat all components in a string equally when calculating string similarity, resulting in strings with significant semantic differences receiving high similarity scores, which affects the accuracy of the calculation.

Method used

By introducing semantic comparison into string similarity calculation, words with opposite meanings are identified and processed to ensure that the similarity is zero. Edit distance similarity is calculated after all words have been traversed, thus improving accuracy.

Benefits of technology

This effectively avoids misjudging strings with completely opposite meanings as similar, improves the accuracy of edit distance similarity calculation, and ensures that the results are more consistent with actual semantic differences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116029304B_ABST
    Figure CN116029304B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, program product, and related equipment for determining string similarity, relating to the field of artificial intelligence technology. The method includes: acquiring a first string and a second string; selecting a word from the first word in the first string that has not been compared before as the current word to be compared; performing semantic comparisons between the current word to be compared and the second word in the second string; if the second word has a semantic opposite to the current word to be compared, then determining the similarity between the first string and the second string to be zero; otherwise, continuing to select a first word that has not been compared before as the current word to be compared and continuing semantic comparisons; if, after traversing the first word, it is determined that there is no word in the second string with a semantic opposite to the first word, then using the edit distance similarity between the first string and the second string as the similarity between the first string and the second string. This method can improve the accuracy of string similarity determination.
Need to check novelty before this filing date? Find Prior Art