Official account information acquisition method and device and storage medium

CN120336611APending Publication Date: 2025-07-18GRG BANKING IT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510391825.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-18

Smart Images

  • Figure CN120336611A_ABST
    Figure CN120336611A_ABST
Patent Text Reader

Abstract

The invention discloses an official account information acquisition method and device and a storage medium, and belongs to the technical field of data processing. The method comprises the steps of obtaining target article information released by a target official account according to a preset rule; judging whether the target article information exists in a database or not through a Bloom filter; under the condition that the bloom filter judges that the target article information exists in the database, calculating a target hash value corresponding to the target article information; and under the condition that the hash value corresponding to the historical article information stored in the database is different from the target hash value, storing the target article information in the database. According to the method, the target article information is judged through the Bloom filter, and the judgment result of the Bloom filter is verified by combining the hash value of the target article and the hash value of the historical article stored in the database, so that the efficiency of official account article de-duplication is improved, the load pressure of the database is greatly reduced, and the storage of repeated data is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of data processing, and particularly relates to a method, device, and storage medium for obtaining official account information. Background Art

[0002] With the development of the Internet, the official account platform has become an important position for information dissemination. Many applications achieve information integration and sharing by obtaining official account articles.

[0003] The obtained article data needs to be further processed and stored for subsequent analysis and application. When processing data into the database, in order to avoid storing duplicate content, related technologies usually adopt the method of repeatedly querying the database to confirm whether the obtained article already exists. Due to the large number and frequent updates of official account articles, repeated queries are required every time an article is obtained, resulting in a large number of invalid requests being sent to the database, imposing a huge load pressure on the database server. Summary of the Invention

[0004] This application aims to solve at least one of the technical problems existing in the prior art. For this purpose, this application provides a method, device, and storage medium for obtaining official account information to improve the efficiency of deduplicating official account articles and reduce the load pressure borne by the database server.

[0005] In a first aspect, this application provides a method for obtaining official account information, including:

[0006] Obtaining target article information published by a target official account according to a preset rule;

[0007] Judging whether the target article information exists in the database through a Bloom filter;

[0008] When the Bloom filter judges that the target article information exists in the database, calculating a target hash value corresponding to the target article information;

[0009] When the hash value corresponding to the historical article information stored in the database is different from the target hash value, storing the target article information in the database.

[0010] The method for obtaining official account information provided by the embodiments of the present application obtains the target article information published by the target official account according to a preset rule; judges whether the target article information exists in the database through a Bloom filter; when the Bloom filter judges that the target article information exists in the database, calculates the target hash value corresponding to the target article information; when the hash value corresponding to the historical article information stored in the database is different from the target hash value, stores the target article information in the database. The embodiments of the present application quickly judge the target article information through a Bloom filter, can determine whether the article may already exist in the database in an extremely short time. When the Bloom filter determines that the target article may exist in the database, further calculates the hash value of the target article and compares it with the historical article hash values stored in the database to verify the judgment result of the Bloom filter, reduces a large number of inefficient repeated query operations directly on the database, improves the efficiency of duplicate removal of official account articles, greatly reduces the load pressure on the database, and effectively reduces the storage of duplicate data.

[0011] According to an embodiment of the present application, before obtaining the target article information published by the target official account according to the preset rule, it includes:

[0012] Obtain the to-be-matched official account input by the user;

[0013] When the to-be-matched official account does not exist on the target platform, match multiple candidate official accounts from the target platform;

[0014] Calculate the similarity between the name of the to-be-matched official account and the names of the multiple candidate official accounts respectively;

[0015] Screen out the target official account from the multiple candidate official accounts according to the similarity.

[0016] In this embodiment, by obtaining the name of the to-be-matched official account input by the user, if there is no exactly matching official account on the target platform, further match multiple candidate official accounts from the platform, use an algorithm to quantify the similarity between the name of the to-be-matched official account and the names of the candidate official accounts, and based on the level of similarity, can accurately screen out the target official account that best meets the user's intention, improving the accuracy of determining the target official account.

[0017] According to an embodiment of the present application, the calculating the similarity between the name of the to-be-matched official account and the names of the multiple candidate official accounts respectively includes:

[0018] Extract the first word vector of the name of the to-be-matched official account through a deep learning model; and extract the second word vectors of the names of the multiple candidate official accounts through the deep learning model;

[0019] Calculate the similarity based on the first word vector and the second word vector.

[0020] In this embodiment, the first word vector of the public account name to be matched and the second word vectors of multiple candidate public account names are respectively extracted through a deep learning model, which can convert text information into a dense vector form, capture the semantic features of words, make names with similar semantics closer in the vector space, calculate the similarity between the public account to be matched and the candidate public accounts based on these word vectors, and screen out the target public account that best meets the user's intention by quantifying semantic similarity, improving the accuracy and efficiency of public account matching.

[0021] According to an embodiment of the present application, the calculating the similarity based on the first word vector and the second word vector includes:

[0022] Normalize the dimension representing the length of the public account name in the first word vector to obtain an enhanced first word vector; and normalize the dimension representing the length of the public account name in the second word vector to obtain an enhanced second word vector;

[0023] Determine the cosine similarity between the enhanced first word vector and the enhanced second word vector as the similarity.

[0024] In this embodiment, by normalizing the dimension representing the length of the public account name to enhance the extracted word vectors, the influence of name length differences on word vectors can be reduced, making the similarity calculation focus more on semantic features rather than just the number of words. The enhanced word vectors obtained through normalization can more accurately reflect the semantic connotation of the public account name. Using cosine similarity as a measure to calculate the similarity between the enhanced first word vector and the second word vector can further capture semantic similarity, not only improving the accuracy of target public account determination but also enhancing the adaptability to public account names of different lengths.

[0025] According to an embodiment of the present application, the method further includes:

[0026] In the case where the Bloom filter determines that the database does not have the target article information, store the target article information in the database and add the target article information to the Bloom filter.

[0027] In this embodiment, when the Bloom filter determines that the target article does not exist in the database, it indicates that the target article is new content. The target article can be stored in the database, reducing the possibility of duplicate article storage. Moreover, adding the target article information to the Bloom filter can provide the latest reference basis for subsequent duplicate checking, enabling the Bloom filter to maintain the recognition ability of the latest data and reducing misjudgments caused by data lag.

