A business data monitoring method, system, device and medium

By using multi-service processes and shared memory in the business data monitoring system, the problems of low efficiency and insufficient flexibility in the existing technology are solved, and efficient business data monitoring and flexible system expansion are achieved.

CN119782082APending Publication Date: 2025-04-08CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411773080.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

Existing business data monitoring methods have problems of inefficiency and insufficient flexibility, especially when facing large-scale distributed systems and complex monitoring needs.

Method used

A business data monitoring method is adopted to count multi-dimensional business data through multi-service processes on the server, and write and read statistical information in the format of label length value in shared memory to ensure clear data structure and improve the system's concurrency processing capabilities and flexibility.

Benefits of technology

It improves the system's concurrent processing capability and data transmission efficiency, ensures that the monitoring client can quickly obtain the service data statistics information on the server, and when expanding new business data monitoring indicators, it only needs to add new type values ​​to improve the system's flexibility and maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782082A_ABST
    Figure CN119782082A_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a business data monitoring method, system, device and medium, the method comprising: performing statistics on business data through multiple service processes of a server to obtain statistical information of the business data; the server writes the statistical information into a shared memory according to a label length value format at a preset first time interval; a monitoring client reads the shared memory according to the label length value format at a preset second time interval to obtain statistical information, and sends the statistical information to a data processing center; the data processing center parses the statistical information to obtain monitoring indicators of the business data; and realizes real-time transmission of business data statistical information between the server and the monitoring client through the shared memory, ensuring that the monitoring client can quickly obtain the business data statistical information of the server, and writes the statistical information of the business data in the label length value format, so as to facilitate the expansion of new business data monitoring indicators and improve flexibility and maintainability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data monitoring technology, and in particular to a business data monitoring method, a business data monitoring system, an electronic device and a computer-readable storage medium. Background Art

[0002] In the microservice architecture, the monitoring and management of business data is a key link to ensure the stability and reliability of the system. In order to achieve real-time monitoring of business data, many companies have adopted various monitoring tools and technologies.

[0003] The existing technology usually adopts the method of synchronously collecting monitoring indicators of business data, which has problems such as waiting timeout for data collection, affected server performance, data consistency and reliability, and insufficient scalability and flexibility when facing large-scale distributed systems and complex monitoring requirements. Summary of the invention

[0004] The embodiments of the present invention provide a business data monitoring method, system, device and medium to solve or partially solve the problems of low efficiency and insufficient flexibility in existing business data monitoring methods.

[0005] The embodiment of the present invention discloses a business data monitoring method, which is applied to a business data monitoring system. The system at least includes a server, a monitoring client, a shared memory connected to the server and the monitoring client respectively, and a data processing center connected to the monitoring client. The server includes at least a plurality of service processes, and the service processes are all connected to a corresponding shared memory. The method includes:

[0006] By using the service process, statistics are collected on the multi-dimensional business data generated by the server during operation to obtain statistical information of the business data;

[0007] Writing the statistical information into the shared memory according to a preset label length value format within a preset first time interval by the service process;

[0008] The monitoring client reads the shared memory according to the tag length value format within a preset second time interval to obtain the statistical information, and sends the statistical information to the data processing center;

[0009] The statistical information is parsed by the data processing center to obtain monitoring indicators corresponding to the business data.

[0010] In some feasible implementations, before the service process writes the statistical information into the shared memory according to a preset label length value format within a preset first time interval, the method further includes:

[0011] Adding a start mark and an end mark before and after the statistical information by the service process; the start mark is used to identify the starting position of the statistical information, and the end mark is used to identify the ending position of the statistical information;

[0012] The step of reading the shared memory according to the tag length value format within a preset second time interval by the monitoring client to obtain the statistical information includes:

[0013] The client reads the shared memory according to the start mark and the end mark to obtain the statistical information.

[0014] In some feasible implementations, the shared memory includes a first memory and a second memory, both of which are provided with common information, and the writing of the statistical information into the shared memory according to the tag length value format within a preset first time interval by the service process includes:

[0015] In response to the shared information representing the first memory, the statistical information is written into the second memory according to the tag length value format within a preset first time interval by the service process, and the shared information is updated to represent the second memory;

