Seat Duration Statistics Method, System, Device, Electronic Device, and Storage Medium

By using the ClickHouse statistics module to process the agent system access log and generate a preset statistical list, the problems of complexity and high storage costs of the agent time statistics system in the existing technology are solved, and efficient and simplified agent time statistics and rapid problem positioning are achieved.

CN114490557BActive Publication Date: 2025-06-24PING AN TECH (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210143313.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-16
Publication Date
2025-06-24
Estimated Expiration
2042-02-16

AI Technical Summary

Technical Problem

In the prior art, the seat time statistics system has a cumbersome structure, complex processing procedures, high difficulty in use and maintenance, high storage costs, large space occupancy, and difficult to quickly locate problems.

Method used

The ClickHouse statistics module is used to calculate the length of the seat. By collecting the logs of the seat system, analyzing the logs to obtain the statistical information of the seats, processing the information according to the preset filling rules, generating a preset statistics list, and finally using this list to calculate the length of the seats.

Benefits of technology

It reduces storage costs, simplifies processing processes, reduces system components, improves system robustness and maintainability, can quickly locate problems, and improves the efficiency and user experience of seat time statistics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114490557B_ABST
    Figure CN114490557B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention relate to the field of data mining technology, and provide a seat duration statistical method and device, an electronic device, and a storage medium, and relate to the field of big data retrieval technology. The seat duration statistical method obtains the seat system access logs collected by a collector, then parses the seat access logs to obtain seat statistical information, and then sends the seat statistical information to the ClickHouse statistical module, so that a preset statistical list is obtained according to the seat statistical information according to a preset filling rule, and finally the seat duration is statistically calculated by using the preset statistical list to obtain the seat duration of each seat subsystem. Compared with the related technology, this embodiment reduces the storage cost, simplifies the processing flow, reduces the components used, improves the robustness of the system, and when there is a problem with the duration result, it can be quickly located through the preset statistical list, increasing the maintainability of the system. At the same time, it improves the statistical efficiency of the seat duration, enhances the user experience, and expands the value and significance of the data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data mining, and particularly to a method, system, device, electronic device, and storage medium for seat duration statistics. Background Art

[0002] A seat, that is, a seat representative, or a telephone operator, operator, etc., is responsible for answering users' inquiries, complaints or suggestions, ensuring the accuracy and timeliness of information transmission, and guaranteeing customer satisfaction. The seat duration in the seat subsystem is an important indicator to measure the efficiency in the seat's work. The seat subsystem generally consists of a seat computer, seat software, seat earphones, and seat service personnel.

[0003] In related technologies, most seat duration statistics adopt big data solutions to count the seat duration. For example, spark or flink is used for processing. The system components for processing generally consist of 5-6 components such as flume + kafka + flink / spark + hdfs + hive. The duration statistics system structured in this way is cumbersome, the processing process is relatively complex, the use and maintenance are very difficult, and most of the log data is stored in hdfs or elasticsearch. This storage method occupies a large amount of space. When there is a problem with the duration of a certain seat, it is not convenient to locate the problem. Therefore, how to solve the seat duration statistics with lower cost, more efficiently and accurately has become a problem to be solved. Summary of the Invention

[0004] The main purpose of the embodiments of the present invention is to propose a method, system, device, electronic device, and storage medium for seat duration statistics, which can reduce storage costs, simplify the processing process, increase the maintainability of the system, and at the same time improve the statistical efficiency of seat duration and enhance the user experience.

[0005] To achieve the above object, the first aspect of the embodiments of the present invention proposes a method for seat duration statistics, including:

[0006] Collecting seat system access logs of the seat subsystem;

[0007] Parsing the seat access logs to obtain seat statistical information;

[0008] Using the ClickHouse statistical module to process the seat statistical information according to a preset filling rule to obtain a preset statistical list;

[0009] Using the preset statistical list to perform seat duration statistics to obtain the seat duration of each seat subsystem.

[0010] In some embodiments, the parsing the seat access logs to obtain seat statistical information includes:

[0011] Parse the access log of the operator system using a regular parsing rule to obtain at least one preset format field;

[0012] Combine the preset format fields to obtain the operator statistical information, and the preset format fields include one or more of: operator employee number, access interface, access time, or request IP.

[0013] In some embodiments, sending the operator statistical information to the ClickHouse statistical module, so that the ClickHouse statistical module obtains a preset statistical list according to the preset filling rule based on the operator statistical information, includes:

[0014] Obtain the interface information of the ClickHouse statistical module, and the interface information includes: receiving address, receiving port, preset table name, and preset table template;

[0015] A preset table generated according to the preset table name and the preset table template;

[0016] Send the operator statistical information to the ClickHouse statistical module according to the receiving address and the receiving port, so that the ClickHouse statistical module can fill the preset table according to the preset filling rule and the preset format field to obtain the preset statistical list.

[0017] In some embodiments, using the preset statistical list to perform operator duration statistics to obtain the operator duration of each operator subsystem, includes:

[0018] Obtain the statistical duration;

[0019] Access the access interface of the ClickHouse statistical module to obtain the preset statistical list within the statistical duration;

[0020] Calculate the operator duration of each operator subsystem according to the preset statistical list.

[0021] In some embodiments, further includes:

[0022] Generate an operator duration statistical table according to the operator duration of each operator subsystem and the operator area information;

[0023] Obtain the retrieval keyword of the target operator subsystem;

[0024] Use the retrieval keyword to search the operator duration statistical table to obtain the operator duration of the target operator subsystem.

[0025] In some embodiments, before collecting the access log of the operator system, further includes:

[0026] Obtain acquisition parameters, where the acquisition parameters include the access logs of the agent system specified for acquisition or the location of the access logs of the agent system for which acquisition is performed;

[0027] Configure a collector according to the acquisition parameters, so that the collector can collect the access logs of the agent system.

[0028] To achieve the above object, a second aspect of the present invention proposes an agent duration statistics system, including: at least one agent subsystem, a collector corresponding to the agent subsystem, and a ClickHouse statistics module. The agent duration statistics system calculates the agent duration of the agent subsystem by using the agent duration statistics method according to any one of the first aspects.

[0029] To achieve the above object, a third aspect of the present invention proposes an agent duration statistics device, including:

[0030] A log acquisition module for acquiring the access logs of the agent system of the agent subsystem;

[0031] A log parsing module for parsing the access logs of the agent to obtain agent statistics information;

[0032] A list filling module for processing the agent statistics information according to a preset filling rule by using a ClickHouse statistics module to obtain a preset statistics list;

[0033] A duration statistics module for performing agent duration statistics by using the preset statistics list to obtain the agent duration of each agent subsystem.

[0034] To achieve the above object, a fourth aspect of the present invention proposes an electronic device, including:

[0035] At least one memory;

[0036] At least one processor;

[0037] At least one program;

[0038] The program is stored in the memory, and the processor executes the at least one program to implement the method according to the first aspect of the present invention as described above.

[0039] To achieve the above object, a fifth aspect of the present invention proposes a storage medium, which is a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to cause a computer to execute:

[0040] The method according to the first aspect as described above.

[0041] The seat duration statistics method, system, device, electronic device, and storage medium proposed in the embodiments of the present invention obtain the seat system access logs collected by the collector, then parse the seat access logs to obtain seat statistics information, and then send the seat statistics information to the ClickHouse statistics module, so that a preset statistics list is obtained according to the seat statistics information according to the preset filling rules. Finally, the seat duration is statistically calculated using the preset statistics list to obtain the seat duration of each seat subsystem. Compared with the big data solution of flume + kafka + flink + hdfs + hive in the related technology, this embodiment reduces the storage cost, simplifies the processing flow, reduces the components used, improves the robustness of the system, and when there is a problem with the duration result, the location of the problem can be quickly located through the preset statistics list, thereby solving the problem and increasing the maintainability of the system. At the same time, it improves the statistical efficiency of the seat duration, enhances the user experience, and expands the value and significance of the data. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 is a flowchart of the seat duration statistics method provided by the embodiments of the present invention.

[0043] Figure 2 is a flowchart of the seat duration statistics method provided by another embodiment of the present invention.

[0044] Figure 3 is a flowchart of the seat duration statistics method provided by another embodiment of the present invention.

[0045] Figure 4 is a flowchart of the seat duration statistics method provided by another embodiment of the present invention.

[0046] Figure 5 is a flowchart of the seat duration statistics method provided by another embodiment of the present invention.

[0047] Figure 6 is a schematic diagram of the seat duration statistics system provided by the embodiments of the present invention.

[0048] Figure 7 is a schematic diagram of the seat duration statistics device provided by the embodiments of the present invention.

[0049] Figure 8 is a schematic diagram of the hardware structure of the electronic device provided by the embodiments of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0050] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0051] It should be noted that although functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different module division from that in the device or a different order from that in the flowchart.

