CN115186198A - Stock market quotation pushing method and related device - Google Patents

Stock market quotation pushing method and related device Download PDF

Info

Publication number
CN115186198A
CN115186198A CN202211098726.4A CN202211098726A CN115186198A CN 115186198 A CN115186198 A CN 115186198A CN 202211098726 A CN202211098726 A CN 202211098726A CN 115186198 A CN115186198 A CN 115186198A
Authority
CN
China
Prior art keywords
stock
market
quotation
data
user
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
CN202211098726.4A
Other languages
Chinese (zh)
Other versions
CN115186198B (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.)
China Cicc Wealth Securities Co ltd
Original Assignee
China Cicc Wealth Securities 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 China Cicc Wealth Securities Co ltd filed Critical China Cicc Wealth Securities Co ltd
Priority to CN202211098726.4A priority Critical patent/CN115186198B/en
Publication of CN115186198A publication Critical patent/CN115186198A/en
Application granted granted Critical
Publication of CN115186198B publication Critical patent/CN115186198B/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/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a stock market quotation pushing method and a related device. The method comprises the following steps: receiving a plurality of subscription stock lists of the plurality of terminal devices in a first action processing period, wherein a single subscription stock list is used for representing stocks subscribed by a user in the first action processing period from user dimensions; updating a pre-configured user subscription list according to the plurality of subscription stock lists; acquiring quotation data of target stocks; and querying the user subscription list to determine a reference user of the target stock, which needs to perform market data synchronization in the first market processing period, and sending the market data of the target stock to a terminal device of the reference user. The method and the system enable the real-time stock quotation push user to locally store the subscription data, the timing pulling, subscribing and cleaning processes and the push stock quotation process are not interfered with each other, and the stability, the availability and the real-time performance of the system are enhanced.

Description