[0016] In response to the shared information representing the initial value or the second memory, the server writes the statistical information into the first memory according to the tag length value format within a preset first interval, and updates the shared information to represent the first memory.

[0017] In some feasible implementations, the shared information includes at least first timestamp information, and after the statistical information is written into the shared memory according to the tag length value format by the service process within a preset first time interval, the method further includes:

[0018] The first timestamp information is updated through the service process.

[0019] In some feasible implementations, the monitoring client further includes global variable information, the global variable information includes at least second timestamp information, and after the monitoring client reads the shared memory according to the tag length value format within a preset second time interval, the method further includes:

[0020] The second timestamp information is updated to the first timestamp information through the monitoring client.

[0021] In some feasible implementations, before reading the shared memory according to the tag length value format by the monitoring client within a preset second time interval, the method further includes:

[0022] Comparing the second timestamp information with the first timestamp through the monitoring client;

[0023] If the second timestamp information is not equal to the first timestamp information, the shared memory is read through the monitoring client.

[0024] In some feasible implementations, the monitoring client further includes a receiving buffer, and the method further includes:

[0025] Receiving, through the receiving buffer, a response result returned by the data processing center for the statistical information, and parsing the response result;

[0026] If the response result is an abnormal result, an alarm message is issued through the monitoring client.

[0027] The embodiment of the present invention further discloses a business data monitoring system, the system comprising at least a server, a monitoring client, a shared memory connected to the server and the monitoring client respectively, and a data processing center connected to the monitoring client, the server comprising at least a plurality of service processes, and the service processes are all connected to a corresponding shared memory; wherein:

[0028] The service process is used to count the multi-dimensional business data generated by the server during operation, obtain statistical information of the business data, and write the statistical information into the shared memory according to a preset label length value format within a preset first time interval;

[0029] The monitoring client is used to read the shared memory according to the tag length value format within a preset second time interval, obtain the statistical information, and send the statistical information to the data processing center;

[0030] The data processing center is used to analyze the statistical information and obtain monitoring indicators corresponding to the business data.

[0031] In some feasible implementations, the service process is also used to add a start tag and an end tag before and after the statistical information; the start tag is used to identify the starting position of the statistical information, and the end tag is used to identify the end position of the statistical information; the monitoring client is also used to read the shared memory through the client according to the start tag and the end tag to obtain the statistical information.

[0032] In some feasible implementations, the shared memory includes a first memory and a second memory, and the first memory and the second memory are both provided with common information; wherein,

[0033] In response to the shared information representing the first memory, the service process writes the statistical information into the second memory according to the tag length value format within a preset first time interval, and updates the shared information to represent the second memory;

[0034] In response to the shared information representing the initial value or the second memory, the server writes the statistical information into the first memory according to the tag length value format within a preset first interval, and updates the shared information to represent the first memory.

[0035] In some feasible implementations, the shared information includes at least first timestamp information; wherein,

[0036] The service process is also used to update the first timestamp information.

[0037] In some feasible implementations, the monitoring client further includes global variable information, and the global variable information at least includes second timestamp information; wherein,

[0038] The monitoring client is further used to update the second timestamp information to the first timestamp information.

[0039] In some feasible implementations, the monitoring client is further used to:

[0040] Comparing the second timestamp information with the first timestamp;

[0041] If the second timestamp information is not equal to the first timestamp information, the shared memory is read through the monitoring client.

[0042] In some feasible implementations, the monitoring client further includes a receiving buffer; wherein,

[0043] The receiving buffer is used to receive the response result returned by the data processing center for the statistical information, and to parse the response result. If the response result is an abnormal result, an alarm message is issued.

[0044] The embodiment of the present invention further discloses an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0045] The memory is used to store computer programs;

[0046] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.

[0047] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the method described in the embodiment of the present invention.

[0048] The embodiments of the present invention include the following advantages:

[0049] In an embodiment of the present invention, the business data monitoring system is applied to the business data monitoring system, which at least includes a server, a monitoring client, a shared memory connected to the server and the monitoring client respectively, and a data processing center connected to the monitoring client, the server includes at least a plurality of service processes, and the service processes are all connected to corresponding shared memories, and the multi-dimensional business data generated by the server during operation is counted by the service process to obtain statistical information of the business data; the statistical information is written into the shared memory according to a preset label length value format within a preset first time interval by the service process; the shared memory is read by the monitoring client according to the label length value format within a preset second time interval to obtain statistical information, and the statistical information is sent to the data processing center; the statistical information is parsed by the data processing center to obtain monitoring indicators corresponding to the business data; the multi-dimensional business data is counted by the multiple service processes of the server to improve the concurrent processing capability of the system, and the transmission of business data statistical information between the server and the monitoring client is realized through the shared memory, so as to ensure that the monitoring client can quickly obtain the business data statistical information of the server, and the data structure is clear by writing and reading in the label length value format, and only the type value needs to be added when expanding new business data monitoring indicators, so as to improve the flexibility and maintainability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 is a flowchart of a method for monitoring business data provided in an embodiment of the present invention;

[0051] Figure 2 It is a connection diagram of multiple service processes, shared memory and monitoring client provided in an embodiment of the present invention;

[0052] Figure 3 is a schematic diagram of a shared memory structure provided in an embodiment of the present invention;

[0053] Figure 4 is a structural block diagram of a business data monitoring system provided in an embodiment of the present invention;

[0054] Figure 5 is a block diagram of an electronic device provided in an embodiment of the present invention;

[0055] Figure 6 is a schematic diagram of a computer-readable storage medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0057] As an example, in a microservice architecture, the monitoring and management of business data is a key link to ensure the stability and reliability of the system. In order to achieve real-time monitoring of business data, many companies have adopted various monitoring tools and technologies. The existing technology usually adopts a method of synchronously collecting monitoring indicators of business data. The acquisition module sends instructions to the server to obtain business data, and waits for the server to process and then encapsulate the response and return it to the acquisition module. Finally, the acquisition module reports the return result to the monitoring data center for processing. There are problems such as waiting timeout for data collection, affected server performance, data consistency and reliability, and insufficient scalability and flexibility when facing large-scale distributed systems and complex monitoring requirements.

[0058] In this regard, in the present invention, it is applied to a business data monitoring system, which at least includes a server, a monitoring client, a shared memory connected to the server and the monitoring client respectively, and a data processing center connected to the monitoring client, the server includes at least a plurality of service processes, and the service processes are all connected to corresponding shared memories, and the multi-dimensional business data generated by the server during operation is counted by the service process to obtain statistical information of the business data; the statistical information is written into the shared memory according to a preset label length value format within a preset first time interval by the service process; the shared memory is read by the monitoring client according to the label length value format within a preset second time interval to obtain statistical information, and the statistical information is sent to the data processing center; the statistical information is parsed by the data processing center to obtain monitoring indicators corresponding to the business data; the multi-dimensional business data is counted by the multi-service processes of the server, so as to improve the concurrent processing capability of the system, and the transmission of business data statistical information between the server and the monitoring client is realized through the shared memory, so as to ensure that the monitoring client can quickly obtain the business data statistical information of the server, and the data structure is clear by writing and reading in the label length value format, and only the type value needs to be added when expanding new business data monitoring indicators, so as to improve the flexibility and maintainability of the system.

[0059] Reference Figure 1, shows a flow chart of steps of a business data monitoring method provided in an embodiment of the present invention, which is applied to a business data monitoring system, wherein the system at least includes a server, a monitoring client, a shared memory connected to the server and the monitoring client respectively, and a data processing center connected to the monitoring client, wherein the server includes at least a plurality of service processes, and each of the service processes is connected to a corresponding shared memory, and specifically may include the following steps:

[0060] Step 101: statistics are collected on the multi-dimensional business data generated by the server during operation through the service process to obtain statistical information of the business data;

[0061] The business data monitoring system includes at least a server, a monitoring client, a shared memory, and a data processing center. The server is a multi-process architecture, including multiple service processes. The server is responsible for processing business logic and generating business data. Each service process can be responsible for a specific business function, and then count different business data; the monitoring client is responsible for monitoring and transmitting statistical information of business data, reading statistical information from the shared memory regularly and transmitting it to the data processing center; the shared memory is the communication bridge for transmitting statistical information between the server and the monitoring client; the data processing center is responsible for parsing statistical information to generate monitoring indicators and provide business monitoring data.

