Address book query method, device, computer equipment and storage medium

By obtaining user query characteristics and historical logs to generate query characteristics and weights, and automatically adjusting address book query rules, the problem of duplicate names and rare words in enterprise address book is solved, and efficient and accurate query result output is achieved.

CN114900575BActive Publication Date: 2025-09-02INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210497066.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-09
Publication Date
2025-09-02
Estimated Expiration
2042-05-09

AI Technical Summary

Technical Problem

The employee names and rare characters in the internal address book of the enterprise are prominent, and the existing query methods are difficult to automatically adjust the rules based on user query records, resulting in unsatisfactory query results and the manual maintenance rules are very laborious.

Method used

By obtaining the query characteristics and historical query log of the current user, generating query characteristics and weights, automatically querying and correcting the entire address book information, supporting homophones and rare words to correct errors, and optimizing query results.

Benefits of technology

It improves the accuracy and efficiency of query personnel in enterprise address book personnel, reduces the workload of manual maintenance, and ensures the completeness and accuracy of query results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114900575B_ABST
    Figure CN114900575B_ABST
Patent Text Reader

Abstract

The present application relates to the field of address book retrieval technology, and in particular to an address book query method, apparatus, computer equipment, and storage medium. The address book query method comprises: obtaining data to be queried; obtaining query features corresponding to the current user; querying the entire address book information based on the data to be queried and the query features to obtain matching data; and correcting the matching data to obtain target query data corresponding to the data to be queried. The present application improves the query effect of personnel in the corporate address book, reduces manual input, and ensures the actual use effect by combining the automatic error correction function for the data to be queried. It effectively solves the problem of failed personnel queries due to inaccurate input of uncommon and rare characters in names.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to an address book query method, apparatus, computer equipment, and storage medium. Background Art

[0002] Internal corporate address books are primarily used for communication between employees during work. Each employee's position within the company varies, leading to different contacts. Group companies often have hundreds of thousands of employees, with a high incidence of duplicate names and uncommon characters. Employees have a relatively large number of contacts at work, leading to high daily address book usage. Therefore, simple name search and sorting can make it difficult to prioritize the "most likely" contacts, resulting in unsatisfactory search results.

[0003] Manually maintained search rules are often limited by the experience of the rule maintainer and fail to reflect individual query habits. Maintaining rules for each person is also prohibitively labor-intensive. Therefore, there is an urgent need for an address book search method that can automatically extract rules based on user query records while also supporting error correction for homophones and uncommon characters, thus meeting the needs of efficient internal personnel searches within enterprises. Summary of the Invention

[0004] Based on this, it is necessary to provide an address book query method to address the above technical issues.

[0005] A method for querying an address book, comprising:

[0006] Get the data to be queried;

[0007] Get the query features corresponding to the current user;

[0008] Querying the entire address book information based on the data to be queried and the query characteristics to obtain matching data;

[0009] The matching data is modified to obtain target query data corresponding to the data to be queried.

[0010] In one embodiment, the query feature includes a feature field and a feature value; and querying the entire address book information based on the data to be queried and the query feature to obtain matching data includes:

[0011] Querying the entire address book information according to the data to be queried to obtain first query data;

[0012] Acquire second query data corresponding to the characteristic field and the characteristic value from the full address book information;

[0013] According to the first query data and the second query data, matching data is obtained. In one embodiment, before obtaining the query features corresponding to the current user, the method further includes:

[0014] Obtain the historical query log corresponding to the current user, and supplement the target field in the historical query log;

[0015] Extracting the target field according to the historical query log to obtain a feature field;

[0016] Screening the values ​​corresponding to each of the characteristic fields to obtain characteristic values;

[0017] A query feature is generated according to the feature field and the feature value.

[0018] In one embodiment, the modifying the matching data to obtain target query data corresponding to the to-be-queried data includes:

[0019] Counting text deviations between the query data and the matching data, wherein the text deviations include at least one of a pronunciation deviation degree, a Chinese character deviation degree, and a polyphonetic character deviation degree;

[0020] The matching data is corrected according to the text deviation to obtain target query data.

[0021] In one embodiment, after querying the full address book information according to the data to be queried and the query characteristics to obtain matching data, the method further includes:

[0022] Calculating an initial weight of the matching data according to the query weight corresponding to the query feature;

[0023] The step of correcting the matching data according to the text deviation to obtain target query data includes:

[0024] According to the initial weight and the text deviation, the matching data are sorted to obtain target query data.

[0025] In one embodiment, before obtaining the query features corresponding to the current user, the method further includes:

[0026] Determining a characteristic relationship between the characteristic values ​​according to the relationship between the characteristic values ​​corresponding to the characteristic fields in the query characteristics;

[0027] A query weight corresponding to the query feature is generated according to the feature relationship and the feature values ​​corresponding to each of the feature fields.

[0028] In one embodiment, the method for calculating the degree of pronunciation deviation includes:

[0029] Converting the data to be queried and the matching data into pinyin;

[0030] Filling the pinyin length of the matching data according to the pinyin length of the data to be queried;

[0031] The distance between the pinyin of the query data after length padding and the pinyin of the matching data is calculated as the degree of pronunciation deviation.

[0032] In one embodiment, the method for calculating the degree of deviation of Chinese characters includes:

[0033] Obtaining the Chinese character lengths of the data to be queried and the matching data;

[0034] When the length of the Chinese characters in the matching data is consistent with the length of the Chinese characters in the data to be queried, sorting the Chinese characters in the matching data according to the Chinese characters in the data to be queried, and taking the number of sorting steps as the degree of Chinese character deviation;

[0035] When the length of the Chinese characters in the target data is inconsistent with the control value, the Chinese characters in the matching data are sorted according to the Chinese characters in the query data, and the number of sorting movement steps is obtained, and the query data or the matching data is padded to obtain the padded Hamming distance;

[0036] The number of the sorting movement steps and the sum of the Hamming distances are taken as the degree of Chinese character deviation.

[0037] In one embodiment, the method for calculating the degree of polyphonetic word deviation includes:

[0038] Obtaining multiple pronunciations of the polyphonetic characters in the query data and the matching data;

[0039] The Hamming distance of each pronunciation of the polyphonetic character is calculated respectively, and the Hamming distance of each pronunciation is used as the deviation degree of the polyphonetic character.

[0040] In one embodiment, after modifying the matching data to obtain target query data corresponding to the to-be-queried data, the method further includes:

[0041] Generate query logs;

[0042] The query feature is updated according to the generated query log.

[0043] A device for querying a contact list, comprising:

[0044] A module for obtaining data to be queried, used for obtaining data to be queried;

