CN113722432A - Method and device for associating news with stocks - Google Patents

Method and device for associating news with stocks Download PDF

Info

Publication number
CN113722432A
CN113722432A CN202110989584.XA CN202110989584A CN113722432A CN 113722432 A CN113722432 A CN 113722432A CN 202110989584 A CN202110989584 A CN 202110989584A CN 113722432 A CN113722432 A CN 113722432A
Authority
CN
China
Prior art keywords
target
stock
news
entity name
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110989584.XA
Other languages
Chinese (zh)
Other versions
CN113722432B (en
Inventor
廖宇康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Longbu Technology Co ltd
Original Assignee
Hangzhou Longbu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Longbu Technology Co ltd filed Critical Hangzhou Longbu Technology Co ltd
Priority to CN202110989584.XA priority Critical patent/CN113722432B/en
Publication of CN113722432A publication Critical patent/CN113722432A/en
Application granted granted Critical
Publication of CN113722432B publication Critical patent/CN113722432B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/38Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/381Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using identifiers, e.g. barcodes, RFIDs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Library & Information Science (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application provides a news and stock association method and device, relates to the technical field of information, and aims to solve the problem that the efficiency of associating news and stocks in the related technology is low. The news and stock association method comprises the following steps: acquiring target news; determining a target identification associated with a stock in the target news; determining a target stock corresponding to the target identifier based on the target identifier and a pre-established knowledge base, and associating the target news with the target stock; wherein the knowledge base comprises an association rule of the stock and the identifier associated with the stock.

Description

Method and device for associating news with stocks
Technical Field
The application belongs to the technical field of information, and particularly relates to a news and stock association method and device.
Background
With the development of the internet and the stock market, a great deal of news information is emerging. It is important to present news information associated with the stock to the user.
In the related art, news and stocks are typically associated by manually establishing a mapping relationship between the news and the stocks, so that users can conveniently view news information associated with the stocks.
However, this approach has the problem of inefficiency in associating news with stocks.
Disclosure of Invention
The embodiment of the application provides a method and a device for associating news with stocks, and solves the problem that the efficiency of associating news with stocks in the related technology is low.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a method for associating news with stocks, including:
acquiring target news;
determining a target identification associated with a stock in the target news;
determining a target stock corresponding to the target identifier based on the target identifier and a pre-established knowledge base, and associating the target news with the target stock;
wherein the knowledge base comprises an association rule of the stock and the identifier associated with the stock.
In a second aspect, an embodiment of the present application provides an apparatus for associating news with stocks, including:
the acquisition module is used for acquiring target news;
a determining module, configured to determine a target identifier associated with a stock in the target news;
the determining module is further used for determining a target stock corresponding to the target identifier based on the target identifier and a pre-established knowledge base, and associating the target news with the target stock;
wherein the knowledge base comprises an association rule of the stock and the identifier associated with the stock.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, and a computer program stored on the memory and running on the processor, where the computer program, when executed by the processor, implements the steps of the news and stock association method according to the first aspect.
In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the news-stock association method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method for associating news with stocks according to the first aspect.
According to the association method of news and stock, the target news is obtained; determining a target identification associated with a stock in the target news; determining a target stock corresponding to the target identifier based on the target identifier and a pre-established knowledge base, and associating the target news with the target stock; wherein the knowledge base comprises an association rule of the stock and the identifier associated with the stock. Therefore, in the association process of news and stocks, the target stocks associated with the target news can be quickly acquired by using the knowledge base containing a large number of association rules, and the efficiency of associating the news and the stocks is improved.
Drawings
The above and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a schematic flow chart diagram of a method for associating news with stocks provided by an embodiment of the application;
FIG. 2 is a schematic flow chart diagram of another news and stock association method provided by the embodiment of the application;
FIG. 3 is a schematic flow chart diagram of another news and stock association method provided by the embodiment of the application;
FIG. 4 is a schematic flow chart diagram of another news and stock association method provided by the embodiment of the application;
fig. 5 is a schematic structural diagram of a news and stock association device provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The features of the terms first and second in the description and in the claims of the present application may explicitly or implicitly include one or more of such features. In the description of the present application, "a plurality" means two or more unless otherwise specified. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
In the description of the present application, it is to be noted that the terms "connected" and "connected," unless otherwise specifically stated or limited, are to be construed broadly, e.g., as meaning directly connected to one another, indirectly connected through an intermediary, and communicating between two elements. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
Exemplary embodiments of the present application will be described in more detail below with reference to fig. 1-6.
Fig. 1 is a schematic flow chart of a method for associating news with stocks provided by an embodiment of the present application.
As shown in fig. 1, a method for associating news with stocks provided by an embodiment of the present application may include:
step 110: acquiring target news;
step 120: determining a target identification associated with a stock in the target news;
step 130: determining a target stock corresponding to the target identifier based on the target identifier and a pre-established knowledge base, and associating the target news with the target stock;
wherein the knowledge base comprises an association rule of the stock and the identifier associated with the stock.
In step 110, the target news may be any news information associated with the stock. For example, the target news may be news that is distributed via television, radio, newspapers, magazines, internet advertising media, and the like. For example, the target news may be any news such as political news, economic news, legal news, military news, scientific news, cultural news, sports news, or social news according to the news content category, and the present application is not particularly limited.
In step 110, the obtaining of the target news may be obtaining target news pre-stored by the mobile terminal, or obtaining target news downloaded from the internet in a networked state, which is not limited in this application.
In step 120, the target identification associated with the stock may be the target identification associated with the stock extracted from the target news. The target identification associated with the stock may include at least one of: stock names, stock codes, the specific contents of stocks, or the names of entities related to stocks, etc. For example, entity names associated with stocks may include: the name of a company, the name of a legal person, the name of a company product, and the like, and the present application is not particularly limited. The name of the company may be a formal name of the company or an alternative name of the company. For example, if key words such as "arbiba", "marcloud", or "pay for your money" are extracted from the target news, the "arbiba", "marcloud", or "pay for your money" may be used as the target identifier associated with the stock in the target news.
In step 120, the application does not specifically limit the specific way of extracting the target identifier associated with the stock in the target news. For example, in one specific embodiment, the target identifiers associated with stocks in the target news may be obtained by extracting and recognizing keywords. In another specific embodiment, where the target identification is an entity name, the entity name associated with the stock in the target news may also be automatically extracted by entering the target news into an entity name recognition model. Of course, the target identification associated with the stock in the target news can be extracted by other methods. And will not be described in detail herein.
In step 130, the knowledge base is a pre-established set of association rules that contain stocks and the identities associated with the stocks. The association rule for a stock and an identifier associated with the stock may include a mapping relationship of the stock and the identifier associated with the stock. Thus, the target stock corresponding to the target identifier is determined based on the target identifier and a pre-established knowledge base. And, since the knowledge base contains a large number of association rules, the knowledge base containing a large number of entity names and association rules of stocks can be used to quickly acquire the target stocks associated with the target news.
For example, if there is an association rule between the stock "Alibab" and the identifier "Paibao" associated with the stock "Alibab" in the knowledge base, the target stock "Alibab" corresponding to the target identifier may be determined based on the target identifier "Paibao" and a pre-established knowledge base.
The method for associating news with stocks, provided by the embodiment of the application, comprises the steps of obtaining target news; determining a target identification associated with a stock in the target news; determining a target stock corresponding to the target identifier based on the target identifier and a pre-established knowledge base, and associating the target news with the target stock; wherein the knowledge base comprises an association rule of the stock and the identifier associated with the stock. Therefore, in the association process of news and stocks, the target stocks associated with the target news can be quickly acquired by using the knowledge base containing a large number of association rules, and the efficiency of associating the news and the stocks is improved.
The above mentions that the target stock associated with the target news is quickly obtained using a knowledge base containing a large number of association rules. The following describes an example of a specific process for determining a target stock from a knowledge base.
In a specific embodiment, in the step 130, the determining, based on the target identifier and a pre-established knowledge base, the target stock corresponding to the target identifier includes:
searching a target association rule corresponding to the target identification in the pre-established knowledge base;
and if the target association rule corresponding to the target identifier is found in the pre-established knowledge base, determining the target stock corresponding to the target identifier based on the target association rule.
It can be appreciated that the target association rule includes a mapping of the target identification to the target stock. If the target association rule corresponding to the target identifier is found in the pre-established knowledge base, the target stock corresponding to the target identifier can be determined based on the mapping relationship between the target identifier and the target stock included in the target association rule.
For example, if a target association rule corresponding to a target identifier "pay for Bao" is found in a pre-established knowledge base, where the target association rule includes a mapping relationship between the target identifier "pay Bao" and a target stock "Ali Bao", the target stock "Ali Bao" corresponding to the target identifier may be determined based on the target identifier "pay Bao" and the pre-established knowledge base.
To facilitate understanding, in a specific embodiment, the target identifier includes an entity name, and based on this, in the step 120, the determining the target identifier associated with the stock in the target news includes: an entity name associated with a stock in the target news is determined.
Wherein the entity name comprises at least one of: the name of the company, the name of the legal person, and the name of the company product.
Accordingly, in the step 130, the determining the target stock corresponding to the target identifier based on the target identifier and the pre-established knowledge base includes:
determining a target stock corresponding to the entity name based on the entity name and a pre-established knowledge base;
wherein the knowledge base comprises association rules of stocks and entity names associated with the stocks.
Therefore, in the association process of news and stocks, the target stocks associated with the target news can be quickly acquired by using the knowledge base containing a large number of association rules of stocks and entity names, and the efficiency of associating the news and the stocks is improved.
In addition, in order to improve efficiency and accuracy of extracting an entity name from target news, in the association method of news and stocks provided by the embodiment of the application, the determining the entity name associated with the stock in the target news may include:
step 210: acquiring an entity name identification model;
step 220: identifying and obtaining an entity name associated with the stock in the target news based on the target news and the entity name identification model; the entity name recognition model is a model obtained by training in advance by using a deep learning method.
In step 210, the entity name recognition model may be a model previously trained by a deep learning method. The obtaining of the entity name recognition model may specifically be obtaining an entity name recognition model pre-stored in the mobile terminal, or obtaining an entity name recognition model delivered from the cloud server.
In step 210, the entity name recognition model may be trained by using the news data labeled with the entity name to train the neural network language model based on the pre-trained neural network language model, so as to obtain the entity name recognition model. Of course, the training mode may be other modes, and the present application is not limited in particular.
It can be understood that, since the entity name recognition model can be obtained by training in advance by using a deep learning method, the accuracy of recognizing the entity name from the target news is higher.
In step 220, the target news may be input into the entity name recognition model, and the entity names in the target news are directly recognized. Compared with a mode of extracting keywords, the method has fewer identification steps, and the efficiency of extracting the entity name is further improved.
The foregoing mentions that target stocks associated with target news are quickly obtained using a knowledge base of association rules that contains a large number of stocks and target identifications associated with the stocks. The following describes a specific process of establishing a knowledge base in advance by way of example.
Fig. 3 is a schematic flow chart of a method for associating news with stocks provided by an embodiment of the present application.
The following is described specifically by taking fig. 3 as an example. It should be noted that the present application takes stocks in a stock market as an example to establish a knowledge base containing association rules of entity names and stocks. For different securities markets (e.g., U.S. and harbor stocks belong to different securities markets), the present application may establish different knowledge bases, respectively.
In a specific embodiment, in the method for associating news with stocks provided by the embodiment of the present application, the process of establishing the knowledge base may include:
step 310: acquiring a first entity name and a first stock code in a plurality of news;
step 320: determining a confidence level that a first entity name is associated with a first stock based on the first entity name and a first stock code in the plurality of news;
wherein the confidence is the probability of the existence of the first ticketing code in the news under the condition that the first entity name exists in the news, and the calculation formula of the confidence is the probability of the existence of the first ticketing code and the first entity name in the news divided by the probability of the existence of the first entity name in the news;
the first stock is the stock which is uniquely corresponding to the first stock code;
step 330: if the confidence degree of the first entity name associated with the first stock is higher than a threshold value, determining an association rule of the first entity name and the first stock, and adding the association rule of the first entity name and the first stock into a knowledge base;
wherein the association rule of the first entity name and the first stock comprises: a mapping of the first entity name to the first stock.
In step 310, for each news item of the plurality of news items, a first entity name and a first ticketing code for each news item may be extracted.
The specific extraction manner for extracting the first entity name from each news is not limited, and the specific content may refer to step 120, which is not described herein again.
The specific extraction manner of extracting the first stock code from each news is not limited. For example, the first stock code in the news may be extracted by a keyword extraction method, the first stock code in the news may be extracted by a stock code extractor, and of course, the first stock code in the news may be extracted by other methods, which is not limited in this application.
For example, "arbibaba" and "baba.us" are extracted from a news article, so that "arbibaba" may be used as the first entity name in the news article and "baba.us" may be used as the first ticketing code in the news article.
Further, it can be appreciated that in a stock market, the first stock code uniquely corresponds to the first stock. For example, the first ticket code "baba. us" uniquely corresponds to the first ticket "arizaba".
In step 320, determining a confidence level that the first entity name is associated with the first stock based on the first entity name and the first stock code in the plurality of news; wherein the confidence level may be used to reflect the degree of association of the first entity name with the first stock code, and a higher degree of association of the first entity name with the first stock code in the news indicates a higher degree of association of the news of the first entity name with the first stock. Specifically, the confidence may be a probability that the first ticketing code exists in the plurality of news if the first entity name exists in the plurality of news, and the calculation formula of the confidence is a probability that the first ticketing code and the first entity name exist in the plurality of news at the same time divided by a probability that the first entity name exists in the plurality of news.
For example, the confidence that entity name B is associated with stock a may be represented by P (stock a | entity name B). Specifically, the calculation formula is as follows: p (stock a | entity name B) ═ P (stock a, entity name B)/P (entity name B).
Where P (stock a | entity name B) represents a probability of occurrence of stock a in a plurality of news in the case where entity name B occurs in the plurality of news, P (stock a, entity name B) represents a probability of presence of news in which stock a and entity name B occur simultaneously in the plurality of news, and P (entity name B) represents a probability of presence of news in which entity name B occurs in the plurality of news.
In step 330, the association rule with confidence above the threshold is added to the knowledge base, so that the accuracy of the association rule in the knowledge base is higher. The threshold is a preset value, such as 0.6, 0.7, or 0.8, or other values, and the application is not limited specifically. For example, adding association rules with confidence higher than 0.8 to the knowledge base makes the association rules in the knowledge base more accurate.
Furthermore, as the amount of news obtained in step 310 increases, the confidence that the entity name in each association rule associates with the stock changes. Based on this, after step 330, the application may further update the confidence of the entity name associated stock in the association rule in the knowledge base, and delete the association rule with the updated confidence smaller than the threshold from the knowledge base, so as to further improve the accuracy of the association rule in the knowledge base.
Moreover, the coverage rate of the association rules mined by a large amount of news data on the number of stocks and the number of entity names is higher, and the accuracy of the association rules in the knowledge base under the analysis of big data is further improved.
Compared with the method for manually building the knowledge base, the method for identifying the target stocks corresponding to the target news has the advantages that the number of the stocks and the number of the entity names in the knowledge base are larger, so that the coverage rate of the knowledge base on the news is wider, and the efficiency of identifying the target stocks corresponding to the target news by using the knowledge base can be further improved.
Further, since in a stock market, stock codes uniquely correspond to stocks. Under the condition that stock codes exist in the target news, stocks are obtained without being identified by a knowledge base, stocks which are uniquely corresponding to the stock codes existing in the target news can be directly used as target stocks, and the target stocks are associated with the target news, so that the efficiency of associating the target stocks with the target news is further improved. The following description will be made specifically by taking fig. 4 as an example.
Fig. 4 is a schematic flow chart of a method for associating news with stocks provided by an embodiment of the present application.
As shown in fig. 4, before obtaining the entity name in the target news, the method for associating news with stocks provided by the embodiment of the present application may further include:
step 410: determining whether a stock code exists in the target news;
step 420: if the stock code exists in the target news, determining a second stock uniquely corresponding to the stock code; the second stock is taken as the target stock.
In step 410, whether stock codes exist in the target news may be determined by whether stock codes are extracted from the target news. The specific way of extracting the stock codes from the target news can refer to step 310, and is not described herein.
It can be understood that if a stock code is determined to exist in the target news, a second stock uniquely corresponding to the stock code can be directly determined; the second stock is taken as the target stock and the target stock is associated with the target news. If it is determined that no stock codes exist in the target news, the operation of determining the entity name associated with the stocks in the target news can be continuously performed.
Based on this, the method for associating news with stocks provided by the embodiment of the present application may further include:
step 430: associating the target stock with the target news.
Wherein step 430 may be performed after step 420.
Thus, under the condition that the stock codes are extracted from the target news, the stock uniquely corresponding to the stock codes in the target news can be directly used as the target stock without using a knowledge base to determine the target stock, and the target stock is associated with the target news, so that the efficiency of associating the target stock with the target news is further improved.
In addition, in practical applications, after the target news is associated with the target stock, the method for associating news with stock provided by the embodiment of the application may further include:
displaying the target stock in response to a selection operation of a user on an interface of the target news;
or responding to the selection operation of the user aiming at the interface of the target stock, and displaying the target news.
It can be appreciated that after the target news is associated with the target stock, a link to the target stock can be displayed on the interface for the target news. The selection operation of the user for the interface of the target news can be a click operation of the user for a link of the target stock on the interface of the target news. Thereby facilitating the user to view the target stock from the target news interface.
Similarly, after the target news is associated with the target stock, a link to the target news may be displayed on the interface of the target stock. The selection operation of the user for the interface of the target stock may be a click operation of the user for a link of the target news on the interface of the target stock. Thereby facilitating the user to view the target news from the interface of the target stock.
It should be noted that, in the method for associating news with stocks provided in the embodiment of the present application, the execution subject may be a device for associating news with stocks, or a control module in the device for associating news with stocks, for executing the method for associating news with stocks. In the embodiment of the present application, a method for associating news with stocks is performed by an association apparatus for news with stocks, and the association apparatus for news with stocks provided in the embodiment of the present application is described.
Fig. 5 is a schematic structural diagram of a news and stock association apparatus according to an embodiment of the present application.
As shown in fig. 5, an embodiment of the present application provides a news and stock association apparatus, which may include:
an obtaining module 501, configured to obtain target news;
a determining module 502, configured to determine a target identifier associated with a stock in the target news;
the determining module 502 is further configured to determine a target stock corresponding to the target identifier based on the target identifier and a pre-established knowledge base, and associate the target news with the target stock; wherein the knowledge base comprises an association rule of the stock and the identifier associated with the stock.
The device for associating news with stocks, provided by the embodiment of the application, can comprise an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring target news; a determining module, configured to determine a target identifier associated with a stock in the target news; the determining module is further used for determining a target stock corresponding to the target identifier based on the target identifier and a pre-established knowledge base, and associating the target news with the target stock; wherein the knowledge base comprises an association rule of the stock and the identifier associated with the stock. Therefore, in the association process of news and stocks, the target stocks associated with the target news can be quickly acquired by using the knowledge base containing a large number of association rules, and the efficiency of associating the news and the stocks is improved.
Optionally, in the apparatus for associating news with stocks provided in the embodiment of the present application, the determining module is specifically configured to:
searching a target association rule corresponding to the target identification in the pre-established knowledge base;
if the target association rule corresponding to the target identification is found in the pre-established knowledge base, determining the target stock corresponding to the target identification based on the target association rule
Optionally, in the news and stock association apparatus provided in this embodiment of the present application, the target identifier includes an entity name, where the entity name includes at least one of the following: the name of the company, the name of the legal person, and the name of the company product;
the determining module is specifically configured to: an entity name associated with a stock in the target news is determined.
Optionally, in the apparatus for associating news with stocks provided in this embodiment of the present application, during the process of establishing the knowledge base:
the obtaining module is further configured to: acquiring a first entity name and a first stock code in a plurality of news;
the determination module is further to: determining a confidence level that a first entity name is associated with a first stock based on the first entity name and a first stock code in the plurality of news; wherein the confidence is the probability of the existence of the first ticketing code in the news under the condition that the first entity name exists in the news, and the calculation formula of the confidence is the probability of the existence of the first ticketing code and the first entity name in the news divided by the probability of the existence of the first entity name in the news; the first stock is the stock which is uniquely corresponding to the first stock code;
the determination module is further to: and if the confidence degree of the first entity name associated with the first stock is higher than a threshold value, determining an association rule of the first entity name and the first stock, and adding the association rule of the first entity name and the first stock into a knowledge base.
Alternatively, in the news and stock association device provided in the embodiment of the present application,
the determining module is specifically configured to:
acquiring an entity name identification model;
identifying and obtaining an entity name associated with the stock in the target news based on the target news and the entity name identification model; the entity name recognition model is a model obtained by training in advance by using a deep learning method.
Alternatively, in the news and stock association device provided in the embodiment of the present application,
the determining module is further configured to:
determining whether a stock code exists in the target news;
if the stock code exists in the target news, determining a second stock uniquely corresponding to the stock code; the second stock is taken as the target stock.
Optionally, in the apparatus for associating news with stocks provided in this embodiment of the present application, the apparatus for associating news with stocks further includes:
the display module is used for responding to the selection operation of the user aiming at the interface of the target news and displaying the target stock; or, the display module is further configured to display the target news in response to a selection operation of the user on the interface of the target stock.
The device for associating news and stock in the embodiment of the application can be a device, and can also be a component, an integrated circuit or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The news and stock association device in the embodiment of the application can be a device with an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The news and stock association apparatus provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 to 4, and is not described here again to avoid repetition.
Optionally, as shown in fig. 6, an electronic device 600 is further provided in this embodiment of the present application, and includes a processor 601, a memory 602, and a program or an instruction stored in the memory 602 and executable on the processor 601, where the program or the instruction is executed by the processor 601 to implement each process of the above-mentioned news and stock association method embodiment, and can achieve the same technical effect, and in order to avoid repetition, it is not described here again.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned news and stock association method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above-mentioned news and stock association method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A method for associating news with stocks, comprising:
acquiring target news;
determining a target identification associated with a stock in the target news;
determining a target stock corresponding to the target identifier based on the target identifier and a pre-established knowledge base, and associating the target news with the target stock;
wherein the knowledge base comprises an association rule of the stock and the identifier associated with the stock.
2. The association method of claim 1, wherein the determining the target stock corresponding to the target identifier based on the target identifier and a pre-established knowledge base comprises:
searching a target association rule corresponding to the target identification in the pre-established knowledge base;
and if the target association rule corresponding to the target identifier is found in the pre-established knowledge base, determining the target stock corresponding to the target identifier based on the target association rule.
3. The association method according to claim 1 or 2, wherein the target identifier comprises an entity name, wherein the entity name comprises at least one of: the name of the company, the name of the legal person, and the name of the company product;
the determining a target identification associated with a stock in the target news comprises: an entity name associated with a stock in the target news is determined.
4. The association method according to claim 1 or 2, characterized in that the establishing process of the knowledge base comprises:
acquiring a first entity name and a first stock code in a plurality of news;
determining a confidence level that a first entity name is associated with a first stock based on the first entity name and a first stock code in the plurality of news; wherein the confidence is the probability of the existence of the first ticketing code in the news under the condition that the first entity name exists in the news, and the calculation formula of the confidence is the probability of the existence of the first ticketing code and the first entity name in the news divided by the probability of the existence of the first entity name in the news; the first stock is the stock which is uniquely corresponding to the first stock code;
and if the confidence degree of the first entity name associated with the first stock is higher than a threshold value, determining an association rule of the first entity name and the first stock, and adding the association rule of the first entity name and the first stock into a knowledge base.
5. The method of claim 3, wherein determining the name of the entity associated with the stock in the target news comprises:
acquiring an entity name identification model;
identifying and obtaining an entity name associated with the stock in the target news based on the target news and the entity name identification model; the entity name recognition model is a model obtained by training in advance by using a deep learning method.
6. The association method of claim 3, wherein prior to determining the entity name associated with the stock in the target news, the association method further comprises:
determining whether a stock code exists in the target news;
if the stock code exists in the target news, determining a second stock uniquely corresponding to the stock code; the second stock is taken as the target stock.
7. The association method of claim 1, wherein after associating the target news with the target stock, the association method further comprises:
displaying the target stock in response to a selection operation of a user on an interface of the target news;
or responding to the selection operation of the user aiming at the interface of the target stock, and displaying the target news.
8. An apparatus for associating news with stocks, comprising:
the acquisition module is used for acquiring target news;
a determining module, configured to determine a target identifier associated with a stock in the target news;
the determining module is further used for determining a target stock corresponding to the target identifier based on the target identifier and a pre-established knowledge base, and associating the target news with the target stock;
wherein the knowledge base comprises an association rule of the stock and the identifier associated with the stock.
9. An electronic device comprising a processor, a memory, and a computer program stored on the memory and running on the processor, the computer program, when executed by the processor, implementing the steps of the news and stock association method of any one of claims 1-7.
10. A readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the news and stock association method as claimed in any one of claims 1 to 7.
CN202110989584.XA 2021-08-26 2021-08-26 Method and device for associating news with stocks Active CN113722432B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110989584.XA CN113722432B (en) 2021-08-26 2021-08-26 Method and device for associating news with stocks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110989584.XA CN113722432B (en) 2021-08-26 2021-08-26 Method and device for associating news with stocks

Publications (2)

Publication Number Publication Date
CN113722432A true CN113722432A (en) 2021-11-30
CN113722432B CN113722432B (en) 2024-01-09

Family

ID=78678212

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110989584.XA Active CN113722432B (en) 2021-08-26 2021-08-26 Method and device for associating news with stocks

Country Status (1)

Country Link
CN (1) CN113722432B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101311923A (en) * 2007-05-23 2008-11-26 神乎科技股份有限公司 Information sorting retrieval system and method
CN101489187A (en) * 2007-11-05 2009-07-22 捷讯研究有限公司 Method and system for optimizing delivery of mobile content using differential metadata updates
CN105718444A (en) * 2016-01-26 2016-06-29 中国人民解放军国防科学技术大学 Financial concept and corresponding stock associating method based on news corpora and device thereof
CN106682137A (en) * 2016-12-19 2017-05-17 武汉市灯塔互动文化传播有限公司 Intelligent stock investment adviser questioning-answering interaction method and intelligent stock investment adviser questioning-answering interaction system
CN108287819A (en) * 2018-01-12 2018-07-17 深圳市富途网络科技有限公司 A method of realizing that financial and economic news is automatically associated to stock
CN108491502A (en) * 2018-03-21 2018-09-04 腾讯科技(深圳)有限公司 A kind of method, terminal, server and the storage medium of news tracking
AU2018101531A4 (en) * 2018-10-14 2018-11-15 Chang, Zhihan Mr Stock forecast model based on text news by random forest
CN109508386A (en) * 2018-11-07 2019-03-22 福建工程学院 A kind of relevance metric method of stock information press center word and related stock
CN110889024A (en) * 2019-10-25 2020-03-17 武汉灯塔之光科技有限公司 Method and device for calculating information-related stock
US20200311815A1 (en) * 2001-01-22 2020-10-01 Fred Herz Patents, LLC Stock market prediction using natural language processing

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200311815A1 (en) * 2001-01-22 2020-10-01 Fred Herz Patents, LLC Stock market prediction using natural language processing
CN101311923A (en) * 2007-05-23 2008-11-26 神乎科技股份有限公司 Information sorting retrieval system and method
CN101489187A (en) * 2007-11-05 2009-07-22 捷讯研究有限公司 Method and system for optimizing delivery of mobile content using differential metadata updates
CN105718444A (en) * 2016-01-26 2016-06-29 中国人民解放军国防科学技术大学 Financial concept and corresponding stock associating method based on news corpora and device thereof
CN106682137A (en) * 2016-12-19 2017-05-17 武汉市灯塔互动文化传播有限公司 Intelligent stock investment adviser questioning-answering interaction method and intelligent stock investment adviser questioning-answering interaction system
CN108287819A (en) * 2018-01-12 2018-07-17 深圳市富途网络科技有限公司 A method of realizing that financial and economic news is automatically associated to stock
CN108491502A (en) * 2018-03-21 2018-09-04 腾讯科技(深圳)有限公司 A kind of method, terminal, server and the storage medium of news tracking
AU2018101531A4 (en) * 2018-10-14 2018-11-15 Chang, Zhihan Mr Stock forecast model based on text news by random forest
CN109508386A (en) * 2018-11-07 2019-03-22 福建工程学院 A kind of relevance metric method of stock information press center word and related stock
CN110889024A (en) * 2019-10-25 2020-03-17 武汉灯塔之光科技有限公司 Method and device for calculating information-related stock

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱钟元 等: "基于改进正向最大匹配算法的股票资讯新闻自动标注技术", 《宝鸡文理学院学报(自然科学版)》, no. 1, pages 63 - 67 *

Also Published As

Publication number Publication date
CN113722432B (en) 2024-01-09

Similar Documents

Publication Publication Date Title
US11194965B2 (en) Keyword extraction method and apparatus, storage medium, and electronic apparatus
WO2019184217A1 (en) Hotspot event classification method and apparatus, and storage medium
US8095547B2 (en) Method and apparatus for detecting spam user created content
CN110929125B (en) Search recall method, device, equipment and storage medium thereof
CN110362601B (en) Metadata standard mapping method, device, equipment and storage medium
CN107679119B (en) Method and device for generating brand derivative words
CN103136228A (en) Image search method and image search device
CN110765760B (en) Legal case distribution method and device, storage medium and server
CN111310011A (en) Information pushing method and device, electronic equipment and storage medium
CN111783138A (en) Sensitive data detection method and device, computer equipment and storage medium
CN114116997A (en) Knowledge question answering method, knowledge question answering device, electronic equipment and storage medium
CN111984589A (en) Document processing method, document processing device and electronic equipment
CN113127621A (en) Dialogue module pushing method, device, equipment and storage medium
CN110795942B (en) Keyword determination method and device based on semantic recognition and storage medium
CN114244795B (en) Information pushing method, device, equipment and medium
CN110245357B (en) Main entity identification method and device
CN114358979A (en) Hotel matching method and device, electronic equipment and storage medium
CN112487159B (en) Search method, search device, and computer-readable storage medium
CN113779364A (en) Searching method based on label extraction and related equipment thereof
CN112749258A (en) Data searching method and device, electronic equipment and storage medium
CN109101630B (en) Method, device and equipment for generating search result of application program
CN116310994A (en) Video clip extraction method and device, electronic equipment and medium
CN113722432A (en) Method and device for associating news with stocks
CN109977176B (en) Data processing method and device
CN110807322B (en) Method, device, server and storage medium for identifying new words based on information entropy

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant