Concurrent data processing method, rail train integrated monitoring system and storage medium

By adopting concurrent data processing methods in the Internet of Things platform, filtering and distributing valid messages in the message queue, combined with distributed key-value storage and multi-layer data storage, the real-time and reliability problems in high concurrent message processing are solved and realized It provides high-speed, reliable message processing and real-time caching.

CN118733615AActive Publication Date: 2024-10-01BYD CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310361649.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2024-10-01
Estimated Expiration
2043-03-31

AI Technical Summary

Technical Problem

The existing technology cannot process a large number of messages instantaneously while ensuring strong real-time performance when server resources are limited, resulting in high concurrent message processing speed and reliability that need to be improved.

Method used

Propose a concurrent data processing method that filters out valid messages by obtaining messages in the message queue and quickly distributes them to corresponding linkage devices to avoid message queue congestion and resource occupation. It adopts a three-layer filtering mechanism and a distributed key-value storage listening mechanism. , combined with local cache, high-availability database and underlying database, to achieve rapid consumption and storage of messages.

Benefits of technology

It improves the message consumption speed, avoids message queue congestion and resource occupation, ensures the strong real-time nature of messages and the real-time nature of cache, and saves time and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733615A_ABST
    Figure CN118733615A_ABST
Patent Text Reader

Abstract

The invention discloses a concurrent data processing method, a rail train integrated monitoring system and a storage medium, and the method comprises the steps: obtaining a message in a message queue, and the content of the message comprises a point location state value of a detection point location; screening the messages in the message queue to screen out effective messages; determining a target effective message for triggering the action of the linkage equipment in the effective messages; and distributing the target effective message for triggering the action of the linkage equipment to the corresponding target linkage equipment. According to the concurrent data processing method, high-concurrency messages can be reliably processed at a high speed, a large number of messages can be rapidly processed, and the real-time performance of the messages can be guaranteed.
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 processing, and in particular to a concurrent data processing method, a rail train integrated monitoring system and a storage medium. Background Art

[0002] Industrial Internet of Things technology is developing rapidly. The existing Internet of Things platforms and various dispatching systems and monitoring systems have become very rich. In particular, the linkage business between systems and devices is becoming more and more complex, and the number of devices monitored by the system is increasing. With limited server resources, it is impossible to process a large number of messages instantly while ensuring strong real-time performance. Therefore, a faster and more reliable high-concurrency message processing solution is urgently needed. Summary of the invention

