Matrix and tree based fast converging lookup data processing method, device and medium
By using a matrix and tree-based combined structure, the high concurrency and high throughput issues of data processing in rail transit systems are solved, enabling integrated applications in multiple scenarios, supporting real-time data processing on the order of 1 million points, and improving the efficiency and reliability of data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CASCO SIGNAL LTD
- Filing Date
- 2022-12-29
- Publication Date
- 2026-06-23
AI Technical Summary
Existing technologies are insufficient to achieve high concurrency, high reliability, and high throughput in data processing within rail transit systems, and cannot support integrated applications across multiple scenarios.
It adopts a matrix and tree-based combined structure, constructs data segmentation conditions by fixing the number of rows selected and the number of critical collision columns, and combines red-black tree sorting to achieve fast convergence search of data points. It supports real-time data processing services, key-value data processing services, real-time computing services, and real-time alarm processing services.
It achieves a real-time data processing capacity of 1 million points, supports comprehensive applications in multiple scenarios of rail transit, and improves the efficiency and reliability of data processing.
Smart Images

Figure CN116126858B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to train signal control systems, and more particularly to a fast convergence search data processing method, device, and medium based on matrices and trees. Background Technology
[0002] Data processing services are widely used in various industrial control fields, and play a particularly important role in urban rail transit systems. Such systems typically have numerous sub-systems, requiring more independent and efficient processing service modules to handle different services.
[0003] Currently, the domestic market for rail transit systems is becoming increasingly competitive and saturated, requiring more refined data processing, which inevitably poses significant challenges to data processing services.
[0004] Therefore, achieving rapid data processing and supporting comprehensive applications across multiple rail transit scenarios has become a technical problem that needs to be solved. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a high-concurrency, high-reliability, and high-throughput matrix and tree-based fast convergence search data processing method, device, and medium.
[0006] The objective of this invention can be achieved through the following technical solutions:
[0007] According to a first aspect of the present invention, a fast convergence search data processing method based on matrices and trees is provided. The method specifies a fixed number of selected rows and a critical collision column number through a service configuration file, thereby constructing a matrix and tree-based union. The method adopts a strategy of trading space for time using the matrix and tree union to achieve fast convergence search processing of real-time data points.
[0008] As a preferred technical solution, the fixed number of selected rows is specified by the real-time processing system configuration, wherein the fixed number of selected rows in the system configuration is greater than the maximum device number of the real-time data point.
[0009] As a preferred technical solution, the row segmentation condition of the matrix is related to the device number of the real-time data point. The device number corresponding to each real-time data point represents the row number of the matrix in which it is located.
[0010] As a preferred technical solution, the number of critical collision columns is specified by the real-time processing system configuration, which is adjusted according to the system's own data capacity.
[0011] As a preferred technical solution, the number of critical collision columns is configured as a fixed value.
[0012] As a preferred technical solution, the column segmentation condition of the matrix is related to the point number of the real-time data point, and the point number corresponding to each real-time data point corresponds to the value after modulo conversion of the critical collision column number.
[0013] As a preferred technical solution, the modulo conversion algorithm between the point number corresponding to the real-time data point and the critical collision column number is as follows: when the point number is less than the critical collision column number, the point number is the column number; when the point number is greater than or equal to the critical collision column number, the value after modulo conversion of the point number is the column number.
[0014] As a preferred technical solution, the real-time data points are configured with fixed rows and variable columns based on the matrix's row and column partitioning conditions.
[0015] As a preferred technical solution, the matrix unit containing data may contain several real-time data points, which are organized in the matrix unit using a red-black tree sorting method.
[0016] As a preferred technical solution, this method is applied in real-time data processing services and key-value data processing services. The data types processed in the real-time data processing services include analog quantities, digital quantities, and cumulative quantities, while the data types processed in the key-value data processing services include KVL, KVS, and KVB.
[0017] As a preferred technical solution, the real-time data processing service and the key-value data processing service are a combination of matrices and trees of various data types. The matrix is composed of the matrix column number after the collision conversion of the device number of the measurement point and the matrix row number and the point number mode. The tree is composed of data points within the matrix unit. These data points are the corresponding real-time database data points that the measurement points need to process and update to the real-time database.
[0018] As a preferred technical solution, this method is applied in real-time computing processing services. The device number of the computing point in the real-time library is converted into the matrix row number and point number mode after collision conversion. The content in the tree within the matrix cell pointed to by the value is the real-time data point to be calculated and processed.
[0019] As a preferred technical solution, this method is applied in real-time alarm processing services. The device number of the alarm point in the real-time database is converted into the matrix row number and point number mode collision conversion value, which is the matrix column number. The content in the tree within the matrix cell pointed to by the value is the real-time data point of the alarm to be processed.
[0020] As a preferred technical solution, this method supports the comprehensive application of multiple scenarios in rail transit.
[0021] According to a second aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described thereon.
[0022] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.
[0023] Compared with the prior art, the present invention has the following advantages:
[0024] 1. The fast convergence search method for matrices and trees implemented in this invention supports a real-time data processing capacity of no less than 1 million points and supports comprehensive application in multiple scenarios of rail transit.
[0025] 2. The matrix unit containing data in the matrix designed in this invention may contain several real-time data points. These data points are sorted and organized in the matrix unit using a red-black tree, which together construct a union based on a matrix and a tree.
[0026] 3. The matrix and tree-based union defined in this invention adopts a space-for-time strategy to achieve fast convergence when searching for a large number of points in a data processing service.
[0027] 4. This invention designs a matrix based on a fixed number of selected rows and a critical collision column number as data segmentation conditions. This matrix has the characteristics of fixed selected rows and columns that can be scaled.
[0028] 5. The method implemented by this invention has been used in real-time processing service modules such as real-time data processing service, key-value data processing service, real-time calculation processing service, and real-time alarm processing service. Attached Figure Description
[0029] Figure 1 A schematic diagram showing the configuration of the service system;
[0030] Figure 2 A schematic diagram illustrating the construction of a union of matrices and trees;
[0031] Figure 3 This is a schematic diagram illustrating fast convergence lookup for matrices and trees. Detailed Implementation
[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0033] like Figure 1As shown in the diagram, the configuration guide for the processing service system is configured to start the system by specifying a fixed number of rows to be selected and a critical number of columns to be collided, thereby constructing a matrix with the fixed number of rows to be selected and the critical number of columns to be collided as the dividing conditions.
[0034] The fixed number of rows selected is specified by the real-time processing system configuration, and the fixed number of rows selected in the system configuration is usually greater than the maximum device number of the real-time data point.
[0035] The row partitioning condition of the matrix is related to the device number of the real-time data point. The device number corresponding to each real-time data point usually represents the row number of the matrix in which it is located.
[0036] The critical number of columns at which a point in the matrix collides is specified by the real-time processing system configuration. This configuration is adjusted according to the system's own data capacity and is usually configured as a fixed value.
[0037] The column splitting condition of the matrix is related to the point number of the real-time data point. The point number corresponding to each real-time data point, after being converted by modulo the critical collision column number, usually represents the column number of the matrix in which it belongs.
[0038] The algorithm for converting the real-time data point number to the critical collision column number by modulo is as follows: when the point number is less than the collision column, the point number is the column number; when the point number is greater than or equal to the collision column, the value after modulo conversion of the point number is the column number.
[0039] Based on the row and column partitioning conditions of the matrix, the real-time data points form a matrix with fixed rows and variable columns.
[0040] like Figure 2 The diagram illustrates the construction of a matrix-tree union. A matrix cell containing data may contain several real-time data points. These data points are organized using a red-black tree sorting method within the matrix cell. Together, these construct a matrix-tree union.
[0041] In the processing service, real-time data points are ultimately organized and sorted using a combination of matrices and trees. This matrix-tree combination employs a space-for-time tradeoff strategy to achieve fast convergence in searches. The basic implementation process of this space-for-time strategy involves first processing two-dimensional data, then constructing trees within individual cells. These data structures organize the data points, and searches are performed through a construction-process approach.
[0042] like Figure 3 The diagram illustrates the fast convergence lookup of matrices and trees. Data points have their own attributes: device number and point number. The device number points to the row number of the matrix, and the point number, after mode conversion, is the column number of the matrix. The red-black tree in the matrix cell is found, and finally, the tree is traversed to find the target real-time database point to be processed.
[0043] The data types processed by the real-time data processing service include analog quantities, digital quantities, and cumulative quantities. The data types processed by the key-value data processing service include KVL, KVS, and KVB. After the service program starts, these types of measurement-type real-time data points are each organized into a combination of matrices and trees.
[0044] These two processing services are a combination of matrices and trees of various data types. The matrix is composed of the matrix row number and the column number after the collision conversion of the device number of the measurement point and the point number pattern. The tree is composed of the data points in the matrix cells. These data points are the corresponding real-time database data points that the measurement points need to process and update in the real-time database.
[0045] After the real-time computing service is started, the device number of the computing point in the real-time library is converted into the matrix row number and point number mode collision value, and the content in the tree in the matrix cell pointed to by the value is the real-time data point to be computed and processed.
[0046] After the real-time alarm processing service is started, the device number of the alarm point in the real-time database is converted into the matrix row number and point number mode collision value, and the content in the tree in the matrix cell pointed to by the value is the real-time data point of the alarm to be processed.
[0047] The system supports a real-time data point capacity of no less than 1 million points under unlimited system resources, and supports comprehensive applications in multiple scenarios of rail transit.
[0048] A data processing service based on a fast convergence search method using matrices and trees supports integrated applications across multiple rail transit scenarios, such as modern trams, subways, high-speed rail, and large transportation hubs.
[0049] The above is an introduction to the method embodiments. The following embodiments using electronic devices and storage media will further illustrate the solution of the present invention.
[0050] The electronic device of this invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) or loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0051] Multiple components in the device are connected to the I / O interface, including: input units such as keyboards and mice; output units such as various types of displays and speakers; storage units such as disks and optical discs; and communication units such as network interface cards (NICs), modems, and wireless transceivers. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0052] The processing unit performs the various methods and processes described above, such as the methods of the present invention. For example, in some embodiments, the methods of the present invention may be implemented as computer software programs tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of the methods of the present invention described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute the methods of the present invention by any other suitable means (e.g., by means of firmware).
[0053] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0054] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0055] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0056] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A fast convergent search data processing method based on matrices and trees, characterized in that, This method specifies a fixed number of selected rows and critical collision columns through a service configuration file, and then constructs a matrix-tree based union. It adopts a strategy of trading space for time using the matrix-tree union to achieve fast convergence search and processing of real-time data points. The fixed number of selected rows is specified by the real-time processing system configuration, wherein the fixed number of selected rows in the system configuration is greater than the maximum device number of the real-time data point; the row segmentation condition of the matrix is related to the device number of the real-time data point, and the device number corresponding to each real-time data point represents the row number of its matrix; the critical collision column number is specified by the real-time processing system configuration, and this configuration is adjusted according to the system's own data capacity; the critical collision column number is configured as a fixed value. This method is applied in real-time data processing services and key-value data processing services. The data types processed in the real-time data processing services include analog quantities, digital quantities, and cumulative quantities, while the data types processed in the key-value data processing services include KVL, KVS, and KVB. The matrix contains several real-time data points in its matrix cells, which are organized using a red-black tree sorting method.
2. The fast convergent search data processing method based on matrices and trees according to claim 1, characterized in that, The column splitting condition of the matrix is related to the point number of the real-time data point. The point number corresponding to each real-time data point corresponds to the value after modulo conversion of the critical collision column number.
3. The fast convergent search data processing method based on matrices and trees according to claim 2, characterized in that, The algorithm for converting the point number corresponding to the real-time data point to the critical collision column number by taking the modulo is as follows: when the point number is less than the critical collision column number, the point number is the column number; when the point number is greater than or equal to the critical collision column number, the value after taking the modulo of the point number is the column number.
4. The fast convergent search data processing method based on matrices and trees according to claim 1, characterized in that, The real-time data points are configured with fixed rows and variable columns based on the matrix's row and column partitioning conditions.
5. The fast convergent search data processing method based on matrices and trees according to claim 1, characterized in that, The real-time data processing service and key-value data processing service are a combination of matrices and trees of various data types. The matrix is composed of the matrix row number and the column number after the collision conversion of the device number of the measurement point and the point number mode. The tree is composed of the data points in the matrix unit. These data points are the corresponding real-time database data points that the measurement points need to process and update to the real-time database.
6. The fast convergent search data processing method based on matrices and trees according to claim 1, characterized in that, This method is applied in real-time computing processing services. The device number of the computing point in the real-time library is converted into the matrix row number and point number mode after collision conversion. The content in the tree within the matrix cell pointed to by the value is the real-time data point to be calculated and processed.
7. The fast convergent search data processing method based on matrices and trees according to claim 1, characterized in that, This method is applied in real-time alarm processing services. The device number of the alarm point in the real-time database is converted into the matrix row number and point number mode collision conversion value, which is the matrix column number. The content in the tree within the matrix cell pointed to by the value is the real-time data point of the alarm to be processed.
8. The fast convergent search data processing method based on matrices and trees according to claim 1, characterized in that, This method supports integrated applications across multiple scenarios in rail transit.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 8.