[0062] As an example, see Figure 2 , showing a connection diagram of multiple service processes, shared memory and monitoring client provided in an embodiment of the present invention. Each service process corresponds to a shared memory. The service process writes the statistical business data information into the shared memory corresponding to the service process. The monitoring client further reads the data of multiple shared memories in parallel to realize distributed data processing.

[0063] In the process of monitoring business data, first, the business data generated by the server during operation is counted through the service process to generate statistical information of the business data. By summarizing multi-dimensional business data, the system can fully understand the business operation status and provide basic data for subsequent data analysis and monitoring.

[0064] As an example, the service process counts service data through the following messages:

[0065]

[0066]

[0067] Among them, rx_success_cnt: the total number of packets received by the IPv4 protocol stack since the service started;

[0068] process_success_cnt: the total number of packets received and successfully processed by the IPv4 protocol stack since the service started;

[0069] process_fail_cnt: the total number of packets that the IPv4 protocol stack has failed to receive and process since the service started;

[0070] rx_success_cnt_v6: total number of packets received by the IPv6 protocol stack since the service started;

[0071] process_success_cnt_v6: the total number of packets received and successfully processed by the IPv6 protocol stack since the service started;

[0072] process_fail_cnt_v6: the total number of packets received and processed by the IPv6 protocol stack since the service started;

[0073] rx_success_cnt_recurse: the total number of packets received by the IPv4 protocol stack recursive module since the service started;

[0074] process_success_cnt_recurse: the total number of packets received and successfully processed by the IPv4 protocol stack recursive module since the service started;

[0075] process_fail_cnt_recurse: the total number of times the IPv4 protocol stack recursive module has failed to receive and process packets since the service started.

[0076] forward_cnt: the total number of packets received by the IPv4 protocol stack forwarding module since the service started;

[0077] forward_success_cnt: the total number of packets received and successfully processed by the IPv4 protocol stack forwarding module since the service started;

[0078] forward_fail_cnt: The total number of times the IPv4 protocol stack forwarding module has failed to receive and process packets since the service started.

[0079] It should be noted that the embodiments of the present invention include but are not limited to the business data mentioned above, and the business data that needs to be counted can be determined according to needs. It can be understood that technical personnel in this field can also make settings according to actual needs under the guidance of the ideas of the embodiments of the present invention, and the present invention does not limit this.

[0080] Step 102: writing the statistical information into the shared memory according to a preset label length value format within a preset first time interval through the service process;

[0081] Specifically, the service process writes the statistical information into the shared memory according to the pre-designed label length value (Type-Length-Value, TLV protocol) format within the preset first time interval. The service process regularly and actively writes the statistical information of the business data to avoid frequent input and output operations, improve the efficiency and stability of the system, and converts the statistical information of the business data into the label length value format, so that the data structure is clearer, which is convenient for the monitoring client to parse and process, ensure the consistency and readability of the data, and the label length value format can convert different types of data into an expression form. When the system needs to expand new business indicators, it only needs to define new business data types to improve the flexibility and maintainability of business data monitoring. Optionally, the first time interval can be set to 64 seconds, which is specifically set and adjusted according to the monitoring requirements, and the present invention is not limited to this.

[0082] Step 103: reading the shared memory according to the tag length value format within a preset second time interval through the monitoring client to obtain the statistical information, and sending the statistical information to the data processing center;

[0083] Specifically, the monitoring client reads the shared memory according to the preset tag length value format within the preset second time interval, obtains statistical information, and sends the statistical information to the data processing center. The first time interval and the second time interval are different to avoid conflicts between the monitoring client and the service process. Optionally, the second time interval can be set to 240 seconds, which is specifically set and adjusted according to monitoring requirements, and the present invention is not limited to this.

[0084] In some feasible implementations, before the service process writes the statistical information into the shared memory according to a preset label length value format within a preset first time interval, the method further includes:

[0085] Adding a start mark and an end mark before and after the statistical information by the service process; the start mark is used to identify the starting position of the statistical information, and the end mark is used to identify the ending position of the statistical information;