[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the first object of the present invention is to provide a concurrent data processing method that can process high-concurrency messages at high speed and reliably, can quickly process a large number of messages and ensure the real-time nature of the messages.

[0004] The second object of the present invention is to provide a rail train integrated monitoring system.

[0005] A third object of the present invention is to provide a computer-readable storage medium.

[0006] In order to achieve the above-mentioned purpose, the concurrent data processing method proposed in the first aspect of the embodiment of the present invention includes: obtaining messages in a message queue, the content of the message including the point status value of the detection point; filtering the messages in the message queue to filter out valid messages; determining the target valid messages in the valid messages that will trigger the action of the linkage device; and distributing the target valid messages that will trigger the action of the linkage device to the corresponding target linkage device.

[0007] According to the concurrent data processing method proposed in the embodiment of the present invention, in the process of screening messages in the message queue, invalid messages can be quickly filtered out, and valid messages can be quickly and accurately screened out, which can improve the message consumption speed, avoid clogging of the message queue, and ensure the strong real-time nature of the message. And by setting a screening mechanism, after determining that a valid message will trigger the action of the linkage device, the valid message that will trigger the device action can be quickly distributed to the corresponding linkage device, avoiding a large amount of accumulation in the message queue, ensuring the real-time nature of the message, and avoiding occupying a large amount of server resources.

[0008] In some embodiments of the present invention, the messages in the message queue are screened to screen out valid messages, including: obtaining a linkage rule list of all detection points; if the message in the message queue satisfies the linkage rule in the linkage rule list, determining that the message is a valid message

[0009] In some embodiments of the present invention, determining the target valid message in the valid message that will trigger the linkage device action includes: obtaining the linkage rules satisfied by the messages in the message queue as pre-selected linkage rules; obtaining the real-time point status values ​​of all detection points; and obtaining the target valid message according to the pre-selected linkage rules and the real-time point status values ​​of all detection points.

[0010] In some embodiments of the present invention, the target valid message is obtained according to the preselected linkage rule and the real-time point status values ​​of all the detection points, including: logically combining the real-time point status values ​​of all the detection points according to the preselected linkage rule; obtaining the logical combination result of the point status values ​​of all the detection points; if the logical combination result satisfies the linkage trigger condition corresponding to the preselected linkage rule, then the valid message corresponding to the real-time point status value whose logical result satisfies the linkage trigger condition is the target valid message.

[0011] In some embodiments, obtaining the real-time point status values ​​of all detection points includes: reading the real-time point status values ​​of all detection points from a Redis database.

[0012] In some embodiments, after filtering out the valid messages, the concurrent data processing method further includes: saving the valid messages to a thread queue.

[0013] In some embodiments, distributing the target valid message that will trigger the linkage device action to the corresponding target linkage device includes: distributing the target valid message to the target linkage device in a message queue manner.

[0014] In some embodiments of the present invention, the concurrent data processing method further includes: obtaining feedback data from the target linkage device with respect to the target valid information; and storing the feedback data in an underlying database.

[0015] In some embodiments, obtaining the linkage rule list of all detection points includes: reading the linkage rule list of all detection points from a local cache.

[0016] In some embodiments of the present invention, the concurrent data processing method further includes: monitoring changes in the linkage rules through a distributed key-value storage monitoring mechanism; and updating the linkage rule list stored in the local cache according to the changed linkage rules.

[0017] In some embodiments of the present invention, the underlying database includes a MongoDB database, and the message queue is a Kafka message queue.

[0018] In order to achieve the above-mentioned purpose, the second aspect of the present invention proposes a rail train integrated monitoring system, comprising: a processor; a memory communicatively connected to the processor; the memory stores a computer program executable by the processor, and when the computer program is executed by the processor, it implements any of the concurrent data processing methods described above.

[0019] According to the rail train integrated monitoring system proposed in the embodiment of the present invention, when the processor executes the computer program stored in the memory, by executing the concurrent data processing method of the above embodiment, it can not only greatly improve the message consumption speed, avoid message queue congestion, and ensure the strong real-time nature of the message, but also the synchronous caching scheme adopted in the embodiment of the present invention can save a lot of time and performance, and ensure the real-time nature of the cache.

[0020] In some embodiments of the present invention, the processor is configured with a local cache, a high-availability database and an underlying database, wherein the local cache is used to store a list of linkage rules for all detection points; the high-availability database is used to store real-time point status values ​​of all detection points; and the underlying database is used to store feedback data of the target linkage device for target valid information.

[0021] In order to achieve the above-mentioned purpose, the third aspect of the present invention also proposes a computer-readable storage medium having a computer program stored thereon, and when the computer-readable storage medium is executed by a processor, the concurrent data processing method described in any one of the above items is implemented.

[0022] According to the computer-readable storage medium proposed in the embodiment of the present invention, when the stored computer program is executed by the processor, it can implement the concurrent data processing method described in any one of the above items, which can not only greatly improve the message consumption speed, avoid message queue congestion, and ensure the strong real-time nature of the message, but also the synchronous caching solution adopted in the embodiment of the present invention can save a lot of time and performance, and ensure the real-time nature of the cache.

[0023] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0025] Figure 1 is a flowchart of a concurrent data processing method according to an embodiment of the present invention;

[0026] Figure 2 is a flowchart of a concurrent data processing method according to another embodiment of the present invention;

[0027] Figure 3 is a schematic diagram of a three-layer screening mechanism according to an embodiment of the present invention;

[0028] Figure 4 is a flowchart of a concurrent data processing method according to yet another embodiment of the present invention;

[0029] Figure 5 is a flowchart of a concurrent data processing method according to yet another embodiment of the present invention;

[0030] Figure 6 is a schematic diagram of a concurrent data processing method according to an embodiment of the present invention;