[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs. The terms used herein are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.

[0053] First, several nouns involved in the present invention are analyzed:

[0054] Spark: It is a fast and general computing engine designed for large-scale data processing. When processing data, the data is cached in memory all the time until the final result is calculated, and then the result is written to disk.

[0055] Flink: It is an open-source stream processing framework that executes any stream data program in a data parallel and pipelined manner. The pipeline runtime system can execute batch processing and stream processing programs.

[0056] Flume: It is a distributed log collection system that can collect data resources such as logs and events, and is a tool / service for centralizing and storing these huge amounts of data from various data resources. Flume is a highly available distributed configuration tool, and its principle is based on collecting data streams, such as log data, from various web servers and storing them in a central memory.

[0057] Kafka: It is a distributed, publish / subscribe-based messaging system. It has the following characteristics: 1) It provides message persistence with a time complexity of O(1), and can ensure constant-time complexity access performance even for data above TB level; 2) It has a high throughput rate, and can achieve more than 100K messages per second transmission on a single machine even on very inexpensive commercial machines; 3) It supports message partitioning and distributed consumption, and ensures the sequential transmission of messages within each Partition; 4) It supports both offline data processing and real-time data processing.

[0058] Hdfs: That is, the Hadoop Distributed File System, which is a highly fault-tolerant system and can provide high-throughput data access, and is very suitable for applications on large-scale data sets.

[0059] Hive: It is a data warehouse tool based on Hadoop that can map structured data files into a database table and provide SQL-like query functions.

[0060] ClickHouse: An open-source columnar database mainly used in the field of data analysis (OLAP). Different from transaction processing (OLTP) scenarios, such as adding items to the shopping cart, placing orders, and making payments in an e-commerce scenario, in a data analysis (OLAP) scenario, usually after batch importing data, one needs to try to mine and analyze the data from various perspectives until information such as commercial value and business change trends are discovered. This is a process that requires repeated trial and error, continuous adjustment, and continuous optimization, in which the number of data reads is much more than the number of writes. Therefore, starting from the requirements of the OLAP scenario, ClickHouse develops an efficient columnar storage engine. Different from the row-based storage method in related technologies where the data of each row is continuously stored, the columnar storage method stores the data of each column continuously. The ClickHouse database has the following advantages: 1) In the row-based storage mode, data is continuously stored by row, and the data of all columns is stored in one block. Columns that do not participate in the calculation also need to be fully read during IO, and the read operation is severely amplified. In the columnar storage mode, only the columns participating in the calculation need to be read, greatly reducing the IO consumption and accelerating the query efficiency; 2) Since the data in the same column belongs to the same type, the compression effect is significant, with a high compression ratio, saving storage space and reducing storage costs; 3) It takes less time to read the corresponding data from the disk; 4) Since the data of different columns has different data types, the most suitable compression algorithm can be selected for different column types.

[0061] In the agent subsystem, the agent working duration is an important indicator to measure the efficiency of the agent's work. The agent subsystem generally consists of an agent computer, agent software, agent headsets, and agent service personnel. In related technologies, most agent working duration statistics adopt big data solutions to count the agent working duration. For example, spark or flink is used for processing, and the processing system components generally consist of 5 - 6 components such as flume + kafka + flink / spark + hdfs + hive. The duration statistics system structured in this way is cumbersome, the processing process is relatively complex, and the use and maintenance difficulties are very high. Moreover, most of the log data is stored in hdfs or elasticsearch. This storage method occupies a large amount of space, and when there is a problem with the duration of a certain agent, it is not convenient to locate the problem. Therefore, how to solve the agent working duration statistics with lower cost, higher efficiency, and accuracy has become a problem that needs to be solved.

[0062] Based on this, the embodiments of the present invention provide a seat duration statistical method, system, device, electronic device, and storage medium. The seat duration statistical method obtains the seat system access logs collected by the collector, then parses the seat access logs to obtain seat statistical information, and then sends the seat statistical information to the ClickHouse statistical module, so as to obtain a preset statistical list according to the seat statistical information according to the preset filling rules. Finally, the seat duration is statistically calculated using the preset statistical list to obtain the seat duration of each seat subsystem. Compared with the big data solution of Flume+Kafka+Flink+Hdfs+Hive in the related art, it reduces the storage cost, simplifies the processing process, reduces the components used, improves the robustness of the system, and when there is a problem with the duration result, it can be quickly located through the preset statistical list, increasing the maintainability of the system. At the same time, it improves the statistical efficiency of the seat duration, enhances the user experience, and expands the value and significance of the data.

[0063] The embodiments of the present invention provide a seat duration statistical method, system, device, electronic device, and storage medium, which are specifically described through the following embodiments. First, the seat duration statistical method in the embodiments of the present invention is described.

[0064] The embodiments of the present invention can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results.

[0065] The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, robotics, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0066] The seat duration statistics method provided by the embodiments of the present invention relates to the field of artificial intelligence technology, and particularly to the field of data mining technology. The seat duration statistics method provided by the embodiments of the present invention can be applied to a terminal, or to a server side, or can be software running on a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, or a smart watch, etc.; the server can be an independent server, or can be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms, etc.; it should be understood that the numbers of terminal devices, networks, and servers are merely illustrative. According to the implementation requirements, there can be any number of terminal devices, networks, and servers. For example, the server can be a server cluster composed of multiple servers, etc. The software can be an application for implementing the seat duration statistics method, etc., but is not limited to the above forms.

[0067] The present invention can be used in many general-purpose or special-purpose computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet-type devices, multi-processor 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 so on. The present invention can 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 can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0068] In an embodiment of the present invention, the user can collect seat system access logs from a server collector by using a terminal device. The server parses the seat access logs to obtain seat statistics information, and then sends the seat statistics information to the ClickHouse statistics module, so that a preset statistical list is obtained according to the seat statistics information according to a preset filling rule. Finally, the seat duration is statistically calculated by using the preset statistical list to obtain the seat duration of each seat subsystem.

[0069] It should be noted that the seat duration statistics method provided by the embodiments of the present invention is generally executed by a server. Correspondingly, the seat duration statistics device is generally set in the server. However, in other embodiments of the present invention, the terminal device may also have a similar function to the server, so as to execute the seat duration statistics method provided by the embodiments of the present invention.

[0070] The system architecture and application scenarios described in the embodiments of the present application are for more clearly explaining the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art know that with the evolution of the system architecture and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems. Those skilled in the art can understand that the system architecture shown above does not constitute a limitation on the embodiments of the present application, and may include more or fewer components, or combine some components, or different component arrangements.

[0071] Figure 1 is an optional flowchart of the seat duration statistics method provided by the embodiments of the present invention, Figure 1 The method in may include but is not limited to steps S110 to S140.

[0072] Step S110, obtaining the seat system access log collected by the collector.

[0073] In one embodiment, the seat subsystem is composed of a seat computer and seat software. Among them, the seat computers are distributed according to the preset seat area information, and the seat software is installed on the seat computers to complete the functions of different seats, such as outbound seats or customer service seats, etc. The seat headset can also be configured in the seat subsystem according to needs, which is convenient for the seat service personnel to perform rest services.

[0074] Since the seat computer is a network device, service logs will be generated during use, and the desired information can be obtained through the service logs. Therefore, in this embodiment, a log collector is installed in the seat subsystem to collect the service logs of the seat computer in real time or within a preset collection period. The service log is the seat system access log of the seat subsystem corresponding to the seat computer.

[0075] In one embodiment, the log collector is a Filebeat collector. The Filebeat collector is a lightweight log collector for forwarding and centralizing log data. Filebeat can monitor specified log files or locations in real time or within a preset collection period according to the configured monitoring information, collect log events, and forward the log events to the specified storage location for indexing.

[0076] The working mode of the Filebeat log collector in this embodiment is as follows:

[0077] Start the Filebeat log collector and start one or more input messages simultaneously. These input messages will search in the specified locations of the log data. When log events (i.e., log files are read) are obtained, start the collector. Each collector reads a single log file to obtain new log data, aggregates the new log data, and uses the aggregated data as the output of the Filebeat log collector. Since the Filebeat log collector is installed in the operator computer of the operator subsystem, the output of the Filebeat log collector is the operator system access log in this embodiment.

[0078] Therefore, in one embodiment, before obtaining the operator system access log collected by the collector, it further includes: obtaining collection parameters. The collection parameters can be: specifying the operator system access log to be collected or the location of the operator system access log for execution of collection, and then configuring the collector according to the collection parameters so that the collector can collect the operator system access log. Additionally, the collection parameters can also include: collection frequency, such as real-time collection or collection according to a preset collection period, etc.

[0079] In one embodiment, the collected operator system access log is a weblogic log file with the suffix ".acc". For example, by configuring the collection parameters of the collector, a configuration information for real-time collection of ".acc" log files can be added.

[0080] Step S120, parse the operator access log to obtain operator statistical information.

[0081] In one embodiment, after the operator access log is collected by the collector, the operator statistical information is obtained by parsing the operator access log.

[0082] In one embodiment, referring to Figure 2 , step S120 includes but is not limited to steps S121 to S122:

[0083] Step S121, use a regular parsing rule to parse the operator system access log to obtain at least one preset format field.

[0084] In one embodiment, use the filter of the Grok parsing tool to process the obtained operator system access log (i.e., the ".acc" format log file). The filter can use the pre-configured Grok regular parsing rule to cut the operator system access log into multiple fields in a preset format, that is, preset format fields. Specifically: first determine the splitting principle, that is, split the operator system access log into several preset format fields, and then analyze each field, and use the pre-configured Grok regular parsing rule to parse to obtain the corresponding field content.

[0085] In one embodiment, the regular parsing rule is a regular expression. The pre-configured Grok regular parsing rules include two types: one is to directly apply the existing regular rules in the Grok library, and the other is to customize according to actual requirements.

[0086] The following introduces an example of using the Grok parsing tool to parse a log file.

[0087] Suppose there are two log messages:

[0088] (1)2017-03-07 00:03:44,373 4191949560

[0089] [CASFilter.java:330:DEBUG]entering doFilter()

[0090] (2)2017-03-16 00:00:01,641 133383049

[0091] [UploadFileModel.java:234:INFO]

[0092] The set splitting principle is as follows:

[0093] 2017-03-16 00:00:01,641: Time

[0094] 133383049: Number

[0095] UploadFileModel.java: Java class name

[0096] 234: Line number of the code

[0097] INFO: Log level

[0098] entering doFilter(): Log content

[0099] The above splitting principle splits the log message into 6 fields with preset formats. Among them, the first five fields can use the existing regular rules in Grok, which are: TIMESTAMP_ISO8601, NUMBER, JAVAFILE, NUMBER, and LOGLEVEL. For the last field, a custom regular rule can be used. For the content after the "]" of the log level, whether it is in Chinese or English, this content will be treated as the log message. Therefore, the rule for using the custom regular expression is as follows:

[0100] (?<field_name>the pattern here)

[0101] Therefore, the complete regular parsing rules corresponding to the above two log messages are as follows, where \s* is used to remove whitespace.

[0102] \s*%{TIMESTAMP_ISO8601:time}\s*%{NUMBER:num}

[0103] \[\s*%{JAVAFILE:class}\s*\:\s*%{NUMBER:lineNumber}\s*\:%{LOGLEVEL:lev el}\s*\]\s*(? <info>([\s\S]*))

[0104] In one embodiment, the preset format fields include one or more of the following: seat employee number, access interface, access time, or request IP. Among them, the seat employee number is the number of the seat service personnel of the seat subsystem; the access interface is the interface information for accessing the seat computer in the seat subsystem, and the seat subsystem can be located through this interface information; the access time can represent the working time of the seat subsystem; the request IP represents the IP address for which the seat subsystem provides services. In this embodiment, the access log of the seat system is parsed according to the regular parsing rule generated by the above example to obtain at least one preset format field.

[0105] Step S122: Combine the preset format fields to obtain seat statistics information.

[0106] In one embodiment, the obtained preset format fields are combined and arranged to obtain seat statistics information, that is, the content of the preset format fields is included in the seat statistics information.

[0107] Step S130: Send the seat statistics information to the ClickHouse statistics module, so that the ClickHouse statistics module obtains a preset statistics list according to the preset filling rule based on the seat statistics information.

[0108] In one embodiment, in the related art in the field of data analysis, after data is usually imported in batches, it is necessary to try to mine and analyze the data from various angles. This is a process that requires repeated trial and error, continuous adjustment, and continuous optimization, in which the number of data reads is much more than the number of writes. In the related art, the row storage mode is mostly used, and the data is continuously stored row by row. The data of all columns is stored in one block, and the columns that do not participate in the calculation also need to be read out completely during IO, and the read operation is severely amplified. Therefore, in this embodiment, the ClickHouse database is used for data analysis. Different from the row storage method that continuously stores each row of data, the ClickHouse database uses the column storage method to continuously store each column of data. In the column storage mode, only the columns participating in the calculation need to be read, which greatly reduces the IO consumption and accelerates the query efficiency. And since the data in the same column belongs to the same type, the compression effect is significant, with a high compression ratio, saving storage space, reducing storage costs, and at the same time taking less time to read the corresponding data from the disk. Further, since the data of different columns has different data types, the most suitable compression algorithm can be selected for different column types.

[0109] In one embodiment, referring to Figure 3 , step S130 includes but is not limited to steps S131 to S133:

[0110] Step S131: Obtain the interface information of the ClickHouse statistics module.

[0111] In one embodiment, after obtaining the agent statistics information, the ClickHouse statistics module and the ClickHouse database need to store the agent statistics information column by column in the ClickHouse database for statistical analysis. Therefore, it is necessary to obtain the interface information of the ClickHouse database.

[0112] In one embodiment, the interface information includes: receiving address, receiving port, preset table name, preset table template, account, and password. Among them, the receiving address can be the network address of the ClickHouse database, and the agent statistics information is sent to the ClickHouse database according to this receiving address; the receiving port can be the idle port allocated by the ClickHouse database according to the usage status; the preset table name can be generated by the ClickHouse database according to the preset name format and can be set according to actual needs; the preset table template can be generated by the ClickHouse database according to the preset template format and can be set according to actual needs; the account and password can be used to log in to the ClickHouse database.

[0113] Step S132: Generate a preset table according to the preset table name and the preset table template.

[0114] In one embodiment, in order to send the agent statistics information to the ClickHouse statistics module, it is necessary to add a relevant configuration file in the collector. For example, add a sending configuration to specify the receiving address and receiving port information of the ClickHouse statistics module to send the agent statistics information to the ClickHouse statistics module. In this embodiment, after obtaining the interface information of the ClickHouse database, the collector generates a preset table according to the preset table name and the preset table template. This preset table is a columnar storage table and is a table with a blank template.

[0115] Step S133: Send the agent statistics information to the ClickHouse statistics module according to the receiving address and the receiving port to obtain a preset statistics list.

[0116] In one embodiment, the ClickHouse statistics module fills a preset table according to a preset filling rule and preset format fields to obtain a preset statistics list. In this embodiment, according to the receiving address and receiving port information in the above interface information, the agent statistics information (including preset format fields) is sent to the ClickHouse statistics module. The ClickHouse statistics module fills the preset table according to the preset format fields included in the received agent statistics information, that is, fills the preset format fields into the corresponding column positions of the preset table according to the template filling requirements. The template defines which fields are in the table and what types of data should be filled. The filling requirements of the template are the preset filling rules in this embodiment.

[0117] Step S140, use the preset statistics list to perform agent duration statistics to obtain the agent duration of each agent subsystem.

[0118] In one embodiment, referring to Figure 4 , step S140 includes but is not limited to steps S141 to S143:

[0119] Step S141, obtain the statistical duration.

[0120] In one embodiment, select the statistical duration according to actual needs, such as one day or half a day. That is, within this statistical duration, obtain the agent duration of each agent subsystem.

[0121] Step S142, access the access interface of the ClickHouse statistics module to obtain the preset statistics list within the statistical duration.

[0122] In one embodiment, according to the access interface of the ClickHouse statistics module, access the data of the ClickHouse statistics module to obtain the preset statistics list during the statistical duration.

[0123] Step S143, calculate the agent duration of each agent subsystem according to the preset statistics list.

[0124] In one embodiment, according to the preset statistics list during the statistical duration, accumulate and calculate to obtain the agent duration of each agent subsystem. The agent duration can be expressed in minutes.

[0125] In one embodiment, it is also possible to create an agent duration table for each agent subsystem in the web access interface of the ClickHouse statistics module, update the agent duration table according to a preset frequency, and then obtain the agent duration of each agent subsystem during the statistical duration by accessing the agent duration table.

[0126] In one embodiment, referring to Figure 5 , it further includes steps S144 to S146:

[0127] Step S144: Generate a seat duration statistical table according to the seat duration of each seat subsystem and the seat area information.

[0128] In one embodiment, since the seat subsystem is generally located in a fixed seat area, the seat area information can be set according to the actual situation. A seat duration statistical table can be generated according to the seat duration of each seat subsystem and the seat area information. The seat duration statistical table may include the association relationships between information such as the seat subsystem number, the seat service personnel number, the department to which the seat service personnel belongs, and the seat area number. The seat duration of the seat subsystem in different seat areas can be directly obtained through this seat duration statistical table.

[0129] Step S145: Obtain the retrieval keywords of the target seat subsystem.

[0130] In one embodiment, in order to locate a certain seat subsystem, the seat subsystem number, the seat service personnel number, or the seat area number, etc. can be used as retrieval keywords to retrieve in the seat duration statistical table to locate the target seat subsystem.

[0131] Step S146: Use the retrieval keywords to search the seat duration statistical table to obtain the seat duration of the target seat subsystem.

[0132] In one embodiment, search the seat duration statistical table according to the above retrieval keywords, locate the target seat subsystem, and obtain the seat duration of the target seat subsystem.

[0133] In one embodiment, information such as the access record of the target seat subsystem, the average duration of different seat areas, or the average duration of different seat service departments can also be retrieved according to the retrieval keywords.

[0134] The seat duration statistical method provided by the embodiment of the present invention obtains the seat system access log collected by the collector, then parses the seat access log to obtain the seat statistical information, and then sends the seat statistical information to the ClickHouse statistical module, so that a preset statistical list is obtained according to the seat statistical information according to the preset filling rule. Finally, the seat duration is statistically calculated using the preset statistical list to obtain the seat duration of each seat subsystem. Compared with the big data solution of flume + kafka + flink + hdfs + hive in the related technology, this embodiment reduces the storage cost, simplifies the processing flow, reduces the components used, improves the robustness of the system, and when there is a problem with the duration result, it can be quickly located through the preset statistical list, increasing the maintainability of the system. At the same time, it improves the statistical efficiency of the seat duration, enhances the user experience, and expands the value and significance of the data.

[0135] In addition, an embodiment of the present invention further provides a seat duration statistics system. Referring to Figure 6 , which is a schematic diagram of the seat duration statistics system in this embodiment. The seat duration statistics system 100 includes: at least one seat subsystem 110, a collector 120 corresponding to the seat subsystem, and a ClickHouse statistics module 130. Among them, the collector 120 can be installed on the seat computer corresponding to the seat subsystem 110, and the collector 120 is communicatively connected to the ClickHouse statistics module 130. The seat duration statistics system calculates the seat duration of the seat subsystem by using the seat duration statistics method described in any one of the above.

[0136] In one embodiment, the collector 120 collects the seat system access log of the seat subsystem 110, then the collector 120 parses the seat access log to obtain seat statistics information, and the collector 120 sends the seat statistics information to the ClickHouse statistics module 130. The ClickHouse statistics module 130 obtains a preset statistics list according to the seat statistics information according to a preset filling rule, and finally uses the preset statistics list to perform seat duration statistics to obtain the seat duration of each seat subsystem 110.

[0137] In one embodiment, before the collector 120 collects the seat system access log, it is also necessary to configure collection parameters so that the collector 120 can collect the seat system access log.

[0138] In one embodiment, the process of the collector 120 parsing the seat access log to obtain seat statistics information includes: using a regular parsing rule to parse the seat system access log to obtain at least one preset format field, and combining the preset format fields to obtain seat statistics information. Among them, the preset format fields include: one or more of seat employee number, access interface, access time, or request IP.

[0139] In one embodiment, the process of the collector 120 sending the seat statistics information to the ClickHouse statistics module 130 so that the ClickHouse statistics module 130 obtains a preset statistics list according to the seat statistics information according to a preset filling rule includes:

[0140] First, the collector 120 obtains the interface information of the ClickHouse statistics module 130. Among them, the interface information includes: receiving address, receiving port, preset table name, and preset table template; then the collector 120 generates a preset table according to the preset table name and preset table template and sends the seat statistics information to the ClickHouse statistics module 130 according to the receiving address and receiving port. The ClickHouse statistics module 130 fills the preset table according to the preset filling rule and preset format fields to obtain a preset statistics list.

[0141] In addition, an embodiment of the present invention further provides a seat duration statistics device, which can implement the above-mentioned seat duration statistics method with reference to Figure 7 and includes:

[0142] A log collection module 710, configured to obtain seat system access logs collected by a collector;

[0143] A log parsing module 720, configured to parse seat access logs to obtain seat statistics information;

[0144] A list filling module 730, configured to send seat statistics information to a ClickHouse statistics module, so as to obtain a preset statistics list according to the seat statistics information according to a preset filling rule;

[0145] A duration statistics module 740, configured to perform seat duration statistics using the preset statistics list to obtain the seat duration of each seat subsystem.

[0146] In one embodiment, the log collection module 710 is further configured to configure the collection parameters of the collector before collecting seat system access logs, so that the log collection module 710 can collect seat system access logs.

[0147] In one embodiment, the log parsing module 720 is further configured to parse seat access logs to obtain seat statistics information, including: parsing seat system access logs using a regular parsing rule to obtain at least one preset format field, and combining the preset format fields to obtain seat statistics information, where the preset format fields include: one or more of seat employee numbers, access interfaces, access times, or request IPs.

[0148] In one embodiment, the list filling module 730 is further configured to send seat statistics information to a ClickHouse statistics module, so that the ClickHouse statistics module obtains a preset statistics list according to the seat statistics information according to a preset filling rule, including: obtaining interface information of the ClickHouse statistics module, where the interface information includes: a receiving address, a receiving port, a preset table name, and a preset table template; generating a preset table according to the preset table name and the preset table template; sending seat statistics information to the ClickHouse statistics module according to the receiving address and the receiving port, so that the ClickHouse statistics module can fill the preset table according to the preset filling rule and the preset format fields to obtain a preset statistics list.

[0149] In one embodiment, the duration statistics module 740 is further configured to obtain a statistics duration, access an access interface of the ClickHouse statistics module to obtain a preset statistics list within the statistics duration, and calculate the seat duration of each seat subsystem according to the preset statistics list.

[0150] In one embodiment, the call duration statistics module 740 is further configured to generate a call duration statistics table based on the call duration of each agent subsystem and the agent area information, obtain the search keywords of the target agent subsystem, and use the search keywords to search the call duration statistics table to obtain the call duration of the target agent subsystem.

[0151] The specific implementation manner of the call duration statistics device in this embodiment is basically the same as that of the above call duration statistics method, and will not be elaborated here.

[0152] An embodiment of the present invention further provides an electronic device, including:

[0153] At least one memory;

[0154] At least one processor;

[0155] At least one program;

[0156] The program is stored in the memory, and the processor executes the at least one program to implement the call duration statistics method described above in the embodiments of the present invention. The electronic device may be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA for short), a vehicle-mounted computer, etc.

[0157] Please refer to Figure 8 , Figure 8 which illustrates the hardware structure of an electronic device in another embodiment. The electronic device includes:

[0158] A processor 801, which can be implemented by using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention;

[0159] A memory 802, which can be implemented in the form of a ROM (Read Only Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory), etc. The memory 802 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 802 and are called by the processor 801 to execute the call duration statistics method in the embodiments of the present invention;

[0160] An input / output interface 803, which is used to implement information input and output;

[0161] A communication interface 804 for implementing communication interaction between this device and other devices, which can achieve communication through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.); and

[0162] A bus 805 for transmitting information between various components of the device (such as a processor 801, a memory 802, an input / output interface 803, and a communication interface 804);

[0163] Among them, the processor 801, the memory 802, the input / output interface 803, and the communication interface 804 are communicatively connected to each other inside the device through the bus 805.

[0164] An embodiment of the present invention also provides a storage medium, which is a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the above-mentioned seat duration statistics method.

[0165] The seat duration statistics method, seat duration statistics device, electronic device, and storage medium proposed in the embodiments of the present invention. Among them, the seat duration statistics method obtains the seat system access log collected by the collector, then parses the seat access log to obtain seat statistics information, and then sends the seat statistics information to the ClickHouse statistics module so that a preset statistics list is obtained according to the seat statistics information according to the preset filling rule. Finally, the seat duration is statistically calculated using the preset statistics list to obtain the seat duration of each seat subsystem. Compared with the big data solution of flume + kafka + flink + hdfs + hive in the related art, this embodiment reduces the storage cost, simplifies the processing flow, reduces the components used, improves the robustness of the system, and when there is a problem with the duration result, it can be quickly located through the preset statistics list, increasing the maintainability of the system. At the same time, it improves the statistical efficiency of the seat duration, enhances the user experience, and expands the value and significance of the data.

[0166] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include high-speed random access memory and can also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory can optionally include a memory remotely provided relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0167] The embodiments described in the embodiments of the present invention are for more clearly illustrating the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Those skilled in the art will know that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are equally applicable to similar technical problems.

[0168] Those skilled in the art can understand that Figures 1-5 the technical solutions shown in do not constitute a limitation on the embodiments of the present invention, and may include more or fewer steps than shown in the figures, or combine certain steps, or different steps.

[0169] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0170] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, and their appropriate combinations.

[0171] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0172] It should be understood that, in the present invention, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist simultaneously. Here, A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one (one)" or its similar expression below refers to any combination of these items, including any combination of single item (one) or plural items (ones). For example, at least one (one) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0173] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there can be other division methods. For example, 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 displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of devices or units can be in electrical, mechanical, or other forms.

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

[0175] In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0176] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or 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 and includes a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media that can store programs, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs.

[0177] The preferred embodiments of the embodiments of the present invention have been described above with reference to the accompanying drawings. However, this does not limit the scope of the rights of the embodiments of the present invention. Any modifications, equivalent replacements, and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present invention shall fall within the scope of the rights of the embodiments of the present invention.< / info>

Claims

1. A method for counting seat duration, characterized in that, Including: Collecting the seat system access logs of the seat subsystem by using a collector, where the collector is a Filebeat log collector installed on the seat subsystem; Parsing the seat system access logs by using the pre-configured regular parsing rules in the Grok parsing tool to obtain at least one preset format field, and combining the preset format fields to obtain seat statistical information. The preset format fields include one or more of seat employee number, access interface, access time, or request IP. The regular parsing rules include custom parsing rules and preset regular parsing rules; Obtaining the interface information of the ClickHouse statistical module. The collector includes a configuration file, and the configuration file includes a sending configuration. The sending configuration includes the interface information, and the interface information includes: receiving address, receiving port, preset table name, and preset table template; generating a preset table by using the collector according to the preset table name and the preset table template; sending the seat statistical information and the preset table to the ClickHouse statistical module according to the receiving address and the receiving port by using the collector, so that the ClickHouse statistical module can fill the preset table according to the preset filling rules and the preset format fields to obtain a preset statistical list. The preset table is a columnar storage table; Performing seat duration statistics by using the preset statistical list to obtain the seat duration of each seat subsystem; Generating a seat duration statistical table according to the seat duration of each seat subsystem and the seat area information, obtaining the retrieval keyword of the target seat subsystem, and searching the seat duration statistical table by using the retrieval keyword to obtain the seat duration of the target seat subsystem.

2. The seat duration statistics method according to claim 1, wherein The performing seat duration statistics by using the preset statistical list to obtain the seat duration of each seat subsystem includes: Obtaining the statistical duration; Accessing the access interface of the ClickHouse statistical module to obtain the preset statistical list within the statistical duration; Calculating the seat duration of each seat subsystem according to the preset statistical list.

3. The seat duration statistical method according to claim 2, characterized in that, Before collecting the seat system access logs, it further includes: Obtaining collection parameters, where the collection parameters include the specified seat system access logs to be collected or the location of the seat system access logs for execution of collection; Configuring the collector according to the collection parameters so that the collector can collect the seat system access logs.

4. A seat duration statistics system, characterized in that, Including: At least one seat subsystem, a collector corresponding to the seat subsystem, and a ClickHouse statistical module. The seat duration statistical system calculates the seat duration of the seat subsystem by using the seat duration statistical method according to any one of claims 1 to 3.

5. A seat duration statistics device, characterized in that, Including: A log collection module for collecting the seat system access logs of the seat subsystem by using a collector, where the collector is a Filebeat log collector installed on the seat subsystem; A log parsing module, which is used to parse the access log of the agent system by using the pre-configured regular parsing rules in the Grok parsing tool to obtain at least one preset format field, and combine the preset format fields to obtain agent statistical information. The preset format fields include one or more of the following: agent employee number, access interface, access time, or request IP. The regular parsing rules include custom parsing rules and preset regular parsing rules; A list filling module, which is used to obtain the interface information of the ClickHouse statistical module. The collector includes a configuration file, and the configuration file includes a sending configuration. The sending configuration includes the interface information. The interface information includes: receiving address, receiving port, preset table name, and preset table template; generating a preset table by the collector according to the preset table name and the preset table template; sending the agent statistical information and the preset table to the ClickHouse statistical module according to the receiving address and the receiving port by the collector, so that the ClickHouse statistical module can fill the preset table according to the preset filling rules and the preset format fields to obtain a preset statistical list. The preset table is a columnar storage table; A duration statistics module, which is used to perform agent duration statistics by using the preset statistical list to obtain the agent duration of each agent subsystem; generating an agent duration statistics table according to the agent duration of each agent subsystem and the agent area information, obtaining the retrieval keyword of the target agent subsystem, and using the retrieval keyword to search the agent duration statistics table to obtain the agent duration of the target agent subsystem.

6. An electronic device, characterized in that, Comprising: At least one memory; At least one processor; At least one program; The program is stored in the memory, and the processor executes the at least one program to implement: The agent duration statistics method according to any one of claims 1 to 3.

7. A storage medium, the storage medium being a computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to cause a computer to execute: The agent duration statistics method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Log processing method, device, storage medium, and server

    CN109062774A

  • Log query method and device, storage medium and electronic equipment

    CN112100138A

  • Seat association method, system and equipment based on authentication log and storage medium

    CN112751976A