Stock market pushing method and related device
Technical Field
The invention relates to the technical field of computers, in particular to a stock quotation pushing method and a related device.
Background
There are several markets for trading of financial instruments worldwide, with exchanges providing a match-making function and real-time stock market quotations during a defined trading period. The stock company obtains the real-time stock quotation data, forwards and transmits the real-time stock quotation according to the request of the user terminal, and draws and displays the real-time stock quotation on the user terminal.
With the wide application of the intelligent operating system to smart phones, tablet computers and smart televisions, under the scenes of high concurrency and massive terminals, when centralized storage is used, huge pressure exists on data transmission and access, and the stability, availability and real-time performance of the centralized storage can influence the stability, availability and real-time performance of a market system.
Disclosure of Invention
In order to solve the above problems, the present application provides a method and a related device for pushing stock quotations, which push a user to subscribe data for local storage through real-time quotations of stocks, wherein the processes of regularly pulling, subscribing and cleaning do not interfere with the process of pushing stock quotations, and the stability, usability and real-time performance of the system are enhanced.
In a first aspect, the present application example provides a method for pushing a stock market, the method including:
receiving a plurality of subscription stock lists of the plurality of terminal devices in a first action processing period, wherein a single subscription stock list is used for representing stocks subscribed by a user in the first action processing period from user dimensions;
updating a pre-configured user subscription list according to the plurality of subscription stock lists, wherein the user subscription list is used for representing users needing market quotation data synchronization in each market quotation processing period of each stock from stock dimensions;
acquiring quotation data of target stocks;
and querying the user subscription list to determine a reference user of the target stock needing to perform market data synchronization in the first market processing period, and sending the market data of the target stock to a terminal device of the reference user.
In a second aspect, the present application example provides a device for pushing stock quotations, the device includes:
the receiving module is used for receiving a plurality of subscription stock lists of the plurality of terminal devices in a first action processing period, and a single subscription stock list is used for representing stocks subscribed by the user in the first action processing period from the dimension of the user;
the updating module is used for updating a pre-configured user subscription list according to the plurality of subscription stock lists, and the user subscription list is used for representing users needing quotation data synchronization in each quotation processing period of each stock from the stock dimension;
the acquisition module is used for acquiring the market data of the target stock;
and the pushing module is used for inquiring the user subscription list to determine a reference user needing market data synchronization of the target stock in the first market processing period, and sending the market data of the target stock to the terminal equipment of the reference user.
In a third aspect, the present invention provides an electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps in the first aspect of the embodiments of the present application.
In a fourth aspect, embodiments of the present application provide a computer storage medium for storing a computer program for electronic data exchange, wherein the computer program enables a computer to perform some or all of the steps as described in the first aspect of the embodiments of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product comprises a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect of embodiments of the present application.
The application provides a method and a device for pushing stock quotations, electronic equipment and a readable storage medium. The method comprises the following steps: receiving a plurality of subscription stock lists of the plurality of terminal devices in a first action processing period, wherein a single subscription stock list is used for representing stocks subscribed by a user in the first action processing period from user dimensions; updating a pre-configured user subscription list according to the plurality of subscription stock lists; acquiring quotation data of target stocks; and querying the user subscription list to determine a reference user of the target stock needing to perform market data synchronization in the first market processing period, and sending the market data of the target stock to a terminal device of the reference user. By adopting the shared data and the optimization scheme, competition among the read locks and the write locks is reduced, and the storage and the acquisition of the user subscription list can be realized through local calculation. When high concurrency and massive terminals are faced, data are processed reasonably and orderly, the speed is accelerated, a user subscription list does not need to be transmitted through a network, and the stability, the usability and the real-time performance of the whole market pushing system are improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a diagram illustrating a real-time stock quotation display interface according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a stock market pushing method according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a method for pushing stock quotes according to an embodiment of the present application;
FIG. 4a is a comparison table of cycle times provided by an embodiment of the present application;
FIG. 4b is a schematic diagram of a user's stock subscription list collection;
FIG. 4c is a schematic diagram of another user's stock subscription list collection;
FIG. 4d is a time chart for reading and writing real-time stock market information;
fig. 5a is a block diagram illustrating functional units of a stock market pushing device according to an embodiment of the present disclosure;
fig. 5b is a block diagram illustrating functional units of another stock market pushing device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to the listed steps or modules but may alternatively include other steps or modules not listed or inherent to such process, method, article, or apparatus.
Referring to fig. 2, fig. 2 is a schematic flowchart of a stock market quotation pushing method according to an embodiment of the present application, and as shown in fig. 2, the method is applied to a market quotation server in a stock market quotation pushing system, where the stock market quotation pushing system includes the market quotation server and a plurality of terminal devices, and the market quotation server is in communication connection with the plurality of terminal devices; the method comprises the following steps:
step 210, receiving a plurality of subscription stock lists from the plurality of terminal devices in a first action processing period.
The flow chart of the stock real-time quotation system comprises a user equipment terminal, a stock quotation server and a stock real-time quotation source. The stock quotation server comprises a program for processing timing pull and subscription, a program for processing push, a program for timing cleaning a stock list and a shared data memory;
the user terminal interface is shown in fig. 1, fig. 1 is a stock real-time quotation display interface provided by the application, the user terminal is mainly used for displaying user-selected stocks, quotations, trades, financing and personal information of the user on a home page, and as shown in fig. 1, the name, latest price and fluctuation information of the user-selected stocks can be browsed on the home page interface; and stock searching/optional editing operation can be provided for the user, and data interaction is carried out with the stock market server. The terminal in the embodiment of the present application may be a device that includes both receiving and transmitting hardware and a device that has receiving and transmitting hardware capable of performing bidirectional communication on a bidirectional communication link. Such a terminal may include: a cellular or other communication device having a single line display or a multi-line display or a cellular or other communication device without a multi-line display. The specific terminal may be a desktop terminal or a mobile terminal, and the terminal may also be one of a mobile phone, a tablet computer, a notebook computer, and the like; it should be understood that the terminal device is connected with the stock market server through long communication, the two devices can transmit and receive instructions and data, the user can edit the subscription stock list in a searching, adding, reducing and other modes, and the terminal device caches the subscription stock list.
Wherein, the market processing cycle shown in fig. 4a is a time slice, and the time slice is a continuous time slice which is divided in advance and has the same time interval, and the interval is the same as the market processing cycle, and can be 5 seconds, so the market processing cycle is used to replace the time slice in the following;
wherein, the stock real-time quotation source is mainly used for: and collecting the quotation data of each stock which is being traded in the current processing period in each quotation processing period, and sending the real-time quotation data of the target stock to the stock quotation server according to the request of the stock quotation server.
Wherein, stock market server includes: processing a timing pull and subscription program, processing a push program, a timing cleaning program and a shared data memory, wherein the processing timing pull and subscription program executes steps B2, B3 and D2 shown in figure 3 and all the steps of pulling a stock real-time quotation from a stock quotation server and pushing the stock real-time quotation to a terminal; the push program is processed to execute the steps C1, C2 and C3 shown in FIG. 3; the timing cleaning program executes the step E1 shown in fig. 3; its shared data store performs all the steps from the dataset back to the process timing pull and subscribe program as shown in figure 3.
Referring to fig. 3, fig. 3 is a schematic specific flowchart of a stock market pushing method provided in an embodiment of the present application, and as shown in fig. 3, a terminal device initially performs a step A1 of editing a subscription stock list, specifically: when a user uses the terminal equipment for the first time, the user is subscribed by the recommending system randomly; the user can actively browse/search the stock code and then join the stock subscription list, and in practical application, the terminal device caches the subscription stock list. The terminal equipment confirms that the current time is in the stock trading time period, B1 timing pulling and subscribing steps are executed, specifically, a command of pulling and subscribing a stock list and a target stock is sent to the stock market server at a timing, and the subscription stock list is transmitted to the stock market server; the stock market server receives a plurality of subscription stock lists of the terminal devices in a first market processing period, B2 is executed to store the user subscription list, the user subscription list needs to be locked when the user subscription list is stored every time, and if the user subscription list is not matched with the current subscription stock lists, the pre-configured user subscription list is updated according to the subscription stock lists; and executing the B3 drawing stock real-time quotation by the processing timing drawing and subscribing program and returning to the step, wherein the drawing stock real-time quotation is to acquire data from a stock real-time quotation source.
Referring to fig. 3, as shown in fig. 3, the step of processing the push program to execute C1 to obtain the user subscription list; c2, filtering the data of the user subscription list, wherein the filtering refers to a data optimization means for temporarily excluding the data which is out of date or invalid from the data for acquiring the user subscription list, and the step of deleting the data is not executed in C2; c3 pulls the stock real-time quotation and returns to the step, it should be understood that here, the stock real-time quotation source is pulled and returned to the processing and pushing program.
Referring to fig. 3, as shown in fig. 3, the terminal device executes a step of canceling subscription D1, the terminal device sends a message of canceling subscription to the stock ticker server, executes a step of clearing subscription data, the stock ticker server clears data stored in the user subscription list, and returns the updated data information to the processing timing pull and subscription program through the shared data memory, and then returns and pushes the updated data information to the terminal device.
Referring to fig. 4a, as shown in a cycle time comparison table provided in fig. 4a, if the current time is Tc and is in the second market processing cycle, the first market processing cycle is in the next processing cycle of the current time Tc, the third market processing cycle includes N successive market processing cycles after the first market processing cycle, where N is a positive integer; referring to fig. 4b and 4c, that is, the table shown in fig. 4b is converted to the table shown in fig. 4c, where the time slice in fig. 4b refers to a certain time period, which may be a time period of 5S, 10S, 1min, and the like, and this is not limited herein, the index value in fig. 4c is a unique mark of stock market data, and may be composed of a stock name, such as S1, and a corresponding market processing cycle duration, such as T1, and the data in fig. 4c is a user mark, such as U1, corresponding to a certain stock, and in practical applications, the target stock subscription time subscribed by each reference user may be obtained in fig. 4b, and the market processing cycle is determined by looking up a table of the subscription time; FIG. 4c illustrates a user who needs to synchronize market data of each target stock in a period of market processing; referring to step E1 in fig. 3, step E1 is a step of clearing user subscription list, which is a task triggered at regular time, and clearing is performed
Figure 151318DEST_PATH_IMAGE001
In the formula, the update time of the user subscription list is Tu, T1 is the duration of the market processing cycle, M is the positive integer, and the stock market server regularly cleans up the invalid user subscription list in order to deal with the situations that the terminal bug and the app are killed and the like.
Therefore, in this example, by adopting the shared data and the optimization scheme to reduce competition between the read lock and the write lock, the local computation can realize storage and acquisition of the user subscription list, and the stability, the usability and the real-time performance of the whole market pushing system are improved.
And step 220, updating a pre-configured user subscription list according to the plurality of subscription stock lists, wherein the user subscription list is used for representing users needing to perform market quotation data synchronization on each stock in each market quotation processing period from the stock dimension.
In one possible example, the updating a preconfigured user subscription list from the plurality of subscription stock lists comprises: querying data corresponding to a second market processing cycle in the user subscription list, wherein the second market processing cycle is a market processing cycle before the first market processing cycle; detecting that the data corresponding to the second market processing period is not matched with the plurality of subscription stock lists; and updating data corresponding to the first quotation processing period and a third quotation processing period in the user subscription list according to the plurality of subscription stock lists, wherein the third quotation processing period comprises N continuous quotation periods after the first quotation processing period, and N is a positive integer.
In specific applications, when data corresponding to a first emotion processing cycle and a third emotion processing cycle need to be updated, the values of the N corresponding to the use time and the current moment are extracted from the data set, and then the third emotion processing cycle of the data needs to be updated is determined; it should be understood that the server may have another thread for paying attention to the real-time hot spot information, and if a certain preset keyword (for example, new energy, white spirit, etc., which may cause a large fluctuation of stock quotation after a preset part of keywords appear) appears in the real-time hot spot information, the server queries the preset data set, and if the user does not set a new value of N within the latest preset time, the server may perform an adjustment operation on the value of N, and automatically adjust the value of N available in the current time period in the original data set.
Determining a reference value x according to the number of preset associated words (words representing attention heat) appearing in a preset time period, adjusting N acquired from a data set through the reference value, and obtaining adjusted N
Figure 700111DEST_PATH_IMAGE002
Meanwhile, the more the occurrence times of the preset associated words in the time period are, the larger the reference value x is, so that the larger N' is, the longer the push occupation ratio time of the stocks corresponding to the high-heat associated words is.
After the value of N 'is adjusted, the frequency of steps C1 to C3 shown in fig. 3 should be correspondingly adjusted, for example, if the heat of a preset associated word is higher, the reference value x is higher, N' is also higher, and the number of times of steps C1 to C3 is correspondingly increased.
It should be understood that the user subscription list herein may change according to the user application scenario, for example, after the user switches the software to the background, the system may cancel the subscription by default, and the user subscription list at this time may change accordingly.
Therefore, in this embodiment, the user subscription list is not accumulated continuously, but is updated and adjusted in a preset time period along with the change of the application condition of the terminal device side, and a more frequent pushing step can be performed on the stocks with highly-popular associated words to obtain more real-time quotations and push the more real-time quotations to the user, so that the flexibility and pertinence of the system are improved, and the user experience is improved.
In one possible example, the querying the user subscription list to determine the reference user for which the target stock needs market data synchronization in the first market processing period comprises: and under the condition that the starting time is in a fourth line-condition processing period, querying data corresponding to the first line-condition processing period in the user subscription list to determine the reference user, wherein the fourth line-condition processing period is a next line-condition processing period of the first line-condition processing period.
In order to reduce the competition of the read-write lock on the shared data in the steps B2, C1 and E1, the following method is adopted during implementation: determining a time slice Tn where the user subscription list is located according to the current time Tc; b2, writing the storage data of the time slices of (Tn +1, tn + 2., tn + N), namely updating a pre-configured user subscription list according to the plurality of subscription stock lists; c1, reading the stored data of the time slice (Tn), namely inquiring the data corresponding to the first line emotion processing period in the user subscription list to determine the reference user under the condition that the starting time is in a fourth line emotion processing period; the step E1 writes (Tn-M) the storage data of the time slice, that is, clear (Tn-M) the data whose writing time is before the M market processing cycle from the user subscription list at intervals of a first preset time, where M is a positive integer, please refer to fig. 4d, where N =3, M =1, specifically, the step B2 starts to write data 4, data 5, and data 6 for 3 consecutive time periods from the time T3, and then the step C1 starts to read from the time T2 and reads from the current time (T3), since the step B2 in the step B2 has no data information, the time T3 in the step C1 in fig. 4d also has no data information, and the data 4 corresponding to the time T3 in the step B2 does not exist until the time T4, the step C1 reads the data 5 and the data 6, and so on, and the description is omitted, and the step E1 writes (clears) the data of the time T2 from the time T4.
It can be seen that, in this example, accessing the user subscription list does not involve network interaction, involves thread lock/process lock, involves three resource locks in the stock market server, where the read-write lock involved is local computation, and the speed of accessing shared data is faster and less time consuming than accessing centralized storage, so as to improve real-time performance and optimize user experience.
Step 230, obtaining the quotation data of the target stock.
Step 240, querying the user subscription list to determine a reference user of the target stock, which needs to perform market data synchronization in the first market processing period, and sending the market data of the target stock to a terminal device of the reference user.
In one possible example, the obtaining the market data of the target stock comprises: and acquiring real-time market quotation data of the target stock from a stock real-time market quotation source, wherein the stock real-time market quotation source is used for collecting market quotation data of each stock in a current processing period in a certain market quotation processing period.
Wherein the market data includes, but is not limited to: latest price, fluctuation range, 5-grade data of buying and selling (Level-2 market is 10 grades), and the like.
Therefore, in the example, the quotation data in the stock quotation source is pulled in real time, and the quotation data is updated in time, so that the timeliness of the stock quotation change is met, the availability of the system is improved, and the user experience is optimized.
In one possible example, the method further comprises: inquiring the user subscription list at preset intervals to acquire data corresponding to a fifth market quotation processing period in the user subscription list, wherein the fifth market quotation processing period is a market quotation processing period before the market quotation processing period at the current moment; according to the data corresponding to the fifth quotation processing period, determining candidate stocks needing quotation data pushing in the quotation processing period at the current moment and candidate users corresponding to the candidate stocks, and acquiring the real-time quotation data of the candidate stocks from the stock real-time quotation source; and pushing the real-time quotation data of the candidate stocks to the candidate users.
Therefore, in the embodiment, by acquiring the data in the market processing period and correspondingly subscribing the user information, the real-time market pushing user subscription data of the stocks are locally stored, pulled and subscribed at regular time, and the stability, the availability and the real-time performance of the system are improved.
In one possible example, the method further comprises: at the starting time of the fourth market quotation processing period, clearing data written in the user subscription list before M market quotation processing periods of the starting time, wherein M is a positive integer; and if detecting that the corresponding user subscription list data does not exist before the M market processing periods at the starting moment, skipping the step of cleaning the data written in the user subscription list before the M market processing periods at the starting moment.
In step C2 of FIG. 3, the screening process is performed
Figure 834158DEST_PATH_IMAGE003
The current time is Tc, the update time of the user subscription list is Tu, T1 is the market condition processing cycle duration, and N is the positive integer. The stock quotation server acquires the target stock by inquiring the user subscription list, sends the target stock to a stock real-time quotation source, informs a real-time quotation data of the target stock to be returned, and sends the quotation data of the target stock to the terminal equipment of the reference user.
It can be seen that, in this example, by presetting the screening period, invalid data is reduced, and the robustness and stability of the system are improved.
In addition to the step of clearing the user subscription list data described in the step E1, please refer to the step E1 in fig. 3, set storage (a storage type) of a local remote dictionary service may be used through the shared data memory, and after the data is written, an expire command (a time to live command) is used to set a timing expiration of the data.
It can be seen that in this example, the data with invalid redundancy can be cleaned up in various ways, which improves the robustness and stability of the system.
In one possible example, after the sending the quotation data of the target stock to the terminal device of the reference user, the method further includes: receiving subscription cancellation information sent by the terminal equipment; and deleting the user subscription list data according to the unsubscribe information, and stopping sending the quotation data of the target stock to the terminal equipment of the reference user.
The information for canceling subscription can be from user to cancel subscription, or the device judges that the user cancels subscription by default after the user switches the current stock real-time quotation interface for more than a preset time.
As can be seen, in this example, referring to fig. 3, when the user actively exits from APP/switches to another service function or when the user actively performs a subscription cancellation operation, the step of canceling subscription is executed, the terminal device sends a subscription cancellation message to the processing timing pull and subscription program in the stock ticketing server, and the timing pull and subscription program executes the step of clearing subscription data, so as to clear data stored in the user subscription list, reduce processing time, and improve operation efficiency.
The embodiment of the application provides a stock quotation pushing method, which is characterized in that a user subscribes data and stores locally through real-time quotation pushing of stocks, the processes of regularly pulling, subscribing and cleaning do not interfere with the flow of pushing the stock quotation, and the stability, the usability and the real-time performance of a system are enhanced.
Referring to fig. 5a, in a case that each function module is divided according to each function, fig. 5a is a block diagram of functional units of a stock market pushing apparatus according to an embodiment of the present application, and as shown in fig. 5a, the stock market pushing apparatus 500 includes: a receiving unit 501, configured to receive multiple subscription stock lists from the multiple terminal devices in a first action processing period, where a single subscription stock list is used to characterize, from a user dimension, stocks subscribed by a user in the first action processing period; an updating unit 502, configured to update a preconfigured user subscription list according to the plurality of subscription stock lists, where the user subscription list is used to characterize, from a stock dimension, users of each stock that need to perform market data synchronization in each market processing cycle; an obtaining unit 503, configured to obtain market data of a target stock; a pushing unit 504, configured to query the user subscription list to determine a reference user of the target stock that needs to perform market data synchronization in the first market processing period, and push the market data of the target stock to a terminal device of the reference user.
In a possible example, the updating unit 502 is specifically configured to update the preconfigured user subscription list according to the plurality of subscription stock lists: querying data corresponding to a second market processing cycle in the user subscription list, wherein the second market processing cycle is a market processing cycle before the first market processing cycle; detecting that the data corresponding to the second market processing period is not matched with the plurality of subscription stock lists; and updating data corresponding to the first quotation processing period and a third quotation processing period in the user subscription list according to the plurality of subscription stock lists, wherein the third quotation processing period comprises N continuous quotation processing periods after the first quotation processing period, and N is a positive integer.
In a possible example, the updating unit 502 is specifically configured to query the user subscription list to determine a reference user of the target stock that needs to perform market data synchronization in the first market processing period: at the starting time of the fourth quotation processing period, cleaning data written in the user subscription list before M quotation processing periods of the starting time, wherein M is a positive integer; and if detecting that the corresponding user subscription list data does not exist before the M market processing periods at the starting moment, skipping the step of cleaning the data written in the user subscription list and before the M market processing periods at the starting moment.
In a possible example, the obtaining the market data of the target stock, and the pushing unit 504 is specifically configured to: and acquiring real-time quotation data of the target stock from a stock real-time quotation source, wherein the stock real-time quotation source is used for collecting the quotation data of each stock in the current processing period in trading in a certain quotation processing period.
In a possible example, the pushing unit 504 is further specifically configured to: inquiring the user subscription list at preset intervals to acquire data corresponding to a fifth market quotation processing period in the user subscription list, wherein the fifth market quotation processing period is a market quotation processing period before the market quotation processing period at the current moment; according to the data corresponding to the fifth quotation processing period, determining candidate stocks needing quotation data push in the quotation processing period at the current moment and candidate users corresponding to the candidate stocks, and acquiring the real-time quotation data of the candidate stocks from the stock real-time quotation source; and pushing the real-time quotation data of the candidate stocks to the candidate users.
In a possible example, the pushing unit 504 is further specifically configured to: at the starting time of the fourth quotation processing period, cleaning data written in the user subscription list before M quotation processing periods of the starting time, wherein M is a positive integer; and if detecting that the corresponding user subscription list data does not exist before the M market processing periods at the starting moment, skipping the step of cleaning the data written in the user subscription list and before the M market processing periods at the starting moment.
In one possible example, after sending the quotation data of the target stock to the terminal device of the reference user, the receiving unit 501 and the updating unit 502 are used together to: receiving subscription cancellation information sent by the terminal equipment; and deleting the user subscription list data according to the unsubscribe information, and stopping sending the quotation data of the target stock to the terminal equipment of the reference user.
It can be understood that, since the method embodiment and the apparatus embodiment are different presentation forms of the same technical concept, the content of the method embodiment portion in the present application should be synchronously adapted to the apparatus embodiment portion, and is not described herein again.
In the case of using an integrated module, as shown in fig. 5b, fig. 5b is a block diagram of functional units of another stock market pushing device provided in this embodiment. In fig. 5b, the stock market pushing device 510 includes: a communication module 511 and a processing module 512. The communication module 511 is used for supporting the interaction between the stock ticketing market pushing device and other equipment. The processing module 512 is used for controlling and managing actions of the stock market pushing device, such as steps of the receiving unit 501, the updating unit 502, the obtaining unit 503 and the pushing unit 504, and/or other processes for executing the technology described herein. As shown in fig. 5b, the stock quote push device may further include a storage module 513, and the storage module 513 is used for storing program codes and data of the stock quote push device.
The Processing module 512 may be a Processor or a controller, and may be, for example, a Central Processing Unit (CPU), a general-purpose Processor, a Digital Signal Processor (DSP), an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, and the like. The communication module 511 may be a transceiver, an RF circuit or a communication interface, etc. The storage module 513 may be a memory.
All relevant contents of each scene related to the method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again. The stock quote push device 510 can execute the stock quote push method shown in fig. 2.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. The electronic device 600 may include one or more of the following components: a processor 601, a memory 602 coupled to the processor 601, wherein the memory 602 may store one or more computer programs that may be configured to have the one or more processors 601 execute methods that implement the various embodiments described above.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor is a control center of the stock quote push device, and various interfaces and lines are used to connect various parts of the whole stock quote push device.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the stock market pushing apparatus by executing or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as an image playing function) required by at least one function, and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, the above-described embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions or computer programs. The procedures or functions according to the embodiments of the present application are wholly or partially generated when the computer instructions or the computer program are loaded or executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire or wirelessly. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more collections of available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium may be a solid state disk.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the methods as described in the above method embodiments.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not imply any order of execution, and the order of execution of the processes should be determined by their functions and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed method, apparatus and system may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative; for example, the division of the modules is only a logic function division, and there may be another division manner in actual implementation; for example, multiple modules or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each module may be physically included alone, or two or more modules may be integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a mode of hardware and a software functional module.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: u disk, removable hard disk, magnetic disk, optical disk, volatile memory or non-volatile memory. The non-volatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example and not limitation, many forms of Random Access Memory (RAM) are available, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous SDRAM (SLDRAM), and direct bus RAM (DR RAM) among various media that can store program code.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications can be easily made by those skilled in the art without departing from the spirit and scope of the present invention, and it is within the scope of the present invention to include different functions, combination of implementation steps, software and hardware implementations.

