WO2023000785A1 - Data processing method, device and system, and server and medium - Google Patents

Data processing method, device and system, and server and medium Download PDF

Info

Publication number
WO2023000785A1
WO2023000785A1 PCT/CN2022/092645 CN2022092645W WO2023000785A1 WO 2023000785 A1 WO2023000785 A1 WO 2023000785A1 CN 2022092645 W CN2022092645 W CN 2022092645W WO 2023000785 A1 WO2023000785 A1 WO 2023000785A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
parsing
log file
processing
database
Prior art date
Application number
PCT/CN2022/092645
Other languages
French (fr)
Chinese (zh)
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 WO2023000785A1 publication Critical patent/WO2023000785A1/en

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/23Updating
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Definitions

  • Embodiments of the present disclosure relate to the field of computer technologies, and in particular to methods, devices, systems, servers and media for processing data.
  • the existing technology provides a method of analyzing the Binlog (binary log) log file of the relational database and directly writing the analysis result into the big data. method of the file system.
  • Embodiments of the present disclosure propose methods, apparatuses, systems, servers, media and computer program products for processing data.
  • an embodiment of the present disclosure provides a method for processing data, the method comprising: acquiring a parsing result set of a target log file based on parallel processing, wherein the target log file is used to record changes to the first database ; According to the time information of the data in the first database corresponding to the analysis results in the analysis result set, sort at least one piece of data; based on the latest data indicated by the time information, generate logic associated with the data in the first database view.
  • the acquisition of the parsing result set of the target log file based on parallel processing includes: receiving the parsing result of the target log file concurrently written by at least two consumers in the target distributed message queuing system; The resulting analysis results are generated to generate a set of analysis results.
  • the above parsing results are respectively written into corresponding files in the preset big data file system according to the extracted message subject.
  • the above-mentioned sorting of at least one piece of data according to the time information of the data in the first database corresponding to the analysis results in the analysis result set includes: generating files and preset files in the preset big data file system Association relationship between metadata tables; data windowing processing is performed according to the data time association field in the preset metadata table, wherein the data time association field matches the time information of the data in the first database; The data after window processing are sorted by time.
  • the method further includes: based on the data in the logical view and the time information corresponding to the data, creating a temporary data table of the target time period, wherein the target time period matches the time information corresponding to the data, and the temporary data table
  • the data in includes the results of the last data processing and the results of this incremental processing.
  • an embodiment of the present disclosure provides an apparatus for processing data, the apparatus including: an acquisition unit configured to acquire a parsing result set of a target log file based on parallel processing, wherein the target log file is used for Record the change of the first database; the sorting unit is configured to sort at least one piece of data according to the time information of the data in the first database corresponding to the parsing results in the parsing result set; the generating unit is configured to sort at least one piece of data based on the time information Indicates the most recent data, generating a logical view associated with the data in the first database.
  • the acquisition unit is further configured to: receive the parsing results of the target log files concurrently written by at least two consumers in the target distributed message queue system; generate the parsing results based on the received parsing results gather.
  • the above parsing results are respectively written into corresponding files in the preset big data file system according to the extracted message subject.
  • the above sorting unit may be further configured to: generate a preset association relationship between files in the big data file system and preset metadata tables; associate fields according to data time in preset metadata tables performing data windowing processing, wherein the data time correlation field matches the time information of the data in the first database; performing time sorting on the data after the windowing processing.
  • the device further includes: a creation unit configured to create a temporary data table of the target time period based on the data in the logical view and the time information corresponding to the data, wherein the target time period and the time information corresponding to the data Matching, the data in the temporary data table includes the result of the last data processing and the result of this incremental processing.
  • a creation unit configured to create a temporary data table of the target time period based on the data in the logical view and the time information corresponding to the data, wherein the target time period and the time information corresponding to the data Matching, the data in the temporary data table includes the result of the last data processing and the result of this incremental processing.
  • an embodiment of the present disclosure provides a system for processing data, the system includes: an analysis end configured to write the analysis result of the acquired target log file into the target file based on parallel processing The system, wherein the target log file is used to record changes in the first database; the data processing end is configured to sort at least one piece of data according to the time information of the data in the first database corresponding to the analysis result; based on the time information indicated The most recent data in time, generating a logical view associated with the data in the first database.
  • the analysis end includes: an acquisition unit configured to acquire a log file used to record changes in the first database as a target log file; an analysis unit configured to use at least two threads to process the target log file parsing, generating a parsing result; a writing unit configured to write the generated parsing result into a target file system.
  • the parsing unit is further configured to: use at least two threads to filter statements that hit preset filter words in the target log file to generate a filtered target log file; use at least two threads to filter the target log file The target log file is parsed and the parsing result is generated.
  • the parsing end is further configured to: extract the message subject from the parsed result of the acquired target log file; write the parsing result concurrently to the preset big data The corresponding file in the file system.
  • an embodiment of the present disclosure provides a server, which includes: 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 executed by a processor, so that one or more processors implement the method described in any implementation manner of the first aspect.
  • an embodiment of the present disclosure provides a computer-readable medium, on which a computer program is stored, and when the program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.
  • the embodiments of the present disclosure provide a computer program product including a computer program.
  • the computer program When the computer program is executed by a processor, the method described in any implementation manner in the first aspect can be implemented.
  • FIG. 1 is an exemplary system architecture diagram to which an embodiment of the present disclosure can be applied;
  • Figure 2 is a flowchart of one embodiment of a method for processing data according to the present disclosure
  • FIG. 3 is a schematic diagram of an application scenario of a method for processing data according to an embodiment of the present disclosure
  • FIG. 4 is a flowchart of yet another embodiment of a method for processing data according to the present disclosure.
  • Fig. 5 is a schematic structural diagram of an embodiment of an apparatus for processing data according to the present disclosure
  • Fig. 6 is a sequence diagram of interaction between various devices in an embodiment of the system for processing data according to the present disclosure.
  • FIG. 7 is a schematic structural diagram of an electronic device suitable for implementing an embodiment of the present disclosure.
  • FIG. 1 shows an exemplary architecture 100 to which the method for processing data or the apparatus for processing data of the present disclosure can be applied.
  • the system architecture 100 may include servers 101 , 102 , 103 and networks 104 , 105 .
  • the networks 104 and 105 are used to provide communication link media between the server 101 and the server 102 and between the server 102 and the server 103 respectively.
  • the networks 104, 105 may include various connection types such as wires, wireless communication links, or fiber optic cables, among others.
  • the server 102 can interact with the server 101 and the server 103 through the networks 104, 105, respectively, to receive or send messages and the like.
  • the servers 101, 102, 103 may be servers that provide various services.
  • server 101 may be a database server.
  • Server 102 may be a server for performing log parsing.
  • the server 103 may be a big data server, which may provide file system services and computing services in a big data environment.
  • the server may be hardware or software.
  • the server can be implemented as a distributed server cluster composed of multiple servers, or as a single server.
  • the server is software, it can be implemented as multiple software or software modules (such as software or software modules for providing distributed services), or as a single software or software module. No specific limitation is made here.
  • the method for processing data provided by the embodiments of the present disclosure is generally executed by the server 103 , and correspondingly, the device for processing data is generally disposed in the server 103 .
  • terminal devices, networks and servers in Fig. 1 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.
  • the method, device, system, server, and medium for processing data provided by the embodiments of the present disclosure open the parallel processing of data in the log parsing stage, and perform data sorting according to the time information of the data in the subsequent processing link, and then based on the time
  • the most recent data generates a logical view, which not only improves the processing efficiency of data, but also ensures the consistency of data by "trading space for time".
  • the method for processing data includes the following steps:
  • Step 201 acquiring a parsing result set of a target log file based on parallel processing.
  • the execution body of the method for processing data can obtain the parsing result set of the target log file based on parallel processing through a wired connection or a wireless connection.
  • the above-mentioned target log file may be used to record changes of the first database.
  • the change of the above-mentioned first database may include at least one of structure change (such as CREATE, ALTER TABLE, etc.) and data modification (such as INSERT, UPDATE, DELETE, etc.) of the database table.
  • the above target log file may be a Binlog file.
  • the aforementioned execution subject can obtain the parsing result set of the target log file based on parallel processing that is stored locally in advance, and can also obtain the electronic device (such as The parsing result set of the target log file based on parallel processing sent by the server 102) shown in FIG. 1 .
  • the above execution subject may also obtain a parsing result set of the target log file based on parallel processing through the following steps:
  • the first step is to receive parsing results of target log files written concurrently by at least two consumers in the target distributed message queuing system.
  • the above-mentioned target distributed message queue system may be Kafka.
  • the execution subject may enable concurrent consumption at the consumer end in the target distributed message queue system, so as to allow at least two consumer ends to concurrently write the parsing results of the target log file thereinto.
  • this solution can ignore the order of consumption and the limitation of repeated consumption, so as to maximize the concurrent processing speed and greatly reduce the backlog of parsed messages.
  • the above parsing results may be respectively written into corresponding files in the preset big data file system according to the extracted message subject.
  • different files can be set according to different message topics in the above preset big data file system. Therefore, the execution subject for writing the above analysis results can write the analysis results into corresponding files in the preset big data file system according to the extracted message subject.
  • the above-mentioned big data file system may be HDFS (Hadoop Distributed File System, Hadoop Distributed File System).
  • this solution can directly obtain the analysis results written into the corresponding files, thereby providing a data basis for subsequent fast writing and loading of files.
  • the second step is to generate a set of analysis results based on the received analysis results.
  • the execution subject may generate a set of analysis results in various ways.
  • the execution subject may directly form a plurality of received parsing results into a parsing result set.
  • Step 202 sort at least one piece of data according to the time information of the data in the first database corresponding to the analysis results in the analysis result set.
  • the above-mentioned execution subject can use various methods for at least one The data is sorted.
  • the execution subject may directly follow the chronological order indicated by the time information of the data in the first database corresponding to the analysis results in the analysis result set of the target log file based on parallel processing acquired in the above step 201 Sort the data in the above-mentioned first database.
  • the execution subject may sort at least one piece of data through the following steps:
  • the first step is to generate the association relationship between the files in the preset big data file system and the preset metadata table.
  • the execution subject may generate the association relationship between the files in the preset big data file system and the preset metadata table in various ways.
  • the above execution subject may create an association relationship between a file and a preset metadata table through metadata management of hive (a Hadoop-based data warehouse tool).
  • the second step is to perform data windowing processing according to the data time correlation field in the preset metadata table.
  • the execution subject may perform data windowing processing in various ways.
  • the above-mentioned data time association field usually matches the time information of the data in the above-mentioned first database.
  • the execution subject may perform data windowing processing according to the primary key of the preset metadata table (for example, the id of the data).
  • the id of the above data may be the time associated field of the above data (eg modified_date).
  • the third step is to perform time sorting on the data after windowing processing.
  • the execution subject may perform time sorting on the data after the second step of windowing processing in various ways.
  • the above execution subject can use the function row_number()over(partition by id order by modified_date desc) to sort the data by time, so as to obtain the data results arranged according to the time order of the data.
  • this solution can sort the data based on the preset relationship between various files and tables in the big data file system and the windowing process of the data, because the sorting is transferred to the preset Processing in the big data file system avoids serial bottlenecks caused by forced sequential writing when data is written, thereby improving data processing efficiency.
  • Step 203 based on the latest data indicated by the time information, a logical view associated with the data in the first database is generated.
  • the execution subject may generate a logical view associated with the data in the first database in various ways.
  • the execution subject may first save the latest data indicated by the time information in the time sorting result obtained in step 202 .
  • the above-mentioned executive body can use the saved data to create a logical view, so that the file data can be read and queried through SQL (Structured Query Language, Structured Query Language).
  • the above-mentioned executive body may provide the client to query and read data through the above-mentioned logical view.
  • FIG. 3 is a schematic diagram of an application scenario of a method for processing data according to an embodiment of the present disclosure.
  • the server 301 can acquire the parsing result set 302 of the target log file 304 based on parallel processing.
  • the above parsing result set 302 may be generated by the server 303 parsing and parsing the target log file 304 in parallel using multiple threads.
  • the server 301 may sort according to the time information of the data in the first database corresponding to the analysis results in the analysis result set 302 to generate the sorting result 303 .
  • the server 301 can generate a logical view 305 associated with the data in the above-mentioned first database for other devices to read data. fetch and query.
  • one of the existing technologies usually adopts a serial method when processing the Binlog process, and uses an asynchronous message queue to generate subsequent data processing files after Binlog parsing, so as to ensure that the downstream of the relational database Binlog parsing process
  • the sequence and timeliness of data processing lead to the restriction of serial processing in order to ensure the consistency of data in the massive Binlog parsing scenario, which causes the delay of data synchronization.
  • data is sorted according to the time information of the data in the subsequent processing link by opening data parallel processing in the log parsing stage, and then a logical view is generated based on the data with the latest time. "Space for time" realizes the effect of not only improving the processing efficiency of data, but also ensuring the consistency of data.
  • FIG. 4 shows a flow 400 of still another embodiment of a method for processing data.
  • the flow 400 of the method for processing data includes the following steps:
  • Step 401 acquiring a parsing result set of a target log file based on parallel processing.
  • Step 402 sort at least one piece of data according to the time information of the data in the first database corresponding to the analysis results in the analysis result set.
  • Step 403 based on the latest data indicated by the time information, a logical view associated with the data in the first database is generated.
  • step 401, step 402, and step 403 are respectively consistent with step 201, step 202, step 203 and their optional implementations in the aforementioned embodiments, and the above is directed to step 201, step 202, step 203 and their optional implementations
  • step 401, step 402 and step 403 The description of the manner is also applicable to step 401, step 402 and step 403, which will not be repeated here.
  • Step 404 based on the data in the logical view and the time information corresponding to the data, create a temporary data table for the target time period.
  • the execution subject of the method for processing data can create temporary data of the target time period in various ways surface.
  • the above-mentioned target time period usually matches the time information corresponding to the above-mentioned data
  • the data in the above-mentioned temporary data table usually includes the result after last data processing and the result of this incremental processing.
  • the execution subject may periodically create a temporary table according to the data in the logical view generated in step 403 above.
  • the execution subject can use the time window to match the target time period corresponding to the temporary table with the time information corresponding to the data in the temporary table, that is, the time indicated by the time information corresponding to the data in the temporary table usually falls within above target time period.
  • the process 400 of the method for processing data in this embodiment embodies the step of creating a temporary data table for a target time period based on the data in the logical view and the time information corresponding to the data. Therefore, the scheme described in this embodiment can avoid excessive data from affecting the speed of data reading and query through the created temporary table of the target time period. At the same time, since each query is based on the last data processing The result set can improve the query speed of later data and improve the efficiency of use. In the case of frequent data reading and query, the efficiency can be significantly improved.
  • the present disclosure provides an embodiment of a device for processing data, and the device embodiment corresponds to the method embodiment shown in FIG. 2 or FIG. 4 ,
  • the device can be specifically applied to various electronic devices.
  • an apparatus 500 for processing data includes an acquiring unit 501 , a sorting unit 502 and a generating unit 503 .
  • the acquiring unit 501 is configured to acquire the parsing result set of the target log file based on parallel processing, wherein the target log file is used to record the change of the first database; According to the time information of the data in the first database corresponding to the results, at least one piece of data is sorted; the generating unit 503 is configured to generate a logical view associated with the data in the first database based on the latest data indicated by the time information .
  • the specific processing of the acquiring unit 501, the sorting unit 502 and the generating unit 503 and the technical effects brought about by them can refer to the steps 201, 201 and Relevant descriptions of step 202 and step 203 will not be repeated here.
  • the acquisition unit 501 may be further configured to: receive the parsing results of the target log files concurrently written by at least two consumers in the target distributed message queue system; The received parsing result generates a parsing result set.
  • the above parsing results may be respectively written into corresponding files in the preset big data file system according to the extracted message subject.
  • the above sorting unit 502 may be further configured to: generate a preset association relationship between files in the big data file system and preset metadata tables;
  • the data time correlation field in the data table performs data windowing processing, wherein the data time correlation field matches the time information of the data in the first database; and performs time sorting on the data after the windowing processing.
  • the above-mentioned apparatus 500 for processing data may further include: a creation unit (not shown in the figure), configured to , to create a temporary data table for the target time period.
  • a creation unit (not shown in the figure), configured to , to create a temporary data table for the target time period.
  • the above-mentioned target time period may be matched with the time information corresponding to the above-mentioned data.
  • the data in the above-mentioned temporary data table may include the result after the last data processing and the result of this incremental processing.
  • the analysis result set of the log files of the open data parallel processing obtained by the acquisition unit 501 in the log analysis stage sorts the data according to the time information of the data, and then the generating unit 503 based on The most recent data generates a logical view, which not only improves the processing efficiency of data, but also ensures the consistency of data by "trading space for time".
  • the system for processing data may include: an analysis end (such as the server 102 shown in FIG. 1 ), and a data processing end (such as the server 103 shown in FIG. 1 ).
  • the above analysis terminal can be configured to write the analysis result of the obtained target log file into the target file system based on parallel processing, wherein the target log file is used to record the change of the first database.
  • the above-mentioned data processing end may be configured to sort at least one piece of data according to the time information of the data in the first database corresponding to the analysis result; The associated logical view writes the parsed results to the target file system.
  • the parsing end may include: an acquisition unit configured to acquire a log file used to record changes in the first database as a target log file; an parsing unit configured to use at least The two threads parse the target log file to generate a parsing result; the writing unit is configured to write the generated parsing result into the target file system.
  • the parsing unit may be further configured to: use at least two threads to filter statements matching preset filter words in the target log file to generate a filtered target log file; Using at least two threads to analyze the filtered target log file to generate an analysis result.
  • the parsing end may be further configured to: extract the message topic from the parsing result obtained after parsing the target log file; Write concurrently to corresponding files in the preset big data file system.
  • step 601 based on parallel processing, the parsing end writes the parsing result of the acquired target log file into the target file system.
  • the parsing end (for example, the server 102 in FIG. 1 ) may write the parsing result of the obtained target log file into the target file system based on various parallel processing methods.
  • the above-mentioned target log file may be consistent with the description in the foregoing embodiments, and will not be repeated here.
  • the above analysis end may write the analysis result of the obtained target log file into the target file system through the following steps:
  • Step 6011 acquire the log file for recording the change of the first database as the target log file.
  • the above-mentioned analyzing end may obtain a log file for recording changes of the first database from a communication-connected electronic device or locally as a target log file through a wired or wireless connection.
  • Step 6012 utilize at least two threads to analyze the target log file, and generate an analysis result.
  • the analysis end may use at least two threads to analyze the target log file acquired in step 6011 to generate an analysis result.
  • the above parsing end can enable multi-threaded mode for data parsing, thereby modifying the existing sequential file parsing to concurrent file parsing.
  • parsing end may also determine to parse multiple files according to pre-configured parameters.
  • this solution can parse the target log files in parallel on the parsing end, thereby significantly improving the efficiency of log parsing.
  • the above parsing end can generate parsing results through the following steps:
  • Step 60121 use at least two threads to filter the statements matching the preset filter words in the target log file, and generate a filtered target log file.
  • the above-mentioned analyzing end may use the above-mentioned at least two threads to filter the sentences matching the preset filter words in the target log file acquired in step 6011, and generate a filtered target log file.
  • the above parsing end may filter the statements according to the preset filter word settings during the processing of each target log file to be parsed.
  • the aforementioned preset filter words may include but not limited to at least one of the following: INSERT, UPDATE, DELETE, ALERT.
  • this solution can shield unnecessary sentences during the sentence parsing process according to the needs of actual application scenarios, thereby significantly reducing the amount of parsed data and significantly improving the real-time performance of parsed file processing.
  • Step 60122 use at least two threads to analyze the filtered target log file, and generate an analysis result.
  • the above analysis end may use at least two threads to analyze the target log file filtered in the above step 60121 in a corresponding log analysis manner, and generate an analysis result.
  • Step 6013 write the generated parsing result into the target file system.
  • the parsing end may write the parsing result generated in step 6012 into the target file system in various ways.
  • the above parsing end may directly write the generated parsing results into the target file system using multiple threads.
  • the above analysis end may also be a Kafka system with concurrent consumption enabled. Then, the producer (producer) of the above-mentioned Kafka system may first store the generated parsing result in the message queue. Then, multiple consumers (consumers) of the above-mentioned Kafka system can concurrently consume the parsing result writing tasks in the above-mentioned message queue.
  • the above parsing end may write the generated parsing results into the above target file system through the following steps:
  • Step 60131 extract the message topic from the parsed result of the acquired target log file.
  • the above parsing end may extract the message topic from the parsing result after parsing the acquired target log file in various ways.
  • the above-mentioned message subject may be a field included in the above-mentioned parsing result.
  • the above parsing end may also use at least two threads to extract the above message body in parallel.
  • Step 60132 according to the extracted message subject, concurrently write the parsing result to the corresponding file in the preset big data file system.
  • the analysis end may concurrently write the analysis results to corresponding files in the preset big data file system in various ways.
  • different files may be set in the preset big data file system according to different message topics. Therefore, the analysis end can write the analysis results into corresponding files in the preset big data file system according to the message subject extracted in step 60131.
  • the above-mentioned big data file system may be HDFS (Hadoop Distributed File System, Hadoop Distributed File System).
  • step 602 according to the time information of the data in the first database corresponding to the parsing result, the data processing end sorts at least one piece of data.
  • step 603 based on the latest data indicated by the time information, the data processing end generates a logical view associated with the data in the first database.
  • steps 602 and 603 are respectively consistent with steps 201 to 203 and their optional implementations in the foregoing embodiments, and the above descriptions for steps 201 to 203 and their optional implementations are also applicable to steps 602 and 602. Step 603, which will not be repeated here.
  • the parsing end writes the parsing result of the obtained target log file into the target file system, wherein the above-mentioned target log file is used for Record the change of the first database; then, the data processing end sorts at least one piece of data according to the time information of the data in the first database corresponding to the analysis result; finally, based on the latest data indicated by the time information, the data processing end A logical view associated with data in the first database is generated.
  • the parsing end can be used to write the parsing results in parallel to improve processing efficiency; and the data processing end sorts the data in chronological order to generate a logical view to avoid data inconsistency caused by writing data out of order, so as to realize the exchange of space for parallelism Data processing time, improve data processing efficiency.
  • FIG. 7 it shows a schematic structural diagram of an electronic device (such as the server 103 in FIG. 1 ) 700 suitable for implementing embodiments of the present disclosure.
  • the server shown in FIG. 7 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.
  • an electronic device 700 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) Various appropriate actions and processes are executed by programs in the memory (RAM) 703 . In the RAM 703, various programs and data necessary for the operation of the electronic device 700 are also stored.
  • the processing device 701, ROM 702, and RAM 703 are connected to each other through a bus 704.
  • An input/output (I/O) interface 705 is also connected to the bus 704 .
  • the following devices can be connected to the I/O interface 705: an input device 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, etc.; an output device including, for example, a liquid crystal display (LCD, Liquid Crystal Display), a speaker, a vibrator, etc. 707; storage means 708 including eg magnetic tape, hard disk, etc.; and communication means 709.
  • the communication means 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. While FIG. 7 shows electronic device 700 having various means, it should be understood that implementing or having all of the means shown is not a requirement. Additional or fewer devices may alternatively be implemented or provided. Each block shown in FIG. 7 may represent one device, or may represent multiple devices as required.
  • embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, where the computer program includes program codes for executing the methods shown in the flowcharts.
  • the computer program may be downloaded and installed from a network via communication means 709, or from storage means 708, or from ROM 702.
  • the processing device 701 When the computer program is executed by the processing device 701, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
  • the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • a computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable 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 above.
  • a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device .
  • the program code contained on the computer readable medium can be transmitted by any appropriate medium, including but not limited to: electric wire, optical cable, RF (Radio Frequency, radio frequency), etc., or any suitable combination of the above.
  • the above-mentioned computer-readable medium may be included in the above-mentioned server; it may also exist independently without being assembled into the server.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the server, the server: obtains a parsing result set of the target log file based on parallel processing, wherein the target log file is used for Record the change of the first database; sort at least one piece of data according to the time information of the data in the first database corresponding to the analysis results in the analysis result set; generate the latest data corresponding to the first database based on the time information indicated A logical view of data association in
  • Computer program code for carrying out operations of embodiments of the present disclosure may be written in one or more programming languages, or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, Also included are conventional procedural programming languages—such as "C,” the Python language, or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone 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 can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through an Internet service provider). Internet connection).
  • LAN local area network
  • WAN wide area network
  • Internet service provider such as AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.
  • each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure may be implemented by software or by hardware.
  • the described units can also be set in a processor, for example, can be described as: a processor, including an acquisition unit, a sorting unit, and a generation unit.
  • a processor including an acquisition unit, a sorting unit, and a generation unit.
  • the names of these units do not constitute a limitation of the unit itself in some cases.
  • the acquisition unit can also be described as "a unit that acquires the parsing result set of the target log file based on parallel processing, wherein the target log file is used to record changes to the first database".

