[go: up one dir, main page]

CN110007967B - A data processing method, device and device based on streaming framework - Google Patents

A data processing method, device and device based on streaming framework Download PDF

Info

Publication number
CN110007967B
CN110007967B CN201711470644.7A CN201711470644A CN110007967B CN 110007967 B CN110007967 B CN 110007967B CN 201711470644 A CN201711470644 A CN 201711470644A CN 110007967 B CN110007967 B CN 110007967B
Authority
CN
China
Prior art keywords
analysis unit
output
analysis
data
processed
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201711470644.7A
Other languages
Chinese (zh)
Other versions
CN110007967A (en
Inventor
周胜凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Gaohang Technology Transfer Co ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201711470644.7A priority Critical patent/CN110007967B/en
Publication of CN110007967A publication Critical patent/CN110007967A/en
Application granted granted Critical
Publication of CN110007967B publication Critical patent/CN110007967B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides a data processing method, a device and equipment based on a streaming framework, wherein the method comprises the following steps: acquiring task parameters corresponding to data to be processed; determining an analysis unit for processing the data to be processed and an analysis sequence of the analysis unit according to the task parameters; loading the determined analysis unit; connecting each loaded analysis unit according to the analysis sequence to obtain an analysis unit combination; inputting the data to be processed into the analysis unit combination, and analyzing the data to be processed by utilizing the thread contained in each analysis unit; and acquiring a processing result according to the output content of the analysis unit combination. Therefore, in the scheme, after the task parameters are obtained, the analysis unit is loaded, the analysis unit does not continuously run in a process mode, and after the analysis unit is loaded, the data is analyzed by using the threads contained in the analysis unit.

Description

一种基于流式框架的数据处理方法、装置及设备A data processing method, device and device based on streaming framework

技术领域technical field

本发明涉及数据处理技术领域,特别是涉及一种基于流式框架的数据处理方法、装置及设备。The present invention relates to the technical field of data processing, and in particular, to a data processing method, device and device based on a streaming framework.

背景技术Background technique

在一些数据处理量较大的场景中,通常应用流式框架进行数据处理。流式框架如Storm,在实时分析、在线机器学习、持续计算、分布式远程调用等各种场景中,都可以应用Storm进行数据处理。In some scenarios with a large amount of data processing, the streaming framework is usually used for data processing. Streaming frameworks such as Storm can be used for data processing in various scenarios such as real-time analysis, online machine learning, continuous computing, and distributed remote calls.

但是应用Storm进行数据处理过程中,各分析单元均以进程的方式持续运行,占用大量资源。However, in the process of data processing using Storm, each analysis unit runs continuously as a process, occupying a lot of resources.

发明内容SUMMARY OF THE INVENTION

本发明实施例的目的在于提供一种基于流式框架的数据处理方法、装置及设备,以减少资源占用率。The purpose of the embodiments of the present invention is to provide a data processing method, apparatus and device based on a streaming framework, so as to reduce the resource occupancy rate.

为达到上述目的,本发明实施例提供了一种基于流式框架的数据处理方法,包括:To achieve the above purpose, an embodiment of the present invention provides a data processing method based on a streaming framework, including:

获取待处理数据对应的任务参数;Get the task parameters corresponding to the data to be processed;

根据所述任务参数,确定对所述待处理数据进行处理的分析单元、以及所述分析单元的分析顺序;其中,每个分析单元包含一个独立的线程;According to the task parameter, determine the analysis unit that processes the data to be processed, and the analysis sequence of the analysis unit; wherein, each analysis unit includes an independent thread;

对所确定的分析单元进行加载;并按照所述分析顺序,将所加载的每个分析单元进行连接,得到分析单元组合;Loading the determined analysis units; and according to the analysis sequence, connecting each of the loaded analysis units to obtain an analysis unit combination;

获取所述待处理数据,并将所述待处理数据输入所述分析单元组合,利用所述分析单元组合中每个分析单元包含的线程,对所述待处理数据进行分析;Acquire the data to be processed, input the data to be processed into the combination of analysis units, and analyze the data to be processed by using a thread included in each analysis unit in the combination of analysis units;

根据所述分析单元组合的输出内容,获取处理结果。According to the output content of the combination of the analysis units, the processing result is acquired.

可选的,所述获取待处理数据对应的任务参数,可以包括:Optionally, the obtaining task parameters corresponding to the data to be processed may include:

获取待处理数据对应的第一配置文件;obtaining the first configuration file corresponding to the data to be processed;

所述根据所述任务参数,确定对所述待处理数据进行处理的分析单元、以及所述分析单元的分析顺序,可以包括:The determining, according to the task parameters, an analysis unit that processes the data to be processed and an analysis sequence of the analysis unit may include:

根据所述第一配置文件中包含的分析单元的标识及标识顺序,确定对所述待处理数据进行处理的分析单元、以及所述分析单元的分析顺序。According to the identification and identification sequence of the analysis units contained in the first configuration file, the analysis units that process the data to be processed and the analysis sequence of the analysis units are determined.

可选的,在获取所述待处理数据之后,还可以包括:针对所述待处理数据,生成预设结构的结构体对象;Optionally, after acquiring the data to be processed, it may further include: generating a structure object with a preset structure for the data to be processed;

所述将所述待处理数据输入所述分析单元组合,利用所述分析单元组合中每个分析单元包含的线程,对所述待处理数据进行分析,包括:The inputting the data to be processed into the combination of analysis units, and using the thread included in each analysis unit in the combination of analysis units to analyze the data to be processed, including:

将所述结构体对象输入所述分析单元组合中的第一个分析单元,利用所述第一个分析单元包含的线程,对所述结构体对象进行分析,得到分析结果,将分析结果添加至所述结构体对象,得到所述第一个分析单元的输出对象;Input the structure object into the first analysis unit in the combination of analysis units, use the thread included in the first analysis unit to analyze the structure object, obtain the analysis result, and add the analysis result to the structure object to obtain the output object of the first analysis unit;

按照所述分析顺序,依次将所述第一个分析单元之后的每个分析单元确定为当前分析单元;将当前分析单元的上一个分析单元的输出对象输入当前分析单元,利用当前分析单元包含的线程,对所述上一个分析单元的输出对象进行分析,得到分析结果,将分析结果添加至所述上一个分析单元的输出对象,得到当前分析单元的输出对象;According to the analysis sequence, successively determine each analysis unit after the first analysis unit as the current analysis unit; input the output object of the previous analysis unit of the current analysis unit into the current analysis unit, and use the The thread, analyzes the output object of the last analysis unit, obtains the analysis result, adds the analysis result to the output object of the last analysis unit, and obtains the output object of the current analysis unit;

所述根据所述分析单元组合的输出内容,获取处理结果,可以包括:The obtaining a processing result according to the output content combined by the analysis unit may include:

根据所述分析单元组合中最后一个分析单元的输出对象,获取处理结果。The processing result is acquired according to the output object of the last analysis unit in the combination of analysis units.

可选的,在所述得到所述第一个分析单元的输出对象之后,还可以包括:Optionally, after obtaining the output object of the first analysis unit, it may further include:

将所述第一个分析单元的输出对象添加至所述第一个分析单元的输出队列中;adding the output object of the first analysis unit to the output queue of the first analysis unit;

所述将当前分析单元的上一个分析单元的输出对象输入当前分析单元,包括:The inputting the output object of the previous analysis unit of the current analysis unit into the current analysis unit includes:

从当前分析单元的输入队列中,按照预设队列顺序,依次读取所述上一个分析单元的输出对象;From the input queue of the current analysis unit, according to the preset queue sequence, sequentially read the output objects of the previous analysis unit;

在所述得到当前分析单元的输出对象之后,还包括:After obtaining the output object of the current analysis unit, the method further includes:

将当前单元的输出对象添加至当前分析单元的输出队列中。Adds the output object of the current unit to the output queue of the current analysis unit.

可选的,所述根据所述分析单元组合中最后一个分析单元的输出对象,获取处理结果,可以包括:Optionally, obtaining the processing result according to the output object of the last analysis unit in the combination of analysis units may include:

判断所述分析单元组合中最后一个分析单元的输出对象是否满足输出条件;Judging whether the output object of the last analysis unit in the combination of analysis units satisfies the output condition;

如果满足,从所述最后一个分析单元的输出对象中获取处理结果;If satisfied, obtain the processing result from the output object of the last analysis unit;

如果不满足,返回执行将所述结构体对象输入所述分析单元组合中的第一个分析单元的步骤。If not satisfied, return to the step of inputting the structure object into the first analysis unit in the combination of analysis units.

可选的,在获取所述待处理数据之前,还可以包括:获取待处理数据对应的第二配置文件;Optionally, before acquiring the data to be processed, it may further include: acquiring a second configuration file corresponding to the data to be processed;

读取所述第二配置文件中包含的交互配件库的标识,对所读取的标识对应的交互配件库存进行加载,所述交互配件库中包括输入接口、输出接口、组装配件和检测配件;reading the identifier of the interactive accessory library contained in the second configuration file, and loading the interactive accessory inventory corresponding to the read identifier, where the interactive accessory library includes an input interface, an output interface, an assembly accessory and a detection accessory;

在获取所述待处理数据之后,还可以包括:After acquiring the data to be processed, it may further include:

调用所述输入接口,将所述待处理数据输入至所述交互配件库;calling the input interface, and inputting the data to be processed into the interactive accessory library;

所述针对所述待处理数据,生成预设结构的结构体对象,可以包括:The generating a structure object with a preset structure for the data to be processed may include:

利用所述组装配件,将所述待处理数据进行组装,生成预设结构的结构体对象;Using the assembly accessories, the data to be processed is assembled to generate a structure object with a preset structure;

所述判断所述分析单元组合中最后一个分析单元的输出对象是否满足输出条件,可以包括:The judging whether the output object of the last analysis unit in the analysis unit combination satisfies the output condition may include:

调用所述检测配件,对所述分析单元组合中最后一个分析单元的输出对象进行检测,判断检测结果是否满足输出条件;Invoke the detection accessory to detect the output object of the last analysis unit in the analysis unit combination, and determine whether the detection result satisfies the output condition;

从所述最后一个分析单元的输出对象中获取处理结果之后,还可以包括:After obtaining the processing result from the output object of the last analysis unit, it may further include:

调用所述输出接口,输出所述处理结果。The output interface is called to output the processing result.

可选的,所述交互配件库中还包括删除配件,在调用所述输出接口,输出所述处理结果之后,还可以包括:Optionally, the interactive accessory library further includes deleting accessories, and after calling the output interface and outputting the processing result, it may further include:

调用所述删除配件,删除所述最后一个分析单元的输出对象。The delete accessory is called to delete the output object of the last analysis unit.

可选的,在根据所述分析单元组合的输出内容,获取处理结果之后,还可以包括:卸载所述分析单元组合中的分析单元。Optionally, after obtaining the processing result according to the output content of the combination of analysis units, the method may further include: uninstalling the analysis units in the combination of analysis units.

为达到上述目的,本发明实施例还提供了一种基于流式框架的数据处理装置,包括:In order to achieve the above purpose, an embodiment of the present invention also provides a data processing device based on a streaming framework, including:

第一获取模块,用于获取待处理数据对应的任务参数;a first obtaining module, used for obtaining task parameters corresponding to the data to be processed;

确定模块,用于根据所述任务参数,确定对所述待处理数据进行处理的分析单元、以及所述分析单元的分析顺序;其中,每个分析单元包含一个独立的线程;a determination module, configured to determine an analysis unit for processing the data to be processed and an analysis sequence of the analysis unit according to the task parameter; wherein each analysis unit includes an independent thread;

第一加载模块,用于对所确定的分析单元进行加载;a first loading module for loading the determined analysis unit;

连接模块,用于按照所述分析顺序,将所加载的每个分析单元进行连接,得到分析单元组合;a connection module, configured to connect each of the loaded analysis units according to the analysis sequence to obtain a combination of analysis units;

第二获取模块,用于获取所述待处理数据;a second acquisition module, configured to acquire the data to be processed;

分析模块,用于将所述待处理数据输入所述分析单元组合,利用所述分析单元组合中每个分析单元包含的线程,对所述待处理数据进行分析;an analysis module, configured to input the data to be processed into the combination of analysis units, and analyze the data to be processed by using a thread included in each analysis unit in the combination of analysis units;

第三获取模块,用于根据所述分析单元组合的输出内容,获取处理结果。The third obtaining module is configured to obtain the processing result according to the output content of the combination of the analysis units.

可选的,所述第一获取模块,具体可以用于:获取待处理数据对应的第一配置文件;Optionally, the first obtaining module may be specifically configured to: obtain a first configuration file corresponding to the data to be processed;

所述确定模块,具体可以用于:The determining module can be specifically used for:

根据所述第一配置文件中包含的分析单元的标识及标识顺序,确定对所述待处理数据进行处理的分析单元、以及所述分析单元的分析顺序。According to the identification and identification sequence of the analysis units contained in the first configuration file, the analysis units that process the data to be processed and the analysis sequence of the analysis units are determined.

可选的,所述装置还可以包括:Optionally, the device may also include:

生成模块,用于针对所述待处理数据,生成预设结构的结构体对象;a generating module, for generating a structure object with a preset structure for the data to be processed;

所述分析模块,具体可以用于:The analysis module can be specifically used for:

将所述结构体对象输入所述分析单元组合中的第一个分析单元,利用所述第一个分析单元包含的线程,对所述结构体对象进行分析,得到分析结果,将分析结果添加至所述结构体对象,得到所述第一个分析单元的输出对象;Input the structure object into the first analysis unit in the combination of analysis units, use the thread included in the first analysis unit to analyze the structure object, obtain the analysis result, and add the analysis result to the structure object to obtain the output object of the first analysis unit;

按照所述分析顺序,依次将所述第一个分析单元之后的每个分析单元确定为当前分析单元;将当前分析单元的上一个分析单元的输出对象输入当前分析单元,利用当前分析单元包含的线程,对所述上一个分析单元的输出对象进行分析,得到分析结果,将分析结果添加至所述上一个分析单元的输出对象,得到当前分析单元的输出对象;According to the analysis sequence, successively determine each analysis unit after the first analysis unit as the current analysis unit; input the output object of the previous analysis unit of the current analysis unit into the current analysis unit, and use the The thread, analyzes the output object of the last analysis unit, obtains the analysis result, adds the analysis result to the output object of the last analysis unit, and obtains the output object of the current analysis unit;

所述第三获取模块,具体可以用于:The third acquisition module can be specifically used for:

根据所述分析单元组合中最后一个分析单元的输出对象,获取处理结果。The processing result is acquired according to the output object of the last analysis unit in the combination of analysis units.

可选的,所述装置还可以包括:第一添加模块和第二添加模块,其中,Optionally, the device may further include: a first adding module and a second adding module, wherein,

第一添加模块,用于将所述第一个分析单元的输出对象添加至所述第一个分析单元的输出队列中;a first adding module, configured to add the output object of the first analysis unit to the output queue of the first analysis unit;

所述分析模块,还用于从当前分析单元的输入队列中,按照预设队列顺序,依次读取所述上一个分析单元的输出对象;The analysis module is further configured to sequentially read the output objects of the previous analysis unit from the input queue of the current analysis unit according to a preset queue sequence;

第二添加模块,用于在所述得到当前分析单元的输出对象之后,将当前单元的输出对象添加至当前分析单元的输出队列中。The second adding module is configured to add the output object of the current unit to the output queue of the current analysis unit after the output object of the current analysis unit is obtained.

可选的,所述装置还可以包括:Optionally, the device may also include:

判断模块,用于判断所述分析单元组合中最后一个分析单元的输出对象是否满足输出条件;如果满足,触发所述第三获取模块;如果不满足,触发所述分析模块;a judgment module for judging whether the output object of the last analysis unit in the combination of analysis units satisfies the output condition; if so, triggers the third acquisition module; if not, triggers the analysis module;

所述第三获取模块,具体可以用于:从所述最后一个分析单元的输出对象中获取处理结果。The third obtaining module may be specifically configured to: obtain the processing result from the output object of the last analysis unit.

可选的,所述装置还包括:第四获取模块、第二加载模块、输入模块和输出模块,其中,Optionally, the device further includes: a fourth acquisition module, a second loading module, an input module and an output module, wherein,

第四获取模块,用于获取待处理数据对应的第二配置文件;a fourth obtaining module, configured to obtain a second configuration file corresponding to the data to be processed;

第二加载模块,用于读取所述第二配置文件中包含的交互配件库的标识,对所读取的标识对应的交互配件库存进行加载,所述交互配件库中包括输入接口、输出接口、组装配件和检测配件;The second loading module is configured to read the identifier of the interactive accessory library contained in the second configuration file, and load the interactive accessory inventory corresponding to the read identifier, and the interactive accessory library includes an input interface and an output interface. , assembly accessories and testing accessories;

输入模块,用于调用所述输入接口,将所述待处理数据输入至所述交互配件库;an input module, configured to call the input interface and input the data to be processed into the interactive accessory library;

所述生成模块,具体可以用于:利用所述组装配件,将所述待处理数据进行组装,生成预设结构的结构体对象;The generating module may be specifically configured to: assemble the data to be processed by using the assembly accessories to generate a structure object with a preset structure;

所述判断模块,具体可以用于:The judging module can be specifically used for:

调用所述检测配件,对所述分析单元组合中最后一个分析单元的输出对象进行检测,判断检测结果是否满足输出条件;Invoke the detection accessory to detect the output object of the last analysis unit in the analysis unit combination, and determine whether the detection result satisfies the output condition;

输出模块,用于从所述最后一个分析单元的输出对象中获取处理结果之后,调用所述输出接口,输出所述处理结果。The output module is configured to call the output interface to output the processing result after obtaining the processing result from the output object of the last analysis unit.

可选的,所述交互配件库中还包括删除配件,所述装置还可以包括:Optionally, the interactive accessory library further includes deleting accessories, and the device may further include:

删除模块,用于调用所述删除配件,删除所述最后一个分析单元的输出对象。The deletion module is used for calling the deletion accessory to delete the output object of the last analysis unit.

可选的,所述装置还可以包括:Optionally, the device may also include:

卸载模块,用于在根据所述分析单元组合的输出内容,获取处理结果之后,卸载所述分析单元组合中的分析单元。The unloading module is configured to unload the analysis units in the analysis unit combination after acquiring the processing result according to the output content of the analysis unit combination.

为达到上述目的,本发明实施例还提供了一种电子设备,包括处理器和存储器;To achieve the above object, an embodiment of the present invention also provides an electronic device, including a processor and a memory;

存储器,用于存放计算机程序;memory for storing computer programs;

处理器,用于执行存储器上所存放的程序时,实现上述任一种基于流式框架的数据处理方法。The processor is configured to implement any one of the above data processing methods based on the streaming framework when executing the program stored in the memory.

应用本发明实施例,获取到任务参数后,再加载分析单元,分析单元并不是以进程的方式持续运行,而且加载分析单元后,利用分析单元包含的线程对数据进行分析,相比于分析单元以进程方式持续运行的方案,减少了资源占用率。Applying the embodiment of the present invention, after the task parameters are acquired, the analysis unit is loaded again. The analysis unit does not run continuously as a process, and after the analysis unit is loaded, the thread included in the analysis unit is used to analyze the data. Compared with the analysis unit The solution that runs continuously in a process mode reduces the resource occupancy rate.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.

图1为本发明实施例提供的基于流式框架的数据处理方法的第一种流程示意图;1 is a first schematic flowchart of a data processing method based on a streaming framework provided by an embodiment of the present invention;

图2为本发明实施例提供的基于流式框架的数据处理方法的第二种流程示意图;2 is a second schematic flowchart of a data processing method based on a streaming framework provided by an embodiment of the present invention;

图3为本发明实施例提供的一种流式处理框架示意图;FIG. 3 is a schematic diagram of a streaming processing framework provided by an embodiment of the present invention;

图4为本发明实施例提供的一种分析单元与管道连接示意图;4 is a schematic diagram of the connection between an analysis unit and a pipeline according to an embodiment of the present invention;

图5为本发明实施例提供的另一种流式处理框架示意图;FIG. 5 is a schematic diagram of another streaming processing framework provided by an embodiment of the present invention;

图6为本发明实施例提供的一种基于流式框架的数据处理装置的结构示意图;6 is a schematic structural diagram of a data processing apparatus based on a streaming framework provided by an embodiment of the present invention;

图7为本发明实施例提供的一种电子设备的结构示意图。FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

为了解决上述技术问题,本发明实施例提供了一种基于流式框架的数据处理方法、装置及电子设备。该方法及装置可以应用于各种电子设备,具体不做限定。In order to solve the above technical problems, embodiments of the present invention provide a data processing method, apparatus and electronic device based on a streaming framework. The method and apparatus can be applied to various electronic devices, which are not specifically limited.

下面首先对本发明实施例提供的一种基于流式框架的数据处理方法进行详细说明。The following first describes in detail a data processing method based on a streaming framework provided by an embodiment of the present invention.

图1为本发明实施例提供的基于流式框架的数据处理方法的第一种流程示意图,包括:1 is a first schematic flowchart of a data processing method based on a streaming framework provided by an embodiment of the present invention, including:

S101:获取待处理数据对应的任务参数。S101: Acquire task parameters corresponding to the data to be processed.

举例来说,待处理数据可以为一段视频、一张图像等等,具体不做限定。需要说明的是,S101中并不获取待处理数据,而是获取待处理数据对应的任务参数。For example, the data to be processed may be a video, an image, etc., which is not specifically limited. It should be noted that, in S101, the data to be processed is not acquired, but the task parameters corresponding to the data to be processed are acquired.

作为一种实施方式,S101可以包括:获取待处理数据对应的第一配置文件。为了与下面内容中的配置文件相区分,将S101中获取的配置文件称为第一配置文件。第一配置文件中可以包含分析单元的标识及标识顺序,该分析单元的标识及标识顺序即属于任务参数。或者,任务参数也可以包含一个数值,预先设定数值与分析单元标识及标识顺序的对应关系。任务参数的具体内容不做限定。As an implementation manner, S101 may include: acquiring a first configuration file corresponding to the data to be processed. In order to distinguish it from the configuration file in the following content, the configuration file obtained in S101 is referred to as the first configuration file. The first configuration file may include the identification and identification sequence of the analysis unit, and the identification and identification sequence of the analysis unit belong to the task parameters. Alternatively, the task parameter may also include a numerical value, and the corresponding relationship between the numerical value and the identification of the analysis unit and the identification sequence is preset. The specific content of the task parameters is not limited.

S102:根据该任务参数,确定对该待处理数据进行处理的分析单元、以及该分析单元的分析顺序。其中,每个分析单元包含一个独立的线程。S102: Determine an analysis unit that processes the data to be processed and an analysis sequence of the analysis unit according to the task parameter. Among them, each analysis unit contains an independent thread.

如上所述,可以得到分析单元标识及标识顺序,该标识即为对该待处理数据进行处理的分析单元的标识,分析单元的标识可以为序号、ID等等,具体不做限定,该标识顺序即为针对该份待处理数据进行处理的各分析单元的处理顺序。As mentioned above, the analysis unit identification and the identification sequence can be obtained, and the identification is the identification of the analysis unit that processes the data to be processed. The identification of the analysis unit can be a serial number, an ID, etc. That is, the processing sequence of each analysis unit that processes the data to be processed.

以待处理数据为视频为例来说,可以对视频进行解码、人员目标检测、提取人脸特征、提取人员衣物特征等多个处理步骤,每个处理步骤可以对应一个分析单元。这些处理步骤之间存在先后顺序,相应的,对待处理数据进行处理的分析单元之间也存在分析顺序。而对于不同的待处理数据来说,对其进行处理的分析单元可以不同,对其进行处理的分析单元的分析顺序也可以不同。Taking the data to be processed as a video as an example, multiple processing steps such as decoding the video, detecting human objects, extracting face features, and extracting features of people's clothing can be performed, and each processing step can correspond to an analysis unit. There is a sequence between these processing steps, and correspondingly, an analysis sequence also exists between the analysis units that process the data to be processed. For different data to be processed, the analysis units that process the data may be different, and the analysis sequences of the analysis units that process the data may also be different.

比如,一段视频中包含人脸数据,需要对该段视频进行解码、人脸目标检测、提取人脸特征等多个处理步骤,每个处理步骤可以对应一个分析单元。假设确定对待处理数据进行处理的有三个分析单元:分析单元1、分析单元2和分析单元3,其中,分析单元1用于对待处理数据进行解码,分析单元2用于检测待处理数据中的人脸目标,分析单元3用于提取待处理数据中的人脸特征。For example, if a video contains face data, multiple processing steps such as decoding, face target detection, and face feature extraction need to be performed on the video, and each processing step may correspond to an analysis unit. It is assumed that there are three analysis units for processing the data to be processed: analysis unit 1, analysis unit 2 and analysis unit 3, wherein the analysis unit 1 is used to decode the data to be processed, and the analysis unit 2 is used to detect the person in the data to be processed. Face target, the analysis unit 3 is used to extract the face features in the data to be processed.

再比如,另一段视频中包含车牌数据,需要对该段视频进行解码、车辆目标检测、提取车牌特征等多个处理步骤,每个处理步骤可以对应一个分析单元。假设确定对待处理数据进行处理的有三个分析单元:分析单元1、分析单元4和分析单元5,其中,分析单元1用于对待处理数据进行解码,分析单元4用于检测待处理数据中的车辆目标,分析单元5用于提取待处理数据中的车牌特征。For another example, another video contains license plate data, which requires multiple processing steps such as decoding, vehicle target detection, and license plate feature extraction, and each processing step may correspond to an analysis unit. It is assumed that there are three analysis units for processing the data to be processed: analysis unit 1, analysis unit 4 and analysis unit 5, wherein the analysis unit 1 is used to decode the data to be processed, and the analysis unit 4 is used to detect vehicles in the data to be processed The target, the analysis unit 5 is used to extract the license plate features in the data to be processed.

每个分析单元包含一个独立的线程,每个分析单元利用自身包含的线程对待处理数据进行处理。Each analysis unit includes an independent thread, and each analysis unit uses its own thread to process the data to be processed.

S103:对所确定的分析单元进行加载;并按照该分析顺序,将所加载的每个分析单元进行连接,得到分析单元组合。S103: Load the determined analysis units; and connect each of the loaded analysis units according to the analysis sequence to obtain a combination of analysis units.

在本设备(执行主体)或者与本设备通信连接的其他设备中,以插件的形式预先存储多个分析单元,将确定的对该待处理数据进行处理的分析单元加载至内存。In the device (execution body) or other devices communicatively connected to the device, multiple analysis units are pre-stored in the form of plug-ins, and the determined analysis units that process the data to be processed are loaded into the memory.

上述预先存储的多个分析单元之间预先可以不存在连接关系。在将所确定的分析单元加载至内存、并确定对待处理数据进行处理的各分析单元的分析顺序后,根据该分析顺序,将加载后的各分析单元进行连接,得到分析单元组合。这样,分析单元之间的连接关系是可调整的,可以针对不同的待处理数据,建立不同的连接关系,得到不同的分析单元组合。There may be no connection relationship between the above-mentioned pre-stored multiple analysis units in advance. After the determined analysis units are loaded into the memory and the analysis order of each analysis unit for processing the data to be processed is determined, the loaded analysis units are connected according to the analysis order to obtain an analysis unit combination. In this way, the connection relationship between the analysis units is adjustable, and different connection relationships can be established for different data to be processed to obtain different combinations of analysis units.

延续上述例子,待处理数据为一段包含人脸数据的视频,确定出对待处理数据进行处理的为分析单元1-3,分析顺序由前到后为:分析单元1、分析单元2、分析单元3。按照该分析顺序将这三个分析单元进行连接,具体的,将分析单元1的输出接口与分析单元2的输入接口相连,将分析单元2的输出接口与分析单元3的输入接口相连,得到分析单元组合。Continuing the above example, the data to be processed is a video containing face data, and it is determined that the data to be processed is the analysis unit 1-3, and the analysis sequence from front to back is: analysis unit 1, analysis unit 2, analysis unit 3 . The three analysis units are connected according to the analysis sequence. Specifically, the output interface of the analysis unit 1 is connected with the input interface of the analysis unit 2, and the output interface of the analysis unit 2 is connected with the input interface of the analysis unit 3 to obtain the analysis unit combination.

S104:获取该待处理数据,并将该待处理数据输入该分析单元组合,利用该分析单元组合中每个分析单元包含的线程,对该待处理数据进行分析。S104: Acquire the to-be-processed data, input the to-be-processed data into the analysis unit combination, and analyze the to-be-processed data by using a thread included in each analysis unit in the analysis unit combination.

举例来说,S101中获取到的任务参数还可以包括待处理数据的地址信息,该地址信息可以为URL(Uniform Resource Locator,统一资源定位符),或者,也可以为其他,具体不做限定。根据该地址信息,可以获取到待处理数据。For example, the task parameter acquired in S101 may further include address information of the data to be processed, and the address information may be a URL (Uniform Resource Locator, Uniform Resource Locator), or may be other, which is not specifically limited. According to the address information, the data to be processed can be obtained.

仍以待处理数据为视频为例进行说明,先将该视频输入分析单元1,利用分析单元1中的线程对该视频进行解码,得到解码后的数据;将解码后的数据输入分析单元2,利用分析单元2中的线程检测解码后的数据中的人脸目标,得到人脸目标数据;将人脸目标数据输入分析单元3,利用分析单元3中的线程提取待处理数据中的人脸特征,得到人脸特征数据。Still take the data to be processed as the video as an example to illustrate, first this video is input into the analysis unit 1, and the thread in the analysis unit 1 is used to decode the video to obtain the decoded data; The decoded data is input into the analysis unit 2, Utilize the thread in the analysis unit 2 to detect the face target in the decoded data to obtain the face target data; input the face target data into the analysis unit 3, and use the thread in the analysis unit 3 to extract the face feature in the data to be processed , to get the facial feature data.

S105:根据该分析单元组合的输出内容,获取处理结果。S105: Acquire a processing result according to the output content of the analysis unit combination.

作为一种实施方式,可以直接将该输出内容作为处理结果;或者,可以将该输出内容进行格式转换,将转换后的数据作为处理结果;或者,可以从该输出内容中提取出有效数据,作为处理结果,等等,具体不做限定。As an implementation manner, the output content can be directly used as the processing result; or, the output content can be format-converted, and the converted data can be used as the processing result; or, valid data can be extracted from the output content as The processing results, etc., are not specifically limited.

比如,上述例子中,分析单元3为分析单元组合中最后一个单元,分析单元3的输出内容也就是分析单元组合的输出内容,该输出内容为人脸特征数据,可以直接将该人脸特征数据作为处理结果。For example, in the above example, the analysis unit 3 is the last unit in the combination of analysis units, the output content of the analysis unit 3 is the output content of the combination of analysis units, and the output content is face feature data, which can be directly used as the face feature data. process result.

应用本发明图1所示实施例,获取到任务参数后,再加载分析单元,分析单元并不是以进程的方式持续运行,而且加载分析单元后,利用分析单元包含的线程对数据进行分析,相比于分析单元以进程方式持续运行的方案,减少了资源占用率,并且线程相比于进程更易于控制。Applying the embodiment shown in FIG. 1 of the present invention, after the task parameters are obtained, the analysis unit is loaded again. The analysis unit does not run continuously in a process mode, and after the analysis unit is loaded, the thread included in the analysis unit is used to analyze the data. Compared with the solution that the analysis unit runs continuously in a process mode, the resource occupancy rate is reduced, and the thread is easier to control than the process.

作为一种实施方式,在获取到待处理数据之后,可以针对待处理数据,生成预设结构的结构体对象。举例来说,该预设结构可以包括三部分,第一部分可以称为头部结构,头部结构中可以存储对待处理数据进行处理的处理进度信息、处理过程中的错误码信息等等。第二部分可以存储该待处理数据,第三部分可以存储该分析组合中每个分析单元的分析结果。As an implementation manner, after the data to be processed is acquired, a structure object with a preset structure may be generated for the data to be processed. For example, the preset structure may include three parts, the first part may be called a header structure, and the header structure may store processing progress information for processing the data to be processed, error code information during processing, and the like. The second part may store the data to be processed, and the third part may store the analysis result of each analysis unit in the analysis combination.

这样,将所述待处理数据输入所述分析单元组合,利用所述分析单元组合中每个分析单元包含的线程,对所述待处理数据进行分析,可以包括:In this way, the data to be processed is input into the combination of analysis units, and the data to be processed is analyzed by using a thread included in each analysis unit in the combination of analysis units, which may include:

一、将所述结构体对象输入所述分析单元组合中的第一个分析单元,利用所述第一个分析单元包含的线程,对所述结构体对象进行分析,得到分析结果,将分析结果添加至所述结构体对象,得到所述第一个分析单元的输出对象;1. Input the structure object into the first analysis unit in the combination of analysis units, use the thread included in the first analysis unit to analyze the structure object, and obtain the analysis result. added to the structure object to obtain the output object of the first analysis unit;

二、按照所述分析顺序,依次将所述第一个分析单元之后的每个分析单元确定为当前分析单元;将当前分析单元的上一个分析单元的输出对象输入当前分析单元,利用当前分析单元包含的线程,对所述上一个分析单元的输出对象进行分析,得到分析结果,将分析结果添加至所述上一个分析单元的输出对象,得到当前分析单元的输出对象。2. According to the analysis sequence, sequentially determine each analysis unit after the first analysis unit as the current analysis unit; input the output object of the previous analysis unit of the current analysis unit into the current analysis unit, and use the current analysis unit The included thread analyzes the output object of the previous analysis unit to obtain an analysis result, and adds the analysis result to the output object of the previous analysis unit to obtain the output object of the current analysis unit.

S105可以包括:根据所述分析单元组合中最后一个分析单元的输出对象,获取处理结果。S105 may include: acquiring a processing result according to the output object of the last analysis unit in the combination of analysis units.

延续上述例子,每个分析单元都将自身得到的分析结果添加到上述预设结构中的第三部分,也就是说,最后一个分析单元的输出对象中包含结构体对象中的全部内容,还包含该分析单元组合中全部分析单元的分析结果。举例来说,可以在该最后一个分析单元的输出对象中,提取最后一个分析单元的分析结果作为处理结果;或者,也可以在该最后一个分析单元的输出对象中,提取每个分析单元的分析结果作为处理结果;或者,也可以将该最后一个分析单元的输出对象作为处理结果。Continuing the above example, each analysis unit adds its own analysis results to the third part of the above preset structure, that is, the output object of the last analysis unit contains all the contents of the structure object, and also includes Analysis results of all analysis units in this analysis unit combination. For example, the analysis result of the last analysis unit may be extracted from the output object of the last analysis unit as the processing result; or, the analysis result of each analysis unit may be extracted from the output object of the last analysis unit The result is taken as the processing result; alternatively, the output object of the last analysis unit can also be taken as the processing result.

作为一种实施方式,每个分析单元中可以包括一个输入队列、一个输出队列,分析单元从输入队列中获取上一个分析单元的输出对象,或者获取该结构体对象,分析单元将自身输出对象添加到输出队列中。As an implementation manner, each analysis unit may include an input queue and an output queue, the analysis unit obtains the output object of the previous analysis unit from the input queue, or obtains the structure object, and the analysis unit adds its own output object to the output queue.

具体来说,在所述得到所述第一个分析单元的输出对象之后,将所述第一个分析单元的输出对象添加至所述第一个分析单元的输出队列中;Specifically, after the output object of the first analysis unit is obtained, the output object of the first analysis unit is added to the output queue of the first analysis unit;

所述将当前分析单元的上一个分析单元的输出对象输入当前分析单元,包括:从当前分析单元的输入队列中,按照预设队列顺序,依次读取所述上一个分析单元的输出对象;The inputting the output object of the previous analysis unit of the current analysis unit into the current analysis unit includes: from the input queue of the current analysis unit, sequentially reading the output object of the previous analysis unit according to a preset queue sequence;

在所述得到当前分析单元的输出对象之后,将当前单元的输出对象添加至当前分析单元的输出队列中。After the output object of the current analysis unit is obtained, the output object of the current unit is added to the output queue of the current analysis unit.

举例来说,如果待处理数据为视频,各分析单元可以分别对视频中的每张图像进行处理。假设利用分析单元1-2对视频进行处理,先将第一张图像对应的结构体对象输入分析单元1,分析单元1利用自身包含的线程对该结构体对象进行分析,得到一个输出对象,将该输出对象添加至分析单元1的输出队列中;类似的,分析单元1对视频中的每一张图像都进行上述处理。For example, if the data to be processed is a video, each analysis unit can process each image in the video separately. Assuming that the analysis unit 1-2 is used to process the video, the structure object corresponding to the first image is first input into the analysis unit 1, and the analysis unit 1 analyzes the structure object by using its own thread to obtain an output object, which is The output object is added to the output queue of the analysis unit 1; similarly, the analysis unit 1 performs the above processing on each image in the video.

分析单元2的输入队列与分析单元1的输出队列可以通过管道相连接,这样,分析单元2可以从自身的输入队列中获取到分析单元1的输出对象。分析单元2从自身的输入队列中依次读取分析单元1的输出对象,每次可以读取一个输出对象。分析单元2利用自身包含的线程对读取到的一个输出对象进行分析,得到一个输出对象,并将该输出对象添加至分析单元2的输出队列中;类似的,分析单元2对读取到的每个输出对象都进行上述处理。The input queue of the analysis unit 2 and the output queue of the analysis unit 1 can be connected through a pipeline, so that the analysis unit 2 can obtain the output object of the analysis unit 1 from its own input queue. The analysis unit 2 sequentially reads the output objects of the analysis unit 1 from its own input queue, and can read one output object at a time. Analysis unit 2 analyzes an output object read by using the thread included in itself, obtains an output object, and adds the output object to the output queue of analysis unit 2; The above processing is performed for each output object.

在本实施方式中,针对每个分析单元设置输入/输出队列,对于每个分析单元来说,该分析单元的输入队列中可以存在多个输出对象,这样,即使该分析单元的上一分析单元处理速率较低,该分析单元也无需等待,相比于不设置输入/输出队列的方案,提高了数据处理效率。In this embodiment, an input/output queue is set for each analysis unit. For each analysis unit, there may be multiple output objects in the input queue of the analysis unit. The processing rate is low, and the analysis unit does not need to wait, which improves the data processing efficiency compared to the scheme without input/output queues.

作为一处实施方式,在根据所述分析单元组合中最后一个分析单元的输出对象,获取处理结果后,还可以判断所述分析单元组合中最后一个分析单元的输出对象是否满足输出条件;如果满足,从所述最后一个分析单元的输出对象中获取处理结果;如果不满足,返回执行将所述结构体对象输入所述分析单元组合中的第一个分析单元的步骤。As an implementation manner, after obtaining the processing result according to the output object of the last analysis unit in the analysis unit combination, it can also be judged whether the output object of the last analysis unit in the analysis unit combination satisfies the output condition; , obtain the processing result from the output object of the last analysis unit; if not satisfied, return to execute the step of inputting the structure object into the first analysis unit in the combination of analysis units.

以上述包含车牌数据的视频为例来说,最后一个分析单元的输出对象中包含车牌特征数据,比如车牌号;可以针对该车牌号设定输出条件,比如是否存在未识别出的字符,如果存在,则重复执行将结构体对象输入分析单元组合中的第一个分析单元及后续步骤。直至最后一个分析单元的输出对象中包含的车牌号中不存在未识别出的字符,或者,直至重复执行的次数达到阈值。换句话说,该输出条件也可以针对重复执行的次数是否达到阈值。Taking the above video containing license plate data as an example, the output object of the last analysis unit contains license plate feature data, such as license plate number; output conditions can be set for the license plate number, such as whether there are unrecognized characters, and if so , the first analysis unit and subsequent steps of inputting the structure object into the analysis unit combination are repeated. Until there are no unrecognized characters in the license plate number contained in the output object of the last analysis unit, or until the number of repetitions reaches a threshold. In other words, the output condition may also be for whether the number of repetitions reaches a threshold.

在本实施方式中,实现了循环机制,也就是当最后一个分析单元的输出对象不满足输出条件的情况下,循环利用各个分析单元进行分析,直至输出对象满足输出条件,或者循环次数达到阈值,这样,可以提高处理结果的准确度。现有的Storm框架中并不能实现这种循环机制,因此本实施方式相比于Storm框架,提高了处理结果的准确度。In this embodiment, a cycle mechanism is implemented, that is, when the output object of the last analysis unit does not meet the output condition, each analysis unit is used for analysis in a cycle until the output object meets the output condition, or the number of cycles reaches the threshold, In this way, the accuracy of the processing result can be improved. Such a loop mechanism cannot be implemented in the existing Storm framework. Therefore, compared with the Storm framework, the present embodiment improves the accuracy of the processing result.

作为一种实施方式,在获取待处理数据之前,还可以获取待处理数据对应的第二配置文件;读取所述第二配置文件中包含的交互配件库的标识,对所读取的标识对应的交互配件库存进行加载,所述交互配件库中包括输入接口、输出接口、组装配件和检测配件。这里所说的“输入接口”是指交互配件库的输入接口,这里所说的“输出接口”是指交互配件库的输出接口。交互配件库的输入/输出接口可以为与上层应用、或者用户设备相连接的接口,可以理解为外部接口,而上述内容中的分析单元的输入/输出接口、以及下述内容中的管道的输入/输出接口不与上层应用、用户设备等连接,均可以理解为内部接口。As an embodiment, before acquiring the data to be processed, a second configuration file corresponding to the data to be processed may also be acquired; the identifier of the interactive accessory library contained in the second configuration file is read, and the identifier corresponding to the read identifier is read. The interactive accessories inventory is loaded, and the interactive accessories library includes input interfaces, output interfaces, assembly accessories and detection accessories. The "input interface" mentioned here refers to the input interface of the interactive accessory library, and the "output interface" mentioned here refers to the output interface of the interactive accessory library. The input/output interface of the interactive accessory library can be an interface connected to an upper-layer application or user equipment, which can be understood as an external interface, while the input/output interface of the analysis unit in the above content and the input of the pipeline in the following content / The output interface is not connected to the upper-layer application, user equipment, etc., and can be understood as an internal interface.

在获取待处理数据之后,还可以调用交互配件库的输入接口,将所述待处理数据输入至该交互配件库。After acquiring the data to be processed, the input interface of the interactive accessory library can also be called, and the data to be processed can be input into the interactive accessory library.

在本实施方式中,本设备(执行主体)或者与本设备通信连接的其他设备中存在一个或多个交互配件库,每个交互配件库中包括输入接口、输出接口、组装配件和检测配件。每份待处理数据可以对应一份第二配置文件。为了与上面内容中的配置文件区分描述,将包含交互配件库的标识的配置文件称为第二配置文件。In this embodiment, one or more interactive accessory libraries exist in the device (execution body) or other devices communicatively connected to the device, and each interactive accessory library includes an input interface, an output interface, an assembly accessory, and a detection accessory. Each piece of data to be processed may correspond to a second configuration file. In order to distinguish the description from the configuration file in the above content, the configuration file containing the identification of the interactive accessory library is referred to as the second configuration file.

或者,第一配置文件与第二配置文件也可以属于同一配置文件,该配置文件中既包含交互配件库的标识,又包含分析单元的标识及标识顺序。Alternatively, the first configuration file and the second configuration file may also belong to the same configuration file, and the configuration file includes not only the identification of the interactive accessory library, but also the identification and identification sequence of the analysis unit.

每份待处理数据都可以对应一份第二配置文件,该第二配置文件中包含对该份待处理数据进行处理的交互配件库的标识。交互配件库的标识可以为序号、ID等等,具体不做限定,将该标识对应的交互配件库加载至内存。Each piece of data to be processed may correspond to a second configuration file, and the second configuration file includes the identifier of the interactive accessory library that processes the piece of data to be processed. The identifier of the interactive accessory library may be a serial number, an ID, etc., which is not specifically limited, and the interactive accessory library corresponding to the identifier is loaded into the memory.

所述针对待处理数据,生成预设结构的结构体对象,可以包括:利用所述组装配件,将所述待处理数据进行组装,生成预设结构的结构体对象。The generating a structure object with a preset structure for the data to be processed may include: using the assembly accessories to assemble the data to be processed to generate a structure object with a preset structure.

在本实施方式中,调用交互配件库中的输入接口,将待处理数据输入到该交互配件库,利用该组装配件将待处理数据进行组装,生成预设结构的结构体对象。In this embodiment, the input interface in the interactive accessories library is called, the data to be processed is input into the interactive accessories library, and the assembly accessories are used to assemble the to-be-processed data to generate a structure object with a preset structure.

另外,确定对待处理数据进行处理的分析单元和各分析单元顺序,根据该顺序,将所确定的各分析单元连接成分析单元组合;将结构体对象输入该分析单元组合,分析单元组合输出一个输出对象。In addition, determine the analysis unit for processing the data to be processed and the sequence of each analysis unit, and according to the sequence, connect the determined analysis units into an analysis unit combination; input the structure object into the analysis unit combination, and the analysis unit combination outputs an output object.

所述判断所述分析单元组合中最后一个分析单元的输出对象是否满足输出条件,可以包括:调用所述检测配件,对所述分析单元组合中最后一个分析单元的输出对象进行检测,判断检测结果是否满足输出条件。The judging whether the output object of the last analysis unit in the analysis unit combination satisfies the output condition may include: calling the detection accessory, detecting the output object of the last analysis unit in the analysis unit combination, and judging the detection result Whether the output conditions are met.

如果不满足,重新将该结构体对象输入该分析单元组合;如果满足,从该输出对象中获取处理结果,并调用交互配件库中的输出接口,输出该处理结果,这里的“输出”可以为将该处理结果发送用户设备或者上层应用。If not satisfied, re-input the structure object into the analysis unit combination; if satisfied, obtain the processing result from the output object, and call the output interface in the interactive accessory library to output the processing result, where the "output" can be The processing result is sent to the user equipment or the upper-layer application.

交互配件库中还可以包括删除配件,在调用所述输出接口,输出所述处理结果之后,还可以调用所述删除配件,删除所述最后一个分析单元的输出对象,这样,可以节省内存资源,保证内存不泄漏。The interactive accessory library may also include a delete accessory, after calling the output interface and outputting the processing result, the delete accessory may also be called to delete the output object of the last analysis unit, so that memory resources can be saved, Guaranteed not to leak memory.

作为一种实施方式,在待处理数据处理完毕后,可以卸载所述分析单元组合中的分析单元,这样,可以减少内存的占用。As an implementation manner, after the data to be processed is processed, the analysis units in the analysis unit combination can be unloaded, so that memory occupation can be reduced.

图2为本发明实施例提供的基于流式框架的数据处理方法的第二种流程示意图,FIG. 2 is a second schematic flowchart of a data processing method based on a streaming framework provided by an embodiment of the present invention,

S201:获取待处理数据对应的第二配置文件。S201: Acquire a second configuration file corresponding to the data to be processed.

S202:读取该第二配置文件中包含的交互配件库的标识,对所读取的标识对应的交互配件库存进行加载,该交互配件库中包括输入接口、输出接口、组装配件和检测配件。S202: Read the identifier of the interactive accessory library contained in the second configuration file, and load the interactive accessory inventory corresponding to the read identifier, where the interactive accessory library includes input interfaces, output interfaces, assembly accessories, and detection accessories.

本实施例中,可以存在两级加载,为了区分描述,将第一级加载所利用的配置文件称为第二配置文件,将第二级加载所利用的配置文件称为第一配置文件。第一级加载为加载交互配件库,第二级加载为加载分析单元。In this embodiment, there may be two levels of loading. In order to distinguish the description, the configuration file used for the first-level loading is called the second configuration file, and the configuration file used for the second-level loading is called the first configuration file. The first-level loading is to load the interactive accessory library, and the second-level loading is to load the analysis unit.

具体的处理框架可以如图3所示,包括交互配件库、插件管理器和分析单元。插件管理器通过读取第二配置文件,加载交互配件库,通过读取第一配置文件,加载分析单元。交互配件库和分析单元可以有多个,针对不同的待处理数据,通常加载不同的交互配件库和分析单元。A specific processing framework can be shown in Figure 3, including an interactive accessory library, a plug-in manager and an analysis unit. The plug-in manager loads the interactive accessory library by reading the second configuration file, and loads the analysis unit by reading the first configuration file. There can be multiple interactive accessory libraries and analysis units, and different interactive accessory libraries and analysis units are usually loaded for different data to be processed.

第一级加载中,插件管理器通过读取第二配置文件,得到对待处理数据进行处理的交互配件库的标识;插件管理器将该标识对应的交互配件库加载至内存,并映射该交互配件库的接口地址,接口地址包括输入接口地址、输出接口地址。In the first-level loading, the plug-in manager obtains the identifier of the interactive accessory library for processing the data to be processed by reading the second configuration file; the plug-in manager loads the interactive accessory library corresponding to the identifier into the memory, and maps the interactive accessory The interface address of the library, the interface address includes the input interface address and the output interface address.

S203:获取待处理数据对应的第一配置文件;根据该第一配置文件中包含的分析单元的标识及标识顺序,确定对该待处理数据进行处理的分析单元、以及该分析单元的分析顺序;其中,每个分析单元包含一个独立的线程。S203: Obtain a first configuration file corresponding to the data to be processed; determine the analysis unit for processing the data to be processed and the analysis sequence of the analysis unit according to the identification and identification sequence of the analysis unit included in the first configuration file; Among them, each analysis unit contains an independent thread.

S204:对所确定的分析单元进行加载;并按照该分析顺序,将所加载的每个分析单元进行连接,得到分析单元组合。S204: Load the determined analysis units; and connect each of the loaded analysis units according to the analysis sequence to obtain an analysis unit combination.

S204即为第二级加载,图3中的插件管理器通过读取第一配置文件,得到分析单元的标识及标识顺序,插件管理器将该标识对应的分析单元加载至内存,并根据该标识顺序,将加载后的各分析单元进行串联,得到分析单元组合。S204 is the second-level loading, the plug-in manager in FIG. 3 obtains the identification of the analysis unit and the identification sequence by reading the first configuration file, the plug-in manager loads the analysis unit corresponding to the identification into the memory, and according to the identification sequence, the loaded analysis units are connected in series to obtain a combination of analysis units.

在本实施例中,如图3所示,各分析单元之间可以通过管道进行连接,各分析单元之间传输的数据通过管道从一个分析单元流向另一个分析单元。第一个分析单元和最后一个分析单元通过管道与交互配件库相连接。如图4所示,管道内部接口包括一个输入接口pin和一个输出接口pout,其中,pin与分析单元1的输出接口相连接,pout和分析单元2的输入接口相连接,这样,数据便可以从分析单元1流向分析单元2。In this embodiment, as shown in FIG. 3 , the analysis units may be connected through pipes, and the data transmitted between the analysis units flows from one analysis unit to another analysis unit through the pipes. The first analysis unit and the last analysis unit are connected by pipes to the interactive accessories library. As shown in Figure 4, the internal interface of the pipeline includes an input interface pin and an output interface pout, wherein pin is connected to the output interface of the analysis unit 1, and pout is connected to the input interface of the analysis unit 2, so that the data can be sent from Analysis unit 1 flows to analysis unit 2.

举例来说,管道中可以不进行数据缓存;另外,还可以在管道中设定重复传输次数,比如图4中,如果分析单元1与分析单元2之间的数据传输失败,则重复传输,直至重复传输的次数达到该管道设定的次数。For example, data buffering may not be performed in the pipeline; in addition, the number of repeated transmissions may be set in the pipeline. For example, in Figure 4, if the data transmission between the analysis unit 1 and the analysis unit 2 fails, the transmission is repeated until The transmission is repeated as many times as set by the pipeline.

在本实施例中,交互配件库与分析单元之间可以设置封装层,该封装层用于屏蔽各分析单元内部的逻辑关系。比如图5中所示,插件管理器和各分析单元与交互配件库之间设置封装层,交互配件库只需调用封装层的接口,便可以流式般的响应至各分析单元的接口。这样,对于调用方来说,不需要遍历调用所有的分析单元,也不需要关心分析单元之间的调用逻辑,操作简单,体验更佳。In this embodiment, an encapsulation layer may be set between the interactive accessory library and the analysis unit, and the encapsulation layer is used to shield the logical relationship inside each analysis unit. For example, as shown in FIG. 5, an encapsulation layer is set between the plug-in manager, each analysis unit and the interactive accessory library, and the interactive accessory library only needs to call the interface of the encapsulation layer, and can respond to the interface of each analysis unit in a streaming manner. In this way, for the caller, there is no need to traverse and call all the analysis units, nor to care about the calling logic between the analysis units. The operation is simple and the experience is better.

而且,本实施例中,每个分析单元中均包含一个独立的线程,也就是说每个分析单元中的运算由不同的线程执行,各线程之间互不影响,即使一个分析单元中的运算量较大,也不会影响其他分析单元中的运算,提高了运算效率,而且相比于分析单元以进程方式持续运行的方案,减少了资源占用率。Moreover, in this embodiment, each analysis unit includes an independent thread, that is to say, the operations in each analysis unit are performed by different threads, and the threads do not affect each other, even if the operations in one analysis unit are performed by different threads It does not affect the operation in other analysis units, improves the operation efficiency, and reduces the resource occupancy rate compared with the solution in which the analysis unit runs continuously in a process mode.

S205:获取待处理数据。S205: Acquire data to be processed.

S206:调用该输入接口,将该待处理数据输入至该交互配件库。S206: Invoke the input interface, and input the data to be processed into the interactive accessory library.

S207:利用该组装配件,将该待处理数据进行组装,生成预设结构的结构体对象。S207: Assemble the to-be-processed data by using the assembly accessory to generate a structure object with a preset structure.

S202中将交互配件库加载至内存,该交互配件库中包含组装配件,该组装配件可以将待处理数据组装成预设结构的结构体对象。举例来说,该预设结构可以包括三部分,第一部分可以称为头部结构,头部结构中可以存储对待处理数据进行处理的处理进度信息、处理过程中的错误码信息等等。第二部分可以存储该待处理数据,第三部分可以存储该分析组合中每个分析单元的分析结果。In S202, the interactive accessory library is loaded into the memory, and the interactive accessory library includes assembly accessories, and the assembly accessories can assemble the data to be processed into a structure object of a preset structure. For example, the preset structure may include three parts, the first part may be called a header structure, and the header structure may store processing progress information for processing the data to be processed, error code information during processing, and the like. The second part may store the data to be processed, and the third part may store the analysis result of each analysis unit in the analysis combination.

S208:将该结构体对象输入该分析单元组合中的第一个分析单元,利用该第一个分析单元包含的线程,对该结构体对象进行分析,得到分析结果,将分析结果添加至该结构体对象,得到该第一个分析单元的输出对象。S208: Input the structure object into the first analysis unit in the combination of analysis units, use the thread included in the first analysis unit to analyze the structure object, obtain an analysis result, and add the analysis result to the structure body object to get the output object of the first analysis unit.

S209:按照该分析顺序,依次将该第一个分析单元之后的每个分析单元确定为当前分析单元;将当前分析单元的上一个分析单元的输出对象输入当前分析单元,利用当前分析单元包含的线程,对该上一个分析单元的输出对象进行分析,得到分析结果,将分析结果添加至该上一个分析单元的输出对象,得到当前分析单元的输出对象。S209: According to the analysis sequence, successively determine each analysis unit after the first analysis unit as the current analysis unit; input the output object of the previous analysis unit of the current analysis unit into the current analysis unit, and use the The thread analyzes the output object of the previous analysis unit to obtain the analysis result, and adds the analysis result to the output object of the previous analysis unit to obtain the output object of the current analysis unit.

作为一种实施方式,每个分析单元中可以包括一个输入队列、一个输出队列,分析单元从输入队列中获取上一个分析单元的输出对象,或者获取该结构体对象,分析单元将自身输出对象添加到输出队列中。As an implementation manner, each analysis unit may include an input queue and an output queue, the analysis unit obtains the output object of the previous analysis unit from the input queue, or obtains the structure object, and the analysis unit adds its own output object to the output queue.

具体来说,在得到所述第一个分析单元的输出对象之后,将第一个分析单元的输出对象添加至所述第一个分析单元的输出队列中;从当前分析单元的输入队列中,按照预设队列顺序,依次读取所述上一个分析单元的输出对象;在得到当前分析单元的输出对象之后,将当前单元的输出对象添加至当前分析单元的输出队列中。Specifically, after the output object of the first analysis unit is obtained, the output object of the first analysis unit is added to the output queue of the first analysis unit; from the input queue of the current analysis unit, According to the preset queue sequence, the output objects of the previous analysis unit are sequentially read; after the output objects of the current analysis unit are obtained, the output objects of the current unit are added to the output queue of the current analysis unit.

在本实施方式中,针对每个分析单元设置输入/输出队列,对于每个分析单元来说,该分析单元的输入队列中可以存在多个输出对象,这样,即使该分析单元的上一分析单元处理速率较低,该分析单元也无需等待,相比于不设置输入/输出队列的方案,提高了数据处理效率。In this embodiment, an input/output queue is set for each analysis unit. For each analysis unit, there may be multiple output objects in the input queue of the analysis unit. The processing rate is low, and the analysis unit does not need to wait, which improves the data processing efficiency compared to the scheme without input/output queues.

S210:调用该检测配件,对该分析单元组合中最后一个分析单元的输出对象进行检测,判断检测结果是否满足输出条件,如果是,执行S211,如果否,返回执行S208。S210: Invoke the detection accessory to detect the output object of the last analysis unit in the analysis unit combination, and determine whether the detection result satisfies the output condition, if yes, execute S211, and if not, return to execute S208.

如上所述,针对不同的待处理数据,可以加载不同的交互配件库,也就是说,交互配件库中的各配件是适用于该待处理数据的,因此,交互配件库中的检测配件可以针对该待处理数据的输出对象进行检测。As mentioned above, for different data to be processed, different interactive accessory libraries can be loaded, that is, each accessory in the interactive accessory library is suitable for the data to be processed. Therefore, the detection accessories in the interactive accessory library can be used for The output object of the data to be processed is detected.

比如,待处理数据为包含车牌数据的视频,最后一个分析单元的输出对象中包含车牌号的识别结果,该检测配件可以检测该识别结果中是否存在未识别出的字符;如果存在,则检测结果不满足输出条件,重复执行S208-S210;如果不存在,则检测结果满足输出条件,执行S211。For example, if the data to be processed is a video containing license plate data, and the output object of the last analysis unit contains the recognition result of the license plate number, the detection accessory can detect whether there are unrecognized characters in the recognition result; if so, the detection result If the output condition is not satisfied, execute S208-S210 repeatedly; if not, the detection result satisfies the output condition, and execute S211.

另外,检测配件中还可以针对重复执行的次数设定阈值,如果检测结果一直不满足输出条件,重复执行S208-S210的次数达到该阈值,也认为检测结果满足输出条件。In addition, the detection accessory may also set a threshold for the number of times of repeated execution. If the detection result does not meet the output condition, and the number of repeated executions of S208-S210 reaches the threshold, the detection result is considered to meet the output condition.

返回执行S208时,可以针对最后一个分析单元的输出对象,将该输出对象的第三部分中存储的各分析单元的分析结果删除,并且将该输出对象的第一部分中存储的信息进行更新,比如将处理进度信息、处理过程中的错误码信息等更新为初始值,等等,具体不做限定。将经过上述处理的最后一个分析单元的输出对象作为结构体对象输入第一个分析单元。When returning to perform S208, the analysis results of each analysis unit stored in the third part of the output object may be deleted for the output object of the last analysis unit, and the information stored in the first part of the output object may be updated, such as The processing progress information, the error code information in the processing process, etc. are updated to the initial values, etc., which are not specifically limited. Input the output object of the last analysis unit processed above as a structure object into the first analysis unit.

或者,返回执行S208时,可以重新调用组装配件,重新生成预设结构的结构体对象,将该新生成的结构体对象输入第一个分析单元。Alternatively, when returning to perform S208, the assembly components may be recalled to regenerate the structure object of the preset structure, and the newly generated structure object may be input into the first analysis unit.

在本实施方式中,实现了循环机制,也就是当最后一个分析单元的输出对象不满足输出条件的情况下,循环利用各个分析单元进行分析,直至输出对象满足输出条件,或者循环次数达到阈值,这样,可以提高处理结果的准确度。现有的Storm框架中并不能实现这种循环机制,因此本实施方式相比于Storm框架,提高了处理结果的准确度。In this embodiment, a cycle mechanism is implemented, that is, when the output object of the last analysis unit does not meet the output condition, each analysis unit is used for analysis in a cycle until the output object meets the output condition, or the number of cycles reaches the threshold, In this way, the accuracy of the processing result can be improved. Such a loop mechanism cannot be implemented in the existing Storm framework. Therefore, compared with the Storm framework, the present embodiment improves the accuracy of the processing result.

S211:从该最后一个分析单元的输出对象中获取处理结果,并调用该输出接口,输出该处理结果。S211: Acquire the processing result from the output object of the last analysis unit, and call the output interface to output the processing result.

延续上述例子,每个分析单元都将自身得到的分析结果添加到上述预设结构中的第三部分,这样,最后一个分析单元的输出对象中包含结构体对象中的全部内容,还包含该分析单元组合中全部分析单元的分析结果。Continuing the above example, each analysis unit adds the analysis result obtained by itself to the third part of the above preset structure, so that the output object of the last analysis unit contains all the contents of the structure object, and also includes the analysis Analysis results for all analysis units in the unit combination.

举例来说,可以在该最后一个分析单元的输出对象中,提取最后一个分析单元的分析结果作为处理结果;或者,也可以在该最后一个分析单元的输出对象中,提取每个分析单元的分析结果作为处理结果;或者,也可以将该最后一个分析单元的输出对象作为处理结果。For example, the analysis result of the last analysis unit may be extracted from the output object of the last analysis unit as the processing result; or, the analysis result of each analysis unit may also be extracted from the output object of the last analysis unit The result is taken as the processing result; alternatively, the output object of the last analysis unit can also be taken as the processing result.

S212:调用该删除配件,删除该最后一个分析单元的输出对象。S212: Call the delete accessory to delete the output object of the last analysis unit.

S213:卸载该交互配件库、以及该分析单元组合中的分析单元。S213: Uninstall the interactive accessory library and the analysis units in the analysis unit combination.

作为一种实施方式,在待处理数据处理完毕之后,可以通过插件管理器卸载交互配件库和分析单元。与加载交互配件库和分析单元相对应,可以通过第二配置文件,卸载交互配件库,通过第一配置文件,卸载分析单元。As an embodiment, after the data to be processed is processed, the interactive accessory library and the analysis unit can be uninstalled through the plug-in manager. Corresponding to loading the interactive accessory library and the analysis unit, the interactive accessory library can be unloaded through the second configuration file, and the analysis unit can be unloaded through the first configuration file.

具体的,可以根据第二配置文件中包含的交互配件库的地址句柄,来释放S202中加载交互配件库时申请的内存空间;根据第一配置文件中包含的分析单元的地址句柄,来释放S204中加载分析单元时申请的内存空间。Specifically, the memory space applied for when loading the interactive accessory library in S202 can be released according to the address handle of the interactive accessory library contained in the second configuration file; and S204 can be released according to the address handle of the analysis unit contained in the first configuration file The memory space allocated when the analysis unit is loaded.

本实施方式中,对待处理数据处理完成后,释放处理过程占用的内存,可以减少内存占用率。In this implementation manner, after the data to be processed is processed, the memory occupied by the processing process is released, which can reduce the memory occupancy rate.

下面结合图3-5介绍一个具体的实施方式:A specific implementation is described below in conjunction with Figures 3-5:

1、本设备接收到一个处理任务:识别一段视频中的车牌号。本设备获取该处理任务相关的两份配置文件:配置文件A和配置文件B。待处理数据即为该段视频,配置文件A即为上述内容中的第二配置文件,配置文件B即为上述内容中的第一配置文件。1. The device receives a processing task: identify the license plate number in a video. The device obtains two configuration files related to the processing task: configuration file A and configuration file B. The data to be processed is the video, the configuration file A is the second configuration file in the above content, and the configuration file B is the first configuration file in the above content.

读取配置文件A中包含的交互配件库的标识,假设为序号3,则通过插件管理器,将序号为3的交互配件库加载至内存,该交互配件库中包括输入接口、输出接口、组装配件和检测配件。获取该段视频,调用该交互配件库中的输入接口,将该段视频输入该交互配件库。利用该交互配件库中的组装配件,将该段视频组装成预设结构的结构体对象。Read the identifier of the interactive accessory library contained in the configuration file A, assuming the serial number 3, then load the interactive accessory library with serial number 3 into the memory through the plug-in manager. The interactive accessory library includes input interface, output interface, assembly Accessories and inspection accessories. Acquire the video, call the input interface in the interactive accessories library, and input the video into the interactive accessories library. Using the assembly parts in the interactive parts library, assemble the video into a structure object with a preset structure.

举例来说,该预设结构可以包括三部分,第一部分可以称为头部结构,头部结构中可以存储对待处理数据进行处理的处理进度信息、处理过程中的错误码信息等等。第二部分可以存储该待处理数据,第三部分可以存储该分析组合中每个分析单元的分析结果。For example, the preset structure may include three parts, the first part may be called a header structure, and the header structure may store processing progress information for processing the data to be processed, error code information during processing, and the like. The second part may store the data to be processed, and the third part may store the analysis result of each analysis unit in the analysis combination.

另外,读取配置文件B中包含的分析单元标识及标识顺序,假设标识及标识顺序为:分析单元1、分析单元4和分析单元5,则通过插件管理器,将这三个分析单元加载至内存,并按照该顺序,将这三个分析单元进行连接,得到分析单元组合。具体的,可以如图3所示,通过管道,将这三个分析单元相连接,其中,分析单元1与分析单元5通过管道与交互配件库相连接。每个分析单元中均包含一个独立的线程。In addition, read the analysis unit identification and identification sequence contained in the configuration file B, assuming that the identification and identification sequence are: analysis unit 1, analysis unit 4 and analysis unit 5, then through the plug-in manager, load these three analysis units into memory, and in this order, connect the three analysis units to obtain a combination of analysis units. Specifically, as shown in FIG. 3 , the three analysis units can be connected through pipes, wherein the analysis unit 1 and the analysis unit 5 are connected with the interactive accessory library through pipes. Each analysis unit contains a separate thread.

如图5所示,插件管理器和各分析单元与交互配件库之间设置封装层,交互配件库只需调用封装层的接口,便可以流式般的响应至各分析单元的接口。这样,对于调用方来说,不需要遍历调用所有的分析单元,也不需要关心分析单元之间的调用逻辑,操作简单,体验更佳。As shown in Figure 5, an encapsulation layer is set between the plug-in manager and each analysis unit and the interactive accessory library, and the interactive accessory library only needs to call the interface of the encapsulation layer, and can respond to the interface of each analysis unit in a streaming manner. In this way, for the caller, there is no need to traverse and call all the analysis units, nor to care about the calling logic between the analysis units. The operation is simple and the experience is better.

将组装配件组装得到的结构体对象输入分析单元组合中的第一个分析单元的输入队列,也就是分析单元1的输入队列。分析单元1可以定期从自身输入队列中,获取一个结构体对象,并读取该结构体对象中第二部分存储的待处理数据,也就是该段视频;分析单元1利用自身包含的线程对该段视频进行解码处理,得到解码数据,将该解码数据作为分析结果添加至结构体对象的第三部分,添加了该解码数据之后的结构体对象即为分析单元1的输出对象;分析单元1将该输出对象输出到自身的输出队列中。Input the structure object assembled by the assembly parts into the input queue of the first analysis unit in the analysis unit combination, that is, the input queue of analysis unit 1 . The analysis unit 1 can periodically obtain a structure object from its own input queue, and read the data to be processed stored in the second part of the structure object, that is, the video; The segment video is decoded to obtain decoded data, and the decoded data is added to the third part of the structure object as the analysis result, and the structure object after adding the decoded data is the output object of the analysis unit 1; the analysis unit 1 will The output object is output to its own output queue.

分析单元1的输出队列与分析单元4的输入队列通过管道相连接,这样,分析单元4的输入队列中存在一个或多个分析单元1的输出对象。分析单元4可以定期从自身输入队列中,获取一个分析单元1的输出对象。The output queue of the analysis unit 1 is connected with the input queue of the analysis unit 4 through a pipeline, so that there are one or more output objects of the analysis unit 1 in the input queue of the analysis unit 4 . The analysis unit 4 may periodically acquire an output object of the analysis unit 1 from its own input queue.

分析单元4读取该输出对象中第三部分存储的解码数据、以及该输出对象中第一部分的处理进度信息;分析单元4利用自身包含的线程、结合该处理进度信息,检测该解码数据中的车辆目标,将检测到的车辆目标数据作为分析结果添加至该输出对象的第三部分,添加了该车辆目标数据之后的输出对象即为分析单元4的输出对象;分析单元4将该输出对象输出到自身的输出队列中。The analysis unit 4 reads the decoded data stored in the third part of the output object and the processing progress information of the first part in the output object; Vehicle target, add the detected vehicle target data as the analysis result to the third part of the output object, and the output object after adding the vehicle target data is the output object of the analysis unit 4; the analysis unit 4 outputs the output object to its own output queue.

分析单元4的输出队列与分析单元5的输入队列通过管道相连接,这样,分析单元5的输入队列中存在一个或多个分析单元4的输出对象。分析单元5可以定期从自身输入队列中,获取一个分析单元4的输出对象。The output queue of the analysis unit 4 is connected with the input queue of the analysis unit 5 through a pipeline, so that there are one or more output objects of the analysis unit 4 in the input queue of the analysis unit 5 . The analysis unit 5 may periodically acquire an output object of the analysis unit 4 from its own input queue.

分析单元5读取该输出对象中第三部分存储的车辆目标数据、以及该输出对象中第一部分的处理进度信息;分析单元5利用自身包含的线程、结合该处理进度信息,提取车辆目标数据中的车牌号,将该车牌号作为分析结果添加至该输出对象的第三部分,添加了该车牌号之后的输出对象即为分析单元5的输出对象;分析单元5将该输出对象输出到自身的输出队列中。The analysis unit 5 reads the vehicle target data stored in the third part of the output object and the processing progress information of the first part of the output object; The license plate number, the license plate number is added to the third part of the output object as the analysis result, and the output object after adding the license plate number is the output object of the analysis unit 5; the analysis unit 5 outputs the output object to its own in the output queue.

交互配件库中的检测配件可以对分析单元5的输出对象进行检测,判断该车牌号中不存在未识别出的字符;如果不存在,则检测结果满足输出条件,从分析单元5的输出对象中获取该车牌号作为处理结果,并调用该输出接口,输出该处理结果。The detection accessories in the interactive accessories library can detect the output object of the analysis unit 5, and determine that there are no unrecognized characters in the license plate number; Obtain the license plate number as the processing result, and call the output interface to output the processing result.

如果该车牌号中存在未识别出的字符,则检测结果不满足输出条件,返回执行将结构体对象输入分析单元1的步骤,直至检测结果满足输出条件,或者直至返回执行的次数到达阈值。If there is an unrecognized character in the license plate number, the detection result does not meet the output condition, and the step of inputting the structure object into the analysis unit 1 is returned to execute until the detection result meets the output condition, or until the number of times of return execution reaches the threshold.

返回执行将结构体对象输入分析单元1的步骤时,可以针对分析单元5的输出对象,将该输出对象的第三部分中存储的各分析单元的分析结果删除,并且将该输出对象的第一部分中存储的信息进行更新,比如将处理进度信息、处理过程中的错误码信息等更新为初始值,等等,具体不做限定。将经过上述处理的分析单元5的输出对象作为结构体对象输入分析单元1。When returning to the step of inputting the structure object into the analysis unit 1, for the output object of the analysis unit 5, the analysis results of each analysis unit stored in the third part of the output object may be deleted, and the first part of the output object may be deleted. The information stored in the server is updated, for example, the processing progress information, the error code information in the processing process, etc. are updated to the initial values, etc., which are not specifically limited. The output object of the analysis unit 5 that has undergone the above processing is input to the analysis unit 1 as a structure object.

或者,返回执行将结构体对象输入分析单元1的步骤时,可以重新调用组装配件,重新生成预设结构的结构体对象,将该新生成的结构体对象输入分析单元1。Alternatively, when returning to the step of inputting the structure object into the analysis unit 1 , the assembly components may be recalled to regenerate the structure object of the preset structure, and the newly generated structure object may be input into the analysis unit 1 .

输出处理结果后,调用交互配件库中的删除配件,删除分析单元5的输出对象。另外,还可以通过插件管理器卸载交互配件库和分析单元。具体的,可以根据配置文件A中包含的交互配件库的地址句柄,来释放加载交互配件库时申请的内存空间;根据配置文件B中包含的分析单元的地址句柄,来释放加载分析单元时申请的内存空间。After the processing result is output, the delete accessory in the interactive accessory library is called to delete the output object of the analysis unit 5 . In addition, the interactive accessory library and analysis unit can also be uninstalled through the plugin manager. Specifically, the memory space applied for loading the interactive accessory library can be released according to the address handle of the interactive accessory library contained in the configuration file A; the application for loading the analysis unit can be released according to the address handle of the analysis unit contained in the configuration file B memory space.

应用本实施方式,第一方面,获取到任务参数后,再加载分析单元,分析单元并不是以进程的方式持续运行,而且加载分析单元后,利用分析单元包含的线程对数据进行分析,相比于分析单元以进程方式持续运行的方案,减少了资源占用率,并且线程相比于进程更易于控制;第二方面,实现了循环机制,也就是当最后一个分析单元的输出对象不满足输出条件的情况下,循环利用各个分析单元进行分析,直至出输出对象满足输出条件,或者循环次数达到阈值,这样,可以提高处理结果的准确度;第三方面,通过两级加载,分别加载交互配件库和分析单元,针对不同的待处理数据,加载不同的交互配件库和分析单元,加载灵活可调整。Applying this embodiment, in the first aspect, the analysis unit is loaded after the task parameters are acquired. The analysis unit does not run continuously as a process, and after the analysis unit is loaded, the thread included in the analysis unit is used to analyze the data. For the solution that the analysis unit runs continuously in a process mode, the resource occupancy rate is reduced, and the thread is easier to control than the process; secondly, the loop mechanism is implemented, that is, when the output object of the last analysis unit does not meet the output conditions In the case of cyclic use of each analysis unit for analysis, until the output object meets the output conditions, or the number of cycles reaches the threshold, the accuracy of the processing results can be improved; thirdly, through two-level loading, the interactive accessories library is loaded separately And analysis unit, load different interactive accessory libraries and analysis units for different data to be processed, and the loading is flexible and adjustable.

与上述方法实施例相对应,本发明实施例还提供一种基于流式框架的数据处理装置,如图6所示,包括:Corresponding to the foregoing method embodiments, an embodiment of the present invention further provides a data processing apparatus based on a streaming framework, as shown in FIG. 6 , including:

第一获取模块601,用于获取待处理数据对应的任务参数;The first obtaining module 601 is used to obtain task parameters corresponding to the data to be processed;

确定模块602,用于根据所述任务参数,确定对所述待处理数据进行处理的分析单元、以及所述分析单元的分析顺序;其中,每个分析单元包含一个独立的线程;A determination module 602, configured to determine an analysis unit for processing the data to be processed and an analysis sequence of the analysis unit according to the task parameter; wherein each analysis unit includes an independent thread;

第一加载模块603,用于对所确定的分析单元进行加载;a first loading module 603, configured to load the determined analysis unit;

连接模块604,用于按照所述分析顺序,将所加载的每个分析单元进行连接,得到分析单元组合;a connection module 604, configured to connect each of the loaded analysis units according to the analysis sequence to obtain a combination of analysis units;

第二获取模块605,用于获取所述待处理数据;a second obtaining module 605, configured to obtain the data to be processed;

分析模块606,用于将所述待处理数据输入所述分析单元组合,利用所述分析单元组合中每个分析单元包含的线程,对所述待处理数据进行分析;An analysis module 606, configured to input the data to be processed into the combination of analysis units, and analyze the data to be processed by using a thread included in each analysis unit in the combination of analysis units;

第三获取模块607,用于根据所述分析单元组合的输出内容,获取处理结果。The third obtaining module 607 is configured to obtain the processing result according to the output content of the combination of the analysis units.

作为一种实施方式,第一获取模块601,具体可以用于:获取待处理数据对应的第一配置文件;As an implementation manner, the first obtaining module 601 may be specifically configured to: obtain a first configuration file corresponding to the data to be processed;

确定模块602,具体可以用于:The determining module 602 can be specifically used for:

根据所述第一配置文件中包含的分析单元的标识及标识顺序,确定对所述待处理数据进行处理的分析单元、以及所述分析单元的分析顺序。According to the identification and identification sequence of the analysis units contained in the first configuration file, the analysis units that process the data to be processed and the analysis sequence of the analysis units are determined.

作为一种实施方式,所述装置还可以包括:As an embodiment, the device may further include:

生成模块(图中未示出),用于针对所述待处理数据,生成预设结构的结构体对象;a generating module (not shown in the figure), for generating a structure object with a preset structure for the data to be processed;

分析模块606,具体可以用于:The analysis module 606 can be specifically used for:

将所述结构体对象输入所述分析单元组合中的第一个分析单元,利用所述第一个分析单元包含的线程,对所述结构体对象进行分析,得到分析结果,将分析结果添加至所述结构体对象,得到所述第一个分析单元的输出对象;Input the structure object into the first analysis unit in the combination of analysis units, use the thread included in the first analysis unit to analyze the structure object, obtain the analysis result, and add the analysis result to the structure object to obtain the output object of the first analysis unit;

按照所述分析顺序,依次将所述第一个分析单元之后的每个分析单元确定为当前分析单元;将当前分析单元的上一个分析单元的输出对象输入当前分析单元,利用当前分析单元包含的线程,对所述上一个分析单元的输出对象进行分析,得到分析结果,将分析结果添加至所述上一个分析单元的输出对象,得到当前分析单元的输出对象;According to the analysis sequence, successively determine each analysis unit after the first analysis unit as the current analysis unit; input the output object of the previous analysis unit of the current analysis unit into the current analysis unit, and use the The thread, analyzes the output object of the last analysis unit, obtains the analysis result, adds the analysis result to the output object of the last analysis unit, and obtains the output object of the current analysis unit;

第三获取模块607,具体可以用于:The third obtaining module 607 can be specifically used for:

根据所述分析单元组合中最后一个分析单元的输出对象,获取处理结果。The processing result is acquired according to the output object of the last analysis unit in the combination of analysis units.

作为一种实施方式,所述装置还可以包括:第一添加模块和第二添加模块(图中未示出),其中,As an implementation manner, the apparatus may further include: a first adding module and a second adding module (not shown in the figure), wherein,

第一添加模块,用于将所述第一个分析单元的输出对象添加至所述第一个分析单元的输出队列中;a first adding module, configured to add the output object of the first analysis unit to the output queue of the first analysis unit;

分析模块606,还可以用于从当前分析单元的输入队列中,按照预设队列顺序,依次读取所述上一个分析单元的输出对象;The analysis module 606 can also be used to sequentially read the output objects of the previous analysis unit from the input queue of the current analysis unit according to the preset queue sequence;

第二添加模块,用于在所述得到当前分析单元的输出对象之后,将当前单元的输出对象添加至当前分析单元的输出队列中。The second adding module is configured to add the output object of the current unit to the output queue of the current analysis unit after the output object of the current analysis unit is obtained.

作为一种实施方式,所述装置还可以包括:As an embodiment, the device may further include:

判断模块(图中未示出),用于判断所述分析单元组合中最后一个分析单元的输出对象是否满足输出条件;如果满足,触发第三获取模块607;如果不满足,触发分析模块606;Judgment module (not shown in the figure), for judging whether the output object of the last analysis unit in the analysis unit combination satisfies the output condition; if satisfied, triggers the third acquisition module 607; if not, triggers the analysis module 606;

第三获取模块607,具体可以用于:从所述最后一个分析单元的输出对象中获取处理结果。The third obtaining module 607 may be specifically configured to: obtain the processing result from the output object of the last analysis unit.

作为一种实施方式,所述装置还可以包括:第四获取模块、第二加载模块、输入模块和输出模块(图中未示出),其中,As an implementation manner, the apparatus may further include: a fourth obtaining module, a second loading module, an input module and an output module (not shown in the figure), wherein,

第四获取模块,用于获取待处理数据对应的第二配置文件;a fourth obtaining module, configured to obtain a second configuration file corresponding to the data to be processed;

第二加载模块,用于读取所述第二配置文件中包含的交互配件库的标识,对所读取的标识对应的交互配件库存进行加载,所述交互配件库中包括输入接口、输出接口、组装配件和检测配件;The second loading module is configured to read the identifier of the interactive accessory library contained in the second configuration file, and load the interactive accessory inventory corresponding to the read identifier, and the interactive accessory library includes an input interface and an output interface. , assembly accessories and testing accessories;

输入模块,用于调用所述输入接口,将所述待处理数据输入至所述交互配件库;an input module, configured to call the input interface and input the data to be processed into the interactive accessory library;

所述生成模块,具体可以用于:利用所述组装配件,将所述待处理数据进行组装,生成预设结构的结构体对象;The generating module may be specifically configured to: assemble the data to be processed by using the assembly accessories to generate a structure object with a preset structure;

所述判断模块,具体可以用于:The judging module can be specifically used for:

调用所述检测配件,对所述分析单元组合中最后一个分析单元的输出对象进行检测,判断检测结果是否满足输出条件;Invoke the detection accessory to detect the output object of the last analysis unit in the analysis unit combination, and determine whether the detection result satisfies the output condition;

输出模块,用于从所述最后一个分析单元的输出对象中获取处理结果之后,调用所述输出接口,输出所述处理结果。The output module is configured to call the output interface to output the processing result after obtaining the processing result from the output object of the last analysis unit.

作为一种实施方式,所述交互配件库中还包括删除配件,所述装置还包括:As an implementation manner, the interactive accessory library further includes deletion accessories, and the apparatus further includes:

删除模块(图中未示出),用于调用所述删除配件,删除所述最后一个分析单元的输出对象。A delete module (not shown in the figure) is used to call the delete accessory to delete the output object of the last analysis unit.

作为一种实施方式,所述装置还可以包括:As an embodiment, the device may further include:

卸载模块(图中未示出),用于在根据所述分析单元组合的输出内容,获取处理结果之后,卸载所述分析单元组合中的分析单元。An unloading module (not shown in the figure) is configured to unload the analysis units in the analysis unit combination after acquiring the processing result according to the output content of the analysis unit combination.

应用本发明图6所示实施例,获取到任务参数后,再加载分析单元,分析单元并不是以进程的方式持续运行,而且加载分析单元后,利用分析单元包含的线程对数据进行分析,相比于分析单元以进程方式持续运行的方案,减少了资源占用率。Using the embodiment shown in FIG. 6 of the present invention, after the task parameters are acquired, the analysis unit is loaded again. The analysis unit does not run continuously in a process mode, and after the analysis unit is loaded, the thread included in the analysis unit is used to analyze the data. Compared with the solution in which the analysis unit runs continuously in a process mode, the resource occupancy rate is reduced.

本发明实施例还提供了一种电子设备,如图7所示,包括处理器701和存储器702,An embodiment of the present invention further provides an electronic device, as shown in FIG. 7 , including a processor 701 and a memory 702,

存储器702,用于存放计算机程序;a memory 702 for storing computer programs;

处理器701,用于执行存储器702上所存放的程序时,实现上述任一种基于流式框架的数据处理方法。The processor 701 is configured to implement any of the above data processing methods based on the streaming framework when executing the program stored in the memory 702 .

上述电子设备提到的存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory mentioned in the above electronic device may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital SignalProcessing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; may also be a digital signal processor (Digital Signal Processing, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any relationship between these entities or operations. any such actual relationship or sequence exists. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于图6所示的基于流式框架的数据处理装置实施例、图7所示的电子设备实施例而言,由于其基本相似于图1-5所示的基于流式框架的数据处理方法实施例,所以描述的比较简单,相关之处参见图1-5所示的基于流式框架的数据处理方法实施例的部分说明即可。Each embodiment in this specification is described in a related manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiment of the data processing apparatus based on the streaming framework shown in FIG. 6 and the embodiment of the electronic device shown in FIG. 7, since they are basically similar to the data processing based on the streaming framework shown in FIGS. 1-5 Therefore, the description is relatively simple, and for related details, please refer to the partial description of the embodiment of the data processing method based on the streaming framework shown in FIG. 1-5 .

以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (15)

1. A data processing method based on a streaming framework, comprising:
acquiring task parameters corresponding to data to be processed;
determining an analysis unit for processing the data to be processed and an analysis sequence of the analysis unit according to the task parameters; wherein each analysis unit comprises an independent thread;
loading the determined analysis unit; connecting each loaded analysis unit according to the analysis sequence to obtain an analysis unit combination;
acquiring the data to be processed, inputting the data to be processed into the analysis unit combination, and analyzing the data to be processed by using threads contained in each analysis unit in the analysis unit combination;
acquiring a processing result according to the output content of the analysis unit combination;
after the data to be processed is obtained, the method further comprises the following steps: generating a structural body object with a preset structure aiming at the data to be processed;
the inputting the data to be processed into the analysis unit combination, and analyzing the data to be processed by using the thread included in each analysis unit in the analysis unit combination, includes:
inputting the structural body object into a first analysis unit in the analysis unit combination, analyzing the structural body object by using threads contained in the first analysis unit to obtain an analysis result, and adding the analysis result to the structural body object to obtain an output object of the first analysis unit;
according to the analysis sequence, sequentially determining each analysis unit behind the first analysis unit as a current analysis unit; inputting an output object of a last analysis unit of a current analysis unit into the current analysis unit, analyzing the output object of the last analysis unit by using a thread contained in the current analysis unit to obtain an analysis result, and adding the analysis result to the output object of the last analysis unit to obtain the output object of the current analysis unit;
the acquiring a processing result according to the output content of the analysis unit combination comprises:
and acquiring a processing result according to the output object of the last analysis unit in the analysis unit combination.
2. The method according to claim 1, wherein the acquiring of the task parameter corresponding to the data to be processed includes:
acquiring a first configuration file corresponding to data to be processed;
the determining, according to the task parameter, an analysis unit that processes the data to be processed and an analysis order of the analysis unit includes:
and determining an analysis unit for processing the data to be processed and an analysis sequence of the analysis unit according to the identification and the identification sequence of the analysis unit contained in the first configuration file.
3. The method of claim 1, further comprising, after said obtaining the output object of the first analysis unit:
adding the output object of the first analysis unit to the output queue of the first analysis unit;
the inputting an output object of a last analysis unit of the current analysis unit into the current analysis unit includes:
sequentially reading the output object of the last analysis unit from the input queue of the current analysis unit according to a preset queue sequence;
after the obtaining of the output object of the current analysis unit, the method further includes:
and adding the output object of the current unit to the output queue of the current analysis unit.
4. The method according to claim 1, wherein the obtaining a processing result according to an output object of a last analysis unit in the analysis unit combination comprises:
judging whether the output object of the last analysis unit in the analysis unit combination meets the output condition;
if yes, acquiring a processing result from an output object of the last analysis unit;
and if not, returning to execute the step of inputting the structural body object into the first analysis unit in the analysis unit combination.
5. The method of claim 4, further comprising, prior to obtaining the data to be processed: acquiring a second configuration file corresponding to the data to be processed;
reading an identifier of an interactive accessory library contained in the second configuration file, and loading an interactive accessory inventory corresponding to the read identifier, wherein the interactive accessory library comprises an input interface, an output interface, an assembly accessory and a detection accessory;
after the data to be processed is obtained, the method further comprises the following steps:
calling the input interface, and inputting the data to be processed into the interactive accessory library;
the generating a structural body object with a preset structure aiming at the data to be processed comprises the following steps:
assembling the data to be processed by using the assembly accessories to generate a structural body object with a preset structure;
the judging whether the output object of the last analysis unit in the analysis unit combination meets the output condition includes:
calling the detection accessory, detecting an output object of the last analysis unit in the analysis unit combination, and judging whether a detection result meets an output condition;
after obtaining the processing result from the output object of the last analysis unit, the method further includes:
and calling the output interface and outputting the processing result.
6. The method of claim 5, wherein the interactive accessory library further comprises a delete accessory, and after the processing result is output by calling the output interface, further comprises:
and calling the deletion accessory to delete the output object of the last analysis unit.
7. The method of claim 1, further comprising, after obtaining a processing result based on the output content of the analysis unit combination:
unloading the analysis units in the analysis unit combination.
8. A streaming framework-based data processing apparatus, comprising:
the first acquisition module is used for acquiring task parameters corresponding to data to be processed;
the determining module is used for determining an analysis unit for processing the data to be processed and an analysis sequence of the analysis unit according to the task parameters; wherein each analysis unit comprises an independent thread;
the first loading module is used for loading the determined analysis unit;
the connection module is used for connecting each loaded analysis unit according to the analysis sequence to obtain an analysis unit combination;
the second acquisition module is used for acquiring the data to be processed;
the analysis module is used for inputting the data to be processed into the analysis unit combination and analyzing the data to be processed by utilizing threads contained in each analysis unit in the analysis unit combination;
the third acquisition module is used for acquiring a processing result according to the output content of the analysis unit combination;
the generating module is used for generating a structural body object with a preset structure aiming at the data to be processed;
the analysis module is specifically configured to:
inputting the structural body object into a first analysis unit in the analysis unit combination, analyzing the structural body object by using threads contained in the first analysis unit to obtain an analysis result, and adding the analysis result to the structural body object to obtain an output object of the first analysis unit;
according to the analysis sequence, sequentially determining each analysis unit behind the first analysis unit as a current analysis unit; inputting an output object of a last analysis unit of a current analysis unit into the current analysis unit, analyzing the output object of the last analysis unit by using a thread contained in the current analysis unit to obtain an analysis result, and adding the analysis result to the output object of the last analysis unit to obtain the output object of the current analysis unit;
the third obtaining module is specifically configured to:
and acquiring a processing result according to the output object of the last analysis unit in the analysis unit combination.
9. The apparatus of claim 8, wherein the first obtaining module is specifically configured to: acquiring a first configuration file corresponding to data to be processed;
the determining module is specifically configured to:
and determining an analysis unit for processing the data to be processed and an analysis sequence of the analysis unit according to the identification and the identification sequence of the analysis unit contained in the first configuration file.
10. The apparatus of claim 8, further comprising: a first adding module and a second adding module, wherein,
a first adding module, configured to add the output object of the first analysis unit to the output queue of the first analysis unit;
the analysis module is further configured to sequentially read an output object of the previous analysis unit from an input queue of the current analysis unit according to a preset queue order;
and the second adding module is used for adding the output object of the current unit into the output queue of the current analysis unit after the output object of the current analysis unit is obtained.
11. The apparatus of claim 8, further comprising:
the judging module is used for judging whether the output object of the last analysis unit in the analysis unit combination meets the output condition; if yes, triggering the third acquisition module; if not, triggering the analysis module;
the third obtaining module is specifically configured to: and acquiring a processing result from an output object of the last analysis unit.
12. The apparatus of claim 11, further comprising: a fourth obtaining module, a second loading module, an input module and an output module, wherein,
the fourth acquisition module is used for acquiring a second configuration file corresponding to the data to be processed;
the second loading module is used for reading the identification of the interactive accessory library contained in the second configuration file and loading the interactive accessory inventory corresponding to the read identification, wherein the interactive accessory library comprises an input interface, an output interface, an assembly accessory and a detection accessory;
the input module is used for calling the input interface and inputting the data to be processed into the interactive accessory library;
the generation module is specifically configured to: assembling the data to be processed by using the assembly accessories to generate a structural body object with a preset structure;
the judgment module is specifically configured to:
calling the detection accessory, detecting an output object of the last analysis unit in the analysis unit combination, and judging whether a detection result meets an output condition;
and the output module is used for calling the output interface and outputting the processing result after the processing result is obtained from the output object of the last analysis unit.
13. The apparatus of claim 12, wherein the library of interaction accessories further comprises a delete accessory, the apparatus further comprising:
and the deleting module is used for calling the deleting accessory and deleting the output object of the last analysis unit.
14. The apparatus of claim 8, further comprising:
and the unloading module is used for unloading the analysis units in the analysis unit combination after acquiring the processing result according to the output content of the analysis unit combination.
15. An electronic device comprising a processor and a memory;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 7 when executing a program stored in the memory.
CN201711470644.7A 2017-12-29 2017-12-29 A data processing method, device and device based on streaming framework Active CN110007967B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711470644.7A CN110007967B (en) 2017-12-29 2017-12-29 A data processing method, device and device based on streaming framework

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711470644.7A CN110007967B (en) 2017-12-29 2017-12-29 A data processing method, device and device based on streaming framework

Publications (2)

Publication Number Publication Date
CN110007967A CN110007967A (en) 2019-07-12
CN110007967B true CN110007967B (en) 2022-05-06

Family

ID=67164072

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711470644.7A Active CN110007967B (en) 2017-12-29 2017-12-29 A data processing method, device and device based on streaming framework

Country Status (1)

Country Link
CN (1) CN110007967B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111290744B (en) * 2020-01-22 2023-07-21 北京百度网讯科技有限公司 Flow computing job processing method, flow computing system and electronic device
CN111611236A (en) * 2020-05-28 2020-09-01 宁波和利时智能科技有限公司 A data analysis method and system
CN112433866A (en) * 2020-11-25 2021-03-02 杭州视洞科技有限公司 Storm-DRPC-based face recognition performance optimization method
CN113282246B (en) * 2021-06-15 2023-07-04 杭州海康威视数字技术股份有限公司 Data processing method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546247A (en) * 2011-12-29 2012-07-04 华中科技大学 Massive data continuous analysis system suitable for stream processing
CN102542047A (en) * 2011-12-28 2012-07-04 奇智软件(北京)有限公司 Task logic library generating method, task logic library generating system, data processing method and data processing system
CN105260405A (en) * 2015-09-22 2016-01-20 北京云知声信息技术有限公司 Web crawler method and device
CN106201443A (en) * 2016-07-27 2016-12-07 福建富士通信息软件有限公司 A kind of method and system based on the Storm how concurrent written document of streaming Computational frame
US20170083378A1 (en) * 2015-09-18 2017-03-23 Salesforce.Com, Inc. Managing processing of long tail task sequences in a stream processing framework
CN106777009A (en) * 2016-12-07 2017-05-31 北京奇虎科技有限公司 Smart machine and task scheduling perform control method and device
CN107026851A (en) * 2017-03-22 2017-08-08 西安电子科技大学 A kind of real-time system guard method based on stream data processing
CN107229747A (en) * 2017-06-26 2017-10-03 湖南星汉数智科技有限公司 A kind of large-scale data processing unit and method based on Stream Processing framework

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542047A (en) * 2011-12-28 2012-07-04 奇智软件(北京)有限公司 Task logic library generating method, task logic library generating system, data processing method and data processing system
CN102546247A (en) * 2011-12-29 2012-07-04 华中科技大学 Massive data continuous analysis system suitable for stream processing
US20170083378A1 (en) * 2015-09-18 2017-03-23 Salesforce.Com, Inc. Managing processing of long tail task sequences in a stream processing framework
CN105260405A (en) * 2015-09-22 2016-01-20 北京云知声信息技术有限公司 Web crawler method and device
CN106201443A (en) * 2016-07-27 2016-12-07 福建富士通信息软件有限公司 A kind of method and system based on the Storm how concurrent written document of streaming Computational frame
CN106777009A (en) * 2016-12-07 2017-05-31 北京奇虎科技有限公司 Smart machine and task scheduling perform control method and device
CN107026851A (en) * 2017-03-22 2017-08-08 西安电子科技大学 A kind of real-time system guard method based on stream data processing
CN107229747A (en) * 2017-06-26 2017-10-03 湖南星汉数智科技有限公司 A kind of large-scale data processing unit and method based on Stream Processing framework

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"一种基于STORM的交通流数据实时处理系统设计与实现";南海京;《中国优秀博硕士学位论文全文数据库(硕士)工程科技Ⅱ辑》;20150815;C034-231 *
Vasanth Tovinkere.etc."Flow Graph Designer: A Tool for Designing and Analyzing Intel® Threading Building Blocks Flow Graphs".《2014 43rd International Conference on Parallel Processing Workshops》.2015,第149-158页. *

Also Published As

Publication number Publication date
CN110007967A (en) 2019-07-12

Similar Documents

Publication Publication Date Title
CN110007967B (en) A data processing method, device and device based on streaming framework
CN110826064B (en) A method, device, electronic device and storage medium for processing malicious files
US9442828B2 (en) Generating test scripts through application integration
CN109344061B (en) Method, device, equipment and system for detecting abnormity of interface
CN107563201B (en) Associated sample searching method and device based on machine learning and server
CN111159413A (en) Log clustering method, device, equipment and storage medium
CN108875519B (en) Object detection method, device and system and storage medium
CN111338692B (en) Vulnerability classification method, device and electronic device based on vulnerability code
CN108415826A (en) Test method, terminal device and the computer readable storage medium of application
CN110135160A (en) Method, device and system for software detection
CN105095367A (en) Method and device for acquiring client data
CN110599581B (en) Image model data processing method and device and electronic equipment
WO2014198035A1 (en) Techniques for user identification of and translation of media
CN111382428A (en) Malware identification model training method, malware identification method and device
CN110634018A (en) Feature depiction method, recognition method and related device for lost user
CN114945898A (en) Method and system for building compiler intermediate representation from TensorFlow graph
CN113190235B (en) Code analysis method and device, electronic terminal and storage medium
CN107391257B (en) Method, device and server for estimating memory capacity required by service
CN110263417B (en) A method, device and electronic equipment for obtaining timing characteristics
CN111401020A (en) Interface loading method and system and computing equipment
CN114238119B (en) Automated testing method and system for Android applications and storage medium
CN110716867A (en) Method, device and equipment for detecting multi-page jump pressure
CN115344861A (en) Malicious software detection model construction method and device and malicious software detection method and device
CN113204706A (en) Data screening and extracting method and system based on MapReduce
CN111510457A (en) Function attack detection method and device, electronic equipment and readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20250729

Address after: Rooms 602 and 605, No. 85 Xiangxue Avenue Middle, Huangpu District, Guangzhou City, Guangdong Province 510000

Patentee after: Guangzhou Gaohang Technology Transfer Co.,Ltd.

Country or region after: China

Address before: Hangzhou City, Zhejiang province 310051 Binjiang District Qianmo Road No. 555

Patentee before: Hangzhou Hikvision Digital Technology Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right