Coal mine message queue data theme classification method
By adopting logical partitioning and topic mirroring/mapping technologies in the Kafka message queue in the coal mine industry, the problems of data skew and system complexity are solved, data timing and efficient transmission are achieved, and the stability and efficiency of coal mine data processing are improved.
Patent Information
- Application Number
- CN202411323712.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-10
AI Technical Summary
In data transmission and processing, the coal mining industry has problems such as data tilt, increased system complexity and difficulty in timing guarantee, especially when using Kafka message queues, load balancing failure and excessive resource consumption caused by physical partitions.
Using the data topic classification method of logical partitioning, by logical partitioning in the topic domain, different data sources of the same data entity enter different logical partitions, and perform three-level classification according to system type, data type and transmission characteristics. , use topic mirroring or topic mapping for data publishing.
It realizes the timing of data, reduces system complexity and resource overhead, avoids data tilt and consumption rebalancing, and improves data processing efficiency and transmission stability.
Smart Images

Figure CN119293552A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of coal mine message management and relates to a method for subject classification of coal mine message queue data. Background Art
[0002] In today's digital transformation, the coal mining industry, as an important part of traditional industries, is actively embracing information technology to improve production efficiency, strengthen safety management, and promote sustainable development. Driven by local policies, the intelligent construction of coal mines is currently a key construction content of coal mines. As a core item of construction content, data centers need to have the ability to integrate and share data. With the deep integration and application of technologies such as the Internet of Things and big data, coal mine operation management is gradually shifting from experience-driven to data-driven. In this context, message queues, as an efficient and reliable data transmission and integration middleware, have become a key infrastructure connecting various parts of coal mine information systems.
[0003] The operating environment of coal mines is complex and changeable, involving the real-time collection and processing of massive heterogeneous data, including but not limited to safety monitoring, production monitoring, precise positioning, video broadcasting, hidden dangers and risks, etc. In order to effectively meet this challenge, it is particularly important to scientifically and rationally classify the data in the message queue. This not only helps to ensure the orderly flow and efficient processing of data, but also improves the scalability and flexibility of the system, providing a solid foundation for data analysis and decision support.
[0004] The purpose of studying the classification method of coal mine message queue data topics is to build a standardized and modular data management system to ensure that data from different sources and of different natures can be accurately classified and transmitted to the corresponding processing units. For example, by dividing equipment status updates, environmental monitoring data, production performance indicators, etc. into different message topics, data isolation and decoupling can be achieved, making it easier for each business department or system to focus on processing information related to its responsibilities, while simplifying the overall design and operation and maintenance of the system. Summary of the invention
[0005] In view of this, an object of the present invention is to provide a method for classifying coal mine message queue data topics.
[0006] In order to achieve the above object, the present invention provides the following technical solutions:
[0007] A method for classifying topics of coal mine message queue data comprises the following steps:
[0008] Set data subject classification rules;
[0009] Classify the original data message queue by topic;
[0010] Define the naming rules for the original data message queue topics;
[0011] Classify business data message queues by topic;
[0012] Define the naming rules for business data message queue topics;
[0013] Use message queues to publish data.
[0014] Furthermore, the data subject classification rule is: logical partitioning is performed in the subject domain, each subject is not physically partitioned, and data from different data sources of the same data entity enter different logical partitions.
[0015] Further, the original data message queue topic classification is divided into three levels, with system type as the first level classification, subsystem type as the second level classification, and data type as the third level classification;
[0016] The system types include safety monitoring, production control and business management;
[0017] The subsystems in the safety monitoring system include safety monitoring, underground personnel positioning, hydrological monitoring, mine pressure monitoring and underground broadcasting; the data types in the safety monitoring system are divided into definition type, real-time type and historical type;
[0018] The subsystems in the production control system include main ventilation monitoring, main drainage monitoring, main lifting monitoring, main transport belt monitoring, air compressor monitoring and power monitoring; the data types in the production control system are divided into definition type, real-time type and history type;
[0019] The subsystems in the business management system include hidden danger management, risk point control and coal measurement; the data type classification is not performed in the business management system.
[0020] Furthermore, the data types have the following data transmission characteristics:
[0021] Timeliness,Data transmission priority,The priorities of the three data types are as follows: defined data > real-time data > historical data;
[0022] Necessity, that is, whether data needs to be retransmitted after a data transmission failure to ensure data integrity;
[0023] Timing, that is, the timing must be maintained during transmission, only some historical data does not consider timing.
[0024] Furthermore, the original data message queue topic naming rules are defined as follows:
[0025] ys_{category}_{system}_{type}_{name}_{partition}
[0026] Among them, ys: indicates that the data processing stage is raw data, which is a fixed value; category: indicates the business system type, and its value is the type abbreviation; system: indicates the subsystem, and its value is the system abbreviation; type: indicates the data type, which can be definition class, real-time class, or historical class, and its value can be dy, ss, or ls; name: indicates the data name, and its value is the data abbreviation; partition: indicates the data partition, which is a digital sequence used to distinguish different data sources. When the data has only one source, this item is empty.
[0027] Furthermore, the business data message queue topic classification is divided into three levels, where the business type is the first level classification, the monitoring object is the second level classification, and the data type is the third level classification;
[0028] The business types include equipment monitoring, precise positioning, and business management;
[0029] The monitoring objects in the equipment monitoring business include equipment and measuring points; the data types in the equipment monitoring business are divided into definition type, real-time type and history type;
[0030] The monitoring objects in the precise positioning service include personnel and vehicles; the data types in the precise positioning service are divided into definition type, real-time type and history type;
[0031] The monitoring objects in the business operation and management business include hidden dangers, risks and production indicators; the data in the business operation and management business are not classified by data type.
[0032] Furthermore, the naming rules for business data message queue topics are defined as follows:
[0033] yw_{category}_{object}_{type}_{name}_{partition}
[0034] Among them, yw: indicates that the data processing stage is business data, which is a fixed value; category: indicates the business type, and the value is the type abbreviation; object: indicates the monitoring object, and the value is the object abbreviation; type: indicates the data type, which can be definition class, real-time class, or historical class, and the values are def, real, or his; name: indicates the data name, and the value is the data abbreviation; partition: indicates data partition, which is a digital sequence used to distinguish data from different coal mines or different systems, or to subdivide data at a time granularity. This item can be empty.
[0035] Furthermore, when logically partitioning business data, the partition rules are as follows:
[0036] {mine}{system}{block}
[0037] Among them, mine: represents the coal mine code; system: represents the subsystem code; block: represents the data block number.
[0038] Furthermore, when using a message queue for data publishing, business data is pushed to a target message queue by means of topic mirroring or topic mapping;
[0039] The topic mirroring means that the source queue and the target queue have exactly the same topic name. When publishing, data is pulled from the source queue and directly mirrored to the same topic in the target queue.
[0040] The topic mapping is as follows: the source queue and the target queue have different topic names. When publishing, after reading data from the source queue, the summary information of the source data is identified, and the target queue topic name is obtained according to the topic naming rule of the target queue, or according to the mapping relationship of the statically configured topic, and finally the data is written to the mapped topic of the target queue.
[0041] The beneficial effect of the present invention is that: the present invention protects a classification method for coal mine message queue data topics, by classifying data from multiple dimensions such as business system, data type, data timeliness, data processing stage, etc., and reasonably partitioning the data to build an efficient and stable data transmission channel, providing basic support for data exchange and sharing.
[0042] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:
[0044] Figure 1 This is the data flow diagram of the coal mine platform;
[0045] Figure 2 Classify rules for message queue topics. DETAILED DESCRIPTION
[0046] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0047] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0048] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0049] The present invention provides a method for classifying data themes in a coal mine message queue, which is applicable to data transmission and sharing between coal mine platforms and coal mine units at all levels. Usually, the construction of an intelligent coal mine platform requires that all data in business areas such as coal mine safety, production, scheduling, and operation be connected to the platform. From the perspective of data flow, the data is divided into data collection, data transmission, data analysis, data storage, data statistical analysis, and data display. Data at each stage needs to be processed to a certain extent, and different types of data transmission requirements are also different. For example, definition data needs to ensure priority, and real-time monitoring data needs to ensure timeliness. In addition, data sharing between units at all levels and different applications.
[0050] In the above process, the conversion from raw data to business data is involved, and the message queue is used as a data cache channel between different modules. The acquisition module obtains raw data from the subsystem and writes it into the message queue. The raw data is converted into the business data required by the platform business after a series of processing such as mapping, combination, and disassembly by the parsing module. See the data flow of coal mine platform data access and release for details. Figure 1 .
[0051] 1. Data Access
[0052] The construction of coal mine intelligent platform needs to access various business system data, which can be divided into safety monitoring system according to business type, such as safety monitoring, personnel positioning, hydrological monitoring, mine pressure monitoring, underground broadcasting, video monitoring and other subsystems; production control system, such as main ventilation, main drainage, main lifting, air compressor, main transportation, power supply and distribution equipment and other subsystems; business management system, such as hidden danger management, risk control, production indicators, production scheduling and other subsystems. Generally, each subsystem is equipped with a host computer that is convenient for coal mine monitoring and management, and collects relevant data of concern to the business department, such as basic information of the monitored object, real-time monitoring status, alarm information and other data.
[0053] The above subsystems are generally deployed and run independently, and the data is stored in the local database of the subsystem, which forms an information island. Therefore, it is necessary to collect data from each subsystem and collect all the data to the data storage center of the coal mine platform. In the process of data access, there are many types of systems involved, so the data subjects must be classified.
[0054] 1. Data subject classification rules
[0055] Kafka message queues classify data topics according to "topic domain + physical partition", that is, there are multiple topics under a message queue, and each topic is divided into multiple physical partitions. One topic has one physical partition by default. Considering that the same type of data in the same system may have multiple data sources, and the subsequent processing methods of data from different data sources may be different, from a business perspective, data from different data sources need to be partitioned.
[0056] If physical partitioning is used, the following problems may arise:
[0057] (1) It may cause data skew. In order to solve the problem of data hotspots, the Kafka message queue divides the data of the same topic into different partitions to achieve the purpose of load balancing and improve the efficiency of data concurrent processing. This is a solution usually adopted when data needs to be partitioned. However, in actual applications, Kafka clusters generally adopt minimal deployment (only 3 nodes) or even single-node deployment. When the number of partitions is not an integer multiple of the number of nodes, it will not only fail to solve the problem of data hotspots, but will cause data skew, make load balancing invalid, and affect overall performance.
[0058] (2) It will increase complexity and resource consumption. Kafka's management and maintenance of partitions will increase system complexity and increase system resource overhead. For example, when consuming data, it is necessary to balance the number of clients and partitions. In addition, due to the dynamic changes in the number of consumers or inconsistent consumption rates, Kafka will rebalance the partitions to ensure load balancing. This process may consume a lot of time and system resources, reducing system performance.
[0059] (3) Data timeliness cannot be guaranteed. Kafka only has timeliness for data in the same partition. The timeliness of data between different partitions of the same topic cannot be guaranteed.
[0060] Therefore, data subject classification needs to be considered from the perspective of business systems, data types, and transmission characteristics. Combined with the actual application needs of the platform, "topic + logical partitioning" is used for data subject classification, that is, logical partitioning is performed directly in the subject domain, and each topic is not physically partitioned (that is, it only contains 1 physical partition). Data from different data sources of the same data entity enter different logical partitions. In this way, when consuming data on a specific topic, data interference from different data sources can be effectively isolated, and data traceability is also convenient. The overall rules for data subject classification are as follows: Figure 2 As shown in the figure, the topic classification of both original data and business data message queues follows this rule.
[0061] This partitioning method has the following advantages: ① It ensures the timeliness of data, and the consumption and processing of each topic data do not interfere with each other; ② It reduces the complexity of the system. When the client consumes data, it processes it one-to-one, avoiding resource competition among multiple clients; ③ It improves data processing efficiency. In the Kafka minimized cluster, this topic logical partitioning method avoids data skew and rebalancing problems caused by data consumption, and reduces additional system overhead.
[0062] 2. Original data message queue
[0063] The original data message queue serves as a front-end buffer channel for data access and is used to store the original data of each business system. These data are generally obtained by the platform's data acquisition module from the data interface provided by the subsystem and written into the message queue. They can also be pushed to the message queue by the subsystem itself.
[0064] The collection module or third-party system acts as the producer of the original data message queue and writes the original data of the business system into the queue. The parsing module acts as the consumer and extracts specific data from the queue, parses and processes it, and converts it into platform business data.
[0065] The original data message queue topic classification is shown in Table 1.
[0066] Table 1
[0067]
[0068] The third-level classification in Table 1 includes definition data, real-time data, and historical data. Definition data has relatively stable data content and low frequency of change. It is generally the declaration and definition of other data in the subsystem, such as equipment definition information, measurement point definition information, basic personnel information, area definition information, hidden danger type, risk point type, etc. Real-time data has data content that changes frequently and requires high-frequency data updates. It is an effective means of real-time monitoring of subsystems, such as real-time status of equipment, real-time data of measurement points, real-time trajectory of personnel, real-time alarm data, etc. Historical data has periodic changes in data content, reflecting data trends over a period of time, such as analog quantity statistics, equipment operation records, alarm records, personnel trajectories, etc.
[0069] In addition, the following requirements are placed on the characteristics of data transmission: ① Timeliness, data transmission priority, defined data > real-time data > historical data. ② Necessity, that is, whether data needs to be retransmitted after a data transmission failure to ensure data integrity. Generally, real-time data used only for display can be discarded when the transmission fails, but other data cannot be discarded. ③ Sequentiality, in order to record the data change process, data generally needs to be transmitted in a sequential manner. Only some historical data can be transmitted without considering sequentiality. Both defined data and real-time data need to be transmitted strictly in time series.
[0070] According to the above classification method of message topics, the naming rules for the original data message queue topics are defined as follows:
[0071] ys_{category}_{system}_{type}_{name}_{partition}
[0072] in,
[0073] ys: indicates that the data processing stage is original data and is a fixed value;
[0074] Category: indicates the business system type, and its value is the abbreviation of the type, such as aqjc, szck, or yjgl.
[0075] system: indicates a subsystem, and its value is the system abbreviation, such as aqjk, jxry, swjc, kyjc, tfjk, psjk, etc.
[0076] type: indicates the data type, including definition type, real-time type, and historical type. The values are dy, ss, and ls.
[0077] name: indicates the data name, and its value is the data abbreviation, such as cddy, cdss, tjsj, ryxx, ryss, rygj, etc.
[0078] partition: represents data partition, which is a numeric sequence used to distinguish different data sources. The value is 0, 1, 2... When the data has only one source, this item can be empty.
[0079] Table 2 is an example table of original data message queue topic names.
[0080] Table 2
[0081] First level classification Secondary classification Three-level classification Data name Partition Number Theme Name Safety Monitoring Underground personnel positioning Defining Classes Personnel Information none ys_aqjc_jxry_dy_ryxx Safety Monitoring Underground personnel positioning Real-time class Real-time location of personnel none ys_aqjc_jxry_ss_ryss Safety Monitoring Underground personnel positioning History Personnel trajectory none ys_aqjc_jxry_ls_rygj
[0082] 3. Business data message queue
[0083] The business data message queue serves as a platform business data buffer channel to store business data required by platform applications and functions. Part of this data is generated by the parsing module after converting the original data, and the other part is generated by the platform statistical analysis module.
[0084] The parsing module and the statistical analysis module act as producers of the business data message queue and write business data into the queue. The storage module acts as a consumer and extracts specific business data from the queue and writes the data into the platform storage center database according to the specified storage strategy. At the same time, the platform needs to consider the openness of the data when publishing business data to the outside world.
[0085] The message topic classification of business data is shown in Table 3.
[0086] Table 3
[0087]
[0088] According to the above classification method, referring to the original data subject naming method, the business data subject naming rules are defined as follows:
[0089] yw_{category}_{object}_{type}_{name}_{partition}
[0090] in,
[0091] yw: indicates that the data processing stage is business data and is a fixed value;
[0092] category: indicates the service type. The value is the abbreviation of the type, such as monitor, orient, or om.
[0093] object: indicates the monitoring object. The value is the abbreviation of the object, such as device, point, staff, vehicle, hidden, risk, product, etc.
[0094] type: indicates the data type, including definition class, real-time class, and history class. The values are def, real, and his.
[0095] name: indicates the data name, and its value can be the abbreviation of the data, such as info, data, status, record, except, etc.
[0096] partition: represents data partition, which is a digital sequence used to distinguish data from different coal mines or systems, or to subdivide data at a time granularity. This item can be empty.
[0097] In actual use, real-time data often generates a large amount of data due to high-frequency sampling. In historical data, data objects that record the original characteristics of the monitored objects, such as densely sampled data and trajectory data, also generate a large amount of data. These data are very challenging to store or publish. In order to improve data processing efficiency, business data topics are logically partitioned. The partition rules are as follows:
[0098] {mine}{system}{block}
[0099] in,
[0100] mine: indicates the coal mine code, 4 digits;
[0101] system: indicates the subsystem code, 2 digits;
[0102] block: indicates the data block number, a 2-digit number with values of 0, 1, 2…23.
[0103] For example, for the business data of a single mine personnel positioning system, there is no need to consider the coal mine code and system code when partitioning. When taking the value of the data block number (block), the 24 hours of a day are divided into three time periods as the block number, or the self-incrementing sequence number 0, 1, 2 can be used as the block number. When the business data is generated, data is written to each block in a loop.
[0104] Table 4 is an example table of business data message queue topic names.
[0105] Table 4
[0106]
[0107] 2. Data Release
[0108] In the intelligent construction of coal mines, it is necessary to integrate the resource data of various platforms to promote cross-departmental collaboration, and to upload the platform data to the superior unit to facilitate safety supervision and reasonable decision-making. Therefore, the data release of the platform needs to take into account one source and one data for multiple uses, and use Kafka message queues for data release. Reasonable topic design is crucial to release authority and efficiency.
[0109] Due to the data consumption characteristics of Kafka message queues, consumers in the same consumer group jointly maintain data offsets and cannot consume data repeatedly. Consumers in different consumer groups independently maintain offsets and do not interfere with each other's data consumption. For data that needs to be published multiple times, different data publishing modules (consumers) are divided into different consumer groups to ensure that each publishing module can consume the full amount of business data and ensure data integrity and consistency.
[0110] When using message queues for data publishing, the data publishing module consumes the data in the business data message queue.
[0111] Push business data to the target message queue through topic mirroring or topic mapping.
[0112] (1) Theme Mirror
[0113] The topic names of the source queue and the target queue are exactly the same. The data publishing module pulls data from the source queue and directly mirrors it to the same topic of the target queue.
[0114] (2) Theme Mapping
[0115] The topic names of the source queue and the target queue are different. After the data publishing module reads data from the source queue, it needs to identify the summary information of the source data, obtain the topic name of the target queue according to the topic naming rules of the target queue, or according to the mapping relationship of the statically configured topics, and finally write the data to the topic mapped by the target queue.
[0116] The topic mapping method is generally used when coal mines publish data to superior units. The topic partition of coal mine business data does not need to consider the coal mine code. However, in the multi-mine mode, the superior unit generally distinguishes different coal mines from the topic domain to facilitate regional division. The specific naming rules are the same as the naming rules of the business data message queue.
[0117] The construction of the coal mine intelligent platform provided by the present invention covers multiple business areas such as coal mine safety, production, dispatching, and operation. It uses data collection and transmission, and message queue related technologies to classify coal mine business data in multiple dimensions, including but not limited to business systems, data types, data timeliness, and data processing stages, to achieve full life cycle management from data collection to display. According to different business scenarios and data types, customized data flow channels are designed to ensure the efficiency and security of data transmission. Through data reuse and sharing, cross-departmental collaboration is optimized, convenience is provided for intelligent decision-making, and the information island effect is reduced.
[0118] In the above embodiments, the description's reference to "this embodiment" indicates that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least some embodiments, but not necessarily all embodiments. Multiple occurrences of "this embodiment" do not necessarily all refer to the same embodiment.
[0119] In the above-described embodiments, although the invention has been described in conjunction with specific embodiments of the invention, many substitutions, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art based on the foregoing description. For example, other storage structures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed. Embodiments of the invention are intended to encompass all such substitutions, modifications, and variations that fall within the broad scope of the appended claims.
[0120] This embodiment further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, any one of the methods in this embodiment is implemented.
[0121] This embodiment also provides an electronic terminal, including: a processor and a memory;
[0122] The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal executes any one of the methods in this embodiment.
[0123] The computer-readable storage medium in this embodiment can be understood by ordinary technicians in this field: all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0124] The electronic terminal provided in this embodiment includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used to communicate, and the processor and the transceiver are used to run computer programs so that the electronic terminal executes each step of the above method.
[0125] In this embodiment, the memory may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0126] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0127] The present invention can be used in many general or special computing system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like.
[0128] The present invention may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. A method for classifying coal mine message queue data topics, characterized in that: The following steps are involved: Set data subject classification rules; Classify the original data message queue by topic; Define the naming rules for the original data message queue topics; Classify business data message queues by topic; Define the naming rules for business data message queue topics; Use message queues to publish data.
2. The method for classifying coal mine message queue data topics according to claim 1 is characterized in that: The data subject classification rule is: logical partitioning is performed in the subject domain, each subject is not physically partitioned, and data from different data sources of the same data entity enter different logical partitions.
3. The method for classifying coal mine message queue data topics according to claim 1 is characterized in that: The original data message queue topic classification is divided into three levels, with system type as the first level classification, subsystem type as the second level classification, and data type as the third level classification; The system types include safety monitoring, production control and business management; The subsystems in the safety monitoring system include safety monitoring, underground personnel positioning, hydrological monitoring, mine pressure monitoring and underground broadcasting; the data types in the safety monitoring system are divided into definition type, real-time type and historical type; The subsystems in the production control system include main ventilation monitoring, main drainage monitoring, main lifting monitoring, main transport belt monitoring, air compressor monitoring and power monitoring; the data types in the production control system are divided into definition type, real-time type and history type; The subsystems in the business management system include hidden danger management, risk point control and coal measurement; the data type classification is not performed in the business management system.
4. The method for classifying coal mine message queue data topics according to claim 3 is characterized by: The data types have the following data transfer characteristics: Timeliness,Data transmission priority,The priorities of the three data types are as follows: defined data > real-time data > historical data; Necessity, that is, whether data needs to be retransmitted after a data transmission failure to ensure data integrity; Timing, that is, the timing must be maintained during transmission, only some historical data does not consider timing.
5. The method for classifying coal mine message queue data topics according to claim 4 is characterized in that: The naming rules for the original data message queue topic are defined as follows: ys_{category}_{system}_{type}_{name}_{partition} Among them, ys: indicates that the data processing stage is raw data, which is a fixed value; category: indicates the business system type, and its value is the type abbreviation; system: indicates the subsystem, and its value is the system abbreviation; type: indicates the data type, which can be definition class, real-time class, or historical class, and its value can be dy, ss, or ls; name: indicates the data name, and its value is the data abbreviation; partition: indicates the data partition, which is a digital sequence used to distinguish different data sources. When the data has only one source, this item is empty.
6. The method for classifying coal mine message queue data topics according to claim 1, characterized in that: The business data message queue topic classification is divided into three levels, among which the business type is the first level classification, the monitoring object is the second level classification, and the data type is the third level classification; The business types include equipment monitoring, precise positioning, and business management; The monitoring objects in the equipment monitoring business include equipment and measuring points; the data types in the equipment monitoring business are divided into definition type, real-time type and history type; The monitoring objects in the precise positioning service include personnel and vehicles; the data types in the precise positioning service are divided into definition type, real-time type and history type; The monitoring objects in the business operation and management business include hidden dangers, risks and production indicators; the data in the business operation and management business are not classified by data type.
7. The method for classifying coal mine message queue data topics according to claim 6 is characterized by: The naming rules for business data message queue topics are defined as follows: yw_{category}_{object}_{type}_{name}_{partition} Among them, yw: indicates that the data processing stage is business data, which is a fixed value; category: indicates the business type, and the value is the type abbreviation; object: indicates the monitoring object, and the value is the object abbreviation; type: indicates the data type, which can be definition class, real-time class, or historical class, and the values are def, real, or his; name: indicates the data name, and the value is the data abbreviation; partition: indicates data partition, which is a digital sequence used to distinguish data from different coal mines or different systems, or to subdivide data at a time granularity. This item can be empty.
8. The method for classifying coal mine message queue data topics according to claim 7 is characterized by: When logically partitioning business data, the partition rules are as follows: {mine}{system}{block} Among them, mine: represents the coal mine code; system: represents the subsystem code; block: represents the data block number.
9. The method for classifying coal mine message queue data topics according to claim 1, characterized in that: When using a message queue for data publishing, business data is pushed to the target message queue through topic mirroring or topic mapping; The topic mirroring means that the source queue and the target queue have exactly the same topic name. When publishing, data is pulled from the source queue and directly mirrored to the same topic in the target queue. The topic mapping is as follows: the source queue and the target queue have different topic names. When publishing, after reading data from the source queue, the summary information of the source data is identified, and the target queue topic name is obtained according to the topic naming rule of the target queue, or according to the mapping relationship of the statically configured topic, and finally the data is written to the mapped topic of the target queue.