Abstract

Disclosed in embodiments of the present disclosure are a data processing method and apparatus, and a server and a medium. A specific embodiment of the method comprises: obtaining an analysis result set of a target log file based on parallel processing, wherein the target log file is used for recording changes of a first database; sorting at least one piece of data according to time information of data in the first database corresponding to analysis results in the analysis result set; and generating, on the basis of latest data indicated by the time information, a logical view associated with the data in the first database.

Description

用于处理数据的方法、装置、系统、服务器和介质Method, device, system, server and medium for processing data
相关申请的交叉引用Cross References to Related Applications
本专利申请要求于2021年07月19日提交的、申请号为202110813220.6、发明名称为“用于处理数据的方法、装置、系统、服务器和介质”的中国专利申请的优先权,该申请的全文以引用的方式并入本公开中。This patent application claims the priority of the Chinese patent application with the application number 202110813220.6 and the title of the invention "method, device, system, server and medium for processing data" filed on July 19, 2021. The full text of the application Incorporated by reference into this disclosure.
技术领域technical field
本公开的实施例涉及计算机技术领域,具体涉及用于处理数据的方法、装置、系统、服务器和介质。Embodiments of the present disclosure relate to the field of computer technologies, and in particular to methods, devices, systems, servers and media for processing data.
背景技术Background technique
随着互联网的飞速发展,需要处理的数据规模也越来越大。对于关系型数据库同步到大数据(Big Data)环境中这一技术需求,现有技术提供了一种通过关系型数据库的Binlog(binary log)日志文件进行解析,将解析结果直接写入大数据的文件系统的方法。With the rapid development of the Internet, the scale of data that needs to be processed is also increasing. For the technical requirement of synchronizing the relational database to the big data (Big Data) environment, the existing technology provides a method of analyzing the Binlog (binary log) log file of the relational database and directly writing the analysis result into the big data. method of the file system.
为了在关系型数据库Binlog解析过程中确保下游数据的处理顺序性和时效性,以及为了尽量保证数据的一致性,现有技术在处理Binlog过程时往往采用串行的方法,并且在Binlog解析后均采用异步的消息队列进行后续的数据处理文件生成,导致在海量的Binlog解析场景下会受到串行处理的制约,引起数据同步的延迟。In order to ensure the processing sequence and timeliness of downstream data during the Binlog parsing process of the relational database, and in order to ensure data consistency as much as possible, the prior art often adopts a serial method when processing the Binlog process, and after Binlog parsing, all The use of asynchronous message queues for subsequent data processing file generation will result in the constraints of serial processing in massive Binlog parsing scenarios, causing delays in data synchronization.
发明内容Contents of the invention
本公开的实施例提出了用于处理数据的方法、装置、系统、服务器,介质以及计算机程序产品。Embodiments of the present disclosure propose methods, apparatuses, systems, servers, media and computer program products for processing data.
第一方面,本公开的实施例提供了一种用于处理数据的方法,该方法包括:获取基于并行处理的目标日志文件的解析结果集合,其中,目标日志文件用于记录第一数据库的变更;根据解析结果集合中的解析结果对应的第一数据库中的数据的时间信息,对至少一条数据进行 排序;基于时间信息所指示的时间最近的数据,生成与第一数据库中的数据关联的逻辑视图。In a first aspect, an embodiment of the present disclosure provides a method for processing data, the method comprising: acquiring a parsing result set of a target log file based on parallel processing, wherein the target log file is used to record changes to the first database ; According to the time information of the data in the first database corresponding to the analysis results in the analysis result set, sort at least one piece of data; based on the latest data indicated by the time information, generate logic associated with the data in the first database view.
在一些实施例中,上述获取基于并行处理的目标日志文件的解析结果集合,包括:接收目标分布式消息队列系统中的至少两个消费端并发写入的目标日志文件的解析结果;基于所接收到的解析结果,生成解析结果集合。In some embodiments, the acquisition of the parsing result set of the target log file based on parallel processing includes: receiving the parsing result of the target log file concurrently written by at least two consumers in the target distributed message queuing system; The resulting analysis results are generated to generate a set of analysis results.
在一些实施例中,上述解析结果根据所提取的消息主题分别写入预设的大数据文件系统中相对应的文件。In some embodiments, the above parsing results are respectively written into corresponding files in the preset big data file system according to the extracted message subject.
在一些实施例中,上述根据解析结果集合中的解析结果对应的第一数据库中的数据的时间信息,对至少一条数据进行排序,包括:生成预设的大数据文件系统中的文件与预设元数据表之间的关联关系;根据预设元数据表中的数据时间关联字段进行数据的开窗处理,其中,数据时间关联字段与第一数据库中的数据的时间信息相匹配;对经过开窗处理后的数据进行时间排序。In some embodiments, the above-mentioned sorting of at least one piece of data according to the time information of the data in the first database corresponding to the analysis results in the analysis result set includes: generating files and preset files in the preset big data file system Association relationship between metadata tables; data windowing processing is performed according to the data time association field in the preset metadata table, wherein the data time association field matches the time information of the data in the first database; The data after window processing are sorted by time.
在一些实施例中,该方法还包括:基于逻辑视图中的数据和数据对应的时间信息,创建目标时间段的临时数据表,其中,目标时间段与数据对应的时间信息相匹配,临时数据表中的数据包括上一次数据处理后的结果和本次增量处理结果。In some embodiments, the method further includes: based on the data in the logical view and the time information corresponding to the data, creating a temporary data table of the target time period, wherein the target time period matches the time information corresponding to the data, and the temporary data table The data in includes the results of the last data processing and the results of this incremental processing.
第二方面,本公开的实施例提供了一种用于处理数据的装置,该装置包括:获取单元,被配置成获取基于并行处理的目标日志文件的解析结果集合,其中,目标日志文件用于记录第一数据库的变更;排序单元,被配置成根据解析结果集合中的解析结果对应的第一数据库中的数据的时间信息,对至少一条数据进行排序;生成单元,被配置成基于时间信息所指示的时间最近的数据,生成与第一数据库中的数据关联的逻辑视图。In a second aspect, an embodiment of the present disclosure provides an apparatus for processing data, the apparatus including: an acquisition unit configured to acquire a parsing result set of a target log file based on parallel processing, wherein the target log file is used for Record the change of the first database; the sorting unit is configured to sort at least one piece of data according to the time information of the data in the first database corresponding to the parsing results in the parsing result set; the generating unit is configured to sort at least one piece of data based on the time information Indicates the most recent data, generating a logical view associated with the data in the first database.
在一些实施例中,上述获取单元被进一步配置成:接收目标分布式消息队列系统中的至少两个消费端并发写入的目标日志文件的解析结果;基于所接收到的解析结果,生成解析结果集合。In some embodiments, the acquisition unit is further configured to: receive the parsing results of the target log files concurrently written by at least two consumers in the target distributed message queue system; generate the parsing results based on the received parsing results gather.
在一些实施例中,上述解析结果根据所提取的消息主题分别写入预设的大数据文件系统中相对应的文件。In some embodiments, the above parsing results are respectively written into corresponding files in the preset big data file system according to the extracted message subject.
在一些实施例中,上述排序单元可以被进一步配置成:生成预设的大数据文件系统中的文件与预设元数据表之间的关联关系;根据预设元数据表中的数据时间关联字段进行数据的开窗处理,其中,数据时间关联字段与第一数据库中的数据的时间信息相匹配;对经过开窗处理后的数据进行时间排序。In some embodiments, the above sorting unit may be further configured to: generate a preset association relationship between files in the big data file system and preset metadata tables; associate fields according to data time in preset metadata tables performing data windowing processing, wherein the data time correlation field matches the time information of the data in the first database; performing time sorting on the data after the windowing processing.
在一些实施例中,该装置还包括:创建单元,被配置成基于逻辑视图中的数据和数据对应的时间信息,创建目标时间段的临时数据表,其中,目标时间段与数据对应的时间信息相匹配,临时数据表中的数据包括上一次数据处理后的结果和本次增量处理结果。In some embodiments, the device further includes: a creation unit configured to create a temporary data table of the target time period based on the data in the logical view and the time information corresponding to the data, wherein the target time period and the time information corresponding to the data Matching, the data in the temporary data table includes the result of the last data processing and the result of this incremental processing.
第三方面,本公开实施例提供了一种用于处理数据的系统,该系统包括:解析端,被配置成基于并行处理,将所获取的目标日志文件进行解析后的解析结果写入目标文件系统,其中,目标日志文件用于记录第一数据库的变更;数据处理端,被配置成根据解析结果对应的第一数据库中的数据的时间信息,对至少一条数据进行排序;基于时间信息所指示的时间最近的数据,生成与第一数据库中的数据关联的逻辑视图。In a third aspect, an embodiment of the present disclosure provides a system for processing data, the system includes: an analysis end configured to write the analysis result of the acquired target log file into the target file based on parallel processing The system, wherein the target log file is used to record changes in the first database; the data processing end is configured to sort at least one piece of data according to the time information of the data in the first database corresponding to the analysis result; based on the time information indicated The most recent data in time, generating a logical view associated with the data in the first database.
在一些实施例中,上述解析端包括:获取单元,被配置成获取用于记录第一数据库的变更的日志文件作为目标日志文件;解析单元,被配置成利用至少两个线程对目标日志文件进行解析,生成解析结果;写单元,被配置成将所生成的解析结果写入目标文件系统。In some embodiments, the analysis end includes: an acquisition unit configured to acquire a log file used to record changes in the first database as a target log file; an analysis unit configured to use at least two threads to process the target log file parsing, generating a parsing result; a writing unit configured to write the generated parsing result into a target file system.
在一些实施例中,上述解析单元被进一步配置成:利用至少两个线程对目标日志文件中命中预设过滤词的语句进行过滤,生成过滤后的目标日志文件;利用至少两个线程对过滤后的目标日志文件进行解析,生成解析结果。In some embodiments, the parsing unit is further configured to: use at least two threads to filter statements that hit preset filter words in the target log file to generate a filtered target log file; use at least two threads to filter the target log file The target log file is parsed and the parsing result is generated.
在一些实施例中,上述解析端进一步被配置成:从所获取的目标日志文件进行解析后的解析结果中提取消息主题;根据所提取的消息主题,将解析结果并发写入预设的大数据文件系统中相对应的文件。In some embodiments, the parsing end is further configured to: extract the message subject from the parsed result of the acquired target log file; write the parsing result concurrently to the preset big data The corresponding file in the file system.
第四方面,本公开实施例提供了一种服务器,该服务器包括:一个或多个处理器;存储装置,其上存储有一个或多个程序;当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如第 一方面中任一实现方式描述的方法。In a fourth aspect, an embodiment of the present disclosure provides a server, which includes: 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 executed by a processor, so that one or more processors implement the method described in any implementation manner of the first aspect.
第五方面,本公开实施例提供了一种计算机可读介质,其上存储有计算机程序,该程序被处理器执行时实现如第一方面中任一实现方式描述的方法。In a fifth aspect, an embodiment of the present disclosure provides a computer-readable medium, on which a computer program is stored, and when the program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.
第六方面,本公开实施例提供了一种包括计算机程序的计算机程序产品,该计算机程序在被处理器执行时能够实现如第一方面中任一实现方式描述的方法。In a sixth aspect, the embodiments of the present disclosure provide a computer program product including a computer program. When the computer program is executed by a processor, the method described in any implementation manner in the first aspect can be implemented.
附图说明Description of drawings
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本公开的其它特征、目的和优点将会变得更明显:Other characteristics, objects and advantages of the present disclosure will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
图1是本公开的一个实施例可以应用于其中的示例性系统架构图;FIG. 1 is an exemplary system architecture diagram to which an embodiment of the present disclosure can be applied;
图2是根据本公开的用于处理数据的方法的一个实施例的流程图;Figure 2 is a flowchart of one embodiment of a method for processing data according to the present disclosure;
图3是根据本公开的实施例的用于处理数据的方法的一个应用场景的示意图;FIG. 3 is a schematic diagram of an application scenario of a method for processing data according to an embodiment of the present disclosure;
图4是根据本公开的用于处理数据的方法的又一个实施例的流程图;FIG. 4 is a flowchart of yet another embodiment of a method for processing data according to the present disclosure;
图5是根据本公开的用于处理数据的装置的一个实施例的结构示意图;Fig. 5 is a schematic structural diagram of an embodiment of an apparatus for processing data according to the present disclosure;
图6是根据本公开的用于处理数据的系统的一个实施例中各个设备之间交互的时序图。Fig. 6 is a sequence diagram of interaction between various devices in an embodiment of the system for processing data according to the present disclosure.
图7是适于用来实现本公开的实施例的电子设备的结构示意图。FIG. 7 is a schematic structural diagram of an electronic device suitable for implementing an embodiment of the present disclosure.
具体实施方式detailed description
下面结合附图和实施例对本公开作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。The present disclosure will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain related inventions, rather than to limit the invention. It should also be noted that, for the convenience of description, only the parts related to the related invention are shown in the drawings.
需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本公开。It should be noted that, in the case of no conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and embodiments.
图1示出了可以应用本公开的用于处理数据的方法或用于处理数据的装置的示例性架构100。FIG. 1 shows an exemplary architecture 100 to which the method for processing data or the apparatus for processing data of the present disclosure can be applied.
如图1所示,系统架构100可以包括服务器101、102、103和网络104、105。网络104、105用以分别在服务器101和服务器102之间以及服务器102和服务器103之间提供通信链路的介质。网络104、105可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , the system architecture 100 may include servers 101 , 102 , 103 and networks 104 , 105 . The networks 104 and 105 are used to provide communication link media between the server 101 and the server 102 and between the server 102 and the server 103 respectively. The networks 104, 105 may include various connection types such as wires, wireless communication links, or fiber optic cables, among others.
服务器102可以分别通过网络104、105与服务器101和服务器103交互,以接收或发送消息等。The server 102 can interact with the server 101 and the server 103 through the networks 104, 105, respectively, to receive or send messages and the like.
服务器101、102、103可以是提供各种服务的服务器。作为示例,服务器101可以是数据库服务器。服务器102可以是用于执行日志解析的服务器。服务器103可以是大数据服务器,其可以提供大数据环境下的文件系统服务和计算服务。The servers 101, 102, 103 may be servers that provide various services. As an example, server 101 may be a database server. Server 102 may be a server for performing log parsing. The server 103 may be a big data server, which may provide file system services and computing services in a big data environment.
需要说明的是,服务器可以是硬件,也可以是软件。当服务器为硬件时,可以实现成多个服务器组成的分布式服务器集群,也可以实现成单个服务器。当服务器为软件时,可以实现成多个软件或软件模块(例如用来提供分布式服务的软件或软件模块),也可以实现成单个软件或软件模块。在此不做具体限定。It should be noted that the server may be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software or software modules (such as software or software modules for providing distributed services), or as a single software or software module. No specific limitation is made here.
需要说明的是,本公开的实施例所提供的用于处理数据的方法一般由服务器103执行,相应地,用于处理数据的装置一般设置于服务器103中。It should be noted that the method for processing data provided by the embodiments of the present disclosure is generally executed by the server 103 , and correspondingly, the device for processing data is generally disposed in the server 103 .
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in Fig. 1 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.
本公开的实施例提供的用于处理数据的方法、装置、系统、服务器和介质,通过在日志解析阶段开放数据并行处理,而在后续处理环节中依据数据的时间信息进行数据排序,再基于时间最近的数据生成逻辑视图,从而通过“以空间换时间”实现既提升了数据的处理效率, 又保证了数据的一致性的效果。The method, device, system, server, and medium for processing data provided by the embodiments of the present disclosure open the parallel processing of data in the log parsing stage, and perform data sorting according to the time information of the data in the subsequent processing link, and then based on the time The most recent data generates a logical view, which not only improves the processing efficiency of data, but also ensures the consistency of data by "trading space for time".
继续参考图2,示出了根据本公开的用于处理数据的方法的一个实施例的流程200。该用于处理数据的方法包括以下步骤:Continuing to refer to FIG. 2 , a flow 200 of one embodiment of the method for processing data according to the present disclosure is shown. The method for processing data includes the following steps:
步骤201,获取基于并行处理的目标日志文件的解析结果集合。 Step 201, acquiring a parsing result set of a target log file based on parallel processing.
在本实施例中,用于处理数据的方法的执行主体(如图1所示的服务器103)可以通过有线连接方式或者无线连接方式获取基于并行处理的目标日志文件的解析结果集合。其中,上述目标日志文件可以用于记录第一数据库的变更。上述第一数据库的变更可以包括数据库表的结构变更(例如CREATE、ALTER TABLE等)和数据修改(例如INSERT、UPDATE、DELETE等)中的至少一项。作为示例,上述目标日志文件可以是Binlog文件。In this embodiment, the execution body of the method for processing data (the server 103 shown in FIG. 1 ) can obtain the parsing result set of the target log file based on parallel processing through a wired connection or a wireless connection. Wherein, the above-mentioned target log file may be used to record changes of the first database. The change of the above-mentioned first database may include at least one of structure change (such as CREATE, ALTER TABLE, etc.) and data modification (such as INSERT, UPDATE, DELETE, etc.) of the database table. As an example, the above target log file may be a Binlog file.
在本实施例中,上述执行主体(如图1所示的服务器103)可以获取预先存储于本地的基于并行处理的目标日志文件的解析结果集合,也可以获取与之通信连接的电子设备(例如图1所示的服务器102)发送的基于并行处理的目标日志文件的解析结果集合。In this embodiment, the aforementioned execution subject (server 103 as shown in FIG. 1 ) can obtain the parsing result set of the target log file based on parallel processing that is stored locally in advance, and can also obtain the electronic device (such as The parsing result set of the target log file based on parallel processing sent by the server 102) shown in FIG. 1 .
在本实施例的一些可选的实现方式中,上述执行主体还可以通过以下步骤获取基于并行处理的目标日志文件的解析结果集合:In some optional implementations of this embodiment, the above execution subject may also obtain a parsing result set of the target log file based on parallel processing through the following steps:
第一步,接收目标分布式消息队列系统中的至少两个消费端并发写入的目标日志文件的解析结果。The first step is to receive parsing results of target log files written concurrently by at least two consumers in the target distributed message queuing system.
在这些实现方式中,作为示例,上述目标分布式消息队列系统可以是Kafka。具体地,上述执行主体可以在上述目标分布式消息队列系统中的消费端开启并发消费,从而可以允许至少两个消费端向其中并发写入目标日志文件的解析结果。In these implementation manners, as an example, the above-mentioned target distributed message queue system may be Kafka. Specifically, the execution subject may enable concurrent consumption at the consumer end in the target distributed message queue system, so as to allow at least two consumer ends to concurrently write the parsing results of the target log file thereinto.
基于上述可选的实现方式,本方案可以忽略消费的顺序及重复消费的限制,从而能够最大限度地开启并发处理速度,极大地减轻了解析后消息的积压。Based on the above optional implementation methods, this solution can ignore the order of consumption and the limitation of repeated consumption, so as to maximize the concurrent processing speed and greatly reduce the backlog of parsed messages.
可选地,上述解析结果可以根据所提取的消息主题分别写入预设的大数据文件系统中相对应的文件。Optionally, the above parsing results may be respectively written into corresponding files in the preset big data file system according to the extracted message subject.
在这些实现方式中,上述预设的大数据文件系统中可以按照不同 的消息主题设置有不同的文件。从而,用于写入上述解析结果的执行主体可以根据所提取的消息主题将解析结果分别写入预设的大数据文件系统中相对应的文件。作为示例,上述大数据文件系统可以是HDFS(Hadoop Distributed File System,Hadoop分布式文件系统)。In these implementations, different files can be set according to different message topics in the above preset big data file system. Therefore, the execution subject for writing the above analysis results can write the analysis results into corresponding files in the preset big data file system according to the extracted message subject. As an example, the above-mentioned big data file system may be HDFS (Hadoop Distributed File System, Hadoop Distributed File System).
基于上述可选的实现方式,本方案可以直接获取写入相应文件的解析结果,从而为文件后续的快速写入和加载提供数据基础。Based on the above optional implementation methods, this solution can directly obtain the analysis results written into the corresponding files, thereby providing a data basis for subsequent fast writing and loading of files.
第二步,基于所接收到的解析结果,生成解析结果集合。The second step is to generate a set of analysis results based on the received analysis results.
在这些实现方式中,基于上述第一步所接收到的解析结果,上述执行主体可以通过各种方式生成解析结果集合。作为示例,上述执行主体可以直接将所接收到的多个解析结果形成解析结果集合。In these implementations, based on the analysis results received in the first step above, the execution subject may generate a set of analysis results in various ways. As an example, the execution subject may directly form a plurality of received parsing results into a parsing result set.
步骤202,根据解析结果集合中的解析结果对应的第一数据库中的数据的时间信息,对至少一条数据进行排序。 Step 202, sort at least one piece of data according to the time information of the data in the first database corresponding to the analysis results in the analysis result set.
在本实施例中,根据步骤201所获取的基于并行处理的目标日志文件的解析结果集合中的解析结果对应的第一数据库中的数据的时间信息,上述执行主体可以通过各种方式对至少一条数据进行排序。In this embodiment, according to the time information of the data in the first database corresponding to the analysis results in the analysis result set based on the parallel processing of the target log file obtained in step 201, the above-mentioned execution subject can use various methods for at least one The data is sorted.
在本实施例中,上述执行主体可以直接根据上述步骤201所获取的基于并行处理的目标日志文件的解析结果集合中的解析结果对应的第一数据库中的数据的时间信息所指示的时间先后顺序对上述第一数据库中的数据进行排序。In this embodiment, the execution subject may directly follow the chronological order indicated by the time information of the data in the first database corresponding to the analysis results in the analysis result set of the target log file based on parallel processing acquired in the above step 201 Sort the data in the above-mentioned first database.
在本实施例的一些可选的实现方式中,根据解析结果集合中的解析结果对应的第一数据库中的数据的时间信息,上述执行主体可以通过以下步骤对至少一条数据进行排序:In some optional implementations of this embodiment, according to the time information of the data in the first database corresponding to the analysis results in the analysis result set, the execution subject may sort at least one piece of data through the following steps:
第一步,生成预设的大数据文件系统中的文件与预设元数据表之间的关联关系。The first step is to generate the association relationship between the files in the preset big data file system and the preset metadata table.
在这些实现方式中,上述执行主体可以通过各种方式生成上述预设的大数据文件系统中的文件与预设元数据表之间的关联关系。作为示例,上述执行主体可以通过hive(一种基于Hadoop的数据仓库工具)的元数据管理创建文件与预设元数据表之间的关联关系。In these implementations, the execution subject may generate the association relationship between the files in the preset big data file system and the preset metadata table in various ways. As an example, the above execution subject may create an association relationship between a file and a preset metadata table through metadata management of hive (a Hadoop-based data warehouse tool).
第二步,根据预设元数据表中的数据时间关联字段进行数据的开窗处理。The second step is to perform data windowing processing according to the data time correlation field in the preset metadata table.
在这些实现方式中,根据预设元数据表中的数据时间关联字段,上述执行主体可以通过各种方式进行数据的开窗处理。其中,上述数据时间关联字段通常与上述第一数据库中的数据的时间信息相匹配。作为示例,上述执行主体可以根据上述预设元数据表的主键(例如数据的id)进行数据的开窗处理。其中,上述数据的id可以是上述数据时间关联字段(例如modified_date)。In these implementations, according to the data time association field in the preset metadata table, the execution subject may perform data windowing processing in various ways. Wherein, the above-mentioned data time association field usually matches the time information of the data in the above-mentioned first database. As an example, the execution subject may perform data windowing processing according to the primary key of the preset metadata table (for example, the id of the data). Wherein, the id of the above data may be the time associated field of the above data (eg modified_date).
第三步,对经过开窗处理后的数据进行时间排序。The third step is to perform time sorting on the data after windowing processing.
在这些实现方式中,上述执行主体可以通过各种方式对经过上述第二步开窗处理后的数据进行时间排序。作为示例,上述执行主体可以通过函数row_number()over(partition by id order by modified_date desc)进行数据的时间排序,从而可以得到按照数据的时间顺序进行排列的数据结果。In these implementation manners, the execution subject may perform time sorting on the data after the second step of windowing processing in various ways. As an example, the above execution subject can use the function row_number()over(partition by id order by modified_date desc) to sort the data by time, so as to obtain the data results arranged according to the time order of the data.
基于上述可选的实现方式,本方案可以基于预设的大数据文件系统各种的文件与表之间的关联关系和数据的开窗处理对数据进行时间排序,由于将排序转移至预设的大数据文件系统中进行处理,避免了在数据写入时强制顺序写入而带来的串行瓶颈,从而提升了数据处理效率。Based on the above optional implementation, this solution can sort the data based on the preset relationship between various files and tables in the big data file system and the windowing process of the data, because the sorting is transferred to the preset Processing in the big data file system avoids serial bottlenecks caused by forced sequential writing when data is written, thereby improving data processing efficiency.
步骤203,基于时间信息所指示的时间最近的数据,生成与第一数据库中的数据关联的逻辑视图。 Step 203, based on the latest data indicated by the time information, a logical view associated with the data in the first database is generated.
在本实施例中,基于步骤202时间信息所指示的时间最近的数据,上述执行主体可以通过各种方式生成与上述第一数据库中的数据关联的逻辑视图。作为示例,上述执行主体可以首先将步骤202所得到的时间排序结果中时间信息所指示的时间最近的数据进行保存。而后,上述执行主体可以利用所保存的数据创建逻辑视图,从而可以通过SQL(Structured Query Language,结构化查询语言)进行文件数据的读取和查询。In this embodiment, based on the latest data indicated by the time information in step 202, the execution subject may generate a logical view associated with the data in the first database in various ways. As an example, the execution subject may first save the latest data indicated by the time information in the time sorting result obtained in step 202 . Then, the above-mentioned executive body can use the saved data to create a logical view, so that the file data can be read and queried through SQL (Structured Query Language, Structured Query Language).
在本实施例中,上述执行主体可以通过上述逻辑视图供用户端进行数据查询和读取。In this embodiment, the above-mentioned executive body may provide the client to query and read data through the above-mentioned logical view.
继续参见图3,图3是根据本公开的实施例的用于处理数据的方 法的应用场景的一个示意图。在图3的应用场景中,服务器301可以获取基于并行处理的目标日志文件304的解析结果集合302。可选地,上述解析结果集合302可以由服务器303利用多线程对目标日志文件304并行解析生成。而后,服务器301可以根据上述解析结果集合302中的解析结果对应的第一数据库中的数据的时间信息进行排序,生成排序结果303。接下来,基于时间信息所指示的时间最近的数据(例如图中所示“数据x”),服务器301可以生成与上述第一数据库中的数据关联的逻辑视图305,以供其他设备进行数据读取和查询。Continuing to refer to FIG. 3 , FIG. 3 is a schematic diagram of an application scenario of a method for processing data according to an embodiment of the present disclosure. In the application scenario of FIG. 3 , the server 301 can acquire the parsing result set 302 of the target log file 304 based on parallel processing. Optionally, the above parsing result set 302 may be generated by the server 303 parsing and parsing the target log file 304 in parallel using multiple threads. Then, the server 301 may sort according to the time information of the data in the first database corresponding to the analysis results in the analysis result set 302 to generate the sorting result 303 . Next, based on the latest data indicated by the time information (such as "data x" shown in the figure), the server 301 can generate a logical view 305 associated with the data in the above-mentioned first database for other devices to read data. fetch and query.
目前,现有技术之一通常是在处理Binlog过程时采用串行的方法,并且在Binlog解析后均采用异步的消息队列进行后续的数据处理文件生成,从而保证在关系型数据库Binlog解析过程中下游数据处理的顺序性和时效性,导致在海量的Binlog解析场景下,为了保证数据的一致性而受到串行处理的制约,从而引起数据同步的延迟。而本公开的上述实施例提供的方法,通过在日志解析阶段开放数据并行处理,而在后续处理环节中依据数据的时间信息进行数据排序,再基于时间最近的数据生成逻辑视图,从而通过“以空间换时间”实现既提升了数据的处理效率,又保证了数据的一致性的效果。At present, one of the existing technologies usually adopts a serial method when processing the Binlog process, and uses an asynchronous message queue to generate subsequent data processing files after Binlog parsing, so as to ensure that the downstream of the relational database Binlog parsing process The sequence and timeliness of data processing lead to the restriction of serial processing in order to ensure the consistency of data in the massive Binlog parsing scenario, which causes the delay of data synchronization. However, in the method provided by the above-mentioned embodiments of the present disclosure, data is sorted according to the time information of the data in the subsequent processing link by opening data parallel processing in the log parsing stage, and then a logical view is generated based on the data with the latest time. "Space for time" realizes the effect of not only improving the processing efficiency of data, but also ensuring the consistency of data.
进一步参考图4,其示出了用于处理数据的方法的又一个实施例的流程400。该用于处理数据的方法的流程400,包括以下步骤:Further referring to FIG. 4 , it shows a flow 400 of still another embodiment of a method for processing data. The flow 400 of the method for processing data includes the following steps:
步骤401,获取基于并行处理的目标日志文件的解析结果集合。 Step 401 , acquiring a parsing result set of a target log file based on parallel processing.
步骤402,根据解析结果集合中的解析结果对应的第一数据库中的数据的时间信息,对至少一条数据进行排序。Step 402: sort at least one piece of data according to the time information of the data in the first database corresponding to the analysis results in the analysis result set.
步骤403,基于时间信息所指示的时间最近的数据,生成与第一数据库中的数据关联的逻辑视图。 Step 403, based on the latest data indicated by the time information, a logical view associated with the data in the first database is generated.
上述步骤401、步骤402、步骤403分别与前述实施例中的步骤201、步骤202、步骤203及其可选的实现方式一致,上文针对步骤201、步骤202、步骤203及其可选的实现方式的描述也适用于步骤401、步骤402和步骤403,此处不再赘述。The above step 401, step 402, and step 403 are respectively consistent with step 201, step 202, step 203 and their optional implementations in the aforementioned embodiments, and the above is directed to step 201, step 202, step 203 and their optional implementations The description of the manner is also applicable to step 401, step 402 and step 403, which will not be repeated here.
步骤404,基于逻辑视图中的数据和数据对应的时间信息,创建 目标时间段的临时数据表。 Step 404, based on the data in the logical view and the time information corresponding to the data, create a temporary data table for the target time period.
在本实施例中,基于逻辑视图中的数据和数据对应的时间信息,用于处理数据的方法的执行主体(例如图1所示的服务器103)可以通过各种方式创建目标时间段的临时数据表。其中,上述目标时间段通常与上述数据对应的时间信息相匹配,上述临时数据表中的数据通常包括上一次数据处理后的结果和本次增量处理结果。In this embodiment, based on the data in the logical view and the time information corresponding to the data, the execution subject of the method for processing data (such as the server 103 shown in FIG. 1 ) can create temporary data of the target time period in various ways surface. Wherein, the above-mentioned target time period usually matches the time information corresponding to the above-mentioned data, and the data in the above-mentioned temporary data table usually includes the result after last data processing and the result of this incremental processing.
在本实施例中,作为示例,上述执行主体可以根据上述步骤403中所生成的逻辑视图中的数据定期创建临时表。其中,上述执行主体可以通过时间窗口来使得上述临时表对应的目标时间段与临时表中的数据对应的时间信息相匹配,即上述临时表中的数据对应的时间信息所指示的时间通常落入上述目标时间段。In this embodiment, as an example, the execution subject may periodically create a temporary table according to the data in the logical view generated in step 403 above. Wherein, the execution subject can use the time window to match the target time period corresponding to the temporary table with the time information corresponding to the data in the temporary table, that is, the time indicated by the time information corresponding to the data in the temporary table usually falls within above target time period.
从图4中可以看出,本实施例中的用于处理数据的方法的流程400体现了基于逻辑视图中的数据和数据对应的时间信息,创建目标时间段的临时数据表的步骤。由此,本实施例描述的方案可以通过所创建的目标时间段的临时表来避免过多的数据导致影响数据的读取和查询速度,同时,由于每一次查询都是基于上一次数据处理后的结果集合,可以提升后期数据的查询速度提升使用效率,在数据频繁读取和查询的情况下可以显著提升效率。It can be seen from FIG. 4 that the process 400 of the method for processing data in this embodiment embodies the step of creating a temporary data table for a target time period based on the data in the logical view and the time information corresponding to the data. Therefore, the scheme described in this embodiment can avoid excessive data from affecting the speed of data reading and query through the created temporary table of the target time period. At the same time, since each query is based on the last data processing The result set can improve the query speed of later data and improve the efficiency of use. In the case of frequent data reading and query, the efficiency can be significantly improved.
进一步参考图5,作为对上述各图所示方法的实现,本公开提供了用于处理数据的装置的一个实施例,该装置实施例与图2或图4所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。Further referring to FIG. 5 , as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for processing data, and the device embodiment corresponds to the method embodiment shown in FIG. 2 or FIG. 4 , The device can be specifically applied to various electronic devices.
如图5所示,本实施例提供的用于处理数据的装置500包括获取单元501、排序单元502和生成单元503。其中,获取单元501,被配置成获取基于并行处理的目标日志文件的解析结果集合,其中,目标日志文件用于记录第一数据库的变更;排序单元502,被配置成根据解析结果集合中的解析结果对应的第一数据库中的数据的时间信息,对至少一条数据进行排序;生成单元503,被配置成基于时间信息所指示的时间最近的数据,生成与第一数据库中的数据关联的逻辑视图。As shown in FIG. 5 , an apparatus 500 for processing data provided in this embodiment includes an acquiring unit 501 , a sorting unit 502 and a generating unit 503 . Wherein, the acquiring unit 501 is configured to acquire the parsing result set of the target log file based on parallel processing, wherein the target log file is used to record the change of the first database; According to the time information of the data in the first database corresponding to the results, at least one piece of data is sorted; the generating unit 503 is configured to generate a logical view associated with the data in the first database based on the latest data indicated by the time information .
在本实施例中,用于处理数据的装置500中:获取单元501、排 序单元502和生成单元503的具体处理及其所带来的技术效果可分别参考图2对应实施例中的步骤201、步骤202和步骤203的相关说明,在此不再赘述。In this embodiment, in the device 500 for processing data: the specific processing of the acquiring unit 501, the sorting unit 502 and the generating unit 503 and the technical effects brought about by them can refer to the steps 201, 201 and Relevant descriptions of step 202 and step 203 will not be repeated here.
在本实施例的一些可选的实现方式中,上述获取单元501可以被进一步配置成:接收目标分布式消息队列系统中的至少两个消费端并发写入的目标日志文件的解析结果;基于所接收到的解析结果,生成解析结果集合。In some optional implementations of this embodiment, the acquisition unit 501 may be further configured to: receive the parsing results of the target log files concurrently written by at least two consumers in the target distributed message queue system; The received parsing result generates a parsing result set.
在本实施例的一些可选的实现方式中,上述解析结果可以根据所提取的消息主题分别写入预设的大数据文件系统中相对应的文件。In some optional implementation manners of this embodiment, the above parsing results may be respectively written into corresponding files in the preset big data file system according to the extracted message subject.
在本实施例的一些可选的实现方式中,上述排序单元502可以被进一步配置成:生成预设的大数据文件系统中的文件与预设元数据表之间的关联关系;根据预设元数据表中的数据时间关联字段进行数据的开窗处理,其中,数据时间关联字段与第一数据库中的数据的时间信息相匹配;对经过开窗处理后的数据进行时间排序。In some optional implementations of this embodiment, the above sorting unit 502 may be further configured to: generate a preset association relationship between files in the big data file system and preset metadata tables; The data time correlation field in the data table performs data windowing processing, wherein the data time correlation field matches the time information of the data in the first database; and performs time sorting on the data after the windowing processing.
在本实施例的一些可选的实现方式中,上述用于处理数据的装置500还可以包括:创建单元(图中未示出),被配置成基于逻辑视图中的数据和数据对应的时间信息,创建目标时间段的临时数据表。其中,上述目标时间段可以与上述数据对应的时间信息相匹配。上述临时数据表中的数据可以包括上一次数据处理后的结果和本次增量处理结果。In some optional implementations of this embodiment, the above-mentioned apparatus 500 for processing data may further include: a creation unit (not shown in the figure), configured to , to create a temporary data table for the target time period. Wherein, the above-mentioned target time period may be matched with the time information corresponding to the above-mentioned data. The data in the above-mentioned temporary data table may include the result after the last data processing and the result of this incremental processing.
本公开的上述实施例提供的装置,通过获取单元501获取的在日志解析阶段开放数据并行处理的日志文件的解析结果集合,排序单元502依据数据的时间信息进行数据排序,再通过生成单元503基于时间最近的数据生成逻辑视图,从而通过“以空间换时间”实现既提升了数据的处理效率,又保证了数据的一致性的效果。In the device provided by the above-mentioned embodiments of the present disclosure, the analysis result set of the log files of the open data parallel processing obtained by the acquisition unit 501 in the log analysis stage, the sorting unit 502 sorts the data according to the time information of the data, and then the generating unit 503 based on The most recent data generates a logical view, which not only improves the processing efficiency of data, but also ensures the consistency of data by "trading space for time".
进一步参考图6,其示出了用于处理数据的系统的一个实施例中各个设备之间交互的时序600。该用于处理数据的系统可以包括:解析端(例如图1所示的服务器102),数据处理端(例如图1所示的服务器103)。其中,上述解析端,可以被配置成基于并行处理,将所获 取的目标日志文件进行解析后的解析结果写入目标文件系统,其中,目标日志文件用于记录第一数据库的变更。上述数据处理端,可以被配置成根据解析结果对应的第一数据库中的数据的时间信息,对至少一条数据进行排序;基于时间信息所指示的时间最近的数据,生成与第一数据库中的数据关联的逻辑视图写入目标文件系统的解析结果。Further referring to FIG. 6 , it shows a sequence 600 of interaction between various devices in one embodiment of the system for processing data. The system for processing data may include: an analysis end (such as the server 102 shown in FIG. 1 ), and a data processing end (such as the server 103 shown in FIG. 1 ). Wherein, the above analysis terminal can be configured to write the analysis result of the obtained target log file into the target file system based on parallel processing, wherein the target log file is used to record the change of the first database. The above-mentioned data processing end may be configured to sort at least one piece of data according to the time information of the data in the first database corresponding to the analysis result; The associated logical view writes the parsed results to the target file system.
在本实施例的一些可选的实现方式中,上述解析端可以包括:获取单元,被配置成获取用于记录第一数据库的变更的日志文件作为目标日志文件;解析单元,被配置成利用至少两个线程对目标日志文件进行解析,生成解析结果;写单元,被配置成将所生成的解析结果写入目标文件系统。In some optional implementations of this embodiment, the parsing end may include: an acquisition unit configured to acquire a log file used to record changes in the first database as a target log file; an parsing unit configured to use at least The two threads parse the target log file to generate a parsing result; the writing unit is configured to write the generated parsing result into the target file system.
在本实施例的一些可选的实现方式中,上述解析单元可以被进一步配置成:利用至少两个线程对目标日志文件中命中预设过滤词的语句进行过滤,生成过滤后的目标日志文件;利用至少两个线程对过滤后的目标日志文件进行解析,生成解析结果。In some optional implementations of this embodiment, the parsing unit may be further configured to: use at least two threads to filter statements matching preset filter words in the target log file to generate a filtered target log file; Using at least two threads to analyze the filtered target log file to generate an analysis result.
在本实施例的一些可选的实现方式中,上述解析端可以进一步被配置成:从所获取的目标日志文件进行解析后的解析结果中提取消息主题;根据所提取的消息主题,将解析结果并发写入预设的大数据文件系统中相对应的文件。In some optional implementations of this embodiment, the parsing end may be further configured to: extract the message topic from the parsing result obtained after parsing the target log file; Write concurrently to corresponding files in the preset big data file system.
如图6所示,在步骤601中,解析端基于并行处理,将所获取的目标日志文件进行解析后的解析结果写入目标文件系统。As shown in FIG. 6 , in step 601 , based on parallel processing, the parsing end writes the parsing result of the acquired target log file into the target file system.
在本实施例中,解析端(例如图1中的服务器102)可以基于各种并行处理方式将所获取的目标日志文件进行解析后的解析结果写入目标文件系统。其中,上述目标日志文件可以与前述实施例中的描述一致,此处不再赘述。In this embodiment, the parsing end (for example, the server 102 in FIG. 1 ) may write the parsing result of the obtained target log file into the target file system based on various parallel processing methods. Wherein, the above-mentioned target log file may be consistent with the description in the foregoing embodiments, and will not be repeated here.
在本实施例的一些可选的实现方式中,上述解析端可以通过以下步骤将所获取的目标日志文件进行解析后的解析结果写入目标文件系统:In some optional implementations of this embodiment, the above analysis end may write the analysis result of the obtained target log file into the target file system through the following steps:
步骤6011,获取用于记录第一数据库的变更的日志文件作为目标日志文件。Step 6011, acquire the log file for recording the change of the first database as the target log file.
在这些实现方式中,上述解析端可以通过有线或无线连接的方式 从通信连接的电子设备或本地获取用于记录第一数据库的变更的日志文件作为目标日志文件。In these implementation manners, the above-mentioned analyzing end may obtain a log file for recording changes of the first database from a communication-connected electronic device or locally as a target log file through a wired or wireless connection.
步骤6012,利用至少两个线程对目标日志文件进行解析,生成解析结果。Step 6012, utilize at least two threads to analyze the target log file, and generate an analysis result.
在这些实现方式中,上述解析端可以利用至少两个线程对上述步骤6011所获取的目标日志文件进行解析,生成解析结果。作为示例,上述解析端可以开启多线程模式进行数据解析,从而由现有的顺序文件解析修改为并发文件解析。In these implementation manners, the analysis end may use at least two threads to analyze the target log file acquired in step 6011 to generate an analysis result. As an example, the above parsing end can enable multi-threaded mode for data parsing, thereby modifying the existing sequential file parsing to concurrent file parsing.
需要说明的是,上述解析端还可以根据预先配置的参数来确定对多个文件进行解析处理。It should be noted that the above parsing end may also determine to parse multiple files according to pre-configured parameters.
基于上述可选的实现方式,本方案可以在解析端并行解析目标日志文件,从而显著提升日志解析效率。Based on the above optional implementation methods, this solution can parse the target log files in parallel on the parsing end, thereby significantly improving the efficiency of log parsing.
可选地,上述解析端可以通过以下步骤生成解析结果:Optionally, the above parsing end can generate parsing results through the following steps:
步骤60121,利用至少两个线程对目标日志文件中命中预设过滤词的语句进行过滤,生成过滤后的目标日志文件。Step 60121, use at least two threads to filter the statements matching the preset filter words in the target log file, and generate a filtered target log file.
在这些实现方式中,上述解析端可以利用上述至少两个线程对上述步骤6011所获取的目标日志文件中命中预设过滤词的语句进行过滤,生成过滤后的目标日志文件。作为示例,上述解析端可以在上述所要解析的每个目标日志文件处理过程中根据预设过滤词的设置对语句进行过滤。其中,上述预设过滤词可以包括但不限于以下至少一项:INSERT,UPDATE,DELETE,ALERT。In these implementations, the above-mentioned analyzing end may use the above-mentioned at least two threads to filter the sentences matching the preset filter words in the target log file acquired in step 6011, and generate a filtered target log file. As an example, the above parsing end may filter the statements according to the preset filter word settings during the processing of each target log file to be parsed. Wherein, the aforementioned preset filter words may include but not limited to at least one of the following: INSERT, UPDATE, DELETE, ALERT.
基于上述可选的实现方式,本方案可以根据实际应用场景的需要在语句解析过程中对不必要的语句进行屏蔽,从而可以显著减少解析的数据量,进而可以明显提升解析文件处理的实时性。Based on the above optional implementation methods, this solution can shield unnecessary sentences during the sentence parsing process according to the needs of actual application scenarios, thereby significantly reducing the amount of parsed data and significantly improving the real-time performance of parsed file processing.
步骤60122,利用至少两个线程对过滤后的目标日志文件进行解析,生成解析结果。Step 60122, use at least two threads to analyze the filtered target log file, and generate an analysis result.
在这些实现方式中,上述解析端可以利用至少两个线程,采用相应的日志解析方式对上述步骤60121过滤后的目标日志文件进行解析,生成解析结果。In these implementation manners, the above analysis end may use at least two threads to analyze the target log file filtered in the above step 60121 in a corresponding log analysis manner, and generate an analysis result.
步骤6013,将所生成的解析结果写入目标文件系统。Step 6013, write the generated parsing result into the target file system.
在这些实现方式中,解析端可以通过各种方式将步骤6012所生成的解析结果写入目标文件系统。作为示例,上述解析端可以直接将所生成的解析结果利用多个线程写入目标文件系统。作为又一示例,上述解析端还可以是开启了并发消费的Kafka系统。那么,上述Kafka系统的生产者(producer)可以首先将上述所生成的解析结果存入消息队列。而后,上述Kafka系统的多个消费者(consumer)可以并发消费上述消息队列中的解析结果写入任务。In these implementation manners, the parsing end may write the parsing result generated in step 6012 into the target file system in various ways. As an example, the above parsing end may directly write the generated parsing results into the target file system using multiple threads. As another example, the above analysis end may also be a Kafka system with concurrent consumption enabled. Then, the producer (producer) of the above-mentioned Kafka system may first store the generated parsing result in the message queue. Then, multiple consumers (consumers) of the above-mentioned Kafka system can concurrently consume the parsing result writing tasks in the above-mentioned message queue.
在本实施例的一些可选的实现方式中,上述解析端可以通过以下步骤将所生成的解析结果写入上述目标文件系统:In some optional implementations of this embodiment, the above parsing end may write the generated parsing results into the above target file system through the following steps:
步骤60131,从所获取的目标日志文件进行解析后的解析结果中提取消息主题。Step 60131, extract the message topic from the parsed result of the acquired target log file.
在这些实现方式中,上述解析端可以通过各种方式从所获取的目标日志文件进行解析后的解析结果中提取消息主题。其中,上述消息主题可以是包含于上述解析结果的字段。上述解析端也可以利用至少两个线程并行提取上述消息主体。In these implementation manners, the above parsing end may extract the message topic from the parsing result after parsing the acquired target log file in various ways. Wherein, the above-mentioned message subject may be a field included in the above-mentioned parsing result. The above parsing end may also use at least two threads to extract the above message body in parallel.
步骤60132,根据所提取的消息主题,将解析结果并发写入预设的大数据文件系统中相对应的文件。Step 60132, according to the extracted message subject, concurrently write the parsing result to the corresponding file in the preset big data file system.
在这些实现方式中,根据所提取的消息主题,上述解析端可以通过各种方式将解析结果并发写入预设的大数据文件系统中相对应的文件。其中,上述预设的大数据文件系统中可以按照不同的消息主题设置有不同的文件。从而,上述解析端可以根据步骤60131所提取的消息主题将解析结果分别写入预设的大数据文件系统中相对应的文件。作为示例,上述大数据文件系统可以是HDFS(Hadoop Distributed File System,Hadoop分布式文件系统)。In these implementations, according to the extracted message subject, the analysis end may concurrently write the analysis results to corresponding files in the preset big data file system in various ways. Wherein, different files may be set in the preset big data file system according to different message topics. Therefore, the analysis end can write the analysis results into corresponding files in the preset big data file system according to the message subject extracted in step 60131. As an example, the above-mentioned big data file system may be HDFS (Hadoop Distributed File System, Hadoop Distributed File System).
在步骤602中,根据解析结果对应的第一数据库中的数据的时间信息,数据处理端对至少一条数据进行排序。In step 602, according to the time information of the data in the first database corresponding to the parsing result, the data processing end sorts at least one piece of data.
在步骤603中,基于时间信息所指示的时间最近的数据,数据处理端生成与第一数据库中的数据关联的逻辑视图。In step 603, based on the latest data indicated by the time information, the data processing end generates a logical view associated with the data in the first database.
上述步骤602和步骤603分别与前述实施例中的步骤201至步骤203及其可选的实现方式一致,上文针对步骤201至步骤203及其可 选的实现方式的描述也适用于步骤602和步骤603,此处不再赘述。The above-mentioned steps 602 and 603 are respectively consistent with steps 201 to 203 and their optional implementations in the foregoing embodiments, and the above descriptions for steps 201 to 203 and their optional implementations are also applicable to steps 602 and 602. Step 603, which will not be repeated here.
本公开的上述实施例提供的用于处理数据的系统,首先,基于并行处理,解析端将所获取的目标日志文件进行解析后的解析结果写入目标文件系统,其中,上述目标日志文件用于记录第一数据库的变更;而后,数据处理端根据解析结果对应的第一数据库中的数据的时间信息,对至少一条数据进行排序;最后,基于时间信息所指示的时间最近的数据,数据处理端生成与第一数据库中的数据关联的逻辑视图。从而可以利用解析端并行写入解析结果,提升处理效率;并且通过数据处理端对数据按照时间顺序进行排序进而生成逻辑视图来避免因无序写入数据造成的数据不一致,从而实现以空间换取并行数据处理的时间,提升数据处理效率。In the system for processing data provided by the above-mentioned embodiments of the present disclosure, firstly, based on parallel processing, the parsing end writes the parsing result of the obtained target log file into the target file system, wherein the above-mentioned target log file is used for Record the change of the first database; then, the data processing end sorts at least one piece of data according to the time information of the data in the first database corresponding to the analysis result; finally, based on the latest data indicated by the time information, the data processing end A logical view associated with data in the first database is generated. In this way, the parsing end can be used to write the parsing results in parallel to improve processing efficiency; and the data processing end sorts the data in chronological order to generate a logical view to avoid data inconsistency caused by writing data out of order, so as to realize the exchange of space for parallelism Data processing time, improve data processing efficiency.
下面参考图7,其示出了适于用来实现本公开的实施例的电子设备(例如图1中的服务器103)700的结构示意图。图7示出的服务器仅仅是一个示例,不应对本公开的实施例的功能和使用范围带来任何限制。Referring now to FIG. 7 , it shows a schematic structural diagram of an electronic device (such as the server 103 in FIG. 1 ) 700 suitable for implementing embodiments of the present disclosure. The server shown in FIG. 7 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.
如图7所示,电子设备700可以包括处理装置(例如中央处理器、图形处理器等)701,其可以根据存储在只读存储器(ROM)702中的程序或者从存储装置708加载到随机访问存储器(RAM)703中的程序而执行各种适当的动作和处理。在RAM 703中,还存储有电子设备700操作所需的各种程序和数据。处理装置701、ROM 702以及RAM703通过总线704彼此相连。输入/输出(I/O)接口705也连接至总线704。As shown in FIG. 7 , an electronic device 700 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) Various appropriate actions and processes are executed by programs in the memory (RAM) 703 . In the RAM 703, various programs and data necessary for the operation of the electronic device 700 are also stored. The processing device 701, ROM 702, and RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to the bus 704 .
通常,以下装置可以连接至I/O接口705:包括例如触摸屏、触摸板、键盘、鼠标、等的输入装置706;包括例如液晶显示器(LCD,Liquid Crystal Display)、扬声器、振动器等的输出装置707;包括例如磁带、硬盘等的存储装置708;以及通信装置709。通信装置709可以允许电子设备700与其他设备进行无线或有线通信以交换数据。虽然图7示出了具有各种装置的电子设备700,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的 装置。图7中示出的每个方框可以代表一个装置,也可以根据需要代表多个装置。Generally, the following devices can be connected to the I/O interface 705: an input device 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, etc.; an output device including, for example, a liquid crystal display (LCD, Liquid Crystal Display), a speaker, a vibrator, etc. 707; storage means 708 including eg magnetic tape, hard disk, etc.; and communication means 709. The communication means 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. While FIG. 7 shows electronic device 700 having various means, it should be understood that implementing or having all of the means shown is not a requirement. Additional or fewer devices may alternatively be implemented or provided. Each block shown in FIG. 7 may represent one device, or may represent multiple devices as required.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置709从网络上被下载和安装,或者从存储装置708被安装,或者从ROM 702被安装。在该计算机程序被处理装置701执行时,执行本公开的实施例的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, where the computer program includes program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 709, or from storage means 708, or from ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
需要说明的是,本公开的实施例所述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开的实施例中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开的实施例中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(Radio Frequency,射频)等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable 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 above. In the embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the embodiments of the present disclosure, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device . The program code contained on the computer readable medium can be transmitted by any appropriate medium, including but not limited to: electric wire, optical cable, RF (Radio Frequency, radio frequency), etc., or any suitable combination of the above.
上述计算机可读介质可以是上述服务器中所包含的;也可以是单 独存在,而未装配入该服务器中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该服务器执行时,使得该服务器:获取基于并行处理的目标日志文件的解析结果集合,其中,目标日志文件用于记录第一数据库的变更;根据解析结果集合中的解析结果对应的第一数据库中的数据的时间信息,对至少一条数据进行排序;基于时间信息所指示的时间最近的数据,生成与第一数据库中的数据关联的逻辑视图The above-mentioned computer-readable medium may be included in the above-mentioned server; it may also exist independently without being assembled into the server. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the server, the server: obtains a parsing result set of the target log file based on parallel processing, wherein the target log file is used for Record the change of the first database; sort at least one piece of data according to the time information of the data in the first database corresponding to the analysis results in the analysis result set; generate the latest data corresponding to the first database based on the time information indicated A logical view of data association in
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的实施例的操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”、Python语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out operations of embodiments of the present disclosure may be written in one or more programming languages, or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, Also included are conventional procedural programming languages—such as "C," the Python language, or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through an Internet service provider). Internet connection).
附图中的流程图和框图,图示了按照本公开的各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
描述于本公开的实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理 器中,例如,可以描述为:一种处理器,包括获取单元、排序单元、生成单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,获取单元还可以被描述为“获取基于并行处理的目标日志文件的解析结果集合的单元,其中,目标日志文件用于记录第一数据库的变更”。The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The described units can also be set in a processor, for example, can be described as: a processor, including an acquisition unit, a sorting unit, and a generation unit. Among them, the names of these units do not constitute a limitation of the unit itself in some cases. For example, the acquisition unit can also be described as "a unit that acquires the parsing result set of the target log file based on parallel processing, wherein the target log file is used to record changes to the first database".
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开的实施例中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开的实施例中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present disclosure and an illustration of the applied technical principle. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, but also covers the above-mentioned invention without departing from the above-mentioned inventive concept. Other technical solutions formed by any combination of technical features or equivalent features. For example, a technical solution formed by replacing the above-mentioned features with technical features having similar functions disclosed in (but not limited to) the embodiments of the present disclosure.

