WO2020098347A1 - 信息生成方法、装置和系统 - Google Patents

信息生成方法、装置和系统 Download PDF

Info

Publication number
WO2020098347A1
WO2020098347A1 PCT/CN2019/104311 CN2019104311W WO2020098347A1 WO 2020098347 A1 WO2020098347 A1 WO 2020098347A1 CN 2019104311 W CN2019104311 W CN 2019104311W WO 2020098347 A1 WO2020098347 A1 WO 2020098347A1
Authority
WO
WIPO (PCT)
Prior art keywords
slow query
data
query data
slow
acquired
Prior art date
Application number
PCT/CN2019/104311
Other languages
English (en)
French (fr)
Inventor
刘子凡
高新刚
孙文晖
赵越
刘启荣
Original Assignee
京东数字科技控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 京东数字科技控股有限公司 filed Critical 京东数字科技控股有限公司
Publication of WO2020098347A1 publication Critical patent/WO2020098347A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation

Definitions

  • Embodiments of the present application relate to the field of computer technology, and in particular, to information generation methods and devices.
  • the embodiments of the present application provide information generation methods, devices and systems.
  • an embodiment of the present application provides an information generation method, including: periodically acquiring slow query data from a slow query data queue; performing data processing on the acquired slow query data; and processing the processed data according to Set categories to perform clustering, and generate slow query information corresponding to preset categories based on the clustering results.
  • an embodiment of the present application provides an information generating apparatus, the apparatus includes: an acquiring unit configured to periodically acquire slow query data from a slow query data queue; a processing unit configured to Slow query data for data processing; the generating unit is configured to cluster the processed data according to a preset category, and based on the clustering result, generate slow query information corresponding to the preset category.
  • an embodiment of the present application provides an information generation system.
  • the information generation system includes a data processor and a memory.
  • the data processor is in communication with the memory; wherein, the memory is configured to store a slow query data queue; the data processor is Configure to obtain slow query data from the slow query data queue; perform data processing on the acquired slow query data; aggregate the processed data according to preset categories, and generate slow query information corresponding to the preset categories based on the aggregation result .
  • an embodiment of the present application provides an electronic device, including: one or more processors; a storage device, on which one or more programs are stored, when one or more programs are processed by one or more processors The execution causes one or more processors to implement the method as in any embodiment of the first aspect described above.
  • an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, a method as in any embodiment of the first aspect described above is implemented.
  • the information generation method, device, and system provided in the embodiments of the present application may first acquire slow query data, then process the received slow query data, and finally cluster the processed data according to preset categories to generate different categories Corresponding to the slow query information, so that users can quickly locate the server with too much slow query data and the time generated, which is beneficial to the effective maintenance of equipment with too much slow query data.
  • FIG. 1 is an exemplary system architecture diagram to which an embodiment of the present application can be applied;
  • FIG. 2 is a flowchart of an embodiment of an information generation method according to the present application.
  • 3 to 5 are schematic diagrams of slow query information shown in an application scenario according to the information generation method of the present application.
  • FIG. 6 is a schematic structural diagram of an embodiment of an information generation device according to the present application.
  • FIG. 7 is a sequence diagram of an embodiment of the information generation system according to the present application.
  • FIG. 8 is a schematic structural diagram of a computer system suitable for implementing the server of the embodiment of the present application.
  • FIG. 1 shows an exemplary system architecture 100 to which an embodiment of the information generation method or information generation apparatus of the present application can be applied.
  • the system architecture 100 may include first servers 101, 102, 103, a network 104, and a second server 105.
  • the network 104 is used as a medium for providing communication links between the first servers 101, 102, 103 and the second server 105.
  • the network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, and so on.
  • the first server 101, 102, 103 may be a first server for supporting applications installed in the terminal.
  • a server that supports applications such as map applications, search applications, and shopping applications.
  • the first server 101, 102, 103 may generate slow query data according to its own carrying capacity. Slow query data refers to data that exceeds the specified time.
  • the first servers 101, 102, and 103 may be hardware or software.
  • the first server When the first server is hardware, it can be implemented as a distributed server cluster composed of multiple servers or as a single server.
  • the first server When the first server is software, it may be implemented as multiple software or software modules (for example, to provide distributed services), or as a single software or software module. There is no specific limit here.
  • the second server 105 may be a data processing server for performing data processing.
  • the second server 105 can process the acquired slow query data generated by the first servers 101, 102, and 103, and then aggregate the processed data according to preset categories to finally generate slow query information.
  • the second server may be hardware or software.
  • the second server can be implemented as a distributed server cluster composed of multiple servers or as a single server.
  • the second server is software, it may be implemented as multiple software or software modules (for example, to provide distributed services), or as a single software or software module. There is no specific limit here.
  • the information generation method provided in the embodiment of the present application is generally executed by the second server 105, and accordingly, the information generation device is generally provided in the second server 105.
  • the numbers of the first server, the network, and the second server in FIG. 1 are only schematic. According to the implementation needs, there can be any number of terminal devices, networks and servers.
  • the information generation method includes the following steps:
  • Step 201 Periodically obtain slow query data from the slow query data queue.
  • the execution subject of the information generation method may periodically acquire slow query data.
  • a database for example, MYSQL database
  • a server for example, the first server shown in FIG. 1
  • Slow query data is the data whose response recorded in the database log exceeds a preset threshold.
  • the period may be a preset period or a period set by default, for example, the period is set to 10 minutes.
  • a memory such as a buffer
  • the above slow query queue is stored in the buffer.
  • the server for generating slow query data may store the slow query data in the slow query queue. Then, the execution body can obtain the slow query data from the slow query queue.
  • the above slow query data queue may be stored in a storage system separate from the above execution subject.
  • the above-mentioned execution subject may be communicatively connected with the storage system.
  • the storage system may be a distributed publish and subscribe messaging system, such as the Kafka system.
  • the system may include multiple topics, one of which is a topic for storing slow query data, and the topic for storing slow query data may be called a slow query data queue. Therefore, the above-mentioned execution subject can obtain the slow query data from the slow query data queue based on the slow query subject.
  • the slow query data in the slow query queue is periodically sent by the server that generates the slow query data to the slow query message queue.
  • a server that generates slow query data may send the slow query data to a buffer for storing a slow query message queue, or may send the generated slow query data to the above-mentioned storage system based on topic posting.
  • the server that generates the slow query data can process the recorded slow query data.
  • the slow query data can be processed into a format that the above-mentioned buffer or storage system can recognize and store.
  • the period in which the execution subject acquires the slow query data may be synchronized with the period of the server that generates the slow query data.
  • Step 202 Perform data processing on the received slow query data.
  • the above-mentioned execution body may process the slow query data, so that the slow query data is a fixed character.
  • the obtained slow query data may be hashed to obtain a hash value corresponding to each slow query data.
  • the acquired slow query data may be replaced by variables, so that fixed-length characters corresponding to the slow query data may be obtained. Creating variable substitution values corresponding to slow query data through variable substitution can make data processing and statistics easier.
  • the above-mentioned executive body may perform calculation on the obtained fixed-length characters using a message digest algorithm to obtain calculated data. Because when performing data clustering, there is no need to know the specific content of the slow query data. Therefore, by using digest encryption to calculate the data summary corresponding to the slow query data, the speed of data aggregation can be improved, and the aggregated data corresponding to each category can be made more accurate.
  • step 203 the processed data is clustered according to a preset category, and based on the data clustering result, slow query data corresponding to the preset category is generated.
  • the preset category may be, for example, a time category, an instance category, a business category, etc.
  • the time category may include minutes, hours, days, months, and so on. Cluster the processed data according to different categories, so that users can view slow query information in different dimensions, so that it can accurately determine the server whose slow query data volume exceeds the preset threshold, and then can query the slow query data Too many servers to optimize.
  • the above slow query data may include the time of the slow query data recorded in the log, and the server identifier corresponding to the slow query data.
  • the above server identifier may include the IP address and port number of the server.
  • the above-mentioned execution subject can generate slow query information corresponding to the preset category according to the final clustering result.
  • FIG. 3 to 5 are schematic diagrams of slow query information shown in an application scenario according to the information generation method of the present application.
  • FIG. 3 shows slow query information obtained by aggregating slow query data based on time. It shows the slow query data every minute in the time period of 14: 00-15: 00 on July 12, 2018. Among them, the horizontal axis represents time, and the vertical axis represents the amount of slow query data corresponding to each time. Taking 14:16 on July 12, 2018 as an example, it can be seen from the figure that the corresponding slow query data is 9499 items. That is to say, the slow query data generated during the time period of 14: 15-14: 16 is 9499. As can be seen from FIG. 3, through the data table shown in FIG. 3, the time at which the slow query data amount exceeds the preset threshold can be quickly queried.
  • FIG. 4 shows the slow query data obtained by aggregating the slow query data generated by each server at a certain moment.
  • the horizontal axis in FIG. 4 represents the data volume of the slow query data
  • the vertical axis represents the IP address and port number of each server. It can be intuitively obtained from FIG. 4 that at a certain moment, the server whose data volume of the slow query data exceeds a preset threshold.
  • FIG. 5 shows the time distribution of slow queries of a database corresponding to a server at a certain moment. As shown in Figure 5, among all the slow query data, slow query data with a slow query time of 0.5s-1s accounted for 33.33%, and slow query data with a slow query time of 1s-3s accounted for 66.67%.
  • the above-mentioned execution body may store the processed data and the generated slow query information corresponding to the preset category to the storage node.
  • the storage node may be a database provided in the execution body, or may be a database independent of the execution body.
  • the storage node may be an HBASE database.
  • the above-mentioned execution body may store each processed data in the HBASE database, or may store the slow query information corresponding to each category after clustering in the HBASE database. Thus, when data needs to be obtained, it can be quickly queried from the database.
  • the information generation method shown in the embodiment of the present application processes the acquired slow query data, then performs data clustering on the processed data according to a preset category, and finally generates slow query information based on the data clustering result, thereby enabling the user It can quickly locate the server with too much slow query data and the generated time, which is helpful for the effective maintenance of the equipment with too much slow query data.
  • the present application provides an embodiment of an information generation device.
  • the device embodiment corresponds to the method embodiment shown in FIG. 2. Used in various electronic devices.
  • the information generating device 600 of this embodiment includes: an obtaining unit 601, a processing unit 602 and a generating unit 603.
  • the obtaining unit 601 is configured to periodically obtain slow query data from the slow query data queue.
  • the processing unit 602 is configured to perform data processing on the received slow query data.
  • the generating unit 603 is configured to cluster the processed data according to a preset category, and generate slow query information corresponding to the preset category based on the clustering result.
  • step 201, step 202, and step 203 in the corresponding embodiment of FIG. 2 Relevant descriptions of the implementation manners will not be repeated here.
  • the slow query data in the slow query data queue is a server that generates slow query data periodically sends the slow query data generated within a preset time interval to the slow query data queue of.
  • the processing unit is further configured to: perform variable substitution on the acquired slow query data to obtain fixed-length characters corresponding to the slow query data; and use the message digest algorithm to obtain the fixed Long characters are calculated to get the calculated data.
  • the information processing apparatus further includes a storage unit configured to store the processed data and the generated slow query information corresponding to the preset category to the database.
  • the information generation device further includes a presentation unit configured to: receive a request to view slow query information, the request includes a category corresponding to the slow query information; based on the received request, Obtain the slow query information corresponding to the requested category from the database, and present the acquired slow query information.
  • a presentation unit configured to: receive a request to view slow query information, the request includes a category corresponding to the slow query information; based on the received request, Obtain the slow query information corresponding to the requested category from the database, and present the acquired slow query information.
  • FIG. 7 shows a structural schematic diagram of an embodiment of the information generation system provided by the present application.
  • the information generation system includes a data processor and a memory, and the processor is communicatively connected to the memory.
  • the slow query data queue is stored in the memory.
  • the data processor is specifically configured to: obtain slow query data from the memory; process the acquired slow query data; perform data aggregation on the processed data according to a preset category, and generate a correspondence corresponding to the preset category based on the data aggregation result Slow query information.
  • the data processor may periodically obtain slow query data from the slow query data queue stored in the memory.
  • the data processor may perform data processing on the received slow query data.
  • the above execution body can process the slow query data, so that the slow query data is a fixed character.
  • the obtained slow query data may be hashed to obtain a hash value corresponding to each slow query data.
  • the data processor is further configured to perform variable substitution on the acquired slow query data, so that fixed-length characters corresponding to the slow query data can be obtained. Creating variable substitution values corresponding to slow query data through variable substitution can make data processing and statistics easier.
  • the above-mentioned executive body may perform calculation on the obtained fixed-length characters using a message digest algorithm to obtain calculated data. Because when performing data clustering, there is no need to know the specific content of the slow query data. Therefore, by using digest encryption to calculate the data summary corresponding to the slow query data, the speed of data aggregation can be improved, and the aggregated data corresponding to each category can be made more accurate.
  • the data processor may cluster the processed data according to a preset category, and based on the data clustering result, generate slow query data corresponding to the preset category.
  • the preset category may be, for example, a time category, an instance category, a business category, etc.
  • the time category may include minutes, hours, days, months, and so on. Cluster the processed data according to different categories, so that users can view slow query information in different dimensions, so that it can accurately determine the server whose slow query data volume exceeds the preset threshold, and then can query the slow query data Too many servers to optimize.
  • the above slow query data may include the time of the slow query data recorded in the log, and the server identifier corresponding to the slow query data.
  • the above server identifier may include the IP address and port number of the server.
  • the above-mentioned execution subject can generate slow query information corresponding to the preset category according to the final clustering result.
  • the slow query data in the slow query queue is stored in the slow query data queue in the above-mentioned memory based on the topic posting method by the server that generates the slow query data.
  • the processor before acquiring the slow query data, the processor further includes step 704: the server that generates the slow query data periodically stores the generated slow query data into the slow query data queue in the memory.
  • the data processor may also store the processed data and the generated slow query information corresponding to the preset category to the database server.
  • step 705 is that the data processor stores the generated data to the database server.
  • step 706 is that the data processor stores the generated slow query information corresponding to the preset category to the database server.
  • Various types of databases can be set in the database server, such as HBASE database, Mysql database, etc.
  • the HBASE database is a distributed database.
  • the database set in the above database service is an HBASE database. Therefore, by using a distributed database, different types of data can be stored in different databases, so that the speed of reading data from the database can be increased.
  • the data processor may also receive a request for viewing slow query information sent by a user through a terminal device.
  • the request may include the dimension of the slow query information requested to be viewed. Then, based on the received request sent by the user, the data processor acquires slow query information corresponding to the requested category from the database, and displays the acquired slow query information.
  • the data processor can obtain the slow query data information of each device corresponding to that time from the database, and then can display The functioning device presents the acquired slow query information.
  • the above processor may be further configured to: perform variable substitution on the acquired slow query data to obtain fixed-length characters corresponding to the slow query data; Long characters are calculated using the message digest algorithm to obtain the calculated data.
  • the data processor can obtain the slow query data, and then process the received slow query data, and finally cluster the processed data according to preset categories to generate corresponding to each category.
  • Slow query information so that users can quickly locate information such as servers with high query data volume and time generated, which is helpful for the effective maintenance of equipment with high query data volume.
  • FIG. 8 shows a schematic structural diagram of a computer system 800 suitable for implementing an electronic device (for example, the server shown in FIG. 1) of an embodiment of the present application.
  • the electronic device shown in FIG. 6 is only an example, and should not bring any limitation to the functions and usage ranges of the embodiments of the present application.
  • the computer system 800 includes a central processing unit (CPU) 801 that can be loaded into a random access memory (RAM) 803 from a program stored in a read-only memory (ROM) 802 or from a storage section 808 Instead, perform various appropriate actions and processing.
  • RAM random access memory
  • ROM read-only memory
  • RAM 803 various programs and data necessary for the operation of the system 800 are also stored.
  • the CPU 801, ROM 802, and RAM 803 are connected to each other through a bus 804.
  • An input / output (I / O) interface 805 is also connected to the bus 804.
  • the following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc .; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and speakers; ; And a communication section 809 including a network interface card such as a LAN card, a modem, etc.
  • the communication section 809 performs communication processing via a network such as the Internet.
  • the driver 810 is also connected to the I / O interface 805 as needed.
  • a removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed on the drive 810 as necessary, so that a computer program read therefrom is installed into the storage portion 808 as necessary.
  • the process described above with reference to the flowchart may be implemented as a computer software program.
  • embodiments of the present disclosure include a computer program product that includes a computer program carried on a computer-readable medium, the computer program containing program code for performing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication section 809, and / or installed from the removable medium 811.
  • the central processing unit (CPU) 801 the above-mentioned functions defined in the method of the present application are executed.
  • the computer-readable medium in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two.
  • the computer-readable storage medium may be, for example but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable removable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • the computer-readable signal medium may include a data signal that is propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried.
  • This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. .
  • the program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the foregoing.
  • the computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof.
  • the programming languages include object-oriented programming languages such as Java, Smalltalk, C ++, as well as conventional Procedural programming language-such as "C" language or similar programming language.
  • the program code may be executed entirely on the user's computer, partly on the user's computer, as an independent software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, through an Internet service provider Internet connection).
  • LAN local area network
  • WAN wide area network
  • Internet service provider Internet connection for example, AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of code that contains one or more logic functions Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks represented in succession may actually be executed in parallel, and they may sometimes be executed in reverse order, depending on the functions involved.
  • each block in the block diagram and / or flowchart, and a combination of blocks in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs the specified function or operation Or, it can be realized by a combination of dedicated hardware and computer instructions.
  • the units described in the embodiments of the present application may be implemented in software or hardware.
  • the described unit may also be provided in a processor.
  • a processor includes: an acquisition unit, a processing unit, and a generation unit.
  • the names of these units do not constitute a limitation on the unit itself.
  • the acquisition unit may also be described as a “unit that periodically acquires slow query data from the slow query data queue”.
  • the present application also provides a computer-readable medium, which may be included in the electronic device described in the foregoing embodiment; or may exist alone without being assembled into the electronic device in.
  • the computer-readable medium carries one or more programs.
  • the electronic device When the one or more programs are executed by the electronic device, the electronic device :: periodically obtains slow query data from the slow query data queue; The data of the slow query of the data is processed; the processed data is clustered according to the preset category, and based on the clustering result, the slow query information corresponding to the preset category is generated.