[0086] The step of reading the shared memory according to the tag length value format within a preset second time interval by the monitoring client to obtain the statistical information includes:

[0087] The client reads the shared memory according to the start mark and the end mark to obtain the statistical information.

[0088] Among them, before the service process writes the statistical information into the shared memory, it can also add a start mark and an end mark before and after the statistical information to identify the starting and ending positions of the statistical information, so that the monitoring client can quickly locate and read the statistical message through the start mark and the end mark when reading the shared memory, avoiding data reading errors. The start mark and the end mark can be used to verify the integrity of the statistical information to ensure that the data is not lost or damaged during the transmission process, and through the start mark and the end mark, the monitoring client can accurately identify and read the statistical information, ensure the correct reading and parsing of the data, and improve the accuracy of data processing. As an example, DNS_MONITOR_HEAD and DNS_MONITOR_END can be added directly at the beginning and end of the statistical information, representing the start and end marks of the monitoring indicators written into the shared memory, respectively, so that the monitoring client can directly locate DNS_MONITOR_HEAD when reading, and cyclically read the statistical information of each business data.

[0089] As an example, the monitoring client reads the shared memory according to the tag length value format to obtain the statistical information of each business data:

[0090]

[0091]

[0092] Among them, the dns_monitor_head_t structure is the header storage structure of each business data, and the corresponding values ​​of type and length will be specific to the statistical information of the business data, such as the structure dns_av_tenant_t;

[0093] The hit_tenant_records_cnt field represents the total count of hit tenant record sets;

[0094] The hit_share_records_cnt field represents the total count of hits on the shared record set;

[0095] The hit_cache_records_cnt field represents the total count of hit cache record sets;

[0096] The hit_cache_nxdomain_cnt field represents the total count of hits on the negative cache record set.

[0097] In some feasible implementations, the shared memory includes a first memory and a second memory, both of which are provided with common information, and the writing of the statistical information into the shared memory according to the tag length value format within a preset first time interval by the service process includes:

[0098] In response to the shared information representing the first memory, the statistical information is written into the second memory according to the tag length value format within a preset first time interval by the service process, and the shared information is updated to represent the second memory;

[0099] In response to the shared information representing the initial value or the second memory, the server writes the statistical information into the first memory according to the tag length value format within a preset first interval, and updates the shared information to represent the first memory.

[0100] Specifically, the size of the shared memory can be set as needed, and the shared memory is divided into two parts, the first memory and the second memory, respectively. The first memory and the second memory both have free bytes at the very beginning for storing shared information. Before the service process writes the statistical information into the shared memory, it will first determine whether to write into the first memory or the second memory based on the shared information. If the shared information represents the first memory, the service process writes the statistical information into the second memory and updates the shared information to represent the second memory. If the shared information represents the initial value, i.e., the shared memory initialization or the second memory, the service process writes the statistical information into the first memory and updates the shared information to represent the first memory. By dynamically switching the shared information, the service process can dynamically switch between different memory blocks. Optionally, the shared information may include information such as the identification information of the service process and the address information of the written memory.

[0101] In some feasible implementations, the shared information includes at least first timestamp information, and after the statistical information is written into the shared memory according to the tag length value format by the service process within a preset first time interval, the method further includes:

[0102] The first timestamp information is updated through the service process.

[0103] Specifically, the shared information may include first timestamp information, which is used to record the time point when the service process writes the statistical information to the shared memory. After the service process writes the statistical information to the shared memory, the first timestamp information is immediately updated to record the current time point, ensuring that the first timestamp information is consistent with the writing time of the statistical information. Furthermore, through the first timestamp information, the monitoring client can judge the validity of the statistical information and ensure that the monitoring client can read the latest statistical information in a timely manner.

[0104] In some feasible implementations, the monitoring client further includes global variable information, the global variable information includes at least second timestamp information, and after the monitoring client reads the shared memory according to the tag length value format within a preset second time interval, the method further includes:

[0105] The second timestamp information is updated to the first timestamp information through the monitoring client.