Claims (13)

  1. 一种用于处理数据的方法,包括:A method for processing data comprising:
    获取基于并行处理的目标日志文件的解析结果集合,其中,所述目标日志文件用于记录第一数据库的变更;Acquiring a parsing result set of a target log file based on parallel processing, wherein the target log file is used to record changes of the first database;
    根据所述解析结果集合中的解析结果对应的所述第一数据库中的数据的时间信息,对至少一条数据进行排序;Sorting at least one piece of data according to the time information of the data in the first database corresponding to the analysis results in the analysis result set;
    基于时间信息所指示的时间最近的数据,生成与所述第一数据库中的数据关联的逻辑视图。Based on the latest data indicated by the time information, a logical view associated with the data in the first database is generated.
  2. 根据权利要求1所述的方法,其中,所述获取基于并行处理的目标日志文件的解析结果集合,包括:The method according to claim 1, wherein said obtaining the analysis result set of the target log file based on parallel processing comprises:
    接收目标分布式消息队列系统中的至少两个消费端并发写入的所述目标日志文件的解析结果;receiving parsing results of the target log file written concurrently by at least two consumers in the target distributed message queuing system;
    基于所接收到的解析结果,生成所述解析结果集合。Based on the received analysis results, the analysis result set is generated.
  3. 根据权利要求2所述的方法,其中,所述解析结果根据所提取的消息主题分别写入预设的大数据文件系统中相对应的文件。The method according to claim 2, wherein the parsing results are respectively written into corresponding files in the preset big data file system according to the extracted message topics.
  4. 根据权利要求3所述的方法,其中,所述根据所述解析结果集合中的解析结果对应的所述第一数据库中的数据的时间信息,对至少一条数据进行排序,包括:The method according to claim 3, wherein said sorting at least one piece of data according to the time information of the data in the first database corresponding to the analysis results in the analysis result set includes:
    生成所述预设的大数据文件系统中的文件与预设元数据表之间的关联关系;Generate the association relationship between the files in the preset big data file system and the preset metadata table;
    根据所述预设元数据表中的数据时间关联字段进行数据的开窗处理,其中,所述数据时间关联字段与所述第一数据库中的数据的时间信息相匹配;performing data windowing processing according to the data time correlation field in the preset metadata table, wherein the data time correlation field matches the time information of the data in the first database;
    对经过所述开窗处理后的数据进行时间排序。Perform time sorting on the data after the windowing processing.
  5. 根据权利要求1-4之一所述的方法,其中,所述方法还包括:The method according to any one of claims 1-4, wherein the method further comprises:
    基于所述逻辑视图中的数据和数据对应的时间信息,创建目标时间段的临时数据表,其中,所述目标时间段与所述数据对应的时间信息相匹配,所述临时数据表中的数据包括上一次数据处理后的结果和本次增量处理结果。Based on the data in the logical view and the time information corresponding to the data, create a temporary data table for the target time period, wherein the target time period matches the time information corresponding to the data, and the data in the temporary data table Including the results after the last data processing and the results of this incremental processing.
  6. 一种用于处理数据的装置,包括:A device for processing data, comprising:
    获取单元,被配置成获取基于并行处理的目标日志文件的解析结果集合,其中,所述目标日志文件用于记录第一数据库的变更;An acquisition unit configured to acquire a parsing result set based on a parallel processing target log file, wherein the target log file is used to record changes of the first database;
    排序单元,被配置成根据所述解析结果集合中的解析结果对应的所述第一数据库中的数据的时间信息,对至少一条数据进行排序;The sorting unit is configured to sort at least one piece of data according to the time information of the data in the first database corresponding to the parsing results in the parsing result set;
    生成单元,被配置成基于时间信息所指示的时间最近的数据,生成与所述第一数据库中的数据关联的逻辑视图。A generating unit configured to generate a logical view associated with the data in the first database based on the latest data indicated by the time information.
  7. 一种用于处理数据的系统,包括:A system for processing data comprising:
    解析端,被配置成基于并行处理,将所获取的目标日志文件进行解析后的解析结果写入目标文件系统,其中,所述目标日志文件用于记录第一数据库的变更;The parsing end is configured to write the parsing result of the obtained target log file into the target file system based on parallel processing, wherein the target log file is used to record changes of the first database;
    数据处理端,被配置成根据所述解析结果对应的所述第一数据库中的数据的时间信息,对至少一条数据进行排序;基于时间信息所指示的时间最近的数据,生成与所述第一数据库中的数据关联的逻辑视图。The data processing end is configured to sort at least one piece of data according to the time information of the data in the first database corresponding to the parsing result; A logical view of data associations in a database.
  8. 根据权利要求7所述的系统,其中,所述解析端包括:The system according to claim 7, wherein the analysis end comprises:
    获取单元,被配置成获取用于记录第一数据库的变更的日志文件作为目标日志文件;an acquisition unit configured to acquire a log file for recording changes of the first database as a target log file;
    解析单元,被配置成利用至少两个线程对所述目标日志文件进行解析,生成解析结果;The analysis unit is configured to use at least two threads to analyze the target log file and generate an analysis result;
    写单元,被配置成将所生成的解析结果写入所述目标文件系统。The writing unit is configured to write the generated parsing result into the target file system.
  9. 根据权利要求8所述的系统,其中,所述解析单元被进一步配 置成:The system according to claim 8, wherein the parsing unit is further configured to:
    利用所述至少两个线程对所述目标日志文件中命中预设过滤词的语句进行过滤,生成过滤后的目标日志文件;Utilize the at least two threads to filter the statements that hit the preset filter word in the target log file, and generate the filtered target log file;
    利用所述至少两个线程对过滤后的目标日志文件进行解析,生成解析结果。Utilize the at least two threads to analyze the filtered target log file to generate an analysis result.
  10. 根据权利要求7所述的系统,其中,所述解析端进一步被配置成:The system according to claim 7, wherein the parsing end is further configured to:
    从所获取的目标日志文件进行解析后的解析结果中提取消息主题;Extracting the message topic from the parsing result after parsing the acquired target log file;
    根据所提取的消息主题,将所述解析结果并发写入预设的大数据文件系统中相对应的文件。According to the extracted message subject, the parsing result is concurrently written to a corresponding file in the preset big data file system.
  11. 一种服务器,包括:A server comprising:
    一个或多个处理器;one or more processors;
    存储装置,其上存储有一个或多个程序;a storage device having one or more programs stored thereon;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现权利要求1-5中任一所述的方法。When the one or more programs are executed by the one or more processors, the one or more processors are made to implement the method in any one of claims 1-5.
  12. 一种计算机可读介质,其上存储有计算机程序,其中,该程序被处理器执行时实现权利要求1-5中任一所述的方法。A computer-readable medium, on which a computer program is stored, wherein, when the program is executed by a processor, the method according to any one of claims 1-5 is realized.
  13. 一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现根据权利要求1-5中任一项所述的方法。A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-5.