[0045] A query feature acquisition module is used to obtain the query features corresponding to the current user;

[0046] A query module, configured to query the entire address book information based on the data to be queried and the query characteristics to obtain matching data;

[0047] The correction module is used to correct the matching data to obtain target query data corresponding to the data to be queried.

[0048] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0049] A computer storage medium stores a computer program, which implements the steps of the above method when executed by a processor.

[0050] A computer program product comprises a computer program, which implements the steps of the above method when executed by a processor.

[0051] The aforementioned address book query method, apparatus, computer device, and storage medium first query the entire address book information using the query characteristics corresponding to the current user and the data to be queried to obtain matching data, thereby ensuring the integrity of the matching data. The matching data is then corrected to ensure the integrity of the target query data outputted. This improves the effectiveness of corporate address book personnel queries, reduces manual effort, and ensures practical results. This effectively solves the problem of personnel query failures caused by inaccurate input of uncommon or rare characters in names. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0053] Figure 1 A diagram illustrating an application environment of a method for querying an address book in one embodiment;

[0054] Figure 2 1 is a flow chart of a method for querying an address book in one embodiment;

[0055] Figure 3 A schematic diagram of a correction principle extraction process for an address book query method in one embodiment;

[0056] Figure 4A schematic diagram of a flow chart for generating a correction principle for an address book query method in one embodiment;

[0057] Figure 5 A schematic diagram of calculating the total difference value of an address book query method in one embodiment;

[0058] Figure 6 A schematic diagram of a total difference value calculation process of a contact list query method in one embodiment;

[0059] Figure 7 1 is a schematic diagram of an automatic update process of a method for querying an address book in one embodiment;

[0060] Figure 8 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0061] To facilitate understanding of the present application, the present application will be described more fully below with reference to the accompanying drawings. The accompanying drawings provide embodiments of the present application. However, the present application may be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to make the disclosure of the present application more thorough and comprehensive.