[0106] Specifically, the monitoring client includes global variable information, which includes at least second timestamp information. After the monitoring client reads the statistical information in the shared memory, the second timestamp information is updated to the time recorded in the first timestamp information. It can be understood that the second timestamp information is used to record the service process write time corresponding to the statistical information most recently read by the monitoring client.

[0107] In some feasible implementations, before reading the shared memory according to the tag length value format by the monitoring client within a preset second time interval, the method further includes:

[0108] Comparing the second timestamp information with the first timestamp through the monitoring client;

[0109] If the second timestamp information is not equal to the first timestamp information, the shared memory is read through the monitoring client.

[0110] Specifically, before reading the shared memory, the monitoring client will compare the second timestamp information in the monitoring client with the first timestamp information in the shared memory, that is, the time when the service process last wrote statistical information to the shared memory is compared with the writing time corresponding to the statistical information last read by the monitoring client. If the two are consistent, it proves that the service process has not written new statistical information, and the monitoring client does not read the shared memory. If the two are inconsistent, it proves that the service process has written new statistical information, and the monitoring client reads the shared memory, so that the monitoring client can determine whether the statistical information has been updated through the timestamp information, thereby ensuring that the read data is the latest.

[0111] Step 104: The statistical information is parsed by the data processing center to obtain monitoring indicators corresponding to the business data.

[0112] In the embodiment of the present invention, the data processing center analyzes and processes the statistical information received from the monitoring client to generate monitoring indicators corresponding to the business data. Specifically, the data processing center uses the total count information of the business data as basic data, and further analyzes and processes to generate monitoring indicators corresponding to the business data, such as query rate per second, business increment, etc., and the data processing center can also visualize the monitoring indicators to provide intuitive monitoring data.

[0113] In some feasible implementations, the monitoring client also includes a sending buffer. Before the monitoring client sends the statistical information to the data processing center, the statistical information of all business data is formatted, converted into the push format of the data processing center and stored in the sending buffer. After determining that all business data are saved, the statistical information in the sending buffer is pushed to the monitoring data center via the HTTP (HyperText Transfer Protocol) service of the socket long link.

[0114] As an example, the data processing center can be Prometheus (Prometheus monitoring system), and the push format corresponding to Prometheus is:

[0115] metric_name{label_name1="label_value1",label_name2="label_value2",...};

[0116] Among them, metric_name is the name of the business data, label_name / label_value is the dimension name and dimension value, which are used to further classify and group the business data. There must be double quotes on both sides. When there is no dimension, this part can be omitted; metric_value is the count value corresponding to the business data. For example, disk usage (with dimension): disk_usage{disk_name="disk01"}0.75; CPU usage (without dimension): cpu_usage 0.75.

[0117] In some feasible implementations, the monitoring client further includes a receiving buffer, and the method further includes:

[0118] Receiving, through the receiving buffer, a response result returned by the data processing center for the statistical information, and parsing the response result;

[0119] If the response result is an abnormal result, an alarm message is issued through the monitoring client.

[0120] Specifically, the receiving buffer will receive the response result of the statistical information returned by the data processing center, and the response result is used to indicate whether the statistical information is pushed successfully. When the monitoring client receives the response result indicating that the push failed, an alarm message is issued to help business personnel find and solve the problem in time to ensure the normal push of the monitoring business.

[0121] Reference Figure 3, showing a structural schematic diagram of a shared memory provided in an embodiment of the present invention, the shared memory is divided into two parts, the upper and lower parts, respectively serving as a first memory and a second memory, the first memory and the second memory both have free bytes at the very beginning for storing shared information, the shared information comprising: offset_read, used to indicate reading the first memory or the second memory; proc_id, used to indicate the identifier of the service process corresponding to the shared memory; one_ptr_start, used to indicate the starting address of the first memory; one_ptr_end, used to indicate the ending address of the first memory; two_ptr_start, used to indicate the starting address of the second memory; two_ptr_end, used to indicate the ending address of the second memory; hz, used to indicate the current time of the system; cur_tsc, used to indicate the current timestamp, i.e., the first timestamp, of the service process writing statistical information into the shared memory.

[0122] The global variable information is stored in the monitoring client, including: ptr_start, used to indicate the starting address of the first memory or the starting address of the second memory; ptr_end, used to indicate the starting address of the first memory or the starting address of the second memory; ptr_offset, used to indicate the real-time offset when reading the shared memory.