PCT/CN2022/092645 2021-07-19 2022-05-13 Data processing method, device and system, and server and medium WO2023000785A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110813220.6 2021-07-19
CN202110813220.6A CN113468196B (en) 2021-07-19 2021-07-19 Method, apparatus, system, server and medium for processing data

Publications (1)

Publication Number Publication Date
WO2023000785A1 true WO2023000785A1 (en) 2023-01-26

Family

ID=77881004

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/092645 WO2023000785A1 (en) 2021-07-19 2022-05-13 Data processing method, device and system, and server and medium

Country Status (2)

Country Link
CN (1) CN113468196B (en)
WO (1) WO2023000785A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113468196B (en) * 2021-07-19 2024-04-05 京东科技控股股份有限公司 Method, apparatus, system, server and medium for processing data
CN117033464B (en) * 2023-08-11 2024-04-02 上海鼎茂信息技术有限公司 Log parallel analysis algorithm based on clustering and application

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150310044A1 (en) * 2014-02-03 2015-10-29 Codefutures Corporation Database device and processing of data in a database
US20180307715A1 (en) * 2017-04-20 2018-10-25 Servicenow, Inc. Index suggestion engine for relational databases
CN112256656A (en) * 2019-07-22 2021-01-22 中兴通讯股份有限公司 Transaction rollback method and device, database, system and computer storage medium
CN112860697A (en) * 2021-02-10 2021-05-28 中国工商银行股份有限公司 Distributed database table structure changing method, device and system
CN113468196A (en) * 2021-07-19 2021-10-01 京东科技控股股份有限公司 Method, apparatus, system, server and medium for processing data

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101866305B (en) * 2010-05-21 2013-03-06 武汉大学 Continuous data protection method and system supporting data inquiry and quick recovery
CN109271450B (en) * 2018-10-10 2020-12-04 北京百度网讯科技有限公司 Database synchronization method, device, server and storage medium
CN109522316B (en) * 2018-11-02 2020-09-29 东软集团股份有限公司 Log processing method, device, equipment and storage medium
CN111258975B (en) * 2020-04-26 2021-03-02 中国人民解放军总医院 Method, apparatus, device and medium for locating abnormality in image archiving communication system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150310044A1 (en) * 2014-02-03 2015-10-29 Codefutures Corporation Database device and processing of data in a database
US20180307715A1 (en) * 2017-04-20 2018-10-25 Servicenow, Inc. Index suggestion engine for relational databases
CN112256656A (en) * 2019-07-22 2021-01-22 中兴通讯股份有限公司 Transaction rollback method and device, database, system and computer storage medium
CN112860697A (en) * 2021-02-10 2021-05-28 中国工商银行股份有限公司 Distributed database table structure changing method, device and system
CN113468196A (en) * 2021-07-19 2021-10-01 京东科技控股股份有限公司 Method, apparatus, system, server and medium for processing data