[0031] Figure 7 A schematic diagram of concurrent data processing according to an embodiment of the present invention;

[0032] Figure 8 is a block diagram of a rail train integrated monitoring system according to an embodiment of the present invention;

[0033] Fig. 9 is a block diagram of a rail train integrated monitoring system according to another embodiment of the present invention;

[0034] Fig.10 Schematic diagram of a three-level data storage structure according to an embodiment of the present invention.

[0035] Reference numerals:

[0036] Railway train integrated monitoring system 10;

[0037] Processor 1, memory 2;

[0038] Local cache 11, high-availability database 12, underlying database 13. DETAILED DESCRIPTION

[0039] Embodiments of the present invention are described in detail below. The embodiments described with reference to the accompanying drawings are exemplary. Embodiments of the present invention are described in detail below.

[0040] The content of the current IoT platform and various dispatching systems and monitoring systems is becoming increasingly rich, the linkage services between systems and devices are becoming increasingly complex, and the number of devices monitored by the system is increasing. For example, taking the real-time monitoring system of the subway as an example, assuming that the system of a hub station needs to access 50,000 to 100,000 detection points of devices, this means that there will be up to 100,000 concurrent messages at the moment the system is started. After processing these messages at high speed, the subsequent logical processing of the system linkage devices is required, and finally the system receives feedback messages from various devices. In the linkage process of the entire system, it is necessary to ensure the strong real-time nature of the messages, and the messages in the queue cannot be allowed to wait too long.

[0041] The high-concurrency message solution adopted in the prior art is usually based on the optimization of data storage and message processing mechanisms to improve message processing speed and performance. However, for a large number of instantaneous high-concurrency messages, the processing speed cannot be guaranteed, and the real-time performance and reliability need to be improved. To this end, the embodiments of the present invention propose a concurrent data processing method, a rail train integrated monitoring system and a storage medium, which can improve the speed and effect of concurrent data processing, save time and performance, and ensure the real-time performance of the cache. Figure 1-Figure 7 A concurrent data processing method according to an embodiment of the present invention is described.

[0042] In some embodiments of the present invention, Figure 1 FIG. 1 is a flowchart of a concurrent data processing method according to an embodiment of the present invention, wherein the concurrent data processing method at least includes steps S1-S4, which are specifically as follows.

[0043] Specifically, it can be combined Figure 1 and Figure 2 Understand the concurrent data processing method of the embodiment of the present invention, Figure 2 Schematic diagram of a concurrent data processing method according to an embodiment of the present invention.

[0044] S1, obtain a message in a message queue, the content of the message including a point status value of a detection point.

[0045] Specifically, in the real-time monitoring system of rail transit such as subways, the point status value of the detection point is converted into the corresponding message entity and sent to the message queue to wait for processing. The monitoring system, as a consumer of the message queue, obtains the messages in the message queue. When the system receives a large number of messages, the content of the message includes the point status value of the detection point, that is, the point status value of the detection point is put into the message queue as the message content and waits for processing by the monitoring system.

[0046] S2, filtering the messages in the message queue to filter out valid messages.

[0047] Among them, the valid message may be a message that may trigger an action of a linkage device.

[0048] In the embodiment, valid messages can be screened out by preset rules, and the screening can be performed once or multiple times according to the number of screenings required. Invalid messages can be filtered out by screening, such as messages that are not used to trigger linkage device actions.

[0049] Taking the three-layer message filtering mechanism as an example, valid messages can be filtered out from the message queue through layer-by-layer filtering, and the valid messages are messages that may trigger subsequent actions. Through layer-by-layer filtering, invalid messages in the message queue can be filtered out, the speed of message consumption can be increased, the message queue can be avoided from being blocked, and the strong real-time nature of the message can be ensured.

[0050] S3, determining a target valid message among the valid messages that will trigger an action of the linkage device.

[0051] Among them, preset trigger conditions can be set as needed. When it is determined that the screened valid message meets the preset trigger condition, it is considered that the valid message can trigger the linkage device action, and the valid message is the target valid message.

[0052] S4, distribute the target valid message that will trigger the linkage device action to the corresponding target linkage device.