[0123] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0124] It should be noted that the embodiments of the present invention include but are not limited to the above examples. It is understandable that those skilled in the art can also make settings according to actual needs under the guidance of the ideas of the embodiments of the present invention, and the present invention is not limited to this.

[0125] In an embodiment of the present invention, the business data monitoring system is applied to the business data monitoring system, which at least includes a server, a monitoring client, a shared memory connected to the server and the monitoring client respectively, and a data processing center connected to the monitoring client, the server includes at least a plurality of service processes, and the service processes are all connected to corresponding shared memories, and the multi-dimensional business data generated by the server during operation is counted by the service process to obtain statistical information of the business data; the statistical information is written into the shared memory according to a preset label length value format within a preset first time interval by the service process; the shared memory is read by the monitoring client according to the label length value format within a preset second time interval to obtain statistical information, and the statistical information is sent to the data processing center; the statistical information is parsed by the data processing center to obtain monitoring indicators corresponding to the business data; the multi-dimensional business data is counted by the multiple service processes of the server to improve the concurrent processing capability of the system, and the transmission of business data statistical information between the server and the monitoring client is realized through the shared memory, so as to ensure that the monitoring client can quickly obtain the business data statistical information of the server, and the data structure is clear by writing and reading in the label length value format, and only the type value needs to be added when expanding new business data monitoring indicators, so as to improve the flexibility and maintainability of the system.

[0126] Reference Figure 4 , shows a structural block diagram of a business data monitoring system provided in an embodiment of the present invention, which is applied to a business data monitoring system, wherein the system at least includes a server, a monitoring client, a shared memory connected to the server and the monitoring client respectively, and a data processing center connected to the monitoring client, wherein the server includes at least a plurality of service processes, and each of the service processes is connected to a corresponding shared memory; wherein:

[0127] The service process is used to count the multi-dimensional business data generated by the server during operation, obtain statistical information of the business data, and write the statistical information into the shared memory according to a preset label length value format within a preset first time interval;

[0128] The monitoring client is used to read the shared memory according to the tag length value format within a preset second time interval, obtain the statistical information, and send the statistical information to the data processing center;

[0129] The data processing center is used to analyze the statistical information and obtain monitoring indicators corresponding to the business data.

[0130] In some feasible implementations, the service process is also used to add a start tag and an end tag before and after the statistical information; the start tag is used to identify the starting position of the statistical information, and the end tag is used to identify the end position of the statistical information; the monitoring client is also used to read the shared memory through the client according to the start tag and the end tag to obtain the statistical information.

[0131] In some feasible implementations, the shared memory includes a first memory and a second memory, and the first memory and the second memory are both provided with common information; wherein,

[0132] In response to the shared information representing the first memory, the service process writes the statistical information into the second memory according to the tag length value format within a preset first time interval, and updates the shared information to represent the second memory;

[0133] In response to the shared information representing the initial value or the second memory, the server writes the statistical information into the first memory according to the tag length value format within a preset first interval, and updates the shared information to represent the first memory.

[0134] In some feasible implementations, the shared information includes at least first timestamp information; wherein,

[0135] The service process is also used to update the first timestamp information.

[0136] In some feasible implementations, the monitoring client further includes global variable information, and the global variable information at least includes second timestamp information; wherein,

[0137] The monitoring client is further used to update the second timestamp information to the first timestamp information.

[0138] In some feasible implementations, the monitoring client is further used to:

[0139] Comparing the second timestamp information with the first timestamp;

[0140] If the second timestamp information is not equal to the first timestamp information, the shared memory is read through the monitoring client.

[0141] In some feasible implementations, the monitoring client further includes a receiving buffer; wherein,

[0142] The receiving buffer is used to receive the response result returned by the data processing center for the statistical information, and to parse the response result. If the response result is an abnormal result, an alarm message is issued.

[0143] As for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the system embodiment.

[0144] In addition, the present application also provides an electronic device, such as Figure 5 As shown, it includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.

[0145] Memory 503, used for storing computer programs;

[0146] The processor 501 is used to execute the program stored in the memory 503 to implement the various processes of the above method embodiment and achieve the same technical effect. To avoid repetition, it will not be described here.

