Index data monitoring method and device, equipment and medium

By subscribing to the call center's metric data and storing it to the database, combining dynamically adjusted Blonde filters and Redis distributed locks, the problems of inefficient acquisition of agent information and misjudgment of cache query are solved, and efficient data acquisition and failure recovery are achieved .

CN119026995APending Publication Date: 2024-11-26SHANGHAI SHUHE INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411193411.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In the prior art, obtaining entity status information of agents and agent groups requires relying on external suppliers, resulting in low communication efficiency and high cost. The cache query method will cause misjudgment problems when the data volume is large, increasing the burden on the system.

Method used

By configuring the system to subscribe to the call center's metric data, store it in the database, and use dynamically adjusted Bloom filters and Redis distributed locks to achieve health detection and failure recovery, avoiding misjudgment of cache queries.

Benefits of technology

It realizes the direct acquisition of agent information according to business needs, reduce external communication costs, supports the use of multiple business lines, and avoids the problem of increasing misjudgment rate by dynamically adjusting the Bloom filter.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119026995A_ABST
    Figure CN119026995A_ABST
Patent Text Reader

Abstract

The invention relates to an index data monitoring method and device, equipment and a medium. The method comprises the following steps: an index information configuration step: configuring index information needing to be monitored through a configuration system; an index data acquisition step: subscribing to obtain corresponding index data from the call center according to the configured index information; and a data storage step: storing the obtained index data in a database, and providing a query interface. According to the index data monitoring method provided by the invention, the related information of the seat can be directly obtained according to the service requirement, the communication cost of external suppliers is reduced, the health detection and fault recovery functions are realized, and the inherent defects during query in a cache mode are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an indicator data monitoring method, device, equipment and medium. Background Art

[0002] Existing companies usually use external suppliers to provide relevant services for seats. At this time, for internal company personnel, obtaining status information of entities such as seats and seat groups must be done through suppliers, which will greatly reduce communication efficiency and increase communication costs. In addition, it is difficult to flexibly configure the data that needs to be monitored. In addition, in the actual work process, when the number of query requests is too large, the response speed is generally improved by caching, but when a large number of requests in a short period of time do not have corresponding data in the cache, it will also add a huge burden to the system. The traditional method generally uses Bloom filters to quickly determine whether there is relevant data in the cache, but as the data in the cache of Bloom filters continues to increase, its misjudgment will become more and more serious.

[0003] Currently, no effective solution has been proposed to the above problems. Summary of the invention

[0004] Based on this, it is necessary to provide an indicator data monitoring method, device, equipment and medium for the above technical problems. The indicator data monitoring method proposed in the present invention can directly obtain relevant information of seats according to business needs, reduce the communication cost of external suppliers, have health detection and fault recovery functions, and avoid the inherent defects of querying through caching.

[0005] According to a first aspect of the present invention, there is provided an indicator data monitoring method, comprising:

[0006] Indicator information configuration step: configure the indicator information to be monitored by configuring the system;

[0007] Indicator data acquisition step, obtain corresponding indicator data from the call center subscription according to the configured indicator information;

[0008] The data storage step stores the obtained indicator data in the database and provides a query interface.

[0009] In some embodiments, it also includes: a fault recovery step, performing heartbeat detection through the distributed lock mechanism of Redis, setting a flag, if the application is closed normally, the flag is reset, and the service is restarted normally; if the exception causes the spring container to not be closed normally and the flag is not reset, the thread is released and the service is restarted.

[0010] In some embodiments, the fault recovery step also includes: using Redis to record the data update time each time new data is obtained, and restarting the service if no new data is obtained within a specified time.

[0011] In some embodiments, it also includes: a data isolation step to isolate the indicator data of each business line so that different business lines do not affect each other.

[0012] In some embodiments, it also includes: a monitoring step, monitoring the data update of the call center, and when the call center has new indicator data, the data is pushed and stored in the database.