Claims (10)

1. A stock quotation push method is characterized in that the method is applied to a quotation server in a stock quotation push system, the stock quotation push system comprises the quotation server and a plurality of terminal devices, and the quotation server is in communication connection with the terminal devices; the method comprises the following steps:
receiving a plurality of subscription stock lists of the plurality of terminal devices in a first action processing period, wherein a single subscription stock list is used for representing stocks subscribed by a user in the first action processing period from user dimensions;
updating a pre-configured user subscription list according to the plurality of subscription stock lists, wherein the user subscription list is used for representing users needing market quotation data synchronization in each market quotation processing period of each stock from stock dimensions;
acquiring quotation data of target stocks;
and querying the user subscription list to determine a reference user of the target stock needing to perform market data synchronization in the first market processing period, and sending the market data of the target stock to a terminal device of the reference user.
2. The method of claim 1, wherein updating a preconfigured user subscription list based on the plurality of subscription stock lists comprises:
querying data corresponding to a second market processing cycle in the user subscription list, wherein the second market processing cycle is a market processing cycle before the first market processing cycle;
detecting that the data corresponding to the second market processing period is not matched with the plurality of subscription stock lists;
and updating data corresponding to the first quotation processing period and a third quotation processing period in the user subscription list according to the plurality of subscription stock lists, wherein the third quotation processing period comprises N continuous quotation processing periods after the first quotation processing period, and N is a positive integer.
3. The method of claim 1, wherein querying the user subscription list to determine a reference user for which the target stock requires market data synchronization for the first market processing period comprises:
and under the condition that the starting time is in a fourth line-of-sight processing period, querying data corresponding to the first line-of-sight processing period in the user subscription list to determine the reference user, wherein the fourth line-of-sight processing period is a next line-of-sight processing period of the first line-of-sight processing period.
4. The method of claim 1, wherein obtaining market data for a target stock comprises:
and acquiring real-time quotation data of the target stock from a stock real-time quotation source, wherein the stock real-time quotation source is used for collecting the quotation data of each stock in the current processing period in trading in a certain quotation processing period.
5. The method of claim 4, further comprising:
inquiring the user subscription list at preset intervals to acquire data corresponding to a fifth market quotation processing period in the user subscription list, wherein the fifth market quotation processing period is a market quotation processing period before the market quotation processing period at the current moment;
according to the data corresponding to the fifth quotation processing period, determining candidate stocks needing quotation data push in the quotation processing period at the current moment and candidate users corresponding to the candidate stocks, and acquiring the real-time quotation data of the candidate stocks from the stock real-time quotation source;
and pushing the real-time quotation data of the candidate stocks to the candidate users.
6. The method of claim 4, further comprising:
at the starting time of the fourth market quotation processing period, cleaning data written in the user subscription list at the time before M market quotation processing periods at the starting time, wherein M is a positive integer;
and if detecting that the corresponding user subscription list data does not exist before the M market processing periods at the starting moment, skipping the step of cleaning the data written in the user subscription list before the M market processing periods at the starting moment.
7. The method according to any one of claims 1-6, wherein after the sending of the market data of the target stock to the terminal device of the reference user, further comprising:
receiving subscription cancellation information sent by the terminal equipment;
and deleting the user subscription list data according to the unsubscribe information, and stopping sending the market data of the target stock to the terminal equipment of the reference user.
8. A stock market pushing device is characterized by being applied to a market server in a stock market pushing system, wherein the stock market pushing system comprises the market server and a plurality of terminal devices, and the market server is in communication connection with the terminal devices; the device comprises:
a receiving unit, configured to receive multiple subscription stock lists from the multiple terminal devices in a first action processing period, where a single subscription stock list is used to characterize, from a user dimension, stocks subscribed by a user in the first action processing period;
the updating unit is used for updating a pre-configured user subscription list according to the plurality of subscription stock lists, and the user subscription list is used for representing users needing market quotation data synchronization of each stock in each market quotation processing period from stock dimensions;
the acquisition unit is used for acquiring market data of the target stock;
and the pushing unit is used for inquiring the user subscription list to determine a reference user of the target stock needing market data synchronization in the first market processing period, and sending the market data of the target stock to the terminal equipment of the reference user.
9. An electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-7.
10. A computer-readable storage medium for a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform the method according to any one of claims 1-7.
CN202211098726.4A 2022-09-09 2022-09-09 Stock market pushing method and related device Active CN115186198B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211098726.4A CN115186198B (en) 2022-09-09 2022-09-09 Stock market pushing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211098726.4A CN115186198B (en) 2022-09-09 2022-09-09 Stock market pushing method and related device