Abstract

本申请实施例公开了信息生成方法、装置和系统。该方法的一具体实施方式包括:周期性的从慢查询数据队列中获取慢查询数据;对获取到的慢查询数据进行数据处理;以及将处理后的数据按照预设类别进行聚类,基于聚类结果,生成与预设类别对应的慢查询信息。该实施方式可以快速的定位出慢查询数据量过高的服务器、产生的时间等信息,有利于有效的对慢查询数据量过高的设备进行维护。

Description

信息生成方法、装置和系统
本专利申请要求于2018年11月16日提交的、申请号为201811366607.6、发明名称为“信息生成方法、装置和系统”的中国专利申请的优先权,该申请的全文以引用的方式并入本申请中。
技术领域
本申请实施例涉及计算机技术领域,具体涉及信息生成方法和装置。
背景技术
随着科学技术的发展,计算机领域的各种技术得到了广泛的应用。因此,对计算机处理数据能力的要求也越来越高。例如,在机器学习领域,需要对大量数据样本进行学习处理,以得到训练后的模型;再例如,在人脸识别领域,需要通过对人脸数据进行采集,然后利用模型重建技术实现人脸识别。
在相关数据处理领域中,当数据量过大时,通常会产生慢查询数据。当慢查询数据量过大时,通常会使得从数据库中查询数据的时间延迟,进而导致数据丢失或降低数据处理速度。
发明内容
本申请实施例提出了信息生成方法、装置和系统。
第一方面,本申请实施例提供了一种信息生成方法,包括:周期性的从慢查询数据队列中获取慢查询数据;对获取到的慢查询数据进行数据处理;将处理后的数据按照预设类别进行聚类,基于聚类结果,生成与预设类别对应的慢查询信息。
第二方面,本申请实施例提供了一种信息生成装置,该装置包括:获取单元,被配置成周期性的从慢查询数据队列中获取慢查询数据; 处理单元,被配置成对接收到的慢查询数据进行数据处理;生成单元,被配置成将处理后的数据按照预设类别进行聚类,基于聚类结果,生成与预设类别对应的慢查询信息。
第三方面,本申请实施例提供了一种信息生成系统,信息生成系统包括数据处理器和存储器,数据处理器与存储器通信连接;其中,存储器被配置成存储慢查询数据队列;数据处理器被配置成从慢查询数据队列中获取慢查询数据;对获取到的慢查询数据进行数据处理;将处理后的数据按照预设类别进行聚合,基于聚合结果,生成与预设类别对应的慢查询信息。
第四方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器;存储装置,其上存储有一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如上述第一方面中任意实施例的方法。
第五方面,本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如上述第一方面中任意实施例的方法。
本申请实施例提供的信息生成方法、装置和系统,可以首先获取慢查询数据,然后对接收到的慢查询数据进行处理,最后对处理后的数据按照预设类别进行聚类,生成与各类别对应的慢查询信息,从而使得用户可以快速的定位出慢查询数据量过高的服务器、产生的时间等信息,有利于有效的对慢查询数据量过高的设备进行维护。
附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:
图1是本申请的一个实施例可以应用于其中的示例性系统架构图;
图2是根据本申请的信息生成方法的一个实施例的流程图;
图3-图5是根据本申请的信息生成方法的一个应用场景所示的慢查询信息的示意图;
图6是根据本申请的信息生成装置的一个实施例的结构示意图;
图7是根据本申请的信息生成系统的一个实施例的时序图;
图8是适于用来实现本申请实施例的服务器的计算机系统的结构示意图。
具体实施方式
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。
图1示出了可以应用本申请的信息生成方法或信息生成装置的实施例的示例性系统架构100。
如图1所示,系统架构100可以包括第一服务器101、102、103、网络104和第二服务器105。网络104用以在第一服务器101、102、103和第二服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。
第一服务器101、102、103可以为用于对终端中安装的应用提供支持的第一服务器。例如,对地图类应用、搜索类应用、购物类应用等应用提供支持的服务端。该第一服务器101、102、103可以根据其自身的承载量产生慢查询数据。慢查询数据为查询超过指定时间的数据。
第一服务器101、102、103可以是硬件,也可以是软件。当第一服务器为硬件时,可以实现成多个服务器组成的分布式服务器集群,也可以实现成单个服务器。当第一服务器为软件时,可以实现成多个软件或软件模块(例如用来提供分布式服务),也可以实现成单个软件或软件模块。在此不做具体限定。
第二服务器105可以是用于进行数据处理的数据处理服务器。第 二服务器105可以对获取到的第一服务器101、102、103产生的慢查询数据进行处理,然后将处理后的数据按照预设类别进行聚合,最终生成慢查询信息。
需要说明的是,第二服务器可以是硬件,也可以是软件。当第二服务器为硬件时,可以实现成多个服务器组成的分布式服务器集群,也可以实现成单个服务器。当第二服务器为软件时,可以实现成多个软件或软件模块(例如用来提供分布式服务),也可以实现成单个软件或软件模块。在此不做具体限定。
需要说明的是,本申请实施例所提供的信息生成方法一般由第二服务器105执行,相应地,信息生成装置一般设置于第二服务器105中。
应该理解,图1中的第一服务器、网络和第二服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。
继续参考图2,其示出了根据本申请的信息生成方法的一个实施例的流程200。该信息生成方法,包括以下步骤:
步骤201,周期性的从慢查询数据队列中获取慢查询数据。
在本实施例中,信息生成方法的执行主体(例如图1所示的第二服务器)可以周期性的获取慢查询数据。通常,设置于服务器(例如图1所示第一服务器)中的数据库(例如MYSQL数据库)日志可以用于记录在数据库中响应时间超过阈值的语句。慢查询数据即为该数据库日志中所记录的响应超过预设阈值的数据。该周期可以为预先设置的周期,也可以为缺省设置的周期,例如设置该周期为10分钟。
在本实施例中,上述执行主体中可以设置有存储器,例如缓存器。上述慢查询队列存放在该缓存器中。上述用于产生慢查询数据的服务器可以将慢查询数据存储在上述慢查询队列中。然后,执行主体可以从慢查询队列中获取慢查询数据。
在本实施例中,上述慢查询数据队列可以存储在与上述执行主体相互分离的存储系统中。具体来说,上述执行主体可以与该存储系统 通信连接。该存储系统可以为分布式发布订阅消息系统,例如Kafka系统。该系统中可以包括多个主题,其中一个主题即为用于存储慢查询数据的主题,该用于存储慢查询数据的主题可以称之为慢查询数据队列。从而,上述执行主体可以基于慢查询主题从慢查询数据队列中获取慢查询数据。
在本实施的一些可选的实现方式中,慢查询队列中的慢查询数据是产生慢查询数据的服务器周期性的将产生的慢查询数据发送至上述慢查询消息队列中的。例如,产生慢查询数据的服务器可以将慢查询数据发送至用于存储慢查询消息队列的缓冲中,也可以基于话题发布的方式将所产生的慢查询数据发送至上述存储系统中。
在一些可选的实现方式中,产生慢查询数据的服务器可以对所记录的慢查询数据进行处理。例如,可以将慢查询数据处理成上述缓存器或存储系统可以识别和存储的格式。
在一些可选的实现方式中,为了使得慢查询数据队列中的数据可以被及时的读取,可以将上述执行主体获取慢查询数据的周期与生成慢查询数据的服务器的周期同步。
步骤202,对接收到的慢查询数据进行数据处理。
在本实施例中,上述执行主体在接收到慢查询数据后,可以对慢查询数据可以进行处理,从而使得慢查询数据为固定的字符。例如,可以对获取到的慢查询数据进行哈希运算,得到与每一个慢查询数据对应的哈希值。
在一些可选的实现方式中,可以对所获取到的慢查询数据进行变量替换,从而可以得到与慢查询数据对应的定长字符。通过变量替换创建与慢查询数据对应的替换变量的值,可以使得数据的处理和统计更加简便。接着,上述执行主体可以对所得到的定长字符利用消息摘要算法进行计算,从而得到计算后的数据。由于在进行数据聚类时,不需要知道慢查询数据的具体内容。从而,通过利用摘要加密算得到与慢查询数据对应的数据摘要,可以提高数据聚合的速度,还可以使得所聚合的与各类别对应的数据更加准确。
步骤203,将处理后的数据按照预设类别进行数据聚类,基于数 据聚类结果,生成与预设类别对应的慢查询数据。
在本实施例中,上述预设类别例如可以为时间类别、实例类别、业务类别等,时间类别可以包括分、时、天、月等。按照不同的类别对处理后的数据进行聚类,使得用户可以在不同的维度下查看慢查询信息,从而可以准确的判断出慢查询数据量超过预设阈值的服务器,进而可以对该慢查询数据量过多的服务器进行优化。
在本实施例中,上述慢查询数据中可以包括日志所记录的慢查询数据的时间、与慢查询数据对应的服务器标识。上述服务器标识可以包括服务器的IP地址和端口号。当服务器完成一项任务时会从数据库中查询大量的数据。相应的,会产生慢查询数据。从而,每条慢查询数据还可以包括其所属的任务的任务标识。
最终,上述执行主体可以根据最终的聚类结果,生成与预设类别对应的慢查询信息。
举例来说,如图3-图5所示。图3-图5是根据本申请的信息生成方法的一个应用场景所示的慢查询信息的示意图。
具体的,图3示出了基于时间的对慢查询数据进行聚合而得到的慢查询信息。其示出了2018年7月12日在14:00-15:00时间段内每一分钟的慢查询数据。其中,横轴代表时间,纵轴代表与各时刻对应的慢查询数据量。以2018年7月12日14:16为例,从图中可以看出,与其对应的慢查询数据为9499条。也即是说,在14:15-14:16该时间段内产生的慢查询数据为9499条。从图3中可以看出,通过图3所示的数据表,可以快速的查询出慢查询数据量超过预设阈值的时刻。
图4示出了在某一时刻,对各服务器所产生的慢查询数据进行聚合得到的慢查询数据。其中,图4中的横轴代表慢查询数据的数据量,纵轴代表各服务器的IP地址和端口号。从图4中可以直观的得到在某一时刻,慢查询数据的数据量超过预设阈值的服务器。
图5示出了在某一时刻,某一服务器对应的数据库的慢查询的时间分布情况。如图5所示,在所有的慢查询数据中,慢查询时间在0.5s-1s的慢查询数据占33.33%,慢查询时间在1s-3s的慢查询数据占66.67%。
从图3-图5所示的应用场景中可以看出,通过对慢查询数据进行聚类,可以准确的定位出慢查询数据的具体分布情况,提高了用户对慢查询数据排查的速度,从而可以更好的对数据库进行优化以提高数据库性能。
在本实施例的一些可选的实现方式中,上述执行主体可以将处理后的数据和所生成的与预设类别对应的慢查询信息存储至存储节点。该存储节点可以为设置于执行主体中的数据库,也可以为独立于上述执行主体的数据库。该存储节点可以为HBASE数据库。在该可选的实现方式中,上述执行主体可以将每一次处理过的数据存储至HBASE数据库,也可以将聚类后与各类别对应的慢查询信息分别存储至HBASE数据库。从而,当需要获取数据时,可以快速的从数据库中查询出。
本申请实施例所示的信息生成方法,通过对获取的慢查询数据进行处理,然后对处理后的数据按照预设类别进行数据聚类,最后基于数据聚类结果生成慢查询信息,从而使得用户可以快速的定位出慢查询数据量过高的服务器、产生的时间等信息,有利于有效的对慢查询数据量过高的设备进行维护。
进一步参考图6,作为对上述图2所示方法的实现,本申请提供了一种信息生成装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。
如图6所示,本实施例的信息生成装置600包括:获取单元601、处理单元602和生成单元603。其中,获取单元601,被配置成周期性的从慢查询数据队列中获取慢查询数据。处理单元602,被配置成对接收到的慢查询数据进行数据处理。生成单元603,被配置成将处理后的数据按照预设类别进行聚类,基于聚类结果,生成与所述预设类别对应的慢查询信息。
在本实施例中,信息生成装置600中:获取单元601、处理单元602和生成单元603的具体处理及其带来的有益效果可参看图2对应实施例中的步骤201、步骤202和步骤203的实现方式的相关描述, 在此不再赘述。
在本实施例一些可选的实现方式中,慢查询数据队列中的慢查询数据是由产生慢查询数据的服务器周期性的将预设时间间隔内生成的慢查询数据发送至慢查询数据队列中的。
在本实施例一些可选的实现方式中,处理单元进一步被配置成:对获取到的慢查询数据进行变量替换,得到与慢查询数据对应的定长字符;利用消息摘要算法对所得到的定长字符进行计算,得到计算后的数据。
在本实施例一些可选的实现方式中,信息处理装置还包括存储单元,存储单元被配置成将处理后的数据和所生成的与预设类别对应的慢查询信息存储至数据库。
在本实施例一些可选的实现方式中,信息生成装置还包括呈现单元,呈现单元被配置成:接收查看慢查询信息的请求,请求包括与慢查询信息对应的类别;基于接收到的请求,从数据库中获取与所请求查看的类别对应的慢查询信息,以及呈现所获取的慢查询信息。
进一步参考图7,其示出了本申请提供的信息生成系统的一个实施例的结构示意图。
如图7所示,信息生成系统包括数据处理器和存储器,处理器与存储器通信连接。存储器中存储有慢查询数据队列。数据处理器具体被配置成:从存储器中获取慢查询数据;对获取到的慢查询数据进行处理;将处理后的数据按照预设类别进行数据聚合,基于数据聚合结果,生成与预设类别对应的慢查询信息。
在步骤701中,数据处理器可以周期性的从存储在存储器中的慢查询数据队列中获取慢查询数据。
接着,在步骤702中,数据处理器可以对接收到的慢查询数据进行数据处理。
上述执行主体在接收到慢查询数据后,可以对慢查询数据可以进行处理,从而使得慢查询数据为固定的字符。例如,可以对获取到的慢查询数据进行哈希运算,得到与每一个慢查询数据对应的哈希值。
在本实施例一些可选的实现方式中,上述数据处理器进一步被配置成对所获取到的慢查询数据进行变量替换,从而可以得到与慢查询数据对应的定长字符。通过变量替换创建与慢查询数据对应的替换变量的值,可以使得数据的处理和统计更加简便。接着,上述执行主体可以对所得到的定长字符利用消息摘要算法进行计算,从而得到计算后的数据。由于在进行数据聚类时,不需要知道慢查询数据的具体内容。从而,通过利用摘要加密算得到与慢查询数据对应的数据摘要,可以提高数据聚合的速度,还可以使得所聚合的与各类别对应的数据更加准确。
最后,在步骤703中,数据处理器可以将处理后的数据按照预设类别进行数据聚类,基于数据聚类结果,生成与预设类别对应的慢查询数据。
在本实施例中,上述预设类别例如可以为时间类别、实例类别、业务类别等,时间类别可以包括分、时、天、月等。按照不同的类别对处理后的数据进行聚类,使得用户可以在不同的维度下查看慢查询信息,从而可以准确的判断出慢查询数据量超过预设阈值的服务器,进而可以对该慢查询数据量过多的服务器进行优化。
在本实施例中,上述慢查询数据中可以包括日志所记录的慢查询数据的时间、与慢查询数据对应的服务器标识。上述服务器标识可以包括服务器的IP地址和端口号。当服务器完成一项任务时会从数据库中查询大量的数据。相应的,会产生慢查询数据。从而,每条慢查询数据还可以包括其所属的任务的任务标识。
最终,上述执行主体可以根据最终的聚类结果,生成与预设类别对应的慢查询信息。
在本实施例一些可选的实现方式中,慢查询队列中的慢查询数据是产生慢查询数据的服务器基于话题发布的方式存储在上述存储器中的慢查询数据队列中的。如图7所示,处理器在获取慢查询数据之前,还包括步骤704:产生慢查询数据的服务器周期性的将所产生的慢查询数据存储至存储器中的慢查询数据队列中。
在本实施例的一些可选的实现方式中,数据处理器还可以将处理 后的数据和所生成的与预设类别对应的慢查询信息存储至数据库服务器。如图7所示,步骤705为数据处理器将产生的数据存储至数据库服务器。步骤706为数据处理器将生成的与预设类别对应的慢查询信息存储至数据库服务器。数据库服器中可以设置有多种类型的数据库,例如HBASE数据库、Mysql数据库等。其中,HBASE数据库为分布式数据库,优选地,上述数据库服务中设置的数据库为HBASE数据库。从而,通过采用分布式数据库,可以将不同种类的数据存储至不同的数据库中,从而可以提高从数据库中读取数据的速度。
在本实施例的一些可选的实现方式中,数据处理器还可以接收用户通过终端设备发送的查看慢查询信息的请求。在这里,该请求可以包括所请求查看的慢查询信息的维度。然后,数据处理器基于接收到的用户发送的请求,从数据库中获取与所请求查看的类别对应的慢查信息,以及展示所获取的慢查询信息。
作为示例,当用户需要查看某一时刻各设备的慢查询数据信息时,数据处理器可以从数据库中获取该时刻对应的各设备的慢查询数据信息,然后可以通过与数据处理器连接的具有显示功能的设备呈现所获取的慢查询信息。
在本实施例一些可选的实现方式中,上述处理器还可以进一步被配置成:对所获取到的慢查询数据进行变量替换,得到与慢查询数据对应的定长字符;对所得到的定长字符利用消息摘要算法进行计算,得到计算后的数据。
本申请实施例提供的信息生成系统,数据处理器可以获取慢查询数据,然后对接收到的慢查询数据进行处理,最后对处理后的数据按照预设类别进行聚类,生成与各类别对应的慢查询信息,从而使得用户可以快速的定位出慢查询数据量过高的服务器、产生的时间等信息,有利于有效的对慢查询数据量过高的设备进行维护。
下面参考图8,其示出了适于用来实现本申请实施例的电子设备(例如图1所示的服务器)的计算机系统800的结构示意图。图6示出的电子设备仅仅是一个示例,不应对本申请实施例的功能和使用范 围带来任何限制。
如图8所示,计算机系统800包括中央处理单元(CPU)801,其可以根据存储在只读存储器(ROM)802中的程序或者从存储部分808加载到随机访问存储器(RAM)803中的程序而执行各种适当的动作和处理。在RAM 803中,还存储有系统800操作所需的各种程序和数据。CPU 801、ROM 802以及RAM 803通过总线804彼此相连。输入/输出(I/O)接口805也连接至总线804。
以下部件连接至I/O接口805:包括键盘、鼠标等的输入部分806;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分807;包括硬盘等的存储部分808;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分809。通信部分809经由诸如因特网的网络执行通信处理。驱动器810也根据需要连接至I/O接口805。可拆卸介质811,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器810上,以便于从其上读出的计算机程序根据需要被安装入存储部分808。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分809从网络上被下载和安装,和/或从可拆卸介质811被安装。在该计算机程序被中央处理单元(CPU)801执行时,执行本申请的方法中限定的上述功能。需要说明的是,本申请该的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本申请中, 计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言或其组合来编写用于执行本申请的操作的计算机程序代码,该程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如”C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组 合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括:获取单元、处理单元和生成单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,获取单元还可以被描述为“周期性的从慢查询数据队列中获取慢查询数据的单元”。
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备::周期性的从慢查询数据队列中获取慢查询数据;对获取到的慢查询数据进行数据处理;将处理后的数据按照预设类别进行聚类,基于聚类结果,生成与预设类别对应的慢查询信息。
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (17)

  1. 一种信息生成方法,包括:
    周期性的从慢查询数据队列中获取慢查询数据;
    对获取到的慢查询数据进行数据处理;以及
    将处理后的数据按照预设类别进行聚类,基于聚类结果,生成与所述预设类别对应的慢查询信息。
  2. 根据权利要求1所述的方法,其中,所述慢查询数据队列中的慢查询数据是由产生慢查询数据的服务器周期性的将预设时间间隔内生成的慢查询数据发送至所述慢查询数据队列中的。
  3. 根据权利要求1所述的方法,其中,所述对获取到的慢查询数据进行数据处理,包括:
    对获取到的慢查询数据进行变量替换,得到与所获取到的慢查询数据对应的定长字符;以及
    利用消息摘要算法对所得到的定长字符进行计算,得到计算后的数据。
  4. 根据权利要求1-3所述的方法,其中,所述方法还包括:
    将处理后的数据和所生成的与所述预设类别对应的所述慢查询信息存储至数据库。
  5. 根据权利要求4所述的方法,其中,所述方法还包括:
    接收查看慢查询信息的请求,所述请求包括与所述慢查询信息对应的类别;以及
    基于接收到的请求,从所述数据库中获取与所请求查看的类别对应的慢查询信息,以使得具有显示功能的设备呈现所获取的慢查询信息。
  6. 一种信息生成装置,包括:
    获取单元,被配置成周期性的从慢查询数据队列中获取慢查询数据;
    处理单元,被配置成对接收到的慢查询数据进行数据处理;以及
    生成单元,被配置成将处理后的数据按照预设类别进行聚类,基于聚类结果,生成与所述预设类别对应的慢查询信息。
  7. 根据权利要求6所述的装置,其中所述慢查询数据队列中的慢查询数据是由产生慢查询数据的服务器周期性的将预设时间间隔内生成的慢查询数据发送至所述慢查询数据队列中的。
  8. 根据权利要求6所述的装置,其中所述处理单元进一步被配置成:
    对获取到的慢查询数据进行变量替换,得到与所获取到的慢查询数据对应的定长字符;以及
    利用消息摘要算法对所得到的定长字符进行计算,得到计算后的数据。
  9. 根据权利要求6-8所述的装置,还包括存储单元,所述存储单元被配置成将处理后的数据和所生成的与所述预设类别对应的所述慢查询信息存储至数据库。
  10. 根据权利要求9所述的装置,还包括呈现单元,所述呈现单元被配置成:
    接收查看慢查询信息的请求,所述请求包括与所述慢查询信息对应的类别;以及
    基于接收到的请求,从所述数据库中获取与所请求查看的类别对应的慢查询信息,以使得具有显示功能的设备呈现所获取的慢查询信息。
  11. 一种信息生成系统,所述信息生成系统包括数据处理器和存储器,所述数据处理器与所述存储器通信连接;
    所述存储器被配置成存储慢查询数据队列;
    所述数据处理器被配置成从所述慢查询数据队列中获取慢查询数据;对获取到的慢查询数据进行数据处理;以及将处理后的数据按照预设类别进行聚合,基于聚合结果,生成与所述预设类别对应的慢查询信息。
  12. 根据权利要求11所述的系统,其中,所述信息生成系统还包括慢查询数据生成服务器,所述存储器与所述慢查询数据生成服务器通信连接;以及
    所述慢查询数据生成服务器被配置成:
    周期性的将预设时间间隔内生成的慢查询数据发送至所述慢查询数据队列中。
  13. 根据权利要求11所述的系统,其中,所述存储器进一步被配置成:
    对获取到的慢查询数据进行变量替换,得到与所获取到的慢查询数据对应的定长字符;以及
    对所得到的定长字符利用消息摘要算法进行计算,得到计算后的数据。
  14. 根据权利要求11-13所述的系统,其中,所述信息生成系统还包括数据库服务器,所述处理器与所述数据库服务器通信连接;以及
    所述存储器进一步被配置成:
    将处理后的数据和所生成的与所述预设类别对应的所述慢查询信息存储至数据库服务器。
  15. 根据权利要求14所述的系统,其中,所述存储器进一步被配 置成:
    接收查看慢查询信息的请求,所述请求包括与所述慢查询信息对应的类别;
    基于接收到的请求,从所述数据库服务器中获取与所请求查看的类别对应的慢查询信息,以使得具有显示功能的设备呈现所获取的慢查询信息。
  16. 一种电子设备,包括:
    一个或多个处理器;
    存储装置,其上存储有一个或多个程序,
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-5中任一所述的方法。
  17. 一种计算机可读存储介质,其上存储有计算机程序,其中,该程序被处理器执行时实现如权利要求1-5中任一所述的方法。