[0053] Specifically, the determined target valid messages can be distributed to various business function modules. After a series of logical processing, the business modules convert the messages into specific device action commands to achieve a complete linkage process.

[0054] According to the concurrent data processing method proposed in the embodiment of the present invention, the messages in the message queue are screened to obtain valid messages, invalid messages can be quickly filtered, and valid messages can be quickly and accurately screened out, which can increase the message consumption speed, avoid message queue congestion, and ensure the strong real-time nature of the message. And by setting a screening mechanism, when it is determined that a valid message will trigger a linkage device action, the valid message that will trigger the device action can be quickly distributed to the corresponding linkage device, avoiding a large amount of accumulation in the message queue, ensuring the real-time nature of the message, and avoiding occupying a large amount of server resources.

[0055] In some embodiments of the present invention, Figure 2 As shown, it is a flowchart of a concurrent data processing method according to another embodiment of the present invention, wherein the messages in the message queue are screened to filter out valid messages, that is, the above step S2 at least includes step S21 and step S22, which are specifically as follows.

[0056] S21, obtaining a list of linkage rules for all detection points.

[0057] In an embodiment, a linkage rule list can be preset and saved according to the specific linkage conditions of the rail train and safety considerations. The linkage rule list includes the logical rules of the point status values ​​of each detection point that triggers the linkage of the linkage equipment.

[0058] In some embodiments, the linkage rule list may be stored in a local cache, that is, the linkage rule lists of all detection points may be read from the local cache.

[0059] It is understandable that for the monitoring system of rail trains, the entire system includes multiple devices such as multiple running trains, and each device is equipped with several detection points. During the operation of the system, the background will simultaneously receive status detection data reported by multiple detection points in multiple devices. These data are arranged in the message queue in the form of messages as message content. The mechanism first verifies whether the received message requires subsequent linkage processing by reading the local cache.

[0060] For example, for the detection of some events during the operation of rail trains, such as fire detection, a series of detection rules need to be set. When a fire occurs, the status of the relevant detection points may change. When the status values ​​of several detection points meet the pre-set linkage rules, the fire is confirmed. However, there are a large number of messages in the real-time monitoring system that do not require logical processing. In order to quickly obtain some messages reported by fire-related detection points from the many messages received, it is necessary to filter the messages in the message queue and preliminarily filter out the messages that meet the fire linkage rules.

[0061] Based on this, the technicians can set the linkage rules according to their needs. The linkage rules may include the preset point status values ​​of all detection points and the conditional rules that all detection points should meet. The linkage rules can be used as the core conditions for filtering messages in the queue and used to guide the execution process of subsequent message pre-selection. Among them, the local cache may include the local hard disk in the system, and the local cache is used to store the preset linkage rules.

[0062] S22: If the message in the message queue satisfies the linkage rule in the linkage rule list, the message is determined to be a valid message.

[0063] Specifically, the linkage rules are the rules satisfied by the point status values ​​that can trigger the linkage device actions. However, one message corresponds to one point status value. However, the linkage rules can include the conditions of one point status value and can also include the logical combination conditions of multiple point status values. Therefore, if the message satisfies the linkage rules, the message may trigger the linkage device action, but it may also need to be combined with other point status conditions to be triggered. Therefore, the message is a valid message, that is, a message that may trigger the linkage device action.

[0064] Further, in an embodiment, Figure 2 As shown, when determining the target valid message that will trigger the linkage device action in the valid message, step S3 specifically includes:

[0065] S31, obtaining linkage rules satisfied by messages in the message queue as pre-selected linkage rules. The pre-selected linkage rule is that at least one point status value included in the message satisfies the linkage rule.

[0066] S32, obtaining the real-time point status values ​​of all detection points;

[0067] S33, obtaining a target valid message according to the pre-selected linkage rules and the real-time point status values ​​of all detection points, that is, obtaining a message that will trigger the linkage device action.