[0013] In some embodiments, it also includes:

[0014] Query interface configuration step, configure cache and Bloom filter for the query interface;

[0015] The query step is to query data and use the Bloom filter to determine whether the required data is in the cache. If so, the data is directly obtained from the cache. If not, the data is called from the database and stored in the cache.

[0016] The length and number of the bit vector of the Bloom filter can be adjusted dynamically. When a query request arrives, the error rate is calculated. When the error rate exceeds the threshold, the current bit vector is extended to the next bit vector. The calculation formula of the error rate is:

[0017] p=(1-e -kn / m ) k

[0018] Where p is the false positive rate, m is the length of the current bit vector, k is the number of hash functions (i.e., the number of positions a request maps to in the bit vector), and n is the number of elements in the current bit vector;

[0019] The length of the next bit vector is calculated as:

[0020]

[0021] Among them, m i is the length of the extended i-th bit vector, d T is the time interval from the time of the last bit vector extended to the current time, C is the number of requests for the last bit vector extended, and m0 is the initial length of the bit vector.

[0022] According to a second aspect of the present invention, there is provided an indicator data monitoring device, comprising:

[0023] The indicator information configuration module is used to configure the indicator information that needs to be monitored through the configuration system;

[0024] The indicator data acquisition module is used to obtain the corresponding indicator data from the call center according to the configured indicator information;

[0025] The data storage module is used to store the obtained indicator data in the database and provide a query interface.

[0026] According to a third aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned method embodiments when executing the computer program.

[0027] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method of any of the above embodiments are implemented.

[0028] Based on the above technical solution, the present invention has at least the following beneficial effects:

[0029] 1. It can directly obtain relevant information of seats according to business needs, reducing the communication costs of external suppliers, configuring services, and being able to adjust relevant configurations in real time as needed. It supports simultaneous use by multiple business lines and implements simple health detection and fault recovery functions through distributed locks and redis.

[0030] 2. By adjusting the length and number of bit vectors, the defect of increasing misjudgment when using Bloom filters is avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is a flowchart of some embodiments of the indicator data monitoring method of the present invention;

[0032] Figure 2 is a vector expansion schematic diagram of the Bloom filter of the present invention;

[0033] Figure 3 is a flowchart of other embodiments of the indicator data monitoring method of the present invention;

[0034] Figure 4 It is a schematic diagram of the structure of some embodiments of the indicator data monitoring device of the present invention;

[0035] Figure 5 It is a diagram of the internal structure of a computer device used to implement some embodiments of the present invention. DETAILED DESCRIPTION

[0036] Embodiments of the present invention will be described more fully below with reference to the accompanying drawings, in which embodiments of the present invention are shown. However, the present invention can be embodied in many different forms and should not be construed as limited to the embodiments set forth herein.

[0037] The terms used herein are used only for the purpose of describing specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a", "an", "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that when used herein, the term "comprising" specifies the presence of the claimed features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof.

[0038] Unless otherwise defined, the terms (including technical and scientific terms) used herein have the same meanings as commonly understood by those of ordinary skill in the art to which the present disclosure belongs. The terms used herein should be interpreted as having the meanings consistent with their meanings in the context of this specification and in the relevant field, and should not be interpreted in an idealized or overly formal sense, unless specifically defined as such herein.

[0039] Before describing the specific details of the present application, the meanings of the terms used in the present application will be briefly explained.

[0040] Indicator information: information related to the monitored indicator, including: the target object of monitoring, the monitoring time, the monitoring method, etc.

[0041] Bloom filter: Proposed by Bloom in 1970, it is essentially a very long binary vector and a series of random mapping functions (hash functions). Bloom filter can be used to retrieve whether an element is in a set. Its space efficiency and query time are better than general algorithms.

[0042] redis: An open source log-based, key-value database written in ANSI C language, supporting the network and can be memory-based or persistent.