PCT/CN2019/104311 2018-11-16 2019-09-04 信息生成方法、装置和系统 WO2020098347A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811366607.6 2018-11-16
CN201811366607.6A CN109522327A (zh) 2018-11-16 2018-11-16 信息生成方法、装置和系统

Publications (1)

Publication Number Publication Date
WO2020098347A1 true WO2020098347A1 (zh) 2020-05-22

Family

ID=65778147

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/104311 WO2020098347A1 (zh) 2018-11-16 2019-09-04 信息生成方法、装置和系统

Country Status (2)

Country Link
CN (1) CN109522327A (zh)
WO (1) WO2020098347A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109522327A (zh) * 2018-11-16 2019-03-26 北京京东金融科技控股有限公司 信息生成方法、装置和系统
CN114327268A (zh) * 2021-12-27 2022-04-12 北京云思智学科技有限公司 一种应用于kv存储的自适应防护方法、装置及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060149724A1 (en) * 2005-01-03 2006-07-06 Ritter Gerd M Methods relating to data repository querying
CN105243147A (zh) * 2015-10-22 2016-01-13 浪潮(北京)电子信息产业有限公司 一种MySQL数据库慢查询日志的管理方法及系统
CN105812177A (zh) * 2016-03-08 2016-07-27 华为技术有限公司 一种网络故障处理方法和处理设备
CN107688626A (zh) * 2017-08-18 2018-02-13 北京小度信息科技有限公司 慢查询日志处理方法、装置及电子设备
CN109522327A (zh) * 2018-11-16 2019-03-26 北京京东金融科技控股有限公司 信息生成方法、装置和系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102385632A (zh) * 2011-12-02 2012-03-21 苏州阔地网络科技有限公司 一种日志自动分类通知方法及系统
CN103780379B (zh) * 2012-10-19 2017-09-19 阿里巴巴集团控股有限公司 密码加密方法和系统以及密码校验方法和系统
CN102915374B (zh) * 2012-11-07 2016-04-06 北京搜狐新媒体信息技术有限公司 一种控制数据库资源访问的方法、装置及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060149724A1 (en) * 2005-01-03 2006-07-06 Ritter Gerd M Methods relating to data repository querying
CN105243147A (zh) * 2015-10-22 2016-01-13 浪潮(北京)电子信息产业有限公司 一种MySQL数据库慢查询日志的管理方法及系统
CN105812177A (zh) * 2016-03-08 2016-07-27 华为技术有限公司 一种网络故障处理方法和处理设备
CN107688626A (zh) * 2017-08-18 2018-02-13 北京小度信息科技有限公司 慢查询日志处理方法、装置及电子设备
CN109522327A (zh) * 2018-11-16 2019-03-26 北京京东金融科技控股有限公司 信息生成方法、装置和系统