[0147] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0148] The communication interface is used for communication between the above terminal and other devices.

[0149] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0150] 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.

[0151] like Figure 6 As shown, in another embodiment provided in the present application, a computer-readable storage medium 601 is also provided, in which instructions are stored. When executed by one or more processors, the processors execute the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, they are not repeated here.

[0152] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0153] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0154] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

[0155] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0156] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0157] In the embodiments provided in the present application, it should be understood that the disclosed methods and systems can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0158] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0159] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0160] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0161] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A business data monitoring method, characterized in that: Applied to a business data monitoring system, the system at least includes a server, a monitoring client, a shared memory connected to the server and the monitoring client respectively, and a data processing center connected to the monitoring client, the server includes at least a plurality of service processes, and the service processes are all connected to a corresponding shared memory, the method includes: By using the service process, statistics are collected on the multi-dimensional business data generated by the server during operation to obtain statistical information of the business data; Writing the statistical information into the shared memory according to a preset label length value format within a preset first time interval by the service process; The monitoring client reads the shared memory according to the tag length value format within a preset second time interval to obtain the statistical information, and sends the statistical information to the data processing center; The statistical information is parsed by the data processing center to obtain monitoring indicators corresponding to the business data.

2. The method according to claim 1, characterized in that: Before the statistical information is written into the shared memory according to a preset label length value format by the service process within a preset first time interval, the method further includes: Adding a start mark and an end mark before and after the statistical information by the service process; the start mark is used to identify the starting position of the statistical information, and the end mark is used to identify the ending position of the statistical information; The step of reading the shared memory according to the tag length value format within a preset second time interval by the monitoring client to obtain the statistical information includes: The client reads the shared memory according to the start mark and the end mark to obtain the statistical information.

3. The method according to claim 1, characterized in that: The shared memory includes a first memory and a second memory, both of which are provided with common information, and the writing of the statistical information into the shared memory according to the label length value format within a preset first time interval by the service process includes: In response to the shared information representing the first memory, the statistical information is written into the second memory according to the tag length value format within a preset first time interval by the service process, and the shared information is updated to represent the second memory; In response to the shared information representing the initial value or the second memory, the server writes the statistical information into the first memory according to the tag length value format within a preset first interval, and updates the shared information to represent the first memory.

4. The method according to claim 3, characterized in that: The shared information at least includes first timestamp information, and after the statistical information is written into the shared memory according to the tag length value format by the service process within a preset first time interval, further includes: The first timestamp information is updated through the service process.

5. The method according to claim 4, characterized in that: The monitoring client further includes global variable information, the global variable information at least including second timestamp information, and after the monitoring client reads the shared memory according to the tag length value format within a preset second time interval, the method further includes: The second timestamp information is updated to the first timestamp information through the monitoring client.

6. The method according to claim 5, characterized in that: Before reading the shared memory according to the tag length value format within a preset second time interval by the monitoring client, the method further includes: Comparing the second timestamp information with the first timestamp through the monitoring client; If the second timestamp information is not equal to the first timestamp information, the shared memory is read through the monitoring client.

7. The method according to claim 1, characterized in that: The monitoring client further includes a receiving buffer, and the method further includes: Receiving, through the receiving buffer, a response result returned by the data processing center for the statistical information, and parsing the response result; If the response result is an abnormal result, an alarm message is issued through the monitoring client.

8. A business data monitoring system, characterized in that: The system at least includes a server, a monitoring client, a shared memory connected to the server and the monitoring client respectively, and a data processing center connected to the monitoring client, wherein the server includes at least a plurality of service processes, and each of the service processes is connected to a corresponding shared memory; wherein: The service process is used to count the multi-dimensional business data generated by the server during operation, obtain statistical information of the business data, and write the statistical information into the shared memory according to a preset label length value format within a preset first time interval; The monitoring client is used to read the shared memory according to the tag length value format within a preset second time interval, obtain the statistical information, and send the statistical information to the data processing center; The data processing center is used to analyze the statistical information and obtain monitoring indicators corresponding to the business data.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 7 when executing the program stored in the memory.

10. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 7.