[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein in the specification of this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The term "and / or" as used herein includes any and all couplings of one or more of the associated listed items.

[0063] It will be understood that the terms "first," "second," etc. used herein may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element.

[0064] The address book query method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Specifically, the server 104 can receive an address book query request sent by the terminal, where the request carries the data to be queried. The server 104 obtains the data to be queried and obtains the query features corresponding to the current user. In this way, the server 104 queries the entire address book based on the data to be queried and the query features to obtain matching data, and then corrects the matching data to obtain target query data corresponding to the data to be queried. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented as an independent server or a server cluster consisting of multiple servers.

[0065] It should be noted that this embodiment illustrates the method by applying it to a server. It is understandable that the method can also be applied to a server, or to a system including a terminal and a server, and implemented through interaction between the terminal and the server.

[0066] In one embodiment, Figure 2 As shown, a method for querying an address book is provided, which is applied to Figure 2 The following steps are used as an example to illustrate the server:

[0067] S202: Acquire the data to be queried.

[0068] Specifically, the server obtains the data to be queried input by the user and performs a query, wherein the data to be queried may be a user name in the address book.

[0069] S204: Obtain the query features corresponding to the current user.

[0070] The query feature is generated in advance based on the historical query data of the current user. For example, the server obtains the historical query data in advance and learns the historical query data to obtain the query feature. In one embodiment, the query feature includes a feature field and a feature value corresponding to the feature field. The feature field can be a work-related field, such as a department, position, work location, and organization, and the feature value is the value of each feature field. In one embodiment, the query feature also includes a query weight, which corresponds to a combination of feature values ​​of each feature field in the query feature. Therefore, the query weight can be regarded as the weight of the query feature of a specific feature value combination.

[0071] S206: Query the entire address book information based on the data to be queried and the query characteristics to obtain matching data.

[0072] Specifically, the server obtains the query data input by the user, and queries the entire address book information based on the query data to find the target employees who are exactly matched and the target employees who are not matched but are more preferred, and roughly filters the target employee result set range to obtain matching data.

[0073] In one embodiment, the server performs a precise search of the entire address book based on the query data to obtain target employees who fully match the query data. Furthermore, the server can retrieve target employees who do not match the query data but do match the query characteristics based on the current user's query characteristics. These two query steps can be performed serially or in parallel, without specific limitation.

[0074] For example, user Zhang San searches for data related to user Li Si. Considering that Zhang San might enter the wrong name, the first step is to query the entire address book. This filter selects the target user result set, including users named "Li Si" and all employees in the "Office Department" that Zhang San frequently contacts. The feature field here is "Department," and the feature value is "Office."

[0075] S208: Modify the matching data to obtain target query data corresponding to the data to be queried.

[0076] Specifically, the server searches the entire address book for matching data based on the query data. The server then sorts the matching data based on text correction rules. These rules address name correction, accommodating potential name errors. The correction process involves selecting names from the target user result set (i.e., the matching data) that are closest to the input name. The server then calculates the degree of deviation for each name, outputting the names with the least deviation as alternatives for the employee to select again.

[0077] For example: In the above case, employee Zhang San enters "Li Si". The system can return results with similar names such as "Li Si" and "Li Si" based on a specific algorithm. Each result will be calculated with an independent weight, and the results will be sorted according to the weight to achieve the optimization and error correction of the returned results.

[0078] In the above embodiment, matching data is first obtained by querying the entire address book using the query characteristics corresponding to the current user and the data to be queried. This ensures the integrity of the matching data. The matching data is then corrected to ensure the integrity of the target query data output. This improves the efficiency of searching for people in the corporate address book, reduces manual effort, and ensures practical results. This effectively solves the problem of failed searches due to inaccurate input of uncommon or rare characters in names.

[0079] In one embodiment, the query feature includes a feature field and a feature value; the entire address book information is queried based on the data to be queried and the query feature to obtain matching data, including: querying the entire address book information based on the data to be queried to obtain first query data; obtaining second query data corresponding to the feature field and feature value from the entire address book information; and obtaining matching data based on the first query data and the second query data.

[0080] Specifically, on the one hand, the server can accurately query the entire address book information based on the data to be queried to obtain accurate first query data corresponding to the data to be queried. On the other hand, the server can query the entire address book information to obtain second query data corresponding to the feature fields and feature values, and then combine the first query data and the second query data to obtain matching data. The second query data is obtained by querying based on the query features obtained from the user's historical query data. For example, if a user has queried for employees in the office department many times in the past, then when the user queries, the matching data output includes employees in the office department. The server combines the first query data and the second query data to obtain matching data, which may include deduplication processing to obtain non-repeated matching data.

[0081] In one embodiment, the query feature also includes a corresponding query weight. Thus, after the entire address book information is queried based on the data to be queried and the query feature to obtain matching data, the following steps are also included:

[0082] According to the query weight corresponding to the query feature, the initial weight of the matching data is calculated; the matching data are sorted according to the initial weight; the matching data are corrected to obtain the target query data corresponding to the data to be queried, including: correcting the sorted matching data to obtain the target query data corresponding to the data to be queried.

[0083] Specifically, the query weight corresponds to the combination of the feature values ​​of each feature field in the query feature. Therefore, the query weight can be regarded as the weight of the query feature for a specific feature value combination. For example, the query feature with the query value of "HR|Office" corresponds to a query weight of 1. In this way, the matching features are sorted according to the query weight, and when making corrections, the sorted matching data is corrected to obtain the target query data.

[0084] like Figure 3 and Figure 4 As shown, before obtaining the correction principle corresponding to the current user, it also includes:

[0085] S302: Obtain the historical query log corresponding to the current user, and supplement the target field in the historical query log.

[0086] Specifically, the server obtains the query log corresponding to the current user, and obtains the query log usage of the enterprise user's address book by analyzing the query log corresponding to the current user.

[0087] The target field includes a job field, which is used to characterize the job characteristics of the queried user, such as position, office location, organization department, location, etc.

[0088] Combine Figure 4 As shown, the address book log input 201 completes the employee address book contact query log input, and the log completion 202 completes the log supplement in combination with the work feature storage device 205, supplementing the work features of the contact person (such as position, office location, organizational department, location, etc.) based on the communication relationship, and non-work features (such as gender, age, place of origin, etc.) are not supplemented.

[0089] S304: Extract the target field according to the historical query log to obtain a feature field.

[0090] S306: Filter the values ​​corresponding to each characteristic field to obtain characteristic values.

[0091] S308: Generate query features based on feature fields and feature values.

[0092] Specifically, the server obtains the query log corresponding to the current user and the query log of the enterprise user's address book usage, and obtains the query information based on the query log. The server extracts query features from the query information. Specifically, contact feature extraction is to extract feature fields and feature values ​​from the contact information, use the extracted query features as the query features corresponding to the current user, and save the extracted query features in a query feature storage device.

[0093] Specifically, due to the limited amount of log data of individual employees' contact query behavior and the small number of samples, conventional feature extraction algorithms are prone to overfitting. Therefore, feature extraction is guided by statistical results. The specific steps are as follows: First, extract the feature fields, such as counting the number of values ​​of each work feature field in the log. If the number of values ​​is less than a specific threshold (such as 1 / 2 of the total number of logs), then the field has aggregated features and is marked as a feature field.

[0094] Secondly, extract the characteristic value, for example, count the number of times each value in the characteristic field appears, obtain the median of the number of times, and use the value with a number of occurrences greater than or equal to the median as the characteristic value.

[0095] In this embodiment, the server extracts query features from the query information, uses the extracted query features as the correction principles corresponding to the current user, and stores the correction principles in a query feature storage device. The saved correction principles can correct the query data and tolerate the situation where the query data may be entered incorrectly.

[0096] In one embodiment, before obtaining the query features corresponding to the current user, it also includes: determining the feature relationship between the feature values ​​based on the relationship between the feature values ​​corresponding to the feature fields in each query feature; generating the query weight corresponding to the query feature based on the feature relationship and the feature values ​​corresponding to each feature field.

[0097] Among them, continuing with the previous example, after calculating the characteristic fields and characteristic values, the server calculates the characteristic relationship, for example, fixes the characteristic value in a certain characteristic field, and calculates the number of characteristic value values ​​in the remaining characteristic fields. If the number of characteristic value values ​​in a certain characteristic field decreases, it means that there is a value dependency relationship between the two characteristic fields, that is, a characteristic relationship. Finally, the query weight is extracted, for example, the weight of a separate characteristic field and characteristic value is counted as 1; the characteristic relationship is used as an independent rule, and the characteristic fields contained in the relationship are used as the weight. For example, if there are 3 characteristic fields in the characteristic relationship, the weight is 3. Extracting query information. An example of query feature extraction is as follows:

[0098] The following table shows the query log for employee Zhang San's address book usage, which includes the contacted work attributes:

[0099] Department: Dept, Area: Area, Position: Post, Organization: Org.

[0100] Name Dept Area Post Org Zhao Yi human Resources Beijing manager Beijing Branch Qian Er office Shanghai director Shanghai Branch Li Si office Shanghai director Shanghai Branch Wang Wu human Resources Xiongan Clerk Beijing Branch Zheng Liu office Beijing engineer Beijing Branch Sun Ba System Department Nanjing engineer Jiangsu Branch

[0101] By using step S402: obtaining the number of values ​​of the work characteristic field in the query log, marking the work characteristic fields whose number of values ​​is less than the threshold as characteristic fields, it is found that the characteristic fields included in Zhang San's contact are: department Dept, organization Org.

[0102] Utilize step S404: obtain the median of the number of occurrences of the characteristic field, take the value of the number of occurrences of the characteristic field greater than or equal to the median as the characteristic value, and calculate the characteristic value in the characteristic field.

[0103] The median value of each field in Dept and Org is 2. Only values ​​that appear 2 or more times can be used as eigenvalues. The eigenvalues ​​of each eigenfield are shown in the following table.

[0104] Feature Values Dept Human Resources, Office Org Beijing Branch, Shanghai Branch

[0105] After step S406: determining whether there is a characteristic relationship among the characteristic fields by the control variable method, the mutual relationship between the characteristic values ​​in the characteristic fields is obtained.

[0106] Under the premise of Dept [Human Resources], the value of Org is [Beijing Branch], and there is a dependency relationship;

[0107] Under the premise of Dept [office], the value of Org is [Beijing Branch | Shanghai Branch], which is equal to the number of eigenvalues ​​and has no dependency relationship;

[0108] Under the premise of Org[Beijing Branch], the value of Dept is [Human Resources|Office], which is equal to the number of eigenvalues ​​and has no dependency relationship;

[0109] Under the premise of Org[Shanghai Branch], the value of Dept is [Office], and there is no dependency relationship.

[0110] Utilize step S408: Generate a correction principle based on the feature fields, feature values, and feature relationships, and obtain a query weight based on the feature values ​​in the feature relationships.

[0111]

[0112] The above query characteristics can be translated as:

[0113] 1. Zhang San has close relationships with employees in the Human Resources and Office departments; he also has close relationships with people in the Beijing and Shanghai branches. The query weight is 1.

[0114] 2. Furthermore, Zhang San has a close relationship with the employees of the Beijing branch's human resources department and the Shanghai branch's office; the query weight is 2. This completes the extraction of the query features for employee Zhang San.

[0115] In this embodiment, the server obtains the number of values ​​of the work feature field in the query log and marks those with a value less than a threshold as feature fields. It then obtains the median of the number of times a feature field appears and uses the value with a feature field occurrence greater than or equal to the median as the feature value. It then uses the control variable method to determine whether there is a feature relationship between the feature fields. Finally, it determines the query weight based on the feature fields, feature values, and feature relationships. This automated approach extracts query features and query weights, reducing manual effort and ensuring effective results.

[0116] like Figure 5 and Figure 6As shown, in one embodiment, the matching data is modified to obtain target query data corresponding to the data to be queried, including:

[0117] S502: Counting text deviations between the query data and the matching data, where the text deviation includes at least one of a pronunciation deviation degree, a Chinese character deviation degree, and a polyphonetic character deviation degree.

[0118] Specifically, after obtaining the query data, the server queries the entire address book information based on the query data to obtain matching data. After obtaining the matching data, the server calculates the degree of pronunciation deviation between the query data and the matching data, the degree of Chinese character deviation between the query data and the matching data, and the degree of polyphonetic deviation between the query data and the matching data.

[0119] S504: Correct the matching data according to the text deviation to obtain target query data.

[0120] Specifically, the text deviation can be a total difference value obtained by the server based on the pronunciation deviation degree, the Chinese character deviation degree and the polyphone deviation degree, for example, the total difference value is further summarized based on the pronunciation deviation degree, the Chinese character deviation degree and the polyphone deviation degree obtained in the previous step.

[0121] The formula for calculating the total difference value D is:

[0122] D=D p *W p +D c *W c

[0123] Description: D p represents the pinyin difference value (Hamming distance), W p Indicates the weight of the pinyin difference value (adjusted according to the actual effect), D c Indicates the difference value of Chinese characters, W c Indicates the weight of the Chinese character difference value (adjusted according to actual effect).

[0124] In one embodiment, the matching data is corrected according to the text deviation to obtain the target query data, which can be corrected by correcting the matching data sorted according to the query weight. For the convenience of calculation, the server can directly calculate the error correction weight based on the query weight and the total difference value, and then sort the matching data based on the error correction weight, where the error correction weight W e The calculation formula is:

[0125]

[0126] Description: W r Indicates the query weight.

[0127] Taking user Zhang San as an example, the error correction effect of the entire server is illustrated. Suppose the company employee information is as follows:

[0128] Name Dept Area Post Org Wang Wei human Resources Beijing manager Beijing Branch Pan Weiming office Shanghai director Shanghai Branch Wu Ming human Resources Shanghai director Shanghai Branch Huang Wei office Xiongan Clerk Beijing Branch

[0129] When Zhang San queries personnel, according to his personal query characteristics and the query weights corresponding to the query characteristics, the calculated personnel weights are:

[0130] Name Dept Org <![CDATA[W r ]]> Wang Wei human Resources Beijing Branch 2 Pan Weiming office Shanghai Branch 2 Wu Ming human Resources Shanghai Branch 1 Huang Wei office Beijing Branch 1

[0131] If the input name is "Wang Wei", the total difference value is calculated as the weighted sum of the Chinese character difference value and the pinyin difference value (Hamming distance). Suppose W c takes 0.5, and W p takes 1, indicating that the importance of pinyin approximation is higher. Then the result is:

[0132]

[0133] Calculate the error correction weight W [[ID=%23]] e as:

[0134]

[0135]

[0136] Then the person that user Zhang San is most likely to query is "Wang Wei", completing one input error correction.

[0137] According to the above calculation process, if Zhang San enters the name "Wu Ming", then the error correction weight W e is: Wang Wei [0.28], Pan Weiming [0.31], Wu Ming [2], Huang Wei [0.14]. Then the person that user Zhang San is most likely to query is "Wu Ming", completing the second input error correction and verifying the effectiveness of the algorithm.

[0138] In this embodiment, the server obtains the total difference value based on the pronunciation deviation degree, Chinese character deviation degree, and polyphonic character deviation degree. Using the deviation correction principle, effects such as homophone approximation search and name order adjustment are achieved, obtaining results that are relatively close to the target, completing a small range expansion of the results, and achieving the deviation correction effect. The server supports automatic error correction of Chinese names, realizes error correction of polyphonic characters, rare characters, and easily confused characters, and avoids the situation where accurate queries fail and no results can be returned due to incorrect input names. By returning results of similar names to prompt users to change the query conditions, the personnel to be contacted can be quickly found, improving the usage effect of the enterprise address book.

[0139] In one embodiment, the method for calculating the degree of pronunciation deviation includes: converting the data to be queried and the matching data into pinyin; padding the length of the pinyin of the matching data according to the length of the pinyin of the data to be queried; and calculating the distance between the pinyin of the data to be queried and the pinyin of the matching data after the length padding as the degree of pronunciation deviation.

[0140] Specifically, the server calculates the pronunciation deviation between the query data and the matching data, and first converts the target data into pinyin. The Chinese character to pinyin conversion is combined with the GB3212 Chinese character encoding storage device to complete the conversion of the Chinese characters of the user's name into Chinese pinyin.

[0141] Secondly, the server counts the pronunciation deviation between the query data and the matching data, and first converts the target data into pinyin. After the server converts the target data into pinyin, it pads the length of the pinyin. The length padding of the pinyin is shown in the following table:

[0142]

[0143] Finally, the server compares the pinyin of the target group members with the input pinyin based on the padded length and user preference rules to ensure that the similarity meets the characteristic threshold. Similarity calculation is to calculate the Hamming distance between the two. The smaller the distance, the higher the similarity. The Hamming distance is used as the difference value to obtain the Hamming distance, which is used as the degree of pronunciation deviation.

[0144] In this embodiment, the server converts the target data into pinyin, pads the pinyin, and uses the Hamming distance based on the padded pinyin to determine the degree of pronunciation deviation. Correction rules based on the degree of pronunciation deviation are used to correct the name, accommodating possible input errors.

[0145] In one embodiment, the method for calculating the degree of deviation of Chinese characters includes: obtaining the Chinese character lengths of the data to be queried and the matching data; when the Chinese character length of the matching data is consistent with the Chinese character length of the data to be queried, sorting the Chinese characters in the matching data according to the Chinese characters in the data to be queried, and taking the number of sorting movement steps as the degree of deviation of Chinese characters; when the Chinese character length of the target data is inconsistent with the control value, sorting the Chinese characters in the matching data according to the Chinese characters in the data to be queried, and obtaining the number of sorting movement steps, padding the data to be queried or the matching data to obtain the padded Hamming distance; taking the sum of the number of sorting movement steps and the Hamming distance as the degree of deviation of Chinese characters.

[0146] Specifically, the server counts the degree of deviation of Chinese characters between the query data and the matching data. First, the server obtains the length of Chinese characters in the target data and the comparison value.

[0147] Secondly, the server counts the degree of Chinese character deviation between the data to be queried and the matching data. After the server obtains the Chinese character length of the target data and the control value, it compares the Chinese character length with the control value. When the Chinese character length of the target data is the same as the control value, it sorts the control value according to the target data, and takes the sorting movement step as the difference value.

[0148] The server counts the degree of Chinese character deviation between the data to be queried and the matching data. After the server obtains the Chinese character length of the target data and the control value, it compares the Chinese character length with the control value. When the Chinese character length of the target data is different from the control value, it sorts the control value according to the target data, and补齐 the target data or the control value to obtain the补齐 Hamming distance. As shown in the following table:

[0149]

[0150] Finally, the server counts the degree of Chinese character deviation between the data to be queried and the matching data. After the server obtains the Chinese character length of the target data and the control value, it compares the Chinese character length with the control value. When the Chinese character length of the target data is the same as the control value, it sorts the control value according to the target data, and takes the sorting movement step as the difference value; when the Chinese character length of the target data is different from the control value, it sorts the control value according to the target data,补齐 the target data or the control value to obtain the补齐 Hamming distance, and takes the sum of the difference value and the Hamming distance as the degree of Chinese character deviation.

[0151] In this embodiment, the server takes the sum of the difference value and the Hamming distance as the degree of Chinese character deviation, effectively solving the problem that the personnel query fails due to inaccurate input of uncommon or rare Chinese characters in the name.

[0152] In one of the embodiments, the calculation method of the deviation degree of polyphonic characters includes: obtaining multiple pronunciations of the polyphonic characters in the data to be queried and the matching data; respectively calculating the Hamming distance of each pronunciation of the polyphonic characters, and taking the Hamming distance of each pronunciation as the deviation degree of the polyphonic characters.

[0153] Specifically, the server counts the deviation degree of polyphonic characters between the data to be queried and the matching data, and first obtains multiple pronunciations of the polyphonic characters. For example: "乐" can be pronounced as "le" or "yue" in a surname, and the server needs to obtain the two pronunciations of "le" and "yue" of "乐".

[0154] Among them, the server counts the deviation degree of polyphonic characters between the data to be queried and the matching data, and first obtains multiple pronunciations of the polyphonic characters. The processing of polyphonic characters in a surname is based on the common pronunciation, and calculates the pronunciation approximation according to multiple pronunciations respectively. For example: "乐" can be pronounced as "le" or "yue" in a surname, and it is necessary to calculate the pronunciation approximation according to the two pronunciations respectively according to Rule 1.

[0155] It should be noted that the text contains some terms like "补齐" which seem to be incorrect or incomplete expressions in the original Chinese. This translation is done based on the best understanding of the context with the existing text. If there are more accurate or complete terms available, the translation could be further refined.In this embodiment, the server obtains multiple pronunciations of a polyphonetic character, calculates the Hamming distance for each pronunciation, and uses the Hamming distance for each pronunciation as the degree of polyphonetic deviation. This effectively solves the problem of inaccurate input causing search failures for uncommon characters and polyphonetic characters in names.

[0156] In one embodiment, after the matching data is modified to obtain target query data corresponding to the data to be queried, the method further includes: generating a query log; and updating the query feature according to the generated query log.

[0157] Specifically, after the user obtains the query result that has been corrected by log query, the user's click log is recorded at the same time as the alternative options are output, including the order of click results, page turning records, etc. The click log input of the server will complete the collection of user logs and input the results into the weight adjustment. The weight adjustment will adjust the rule weight, pronunciation deviation degree, Chinese character deviation degree and polyphone deviation degree in steps of 5%. The result recalculation uses the latest adjusted correction weight to recalculate the correction weight. If the recalculated value is closer to the employee's click result (that is, the order is consistent), the new correction weight will be updated and saved, otherwise the correction weights will be readjusted.

[0158] In this embodiment, the server automatically updates the query log and correction principles, completes user click log recording and log analysis, and automatically updates the query characteristics by calculating the most recent click log, effectively reducing manual intervention and updating users' work contact habits.

[0159] Specifically, combined Figure 7 As shown, a specific embodiment of the present application is given. In this embodiment, the entire flowchart includes name input 1, name correction 2, optimization of the input name and contact query 3 are completed in combination with the calculation rules in the personal rule storage device 6, query result sorting optimization and result output 4 are completed in combination with the calculation rules in the personal rule storage device 6, the query results are output, and user click log recording and log analysis 5 are completed at the same time, and the automatic update of personal rules is completed by calculating the latest click log.

[0160] like Figure 7 As shown, the system first reads the query name entered by the user, and the query and weight calculation 2 combines the rules in the personal rule storage device 6 to query the entire employee information, find out the target employees who are exactly matched and the target employees who are not matched but are more inclined, and roughly screen out the target user result set range.

[0161] For example, if employee "Zhang San" searches for employee "Li Si", considering that Zhang San might mistype the querying person's name, the first step is to filter all employees named "Li Si" and all employees in the "Office Department" that Zhang San frequently contacts, thus selecting the target user result set.

[0162] Name correction 3 corrects names using the correction rules stored in correction rule storage 7, accommodating possible name input errors. The correction process involves selecting names from the target user result set that are closest to the input name and calculating the degree of deviation for each name. Names with the smallest deviation are then output as alternatives for the employee to select again.

[0163] For example, in the above embodiment, employee Zhang San inputs "Li Si". The system can return results with similar names such as "Li Si" and "Li Si" according to a specific algorithm. Each result will be calculated with an independent weight, and the results will be sorted according to the weight to achieve the optimization and error correction of the returned results.

[0164] In the result output device 4, while the result is being output, the user's click log will be recorded, including the order of click results, page turning records, etc. The click log will be input into the log analysis device 5 for analysis, the weight of the click result feature will be calculated, and the new rules will be updated to the personal rule storage device 6 to realize the automatic update of the personal rules; the click result weight of the name after correction will be calculated, and the new weight rule will be updated to the correction rule storage device 7 to realize the automatic update of the correction weight.

[0165] It should be understood that although Figures 2 to 7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figures 2 to 7 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0166] In one embodiment, the address book processing device includes:

[0167] A module for obtaining data to be queried, used for obtaining data to be queried;

[0168] A query feature acquisition module is used to obtain the query features corresponding to the current user;

[0169] The query module is used to query the entire address book information and obtain matching data based on the data to be queried and the query characteristics;

[0170] The correction module is used to correct the matching data to obtain target query data corresponding to the data to be queried.

[0171] In one embodiment, the query feature includes a feature field and a feature value; the query module includes:

[0172] A first query data acquisition unit, configured to query the entire address book information according to the data to be queried to obtain first query data;

[0173] A second query data acquisition unit, configured to acquire second query data corresponding to the characteristic field and characteristic value from the full address book information;

[0174] The matching data acquisition unit is configured to obtain matching data according to the first query data and the second query data.

[0175] In one embodiment, the address book query device further includes:

[0176] The log acquisition module is used to obtain the historical query log corresponding to the current user and supplement the target field in the historical query log;

[0177] The feature field extraction module is used to extract the target field based on the historical query log to obtain the feature field;

[0178] The feature value acquisition module is used to filter the values ​​corresponding to each feature field to obtain the feature value;

[0179] The query feature acquisition module is used to generate query features based on feature fields and feature values.

[0180] In one embodiment, the address book query device further includes:

[0181] The initial weight calculation module is used to calculate the initial weight of the matching data according to the query weight corresponding to the query feature;