Also Published As

Publication number Publication date
CN109522327A (zh) 2019-03-26

Similar Documents

Publication Publication Date Title
CN110147398B (zh) 一种数据处理方法、装置、介质和电子设备
CN109471863B (zh) 基于分布式数据库的信息查询方法及装置、电子设备
CN109657174B (zh) 用于更新数据的方法和装置
CN110489440B (zh) 数据查询方法和装置
US11188443B2 (en) Method, apparatus and system for processing log data
CN110719215B (zh) 虚拟网络的流信息采集方法及装置
CN111352800A (zh) 大数据集群监控方法及相关设备
WO2020119540A1 (zh) 用于生成群聊头像的方法和设备
US10031901B2 (en) Narrative generation using pattern recognition
WO2020098347A1 (zh) 信息生成方法、装置和系统
CN113918357A (zh) 业务处理方法及装置、存储介质、电子设备
CN108363741B (zh) 大数据统一接口方法、装置、设备及存储介质
WO2024021476A1 (zh) 一种数据处理方法、装置、电子设备和存储介质
WO2023000785A1 (zh) 用于处理数据的方法、装置、系统、服务器和介质
WO2020221146A1 (zh) 信息生成方法、电子设备和计算机可读介质
US11283697B1 (en) Scalable real time metrics management
CN108011936B (zh) 用于推送信息的方法和装置
CN112506490A (zh) 一种接口生成方法、装置、电子设备及存储介质
JP2023031248A (ja) エッジコンピューティングネットワーク、データ伝送方法、装置、機器、及び記憶媒体
CN112699111B (zh) 报表生成方法、装置、电子设备和计算机可读介质
CN112000323B (zh) 一种数据处理方法和装置
CN111274104B (zh) 数据处理方法、装置、电子设备及计算机可读存储介质
US20170302764A1 (en) Unifying realtime and static data for presenting over a web service
CN107894942B (zh) 数据表访问量的监控方法和装置
CN112100159A (zh) 数据处理方法、装置、电子设备和计算机可读介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19885819

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19885819

Country of ref document: EP

Kind code of ref document: A1