[0043] Figure 1 A schematic flow chart showing some embodiments of the indicator data monitoring method of the present invention.

[0044] The method includes:

[0045] Indicator information configuration step S102, configuring the indicator information to be monitored by configuring the system;

[0046] Indicator data acquisition step S104, obtaining corresponding indicator data from the call center according to the configured indicator information;

[0047] In the data storage step S106, the obtained indicator data is stored in a database and a query interface is provided.

[0048] In some embodiments, it also includes: a fault recovery step, starting a daemon thread to perform heartbeat detection through the distributed lock mechanism of redis within a configurable time range (such as: 9:00-21:00), setting a flag, and if the application is shut down normally, directly restart the service. If the node is killed directly during application deployment or node restart, and the spring container is not shut down normally, the flag will not be reset. At this time, it is necessary to safely release the previous thread before restarting the service. In addition, by using redis to record the data update time each time new data is pulled, if no new data is pulled within a configurable specified time (such as: 5 minutes), the service is restarted to ensure high availability of the service.

[0049] In some embodiments, the indicator information that needs to be monitored is configured through the configuration system, and the configuration content includes: object number, indicator name, subscription method (1. Statistics when retrieval is required 2. Regular statistics 3. Statistics when the statistical value changes 4. Statistics when reset), interval time, etc. In this way, the indicator information that needs to be subscribed can be updated at any time.

[0050] In some embodiments, it also includes: a monitoring step, when the call center has new indicator data updated, data is pushed, the received data is isolated by tenant ID and stored in redis for subsequent query use.

[0051] In some embodiments, it also includes: a data isolation step to isolate the indicator data of each business line so that different business lines do not affect each other.

[0052] In some embodiments, it also includes:

[0053] Query interface configuration step, configure cache and Bloom filter for the query interface;

[0054] The query step is to query data and use the Bloom filter to determine whether the required data is in the cache. If so, the data is directly obtained from the cache. If not, the data is called from the database and stored in the cache.

[0055] The length and number of the bit vector of the Bloom filter can be adjusted dynamically. When a query request arrives, the error rate is calculated. When the error rate exceeds the threshold, the current bit vector is extended to the next bit vector. The calculation formula of the error rate is:

[0056] p=(1-e -kn / m ) k

[0057] Where p is the false positive rate, m is the length of the current bit vector, k is the number of hash functions, and n is the number of elements in the current bit vector;

[0058] The length of the next bit vector is calculated as:

[0059]

[0060] Among them, m i is the length of the extended i-th bit vector, d T is the time interval from the time of the last bit vector extended to the current time, C is the number of requests for the last bit vector extended, and m0 is the initial length of the bit vector.

[0061] Figure 2 A schematic diagram of vector expansion of the Bloom filter of the present invention is shown.

[0062] like Figure 2 As shown, the initial length m0 of the bit vector is 16. When request a arrives, it is mapped to positions 0 and 3 (i.e., k=2) through the hash function. When request b arrives, it is mapped to positions 5 and 7. When request c arrives, it is mapped to positions 12 and 14. When request d arrives, it is mapped to positions 9 and 12. Position 12 is already 1, so it remains unchanged.

[0063] When the e request arrives, since the number of elements in m0 reaches 5, according to the error rate calculation formula, the error rate has exceeded the threshold of 0.2 and needs to be expanded. At this time, the time interval from the last bit vector expansion to the current time is 4. According to the calculation formula for the length of the next bit vector, it can be calculated that the length of the expansion vector (m1) is 16. When the i request arrives, the number of elements in m1 reaches, the error rate exceeds the threshold, and it needs to be expanded again. At this time, the time interval from the last expansion to the current time is 4, so it can be calculated that the length of the expansion vector (m2) is 32.

[0064] Figure 3 A schematic flow chart showing other embodiments of the indicator data monitoring method of the present invention.