[0068] For example, for monitoring fire alarm events in a rail train monitoring system, if the preset fire alarm linkage rule requires that the status values ​​of the three points are all "true", if there is a message in the message queue that meets the fire alarm linkage rule, the fire alarm linkage rule is the pre-selected linkage rule. Further, the real-time point status values ​​of all detection points are matched with the fire alarm linkage rule. If there is a message that matches the combination conditions of all point status values ​​of the fire alarm linkage rule, then the message is the target valid message that will trigger the fire alarm linkage device. Otherwise, the message will not trigger the action of the fire alarm linkage device.

[0069] In the embodiment, for the situation where the existing sorting processing of message consumption cannot quickly filter invalid messages, the present application sets the steps of filtering and matching messages in the message queue, and can verify whether the received message needs subsequent linkage processing by reading the point status rules in the local cache, and the local cache is read-only and does not store. This operation process can quickly consume a large number of concurrent messages, quickly clear the message queue to avoid message congestion, and generate a list of pre-selected point status rules based on the filtered messages, so as to facilitate the subsequent establishment of an appropriate number of threads to process messages according to server performance. It can be understood that by setting up this screening process, the purpose of quickly filtering invalid messages can be achieved, saving the time of message sorting.

[0070] In an embodiment of the present invention, the point status values ​​of all detection points can be read from the Redis database (high availability database).

[0071] Specifically, for valid messages filtered out by the screening mechanism, it is also necessary to determine whether these messages meet the trigger conditions, which requires real-time data. This process is no longer suitable for local caching, but still requires high-performance reading and writing speeds. Therefore, a high-availability database is used in the embodiment of the present invention. For example, a Redis database can be used as a data cache target, and the redis database cache responds to the judgment of business processing logic. Redis database is an open source non-relational key-value storage database that stores data in the form of key-value pairs. It has high read and write performance and is suitable for use as a cache. It reads and writes a large amount of information used to verify whether the message meets the trigger conditions. The high-availability database stores the point status values ​​of all linked devices, that is, the point status values ​​of all detection points.

[0072] In an embodiment, the point status values ​​of all linked devices may also change, for example, when a fire or dangerous situation occurs, and should correspond to the messages reported by the relevant detection points. In order to verify whether the screened valid messages meet the trigger conditions, the pre-selected linkage rules in the pre-selected linkage rule list need to be matched and verified with the point status values.

[0073] In some embodiments of the present invention, when obtaining a target valid message according to a preselected linkage rule and the real-time point status values ​​of all detection points, it specifically includes: logically combining the real-time point status values ​​of all detection points according to the preselected linkage rule; obtaining the logical combination result of the point status values ​​of all detection points; if the logical combination result satisfies the linkage trigger condition corresponding to the preselected linkage rule, then the valid message corresponding to the real-time point status value whose logical result satisfies the linkage trigger condition is the target valid message.

[0074] Specifically, the real-time point status values ​​of all detection points are combined according to the logic of the pre-selected linkage rules to obtain the result of the logical combination. For example, taking the fire alarm linkage rule as an example, the three point statuses are 0, 1, and 1 respectively, then the result of the logical combination of the three is 0. Only when the three point statuses are 1, the logical combination result is 1. The logical combination result is matched with the pre-selected linkage rule. For example, the fire alarm linkage rule is that the three point statuses must be 1 to satisfy the fire alarm linkage action, that is, when the three point status values ​​are 1, the corresponding message is the target valid message that triggers the fire alarm linkage. On the contrary, if the logical combination result is 0, it does not match the fire alarm linkage rule and will not trigger the fire alarm equipment linkage.

[0075] In some embodiments of the present invention, after valid messages are screened out, the valid messages are saved in a thread queue, that is, the valid messages are further screened through threads to obtain target valid messages, and an appropriate number of threads can be established to process messages according to server performance.

[0076] After obtaining the target valid message, you can wait in the thread for the target business module to process the target valid message. However, because the business module needs to wait for a long time to process, if the information is not transmitted through the message queue, the thread will be occupied all the time, consuming a lot of resources. After the linkage message is sent out, the pressure is shared by each business module. Therefore, in some embodiments, the target valid message is distributed to the target linkage device in the form of a message queue, which can speed up the thread release and avoid thread message accumulation.

[0077] Based on the above, in terms of message consumption mechanism, in some embodiments of the present invention, a three-layer screening mechanism can be adopted, such as Figure 3 FIG. 4 is a schematic diagram of a three-layer screening mechanism according to an embodiment of the present invention.

[0078] The first-level screening mechanism first screens out valid messages that meet the pre-selected linkage rules from the message queue, that is, messages that may trigger the linkage device action and converts them into a thread queue, wherein, in some embodiments, the message queue can be a kafka message queue, and the messages in the kafka message queue are kafka messages. The Kafka system is a high-throughput distributed publish-subscribe message system; in the second-level screening mechanism, by judging whether the messages in the thread queue will trigger subsequent actions, the messages that meet the trigger conditions, that is, the target valid messages, are screened out; in the third-level screening mechanism, the target valid messages are distributed to each corresponding business module through the message queue. The purpose of this operation is to liberate the thread, because the processing of the business module requires a long wait time. If the information is not transmitted through the message queue, the thread will be occupied all the time, consuming a lot of resources. After the linkage message is sent out, the pressure is shared among the various business modules.

[0079] In addition, in the real-time monitoring system, while sending messages, feedback messages from the target linkage devices will continue to be received. If the messages in the queue cannot be processed in time and updated to the data cache, the real-time performance of the messages will be seriously affected. Figure 3 As shown, invalid messages can be quickly filtered, which greatly improves the message consumption speed, avoids message queue congestion, and ensures strong real-time performance.

[0080] In some embodiments of the present invention, Figure 4 FIG. 4 is a flowchart of a concurrent data processing method according to another embodiment of the present invention, wherein the concurrent data processing method further includes step S5 and step S6, which are specifically as follows.

[0081] S5, obtaining feedback data of the target linkage device regarding target effective information.

[0082] It is understandable that after a series of logical processing, the business module converts the valid message into a specific device action command and sends it to the target linkage device, and the target linkage device executes the command to realize the complete linkage process. Among them, while the business module sends the message, the system will continue to receive feedback data from the target linkage device after executing the corresponding command, and the feedback data corresponds to the valid information.

[0083] S6, storing the feedback data in the underlying database.

[0084] In some embodiments, the underlying database may include a MongoDB database, which is a distributed storage database. As an underlying database, it has the characteristics of being readable and storable, and can be used for data persistence when the business module processes messages. After the business module interacts with the device, the data is persisted in the MongoDB database, and the feedback data is also stored in the MongoDB database. The underlying database may have a page display function, and the feedback data can be directly displayed to the back-end staff after being stored in the underlying database, so that the back-end staff can change or adjust the point status rules according to the feedback data.

[0085] In some embodiments of the present invention, Figure 5 FIG. 4 is a flowchart of a concurrent data processing method according to another embodiment of the present invention, wherein the concurrent data processing method further includes step S7 and step S8, which are specifically as follows.

[0086] S7, monitors changes in linkage rules through the distributed key-value storage monitoring mechanism.

[0087] In the prior art, global entities are usually created by calling remote interfaces and sending and receiving messages. However, since remote interfaces are very time-consuming and unstable, and using messages to forward entity information is too cumbersome and occupies the performance of message queue servers, the embodiments of the present invention use a distributed key-value storage monitoring mechanism to monitor changes in linkage rules. Among them, the distributed key-value storage monitoring mechanism can be an ETCD monitoring mechanism, which is an open source, distributed key-value data storage system. Specifically, when the backend personnel change or adjust the point status rules according to the feedback data, it can be directly monitored by the ETCD monitoring mechanism.

[0088] S8, updating the linkage rule list stored in the local cache according to the changed linkage rule.

[0089] In an embodiment of the present invention, cache synchronization between instances can be achieved through the ETCD monitoring mechanism. When the business module interacts with the device and persists the data in the MongoDB database, the ETCD monitoring mechanism will also be triggered to synchronize the monitored changed point status rules to the local cache. The synchronous caching solution of the present invention can save a lot of time and performance and ensure the real-time nature of the cache.

[0090] Based on the above, in some embodiments, such as Figure 6As shown, the concurrent data processing method of the embodiment of the present invention can be composed of a three-level data storage structure and a three-layer message screening mechanism to screen out target valid messages and distribute them to the business module to realize the linkage of linkage devices. In addition, memory synchronization can also be achieved through the ETCD monitoring mechanism, involving multiple databases, multi-threading, message queues and other technologies.

[0091] Specifically, Figure 7 As shown, it is a schematic diagram of concurrent data processing according to an embodiment of the present invention. When the receiving system receives a large number of messages, the information in the message is first converted into the corresponding message entity through the message receiving module and sent to the message queue, and then the messages in the message queue are quickly consumed through the three-layer message screening mechanism, and finally the valid messages are distributed to each business function module. After a series of logical processing, the business module converts the message into a specific device action command to realize a complete linkage process. In addition, in the process of persisting data in the underlying database after the business module interacts with the linkage device, the ETCD monitoring mechanism will also be triggered. The present invention realizes the synchronization of local cache by adopting a distributed key-value storage monitoring mechanism, which can save a lot of time and performance and ensure the real-time performance of the cache.

[0092] Furthermore, the three-layer message screening mechanism includes a first-layer screening mechanism, a second-layer screening mechanism, and a third-layer screening mechanism, respectively, which respectively utilize message queues and multi-threading technologies to perform three-layer processing on high-concurrency messages. Different technical selections are made for message queues, business logic judgments, and business data persistence, respectively, which can greatly improve the message consumption speed, avoid message queue congestion, and ensure the strong real-time nature of messages. In addition, the synchronous cache solution adopted in the embodiment of the present invention can save a lot of time and performance, and ensure the real-time nature of the cache. The three-level data storage structure makes different technical selections for message queues, business logic judgments, and business data persistence, and uses three different types including local cache, high-availability database, and underlying database. The data storage solution of the invention is more flexible and has a wider business applicability, especially when processing concurrent messages. The effect is more significant.

[0093] In some embodiments of the present invention, Figure 8 , which is a block diagram of a rail train integrated monitoring system according to an embodiment of the present invention, wherein the rail train integrated monitoring system 10 includes a processor 1 and a memory 2 .

[0094] The memory 1 is communicatively connected with the processor 2, and the memory 2 stores a computer program that can be executed by the processor 1. When the computer program is executed by the processor 1, any of the above concurrent data processing methods is implemented, which can greatly improve the message consumption speed, avoid message queue congestion, and ensure the strong real-time nature of the message. In addition, the synchronous caching solution adopted in the embodiment of the present invention can save a lot of time and performance, and ensure the real-time nature of the cache.

[0095] In some embodiments of the present invention, Fig. 9 FIG. 1 is a block diagram of a rail train integrated monitoring system according to another embodiment of the present invention, wherein the processor 1 is configured with a three-level data storage structure, including a local cache 11, a high-availability database 12 and an underlying database 13 ... Fig. 9 and Fig.10 Understand the three-level data storage structure of the embodiment of the present invention, where Fig.10 FIG. 4 is a schematic diagram of a three-level data storage structure according to an embodiment of the present invention.

[0096] The local cache 11 is used to store the linkage rule list of all detection points. It has the characteristics of read-only and non-storage, and can be used to cope with high-speed processing of high-concurrency messages. The local cache 11 can also be used as a shared memory. In the process of persisting data in the MongoDB database after the business module interacts with the device, if the point status rule changes through the distributed key-value storage monitoring mechanism, the changed point status rule can be directly synchronized to the local cache 11 through the ETCD monitoring mechanism. The high-availability database 12 is used to store the real-time point status values ​​of all detection points. Specifically, the high-availability database 12 can use the Redis database, which has the characteristics of readability and storage, and can be used for logical judgment in the thread queue. And the underlying database 13 is used to store the feedback data of the target linkage device for the target valid information in the point status detection data. Specifically, the underlying database 13 can use the MongoDB database, which has the characteristics of readability and storage, and can be used for data persistence when the business module processes messages.

[0097] In some embodiments of the present invention, a computer-readable storage medium is also proposed, on which a computer program is stored. When the computer-readable storage medium is executed by a processor, the concurrent data processing method of any one of the above items is implemented, which can greatly improve the message consumption speed, avoid message queue congestion, and ensure the strong real-time nature of the message. In addition, the synchronous caching scheme adopted in the embodiment of the present invention can save a lot of time and performance, and ensure the real-time nature of the cache.