[0028] According to an embodiment of the present application, when the hash value corresponding to the historical article information stored in the database is different from the target hash value, storing the target article information in the database includes:

[0029] Obtain a preset hash value set; the hash value set includes the hash values corresponding to the historical article information in the database;

[0030] When the target hash value does not exist in the hash value set, determine that the hash value corresponding to the historical article information stored in the database is different from the target hash value, and store the target article information in the database.

[0031] In this embodiment, by obtaining a preset hash value set that contains the hash values corresponding to all historical article information in the database, and comparing the target hash value of the target article with the hash value set, it can quickly determine whether the target hash value already exists in the set. If the target hash value is not in the hash value set, it is determined that there is no article with the same content in the database, and then the target article information is stored in the database. This comparison mechanism based on the hash value set not only reduces the inefficient operation of querying each record in the database one by one, but also improves the accuracy of duplicate data judgment through the uniqueness of the hash value. In addition, the use of the hash value set further simplifies the data retrieval process, reduces the access frequency to the database, improves the efficiency of duplicate removal of official account articles, and significantly reduces the load pressure on the database.

[0032] According to an embodiment of the present application, the method further includes:

[0033] When the target hash value does not exist in the hash value set, add the target hash value to the hash value set.

[0034] In this embodiment, by adding the target hash value to the hash value set when the target hash value does not exist in the hash value set, the hash value set is always synchronized with the article information in the database, and can reflect the latest status of the articles in the database in real time. By dynamically maintaining the hash value set, when processing new articles subsequently, it can more quickly and accurately determine whether the target article is duplicate content.

[0035] In a second aspect, the present application provides a public account information acquisition device, which includes:

[0036] An acquisition module, configured to acquire target article information published by a target public account according to a preset rule;

[0037] A judgment module, configured to judge whether the target article information exists in the database through a Bloom filter;

[0038] A calculation module, configured to calculate a target hash value corresponding to the target article information when the Bloom filter determines that the target article information exists in the database;

[0039] A storage module, configured to store the target article information in the database when the hash value corresponding to the historical article information stored in the database is different from the target hash value.

[0040] The public account information acquisition method provided by the embodiments of the present application acquires target article information published by a target public account according to a preset rule; judges whether the target article information exists in the database through a Bloom filter; calculates a target hash value corresponding to the target article information when the Bloom filter determines that the target article information exists in the database; and stores the target article information in the database when the hash value corresponding to the historical article information stored in the database is different from the target hash value. The embodiments of the present application quickly judge the target article information through a Bloom filter, can determine whether the article may already exist in the database in an extremely short time. When the Bloom filter determines that the target article may exist in the database, further calculate the hash value of the target article and compare it with the historical article hash value stored in the database to verify the judgment result of the Bloom filter, reduce a large number of inefficient repeated query operations directly on the database, improve the efficiency of duplicate removal of public account articles, greatly reduce the load pressure on the database, and effectively reduce the storage of duplicate data.

[0041] In a third aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the public account information acquisition method as described in the first aspect above when executing the computer program.

[0042] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium, on which a computer program is stored, and the computer program implements the public account information acquisition method as described in the first aspect above when executed by a processor.

[0043] In a fifth aspect, the present application provides a computer program product, including a computer program which, when executed by a processor, implements the official account information acquisition method described in the first aspect above.

[0044] One or more of the above technical solutions in the embodiments of the present application have at least one of the following technical effects:

[0045] For the official account information acquisition method provided in the embodiments of the present application, the official account information acquisition method provided in the embodiments of the present application obtains target article information published by a target official account according to a preset rule; determines whether the target article information exists in a database through a Bloom filter; calculates a target hash value corresponding to the target article information when the Bloom filter determines that the target article information exists in the database; and stores the target article information in the database when the hash value corresponding to the historical article information stored in the database is different from the target hash value. By quickly judging the target article information through the Bloom filter, the embodiments of the present application can determine whether the article may already exist in the database in an extremely short time. When the Bloom filter determines that the target article may exist in the database, the hash value of the target article is further calculated and compared with the historical article hash values stored in the database to verify the judgment result of the Bloom filter, reducing a large number of inefficient repeated query operations directly on the database, improving the efficiency of duplicate removal of official account articles, greatly reducing the load pressure on the database, and effectively reducing the storage of duplicate data.

[0046] Furthermore, by obtaining the name of the official account to be matched input by the user, if there is no exactly matching official account on the target platform, multiple candidate official accounts are further matched from the platform, and an algorithm is used to quantify the similarity between the name of the official account to be matched and the names of the candidate official accounts. Based on the similarity level, the target official account that most conforms to the user's intention can be accurately screened out, improving the accuracy of determining the target official account.

[0047] Furthermore, by using a deep learning model to extract the first word vector of the name of the official account to be matched and the second word vectors of the names of multiple candidate official accounts respectively, text information can be converted into a dense vector form, capturing the semantic features of the vocabulary, making names with similar semantics closer in the vector space. Based on these word vectors, the similarity between the official account to be matched and the candidate official accounts is calculated, and the target official account that most conforms to the user's intention is screened out by quantifying the semantic similarity, improving the accuracy and efficiency of official account matching.

[0048] Furthermore, by normalizing the dimension representing the length of the official account name to enhance the extracted word vectors, the influence of name length differences on the word vectors can be reduced, enabling the similarity calculation to focus more on semantic features rather than simply the number of words. The enhanced word vectors obtained through the normalization process can more accurately reflect the semantic connotations of the official account names. Using cosine similarity as the measurement criterion to calculate the similarity between the enhanced first word vector and the second word vector can further capture semantic similarities, not only improving the accuracy of target official account determination but also enhancing the adaptability to official account names of different lengths.

[0049] Furthermore, when the Bloom filter determines that the target article does not exist in the database, it indicates that the target article is new content. The target article can be stored in the database, reducing the possibility of duplicate article storage. Moreover, adding the target article information to the Bloom filter can provide the latest reference basis for subsequent duplicate checking, enabling the Bloom filter to maintain the recognition ability of the latest data and reducing misjudgments caused by data lag.

[0050] Furthermore, by obtaining a preset set of hash values that contains the hash values corresponding to all historical article information in the database and comparing the target hash value of the target article with the set of hash values, it can be quickly determined whether the target hash value already exists in the set. If the target hash value is not in the set of hash values, it is determined that there is no article with the same content in the database, and then the target article information is stored in the database. This comparison mechanism based on the set of hash values not only reduces the inefficient operation of querying each record in the database one by one but also improves the accuracy of duplicate data judgment through the uniqueness of the hash values. In addition, the use of the set of hash values further simplifies the data retrieval process, reduces the access frequency to the database, improves the efficiency of duplicate removal of official account articles, and significantly reduces the load pressure on the database.

[0051] Furthermore, when the target hash value does not exist in the set of hash values, by adding the target hash value to the set of hash values, the set of hash values can always be synchronized with the article information in the database, enabling it to reflect the latest status of the articles in the database in real time. By dynamically maintaining the set of hash values, it is possible to more quickly and accurately determine whether the target article is duplicate content when processing new articles subsequently.

[0052] Additional aspects and advantages of the present application will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present application. Brief Description of the Drawings

[0053] To more clearly illustrate the technical solutions of the embodiments of the present application, the accompanying drawings required for the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.

[0054] Figure 1 It is a schematic flowchart of the public account information acquisition method provided by the embodiments of the present application;

[0055] Figure 2 It is a schematic diagram of the implementation principle of the Bloom filter provided by the embodiments of the present application;

[0056] Figure 3 It is one of the schematic diagrams of the scenario examples provided by the embodiments of the present application;

[0057] Figure 4 It is the second of the schematic diagrams of the scenario examples provided by the embodiments of the present application;

[0058] Figure 5 It is a schematic structural diagram of the public account information acquisition device provided by the embodiments of the present application;

[0059] Figure 6 It is a schematic structural diagram of the electronic device provided by the embodiments of the present application. Specific embodiments

[0060] The technical solutions in the embodiments of the present application will be clearly described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope protected by the present application.

[0061] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are usually of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally means an "or" relationship between the associated objects before and after.

[0062] Many applications achieve information integration and sharing by obtaining official account articles. For example, some news aggregation applications automatically obtain official account articles, classify and organize their content, and provide users with more comprehensive and convenient information services. Some academic research institutions also obtain official account articles to analyze the hot topics and trend changes that the public is concerned about, so as to provide data support for relevant research. The obtained article data needs to be further processed and stored for subsequent analysis and application.

[0063] In the related art, when processing data for storage, in order to avoid storing duplicate content, a deduplication strategy of repeatedly querying the database to confirm whether the obtained article exists is adopted. Specifically, after each article is obtained, the key information of the article (such as the title, abstract, etc.) is used as a query condition to send a query request to the database. If the query result shows that the article already exists in the database, it will not be stored repeatedly; otherwise, the content of the newly obtained article will be stored in the database. Although this deduplication strategy can effectively avoid duplicate storage, due to the large number and frequent updates of official account articles, repeated queries need to be performed after each acquisition, resulting in a large number of invalid requests being sent to the database. When the scale of the acquisition task is large, these invalid requests will flood into the database like a tide, causing a huge load pressure on the database server. In the long run, it will not only affect the performance of the database, reduce the query and storage efficiency, but also may cause the database to malfunction or even crash.

[0064] This application considers that if the obtained article information can be quickly judged through a Bloom filter, it can be determined whether the article may already exist in the database in a very short time. When the Bloom filter determines that the article may exist in the database, the hash value of the target article is further calculated and compared with the hash values of the historical articles stored in the database to verify the judgment result of the Bloom filter. Then, it is expected to solve the problem in the related art that a large number of invalid requests are sent to the database after each acquisition, resulting in a huge load pressure on the database server.

[0065] The following will combine the accompanying drawings to elaborate in detail on the official account information acquisition method, device, and storage medium provided by the embodiments of this application through specific embodiments and their application scenarios.

[0066] Among them, the official account information acquisition method can be applied to a terminal, and specifically can be executed by the hardware or software in the terminal.

[0067] The terminal includes, but is not limited to, portable communication devices such as mobile phones or tablet computers having a touch-sensitive surface (e.g., a touch screen display and / or a touchpad). It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer having a touch-sensitive surface (e.g., a touch screen display and / or a touchpad).

[0068] In the following embodiments, terminals including a display and a touch-sensitive surface are described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse, and a joystick.

[0069] The method for obtaining official account information provided in the embodiments of the present application may be executed by an electronic device or a functional module or functional entity in the electronic device capable of implementing the method. The electronic devices mentioned in the embodiments of the present application include, but are not limited to, mobile phones, tablet computers, computers, cameras, wearable devices, etc. Hereinafter, the method for obtaining official account information provided in the embodiments of the present application will be described by taking the electronic device as the execution subject.

[0070] As Figure 1 shown, the method for obtaining official account information includes: step 110, step 120, step 130, and step 140.

[0071] Step 110: Obtain the target article information published by the target official account according to a preset rule.

[0072] In the embodiments of the present application, an official account is a content publishing account created and operated by an individual, an enterprise, or an institution on various Internet platforms. These accounts transmit information, provide services, or promote brands to users by publishing content in the form of articles, videos, pictures, etc. One of the core functions of an official account is content distribution and user interaction.

[0073] Taking the WeChat official account as an example, this is the earliest well-known form of official account. The WeChat official account has attracted a large number of creators and institutions to settle in with its strong user base and convenient reading experience. The content types of WeChat official accounts are rich and diverse, covering multiple fields such as news, life services, entertainment, education, and technology. For example, the "People's Daily" official account focuses on authoritative news reports, "XX Doctor" provides professional health knowledge and medical consultation services, and "XX Technology" focuses on in-depth reports in the technology industry. These WeChat official accounts have attracted a large number of users' attention with their professionalism and diversity and have become an important channel for people to obtain information.

[0074] In addition to being a WeChat official account, an official account may also be other types of official accounts, such as Alipay service accounts, Weibo certified accounts, Douyin enterprise accounts, Xiaohongshu brand accounts, Toutiao accounts, etc. The present application does not make any limitations in this regard.

[0075] The massive content of the official account brings the need for information integration and analysis. By obtaining the articles published by the official account, the scattered information can be centralized, facilitating users to quickly obtain the required content. Moreover, by analyzing the article content, hot topics and user preferences can be understood, providing data support for market research or public opinion analysis. In addition, the obtained articles can also be used to build a personalized content recommendation system to help users discover more interesting content.

[0076] In the embodiments of the present application, the Python language can be used in combination with web crawler technology to obtain the article list of the target official account by simulating browser requests or calling the API (Application Programming Interface) of the official account. Then, the articles that meet the conditions are screened out according to the preset rules, and the detailed content of the articles is further extracted. The target article information can be the content of the target article or the link of the target article, such as the URL (Uniform Resource Locator) of the target article.

[0077] In some embodiments, the preset rules define how to obtain the article information published by the target official account. For example, the preset rules can be keyword screening, filtering according to the keywords in the article title or content of the target official account, and selecting the articles that contain or do not contain the keywords as the target articles; the preset rules can also be article type screening, judging the article type according to the article title or content of the target official account, and selecting the articles of the preset article type as the target articles; the preset rules can also be time screening. For example, the articles published within a preset time period can be screened as the target articles, or the acquisition time can be set, such as once a week, and the articles published between the previous acquisition and the current acquisition are used as the target articles. Of course, the preset rules can also be other rules, and the embodiments of the present application do not limit this.

[0078] It should be noted that in the embodiments of the present application, the data acquisition behavior is based on publicly available information sources, and in the process of technical implementation, the rights and wishes of the data owners are fully respected to ensure that the data acquisition process is real, transparent, and reliable, and does not violate the principle of good faith. During the data acquisition process, privacy protection laws and regulations are strictly observed to ensure that any unauthorized personal information is not collected, stored, or transmitted. During the data acquisition process, the terms of use and rules of the platform are strictly observed to avoid overloading the platform server or interfering with the normal service. The data obtained in the embodiments of the present application is only used for legal and legitimate purposes, such as data analysis, research, or providing value-added services, etc.

[0079] Step 120: Determine whether the target article information exists in the database through a Bloom filter.

[0080] After obtaining the target article information from the target public account, it usually needs to be stored in a database for subsequent use. To avoid duplicate storage of the same article information, deduplication is required. Traditional deduplication methods usually directly query the database, which can lead to a large number of invalid requests and a high server load.

[0081] In the embodiments of the present application, a Bloom filter can be used for preliminary deduplication. A Bloom filter is a probabilistic data structure with extremely high space efficiency. It uses a bit array and multiple hash functions to determine whether an element exists in a set. The advantages of a Bloom filter are: high space efficiency: A Bloom filter only requires a bit array and a few hash functions to store a large amount of information, occupying less space than other data structures (such as sets); fast query speed: The time complexity of determining whether an element may exist is O(k), where k is the number of hash functions, usually a very small constant.

[0082] The core of a Bloom filter is a bit array and multiple hash functions. When an element is added to the Bloom filter, each hash function calculates an index value and sets the corresponding bit in the bit array to 1. When it is necessary to determine whether an element exists, the Bloom filter calculates multiple index values through the same hash functions and checks whether the bits at these positions are all 1. If all positions are 1, it is considered that the element may exist; if any position is 0, the element must not exist.

[0083] As Figure 2 shown, the length of the bit array of this Bloom filter is N, and all positions are initially set to 0, including three hash functions, hash1, hash2, and hash3. Each hash function maps the input link to a specific position in the bit array. When a link is added to the Bloom filter, two hash functions calculate the corresponding positions in the bit array for this link and set the values at these positions to 1. For example, after the article link Link1 is calculated by hash1, hash2, and hash3, it corresponds to the 0th, 3rd, and N - 1th positions of the bit array respectively, and the values at these three positions are set to 1.

[0084] When it is necessary to determine whether a new link has been stored in the database, the same two hash functions are used to calculate the corresponding positions in the bit array for this article link and check whether the values at these positions are all 1. If all positions are 1, then it can be considered that this article link may already exist in the database (there is a certain probability of false positives). If any position is 0, then we can determine that this article link must not be in the database. In Figure 2In it, after the article link Link2 is calculated through hash1, hash2, and hash3, it corresponds to the 1st, 3rd, and (N - 1)th bits of the bit array respectively. It can be seen that the values of the three positions are all 1. Therefore, according to the rules of the Bloom filter, it can be determined that Link2 may exist in the database.

[0085] For example, for a Bloom filter with a bit array size of 8 bits and 3 hash functions. Initialize the bit array to 00000000. Add the element "article link A". Hash function 1: After calculation, the position 2 is obtained, and the 2nd bit of the bit array is set to 1; Hash function 2: After calculation, the position 4 is obtained, and the 4th bit of the bit array is set to 1; Hash function 3: After calculation, the position 6 is obtained, and the 6th bit of the bit array is set to 1; the bit array becomes: 00101010. Check the element "article link B". Hash function 1: After calculation, the position 2 is obtained, check that the 2nd bit of the bit array is 1; Hash function 2: After calculation, the position 5 is obtained, check that the 5th bit of the bit array is 0; Hash function 3: After calculation, the position 7 is obtained, check that the 7th bit of the bit array is 1; because the 5th bit is 0, it means that "article link B" definitely does not exist. Check the element "article link C". Hash function 1: After calculation, the position 2 is obtained, check that the 2nd bit of the bit array is 1; Hash function 2: After calculation, the position 4 is obtained, check that the 4th bit of the bit array is 1; Hash function 3: After calculation, the position 6 is obtained, check that the 6th bit of the bit array is 1; because all positions are 1, it means that "article link C" may exist, but it cannot be determined. That is to say, the Bloom filter may have false positives, that is, judging non-existent elements as possibly existing. This kind of false positive is called a "false positive". However, the Bloom filter will not have a "false negative", that is, it will not judge existing elements as non-existent.

[0086] Therefore, it can be initially judged whether the target article information exists in the database through the Bloom filter. If the Bloom filter initially judges that the target article information does not exist in the database, then this result is accurate, that is, the target article information does not exist in the database. If the Bloom filter initially judges that the target article information exists in the database, then this result may be incorrect. Therefore, when the Bloom filter judges that the target article information exists in the database, further judgment is required.

[0087] In the embodiment of the present application, the historical article information in the database can be added as an element to the Bloom filter. When the target article information needs to be stored, the Bloom filter is used to query whether there is a corresponding record for the target article information.

[0088] Step 130: When the Bloom filter judges that the target article information exists in the database, calculate the target hash value corresponding to the target article information.

[0089] Since the Bloom filter determines that the target article information exists in the database, this result may be incorrect, so this result needs to be further verified.

[0090] A hash value is a fixed-length string generated by calculating the input data through a hash function. Hash values are usually displayed in hexadecimal or other forms. The hash values obtained by calculating different input data through the same hash function are unique. In theory, the same input data will generate the same hash value, and different input data will obtain different hash values. And the calculation of the hash function is usually very efficient and can quickly generate hash values, which is suitable for processing large amounts of data. Therefore, the hash value of the article information can be calculated through the hash function, and the hash value corresponding to the article information can be used as the unique identifier of the article information.

[0091] In some embodiments, any hash function can be used to generate the hash value of the target article information, such as MD5 (Message Digest Algorithm 5), SHA-1 (Secure Hash Algorithm 1), SHA-256, etc. The embodiments of the present application do not limit the hash function used.

[0092] Step 140: When the hash value corresponding to the historical article information stored in the database is different from the target hash value, store the target article information in the database.

[0093] In the embodiments of the present application, since for the same hash function, different input data will obtain different hash values. Therefore, the same hash function can be used to calculate the target hash value corresponding to the target article information and the hash value corresponding to the historical article information stored in the database, and the target hash value can be compared with the hash value corresponding to the historical article information stored in the database. If the target hash value is different from the hash values corresponding to all the historical article information stored in the database, it can be indicated that the target hash value does not exist in the database, and the target article information can be stored in the database.

[0094] In some embodiments, in order to improve the comparison efficiency, the hash function can be pre-selected to calculate the hash value corresponding to the historical article information stored in the database and store the hash value. When the Bloom filter determines that the target article information exists in the database, the same hash function can be used to calculate the target hash value corresponding to the target article information and compare the stored hash value with the target hash value, without having to repeatedly calculate the hash value corresponding to the historical article information every time a new target article information is obtained, thereby improving the comparison efficiency.

[0095] The method for obtaining official account information provided by the embodiments of the present application includes: obtaining target article information published by a target official account according to a preset rule; determining whether the target article information exists in a database through a Bloom filter; calculating a target hash value corresponding to the target article information when the Bloom filter determines that the target article information exists in the database; and storing the target article information in the database when the hash value corresponding to the historical article information stored in the database is different from the target hash value. The embodiments of the present application quickly determine whether a target article may already exist in a database through a Bloom filter, and can determine whether the target article may exist in the database in a very short time. When the Bloom filter determines that the target article may exist in the database, the hash value of the target article is further calculated and compared with the historical article hash values stored in the database to verify the judgment result of the Bloom filter, reducing a large number of inefficient repeated query operations directly on the database, improving the efficiency of deduplication of official account articles, greatly reducing the load pressure on the database, and effectively reducing the storage of duplicate data.

[0096] In some embodiments, before obtaining the target article information published by the target official account according to the preset rule, it includes:

[0097] Obtaining a to-be-matched official account input by a user;

[0098] When the to-be-matched official account does not exist on the target platform, obtaining multiple candidate official accounts matched from the target platform;

[0099] Calculating the similarity between the name of the to-be-matched official account and the names of the multiple candidate official accounts respectively;

[0100] Screening out the target official account from the multiple candidate official accounts according to the similarity.

[0101] In this embodiment, the user can input the to-be-matched official account to be obtained in the user interface, and determine the target official account to be obtained through the to-be-matched official account input by the user. Since the to-be-matched official account input by the user may not be completely correct, for example, it may be the full name, abbreviation, alias, or input error, etc., it is necessary to further analyze and match the to-be-matched official account.

[0102] In this embodiment, first, the target platform for matching can be determined. The target platform can be preset or selected by the user in the user interface. For example, the target platform can be platforms such as WeChat, Alipay, Douyin, Weibo, etc. The to-be-matched official account input by the user can be matched with the official accounts on the target platform. If the direct matching fails, that is, no completely matching official account is found on the target platform, then multiple candidate official accounts similar to the user input are obtained from the platform.

[0103] For example, the API interface of the target platform can be called to use the built-in search function of the target platform for matching. If the public account to be matched is the same as a certain public account in the target platform, then this public account is determined as the target public account. If there is no public account in the target platform that is the same as the public account to be matched, the top k public accounts recommended by the search function of the target platform can be selected as candidate public accounts. If there is no public account in the target platform that is the same as the public account to be matched, a fuzzy matching strategy can also be adopted. By adding wildcards or using regular expressions, etc., to match public accounts containing the keywords entered by the user, and select the top k public accounts that are most similar to the public account to be matched as candidate public accounts.

[0104] In this embodiment, after obtaining multiple candidate public accounts, the most likely target public account can be further screened out from the multiple candidate public accounts. For this purpose, the similarity between the name of the public account to be matched entered by the user and the names of these candidate public accounts can be calculated, and the target public account can be screened out from the multiple candidate public accounts according to the similarity. For example, the candidate public account with the highest similarity to the name of the public account to be matched can be determined as the target public account; a threshold can also be set, and the candidate public accounts with a similarity higher than this threshold can be determined as the target public accounts. If there is only one candidate public account with a similarity higher than this threshold, then this candidate public account can be determined as the target public account. If there are two or more candidate public accounts with a similarity higher than this threshold, these public accounts can be used as the target public accounts, or these candidate public accounts can be fed back to the user through the user interface, and the user determines the final target public account.

[0105] In some embodiments, the similarity calculation can be based on multiple algorithms, such as cosine similarity, Jaccard similarity, or Levenshtein distance, etc. Through the similarity algorithm, the character matching degree and context similarity between the name of the public account to be matched and the names of the candidate public accounts can be quantified, thereby generating a similarity score. The similarity score represents the degree of similarity between each candidate public account and the public account to be matched, and reflects which candidate public accounts are most likely to match the public account to be matched required by the user.

[0106] In this embodiment, by obtaining the name of the public account to be matched entered by the user, if there is no exactly matching public account on the target platform, multiple candidate public accounts are further matched from the platform, and the similarity degree between the name of the public account to be matched and the names of the candidate public accounts is quantified by an algorithm. Based on the high or low similarity, the target public account that most conforms to the user's intention can be accurately screened out, improving the accuracy of determining the target public account.

[0107] In some embodiments, calculating the similarity between the name of the public account to be matched and the names of multiple candidate public accounts respectively includes:

[0108] Extract the first word vector of the name of the public account to be matched through a deep learning model; and extract the second word vectors of the names of multiple candidate public accounts through a deep learning model;

[0109] Calculate the similarity based on the first word vector and the second word vector.

[0110] In this embodiment, a word vector is a method of converting text data into numerical data, and a word vector can capture the semantic relationships between words. A deep learning model can be used to extract the word vectors of the name of the public account to be matched and the names of multiple candidate public accounts. Through the deep learning model, the name of the public account to be matched and the names of candidate public accounts can be converted into vectors in a high-dimensional space, and this vector can represent the semantic information of the name.

[0111] Specifically, a pre-trained Word2Vec model or BERT (Bidirectional Encoder Representations from Transformers) model can be used to extract word vectors. These models have been trained on large-scale text data and can learn the complex relationships between words.

[0112] After obtaining the first word vector of the name of the public account to be matched and the second word vectors of the names of multiple candidate public accounts, the cosine similarity between the first word vector and the second word vector of each candidate public account name can be calculated respectively. The cosine similarity is determined as the similarity between the name of the public account to be matched and the names of multiple candidate public accounts.

[0113] In this embodiment, by using a deep learning model to extract the first word vector of the name of the public account to be matched and the second word vectors of the names of multiple candidate public accounts respectively, the text information can be converted into a dense vector form, capturing the semantic features of the vocabulary, making the names with similar semantics closer in the vector space. Calculating the similarity between the public account to be matched and the candidate public accounts based on these word vectors, and screening out the target public account that best meets the user's intention by quantifying the semantic similarity, improving the accuracy and efficiency of public account matching.

[0114] In some embodiments, calculating the similarity based on the first word vector and the second word vector includes:

[0115] Normalize the dimension representing the length of the public account name in the first word vector to obtain an enhanced first word vector; and normalize the dimension representing the length of the public account name in the second word vector to obtain an enhanced second word vector;

[0116] Determine the cosine similarity between the enhanced first word vector and the enhanced second word vector as the similarity.

[0117] In this embodiment, for example, word vectors extracted by the BERT model have a tensor format of [batchSize, sequenceLength, hiddenSize], where batchSize is the batch size, sequenceLength is the length of the public account name, and hiddenSize is the output dimension of the model's hidden layer. To enhance the matching sensitivity, the vectors in the sequenceLength dimension can be normalized so that the sequenceLength dimension is scaled to a specific range, such as [0, 1], to reduce the impact of name length differences on word vectors and make the similarity calculation focus more on semantic features rather than just the number of characters. For example, the Softmax function can be used for normalization to obtain enhanced word vectors. The mathematical expression of the Softmax function is as follows:

[0118]

[0119] where x represents the elements in the word vector.

[0120] After normalization, the enhanced first word vector and the enhanced second word vector are obtained respectively. The cosine similarity between the enhanced first word vector and the enhanced second word vector can be determined as the similarity between the name of the public account to be matched and the names of multiple candidate public accounts. The calculation method of cosine similarity is as follows:

[0121]

[0122] where S(A, B) represents the cosine similarity between the enhanced first word vector and the enhanced second word vector, E ′ (A) represents the enhanced first word vector, E ′ (B) represents the enhanced second word vector, A i is the i-th element in E ′ (A), B i is the i-th element in E ′ (B), and n represents the length of the vector. The value of S(A, B) ranges from -1 to 1. The closer the value is to 1, the more similar the directions of the two vectors are and the higher the similarity; the closer the value is to -1, the more opposite the directions of the two vectors are and the lower the similarity; a value close to 0 indicates that there is no linear relationship between the two vectors.

[0123] In this embodiment, by normalizing the dimension representing the length of the official account name to enhance the extracted word vectors, the influence of name length differences on the word vectors can be reduced, enabling the similarity calculation to focus more on semantic features rather than simply the number of characters. The enhanced word vectors obtained through the normalization process can more accurately reflect the semantic connotations of the official account names. Using cosine similarity as the measurement criterion to calculate the similarity between the enhanced first word vector and the second word vector can further capture semantic similarities, not only improving the accuracy of target official account determination but also enhancing the adaptability to official account names of different lengths.

[0124] In some embodiments, the method further includes:

[0125] In the case where the Bloom filter determines that the target article information does not exist in the database, the target article information is stored in the database, and the target article information is added to the Bloom filter.

[0126] In this embodiment, if the Bloom filter determines that the target article information does not exist in the database, according to the characteristics of the Bloom filter, this judgment result is accurate, and the target article information can be stored in the database.

[0127] To provide the latest reference basis for subsequent deduplication checks and enable the Bloom filter to maintain the recognition ability for the latest data, the target article information can also be added to the Bloom filter. For example, the hash value of the target article information can be calculated according to the hash function in the Bloom filter, thereby updating the bit array of the Bloom filter. The next time the same article information is encountered, the Bloom filter can quickly determine that the article information already exists in the database, thus reducing duplicate storage.

[0128] In this embodiment, when the Bloom filter determines that the target article does not exist in the database, it indicates that the target article is new content. The target article can be stored in the database, reducing the possibility of duplicate article storage. Moreover, adding the target article information to the Bloom filter can provide the latest reference basis for subsequent deduplication checks, enabling the Bloom filter to maintain the recognition ability for the latest data and reducing misjudgments caused by data lag.

[0129] In some embodiments, in the case where the hash value corresponding to the historical article information stored in the database is different from the target hash value, storing the target article information in the database includes:

[0130] Obtaining a preset set of hash values; the set of hash values includes the hash values corresponding to the historical article information in the database;

[0131] In the case where the target hash value does not exist in the hash value set, it is determined that the hash value corresponding to the historical article information stored in the database is different from the target hash value, and the target article information is stored in the database.

[0132] In this embodiment, the preset hash value set can be established when the database enables the function of storing article information. As new article information is continuously stored in the database, the hash value set will also be continuously updated. For example, for each article information stored in the database, the hash value of the article information can be calculated through a hash function and stored in the hash value set. In this way, the hash value set will be continuously updated and can contain the hash values corresponding to all historical article information stored in the database.

[0133] After the target article information is obtained, due to the characteristics of the Bloom filter, if the Bloom filter determines that the target article information has been stored in the database, this judgment result may be inaccurate. Therefore, it is necessary to further verify this judgment result. Specifically, the target hash value corresponding to the target article information can be calculated through a hash function, and it is checked whether the target hash value exists in the hash value set. If it exists, it means that the target article information is stored in the database and there is no need to store it repeatedly, and the target article information can be discarded; if it does not exist, it means that the target article information is not stored in the database, and the target article information can be stored in the database.

[0134] In this embodiment, by obtaining the preset hash value set, which contains the hash values corresponding to all historical article information in the database, and comparing the target hash value of the target article with the hash value set, it can be quickly determined whether the target hash value already exists in the set. If the target hash value is not in the hash value set, it is determined that there is no article with the same content in the database, and then the target article information is stored in the database. This comparison mechanism based on the hash value set not only reduces the inefficient operation of querying each record in the database one by one, but also improves the accuracy of duplicate data judgment through the uniqueness of the hash value. In addition, the use of the hash value set further simplifies the data retrieval process, reduces the access frequency to the database, improves the efficiency of deduplication of official account articles, and significantly reduces the load pressure on the database.

[0135] In some embodiments, the method further includes:

[0136] In the case where the target hash value does not exist in the hash value set, the target hash value is added to the hash value set.

[0137] In this embodiment, the hash value set stores the hash values corresponding to the article information in the database, which can help quickly determine whether the target article information has been stored in the database. If the target hash value corresponding to the target article information is not in the hash value set, the target hash value can be stored in the hash value set to update the hash value set.

[0138] In this embodiment, by adding the target hash value to the hash value set when the target hash value does not exist in the hash value set, the hash value set is always synchronized with the article information in the database, and can reflect the latest status of the articles in the database in real time. By dynamically maintaining the hash value set, when processing new articles subsequently, it is possible to more quickly and accurately determine whether the target article is duplicate content.

[0139] The following uses a scenario example to introduce the deduplication process in the embodiments of the present application. As Figure 3 shown, after querying an article, the article can be input into a Bloom filter. The Bloom filter is used to determine whether the article exists in the database. If it is determined that it does not exist, the article can be obtained and stored in the database, that is, the article is obtained and stored in the database; if it is determined that it exists, it is necessary to further verify whether the judgment result is correct.

[0140] Specifically, verification can be performed through a Set collection, that is, the hash value set. Calculate the hash value of the article. If the hash value of the article exists in the Set collection, it means that the article has been stored in the database, and the article can be discarded. If the hash value of the article does not exist in the Set collection, it means that the article has not been stored in the database, and the article can be obtained and stored in the database. When obtaining and storing the article in the database, the article can also be added to the Bloom filter to update the Bloom filter, and the hash value of the article can be added to the Set collection to update the Set collection.

[0141] The following uses a scenario example to introduce the application scenario of the public account information acquisition method in the embodiments of the present application. As Figure 4 shown, the user can input the public account name through the user interface, match the target public account from the public account platform according to the public account name matching algorithm, and store the matched target public account in the database. By setting a scheduled task, the public account articles are obtained from the target public account at regular intervals. The deduplication algorithm is used to determine whether the obtained public account articles exist in the database. If they do not exist, the obtained public account articles are stored in the database, and the public account articles are read from the database at regular intervals and pushed to the enterprise WeChat.

[0142] The method for obtaining official account information provided by the embodiments of the present application may be executed by an official account information obtaining device. In the embodiments of the present application, taking the official account information obtaining device executing the official account information obtaining method as an example, the official account information obtaining device provided by the embodiments of the present application is described.

[0143] The embodiments of the present application further provide an official account information obtaining device.

[0144] As Figure 5 shown, the official account information obtaining device includes:

[0145] An obtaining module 510, configured to obtain target article information published by a target official account according to a preset rule;

[0146] A judging module 520, configured to judge whether the target article information exists in the database through a Bloom filter;

[0147] A calculating module 530, configured to calculate a target hash value corresponding to the target article information when the Bloom filter judges that the target article information exists in the database;

[0148] A storage module 540, configured to store the target article information in the database when the hash value corresponding to the historical article information stored in the database is different from the target hash value.

[0149] The method for obtaining official account information provided by the embodiments of the present application includes: obtaining target article information published by a target official account according to a preset rule; judging whether the target article information exists in the database through a Bloom filter; calculating a target hash value corresponding to the target article information when the Bloom filter judges that the target article information exists in the database; storing the target article information in the database when the hash value corresponding to the historical article information stored in the database is different from the target hash value. The embodiments of the present application quickly judge the target article information through a Bloom filter, can determine whether the article may already exist in the database in a very short time. When the Bloom filter determines that the target article may exist in the database, further calculate the hash value of the target article and compare it with the hash value of the historical article stored in the database to verify the judgment result of the Bloom filter, reduce a large number of inefficient repeated query operations directly on the database, improve the efficiency of deduplication of official account articles, greatly reduce the load pressure on the database, and effectively reduce the storage of duplicate data.

[0150] In some embodiments, the obtaining module 510 is further configured to:

[0151] Obtain a to-be-matched official account input by a user;

[0152] When the to-be-matched official account does not exist on the target platform, obtain multiple candidate official accounts from the target platform;

[0153] Calculate the similarity between the name of the public account to be matched and the names of multiple candidate public accounts respectively;

[0154] Screen out the target public account from multiple candidate public accounts according to the similarity.

[0155] In some embodiments, the obtaining module 510 is further configured to:

[0156] Extract the first word vector of the name of the public account to be matched through a deep learning model; and extract the second word vector of the names of multiple candidate public accounts through the deep learning model;

[0157] Calculate the similarity based on the first word vector and the second word vector.

[0158] In some embodiments, the obtaining module 510 is further configured to:

[0159] Normalize the dimension representing the length of the public account name in the first word vector to obtain an enhanced first word vector; and normalize the dimension representing the length of the public account name in the second word vector to obtain an enhanced second word vector;

[0160] Determine the cosine similarity between the enhanced first word vector and the enhanced second word vector as the similarity.

[0161] In some embodiments, the storage module 540 is further configured to:

[0162] In the case that the bloom filter determines that the target article information does not exist in the database, store the target article information in the database and add the target article information to the bloom filter.

[0163] In some embodiments, the storage module 540 is further configured to:

[0164] Obtain a preset set of hash values; the set of hash values includes the hash values corresponding to the historical article information in the database;

[0165] In the case that the target hash value does not exist in the set of hash values, determine that the hash value corresponding to the historical article information stored in the database is different from the target hash value, and store the target article information in the database.

[0166] In some embodiments, the storage module 540 is further configured to:

[0167] In the case that the target hash value does not exist in the set of hash values, add the target hash value to the set of hash values.

[0168] The public account information acquisition device in the embodiments of the present application may be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal or other devices other than terminals. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. It may also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.

[0169] The public account information acquisition device in the embodiments of the present application may be a device with an operating system. The operating system may be the Microsoft (Windows) operating system, the Android operating system, the IOS operating system, or other possible operating systems. The embodiments of the present application do not make specific limitations.

[0170] In some embodiments, as Figure 6 shown, the embodiments of the present application further provide an electronic device 600, including a processor 601, a memory 602, and a computer program stored on the memory 602 and executable on the processor 601. When the program is executed by the processor 601, it implements each process of the above-mentioned embodiment of the public account information acquisition method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0171] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

[0172] The embodiments of the present application further provide a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements each process of the above-mentioned embodiment of the public account information acquisition method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0173] Among them, the processor is the processor in the electronic device in the above embodiments. The readable storage medium includes computer-readable storage media such as computer read-only memory ROM, random access memory RAM, magnetic disks or optical discs, etc.

[0174] An embodiment of the present application further provides a computer program product, including a computer program, which implements the above-mentioned official account information acquisition method when executed by a processor.

[0175] Among them, the processor is the processor in the electronic device in the above embodiments. The readable storage medium includes computer-readable storage media such as computer read-only memory ROM, random access memory RAM, magnetic disks or optical discs, etc.

[0176] Another embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each process of the above-mentioned embodiment of the official account information acquisition method, and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0177] It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, system chip, chip system, or system-on-chip, etc.

[0178] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without more limitations, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0179] Through the description of the above embodiments, those skilled in the art can clearly understand that the above method of the embodiment can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to enable a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.

[0180] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific implementation manners. The above specific implementation manners are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection scope of the present application.

[0181] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic descriptions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0182] Although the embodiments of the present application have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principle and purpose of the present application. The scope of the present application is defined by the claims and their equivalents.

Claims

1. A method for obtaining official account information, characterized in that, Including: Obtain the target article information published by the target official account according to a preset rule; Judge whether the target article information exists in the database through a Bloom filter; When the Bloom filter determines that the target article information exists in the database, calculate the target hash value corresponding to the target article information; When the hash value corresponding to the historical article information stored in the database is different from the target hash value, store the target article information in the database.

2. The method according to claim 1, wherein Before obtaining the target article information published by the target official account according to a preset rule, it includes: Obtain the to-be-matched official account input by the user; When the to-be-matched official account does not exist on the target platform, obtain multiple candidate official accounts from the target platform; Calculate the similarity between the name of the to-be-matched official account and the names of the multiple candidate official accounts respectively; Screen out the target official account from the multiple candidate official accounts according to the similarity.

3. The method according to claim 2, characterized in that, The step of calculating the similarity between the name of the to-be-matched official account and the names of the multiple candidate official accounts respectively includes: Extract the first word vector of the name of the to-be-matched official account through a deep learning model; and extract the second word vectors of the names of the multiple candidate official accounts through a deep learning model; Calculate the similarity based on the first word vector and the second word vector.

4. The method according to claim 3, wherein The step of calculating the similarity based on the first word vector and the second word vector includes: Normalize the dimension representing the length of the official account name in the first word vector to obtain an enhanced first word vector; and normalize the dimension representing the length of the official account name in the second word vector to obtain an enhanced second word vector; Determine the cosine similarity between the enhanced first word vector and the enhanced second word vector as the similarity.

5. The method according to claim 1, wherein The method further includes: When the Bloom filter determines that the target article information does not exist in the database, store the target article information in the database and add the target article information to the Bloom filter.

6. The method according to claim 1, wherein The step of storing the target article information in the database when the hash value corresponding to the historical article information stored in the database is different from the target hash value includes: Obtain a preset hash value set; the hash value set includes the hash values corresponding to the historical article information in the database; When the target hash value does not exist in the hash value set, determine that the hash value corresponding to the historical article information stored in the database is different from the target hash value, and store the target article information in the database.

7. The method according to claim 6, wherein The method further includes: When the target hash value does not exist in the hash value set, add the target hash value to the hash value set.

8. An information acquisition device for public accounts, characterized in that, Including: An obtaining module, configured to obtain the target article information published by the target official account according to a preset rule; A judging module, configured to judge whether the target article information exists in the database through a Bloom filter; A calculating module, configured to calculate the target hash value corresponding to the target article information when the Bloom filter determines that the target article information exists in the database; A storage module, configured to store the target article information into the database when a hash value corresponding to historical article information stored in the database is different from the target hash value.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, the method according to any one of claims 1-7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the method according to any one of claims 1-7 is implemented.