Market transcoding delay processing method and device

By processing and storing real-time market data and extracting and displaying data based on preset delay time, the problem that financial service providers cannot provide real-time market information is solved, real-time display of delayed market data is realized, and users' needs are met.

CN119477528APending Publication Date: 2025-02-18SHENZHEN THINKIVE INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410670904.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2025-02-18

Smart Images

  • Figure CN119477528A_ABST
    Figure CN119477528A_ABST
Patent Text Reader

Abstract

The invention discloses a market transcoding delay processing method and device, and the method comprises the steps: obtaining a plurality of pieces of real-time market data, carrying out the processing of the real-time market data, obtaining a plurality of pieces of processing data, storing the plurality of pieces of processing data, and enabling the plurality of pieces of processing data to respectively comprise timestamps; reading the plurality of stored processing data, and comparing the timestamp of each processing data with the local time to obtain a plurality of time differences; and respectively comparing each time difference with preset delay time, and if the time difference reaching the preset delay time exists, extracting the corresponding processing data and carrying out updating display. According to the market transcoding delay processing method provided by the invention, the obtained real-time market data is processed and compared with the local time to obtain the processing data of the delayed market after delay, and the processing data is displayed, so that the real-time performance of the data can be ensured, the requirement of a user on the market data is met, and the user experience is improved by displaying the processing data. Therefore, the user can conveniently and quickly obtain the market information data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data delay processing, and in particular to a market transcoding delay processing method and device. Background Art

[0002] Currently, in the financial market, real-time market information is of great value to investors. However, for some financial service providers, due to copyright or cost reasons, they may not be able to provide real-time market information, but can only provide delayed market information.

[0003] For example, the Hong Kong Stock Exchange (HKEX) owns the copyright to its market information, and any institution or individual who wants to obtain and disseminate its real-time market information needs to pay a corresponding fee. For some small financial service providers or start-ups, this fee may be unaffordable.

[0004] In addition, even some large financial service providers may choose to only provide delayed market information due to cost considerations, because the acquisition, processing and dissemination of real-time market information requires corresponding hardware equipment and software systems, which require a lot of cost.

[0005] Therefore, how to transcode real-time market information into delayed market information has become a problem that needs to be solved. Summary of the invention

[0006] To this end, the present invention aims to solve the deficiencies in the prior art to at least a certain extent, thereby proposing a market transcoding delay processing method and device.

[0007] In a first aspect, the present invention provides a method for processing a market transcoding delay, the method comprising:

[0008] Acquire multiple real-time market data and process them to obtain multiple processed data, store the multiple processed data, and each of the multiple processed data includes a timestamp;

[0009] Reading a plurality of the stored processed data, and comparing the timestamp of each processed data with the local time to obtain a plurality of time differences;

[0010] Each of the time differences is compared with the preset delay time respectively, and if there is a time difference that reaches the preset delay time, the corresponding processing data is extracted and updated for display.

[0011] In a second aspect, the present invention provides a market transcoding delay processing system, the system comprising:

[0012] Processing module: used for acquiring multiple real-time market data and processing them to obtain multiple processed data, storing the multiple processed data, each of which includes a timestamp;

[0013] Comparison module: used for reading the stored multiple processed data, and comparing the timestamp of each processed data with the local time to obtain multiple time differences;

[0014] Display module: used to compare each of the time differences with the preset delay time respectively, and if there is a time difference that reaches the preset delay time, extract the corresponding processing data and update and display it.

[0015] In a third aspect, the present invention further provides a market transcoding delay processing device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, each step in the market transcoding delay processing method as described in any one of the first aspects is implemented.

[0016] In a fourth aspect, the present invention further provides a storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, each step of the method for processing the market transcoding delay as described in any one of the first aspects is implemented.

[0017] The present invention provides a method and device for processing a market transcoding delay, and the method includes: acquiring multiple real-time market data and processing them to obtain multiple processed data, storing multiple processed data, and each of the processed data includes a timestamp; reading the stored multiple processed data, comparing the timestamp of each processed data with the local time to obtain multiple time differences; comparing each time difference with a preset delay time, and if there is a time difference that reaches the preset delay time, extracting the corresponding processed data and updating and displaying it. The method for processing market transcoding delay provided by the present invention can ensure the real-time nature of the data and meet the user's needs for market data by processing the acquired real-time market data and comparing it with the local time, obtaining the processed data of the delayed market after the delay and displaying it, and by displaying the processed data, the user can obtain the market data conveniently and quickly. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.

[0019] Figure 1 It is a flow chart of the method for processing the market transcoding delay of the present invention;

[0020] Figure 2 This is a system architecture diagram of the market transcoding delay processing method of the present invention;

[0021] Figure 3 It is a sub-flow diagram of the market transcoding delay processing method of the present invention;

[0022] Figure 4 It is another sub-flow diagram of the method for processing the market transcoding delay of the present invention;

[0023] Figure 5 It is a schematic diagram of the program modules of the market transcoding delay processing system of the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, features and advantages of the invention more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0025] Please refer to Figure 1 and Figure 2 , Figure 1 is a flowchart of a method for processing market transcoding delay in an embodiment of the present application, Figure 2 : is a system architecture diagram of the market transcoding delay processing method in the embodiment of the present application. In this embodiment, the market transcoding delay processing method includes:

[0026] Step 101: Acquire multiple real-time market data and process them to obtain multiple processed data, store the multiple processed data, and each of the multiple processed data includes a timestamp.

[0027] In this embodiment, a plurality of real-time market data are first obtained, and then the obtained plurality of real-time market data are processed, wherein the collected real-time market data are processed by C++ programming language. After the real-time market data are processed, processed data are obtained, and the obtained processed data are stored, wherein one processed data is obtained after one real-time market data is processed, and the real-time market data includes information such as stock code, trading time, opening price, closing price, highest price, lowest price, trading volume, etc. Moreover, each processed data includes a corresponding timestamp.

[0028] Step 102: read the stored multiple processed data, and compare the timestamp of each processed data with the local time to obtain multiple time differences.

[0029] In this embodiment, the stored multiple processing data are read again, and the timestamp of each processing data is compared with the local time to obtain the time difference between each processing data and the local time, wherein one processing data corresponds to one time difference with the local time.

[0030] Step 103: Compare each of the time differences with the preset delay time respectively. If there is a time difference that reaches the preset delay time, extract the corresponding processing data and update and display it.

[0031] In this embodiment, the time difference between each processed data and the local time is compared with the preset delay time. If the time difference reaches the preset delay time, the processed data corresponding to the time difference reaching the preset delay time is extracted, wherein the extracted processed data is the data after the transcoding delay, and then the extracted processed data is updated and displayed, so that it can be ensured that the display of the processed data always lags behind the real-time market data for a fixed period of time. Among them, the programming language is used to process the data in the embodiment of the present application, and the delay processing is also set by the programming language, so that the delay time can be flexibly adjusted according to needs, that is, the preset delay time can be adjusted by the programming language according to needs.

[0032] The embodiment of the present application provides a method for processing market transcoding delays, the method comprising: acquiring multiple real-time market data and processing them to obtain multiple processed data, storing multiple processed data, each of which includes a timestamp; reading the stored multiple processed data, comparing the timestamp of each processed data with the local time to obtain multiple time differences; comparing each time difference with a preset delay time, and if there is a time difference that reaches the preset delay time, extracting the corresponding processed data and updating and displaying it. The method for processing market transcoding delays provided by the present invention can ensure the real-time nature of the data, meet the user's needs for market data, and enable users to quickly and easily obtain market data by displaying the processed data, by processing the acquired real-time market data and comparing it with the local time.

[0033] Furthermore, a plurality of the real-time market data are obtained from an exchange or a third-party data provider through an API interface.

[0034] In this embodiment, multiple real-time market data may be provided through an API interface from the Hong Kong Stock Exchange or a third-party data provider, that is, a provider of other data, thereby ensuring the accuracy of the real-time market data.

[0035] Furthermore, the obtained multiple real-time market data are processed by multi-thread processing.

[0036] In this embodiment, the acquired multiple real-time market data are processed by a multi-threaded processing method, which can accelerate the processing of the real-time market data, thereby more effectively utilizing system resources and improving the processing speed.

[0037] For further information, see Figure 3 , Figure 3 The following is a sub-flow diagram of the method for processing the delay of market transcoding in the embodiment of the present application. In this embodiment, the storing of the plurality of processing data includes:

[0038] Step 201: sort the processed data according to the order of timestamps of the multiple processed data;

[0039] Step 202: Store the sorted plurality of processed data.

[0040] In this embodiment, each piece of processing data is sorted in the order of its corresponding timestamp, and then the sorted processing data is stored, thereby ensuring that the storage of the processing data is orderly, which is convenient for subsequent processing and query of the processing data.

[0041] Furthermore, a plurality of the processed data are stored on a memory disk.

[0042] In this embodiment, multiple processing data are stored on the memory disk instead of the local disk, which can greatly reduce the pressure on the CPU and disk, thereby improving the overall system performance. Storing the processing data on the memory disk can effectively ensure the security of the processing data.

[0043] For further information, see Figure 4 , Figure 4 This is another flowchart of the method for processing the market transcoding delay in the embodiment of the present application. In this embodiment, extracting the corresponding processing data and updating and displaying it includes:

[0044] Step 301: receiving the processed data in real time via socket or http communication;

[0045] Step 302: Display the corresponding processed data through a website, APP or other terminal.

[0046] In this embodiment, although it is a delayed market, the corresponding processed data extracted by the server can be received in real time through socket or http communication, and the real-time nature of the processed data can still be guaranteed to meet the user's demand for market data. Among them, real-time market data can also be obtained through socket or http communication; and the received corresponding processed data is displayed through a website, APP or other terminals, so that users can obtain market data conveniently and quickly.

[0047] Furthermore, the specific steps of the market transcoding delay processing method are:

[0048] 1. Data collection: Obtain real-time market data from the Hong Kong Stock Exchange or other financial data providers through the API interface, thereby ensuring the accuracy of real-time market data. These data usually include stock codes, trading time, opening price, closing price, highest price, lowest price, trading volume and other information.

[0049] 2. Data storage: The collected real-time market data is processed using the C++ programming language to obtain processed data. Each processed data is then sorted in the order of its source timestamp, and the sorted processed data is persistently stored in the memory disk, so that the storage of the processed data is orderly, which is convenient for subsequent processing and query of the processed data. And storing the processed data in the memory disk can effectively ensure the security of the data.

[0050] 3. Data processing: First, read the stored processing data from the file, and then compare the timestamp of each processing data with the local time. Once the time difference reaches the preset delay time, the corresponding processing data will be extracted and updated to the front-end display. This ensures that the display of market data always lags behind the real-time data for a fixed period of time.

[0051] 4. Data display: Receive the processed data from the server in real time through socket or http communication, and display the processed data accordingly through the website, APP or other terminals, so that users can obtain market data conveniently and quickly.

[0052] In order to improve system performance, some optimization measures need to be taken. First, multi-threaded processing is used to speed up data processing, which can more effectively utilize system resources and increase processing speed. Second, market data is stored on the memory disk instead of the local disk, which can greatly reduce the pressure on the CPU and disk, thereby improving the overall system performance.

[0053] Furthermore, the embodiment of the present application also provides a market transcoding delay processing system 400, Figure 5This is a schematic diagram of the program modules of the market transcoding delay processing system in the embodiment of the present application. In this embodiment, the market transcoding delay processing system 400 includes:

[0054] Processing module 401: used to obtain multiple real-time market data and process them to obtain multiple processed data, and store the multiple processed data, each of which includes a timestamp;

[0055] Comparison module 402: used for reading a plurality of stored processed data, and comparing the timestamp of each processed data with the local time to obtain a plurality of time differences;

[0056] Display module 403: used for comparing each of the time differences with the preset delay time respectively, and if there is a time difference that reaches the preset delay time, extracting the corresponding processing data and updating and displaying it.

[0057] In the embodiment of the present application, a market transcoding delay processing system 400 is provided, which can realize: acquiring multiple real-time market data and processing them to obtain multiple processed data, storing multiple processed data, and the multiple processed data respectively include timestamps; reading the stored multiple processed data, comparing the timestamp of each processed data with the local time to obtain multiple time differences; respectively comparing each time difference with the preset delay time, if there is a time difference that reaches the preset delay time, then extracting the corresponding processed data and updating and displaying it. The market transcoding delay processing method provided by the present invention can ensure the real-time nature of the data and meet the user's needs for market data by processing the acquired real-time market data and comparing it with the local time, obtaining the processed data of the delayed market after the delay and displaying it, and by displaying the processed data, the user can obtain the market data conveniently and quickly.

[0058] Furthermore, the present application also provides a market transcoding delay processing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the various steps in the market transcoding delay processing method described above are implemented.

[0059] Furthermore, the present application also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, each step in the above-mentioned market transcoding delay processing method is implemented.

[0060] Each functional module in each embodiment of the present invention may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may be stored in a computer-readable storage medium.

[0061] Based on this understanding, the technical solution of the specification of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., various media that can store program codes.

[0062] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present invention is not limited by the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention. In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0063] For those skilled in the art, according to the concept of the embodiments of the present application, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for processing delayed market transcoding, characterized in that: The method comprises: Acquire multiple real-time market data and process them to obtain multiple processed data, store the multiple processed data, and each of the multiple processed data includes a timestamp; Reading a plurality of the stored processing data, and comparing the timestamp of each processing data with the local time to obtain a plurality of time differences; Each of the time differences is compared with the preset delay time respectively, and if there is a time difference that reaches the preset delay time, the corresponding processing data is extracted and updated for display.

2. The method for processing the delayed market transcoding according to claim 1, characterized in that: The multiple real-time market data are obtained from the exchange or a third-party data provider through an API interface.

3. The method for processing the delayed market transcoding according to claim 1, characterized in that: The obtained multiple real-time market data are processed by C++ language.

4. The method for processing the delayed market transcoding according to claim 1, characterized in that: The multiple real-time market data obtained are processed by multi-thread processing.

5. The method for processing the delayed market transcoding according to claim 1, characterized in that: The storing of the plurality of processing data comprises: sorting the processed data according to the order of timestamps of the plurality of processed data; The sorted plurality of processed data are stored.

6. The method for processing the delayed market transcoding according to claim 1, characterized in that: The plurality of processed data are stored on a memory disk.

7. The method for processing delayed market transcoding according to claim 1, characterized in that: The extracting the corresponding processed data and updating and displaying it includes: Receiving the processed data in real time via socket or http communication; The corresponding processed data is displayed through a website, APP or other terminals.

8. A market transcoding delay processing system, characterized in that: The system comprises: Processing module: used for acquiring multiple real-time market data and processing them to obtain multiple processed data, storing the multiple processed data, each of which includes a timestamp; Comparison module: used for reading the stored multiple processed data, and comparing the timestamp of each processed data with the local time to obtain multiple time differences; Display module: used to compare each of the time differences with the preset delay time respectively, and if there is a time difference that reaches the preset delay time, extract the corresponding processing data and update and display it.

9. A market transcoding delay processing device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, each step of the market transcoding delay processing method as described in any one of claims 1 to 7 is implemented.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, each step of the market transcoding delay processing method as described in any one of claims 1 to 7 is implemented.