[0098] Other structures and operations of the integrated train monitoring system 10 according to the embodiment of the present invention are known to those skilled in the art and will not be described in detail here.

[0099] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0100] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example.

[0101] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

Claims

1. A concurrent data processing method, characterized in that: include: Obtaining a message in a message queue, wherein the content of the message includes a point status value of a detection point; Screening the messages in the message queue to filter out valid messages; Determine a target valid message among the valid messages that will trigger an action of a linkage device; The target valid message that will trigger the linkage device action is distributed to the corresponding target linkage device.

2. The concurrent data processing method according to claim 1, characterized in that: Filtering the messages in the message queue to filter out valid messages includes: Get the linkage rule list of all detection points; If the message in the message queue satisfies the linkage rule in the linkage rule list, the message is determined to be a valid message.

3. The concurrent data processing method according to claim 2, characterized in that: Determining a target valid message among the valid messages that will trigger a linkage device action includes: Obtaining linkage rules satisfied by the messages in the message queue as pre-selected linkage rules; Get the real-time point status values ​​of all detection points; The target valid message is obtained according to the preselected linkage rule and the real-time point status values ​​of all the detection points.

4. The concurrent data processing method according to claim 3, characterized in that: Obtaining the target valid message according to the preselected linkage rule and the real-time point status values ​​of all the detection points includes: Logically combining the real-time point status values ​​of all the detection points according to the pre-selected linkage rule; Obtaining a logical combination result of the point status values ​​of all the detection points; If the logic combination result satisfies the linkage triggering condition corresponding to the pre-selected linkage rule, the valid message corresponding to the real-time point status value whose logic result satisfies the linkage triggering condition is the target valid message.

5. The concurrent data processing method according to claim 3, characterized in that: Get the real-time status values ​​of all detection points, including: The real-time point status values ​​of all the detection points are read from the Redis database.

6. The concurrent data processing method according to any one of claims 1 to 5, characterized in that: After screening out the valid messages, the concurrent data processing method further includes: The valid message is saved in the thread queue.

7. The concurrent data processing method according to any one of claims 1 to 5, characterized in that: Distributing the target valid message that will trigger the linkage device action to the corresponding target linkage device includes: Distribute the target valid message to the target linkage device in a message queue manner.

8. The concurrent data processing method according to any one of claims 1 to 5, characterized in that: The concurrent data processing method further includes: Obtaining feedback data of the target linkage device with respect to the target effective information; The feedback data is stored in an underlying database.

9. The concurrent data processing method according to claim 2, characterized in that: Get the linkage rule list of all detection points, including: The linkage rule list of all the detection points is read from the local cache.

10. The concurrent data processing method according to claim 9, characterized in that: The concurrent data processing method further includes: Monitoring changes in the linkage rules through a distributed key-value storage monitoring mechanism; The linkage rule list stored in the local cache is updated according to the changed linkage rule.

11. The concurrent data processing method according to claim 8, characterized in that: The underlying database includes a MongoDB database, and the message queue is a Kafka message queue.

12. A rail train integrated monitoring system, characterized in that: include: processor; a memory communicatively coupled to the processor; The memory stores a computer program that can be executed by the processor, and when the computer program is executed by the processor, the concurrent data processing method according to any one of claims 1 to 11 is implemented.

13. The rail train integrated monitoring system according to claim 12, characterized in that: The processor is configured with a local cache, a high-availability database and an underlying database, wherein: The local cache is used to store a linkage rule list of all detection points; The high-availability database is used to store the real-time point status values ​​of all detection points; The bottom layer database is used to store feedback data of the target linkage device with respect to target effective information.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer-readable storage medium is executed by a processor, the concurrent data processing method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Method and system for distributing and processing mass data passing through message queues

    CN103024014A

  • Equipment linkage method and mobile terminal

    CN115454520A

  • Internet of Things equipment linkage method and system, electronic equipment and readable storage medium

    CN115695483A

  • Intelligent remote monitoring method for fire-fighting

    US20220035818A1