Publications (2)

Publication Number Publication Date
CN115186198A true CN115186198A (en) 2022-10-14
CN115186198B CN115186198B (en) 2022-12-20

Family

ID=83522623

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211098726.4A Active CN115186198B (en) 2022-09-09 2022-09-09 Stock market pushing method and related device

Country Status (1)

Country Link
CN (1) CN115186198B (en)

Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060020748A1 (en) * 2002-12-11 2006-01-26 Koninklijke Philips Electronics N.V. Methods and apparatus for improving the breathing of disk scheduling algorithms
CN101047510A (en) * 2006-03-27 2007-10-03 张威 Method for noticing data resource information changing through gate network station
CN101145223A (en) * 2007-09-27 2008-03-19 腾讯科技(深圳)有限公司 Calendar supervision system and its supervision method
US20080091688A1 (en) * 2006-10-17 2008-04-17 Samsung Electronics Co., Ltd. Apparatus and method providing content service
US20080118686A1 (en) * 2006-11-20 2008-05-22 Katherine Glasgow Injection blow molding process and article
US20100267405A1 (en) * 2009-04-20 2010-10-21 Research In Motion Limited Updating The User Equipment (UE) Allowed Closed Subscriber Group List (ACL)
CN101930448A (en) * 2009-06-23 2010-12-29 北京搜狗科技发展有限公司 Method and device for subscribing webpage information
CN102769640A (en) * 2011-05-05 2012-11-07 中国移动通信集团广东有限公司 Method, server and system for user information updating
CN102802047A (en) * 2012-07-09 2012-11-28 北京迈伦斯科技有限公司 Information subscribing and information broadcasting method and system with cross-network collaboration
CN102917061A (en) * 2012-10-19 2013-02-06 北京奇虎科技有限公司 Resource synchronization method and system
CN103544627A (en) * 2012-07-11 2014-01-29 北京长生天地电子商务有限公司 Information analyzing system and information analyzing method in network transaction
CN105592327A (en) * 2014-10-22 2016-05-18 中兴通讯股份有限公司 IPTV-system-based processing method and apparatus for stock information
CN105869051A (en) * 2016-03-25 2016-08-17 北京资配易投资顾问有限公司 Information processing method, device and system
CN107067325A (en) * 2017-04-18 2017-08-18 湖南福米信息科技有限责任公司 Filter method, filter and the supplying system of stock market data
CN109918424A (en) * 2019-03-18 2019-06-21 武汉优品楚鼎科技有限公司 A kind of method, system, device and storage medium loading stock certificate data
CN111062192A (en) * 2019-12-17 2020-04-24 支付宝(杭州)信息技术有限公司 Information notification method, device and equipment
CN111145024A (en) * 2019-12-27 2020-05-12 深圳市思迪信息技术股份有限公司 Market data pushing method and device
CN111325472A (en) * 2020-02-28 2020-06-23 北京思特奇信息技术股份有限公司 Abnormal data detection method and system
CN111611487A (en) * 2020-05-20 2020-09-01 上海腾韵信息科技有限公司 Stock information application analysis system
CN111694678A (en) * 2020-05-29 2020-09-22 科大智能电气技术有限公司 Continuous periodic data sampling method and system based on linux platform
CN114782201A (en) * 2022-04-19 2022-07-22 中国工商银行股份有限公司 Stock recommendation method and device, computer equipment and storage medium

Patent Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060020748A1 (en) * 2002-12-11 2006-01-26 Koninklijke Philips Electronics N.V. Methods and apparatus for improving the breathing of disk scheduling algorithms
CN101047510A (en) * 2006-03-27 2007-10-03 张威 Method for noticing data resource information changing through gate network station
US20080091688A1 (en) * 2006-10-17 2008-04-17 Samsung Electronics Co., Ltd. Apparatus and method providing content service
US20080118686A1 (en) * 2006-11-20 2008-05-22 Katherine Glasgow Injection blow molding process and article
CN101145223A (en) * 2007-09-27 2008-03-19 腾讯科技(深圳)有限公司 Calendar supervision system and its supervision method
US20100267405A1 (en) * 2009-04-20 2010-10-21 Research In Motion Limited Updating The User Equipment (UE) Allowed Closed Subscriber Group List (ACL)
CN101930448A (en) * 2009-06-23 2010-12-29 北京搜狗科技发展有限公司 Method and device for subscribing webpage information
CN102769640A (en) * 2011-05-05 2012-11-07 中国移动通信集团广东有限公司 Method, server and system for user information updating
CN102802047A (en) * 2012-07-09 2012-11-28 北京迈伦斯科技有限公司 Information subscribing and information broadcasting method and system with cross-network collaboration
CN103544627A (en) * 2012-07-11 2014-01-29 北京长生天地电子商务有限公司 Information analyzing system and information analyzing method in network transaction
CN102917061A (en) * 2012-10-19 2013-02-06 北京奇虎科技有限公司 Resource synchronization method and system
CN105592327A (en) * 2014-10-22 2016-05-18 中兴通讯股份有限公司 IPTV-system-based processing method and apparatus for stock information
CN105869051A (en) * 2016-03-25 2016-08-17 北京资配易投资顾问有限公司 Information processing method, device and system
CN107067325A (en) * 2017-04-18 2017-08-18 湖南福米信息科技有限责任公司 Filter method, filter and the supplying system of stock market data
CN109918424A (en) * 2019-03-18 2019-06-21 武汉优品楚鼎科技有限公司 A kind of method, system, device and storage medium loading stock certificate data
CN111062192A (en) * 2019-12-17 2020-04-24 支付宝(杭州)信息技术有限公司 Information notification method, device and equipment
CN111145024A (en) * 2019-12-27 2020-05-12 深圳市思迪信息技术股份有限公司 Market data pushing method and device
CN111325472A (en) * 2020-02-28 2020-06-23 北京思特奇信息技术股份有限公司 Abnormal data detection method and system
CN111611487A (en) * 2020-05-20 2020-09-01 上海腾韵信息科技有限公司 Stock information application analysis system
CN111694678A (en) * 2020-05-29 2020-09-22 科大智能电气技术有限公司 Continuous periodic data sampling method and system based on linux platform
CN114782201A (en) * 2022-04-19 2022-07-22 中国工商银行股份有限公司 Stock recommendation method and device, computer equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
张清华等: "基于资讯价值的股票资讯移动订阅系统", 《广西师范大学学报(自然科学版)》 *
汪毅等: "基于条件约束发布/订阅模式的航天测控数据交换系统", 《兵工自动化》 *
赵焕清: "基于互联网+新闻传媒和大物流业务推广应用探析", 《神华科技》 *

Also Published As

Publication number Publication date
CN115186198B (en) 2022-12-20

Similar Documents

Publication Publication Date Title
AU2015267625B2 (en) Activity continuation between electronic devices
CN109408751B (en) Data processing method, terminal, server and storage medium
CN109885786B (en) Data caching processing method and device, electronic equipment and readable storage medium
CN112199442B (en) Method, device, computer equipment and storage medium for distributed batch downloading files
CN111242696A (en) Advertisement insertion method and device, electronic equipment and computer storage medium
US20190019235A1 (en) Systems and methods for managing product recommendations and affiliate links
CN109086414B (en) Method, apparatus and storage medium for searching blockchain data
CN111414207A (en) Page construction method, device and equipment
CN115186198B (en) Stock market pushing method and related device
CN107241446B (en) File transmission method and device of application program, terminal equipment and storage medium
CN104834728B (en) A kind of method for pushing and device for subscribing to video
CN111753141B (en) Data management method and related equipment
EP2153353A1 (en) Distributed search in a casual network of servers
CN101493817A (en) File opening method
US11093475B2 (en) External change detection
US20190146924A1 (en) Method and system for matching multi-dimensional data units in electronic information system
CN111400327B (en) Data synchronization method and device, electronic equipment and storage medium
CN114490719A (en) Data query method and device, electronic equipment and storage medium
CN108268594B (en) Data query method and device
CN113760929A (en) Data synchronization method and device, electronic equipment and computer readable medium
CN111078736A (en) Data aggregation processing method and device, terminal and storage medium
CN112784195A (en) Page data publishing method and system
CN112256654A (en) Document sharing method and device
JP7143866B2 (en) Cache management program, server, cache management method, and information processing device
CN110753268B (en) Page card data generation method and device and electronic equipment

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