[0182] Sorting module, used to sort each matching data according to the initial weight;

[0183] The correction module is further configured to correct the sorted matching data to obtain target query data corresponding to the data to be queried.

[0184] In one embodiment, the address book query device further includes:

[0185] A feature relationship determination module is used to determine the feature relationship between the feature values ​​according to the relationship between the feature values ​​corresponding to the feature fields in each query feature;

[0186] The query weight generation module is used to generate the query weight corresponding to the query feature according to the feature relationship and the feature value corresponding to each feature field.

[0187] In one embodiment, the correction module includes:

[0188] A statistical unit, configured to count text deviations between the query data and the matching data, wherein the text deviations include at least one of a pronunciation deviation degree, a Chinese character deviation degree, and a polyphonetic character deviation degree;

[0189] The correction unit is used to correct the matching data according to the text deviation to obtain the target query data.

[0190] In one embodiment, the statistical unit is further used to convert the data to be queried and the matching data into pinyin; to pad the length of the pinyin of the matching data according to the length of the pinyin of the data to be queried; and to calculate the distance between the pinyin of the data to be queried and the pinyin of the matching data after the padding as the degree of pronunciation deviation.

[0191] In one embodiment, the statistical unit is further used to obtain the Chinese character lengths of the data to be queried and the matching data; when the Chinese character length of the matching data is consistent with the Chinese character length of the data to be queried, the Chinese characters in the matching data are sorted according to the Chinese characters in the data to be queried, and the number of sorting movement steps is used as the degree of Chinese character deviation; when the Chinese character length of the target data is inconsistent with the control value, the Chinese characters in the matching data are sorted according to the Chinese characters in the data to be queried, and the number of sorting movement steps is obtained, and the data to be queried or the matching data is padded to obtain the padded Hamming distance; the sum of the number of sorting movement steps and the Hamming distance is used as the degree of Chinese character deviation.