[0065] like Figure 3 As shown, first configure the system configuration indicator information, then perform health monitoring, troubleshoot fault recovery, and start the service. Subscribe to Genesys (call center) to obtain subscription results based on the indicator information of the configuration center, filter the obtained data and store it in redis, provide relevant query interfaces, and downstream suppliers can query agent information as needed.

[0066] Figure 4A schematic structural diagram of some embodiments of an indicator data monitoring device is shown.

[0067] like Figure 4 As shown, including:

[0068] The indicator information configuration module 100 is used to configure the indicator information to be monitored by configuring the system;

[0069] The indicator data acquisition module 200 is used to obtain corresponding indicator data from the call center according to the configured indicator information;

[0070] The data storage module 300 is used to store the obtained indicator data in a database and provide a query interface.

[0071] For the specific definition of an indicator data monitoring device, please refer to the definition of an indicator data monitoring method above, which will not be repeated here. Each module in the above-mentioned indicator data monitoring device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0072] The present invention also provides a computer device, which may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above-mentioned indicator data monitoring method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc. Those skilled in the art can understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0073] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned indicator data monitoring method is implemented.

[0074] Those skilled in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus), direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0075] So far, the embodiments of the present invention have been described in detail. In order to avoid obscuring the concept of the present invention, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solutions disclosed herein.

[0076] Although some specific embodiments of the present invention have been described in detail by way of examples, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It should be understood by those skilled in the art that the above embodiments may be modified or some technical features may be replaced by equivalents without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.

Claims

1. A method for monitoring indicator data, characterized in that: include: Indicator information configuration step: configure the indicator information to be monitored by configuring the system; Indicator data acquisition step, obtain corresponding indicator data from the call center according to the configured indicator information; The data storage step stores the obtained indicator data in the database and provides a query interface.

2. The indicator data monitoring method according to claim 1, characterized in that: Also includes: In the fault recovery step, a heartbeat detection is performed through the distributed lock mechanism of Redis, and a flag is set. If the application is closed normally and the flag is reset, the service is restarted normally. If the exception causes the spring container to not be closed normally and the flag is not reset, the thread is released and the service is restarted.

3. The indicator data monitoring method according to claim 2, characterized in that: The fault recovery step also includes: using Redis to record the data update time each time new data is obtained, and restarting the service if no new data is obtained within the specified time.

4. The indicator data monitoring method according to claim 1, characterized in that: Also includes: In the data isolation step, the indicator data of each business line is isolated to prevent different business lines from affecting each other.

5. The indicator data monitoring method according to claim 1, characterized in that: It also includes: a monitoring step, monitoring the data update of the call center, and when the call center has new indicator data, pushing the data and storing it in the database.

6. The indicator data monitoring method according to claim 1, characterized in that: Also includes: Query interface configuration step, configure cache and Bloom filter for the query interface; The query step is to query data and use the Bloom filter to determine whether the required data is in the cache. If so, the data is directly obtained from the cache. If not, the data is called from the database and stored in the cache. The length and number of the bit vector of the Bloom filter can be adjusted dynamically. When a query request arrives, the error rate is calculated. When the error rate exceeds the threshold, the current bit vector is extended to the next bit vector. The calculation formula of the error rate is: p=(1-e -kn / m ) k Where p is the false positive rate, m is the length of the current bit vector, k is the number of hash functions, and n is the number of elements in the current bit vector; The length of the next bit vector is calculated as: Among them, m i is the length of the extended i-th bit vector, d T is the time interval from the time of the last bit vector extended to the current time, C is the number of requests for the last bit vector extended, and m0 is the initial length of the bit vector.

7. An indicator data monitoring device, characterized in that: include: The indicator information configuration module is used to configure the indicator information that needs to be monitored through the configuration system; The indicator data acquisition module is used to obtain the corresponding indicator data from the call center according to the configured indicator information; The data storage module is used to store the obtained indicator data in the database and provide a query interface.

8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.