Also Published As

Publication number Publication date
CN113468196A (en) 2021-10-01
CN113468196B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
CN109189835B (en) Method and device for generating data wide table in real time
WO2023000785A1 (en) Data processing method, device and system, and server and medium
US9336288B2 (en) Workflow controller compatibility
CN110807067B (en) Data synchronization method, device and equipment for relational database and data warehouse
CN110647579A (en) Data synchronization method and device, computer equipment and readable medium
US11681651B1 (en) Lineage data for data records
CN109522341B (en) Method, device and equipment for realizing SQL-based streaming data processing engine
CN107256206B (en) Method and device for converting character stream format
US11200231B2 (en) Remote query optimization in multi data sources
US20180129712A1 (en) Data provenance and data pedigree tracking
CN110781197B (en) Hive offline synchronous verification method and device and electronic equipment
CN113282611B (en) Method, device, computer equipment and storage medium for synchronizing stream data
CN112948486A (en) Batch data synchronization method and system and electronic equipment
CN112988741A (en) Real-time service data merging method and device and electronic equipment
CN110196835A (en) The processing method of metadata, the processing unit of metadata and electronic equipment
CN110245334B (en) Method and device for outputting information
US10872085B2 (en) Recording lineage in query optimization
CN116361522A (en) Data display method and device
CN115809311A (en) Data processing method and device of knowledge graph and computer equipment
CN110879818B (en) Method, device, medium and electronic equipment for acquiring data
Benbrahim et al. Comparison between Hadoop and Spark
CN108228644A (en) For method and device derived from report
CN112307061A (en) Method and device for querying data
Srivastava Learning Elasticsearch 7. x: Index, Analyze, Search and Aggregate Your Data Using Elasticsearch (English Edition)
CN111143464A (en) Data acquisition method and device and electronic equipment

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: 22844952

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE