Methods, apparatus, equipment and media for delay comparison of multi-source data
By receiving and analyzing video data from the client's data interface, and using AI models to extract and compare indicator data information, the problem of latency monitoring in market data clients has been solved, enabling efficient and objective latency assessment and improving the accuracy and efficiency of investment decisions.
Patent Information
- Application Number
- CN202411872469.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-12-18
AI Technical Summary
Existing market data clients lack effective delay monitoring mechanisms, leading to investment decision errors. Furthermore, manual comparison is inefficient and makes it difficult to achieve systematic data analysis and processing.
By receiving video feeds of the data interfaces of multiple client applications under test, an AI model is used to locate and extract indicator data from the screenshots of the data interfaces, and then compares the data with standard data with a delay to achieve non-intrusive automated evaluation.
It enables efficient evaluation of multi-source data, provides objective latency comparison results, helps users choose the appropriate market data client, and improves the accuracy and efficiency of investment decisions.
Smart Images

Figure CN119938733B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of financial technology, and in particular to a method for comparing delays in multi-source data, a device for comparing delays in multi-source data, an electronic device, and a computer-readable storage medium. Background Technology
[0002] In modern financial securities markets, market participants rely on various market data clients to obtain real-time stock prices and buy / sell order information to make investment decisions. The accuracy and timeliness of real-time market data are crucial for investment decisions.
[0003] While various market data clients exist, none offer a unified benchmark for measuring market latency. Most clients lack effective latency monitoring mechanisms, forcing users to rely on subjective judgments of market real-time performance. This approach is not only subjective but also prone to flawed investment decisions. Existing technologies primarily rely on manual comparisons, which are inefficient and hinder systematic data analysis and processing. Therefore, there is an urgent need for a solution that can automatically and accurately assess latency differences across multiple market data sources to help users better select the appropriate client. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, device, electronic device, and computer-readable storage medium for comparing the latency of multi-source data, in order to efficiently evaluate the latency of multi-source data, addressing the aforementioned technical problems.
[0005] In a first aspect, embodiments of this application provide a method for comparing delays in multi-source data, the method comprising the following steps:
[0006] Receive multiple data interface videos corresponding to client applications under test, wherein the data interface videos are captured by video capture of the data interface of the client applications under test;
[0007] For each data interface video, multiple frames of data interface screenshots are extracted from the data interface video, and indicator data information is located and extracted from each frame of the data interface screenshot using an AI (Artificial Intelligence) model. The indicator data information includes indicator data and the snapshot timestamp corresponding to the indicator data.
[0008] Receive standard data information from a standard data source server, the standard data information including standard data and the standard update timestamp corresponding to the standard data;
[0009] The indicator data information corresponding to each client application under test is compared with the standard data information with a delay to obtain the evaluation result corresponding to each client application under test.
[0010] In this embodiment, multiple clients from different data sources are acquired, and video captures are performed on the data interfaces of each client to obtain video of the data interfaces of multiple client applications under test. Then, multiple frames of data interface screenshots are extracted from the data interface videos. An AI model is then used to locate and extract indicator data information from the data interface screenshots. These multiple client applications under test represent different data sources, achieving non-intrusive and automated acquisition of indicator data information from multiple data sources. This embodiment also receives standard data information from a standard data source server. By comparing the indicator data information corresponding to each client application under test with the standard data information in terms of latency, the evaluation results for each client application under test are obtained, achieving efficient evaluation of the data latency level from multiple data sources.
[0011] In one possible implementation, the AI model includes an object detection model and an OCR model. The step of locating and extracting indicator data information from each frame of the data interface screenshot using the AI model includes performing the following processing on each frame of the data interface screenshot:
[0012] The target detection model is used to detect the position of the indicator data and the position of the snapshot timestamp in the screenshot of the data interface.
[0013] Based on the location of the indicator data and the location of the snapshot timestamp, obtain screenshots of the indicator data and snapshot timestamps;
[0014] The OCR (Optical Character Recognition) model is used to perform text recognition processing on the screenshot of the indicator data and the screenshot of the snapshot timestamp to obtain the indicator data and the snapshot timestamp.
[0015] In one possible implementation, the object detection model is trained as follows:
[0016] Construct a sample set, which includes multiple client data interface screenshot samples and corresponding labeled screenshots of the data interface screenshot samples;
[0017] The target detection model is used to detect the location of the indicator data and the location of the snapshot timestamp in the data interface screenshot sample.
[0018] The loss function value is determined based on the deviation between the position of the indicator data and the position of the indicator data in the labeled screenshot, and the deviation between the position of the snapshot timestamp and the position of the snapshot timestamp in the labeled screenshot.
[0019] Adjust the model parameters of the object detection model based on the loss function value to obtain a trained object detection model.
[0020] In one possible implementation, the evaluation result includes latency information; the step of comparing the indicator data information corresponding to each of the client applications under test with the standard data information to obtain the evaluation result corresponding to each of the client applications under test includes:
[0021] The received standard data information is sorted in order from earliest to latest according to the standard update timestamps to obtain the first indicator change list;
[0022] For each client application under test, the indicator data information corresponding to the client application under test is sorted in order from earliest to latest according to the snapshot timestamp to obtain the second indicator change list.
[0023] The second indicator change list corresponding to the client application under test is compared with the first indicator change list to obtain the delay time information of each update of the client application under test.
[0024] The delay time information for each update of the client application under test is displayed.
[0025] In one possible implementation, each indicator data information in the second indicator change list has a corresponding indicator change sequence number; after obtaining the delay time information of each update of the client application under test, the method further includes:
[0026] For each of the indicator change sequences, the delay time information corresponding to the indicator change sequence number of multiple client applications under test is compared to determine the update speed order of each client application under test.
[0027] Sort all the client applications under test according to their update speed from fastest to slowest to obtain a list of changes in the third indicator;
[0028] The list of changes in the third indicator is displayed.
[0029] In one possible implementation, the third metric change list includes the update latency difference between any of the tested client applications and the fastest-updating tested client application.
[0030] In one possible implementation, extracting multiple frames of data interface screenshots from each of the data interface videos includes:
[0031] For each of the data interface videos, video frames of the data interface video are acquired at preset time intervals to obtain multiple screenshots of the data interface.
[0032] Secondly, embodiments of this application provide a delay comparison device for multi-source data, the device comprising:
[0033] The video capture module is used to receive data interface videos corresponding to multiple client applications under test, wherein the data interface videos are captured by video capture of the data interface of the client applications under test.
[0034] The indicator data information acquisition module is used to extract multiple frames of data interface screenshots from each data interface video, and to locate and extract indicator data information from each frame of the data interface screenshot using an AI model. The indicator data information includes indicator data and the snapshot timestamp corresponding to the indicator data.
[0035] The standard data information acquisition module is used to receive standard data information from the standard data source server. The standard data information includes standard data and the standard update timestamp corresponding to the standard data.
[0036] The delay comparison module is used to compare the indicator data information corresponding to each of the client applications under test with the standard data information with a delay, so as to obtain the evaluation result corresponding to each of the client applications under test.
[0037] Thirdly, embodiments of this application provide an electronic device, including:
[0038] Memory, used to store programs;
[0039] A processor for executing a program stored in the memory, wherein when the processor executes the program stored in the memory, the processor is configured to perform the method described in the first aspect above.
[0040] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions for performing the multi-source data delay comparison method described in the first aspect above.
[0041] The solutions provided in the second to fourth aspects above are used to implement or cooperate with the multi-source data delay comparison method provided in the first aspect above. Therefore, they can achieve the same or corresponding beneficial effects as the first aspect, and will not be elaborated here.
[0042] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description
[0043] Figure 1 This is a schematic diagram illustrating a securities market data transmission scenario provided in an embodiment of this application.
[0044] Figure 2 A schematic diagram illustrating the implementation environment of a delay comparison method for multi-source data provided in this application embodiment;
[0045] Figure 3 A flowchart illustrating a method for comparing delays in multi-source data provided in an embodiment of this application;
[0046] Figure 4 This is an optional schematic diagram showing a screenshot of the data interface of a client application provided in an embodiment of this application;
[0047] Figure 5 An optional system architecture diagram for the delay comparison method of multi-source data provided in the embodiments of this application;
[0048] Figure 6 A schematic diagram of the structure of a delay comparison device for multi-source data provided in an embodiment of this application;
[0049] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0050] To make the objectives, technical methods, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0051] It should be noted that the meaning of "multiple" (or "more than") in the description of the embodiments of this application refers to two or more, and "greater than," "less than," "exceeding," etc. are understood to exclude the number itself, while "above," "below," "within," etc. are understood to include the number itself. If "first," "second," etc. are used in the description, they are only for the purpose of distinguishing technical features and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of the technical features indicated.
[0052] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: the existence of a alone, the existence of b alone, the existence of c alone, the simultaneous existence of a and b, the simultaneous existence of a and c, the simultaneous existence of b and c, or the simultaneous existence of a, b, and c, where a, b, and c can be single or multiple.
[0053] The terms "substantially," "about," and similar terms used in the embodiments of this application are used as approximate terms, not as terms of degree, and are intended to take into account the inherent biases of measurements or calculations known to those skilled in the art. Furthermore, the term "may" used in describing the embodiments of this application refers to "one or more possible embodiments." The terms "use," "using," and "used" used in the embodiments of this application can be considered synonymous with the terms "utilize," "utilizing," and "utilized," respectively. Additionally, the term "exemplary" is intended to refer to an instance or illustration.
[0054] Generally, securities market data can be obtained from exchanges in various markets. Brokerages and information service providers transmit the data obtained from the exchanges to client devices for users to view. Real-time market data includes opening prices, closing prices, and trading volume, helping users make timely investment decisions. Fast access to market data is crucial; delays can lead to inaccurate decisions and impact investment returns. Therefore, the real-time nature of market data is a key indicator for evaluating the performance of various market data display applications.
[0055] Brokerage and information service provider clients include, but are not limited to, mobile clients, web clients, or PC clients. These clients provide a software interface for users to interact with the services, allowing them to access real-time trading information for markets such as stocks and futures. By connecting with brokerages and information service providers, clients receive real-time data from exchanges, helping users stay informed about market dynamics and make informed investment decisions.
[0056] See Figure 1 , Figure 1This is a schematic diagram illustrating a securities market data transmission scenario provided in an embodiment of this application. The scenario includes a securities exchange server, a service provider server, and terminal equipment.
[0057] The stock exchange servers are used to publish market data in real time. These exchanges include, but are not limited to, the Shanghai Stock Exchange, the Shenzhen Stock Exchange, and futures exchanges. This market data includes: Level 1 market data, which contains basic data such as the latest transaction price, volume, buy and sell orders, highest price, lowest price, opening price, and closing price; and Level 2 market data, which includes buy and sell order data (such as five-level and ten-level buy and sell order data), and tick-by-tick transactions. Level 2 market data provides more market depth information and is more frequent and changes faster than Level 1 market data.
[0058] Service provider servers include, but are not limited to, brokerage servers and information service provider servers. Service provider servers receive data streams of market data from securities exchange servers and perform the following exemplary processing on the received market data: storing the data in a cache or database for subsequent quick query or analysis, while processing multi-level market data, such as tick-by-tick transactions and order book changes; further processing the received raw market data and distributing it to various internal systems or front-end display platforms, such as trading systems, analysis systems, and mobile applications, to meet the needs of different business systems.
[0059] Terminal devices include, but are not limited to, mobile terminals, tablet terminals, laptops, and desktop computers. These devices run client applications and connect to the service provider's server via network requests, push technologies (such as WebSocket), or API interfaces. The client application visualizes the received real-time market data, such as candlestick charts, buy / sell orders, and stock lists. The client application can further process the data (such as calculating technical indicators and trend analysis) and display the results to the user. Users view real-time market data through the application interface and make trading decisions based on data changes. Some advanced applications also provide analytical tools, such as technical indicators and historical data comparisons, to help users better understand the market.
[0060] The aforementioned service providers' servers and terminal devices all involve processing market data, which leads to differences in the time it takes for market data to be pushed to different client applications. Push latency directly impacts whether users can obtain crucial information promptly and react quickly to market changes. However, due to various technical and application limitations, comparing push latency in this business scenario presents some key challenges:
[0061] (1) The client is closed and cannot obtain market data from the client through programmatic interfaces.
[0062] Market data display applications are often designed to be relatively closed, especially since some clients do not provide public API interfaces. This means that external systems find it difficult to directly obtain the real-time updated market data within these clients through programmatic means, and therefore cannot obtain information about the time when the client received the latest data.
[0063] Traditional interface methods rely on program integration to obtain data through predefined protocols or APIs. However, closed clients do not expose such interfaces, making it impossible for external systems to obtain market updates in a standard programmatic manner, which increases the difficulty of implementing latency detection.
[0064] Since market data is processed, rendered, and displayed internally within each client, the only one who can see the changes in market prices is the user. External tools need to acquire and analyze this data by simulating user behavior (such as through non-intrusive methods like image recognition), which greatly increases the complexity of development and maintenance.
[0065] (2) The operating environment varies greatly. Different hardware and system platforms have different market data clients, making it difficult to unify the latency detection method across platforms.
[0066] Different clients run on various hardware and system platforms, including PCs, mobile phones, and web applications. The differences in operating systems (such as iOS, Android, Windows, and macOS) and hardware performance of different devices mean that push notification latency comparisons are difficult to monitor uniformly using a single platform or tool.
[0067] To achieve cross-platform latency detection, it is necessary to overcome differences in hardware and operating systems and find suitable technical means to synchronously collect and detect market data from various clients. This unified cross-platform comparison method requires the system to be adaptable to the technology stacks and operating environments of different platforms, which is a huge challenge to achieving automated comparison.
[0068] (3) Frequent client updates make it difficult to implement structured and automated latency testing.
[0069] Another challenge lies in the frequent updates of client versions. With the rapid development of technology and changing user needs, the client software of various market data display applications is updated very frequently. New versions of the application may change in interface, data display, and response logic, which makes any fixed detection methods (such as fixed scripts or specific interfaces) easily ineffective.
[0070] Therefore, to achieve structured and automated latency testing, a sufficiently flexible and adaptable testing solution is needed to cope with various client updates and changes. At the same time, the automated testing solution needs to be able to dynamically adjust its testing strategies to ensure it can adapt to different versions and platforms of clients.
[0071] Based on the above-mentioned problems, this application proposes a method, device, electronic device, and computer-readable storage medium for comparing the latency of multi-source data, which can be used to efficiently evaluate the latency of multi-source data.
[0072] See Figure 2 , Figure 2 This is a schematic diagram illustrating the implementation environment of a delay comparison method for multi-source data provided in an embodiment of this application. For example... Figure 2 As shown, the implementation environment includes at least one standard data source server, multiple service provider servers, multiple terminal devices, and at least one evaluation terminal.
[0073] The standard data source server is used to provide standard data.
[0074] The service provider server connects to the standard data source server via the network, can receive standard data from the standard data source server, and then process the standard data into indicator data.
[0075] Multiple terminal devices run client applications from different service providers. Each client application communicates with its corresponding service provider's server via the network. The service provider's server can be considered the data source for the client applications. The client applications receive metric data from the service provider's server and display the metric data through a data interface. Each terminal device also runs a screen recording application, which can record the screen of the client application's data interface to generate a video of the data interface.
[0076] The evaluation terminal communicates with both the standard data source server and the terminal device via network. It receives standard data from the standard data source server and video feeds from the terminal device. Based on the received standard data and video feeds, the evaluation terminal performs latency comparison evaluations using multi-source data. It should be understood that the evaluation terminal can be any electronic device, such as a mobile phone, desktop computer, laptop, or tablet, or it can be a server. The server can be a physical server or a cloud server; it can be a standalone server or a server cluster.
[0077] In one possible embodiment, the standard data source server is a stock exchange server, the service provider server is a financial service provider server, the terminal device is a mobile phone, tablet, or PC with screen recording capabilities, and a client application running on the terminal device is connected to the financial service provider server via a network. The evaluation end is a cloud server. The stock exchange server provides standard market data. The financial service provider server receives the standard market data from the stock exchange server, processes it into market indicator data, and sends the market indicator data to the client application, which then renders and displays the market indicator data. The terminal device runs the client application, displays the data interface of the client application on a screen, and records the data interface of the client application using a locally running screen recording application. The resulting video of the data interface is then sent to the cloud server (evaluation end). The cloud server (evaluation end) receives standard data information from the standard data source server and the video of the data interface from the terminal device. Based on the received standard data information and the video of the data interface, it performs a latency comparison evaluation of multi-source data and outputs the latency evaluation results of each client application, thereby achieving a data latency comparison of multiple client applications in a financial scenario. For ease of description, this application embodiment will use a standard data source server as a stock exchange server, a service provider server as a financial service provider server, a terminal device as a mobile phone with screen recording function, and a cloud server as the evaluation end as examples to describe the implementation process of the scheme.
[0078] It should be noted that the solutions in this application are not limited to financial scenarios, but can also be applied to logistics scenarios, such as for delay evaluation of data from multiple logistics service applications. This application does not specifically limit the application scenarios.
[0079] See Figure 3 , Figure 3 This is a flowchart illustrating a method for comparing delays in multi-source data provided in an embodiment of this application. This method can be executed by the aforementioned evaluation terminal and includes, but is not limited to, the following steps:
[0080] Step S101: Receive data interface videos corresponding to multiple client applications under test. The data interface videos are captured by video capture of the data interface of the client applications under test.
[0081] Among them, multiple client applications under test are data sources from different sources, and the client applications under test run on terminal devices.
[0082] It should be noted that video capture can be done offline or online. Offline methods involve capturing the data interface video of the client application under test through screen recording; online methods involve live streaming the interface of the client application under test to capture video.
[0083] One possible approach is to utilize the screen recording function of the terminal device to record the data interface of the client application under test, generating a video of the data interface, and then sending it to the evaluation end. The aforementioned client applications under test each correspond to a different data source, meaning the data displayed by these applications originates from different data sources.
[0084] In practice, a start time and recording duration can be preset. Starting from this start time, the screen recording of the data interface of each client application under test begins. When the recorded video duration reaches the preset recording duration, a data interface video is generated, and the recording of the next data interface video immediately begins, thus generating multiple consecutive data interface videos. The terminal device then sends the recorded data interface videos to the evaluation end.
[0085] It should be noted that the aforementioned client application can be a mobile application, a PC application, or a web application. This application embodiment does not limit the specific form of the client application.
[0086] Step S102: For each data interface video, extract multiple frames of data interface screenshots from the data interface video, and locate and extract indicator data information from each frame of data interface screenshots using an AI model. The indicator data information includes indicator data and the snapshot timestamp corresponding to the indicator data.
[0087] See Figure 4 , Figure 4 This is an optional schematic diagram showing a screenshot of the data interface of the client application provided in an embodiment of this application. Figure 4 The screenshot shown is of a mobile application's data interface. The screenshot includes data such as average price, highest price, lowest price, and opening price, and also includes a snapshot timestamp.
[0088] It should be understood that the data interface video contains multiple frames of data interface screenshots, each frame containing indicator data information. From these multiple frames, the changes in various indicator data can be obtained. For example, each data interface video is 5 minutes long, so the changes in various indicator data during this time period can be obtained, such as the values of the indicator data "average price" at multiple times, such as 9:30:00, 9:31:00, and 9:32:00. The times mentioned here are the snapshot timestamps.
[0089] As one possible implementation, for each data interface video, extracting multiple data interface screenshots from the data interface video can include: for each data interface video, acquiring video frames of the data interface video at preset time intervals to obtain multiple data interface screenshots.
[0090] It should be understood that, in order to obtain indicator data information, this application embodiment first divides the data interface video into multiple frames of data interface screenshots, where the time interval between the multiple frames of data interface screenshots is fixed; then, an AI model is used to locate and extract indicator data information (including extracting indicator data and extracting snapshot timestamps) from the data interface screenshots. Unlike the traditional method, it does not rely on program interfaces to obtain client data. This application embodiment realizes non-intrusive and automated acquisition of indicator data information from multiple data sources.
[0091] In one possible implementation, the AI model includes an object detection model and an OCR model. The AI model locates and extracts indicator data information from each frame of the data interface screenshot, including performing the following processing on each frame of the data interface screenshot:
[0092] The target detection model detects the location of the indicator data and the location of the snapshot timestamp in the screenshot of the data interface.
[0093] Obtain screenshots of the indicator data and snapshot timestamps based on the location of the indicator data and the location of the snapshot timestamp;
[0094] The indicator data and snapshot timestamp are obtained by performing text recognition processing on the screenshot of indicator data and the screenshot of snapshot timestamp using an OCR model.
[0095] The object detection model can be trained in the following way:
[0096] Construct a sample set, which includes screenshots of data interfaces from multiple clients and labeled screenshots corresponding to the data interface screenshots;
[0097] The location of indicator data and snapshot timestamp in the data interface screenshot sample is detected using the object detection model;
[0098] The loss function value is determined based on the deviation between the position of the indicator data and the position of the indicator data in the labeled screenshot, and the deviation between the position of the snapshot timestamp and the position of the snapshot timestamp in the labeled screenshot.
[0099] Adjust the model parameters of the object detection model based on the loss function value to obtain a well-trained object detection model.
[0100] It should be noted that the above-mentioned annotated screenshots can be generated in the following way: the indicator data and snapshot timestamps in the data interface screenshot sample are annotated with boxes.
[0101] In some possible embodiments of this application, after constructing the sample set, the sample set is further divided into a training set and a test set according to a preset ratio, for example, the ratio of the training set to the test set is 2:1.
[0102] In practice, screenshots of data interfaces from the training set can be input into the object detection model. The model detects the positions of indicator data and snapshot timestamps in the screenshots. Based on the deviations of the indicator data positions from their labeled positions in the screenshots, and the deviations of the snapshot timestamp positions from their labeled positions in the screenshots, the loss function value is determined. It is then determined whether the loss function value has converged to its minimum or whether the training epochs have reached a preset maximum. If so, the current object detection model is considered the trained model. If not, the gradient is calculated based on the loss function value, and the model parameters are updated using gradient backpropagation. The model is then trained again based on the training set. After obtaining the trained object detection model, it is tested using a test set to verify the accuracy of the output results.
[0103] By connecting the trained object detection model to the OCR model, the AI model of this application embodiment can be obtained. By inputting the screenshot of the data interface into the AI model, the indicator data information in the image can be converted into machine-coded text information.
[0104] Step S103: Receive standard data information from the standard data source server. The standard data information includes standard data and the standard update timestamp corresponding to the standard data.
[0105] It should be understood that the embodiments of this application obtain standard data information from a standard data source server, and this standard data information will be used as a comparison benchmark in the subsequent data delay comparison process.
[0106] Step S104: Compare the indicator data information of each client application under test with the standard data information with a delay to obtain the evaluation results of each client application under test.
[0107] For example, the client applications under test include client application 1, client application 2 and client application 3. Each application has corresponding metric data information. The metric data information of an application contains at least one type of metric data. Each type of metric data contains multiple variable values, and each variable value corresponds to a snapshot timestamp.
[0108] As shown in Table 1, for the "highest price" metric, different client applications have a series of fluctuating values. Each fluctuating value corresponds to a snapshot timestamp. By comparing the snapshot timestamps corresponding to a certain fluctuating value in different client applications, the data latency of multiple client applications can be determined, thus obtaining the evaluation results for each client application under test. For example, in the example in Table 1, it can be determined by comparison that client application 1 updates data the fastest, while client application 3 updates data the slowest.
[0109] Table 1
[0110]
[0111] In this embodiment, multiple clients from different data sources are acquired, and the screen of the data interface of each client is recorded to obtain video of the data interface corresponding to multiple client applications under test. Then, multiple frames of data interface screenshots are extracted from the data interface videos, and OCR technology is used to locate and extract indicator data information from the data interface screenshots, thus achieving automated acquisition of indicator data information from multiple data sources. This embodiment also receives standard data information from a standard data source server. By comparing the indicator data information corresponding to each client application under test with the standard data information in terms of latency, the evaluation results for each client application under test are obtained, achieving efficient evaluation of the data latency level of multiple data sources.
[0112] In some possible embodiments of this application, the evaluation results include latency information, which indicates the latency difference between the client application under test and the standard update timestamp, or represents the latency difference between a client application under test and the fastest updating client application under test.
[0113] In some possible embodiments of this application, the indicator data information corresponding to each client application under test is compared with the standard data information with a delay to obtain the evaluation results corresponding to each client application under test, including:
[0114] The received standard data information is sorted in order from earliest to latest according to the standard update timestamps to obtain the first indicator change list;
[0115] For each client application under test, the corresponding indicator data information of the client application under test is sorted in order from earliest to latest according to the snapshot timestamp, and a second indicator change list is obtained.
[0116] By comparing the second indicator change list corresponding to the client application under test with the first indicator change list, the delay time information of each update of the client application under test can be obtained.
[0117] The delay time information for each update of each client application under test is displayed.
[0118] See Table 2 below, which is an optional first indicator variation list provided in the embodiments of this application. Table 2 shows the standard data corresponding to the three indicator data: highest price, lowest price, and average price.
[0119] Table 2
[0120]
[0121] See Table 3 below, which is an optional list of second indicator changes provided in an embodiment of this application. Table 3 shows the highest price, lowest price, and average price data updated by a certain client application.
[0122] Table 3
[0123]
[0124] By comparing Table 2 and Table 3, the latency information for each update of the client application under test can be determined. For example, the snapshot timestamp of the first update of the indicator data (corresponding to indicator change number 1) of the client application under test is 9:30:09, and the corresponding standard update timestamp is 9:30:00. Therefore, the latency time difference of the client application under test in the first update can be determined to be "+0:0:09".
[0125] It should be understood that the embodiments of this application also display the delay time information of each update of the client application under test, so as to provide users with the data delay information of the client application under test.
[0126] As shown in Table 3 above, each indicator data information in the second indicator change list has a corresponding indicator change sequence number. After obtaining the delay time information for each update of the client application under test, this embodiment of the application may further include the following steps:
[0127] For each indicator change sequence number, the delay time information of multiple client applications under test corresponding to the indicator change sequence number is compared to determine the update speed order of each client application under test.
[0128] Sort all the client applications under test in descending order of update speed to obtain a list of changes in the third metric.
[0129] The list of changes in the third indicator is displayed.
[0130] It should be understood that the embodiments of this application sort multiple client applications under test according to their update speed, so that users can know the speed of each client application under test.
[0131] In one possible implementation, the third metric change list includes the update latency difference between any client application under test and the fastest updating client application under test.
[0132] It should be understood that the embodiments of this application also display the client applications ranked from second to last in the third indicator change list, showing how much slower they are compared to the fastest updating client application, so that users can more clearly understand the performance of each client application.
[0133] As an example, the solution provided in this application can be applied to financial scenarios to compare and analyze the data push speed of multiple financial service clients. Specifically, it uses artificial intelligence algorithms to automatically collect data from market data clients and data sources from different sources, compares market data latency, and achieves automated comparison of latency of multi-source market data in the market. This can solve the problem that the latency efficiency of a large number of market data clients in the current market is difficult to assess.
[0134] See Figure 5 , Figure 5 This application provides an optional system architecture diagram for a multi-source data delay comparison method. This system architecture is suitable for financial scenarios and is used to compare and analyze the data push speed of multiple financial service clients. The system architecture includes a collection layer, a data layer, an algorithm layer, and an analysis layer. The collection layer collects market data from various financial service clients, including but not limited to PC clients, web clients, and mobile clients. Specifically, the market data is collected by screen recording the client to obtain a video stream. The collection layer also accesses an exchange cloud data platform to collect standard market data. The data layer processes the video stream, including dividing it into multiple frames to obtain screenshots of the client's market data interface. The data layer also processes the standard market data, including data cleaning and filtering. The algorithm layer uses AI recognition to identify the location of market data in the screenshot, then uses OCR to parse the characters at that location to obtain the client's market data. The client's market data is then translated to obtain structured client market data. The algorithm layer also compares the structured client market data with the standard market data and outputs the corresponding comparison results. The analysis layer is used to analyze the comparison results, including difference analysis, latency ranking, monitoring rules, and data display.
[0135] Based on the solution provided in this application, market data from clients using different data sources can be integrated, thereby providing users with comprehensive latency analysis. This application leverages artificial intelligence technology, utilizing object detection and OCR models to acquire client market data, eliminating the need for programmatic interfaces and overcoming monitoring difficulties caused by differences in the operating environments of different clients. Furthermore, since this application collects screen recordings of the client's data interface, the videos contain all update information from the client within a specific time period, thus avoiding the data omissions that can easily occur when collecting client data via interfaces due to frequent client updates.
[0136] Based on the solution provided in this application, unified comparison of multi-source market data clients can be achieved, integrating data from different sources to provide users with comprehensive latency analysis. Simultaneously, a unified latency measurement standard can be provided to achieve consistent latency comparison of financial market data, helping investors better evaluate the performance of various market data sources and ensure optimal information acquisition. This application significantly improves monitoring efficiency, enabling users to promptly identify and address latency issues.
[0137] The methods of the embodiments of this application have been described above, and the apparatus of the embodiments of this application is provided below.
[0138] See Figure 6 , Figure 6 This is a schematic diagram of a multi-source data delay comparison device provided in an embodiment of this application. This multi-source data delay comparison device has the function of implementing the multi-source data delay comparison method provided in any of the above embodiments. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0139] like Figure 6 As shown, the delay comparison device for multi-source data includes:
[0140] The video capture module is used to receive data interface videos of multiple client applications under test. The data interface videos are captured by video capture of the data interface of the client applications under test. The multiple client applications under test are client applications corresponding to different data sources.
[0141] The indicator data information acquisition module is used to extract multiple frames of data interface screenshots from each data interface video, and to locate and extract indicator data information from each frame of data interface screenshots using an AI model. The indicator data information includes indicator data and the snapshot timestamp corresponding to the indicator data.
[0142] The standard data information acquisition module is used to receive standard data information from the standard data source server. The standard data information includes standard data and the standard update timestamp corresponding to the standard data.
[0143] The delay comparison module is used to compare the indicator data of each client application under test with the standard data information with delay to obtain the evaluation results of each client application under test.
[0144] It should be noted that the information interaction and execution process between the above modules / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0145] See Figure 7 This application also provides an electronic device 300. The electronic device 300 can be a server or a terminal, and its internal structure includes, but is not limited to:
[0146] Memory 310 is used to store programs;
[0147] The processor 320 is used to execute the program stored in the memory 310. When the processor 320 executes the program stored in the memory 310, the processor 320 is used to execute the multi-source data delay comparison method as in any of the preceding embodiments.
[0148] The processor 320 and memory 310 can be connected via a bus or other means.
[0149] The memory 310, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs, such as the multi-source data delay comparison method described in any embodiment of this application. The processor 320 implements the multi-source data delay comparison method as described in any of the preceding embodiments by running the non-transitory software program and instructions stored in the memory 310.
[0150] The memory 310 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function. The data storage area may store the delay comparison method for executing the multi-source data described above. Furthermore, the memory 310 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 310 may optionally include memory remotely located relative to the processor 320, and these remote memories may be connected to the processor 320 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0151] The non-transient software program and instructions required to implement the above-described multi-source data delay comparison method are stored in memory 310. When executed by one or more processors 320, the multi-source data delay comparison method provided in any embodiment of this application is executed.
[0152] This application also provides a computer-readable storage medium storing computer-executable instructions for executing the above-described method for comparing delays in multi-source data.
[0153] In one embodiment, the storage medium stores computer-executable instructions that are executed by one or more control processors, such as one or more processors 320 in the electronic device 300, which can cause the one or more processors 320 to perform the multi-source data delay comparison method provided in any embodiment of this application.
[0154] The embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0155] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0156] Furthermore, one embodiment of this application also provides a computer program product, including a computer program that, when executed by a processor, implements a delayed comparison method for multi-source data as described in any of the preceding embodiments.
[0157] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0158] It should also be understood that the various implementation methods provided in this application can be combined arbitrarily to achieve different technical effects.
[0159] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the scope of the technology disclosed in this application, or make equivalent substitutions for some of the technical features. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the protection scope of this application.
Claims
1. A method for comparing delays in multi-source data, characterized in that, The method includes the following steps: Receive multiple data interface videos corresponding to client applications under test, wherein the data interface videos are captured by video capture of the data interface of the client applications under test; For each data interface video, multiple frames of data interface screenshots are extracted from the data interface video, and the trained AI model is used to locate and extract indicator data information from each frame of the data interface screenshot. The indicator data information includes indicator data and the snapshot timestamp corresponding to the indicator data. Receive standard data information from a standard data source server, the standard data information including standard data and the standard update timestamp corresponding to the standard data; The received standard data information is sorted in order from earliest to latest according to the standard update timestamps to obtain the first indicator change list; For each client application under test, the indicator data information corresponding to the client application under test is sorted in order from earliest to latest according to the snapshot timestamp to obtain a second indicator change list. Each indicator data information in the second indicator change list has a corresponding indicator change sequence number. The second indicator change list corresponding to the client application under test is compared with the first indicator change list to obtain the delay time information of each update of the client application under test, and the delay time information of each update of the client application under test is displayed. For each of the indicator change sequences, the delay time information corresponding to the indicator change sequence number of multiple client applications under test is compared to determine the update speed order of each client application under test. All client applications under test are sorted according to the update speed from fastest to slowest to obtain a third indicator change list. The third indicator change list is displayed, and the third indicator change list includes the update delay time difference between any client application under test and the client application under test with the fastest update speed.
2. The method according to claim 1, characterized in that, The AI model includes an object detection model and an OCR model; the step of locating and extracting indicator data information from each frame of the data interface screenshot using the trained AI model includes performing the following processing on each frame of the data interface screenshot: The target detection model is used to detect the position of the indicator data and the position of the snapshot timestamp in the screenshot of the data interface. Based on the location of the indicator data and the location of the snapshot timestamp, obtain screenshots of the indicator data and snapshot timestamps; The OCR model is used to perform text recognition processing on the screenshot of the indicator data and the screenshot of the snapshot timestamp to obtain the indicator data and the snapshot timestamp.
3. The method according to claim 2, characterized in that, The target detection model is trained in the following manner: Construct a sample set, which includes multiple client data interface screenshot samples and corresponding labeled screenshots of the data interface screenshot samples; The target detection model is used to detect the location of the indicator data and the location of the snapshot timestamp in the data interface screenshot sample. The loss function value is determined based on the deviation between the position of the indicator data and the position of the indicator data in the labeled screenshot, and the deviation between the position of the snapshot timestamp and the position of the snapshot timestamp in the labeled screenshot. Adjust the model parameters of the object detection model based on the loss function value to obtain a trained object detection model.
4. The method according to claim 1, characterized in that, For each of the data interface videos, extracting multiple frames of data interface screenshots from the data interface video includes: For each of the data interface videos, video frames of the data interface video are acquired at preset time intervals to obtain multiple screenshots of the data interface.
5. A delay comparison device for multi-source data, characterized in that, The device is used in the method described in any one of claims 1-4.
6. An electronic device, characterized in that, include: Memory, used to store programs; A processor for executing a program stored in the memory, wherein when the processor executes the program stored in the memory, the processor is configured to implement the method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The device stores computer-executable instructions for performing the method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Live broadcast delay testing method and live broadcast delay testing device
CN108513149A
Multi-source data standardization processing method, device and system and storage medium
CN115629889A