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

Method and device for associating news with stocks Download PDF

Info

Publication number
CN113722432B
CN113722432B CN202110989584.XA CN202110989584A CN113722432B CN 113722432 B CN113722432 B CN 113722432B CN 202110989584 A CN202110989584 A CN 202110989584A CN 113722432 B CN113722432 B CN 113722432B
Authority
CN
China
Prior art keywords
target
news
stock
entity name
stocks
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.)
Active
Application number
CN202110989584.XA
Other languages
Chinese (zh)
Other versions
CN113722432A (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

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)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Library & Information Science (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 method and a device for associating news with stocks, which relate to the technical field of information and are used for solving the problem of low efficiency of associating news with stocks in the related technology. The method for associating news with stocks comprises the following steps: acquiring target news; determining a target identifier 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 contains association rules of stocks and identifications associated with the stocks.

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 method and a device for associating news with stocks.
Background
With the development of the internet and securities markets, a great deal of news information is emerging. And news information associated with stocks is presented to the user with great significance.
In the related art, news and stocks are generally associated by manually establishing a mapping relationship between news and stocks, so that a user can view news information associated with the stocks.
However, this approach has the problem of inefficient association of news with stocks.
Disclosure of Invention
The embodiment of the application provides a method and a device for associating news with stocks, which solve the problem of low efficiency of associating news with stocks in the related technology.
In order to solve the technical problems, the application is realized 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 identifier 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 contains association rules of stocks and identifications associated with the stocks.
In a second aspect, an embodiment of the present application provides a device for associating news with stocks, including:
the acquisition module is used for acquiring target news;
the determining module is used for determining target identifiers associated with stocks in the target news;
the determining module 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 contains association rules of stocks and identifications associated with the stocks.
In a third aspect, an embodiment of the present application proposes an electronic device, including a processor, a memory, and a computer program stored on the memory and running on the processor, the computer program implementing the steps of the method for associating news with stocks according to the first aspect when executed by the processor.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method for associating news with stocks 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 a method for associating news with stocks according to the first aspect.
According to the news and stock association method, target news is obtained; determining a target identifier 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 contains association rules of stocks and identifications associated with the stocks. In this way, in the process of associating news with stocks, the target stocks associated with the target news can be quickly obtained by utilizing the knowledge base containing a large number of association rules, and the efficiency of associating news with stocks is improved.
Drawings
The foregoing 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, wherein:
FIG. 1 is a schematic flow chart of a method for associating news with stocks provided in an embodiment of the present application;
FIG. 2 is a schematic flow chart of another method for associating news with stocks provided by embodiments of the present application;
FIG. 3 is a schematic flow chart of another method for associating news with stocks provided by embodiments of the present application;
FIG. 4 is a schematic flow chart of another method for associating news with stocks provided by embodiments of the present application;
FIG. 5 is a schematic block 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 provided in 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 or similar reference numerals refer to like or similar elements or elements having like or similar functionality throughout. The embodiments described below by referring 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 made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The features of the terms "first", "second", and the like in the description and in the claims of this application may be used for descriptive or implicit inclusion of one or more such features. In the description of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
In the description of the present application, it should be noted that, unless explicitly stated and limited otherwise, the terms "connected" and "connected" are to be construed broadly, and may be, for example, directly connected or indirectly connected through an intermediate medium, or may be communication between two members. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art in a specific context.
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 according to an embodiment of the present application.
As shown in fig. 1, the method for associating news with stocks provided in the embodiment of the present application may include:
step 110: acquiring target news;
step 120: determining a target identifier 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 contains association rules of stocks and identifications associated with the stocks.
In step 110, the target news may be any piece of news information associated with a stock. For example, the targeted news may be news that is disseminated through television, radio, newspaper, magazine, internet advertising media, and the like. For another example, the target news may be any of political news, economic news, legal news, military news, scientific news, religious news, sports news, or social news according to the news content classification, and the present application is not particularly limited.
In step 110, the target news may be obtained by obtaining target news stored in advance in the mobile terminal, or may be obtained by obtaining target news downloaded from the internet in a network state, which is not particularly limited in this application.
In step 120, the target identity associated with the stock may be a target identity 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, specific content of stocks, or entity names related to stocks, etc. For example, entity names associated with stocks may include: the name of the company, the name of the legal person, the name of the company product, and the like, the present application is not particularly limited. The name of the company may be a formal name of the company or another name of the company. For example, if key words such as "aleba", "horse some", or "payment treasures" are extracted from the target news, the target identifier associated with the stock in the target news may be defined as "aleba", "horse some", or "payment treasures".
In step 120, the present application does not specifically limit the specific extraction manner of the target identifier associated with the stock in the target news. For example, in one particular embodiment, target identifications associated with stocks in target news may be obtained by extracting and identifying keywords. In another specific embodiment, in the case that the target identifier is an entity name, the entity name associated with the stock in the target news may also be automatically extracted by inputting the target news into the entity name identification model. Of course, the present application may also extract the target identifier associated with the stock in the target news in other manners. 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 identifications associated with the stocks. The association rule of a stock and an identity associated with the stock may include a mapping relationship of the stock and the identity associated with the stock. In this way, a target stock corresponding to the target identity is determined based on the target identity 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 association rules of entity names and stocks can be utilized to quickly acquire target stocks associated with target news.
For example, if there is an association rule of the stock "alebab" and the identification "payment treasures" associated with the stock "alebab" in the knowledge base, the target stock "alebab" corresponding to the target identification may be determined based on the target identification "payment treasures" and the knowledge base established in advance.
The method for associating news with stocks comprises the steps of obtaining target news; determining a target identifier 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 contains association rules of stocks and identifications associated with the stocks. In this way, in the process of associating news with stocks, the target stocks associated with the target news can be quickly obtained by utilizing the knowledge base containing a large number of association rules, and the efficiency of associating news with stocks is improved.
It was mentioned above that target stocks associated with target news are quickly obtained using a knowledge base containing a large number of association rules. The specific process of determining a target stock from a knowledge base is described by way of example below.
In a specific embodiment, in 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 identifier in the pre-established knowledge base;
if a target association rule corresponding to the target identifier is found in the pre-established knowledge base, determining target stocks corresponding to the target identifier based on the target association rule.
It can be appreciated that the target association rule includes a mapping relationship of target identifications to target stocks. 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 relation between the target identifier and the target stock contained in the target association rule.
For example, if a target association rule corresponding to a target identifier "payment treasured" is found in a pre-established knowledge base, where the target association rule includes a mapping relationship between the target identifier "payment treasured" and a target stock "alebab", the target stock "alebab" corresponding to the target identifier may be determined based on the target identifier "payment treasured" and the pre-established knowledge base.
For ease of understanding, in a specific embodiment, the target identifier includes an entity name, based on which, in step 120 above, the determining the target identifier associated with the stock in the target news includes: and determining entity names associated with stocks in the target news.
Wherein the entity name comprises at least one of: company name, legal name, and company product name.
Accordingly, in the step 130, determining, based on the target identifier and a pre-established knowledge base, the target stock corresponding to the target identifier 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 contains association rules of stocks and entity names associated with the stocks.
In this way, in the process of associating news with stocks, the target stocks associated with the target news can be quickly acquired by utilizing the knowledge base containing a large number of association rules of stocks and entity names, and the efficiency of associating news with stocks is improved.
In addition, in order to improve efficiency and accuracy of extracting entity names from target news, in the method for associating news with stocks provided in the embodiment of the present application, the determining entity names associated with stocks in the target news may include:
step 210: acquiring an entity name recognition model;
step 220: based on the target news and the entity name recognition model, recognizing and obtaining entity names associated with stocks in the target news; the entity name recognition model is a model which is obtained by training in advance by using a deep learning method.
In step 210, the entity name recognition model may be a model that is trained in advance using a deep learning method. The entity name recognition model obtaining step may specifically be to obtain an entity name recognition model stored in advance in the mobile terminal, or may also be to obtain an entity name recognition model issued from a cloud server.
In step 210, the training manner of the entity name recognition model may be to train the neural network language model by using the news data marked with the entity name on the basis of 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 application is not particularly limited.
It can be appreciated that, since the entity name recognition model can be obtained by training in advance by using the 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 may be directly recognized. Compared with the method for extracting the keywords, the method has fewer steps and further improves the efficiency of extracting the entity names.
It was mentioned above that target stocks associated with target news are quickly obtained using a knowledge base containing a large number of stocks and association rules for target identifications associated with the stocks. The specific procedure of pre-establishing the knowledge base is described by way of example below.
Fig. 3 is a schematic flow chart of a method for associating news with stocks according to an embodiment of the present application.
The following will specifically describe by taking fig. 3 as an example. It should be noted that this application takes stocks of a stock market as an example to build a knowledge base containing association rules of entity names with stocks. For different securities markets (e.g., the beauty and harbor share belong to different securities markets), the application can respectively establish different knowledge bases.
In a specific embodiment, in the method for associating news with stocks provided in the embodiment of the present application, the process for establishing a 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 of the first entity name associated with the first stock based on the first entity name and the first stock code in the plurality of news;
the confidence coefficient is the probability of a first stock code existing in the news when the first entity name exists in the news, and the calculation formula of the confidence coefficient is the probability of the first stock code existing in the news and the first entity name at the same time divided by the probability of the first entity name existing in the news;
wherein, the first stock is the stock uniquely corresponding to the first stock code;
step 330: if the confidence level 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 includes: and the mapping relation between the first entity name and the first stock.
In step 310, for each of a plurality of news, a first entity name and a first stock code in each news may be extracted.
The specific extraction manner of extracting the first entity name from each news is not limited, and specific content can refer to step 120, which is not described herein.
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, and the first stock code in the news may also be extracted by a stock code extractor, and of course, the first stock code in the news may also be extracted by other methods, which is not particularly limited in this application.
For example, "alembia" and "baba.us" are extracted from a piece of news, whereby "alembia" can be taken as the first entity name in the piece of news and "baba.us" can be taken as the first stock code in the piece of news.
Further, it can be appreciated that in a stock market, a first stock code uniquely corresponds to a first stock. For example, the first stock code "baba.us" uniquely corresponds to the first stock "aleba".
In step 320, a confidence that the first entity name is associated with the first stock is determined based on the first entity name and the first stock code in the plurality of news; wherein the confidence level is used to reflect the degree to which the first entity name is associated with the first stock code, and the higher the degree to which the first entity name is associated with the first stock code in the news, the higher the degree to which the news of the first entity name is associated with the first stock. Specifically, the confidence may be a probability that a first stock code exists in the plurality of news in the case that the first entity name exists in the plurality of news, and the calculation formula of the confidence is a probability that the first stock code and the first entity name exist simultaneously in the plurality of news 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 existence 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 existence of news in which entity name B occurs in the plurality of news.
In step 330, association rules with confidence levels higher than a threshold are added to the knowledge base, so that the accuracy of the association rules in the knowledge base is higher. The threshold is a preset value, for example, 0.6, 0.7 or 0.8 or other values, etc., which are not particularly limited in this application. For example, association rules with confidence levels higher than 0.8 are added to the knowledge base, so that the accuracy of the association rules in the knowledge base is higher.
In addition, as the amount of news acquired in step 310 increases, the confidence with which entity names in the respective association rules associate stocks changes. Based on this, after step 330, the present application may further update the confidence level of the entity name associated with the stock in the association rule in the knowledge base, and delete the association rule with the updated confidence level 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 is further improved under the analysis of the large data.
In addition, compared with the manual establishment of the knowledge base, in the method, the coverage rate of the knowledge base on news is wider due to the fact that the number of stocks and the number of entity names in the knowledge base are more, and the efficiency of identifying target stocks corresponding to target news by using the knowledge base can be further improved.
Furthermore, since in one stock market, stock codes uniquely correspond to stocks. Under the condition that stock codes exist in the target news, the stocks can be obtained without using a knowledge base to identify, stocks which uniquely correspond 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 will specifically describe by taking fig. 4 as an example.
Fig. 4 is a schematic flow chart of a method for associating news with stocks according to an embodiment of the present application.
As shown in fig. 4, before acquiring the entity name in the target news, the method for associating news and stocks provided in 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; and taking the second stock as the target stock.
In step 410, it may be determined whether a stock code exists in the target news by means of whether the stock code is extracted from the target news. The specific way to extract the stock code from the target news may refer to step 310, which is not described herein.
It can be appreciated that if it is determined that a stock code exists in the target news, a second stock uniquely corresponding to the stock code may be directly determined; and taking the second stock as the target stock, and associating the target stock with the target news. If it is determined that a stock code does not exist in the target news, operations for determining an entity name associated with a stock in the target news may continue to be performed.
Based on this, the method for associating news with stocks provided in the embodiment of the present application may further include:
step 430: and associating the target stock with the target news.
Wherein step 430 may be performed after step 420.
In this way, under the condition that the stock code is extracted from the target news, the target stock is not required to be determined by utilizing the knowledge base, and the stock uniquely corresponding to the stock code existing in the target news can be directly used as 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 an actual application, after associating the target news with the target stock, the method for associating news with stocks provided in the embodiment of the application may further include:
responding to the selection operation of the user on the interface of the target news, and displaying the target stock;
or, in response to a selection operation of the user interface for the target stock, 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 target news interface. The selection operation of the user for the interface of the target news may 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's view of 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 target stock's interface. 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's view of the target news from the target stock's interface.
It should be noted that, in the method for associating news with stocks provided in the embodiments of the present application, the execution subject may be a device for associating news with stocks, or a control module for executing the method for associating news with stocks in the device for associating news with stocks. In the embodiment of the application, the method for executing the association between news and stock by the association device between news and stock is taken as an example, and the association device between news and stock provided in the embodiment of the application is described.
Fig. 5 is a schematic block diagram of a news and stock association device according to an embodiment of the present application.
As shown in fig. 5, an embodiment of the present application provides a device for associating news with stocks, which may include:
an acquisition module 501, configured to acquire 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, based on the target identifier and a pre-established knowledge base, a target stock corresponding to the target identifier, and associate the target news with the target stock; wherein the knowledge base contains association rules of stocks and identifications associated with the stocks.
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; the determining module is used for determining target identifiers associated with stocks in the target news; the determining module 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 contains association rules of stocks and identifications associated with the stocks. In this way, in the process of associating news with stocks, the target stocks associated with the target news can be quickly obtained by utilizing the knowledge base containing a large number of association rules, and the efficiency of associating news with stocks is improved.
Optionally, in the device 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 identifier in the pre-established knowledge base;
if a target association rule corresponding to the target identifier is found in the pre-established knowledge base, determining a target stock corresponding to the target identifier based on the target association rule
Optionally, in the news and stock associating device provided in the embodiment of the present application, the target identifier includes an entity name, where the entity name includes at least one of the following: company name, legal name, and company product name;
the determining module is specifically configured to: and determining entity names associated with stocks in the target news.
Optionally, in the device for associating news with stocks provided in the embodiment of the present application, in the process of establishing the knowledge base:
the acquisition module is further configured to: acquiring a first entity name and a first stock code in a plurality of news;
the determining module is further configured to: determining a confidence level of the first entity name associated with the first stock based on the first entity name and the first stock code in the plurality of news; the confidence coefficient is the probability of a first stock code existing in the news when the first entity name exists in the news, and the calculation formula of the confidence coefficient is the probability of the first stock code existing in the news and the first entity name at the same time divided by the probability of the first entity name existing in the news; wherein, the first stock is the stock uniquely corresponding to the first stock code;
the determining module is further configured to: if the confidence 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.
Optionally, in the news and stock associating device provided in the embodiment of the present application,
the determining module is specifically configured to:
acquiring an entity name recognition model;
based on the target news and the entity name recognition model, recognizing and obtaining entity names associated with stocks in the target news; the entity name recognition model is a model which is obtained by training in advance by using a deep learning method.
Optionally, in the news and stock associating 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; and taking the second stock as the target stock.
Optionally, in the news and stock associating device provided in the embodiment of the present application, the news and stock associating device further includes:
the display module is used for responding to the selection operation of the user on the interface of the target news and displaying the target stock; or the display module is further used for responding to the selection operation of the interface of the user for the target stock, and displaying the target news.
The device for associating news with stocks in the embodiment of the application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. By way of example, the mobile electronic device may be a cell phone, tablet computer, notebook computer, palm computer, vehicle-mounted electronic device, wearable device, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook or personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device may be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular.
The news and stock associating device in the embodiment of the present application may be a device with an operating system. The operating system may be an Android operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
The news and stock associating device provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 to fig. 4, and in order to avoid repetition, a description is omitted here.
Optionally, as shown in fig. 6, the embodiment of the present application further provides an electronic device 600, including a processor 601, a memory 602, and a program or an instruction stored in the memory 602 and capable of running on the processor 601, where the program or the instruction implements each process of the above-mentioned method embodiment for associating news with stocks when executed by the processor 601, and the same technical effects can be achieved, and for avoiding repetition, a detailed description is omitted herein.
The electronic device in the embodiment of the application includes the mobile electronic device and the non-mobile electronic device described above.
The embodiment of the application also provides a readable storage medium, on which a program or an instruction is stored, where the program or the instruction realizes each process of the above-mentioned method embodiment for associating news with stocks when executed by a processor, and the same technical effects can be achieved, so that repetition is avoided, and no detailed description is given here.
Wherein the processor is a 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 (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
The embodiment of the application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled with the processor, and the processor is used for running a program or an instruction, so that each process of the embodiment of the method for associating news with stocks can be realized, the same technical effect can be achieved, and in order to avoid repetition, the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solutions of the present application may be embodied essentially or in a part contributing to the prior art in the form of a computer software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the methods described in the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.

Claims (8)

1. A method for associating news with stocks, comprising:
acquiring target news;
determining a target identifier 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 contains association rules of stocks and identifications associated with the stocks;
the knowledge base establishment process comprises the following steps: acquiring a first entity name and a first stock code in a plurality of news; determining a confidence level of the first entity name associated with the first stock based on the first entity name and the first stock code in the plurality of news; the confidence coefficient is the probability of a first stock code existing in the news when the first entity name exists in the news, and the calculation formula of the confidence coefficient is the probability of the first stock code existing in the news and the first entity name at the same time divided by the probability of the first entity name existing in the news; wherein, the first stock is the stock uniquely corresponding to the first stock code; if the confidence level 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; updating the confidence coefficient of stock associated with the entity name in the association rule in the knowledge base, and deleting the association rule with the updated confidence coefficient smaller than the threshold value from the knowledge base;
the target identifier includes an entity name, and the determining the target identifier associated with the stock in the target news includes: acquiring an entity name recognition model; based on the target news and the entity name recognition model, recognizing and obtaining entity names associated with stocks in the target news; the entity name recognition model is a model which is obtained by training in advance by using a deep learning method.
2. The association method of claim 1, wherein the determining, based on the target identity and a pre-established knowledge base, a target stock corresponding to the target identity comprises:
searching a target association rule corresponding to the target identifier in the pre-established knowledge base;
if a target association rule corresponding to the target identifier is found in the pre-established knowledge base, determining target stocks corresponding to the target identifier based on the target association rule.
3. The association method according to claim 1, wherein the entity name comprises at least one of: company name, legal name, and company product name.
4. The association method of claim 1, wherein prior to the determining the entity name associated with a 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; and taking the second stock as the target stock.
5. The association method according to claim 1, wherein after the associating the target news with the target stock, the association method further comprises:
responding to the selection operation of the user on the interface of the target news, and displaying the target stock;
or, in response to a selection operation of the user interface for the target stock, displaying the target news.
6. A news and stock association device, comprising:
the acquisition module is used for acquiring target news;
the determining module is used for determining target identifiers associated with stocks in the target news;
the determining module 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 contains association rules of stocks and identifications associated with the stocks;
in the knowledge base establishing process, the obtaining module is further configured to: acquiring a first entity name and a first stock code in a plurality of news; the determining module is further configured to: determining a confidence level of the first entity name associated with the first stock based on the first entity name and the first stock code in the plurality of news; the confidence coefficient is the probability of a first stock code existing in the news when the first entity name exists in the news, and the calculation formula of the confidence coefficient is the probability of the first stock code existing in the news and the first entity name at the same time divided by the probability of the first entity name existing in the news; wherein, the first stock is the stock uniquely corresponding to the first stock code; if the confidence level 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; updating the confidence coefficient of stock associated with the entity name in the association rule in the knowledge base, and deleting the association rule with the updated confidence coefficient smaller than the threshold value from the knowledge base;
the target identifier comprises an entity name, and in the process of determining the target identifier associated with the stock in the target news, the determining module is specifically configured to: acquiring an entity name recognition model; based on the target news and the entity name recognition model, recognizing and obtaining entity names associated with stocks in the target news; the entity name recognition model is a model which is obtained by training in advance by using a deep learning method.
7. An electronic device comprising a processor, a memory and a computer program stored on the memory and running on the processor, which when executed by the processor performs the steps of the method of associating news with stocks according to any one of claims 1 to 5.
8. A readable storage medium, characterized in that it has stored thereon a computer program, which, when executed by a processor, implements the steps of the method for associating news with stocks according to any one of claims 1 to 5.
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 CN113722432A (en) 2021-11-30
CN113722432B true 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 (9)

* 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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8285619B2 (en) * 2001-01-22 2012-10-09 Fred Herz Patents, LLC Stock market prediction using natural language processing

Patent Citations (9)

* 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

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
CN113722432A (en) 2021-11-30

Similar Documents

Publication Publication Date Title
CN110502608B (en) Man-machine conversation method and man-machine conversation device based on knowledge graph
WO2019184217A1 (en) Hotspot event classification method and apparatus, and storage medium
CN107657048B (en) User identification method and device
CN109189888B (en) Electronic device, infringement analysis method, and storage medium
CN110264274B (en) Guest group dividing method, model generating method, device, equipment and storage medium
CN109194689B (en) Abnormal behavior recognition method, device, server and storage medium
US20160140389A1 (en) Information extraction supporting apparatus and method
CN110781284A (en) Knowledge graph-based question and answer method, device and storage medium
CN112632278A (en) Labeling method, device, equipment and storage medium based on multi-label classification
CN113127621A (en) Dialogue module pushing method, device, equipment and storage medium
CN115935344A (en) Abnormal equipment identification method and device and electronic equipment
CN113722438A (en) Sentence vector generation method and device based on sentence vector model and computer equipment
CN112966081A (en) Method, device, equipment and storage medium for processing question and answer information
CN112949297A (en) Intention recognition method, device, computer equipment and computer readable storage medium
CN110795942B (en) Keyword determination method and device based on semantic recognition and storage medium
CN115577172A (en) Article recommendation method, device, equipment and medium
CN114092948B (en) Bill identification method, device, equipment and storage medium
CN114528413A (en) Knowledge graph updating method, system and readable storage medium supported by crowdsourced marking
CN110362826A (en) Periodical submission method, equipment and readable storage medium storing program for executing based on artificial intelligence
CN110991169B (en) Risk content variety identification method and device and electronic equipment
CN110674388A (en) Mapping method and device for push item, storage medium and terminal equipment
CN113722432B (en) Method and device for associating news with stocks
CN111723870A (en) Data set acquisition method, device, equipment and medium based on artificial intelligence
CN116306498A (en) Text rendering method and device
CN113095073B (en) Corpus tag generation method and device, computer equipment and storage medium

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