[0192] In one embodiment, the statistical unit is further configured to obtain multiple pronunciations of polyphones in the query data and the matching data; calculate the Hamming distance of each pronunciation of the polyphone, and use the Hamming distance of each pronunciation as the degree of deviation of the polyphone.

[0193] In one embodiment, the address book query device further includes:

[0194] Log generation module, used to generate query logs;

[0195] The update module is used to update the query features according to the generated query logs.

[0196] For the specific limitations of the server, please refer to the limitations of the address book query method above, which will not be repeated here. The various modules in the above-mentioned server can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0197] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used 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, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store periodic task allocation data, such as configuration files, theoretical operating parameters and theoretical deviation value ranges, task attribute information, etc. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it implements a method for querying an address book.

[0198] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0199] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented: obtaining data to be queried; obtaining query features corresponding to the current user; querying the entire address book information based on the data to be queried and the query features to obtain matching data; and correcting the matching data to obtain target query data corresponding to the data to be queried.

[0200] In one embodiment, the query features involved when the processor executes the computer program include feature fields and feature values; the query of the entire address book information based on the data to be queried and the query features to obtain matching data implemented by the processor when executing the computer program includes: querying the entire address book information based on the data to be queried to obtain first query data; obtaining second query data corresponding to the feature fields and feature values ​​from the entire address book information; and obtaining matching data based on the first query data and the second query data.

[0201] In one embodiment, before obtaining the query features corresponding to the current user when the processor executes the computer program, it also includes: obtaining the historical query log corresponding to the current user, and supplementing the historical query log with the target field; extracting the target field according to the historical query log to obtain the feature field; screening the values ​​corresponding to each feature field to obtain the feature value; and generating the query feature according to the feature field and the feature value.

[0202] In one embodiment, after the processor executes the computer program to query the entire address book information according to the data to be queried and the query characteristics to obtain matching data, it also includes: calculating the initial weight of the matching data according to the query weight corresponding to the query characteristics; sorting each matching data according to the initial weight; the processor executes the computer program to correct the matching data to obtain target query data corresponding to the data to be queried, including: correcting the sorted matching data to obtain the target query data corresponding to the data to be queried.

[0203] In one embodiment, before obtaining the query features corresponding to the current user when the processor executes the computer program, it also includes: determining the feature relationship between the feature values ​​based on the relationship between the feature values ​​corresponding to the feature fields in each query feature; generating a query weight corresponding to the query feature based on the feature relationship and the feature values ​​corresponding to each feature field.

[0204] In one embodiment, the processor executes a computer program to correct the matching data to obtain target query data corresponding to the data to be queried, including: counting the text deviation between the data to be queried and the matching data, the text deviation including at least one of the degree of pronunciation deviation, the degree of Chinese character deviation, and the degree of polyphone deviation; and correcting the matching data according to the text deviation to obtain the target query data.

[0205] In one embodiment, a method for calculating the degree of pronunciation deviation implemented when a processor executes a computer program includes: converting the data to be queried and the matching data into pinyin; padding the length of the pinyin of the matching data according to the length of the pinyin of the data to be queried; and calculating the distance between the pinyin of the data to be queried and the pinyin of the matching data after the length padding as the degree of pronunciation deviation.

[0206] In one embodiment, a method for calculating the degree of deviation of Chinese characters implemented when a processor executes a computer program includes: obtaining the Chinese character lengths of the data to be queried and the matching data; when the Chinese character length of the matching data is consistent with the Chinese character length of the data to be queried, sorting the Chinese characters in the matching data according to the Chinese characters in the data to be queried, and taking the number of sorting movement steps as the degree of deviation of Chinese characters; when the Chinese character length of the target data is inconsistent with the control value, sorting the Chinese characters in the matching data according to the Chinese characters in the data to be queried, and obtaining the number of sorting movement steps, padding the data to be queried or the matching data to obtain the padded Hamming distance; and taking the sum of the number of sorting movement steps and the Hamming distance as the degree of deviation of Chinese characters.

[0207] In one embodiment, a method for calculating the degree of deviation of a polyphonetic character implemented when a processor executes a computer program includes: obtaining multiple pronunciations of the polyphonetic character in the query data and the matching data; calculating the Hamming distance of each pronunciation of the polyphonetic character respectively, and using the Hamming distance of each pronunciation as the degree of deviation of the polyphonetic character.

[0208] In one embodiment, after the processor executes the computer program to modify the matching data to obtain target query data corresponding to the data to be queried, the method further includes: generating a query log; and updating the query feature according to the generated query log.

[0209] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining data to be queried; obtaining query features corresponding to the current user; querying the entire address book information based on the data to be queried and the query features to obtain matching data; and correcting the matching data to obtain target query data corresponding to the data to be queried.

[0210] In one embodiment, the query features involved when the computer program is executed by the processor include feature fields and feature values; the computer program is executed by the processor to query the entire address book information based on the data to be queried and the query features to obtain matching data, including: querying the entire address book information based on the data to be queried to obtain first query data; obtaining second query data corresponding to the feature fields and feature values ​​from the entire address book information; and obtaining matching data based on the first query data and the second query data.

[0211] In one embodiment, before obtaining the query features corresponding to the current user, the computer program implemented by the processor also includes: obtaining the historical query log corresponding to the current user, and supplementing the historical query log with the target field; extracting the target field according to the historical query log to obtain the feature field; screening the values ​​corresponding to each feature field to obtain the feature value; and generating the query feature according to the feature field and the feature value.

[0212] In one embodiment, after the computer program is executed by the processor and queries the entire address book information according to the data to be queried and the query features to obtain matching data, it also includes: calculating the initial weight of the matching data according to the query weight corresponding to the query feature; sorting each matching data according to the initial weight; when the computer program is executed by the processor, it is implemented by correcting the matching data to obtain target query data corresponding to the data to be queried, including: correcting the sorted matching data to obtain the target query data corresponding to the data to be queried.

[0213] In one embodiment, before obtaining the query features corresponding to the current user, the computer program implemented when executed by the processor also includes: determining the feature relationship between the feature values ​​based on the relationship between the feature values ​​corresponding to the feature fields in each query feature; and generating a query weight corresponding to the query feature based on the feature relationship and the feature values ​​corresponding to each feature field.

[0214] In one embodiment, the computer program, when executed by a processor, corrects the matching data to obtain target query data corresponding to the data to be queried, including: counting the text deviation between the data to be queried and the matching data, the text deviation including at least one of the degree of pronunciation deviation, the degree of Chinese character deviation, and the degree of polyphonetic character deviation; and correcting the matching data according to the text deviation to obtain the target query data.

[0215] In one embodiment, a method for calculating the degree of pronunciation deviation implemented when a computer program is executed by a processor includes: converting the data to be queried and the matching data into pinyin; padding the length of the pinyin of the matching data according to the length of the pinyin of the data to be queried; and calculating the distance between the pinyin of the data to be queried and the pinyin of the matching data after the length padding as the degree of pronunciation deviation.

[0216] In one embodiment, a method for calculating the degree of deviation of Chinese characters implemented when a computer program is executed by a processor includes: obtaining the Chinese character lengths of the data to be queried and the matching data; when the Chinese character length of the matching data is consistent with the Chinese character length of the data to be queried, sorting the Chinese characters in the matching data according to the Chinese characters in the data to be queried, and using the number of sorting movement steps as the degree of deviation of Chinese characters; when the Chinese character length of the target data is inconsistent with the control value, sorting the Chinese characters in the matching data according to the Chinese characters in the data to be queried, and obtaining the number of sorting movement steps, padding the data to be queried or the matching data to obtain the padded Hamming distance; and using the sum of the number of sorting movement steps and the Hamming distance as the degree of deviation of Chinese characters.

[0217] In one embodiment, a method for calculating the degree of polyphonetic character deviation implemented when a computer program is executed by a processor includes: obtaining multiple pronunciations of the polyphonetic character in the query data and the matching data; calculating the Hamming distance of each pronunciation of the polyphonetic character respectively, and using the Hamming distance of each pronunciation as the degree of polyphonetic character deviation.

[0218] In one embodiment, after the computer program is executed by a processor to modify the matching data to obtain target query data corresponding to the data to be queried, the program further includes: generating a query log; and updating the query feature according to the generated query log.

[0219] In one embodiment, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the following steps: obtaining data to be queried; obtaining query features corresponding to the current user; querying the entire address book information based on the data to be queried and the query features to obtain matching data; and correcting the matching data to obtain target query data corresponding to the data to be queried.

[0220] In one embodiment, the query features involved when the computer program is executed by the processor include feature fields and feature values; the computer program is executed by the processor to query the entire address book information based on the data to be queried and the query features to obtain matching data, including: querying the entire address book information based on the data to be queried to obtain first query data; obtaining second query data corresponding to the feature fields and feature values ​​from the entire address book information; and obtaining matching data based on the first query data and the second query data.

[0221] In one embodiment, before obtaining the query features corresponding to the current user, the computer program implemented by the processor also includes: obtaining the historical query log corresponding to the current user, and supplementing the historical query log with the target field; extracting the target field according to the historical query log to obtain the feature field; screening the values ​​corresponding to each feature field to obtain the feature value; and generating the query feature according to the feature field and the feature value.

[0222] In one embodiment, after the computer program is executed by the processor and queries the entire address book information according to the data to be queried and the query features to obtain matching data, it also includes: calculating the initial weight of the matching data according to the query weight corresponding to the query feature; sorting each matching data according to the initial weight; when the computer program is executed by the processor, it is implemented by correcting the matching data to obtain target query data corresponding to the data to be queried, including: correcting the sorted matching data to obtain the target query data corresponding to the data to be queried.

[0223] In one embodiment, before obtaining the query features corresponding to the current user, the computer program implemented when executed by the processor also includes: determining the feature relationship between the feature values ​​based on the relationship between the feature values ​​corresponding to the feature fields in each query feature; and generating a query weight corresponding to the query feature based on the feature relationship and the feature values ​​corresponding to each feature field.

[0224] In one embodiment, the computer program, when executed by a processor, corrects the matching data to obtain target query data corresponding to the data to be queried, including: counting the text deviation between the data to be queried and the matching data, the text deviation including at least one of the degree of pronunciation deviation, the degree of Chinese character deviation, and the degree of polyphonetic character deviation; and correcting the matching data according to the text deviation to obtain the target query data.

[0225] In one embodiment, a method for calculating the degree of pronunciation deviation implemented when a computer program is executed by a processor includes: converting the data to be queried and the matching data into pinyin; padding the length of the pinyin of the matching data according to the length of the pinyin of the data to be queried; and calculating the distance between the pinyin of the data to be queried and the pinyin of the matching data after the length padding as the degree of pronunciation deviation.

[0226] In one embodiment, a method for calculating the degree of deviation of Chinese characters implemented when a computer program is executed by a processor includes: obtaining the Chinese character lengths of the data to be queried and the matching data; when the Chinese character length of the matching data is consistent with the Chinese character length of the data to be queried, sorting the Chinese characters in the matching data according to the Chinese characters in the data to be queried, and using the number of sorting movement steps as the degree of deviation of Chinese characters; when the Chinese character length of the target data is inconsistent with the control value, sorting the Chinese characters in the matching data according to the Chinese characters in the data to be queried, and obtaining the number of sorting movement steps, padding the data to be queried or the matching data to obtain the padded Hamming distance; and using the sum of the number of sorting movement steps and the Hamming distance as the degree of deviation of Chinese characters.

[0227] In one embodiment, a method for calculating the degree of polyphonetic character deviation implemented when a computer program is executed by a processor includes: obtaining multiple pronunciations of the polyphonetic character in the query data and the matching data; calculating the Hamming distance of each pronunciation of the polyphonetic character respectively, and using the Hamming distance of each pronunciation as the degree of polyphonetic character deviation.

[0228] In one embodiment, after the computer program is executed by a processor to modify the matching data to obtain target query data corresponding to the data to be queried, the program further includes: generating a query log; and updating the query feature according to the generated query log.

[0229] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile 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 various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0230] The technical features of the above embodiments can be coupled arbitrarily. In order to make the description concise, not all possible couplings of the technical features in the above embodiments are described. However, as long as there is no contradiction in the coupling of these technical features, they should be considered to be within the scope of this specification.

[0231] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A method for querying an address book, characterized in that: The address book query method includes: Obtain the data to be queried input by the current user; the data to be queried is the user's name; Obtaining a query feature corresponding to the current user; the query feature is generated based on the current user's historical query data, the query feature includes a feature field and a feature value, and the feature field is related to the work of the queried user; Querying the entire address book information according to the data to be queried to obtain first query data; Acquire second query data corresponding to the characteristic field and the characteristic value from the full address book information; Obtaining matching data according to the first query data and the second query data; The matching data is modified to obtain target query data corresponding to the data to be queried.

2. The address book query method according to claim 1, characterized in that: Before obtaining the query features corresponding to the current user, the method further includes: Obtain the historical query log corresponding to the current user, and supplement the target field in the historical query log; Extracting the target field according to the historical query log to obtain a feature field; Screening the values ​​corresponding to each of the characteristic fields to obtain characteristic values; A query feature is generated according to the feature field and the feature value.

3. The address book query method according to claim 1, wherein: After querying the entire address book information according to the data to be queried and the query characteristics to obtain matching data, the method further includes: Calculating the initial weight of the matching data according to the query weight corresponding to the query feature; sorting the matching data according to the initial weight; The step of modifying the matching data to obtain target query data corresponding to the data to be queried includes: The sorted matching data are modified to obtain target query data corresponding to the data to be queried.

4. The address book query method according to claim 3, characterized in that: Before obtaining the query features corresponding to the current user, the method further includes: Determining a characteristic relationship between the characteristic values ​​according to the relationship between the characteristic values ​​corresponding to the characteristic fields in the query characteristics; A query weight corresponding to the query feature is generated according to the feature relationship and the feature values ​​corresponding to each of the feature fields.

5. The address book query method according to any one of claims 1 to 4, characterized in that: The step of modifying the matching data to obtain target query data corresponding to the data to be queried includes: Counting text deviations between the query data and the matching data, wherein the text deviations include at least one of a pronunciation deviation degree, a Chinese character deviation degree, and a polyphonetic character deviation degree; The matching data is corrected according to the text deviation to obtain target query data.

6. The address book query method according to claim 5, characterized in that: The method for calculating the degree of pronunciation deviation includes: Converting the data to be queried and the matching data into pinyin; Filling the pinyin length of the matching data according to the pinyin length of the data to be queried; The distance between the pinyin of the query data after length padding and the pinyin of the matching data is calculated as the degree of pronunciation deviation.

7. The address book query method according to claim 5, characterized in that: The calculation method of the Chinese character deviation degree includes: Obtaining the Chinese character lengths of the data to be queried and the matching data; When the length of the Chinese characters in the matching data is consistent with the length of the Chinese characters in the data to be queried, sorting the Chinese characters in the matching data according to the Chinese characters in the data to be queried, and taking the number of sorting steps as the degree of Chinese character deviation; When the length of Chinese characters in the matching data is inconsistent with that in the data to be queried, sorting the Chinese characters in the matching data according to the Chinese characters in the data to be queried, obtaining the number of sorting movement steps, and padding the data to be queried or the matching data to obtain the padded Hamming distance; The number of the sorting movement steps and the sum of the Hamming distances are taken as the degree of Chinese character deviation.

8. The address book query method according to claim 5, characterized in that: The method for calculating the degree of polyphonetic word deviation includes: Obtaining multiple pronunciations of the polyphonetic characters in the query data and the matching data; The Hamming distance of each pronunciation of the polyphonetic character is calculated respectively, and the Hamming distance of each pronunciation is used as the deviation degree of the polyphonetic character.

9. The address book query method according to claim 1, wherein: After the matching data is corrected to obtain target query data corresponding to the data to be queried, the method further includes: Generate query logs; The query feature is updated according to the generated query log.

10. A device for querying an address book, characterized in that: The address book query device includes: The module for obtaining the data to be queried is used to obtain the data to be queried input by the current user; the data to be queried is the user's name; A query feature acquisition module is used to obtain the query feature corresponding to the current user; the query feature is generated based on the current user's historical query data, and the query feature includes a feature field and a feature value, and the feature field is related to the work of the queried user; a query module, configured to query the entire address book information based on the data to be queried to obtain first query data; obtain second query data corresponding to the characteristic field and the characteristic value from the entire address book information; and obtain matching data based on the first query data and the second query data; The correction module is used to correct the matching data to obtain target query data corresponding to the data to be queried.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.

12. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

13. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Search error correction method and search error correction device

    CN104036004A

  • Address book retrieval method and device

    CN111367942A