CN115129542A - Data processing method, data processing device, storage medium and electronic device - Google Patents
Data processing method, data processing device, storage medium and electronic device Download PDFInfo
- Publication number
- CN115129542A CN115129542A CN202210699966.3A CN202210699966A CN115129542A CN 115129542 A CN115129542 A CN 115129542A CN 202210699966 A CN202210699966 A CN 202210699966A CN 115129542 A CN115129542 A CN 115129542A
- Authority
- CN
- China
- Prior art keywords
- target
- data packet
- resource space
- target data
- interface
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3065—Monitoring arrangements determined by the means or processing involved in reporting the monitored data
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明公开了一种数据处理方法、装置、存储介质及电子装置。该方法包括:获取目标数据包和目标数据包对应的配置参数,其中,目标数据包为待运行的数据包,配置参数用于确定运行目标数据包待使用的资源;基于配置参数对预设编排文件中的目标占位符进行替换,得到目标编排文件,其中,目标占位符所处位置的字段为待调整的字段;基于目标编排文件确定目标资源空间,其中,目标资源空间用于为目标数据包提供一独立的运行资源;基于目标资源空间运行目标数据包,得到运行结果。本发明解决了相关技术资源空间中的数据运行时效率较低的技术问题。
The invention discloses a data processing method, device, storage medium and electronic device. The method includes: acquiring a target data package and configuration parameters corresponding to the target data package, wherein the target data package is a data package to be run, and the configuration parameters are used to determine resources to be used for running the target data package; The target placeholder in the file is replaced to obtain the target arrangement file, wherein the field where the target placeholder is located is the field to be adjusted; the target resource space is determined based on the target arrangement file, wherein the target resource space is used for the target The data package provides an independent running resource; the target data package is run based on the target resource space to obtain the running result. The present invention solves the technical problem of low data runtime efficiency in the resource space of the related art.
Description
技术领域technical field
本发明涉及大数据领域,具体而言,涉及一种数据处理方法、装置、存储介质及电子装置。The present invention relates to the field of big data, and in particular, to a data processing method, device, storage medium and electronic device.
背景技术Background technique
计费大数据的工作流程可以简单地描述为,将各个游戏的登录、支付等相关日志通过用于转发和集中日志数据的轻量级传送程序,采集至高吞吐量的分布式发布订阅消息系统中进行存储,这类日志称为业务原始日志。目前,在将这类原始日志进行数据运行过程中,是将所有作业托付给一个系统管理员进行管理,且整个运行环境也是只基于资源管理器的一个应用进行运行,如若遇到了资源管理器主节点或系统管理员发生服务不可用的情况,那么就会导致整个集群的作业全部会受到影响,难以正常运行。The workflow of billing big data can be simply described as collecting the logs related to login and payment of each game into a high-throughput distributed publish-subscribe messaging system through a lightweight transmission program for forwarding and centralizing log data. For storage, such logs are called business original logs. At present, in the process of running this kind of raw log data, all the jobs are entrusted to a system administrator for management, and the entire running environment is only based on one application of the resource manager. If the node or system administrator becomes unavailable, all the jobs of the entire cluster will be affected, making it difficult to run normally.
针对上述的问题,目前尚未提出有效的解决方案。For the above problems, no effective solution has been proposed yet.
发明内容SUMMARY OF THE INVENTION
本发明至少部分实施例提供了一种数据处理方法、装置、存储介质及电子装置,以至少解决相关技术资源空间中的数据运行时效率较低的技术问题。At least some embodiments of the present invention provide a data processing method, device, storage medium, and electronic device, so as to at least solve the technical problem of low data runtime efficiency in the resource space of the related art.
根据本发明其中一实施例,提供了一种数据处理方法,包括:获取目标数据包和目标数据包对应的配置参数,其中,目标数据包为待运行的数据包,配置参数用于确定运行目标数据包待使用的资源;基于配置参数对预设编排文件中的目标占位符进行替换,得到目标编排文件,其中,目标占位符所处位置的字段为待调整的字段;基于目标编排文件确定目标资源空间,其中,目标资源空间用于为目标数据包提供一独立的运行资源;基于目标资源空间运行目标数据包,得到运行结果。According to one embodiment of the present invention, a data processing method is provided, including: acquiring a target data packet and a configuration parameter corresponding to the target data packet, wherein the target data packet is a data packet to be run, and the configuration parameter is used to determine a running target The resource to be used by the data package; replace the target placeholder in the preset arrangement file based on the configuration parameters to obtain the target arrangement file, wherein the field where the target placeholder is located is the field to be adjusted; based on the target arrangement file Determine a target resource space, wherein the target resource space is used to provide an independent operating resource for the target data package; run the target data package based on the target resource space to obtain the operating result.
可选地,获取目标数据包对应的配置参数,包括:调用第一接口对目标数据包进行分析,得到目标运算资源,其中,目标运算资源用于表示运算目标数据包所需要的资源;基于目标运算资源确定第一参数,其中,第一参数为计算目标资源空间中的目标运算资源所需要的第一组件的数量;获取第二参数,其中,第二参数为用于管理目标资源空间的第二组件的数量;基于第一参数和第二参数,确定配置参数。Optionally, acquiring configuration parameters corresponding to the target data packet includes: calling a first interface to analyze the target data packet, and obtaining target computing resources, where the target computing resources are used to represent resources required for computing the target data packet; The computing resource determines a first parameter, where the first parameter is the number of first components required to calculate the target computing resource in the target resource space; acquires a second parameter, where the second parameter is the first parameter used to manage the target resource space The number of two components; based on the first parameter and the second parameter, the configuration parameter is determined.
可选地,该方法还包括:获取初始编排模板的目标关键字,其中,目标关键字为初始编排模板中的待调整字段;在目标关键字的预设位置添加目标下划线,得到目标占位符;基于目标占位符对初始编排模板进行调整,得到预设编排文件。Optionally, the method further includes: acquiring a target keyword of an initial arrangement template, where the target keyword is a field to be adjusted in the initial arrangement template; adding a target underline to a preset position of the target keyword to obtain a target placeholder ; Adjust the initial arrangement template based on the target placeholder to obtain a preset arrangement file.
可选地,目标资源空间与预设资源空间共享日志目录,在利用目标资源空间运行目标数据包的过程中,方法还包括:基于预设资源空间和日志目录采集目标资源空间的日志文件;基于日志文件对目标资源空间的运行目标数据包的过程进行监测,得到监测结果,其中,监测结果用于表示目标资源空间运行目标数据包的过程中是否出现异常。Optionally, the target resource space and the preset resource space share a log directory, and in the process of using the target resource space to run the target data package, the method further includes: collecting log files of the target resource space based on the preset resource space and the log directory; The log file monitors the process of running the target data package in the target resource space, and obtains a monitoring result, wherein the monitoring result is used to indicate whether an abnormality occurs in the process of running the target data package in the target resource space.
可选地,该方法还包括:响应于对预设资源空间的目标指令,停止基于日志文件对目标资源空间的处理过程进行监测,其中,目标指令在目标资源空间停止运行之后的预设时间段生成。Optionally, the method further includes: in response to the target instruction for the preset resource space, stopping monitoring the processing process of the target resource space based on the log file, wherein the target instruction is in a preset time period after the target resource space stops running. generate.
可选地,获取目标数据包和目标数据包对应的配置参数,包括:响应于对目标平台中第一界面中第一控件的触控指令,获取目标数据包,其中,第一界面用于从至少一个数据包中确定目标数据包;响应于对目标平台中第二界面的第二控件的触控指令,上传目标数据包对应的配置信息至目标平台,其中,第二界面用于对目标数据包对应的配置信息进行编辑。Optionally, acquiring the target data package and the configuration parameters corresponding to the target data package includes: in response to a touch instruction to the first control in the first interface in the target platform, acquiring the target data package, wherein the first interface is used to retrieve the target data package. Determining a target data packet in at least one data packet; in response to a touch command on a second control of a second interface in the target platform, uploading configuration information corresponding to the target data packet to the target platform, wherein the second interface is used to monitor the target data Edit the configuration information corresponding to the package.
可选地,利用目标资源空间对目标数据包进行处理,得到处理结果,包括:获取目标资源空间对应的第一版本信息;基于第一版本信息确定目标镜像,其中,目标镜像用于提供运行目标资源空间的环境;基于目标镜像和目标资源空间运行目标数据包,得到运行结果。Optionally, using the target resource space to process the target data packet to obtain a processing result, including: acquiring first version information corresponding to the target resource space; determining a target image based on the first version information, wherein the target image is used to provide a running target The environment of the resource space; run the target data package based on the target image and the target resource space, and get the operation result.
可选地,获取目标资源空间对应的第一版本信息,包括:响应于对目标平台中第三界面中第三控件的触控指令,获取目标资源空间对应的第一版本信息,其中,第三界面用于对目标资源空间对应的第一版本信息进行编辑。Optionally, acquiring the first version information corresponding to the target resource space includes: in response to a touch instruction to a third control in the third interface in the target platform, acquiring the first version information corresponding to the target resource space, wherein the third The interface is used to edit the first version information corresponding to the target resource space.
可选地,该方法还包括:响应于对目标资源空间升级指令,获取第二接口,其中,第二接口与第二版本信息关联,第二版本信息为升级后的目标资源空间对应的版本信息;将第二接口添加至第三界面。Optionally, the method further includes: in response to an upgrade instruction for the target resource space, acquiring a second interface, where the second interface is associated with second version information, and the second version information is version information corresponding to the upgraded target resource space. ;Add the second interface to the third interface.
可选地,在基于第一接口对目标数据包进行分析,得到目标运算资源之前,该方法还包括:对目标数据包进行预处理,得到预处理结果,其中,预处理结果用于表示目标数据包是否能够正常运行在目标环境中;在预处理结果为目标数据包能够正常运行在目标资源的情况下,基于第一接口对目标数据包进行分析,得到目标运算资源。Optionally, before analyzing the target data packet based on the first interface to obtain the target computing resource, the method further includes: preprocessing the target data packet to obtain a preprocessing result, wherein the preprocessing result is used to represent the target data. Whether the package can run normally in the target environment; if the preprocessing result is that the target data package can run normally on the target resource, analyze the target data package based on the first interface to obtain the target computing resource.
根据本发明其中一实施例,还提供了一种数据处理装置,该装置包括:获取模块,用于获取目标数据包和目标数据包对应的配置参数,其中,目标数据包为待运行的数据包,配置参数用于确定运行目标数据包待使用的资源;替换模块,用于基于配置参数对预设编排文件中的目标占位符进行替换,得到目标编排文件,其中,目标占位符所处位置的字段为待调整的字段;调取模块,用于基于目标编排文件确定目标资源空间,其中,目标资源空间用于为目标数据包提供一独立的运行资源;处理模块,用于基于目标资源空间运行目标数据包,得到运行结果。According to an embodiment of the present invention, a data processing apparatus is also provided, the apparatus includes: an acquisition module, configured to acquire a target data packet and a configuration parameter corresponding to the target data packet, wherein the target data packet is a data packet to be executed , the configuration parameters are used to determine the resources to be used for running the target data package; the replacement module is used to replace the target placeholders in the preset arrangement file based on the configuration parameters to obtain the target arrangement file, where the target placeholder is located The field of the location is the field to be adjusted; the calling module is used to determine the target resource space based on the target arrangement file, wherein the target resource space is used to provide an independent running resource for the target data package; the processing module is used to determine the target resource space based on the target resource The space runs the target data package and obtains the running result.
根据本发明其中一实施例,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,其中,计算机程序被设置为被处理器运行时执行上述任一项中所述的数据处理方法。According to one of the embodiments of the present invention, there is also provided a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to be executed by a processor when running any one of the above the data processing method described.
根据本发明其中一实施例,还提供了一种电子装置,包括存储器和处理器,存储器中存储有计算机程序,处理器被设置为运行计算机程序以执行上述任一项中的数据处理方法。According to one of the embodiments of the present invention, there is also provided an electronic device including a memory and a processor, a computer program is stored in the memory, and the processor is configured to run the computer program to execute any one of the above data processing methods.
在本发明至少部分实施例中,通过先获取目标数据包和目标数据包对应的配置参数,其中,目标数据包为待运行的数据包,配置参数用于确定运行目标数据包待使用的资源;之后再基于配置参数对预设编排文件中的目标占位符进行替换,得到目标编排文件,其中,目标占位符所处位置的字段为待调整的字段;紧接着基于目标编排文件确定目标资源空间,其中,目标资源空间用于为目标数据包提供一独立的运行资源;最后基于目标资源空间运行目标数据包,得到运行结果,从而实现提高对目标数据包的运行效率。容易注意到的是,可以根据配置参数和预设编排文件快速的确定出与目标数据包对应的目标编排文件,并基于目标编排文件确定出与目标数据包对应的目标资源空间,以便于通过目标资源空间将目标数据包的运行过程与其他数据包的运行过程进行隔离,为目标数据包提供一独立的运行资源,可以避免目标数据包受到其他的影响,从而可以提高目标数据包的运行效率,进而可以解决相关技术中,目标数据包的运行效率较低的问题。In at least some embodiments of the present invention, by first obtaining the target data packet and the configuration parameters corresponding to the target data packet, wherein the target data packet is the data packet to be run, and the configuration parameter is used to determine the resource to be used for running the target data packet; Then, based on the configuration parameters, the target placeholder in the preset arrangement file is replaced to obtain the target arrangement file, wherein the field where the target placeholder is located is the field to be adjusted; then the target resource is determined based on the target arrangement file space, wherein the target resource space is used to provide an independent operating resource for the target data package; finally, the target data package is run based on the target resource space to obtain the operating result, thereby improving the operating efficiency of the target data package. It is easy to notice that the target arrangement file corresponding to the target data package can be quickly determined according to the configuration parameters and the preset arrangement file, and the target resource space corresponding to the target data package can be determined based on the target arrangement file, so as to facilitate the passage of the target data package. The resource space isolates the running process of the target data packet from the running process of other data packets, and provides an independent running resource for the target data packet, which can prevent the target data packet from being affected by others, thereby improving the operation efficiency of the target data packet. Further, the problem of low operation efficiency of the target data packet in the related art can be solved.
附图说明Description of drawings
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the attached image:
图1是本发明实施例的一种数据处理方法的移动终端的硬件结构框图;1 is a block diagram of a hardware structure of a mobile terminal of a data processing method according to an embodiment of the present invention;
图2是根据本发明其中一实施例的数据处理方法的流程图;2 is a flowchart of a data processing method according to an embodiment of the present invention;
图3是根据本发明其中一实施例的运行状态显示示意图;FIG. 3 is a schematic diagram showing a running state according to an embodiment of the present invention;
图4是根据本发明其中一实施例的一种用户提交界面示意图;4 is a schematic diagram of a user submission interface according to an embodiment of the present invention;
图5是根据本发明其中一实施例的一种编辑作业界面显示示意图;5 is a schematic diagram showing an editing operation interface according to an embodiment of the present invention;
图6是根据本发明其中一实施例的一种启动作业界面显示示意图;FIG. 6 is a schematic diagram showing a startup operation interface according to an embodiment of the present invention;
图7是根据本发明其中一实施例的总体框架示意图;7 is a schematic diagram of an overall framework according to an embodiment of the present invention;
图8是根据本发明其中一实施例的数据处理装置的结构框图;8 is a structural block diagram of a data processing apparatus according to an embodiment of the present invention;
图9是根据本发明实施例的一种电子装置的示意图。FIG. 9 is a schematic diagram of an electronic device according to an embodiment of the present invention.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to make those skilled in the art better understand the solutions of the present invention, 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 Embodiments are part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second" and the like in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used may be interchanged under appropriate circumstances such that the embodiments of the invention described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.
根据本发明其中一实施例,提供了一种数据处理方法的实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。According to one of the embodiments of the present invention, an embodiment of a data processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and , although a logical order is shown in the flowcharts, in some cases steps shown or described may be performed in an order different from that herein.
该方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在移动终端上为例,该移动终端可以是智能手机(如Android手机、iOS手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile Internet Devices,简称为MID)、PAD、游戏机等终端设备。图1是本发明实施例的一种数据处理方法的移动终端的硬件结构框图。如图1所示,移动终端可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于中央处理器(CPU)、图形处理器(GPU)、数字信号处理(DSP)芯片、微处理器(MCU)、可编程逻辑器件(FPGA)、神经网络处理器(NPU)、张量处理器(TPU)、人工智能(AI)类型处理器等的处理装置)和用于存储数据的存储器104。可选地,上述移动终端还可以包括用于通信功能的传输设备106、输入输出设备108以及显示设备110。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述移动终端的结构造成限定。例如,移动终端还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiments may be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, the mobile terminal can be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a handheld computer, and a mobile Internet device (Mobile Internet Devices, referred to as MID), PAD, game consoles, etc. Terminal Equipment. FIG. 1 is a block diagram of a hardware structure of a mobile terminal according to a data processing method according to an embodiment of the present invention. As shown in FIG. 1 , the mobile terminal may include one or more (only one is shown in FIG. 1 ) processors 102 (the processors 102 may include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), a digital Processing devices for signal processing (DSP) chips, microprocessors (MCU), programmable logic devices (FPGA), neural network processors (NPU), tensor processors (TPU), artificial intelligence (AI) type processors, etc. ) and a memory 104 for storing data. Optionally, the above-mentioned mobile terminal may further include a
存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本发明实施例中的数据处理方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的数据处理方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the data processing method in the embodiment of the present invention. A functional application and data processing are implemented, that is, to implement the above-mentioned data processing method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory located remotely from the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
传输设备106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括移动终端的通信供应商提供的无线网络。在一个实例中,传输设备106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输设备106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。
输入输出设备108中的输入可以来自多个人体学接口设备(Human InterfaceDevice,简称为HID)。例如:键盘和鼠标、游戏手柄、其他专用游戏控制器(如:方向盘、鱼竿、跳舞毯、遥控器等)。部分人体学接口设备除了提供输入功能之外,还可以提供输出功能,例如:游戏手柄的力反馈与震动、控制器的音频输出等。The input in the input-output device 108 may come from a plurality of human interface devices (Human Interface Device, HID for short). For example: keyboard and mouse, gamepad, other specialized game controllers (eg: steering wheel, fishing rod, dance mat, remote control, etc.). In addition to providing input functions, some human interface devices can also provide output functions, such as force feedback and vibration of gamepads, and audio output of controllers.
显示设备110可以例如平视显示器(HUD)、触摸屏式的液晶显示器(LCD)和触摸显示器(也被称为“触摸屏”或“触摸显示屏”)。该液晶显示器可使得用户能够与移动终端的用户界面进行交互。在一些实施例中,上述移动终端具有图形用户界面(GUI),用户可以通过触摸触敏表面上的手指接触和/或手势来与GUI进行人机交互,此处的人机交互功能可选的包括如下交互:创建网页、绘图、文字处理、制作电子文档、游戏、视频会议、即时通信、收发电子邮件、通话界面、播放数字视频、播放数字音乐和/或网络浏览等、用于执行上述人机交互功能的可执行指令被配置/存储在一个或多个处理器可执行的计算机程序产品或可读存储介质中。
首先,对本发明实施例中出现的技术名词或技术术语进行如下解释说明:First, the technical terms or technical terms that appear in the embodiments of the present invention are explained as follows:
Flink:也称为Apache Flink,是一个在有界数据流和无界数据流上进行有状态计算分布式处理引擎和框架。Flink: Also known as Apache Flink, is a distributed processing engine and framework for stateful computing on bounded and unbounded data streams.
JobManager:Flink系统的管理员,负责接受处理Flink作业请求,为作业生成执行计划,并调度TaskManager为作业运行服务,同时还管理记录着作业的状态,可简称为JM。JobManager: The administrator of the Flink system, responsible for accepting and processing Flink job requests, generating execution plans for the jobs, and scheduling TaskManager to serve the job running, and also manages and records the status of the jobs, which can be referred to as JM for short.
TaskManager:Flink系统的执行者,是负责执行计算任务的主要组件简称TM,,本质是JVM,即,Java Virtual Machine,也可以称为Java虚拟机。TaskManager: The executor of the Flink system is the main component responsible for executing computing tasks, abbreviated as TM, and its essence is JVM, that is, Java Virtual Machine, which can also be called Java Virtual Machine.
CheckPoint:Flink的容错恢复机制,可用户定义执行频率,每隔一定时间为作业记录下当前运行状态存储在数据库中,当作业发生故障重启时,可从数据库中读取出当时存储的状态并将作业恢复到当时状态CheckPoint: Flink's fault-tolerant recovery mechanism, the user can define the execution frequency, record the current running status of the job at regular intervals and store it in the database. When the job fails and restarts, the stored status can be read from the database and stored in the database. The job is restored to its current state
SavePoint:Flink的作业恢复机制,是依据Flink CheckPointing机制所创建的流作业执行状态的一致镜像,需要用户手动执行、创建、删除,其中,Flink CheckPoint用于作业意外失败重启,而SavePoint一般用于作业计划性重启。SavePoint: Flink's job recovery mechanism is a consistent mirror of the execution status of streaming jobs created by the Flink CheckPointing mechanism. Users need to manually execute, create, and delete them. Among them, Flink CheckPoint is used for restarting jobs after unexpected failures, and SavePoint is generally used for jobs. Scheduled restart.
FileBeat:用于转发和集中日志数据的轻量级传送程序,在部门中主要用于日志采集与传输到Kafka进行存储。FileBeat: A lightweight delivery program for forwarding and centralizing log data. In departments, it is mainly used for log collection and transmission to Kafka for storage.
Kafka:是一种高吞吐量的分布式发布订阅消息系统,可以用于原始日志信息的存储,并提供给Flink消费使用。Kafka: It is a high-throughput distributed publish-subscribe messaging system that can be used to store raw log information and provide it for consumption by Flink.
ZooKeeper:为一个软件项目,可以为大型分布式计算提供开源的分布式配置服务、同步服务和命名注册,在Flink中可以负责存储作业运行的元信息以及提供作业故障恢复所需要的元数据,简称ZK。ZooKeeper: It is a software project that can provide open source distributed configuration services, synchronization services and naming registration for large-scale distributed computing. In Flink, it can be responsible for storing the metadata of job running and providing metadata required for job failure recovery, referred to as ZK.
RocksDB:为一款提供键值存储与读写功能的架构引擎,可以在Flink中用以作业在CheckPoint、SavePoint过程中存储作业运行状态。RocksDB: It is an architecture engine that provides key-value storage and read-write functions. It can be used in Flink to store job running status during CheckPoint and SavePoint.
Kubernetes:为一个可移植的、可扩展的开源平台,用于管理容器化的工作负载和服务,可促进声明式配置和自动化,简称K8S,在本文中作为Flink资源调控的主要工具。Kubernetes: is a portable and extensible open source platform for managing containerized workloads and services that facilitates declarative configuration and automation, or K8S for short, as the main tool for Flink resource regulation in this paper.
PersistentVolumeClaim:持久卷申领,表达的是用户对存储的请求,简称PVC。PersistentVolumeClaim: Persistent volume claim, which expresses the user's request for storage, referred to as PVC.
PersistentVolume:为持久卷,是集群中的一块存储,简称是PV。PersistentVolume: Persistent volume, a piece of storage in the cluster, referred to as PV.
Container:为容器,是可移植、可执行的轻量级的镜像,包含其中的软件及其相关依赖。Container: A container is a portable, executable lightweight image that contains the software and its related dependencies.
Image:为镜像,是保存的容器实例,可以打包应用运行所需的一组软件。Image: It is an image, which is a saved container instance that can package a set of software required for the application to run.
HDFS:Hadoop distributed File System,也称Hadoop分布式文件系统,在Flink中负责存储SavePoint,CheckPoint过程中产生的二进制文件。HDFS: Hadoop distributed File System, also known as Hadoop distributed file system, is responsible for storing binary files generated in the process of SavePoint and CheckPoint in Flink.
JFlink:为一款面向Flink用户的平台,可以用来管理Flink集群作业启停、作业生命周期控制、作业错误排查、程序运行包的版本迭代的平台。通过该平台可以维护作业版本、对作业状态查看并调整等。JFlink: It is a platform for Flink users, which can be used to manage the start and stop of Flink cluster jobs, job life cycle control, job error troubleshooting, and version iteration of program running packages. Through this platform, you can maintain the job version, view and adjust the job status, etc.
Prometheus:普罗米修斯,是一种以开源软件的形式研发的系统监控和告警工具包,Flink中有着完备的监控采集程序以及上报流程,对Flink运维提供了极大的帮助。Prometheus: Prometheus is a system monitoring and alarm toolkit developed in the form of open source software. Flink has a complete monitoring collection program and reporting process, which provides great help for Flink operation and maintenance.
监控数据:能够实时反应组件运行状态的数据,常由时间、监控指标、监控结果所构成。Monitoring data: data that can reflect the running status of components in real time, often composed of time, monitoring indicators, and monitoring results.
集群配置:表示一个Flink集群具有的基础属性,是Flink作业稳定运行的必要基础,由用户根据自身作业的资源需求而定制出的配置表。Cluster configuration: Indicates the basic attributes of a Flink cluster, which is the necessary basis for the stable operation of Flink jobs. It is a configuration table customized by users according to the resource requirements of their own jobs.
运行计划:通过官方Flink中的Plan方法得出的返回结果,提供了Flink作业拓扑图,Flink各算子作业分析等结果,可预先暴露出Flink作业在启动阶段会遇到的潜在问题。Operation plan: The return result obtained by the Plan method in the official Flink provides the Flink job topology diagram, Flink operator job analysis and other results, which can pre-expose potential problems that the Flink job will encounter during the startup phase.
编排文件:K8S集群中对资源管理和资源对象编排部署通过声明样式文件来解决,这种文件叫做资源清单文件,本文中使用编排文件创建了Flink运行在K8S上所需的必要组件。Orchestration file: The resource management and resource object orchestration and deployment in the K8S cluster are solved by declarative style files, which are called resource manifest files. In this article, the orchestration files are used to create the necessary components for Flink to run on K8S.
图2是根据本发明其中一实施例的数据处理方法的流程图,通过终端设备提供一图形用户界面,图形用户界面所显示的内容包括触控区域,如图2所示,该方法包括如下步骤:FIG. 2 is a flowchart of a data processing method according to one embodiment of the present invention. A graphical user interface is provided through a terminal device, and the content displayed on the graphical user interface includes a touch area. As shown in FIG. 2 , the method includes the following steps :
步骤S202,获取目标数据包和目标数据包对应的配置参数,其中,目标数据包为待运行的数据包,配置参数用于确定运行目标数据包待使用的资源。Step S202, acquiring the target data package and configuration parameters corresponding to the target data package, wherein the target data package is a data package to be run, and the configuration parameters are used to determine resources to be used for running the target data package.
上述目标数据包可以由用户自行在作业管理平台上传,在上传完目标数据包之后,可以对目标数据包进行配置,从而获得配置参数。可选地,该目标数据包可以包括游戏的登录、支付等相关日志。在获得目标数据包之后,可以将该目标数据包先进行清洗过滤,删除掉错误数据和重复数据,进行格式转换化为符合该作业管理平台所适配的格式,进行聚合运算将其按照数据类型分为不同的组别,最终将其存储于数据库中,之后需要用到该目标数据包时可以从数据库进行调取,将其投放在作业管理平台进行运行。The above target data package can be uploaded by the user on the job management platform. After the target data package is uploaded, the target data package can be configured to obtain configuration parameters. Optionally, the target data package may include logs related to game login, payment and the like. After obtaining the target data packet, the target data packet can be cleaned and filtered first, the wrong data and duplicate data can be deleted, the format can be converted into a format suitable for the job management platform, and the aggregation operation can be performed to classify it according to the data type. It is divided into different groups, and finally stored in the database. Later, when the target data package needs to be used, it can be retrieved from the database and placed on the job management platform for operation.
上述的配置参数可以包括作业管理平台的内存大小、日志器打印级别等。可选地,可以对如JobManager、TaskManager等作业进行配置,并确定出每个TaskManager支持的并行插槽数目等。The above configuration parameters may include the memory size of the job management platform, the print level of the logger, and the like. Optionally, jobs such as JobManager and TaskManager can be configured, and the number of parallel slots supported by each TaskManager can be determined.
步骤S204,基于配置参数对预设编排文件中的目标占位符进行替换,得到目标编排文件,其中,目标占位符所处位置的字段为待调整的字段。Step S204, the target placeholder in the preset arrangement file is replaced based on the configuration parameter to obtain the target arrangement file, wherein the field where the target placeholder is located is the field to be adjusted.
上述预设编排文件可以为预先在服务器上保留一个编排文件的模板,模板上的配置文件在关键字段上会填入一个占位符用以后续用户修改。The above-mentioned preset arrangement file may be a template of an arrangement file reserved on the server in advance, and the configuration file on the template will have a placeholder filled in key fields for subsequent user modification.
上述的目标占位符可以用来暂时代替待调整字段的位置,后续使用时可以用填入的参数替换占位符的字段,从而使得填入的参数能成功生效,进一步生成目标编排文件。The above-mentioned target placeholder can be used to temporarily replace the position of the field to be adjusted, and the field of the placeholder can be replaced with the filled parameter in subsequent use, so that the filled parameter can take effect successfully, and the target arrangement file can be further generated.
其中,由于目标占位符需要被用户频繁修改,作业的运行与该字段联系紧密,因此,目标占位符可以通过如下方式进行表示,可以在占位符字段的前后加入下划线进行区分。在一种可选的实施例中,假设{{__NAMESPACE__}}为编排文件的模板,则目标编排文件都可以根据该模板衍生而出。Among them, since the target placeholder needs to be frequently modified by the user, and the operation of the job is closely related to this field, therefore, the target placeholder can be represented in the following way, and can be distinguished by adding underscores before and after the placeholder field. In an optional embodiment, assuming that {{__NAMESPACE__}} is a template of an arrangement file, all target arrangement files can be derived according to the template.
如taskmanager.memory.process.size:__HEAP_SIZE_TM_M__就是一个编排文件模板,参数前缀与结尾带有下划线的都是目标占位符。用户通过API(ApplicationProgramming Interface应用程序编程接口)传入目标占位符字段对应的参数如:__HEAP_SIZE_TM_M__:2GB,那么API就会将参数填写进该编排文件的模板,替换成taskmanager.memory.process.size:2GB的效果,并启动集群,一套流程下来就能够让用户根据自身作业需求去提供满足需求的Flink运行集群。如若用户不提供参数,API会默认使用2GB内存作为参数入参。For example, taskmanager.memory.process.size:__HEAP_SIZE_TM_M__ is a layout file template, and the parameter prefix and the end with an underscore are target placeholders. The user passes in the parameters corresponding to the target placeholder field through the API (ApplicationProgramming Interface), such as: __HEAP_SIZE_TM_M__: 2GB, then the API will fill in the parameters into the template of the arrangement file and replace it with taskmanager.memory.process.size : 2GB effect, and start the cluster, a set of processes allows users to provide a Flink running cluster that meets their needs according to their own job needs. If the user does not provide parameters, the API will use 2GB of memory as the parameter input by default.
可选地,编排文件的模板中的配置参数可以包含JobManager和TaskManager的控制器编排文件、挂载磁盘文件、域名路由入口文件(也称Image文件)、Flink集群配置文件以及集群启停的脚本。Optionally, the configuration parameters in the template of the orchestration file may include the controller orchestration file of JobManager and TaskManager, the mount disk file, the domain name routing entry file (also called the image file), the Flink cluster configuration file, and the cluster start and stop scripts.
可选地,通过占位符对要修改的关键字进行处理,可以得到具有占位符的预设编排文件,从而便于不同的数据包使用。Optionally, by processing the keywords to be modified through placeholders, a preset arrangement file with placeholders can be obtained, thereby facilitating the use of different data packages.
步骤S206,基于目标编排文件确定目标资源空间,其中,目标资源空间用于为目标数据包提供一独立的运行资源。Step S206, determining a target resource space based on the target arrangement file, wherein the target resource space is used to provide an independent operating resource for the target data package.
上述目标编排文件可以由预设编排文件生成,可选地,可以在预设编排文件的占位符上进行修改,填入参数,从而生成目标编排文件。其中,目标编排文件是能够正确启动Flink集群的关键。The above-mentioned target arrangement file may be generated from a preset arrangement file. Optionally, the placeholder of the preset arrangement file may be modified, and parameters may be filled in, thereby generating the target arrangement file. Among them, the target orchestration file is the key to correctly start the Flink cluster.
上述目标资源空间可以用来提供一个独立的运行资源,以便能够将不同的数据包运行进行隔离,以便当一个作业的JobManager发生了服务不可用的情况,其他作业都不会受到波及,可选地,目标资源空间可以为Flink集群。The above target resource space can be used to provide an independent running resource so that different data packets can be run in isolation, so that when a job's JobManager becomes unavailable, other jobs will not be affected. Optionally , the target resource space can be a Flink cluster.
在一种可选的实施例中,可以使用K8S的名称空间概念(也称NameSpace概念),为用户的每个作业生成一个独立的NameSpace,确保该NameSpace下的JobManager与TaskManager只为一个作业服务,即当有A作业被提交到集群中,那么在K8S中会为A作业申请一个名为N_A的资源空间,上面只运行着该作业所需的任务管理器的数量与JM数量,其中JM可以为一种模型,作业独占N_A资源且与其他作业资源空间如:N_B,N_C互不干涉,这么一来,就能够将作业与作业隔离开来,达到了Per Job的运行模式,即,每个作业独有一个JobManager。即,目标资源空间可以提供出一个独立的运行资源,从而使得同时进行作业的不同的数据包之间可以隔开,即使当一个作业的JobManager发生了服务不可用,也不会影响到其他作业的进行情况。In an optional embodiment, the namespace concept (also called the NameSpace concept) of K8S can be used to generate an independent NameSpace for each job of the user to ensure that the JobManager and TaskManager under the NameSpace only serve one job. That is, when a job A is submitted to the cluster, a resource space named N_A will be applied for the job A in K8S, and only the number of task managers and the number of JMs required to run the job are on it, where JM can be A model in which jobs exclusively occupy N_A resources and do not interfere with other job resource spaces such as N_B, N_C. In this way, jobs can be isolated from jobs and achieve the running mode of Per Job, that is, each job There is only one JobManager. That is, the target resource space can provide an independent running resource, so that different data packages that are running jobs at the same time can be separated. Even when the JobManager of a job becomes unavailable, it will not affect other jobs. progress.
步骤S208,基于目标资源空间运行目标数据包,得到运行结果。Step S208, run the target data package based on the target resource space to obtain the running result.
在一种可选的实施例中,当已经确定出独立的运行资源之后,即,目标资源空间之后,可以运行目标数据包,从而得到运行结果。图3是根据本发明其中一实施例的运行状态显示示意图,如图3所示,当用户按下启动按钮后,界面将会已进度条形式来显示运行状态,其中,进度条可以为长条状,或扇形。In an optional embodiment, after the independent running resource has been determined, that is, after the target resource space, the target data package can be run to obtain the running result. FIG. 3 is a schematic diagram showing the running state according to one embodiment of the present invention. As shown in FIG. 3 , after the user presses the start button, the interface will display the running state in the form of a progress bar, wherein the progress bar may be a long bar shaped, or fan-shaped.
通过上述步骤,先获取目标数据包和目标数据包对应的配置参数,其中,目标数据包为待运行的数据包,配置参数用于确定运行目标数据包待使用的资源;之后再基于配置参数对预设编排文件中的目标占位符进行替换,得到目标编排文件,其中,目标占位符所处位置的字段为待调整的字段;紧接着基于目标编排文件确定目标资源空间,其中,目标资源空间用于为目标数据包提供一独立的运行资源;最后基于目标资源空间运行目标数据包,得到运行结果,从而实现提高对目标数据包的运行效率。容易注意到的是,可以根据配置参数和预设编排文件快速的确定出与目标数据包对应的目标编排文件,并基于目标编排文件确定出与目标数据包对应的目标资源空间,以便于通过目标资源空间将目标数据包的运行过程与其他数据包的运行过程进行隔离,为目标数据包提供一独立的运行资源,可以避免目标数据包受到其他的影响,从而可以提高目标数据包的运行效率,进而可以解决相关技术中,目标数据包的运行效率较低的问题。Through the above steps, first obtain the target data package and the configuration parameters corresponding to the target data package, wherein the target data package is the data package to be run, and the configuration parameters are used to determine the resources to be used for running the target data package; The target placeholder in the preset arrangement file is replaced to obtain the target arrangement file, wherein the field where the target placeholder is located is the field to be adjusted; then the target resource space is determined based on the target arrangement file, wherein the target resource The space is used to provide an independent operating resource for the target data package; finally, the target data package is run based on the target resource space to obtain the operating result, thereby improving the operating efficiency of the target data package. It is easy to notice that the target arrangement file corresponding to the target data package can be quickly determined according to the configuration parameters and the preset arrangement file, and the target resource space corresponding to the target data package can be determined based on the target arrangement file, so as to facilitate the passage of the target data package. The resource space isolates the running process of the target data packet from the running process of other data packets, and provides an independent running resource for the target data packet, which can prevent the target data packet from being affected by others, thereby improving the operation efficiency of the target data packet. Further, the problem of low operation efficiency of the target data packet in the related art can be solved.
可选地,获取目标数据包对应的配置参数,包括:调用第一接口对目标数据包进行分析,得到目标运算资源,其中,目标运算资源用于表示运算目标数据包所需要的资源;基于目标运算资源确定第一参数,其中,第一参数为计算目标资源空间中的目标运算资源所需要的第一组件的数量;获取第二参数,其中,第二参数为用于管理目标资源空间的第二组件的数量;基于第一参数和第二参数,确定配置参数。Optionally, acquiring configuration parameters corresponding to the target data packet includes: calling a first interface to analyze the target data packet, and obtaining target computing resources, where the target computing resources are used to represent resources required for computing the target data packet; The computing resource determines a first parameter, where the first parameter is the number of first components required to calculate the target computing resource in the target resource space; acquires a second parameter, where the second parameter is the first parameter used to manage the target resource space The number of two components; based on the first parameter and the second parameter, the configuration parameter is determined.
上述第一接口可以为API接口,该接口用于对目标数据包进行分析,从而得到目标运算资源,可选地,在对目标数据包进行分析,得到目标运算资源之后,用户的请求将会发送至API后台程序,进一步的基于目标运算资源确定第一参数。The above-mentioned first interface may be an API interface, which is used to analyze the target data packet to obtain the target computing resource. Optionally, after the target data packet is analyzed to obtain the target computing resource, the user's request will be sent To the API background program, the first parameter is further determined based on the target computing resource.
上述第一参数为计算目标资源空间中的目标运算资源所需要的第一组件的数量,可选地,第一组件数量可以为TaskManager的数目。The above-mentioned first parameter is the number of first components required to calculate the target computing resources in the target resource space, and optionally, the number of first components may be the number of TaskManagers.
上述第二参数可以为用于管理目标资源空间的第二组件的数量,可选地,第二组件数量可以为JobManager的数量。The above-mentioned second parameter may be the number of second components for managing the target resource space, and optionally, the number of second components may be the number of JobManagers.
在一种可选的实施例中,在进行确定配置参数时,可以先确定出TaskManager的数目和JobManager的数量,进一步的再确定出TaskManager所支持的并行插槽数目、JobManager与TaskManager所对应的内存大小、日志器打印级别等相关配置参数。In an optional embodiment, when determining configuration parameters, the number of TaskManagers and the number of JobManagers may be determined first, and then the number of parallel slots supported by TaskManagers and the memory corresponding to JobManagers and TaskManagers may be determined. Size, logger print level and other related configuration parameters.
可选地,该方法还包括:获取初始编排模板的目标关键字,其中,目标关键字为初始编排模板中的待调整字段;在目标关键字的预设位置添加目标下划线,得到目标占位符;基于目标占位符对初始编排模板进行调整,得到预设编排文件。Optionally, the method further includes: acquiring a target keyword of an initial arrangement template, where the target keyword is a field to be adjusted in the initial arrangement template; adding a target underline to a preset position of the target keyword to obtain a target placeholder ; Adjust the initial arrangement template based on the target placeholder to obtain a preset arrangement file.
上述预设位置可以为待调整字段的前后位置。The above-mentioned preset positions may be the front and rear positions of the fields to be adjusted.
上述目标下划线可以为在预设位置添加的下划线。The above target underline may be an underline added at a preset position.
在一种可选的实施例中,可以在初始编排模板的待调整字段的前后位置添加目标下划线,并将其确定为目标占位符,得到具有目标占位符的预设编排文件,可选地,在后续使用过程中,用户只需在目标占位符上填入用来替换目标占位符的关键词即可。In an optional embodiment, a target underline may be added before and after the to-be-adjusted field of the initial layout template, and it is determined as the target placeholder to obtain a preset layout file with the target placeholder, optional In the subsequent use process, the user only needs to fill in the keyword used to replace the target placeholder on the target placeholder.
以TaskManager-deployment为例,比较关键的字段可以为副本数据,其中,副本数量可以为工作组件的数目,即一个工作组件可以同时处理一个任务流程。这个字段决定了TaskManager的数量,即计算任务的主要组件的数量。只有TaskManager数量足够支撑一个作业的最大算子数时,作业才能够运行起来,在模板中,可以使用{{__SLOT_TM__}}关键字作为占位符,当API分析出了用户数据包中作业的最大算子数目后,会以该数目对占位符进行替换,以此保证集群中启动足够的TaskManager供作业运行。Taking TaskManager-deployment as an example, the key field can be replica data, where the number of replicas can be the number of work components, that is, one work component can process one task process at the same time. This field determines the number of TaskManagers, i.e. the number of main components that compute tasks. The job can run only when the number of TaskManagers is enough to support the maximum number of operators of a job. In the template, you can use the {{__SLOT_TM__}} keyword as a placeholder. When the API analyzes the maximum number of jobs in the user data packet After the number of operators, the placeholders will be replaced with this number to ensure that enough TaskManagers are started in the cluster for jobs to run.
可选地,目标资源空间与预设资源空间共享日志目录,在利用目标资源空间运行目标数据包的过程中,方法还包括:基于预设资源空间和日志目录采集目标资源空间的日志文件;基于日志文件对目标资源空间的运行目标数据包的过程进行监测,得到监测结果,其中,监测结果用于表示目标资源空间运行目标数据包的过程中是否出现异常。Optionally, the target resource space and the preset resource space share a log directory, and in the process of using the target resource space to run the target data package, the method further includes: collecting log files of the target resource space based on the preset resource space and the log directory; The log file monitors the process of running the target data package in the target resource space, and obtains a monitoring result, wherein the monitoring result is used to indicate whether an abnormality occurs in the process of running the target data package in the target resource space.
上述预设资源空间可以与目标资源空间进行共享日志目录,从而实现对目标资源空间的监测,可选地,预设资源空间可以为Filebeat集群。The above preset resource space may share a log directory with the target resource space, so as to monitor the target resource space. Optionally, the preset resource space may be a Filebeat cluster.
在一种可选的实施例中,在采集Flink日志时,可以将Flink与Filebeat两个K8S容器(Container),共用一个Pod的模式进行处理,其中,Pod模式为一种共享模式,使用该模式,Filebeat与Flink可以通过共享目录的方式,使得日志路径相互可见,Flink日志可以打在日志目录上,而Filebeat则实时采集着日志目录上的日志文件,其中,Filebeat可以用于转发和集中日志数据的轻量级传送程序,在部门中主要用于日志采集与传输到Kafka进行存储保证日志采集完。In an optional embodiment, when collecting Flink logs, two K8S containers (Containers), Flink and Filebeat, can be processed in a shared Pod mode, where the Pod mode is a shared mode, and this mode is used. , Filebeat and Flink can share directories to make the log paths visible to each other, Flink logs can be printed on the log directory, and Filebeat collects log files in the log directory in real time. Among them, Filebeat can be used to forward and centralize log data. The lightweight delivery program is mainly used in the department for log collection and transmission to Kafka for storage to ensure that the log is collected.
在另一种可选地实施例中,可以使用Flink支持的监测数据采集程序(也称exporter)监测组件,在配置中开启exporter后,系统会自动采集Flink运行过程中Java虚拟机(Java Virtual Machine也称JVM)的各种状态并上报到一个预设地址,其中,预设地址可以由用户自行设置,同一K8S集群内的Prometheus会识别exporter上报的预设地址,根据预设地址拿到数据并进行存储、聚合,最终由运维人员将数据绘制在开源数据可视化工具(也称Grafana)表格上。可选地,根据监测状态将监测数据上报到预设地址,基于预设地址对监测数据进行处理,从而得到与监测数据对应的目标表格。In another optional embodiment, a monitoring data collection program (also called exporter) supported by Flink can be used to monitor components. After exporter is enabled in the configuration, the system will automatically collect the Java Virtual Machine (Java Virtual Machine) during Flink running. Also known as JVM) various states and report to a preset address, where the preset address can be set by the user, Prometheus in the same K8S cluster will recognize the preset address reported by the exporter, get the data according to the preset address and For storage, aggregation, and finally, the operation and maintenance personnel draw the data on the table of the open source data visualization tool (also called Grafana). Optionally, the monitoring data is reported to a preset address according to the monitoring state, and the monitoring data is processed based on the preset address, thereby obtaining a target table corresponding to the monitoring data.
可选地,该方法还包括:响应于对预设资源空间的目标指令,停止基于日志文件对目标资源空间的处理过程进行监测,其中,目标指令在目标资源空间停止运行之后的预设时间段生成。Optionally, the method further includes: in response to the target instruction for the preset resource space, stopping monitoring the processing process of the target resource space based on the log file, wherein the target instruction is in a preset time period after the target resource space stops running. generate.
上述目标指令可以为目标资源空间停止运行之后的预设时间段生成的一种计算机指令,其中,预设时间可以由用户自行规定。可选地,目标指令可以作用于目标资源空间,响应于目标指令,可以停止基于日志文件对目标资源空间的处理过程中所进行的监测。The above target instruction may be a computer instruction generated in a preset time period after the target resource space stops running, wherein the preset time may be specified by the user. Optionally, the target instruction may act on the target resource space, and in response to the target instruction, the monitoring performed during the processing of the target resource space based on the log file may be stopped.
在一种可选的实施例中,由于需要考虑保证日志采集的完整性,因此可以为Filebeat添加了如下指令:In an optional embodiment, since the integrity of log collection needs to be considered, the following instructions can be added to Filebeat:
进一步的,采用该指令,可以使得Filebeat等Flink停止运行后才开始停止Filebeat的采集,从而保证了日志能够采集完整。Further, using this command can make Filebeat stop the collection of Filebeat after Flink stops running, thus ensuring that the log can be collected completely.
可选地,获取目标数据包和目标数据包对应的配置参数,包括:响应于对目标平台中第一界面中第一控件的触控指令,获取目标数据包,其中,第一界面用于从至少一个数据包中确定目标数据包;响应于对目标平台中第二界面的第二控件的触控指令,上传目标数据包对应的配置信息至目标平台,其中,第二界面用于对目标数据包对应的配置信息进行编辑。Optionally, acquiring the target data package and the configuration parameters corresponding to the target data package includes: in response to a touch instruction to the first control in the first interface in the target platform, acquiring the target data package, wherein the first interface is used to retrieve the target data package. Determining a target data packet in at least one data packet; in response to a touch command on a second control of a second interface in the target platform, uploading configuration information corresponding to the target data packet to the target platform, wherein the second interface is used to monitor the target data Edit the configuration information corresponding to the package.
上述目标平台可以面向Flink用户,其可以管理Flink集群作业启停、作业生命周期控制、作业错误排查、程序运行包的版本迭代的平台。用户可通过该平台维护作业版本、对作业状态查看并调整等。可选地,目标平台可以为JFlink平台。The above target platform can be oriented to Flink users, which can manage the start and stop of Flink cluster jobs, job life cycle control, job error troubleshooting, and version iteration of program running packages. Users can maintain job versions, view and adjust job status through this platform. Optionally, the target platform can be the JFlink platform.
上述第一控件可以为第一界面中用于获取目标数据包的控件,可选地,在用户需要获取目标数据包时,用户可以通过对该控件进行触控操作,以发出触控指令,基于该触控指令可以获取目标数据包。The above-mentioned first control may be a control used to obtain the target data packet in the first interface. Optionally, when the user needs to obtain the target data packet, the user may perform a touch operation on the control to issue a touch command, based on the The touch command can acquire the target data packet.
上述第二控件可以为第二界面中用于上传目标数据包对应的配置信息至目标平台的控件,可选地,在用户需要上传目标数据包对应的配置信息至目标平台时,可以通过对该控件进行触控操作,从而发出触控指令,基于该触控指令可以上传目标数据包对应的配置信息至目标平台。The above-mentioned second control may be a control in the second interface for uploading the configuration information corresponding to the target data packet to the target platform. Optionally, when the user needs to upload the configuration information corresponding to the target data packet to the target platform, the The control performs a touch operation, thereby issuing a touch command, and based on the touch command, the configuration information corresponding to the target data packet can be uploaded to the target platform.
在一种可选的实施例中,JFlink平台可以通过作业模板来管理数据包,由于数据包会频繁迭代版本,因此会导致多个版本的数据包可以同时存在作业模板中。当将其引进到作业模板时,用户启动作业时选定了作业模板后,可以查看到全部版的数据包,通过“点击上传”操作,可以将其上传至该作业模板下的数据包列表,并根据自身需求去启动对应版本的数据包,从而完成数据包到目标平台的上传。In an optional embodiment, the JFlink platform can manage data packages through job templates. Since data packages frequently iterate versions, data packages of multiple versions can exist in the job template at the same time. When it is introduced into the job template, after the user selects the job template when starting the job, he can view all versions of the data package, and through the "click to upload" operation, it can be uploaded to the data package list under the job template. And start the corresponding version of the data package according to its own needs, so as to complete the upload of the data package to the target platform.
在另一种可选的实施例中,可以配置作业名称、Flink作业运行入口、负责人、启动参数、以及定时保存点,从而实现编辑作业。其中,定时保存点可以用于在发现执行完上一语句时发现语句写错时可以回退到之前状态。可选地,当后台作业模板有好几个版本时,每个flink版本是不同的,作业要根据需要的版本来默认启动集群,其主要作用是确定目标版本负责人主要用于接收警报,在K8S有问题的时候发送警报。In another optional embodiment, the job name, the Flink job running entry, the person in charge, the startup parameters, and the timed save point can be configured, so as to realize the editing of the job. Among them, the timed savepoint can be used to roll back to the previous state when it is found that the statement is written incorrectly when the previous statement is found to be executed. Optionally, when there are several versions of the background job template, each flink version is different, and the job should start the cluster by default according to the required version. Its main function is to determine the target version owner mainly for receiving alerts. Send alerts when something goes wrong.
图4是根据本发明其中一实施例的一种用户提交界面显示示意图,如图4所示,在上传程序包界面,需要用户填写模板名、标识信息、项目名,填写完成之后就可以上传数据包,用户可以点击上传按钮,同时将版本后缀选择为无后缀,并填写版本号,所有信息都确保无误后可以点击确定,若有错误信息可以点击取消,并重新填写处正确的信息。Fig. 4 is a schematic diagram showing a user submission interface according to one embodiment of the present invention. As shown in Fig. 4, in the uploading program package interface, the user needs to fill in the template name, identification information, and project name, and the data can be uploaded after the filling is completed. package, the user can click the upload button, at the same time select the version suffix as no suffix, and fill in the version number, and click OK after all information is ensured.
可选地,利用目标资源空间对目标数据包进行处理,得到处理结果,包括:获取目标资源空间对应的第一版本信息;基于第一版本信息确定目标镜像,其中,目标镜像用于提供运行目标资源空间的环境;基于目标镜像和目标资源空间运行目标数据包,得到运行结果。Optionally, using the target resource space to process the target data packet to obtain a processing result, including: acquiring first version information corresponding to the target resource space; determining a target image based on the first version information, wherein the target image is used to provide a running target The environment of the resource space; run the target data package based on the target image and the target resource space, and get the operation result.
上述第一版本信息可以为未升级之前目标资源空间的版本信息,其中,版本信息可以为版本号,版本名称等。The above-mentioned first version information may be the version information of the target resource space before the upgrade, wherein the version information may be a version number, a version name, and the like.
上述目标镜像可以用于提供运行目标资源空间的环境,基于目标镜像可以确定K8S会使用哪个版本的Flink镜像去启动Flink集群,可选地,若镜像版本缺失,运维人员可以快速地进行打包制作,在没有特殊环境需求的情况下,可以直接用从镜像仓库中拉取或者更新指定镜像,即采用docker pull flink指令获取到镜像。若有特殊环境需求,可以按照以下步骤:The above target image can be used to provide an environment for running the target resource space. Based on the target image, it can be determined which version of the Flink image K8S will use to start the Flink cluster. Optionally, if the image version is missing, the operation and maintenance personnel can quickly package and make , in the absence of special environmental requirements, you can directly pull or update the specified image from the mirror repository, that is, use the docker pull flink command to obtain the image. If you have special environmental needs, you can follow the steps below:
步骤1:docker pull flink:version。Step 1: docker pull flink:version.
拉取最新的flink,version为用户需要的版本。Pull the latest flink, version is the version required by the user.
步骤2:docker images|grep flink。Step 2: docker images|grep flink.
查看刚刚拉取下来的镜像ID。Check the image ID you just pulled.
步骤3:docker run-it镜像ID/bin/bash。Step 3: docker run-it image ID /bin/bash.
进入镜像,可以通过应用验证下版本,保持运行的状态,进入镜像后可以根据用户的需求安装所需的基础软件以及进行环境的创建。After entering the image, you can verify the next version through the application and keep it running. After entering the image, you can install the required basic software and create the environment according to the user's needs.
步骤4:docker ps获取容器ID。Step 4: docker ps to get the container ID.
获取到容器ID后,可以进行文件的复制等操作。After obtaining the container ID, you can perform operations such as file copying.
步骤5:文件复制。Step 5: File Copy.
docker cp,数据容器id:/opt/flink/lib/。docker cp, data container id: /opt/flink/lib/.
步骤6:登录镜像中心。Step 6: Log in to the mirror center.
docker login url。docker login url.
步骤7:标记镜像。Step 7: Tag the mirror.
docker tag flink:version url:version。docker tag flink:version url:version.
步骤8:推送到镜像中心。Step 8: Push to mirror center.
docker push url:version。docker push url:version.
进一步的,一个完善的镜像一经制成就可以全用户通用,达到一劳永逸的效果。Further, once a perfect image is made, it can be used by all users to achieve the effect once and for all.
图5是根据本发明其中一实施例的一种编辑作业界面显示示意图,如图5所示,在新建作业界面,用户可以选择作业模板,,并填写作业名,作业名可以控制在100字以内,并选择默认启动集群、指定入口、以及主负责人,其中,负责人可以用于接收警报,在K8S出现问题时发出警报。同时进行作业描述,填写启动参数,并选择保存点配置,其中,保存点配置可以选择不配置、每小时进行一次配置、每半天进行一次配置或每一天进行一次配置。可选地,后台作业模板有好几个版本,每个flink版本是不同的,作业要根据需要的版本来默认启动集群,通过编辑作业界面的配置,可以确定出目标版本。Fig. 5 is a schematic diagram showing an editing job interface according to one embodiment of the present invention. As shown in Fig. 5, in the new job interface, the user can select a job template, and fill in the job name, and the job name can be controlled within 100 characters , and choose to start the cluster by default, specify the entrance, and the main person in charge, where the person in charge can be used to receive alerts and issue alerts when there is a problem with K8S. At the same time, describe the job, fill in the startup parameters, and select the savepoint configuration. The savepoint configuration can be selected from no configuration, configuration every hour, configuration every half day, or configuration every day. Optionally, there are several versions of the background job template, and each flink version is different. The job should start the cluster by default according to the required version. By editing the configuration of the job interface, the target version can be determined.
可选地,获取目标资源空间对应的第一版本信息,包括:响应于对目标平台中第三界面中第三控件的触控指令,获取目标资源空间对应的第一版本信息,其中,第三界面用于对目标资源空间对应的第一版本信息进行编辑。Optionally, acquiring the first version information corresponding to the target resource space includes: in response to a touch instruction to a third control in the third interface in the target platform, acquiring the first version information corresponding to the target resource space, wherein the third The interface is used to edit the first version information corresponding to the target resource space.
上述的第三控件可以为第三界面的控件,其中,第三控件可以发出触控指令,响应于该触控指令,系统将会获取目标资源空间对应的第一版本信息。The above-mentioned third control may be a control of a third interface, wherein the third control may issue a touch command, and in response to the touch command, the system will acquire the first version information corresponding to the target resource space.
在一种可选的实施例中,用户可以手动选择启动作业的数据包版本、启动的集群,并手动配置运行作业所需的集群配置,其中的参数都是编排文件中的预留字段。In an optional embodiment, the user can manually select the version of the data package to start the job, the cluster to start, and manually configure the cluster configuration required for running the job, where the parameters are reserved fields in the orchestration file.
图6是根据本发明其中一实施例的一种启动作业界面显示示意图,如图6所示,在启动作业界面,可以先选择作业模板、当前使用版本、启动版本、启动集群、资源策略,在选择完上述信息后,还需填入任务管理器数量,以及每个任务管理器内的插槽数,任务管理器内存以及模型内存之后可以点击确定,若信息有误,可以点击取消,再重新填入。FIG. 6 is a schematic diagram showing a startup job interface according to one embodiment of the present invention. As shown in FIG. 6 , in the startup job interface, you can first select a job template, a currently used version, a startup version, a startup cluster, and a resource policy. After selecting the above information, you need to fill in the number of task managers, the number of slots in each task manager, the memory of the task manager and the model memory, and you can click OK. If the information is wrong, you can click Cancel and try again. fill in.
可选地,该方法还包括:响应于对目标资源空间升级指令,获取第二接口,其中,第二接口与第二版本信息关联,第二版本信息为升级后的目标资源空间对应的版本信息;将第二接口添加至第三界面。Optionally, the method further includes: in response to an upgrade instruction for the target resource space, acquiring a second interface, where the second interface is associated with second version information, and the second version information is version information corresponding to the upgraded target resource space. ;Add the second interface to the third interface.
上述第二版本信息可以为升级后目标资源空间的版本信息,其中,版本信息可以为版本号,版本名称等。The above-mentioned second version information may be version information of the target resource space after the upgrade, where the version information may be a version number, a version name, and the like.
上述第二接口可以为在升级过程中新搭建的接口。The above-mentioned second interface may be an interface newly built during the upgrade process.
在一种可选的实施例中,在对K8S集群升级的操作中,可以再搭建一个高版本的K8S,这时候只需要在该集群再次搭建一个JAVA应用程序接口的服务,JFLink使用数据库存储的数据版本与API的关系,当新增版本的时候,就向数据库插入对应的版本号以及版本对应的API地址,如:新增Flink 1.14.3版本,则insert into table(flink,v1.14.3,API),用户在选择启动集群界面,可查看到目前数据库中存储到的全部Flink版本,用户选中需求版本后,就能根据对应的API拉起正确的Flink版本集群,通过这样的版本切换,用户也就能轻松地完成作业的迁移。In an optional embodiment, in the operation of upgrading the K8S cluster, a higher version of K8S can be built. At this time, it is only necessary to build a JAVA application program interface service in the cluster again. JFLink uses the database stored The relationship between the data version and the API. When adding a new version, insert the corresponding version number and the API address corresponding to the version into the database. API), users can view all Flink versions stored in the current database when they choose to start the cluster interface. After the user selects the required version, the correct Flink version cluster can be launched according to the corresponding API. Through such version switching, the user can Migration of jobs can also be done easily.
采用上述部署模式的可以使得操作便捷灵活,可让用户自行选择配置,达到资源利用最大化外,进一步的,对于集群的迁移也有着十分显著的帮助,再给定一个任意的K8S集群后,能够快速的搭建起Flink环境。Using the above deployment mode can make the operation convenient and flexible, allowing users to choose the configuration by themselves to maximize resource utilization, and further, it is also very helpful for cluster migration. After giving an arbitrary K8S cluster, it can be Quickly build a Flink environment.
可选地,在基于第一接口对目标数据包进行分析,得到目标运算资源之前,该方法还包括:对目标数据包进行预处理,得到预处理结果,其中,预处理结果用于表示目标数据包是否能够正常运行在目标环境中;在预处理结果为目标数据包能够正常运行在目标资源的情况下,基于第一接口对目标数据包进行分析,得到目标运算资源。Optionally, before analyzing the target data packet based on the first interface to obtain the target computing resource, the method further includes: preprocessing the target data packet to obtain a preprocessing result, wherein the preprocessing result is used to represent the target data. Whether the package can run normally in the target environment; if the preprocessing result is that the target data package can run normally on the target resource, analyze the target data package based on the first interface to obtain the target computing resource.
上述预处理可以为在基于第一接口对目标数据包进行分析之前对目标数据包进行的一步操作,通过预处理,可以得到预处理结果,该结果可以用来表示目标数据包是否损坏,或因环境不通而无法运行等问题。可选地,在目标数据包正常可用的情况下可以对目标数据包进行分析,从而的到目标运算资源。The above-mentioned preprocessing can be a one-step operation on the target data packet before analyzing the target data packet based on the first interface. Through preprocessing, a preprocessing result can be obtained, and the result can be used to indicate whether the target data packet is damaged or not. The environment is blocked and cannot be run. Optionally, when the target data packet is normally available, the target data packet may be analyzed, thereby obtaining the target computing resource.
在一种可选的实施例中,在获取到目标数据包和目标数据包对应的配置参数之后,作业管理平台可以接收到用户所发出的数据处理的请求,该请求可以发送至API后台程序,响应于该数据处理请求,目标数据包可以被发送到Flink客户端进行预处理操作。可选地,该操作能够对用户目标数据包进行分析,从而得到该目标数据包运行所需的最大TaskManager数目,同时也可提前暴露因目标数据包损坏,环境不通等无法运行问题。最终经过分析得到的可以正常运还行的目标数据包会被API后台程序写进TaskManager、JobManager中,使用这些编排文件向集群大脑(即集群中的管理者,不参与执行,也称K8Smaster)发出请求,就能够拉起一个满足用户作业运行的Flink on K8S集群。In an optional embodiment, after acquiring the target data package and the configuration parameters corresponding to the target data package, the job management platform may receive a data processing request sent by the user, and the request may be sent to the API background program, In response to this data processing request, the target data packet can be sent to the Flink client for preprocessing operations. Optionally, this operation can analyze the target data packet of the user, thereby obtaining the maximum number of TaskManagers required for the operation of the target data packet, and at the same time, it can also expose in advance the problem that the target data packet cannot be run due to damage to the target data packet and the environment is blocked. Finally, the target data packets that can run normally and are obtained after analysis will be written into TaskManager and JobManager by the API background program, and these orchestration files will be sent to the cluster brain (that is, the manager in the cluster, who does not participate in the execution, also known as K8Smaster) request, you can pull up a Flink on K8S cluster that satisfies the user's job operation.
在另一种可选的实施例中,当用户提交完作业后,用户请求可以通过API将参数渲染进K8S编排文件模板中,并启动脚本模板拉起集群。当集群启动后,会通过ingress配置文件,将JobManager的管理地址映射到域名+作业ID上,即可将管理地址暴露出来。该配置启动后,集群的JobManager界面就能够让用户进入,而不会被K8S的虚拟IP环境所隔绝,当JFlink平台拿到了JobManager的管理地址后,就可以通过接口将用户的数据包上传到集群中,再使用接口将数据包启动。In another optional embodiment, after the user submits the job, the user requests to render the parameters into the K8S orchestration file template through the API, and start the script template to pull up the cluster. When the cluster is started, the management address of the JobManager is mapped to the domain name + job ID through the ingress configuration file, and the management address can be exposed. After the configuration is started, the JobManager interface of the cluster can allow users to enter without being isolated by the virtual IP environment of K8S. When the JFlink platform obtains the management address of the JobManager, it can upload the user's data packets to the cluster through the interface. , and then use the interface to start the packet.
图7是根据本发明其中一实施例的总体框架示意图,如图所示,在作业管理平台可以启停Flink集群,启停作业,修改集群/作业配置,以及定时保存点,作业状态查看操作。接口部分可以进行数据包分析,配置集群,启停集群操作。K8S层可以进行渲染配置,路由域名,资源调度,高可用保证,以及系统日志操作。Flink集群上可进行作业启停,高可用保证,PerJob模式,数据处理,读写数据库操作。其中,K8S层和Flink集群上所进行的内容可以称为日志记录。在数据库中进行数据调用时,可以调取ES数据,My SQL数据,TiDB数据,RocksDB数据,以及Kafka数据,通知,在接口部分,K8S层和Flink集群以及数据库都可以进行监测报警操作。用户也可以在包括作业管理平台,接口部分,K8S层和Flink集群以及数据库进行权限控制,上述所有信息的运行环境可以为K8S服务器,或独立服务器。Figure 7 is a schematic diagram of the overall framework according to one embodiment of the present invention. As shown in the figure, the job management platform can start and stop the Flink cluster, start and stop jobs, modify the cluster/job configuration, save points regularly, and check the job status. The interface part can perform packet analysis, configure the cluster, and start and stop the cluster operation. The K8S layer can perform rendering configuration, routing domain name, resource scheduling, high availability guarantee, and system log operations. On the Flink cluster, you can start and stop jobs, ensure high availability, PerJob mode, data processing, and read and write database operations. Among them, what is done on the K8S layer and the Flink cluster can be called logging. When calling data in the database, you can call ES data, My SQL data, TiDB data, RocksDB data, and Kafka data, notifications. In the interface part, K8S layer and Flink cluster and database can monitor and alarm operations. Users can also control permissions on the job management platform, interface, K8S layer, Flink cluster, and database. The operating environment for all the above information can be a K8S server or an independent server.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.
在本实施例中还提供了一种数据处理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“单元”、“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a data processing apparatus is also provided, and the apparatus is used to implement the above-mentioned embodiments and preferred implementations, and what has been described will not be repeated. As used below, the terms "unit", "module" may be a combination of software and/or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementations in hardware, or a combination of software and hardware, are also possible and contemplated.
图8是根据本发明其中一实施例的数据处理装置的结构框图,如图8所示,该装置包括:FIG. 8 is a structural block diagram of a data processing apparatus according to an embodiment of the present invention. As shown in FIG. 8 , the apparatus includes:
获取模块802,用于获取目标数据包和目标数据包对应的配置参数,其中,目标数据包为待运行的数据包,配置参数用于确定运行目标数据包待使用的资源。The obtaining module 802 is configured to obtain a target data package and a configuration parameter corresponding to the target data package, wherein the target data package is a data package to be run, and the configuration parameter is used to determine a resource to be used for running the target data package.
替换模块804,用于基于配置参数对预设编排文件中的目标占位符进行替换,得到目标编排文件,其中,目标占位符所处位置的字段为待调整的字段。The replacement module 804 is configured to replace the target placeholder in the preset arrangement file based on the configuration parameter to obtain the target arrangement file, wherein the field where the target placeholder is located is the field to be adjusted.
调取模块806,用于基于目标编排文件确定目标资源空间,其中,目标资源空间用于为目标数据包提供一独立的运行资源。The calling module 806 is configured to determine a target resource space based on the target arrangement file, wherein the target resource space is used to provide an independent running resource for the target data package.
处理模块808,用于基于目标资源空间运行目标数据包,得到运行结果。The processing module 808 is used for running the target data package based on the target resource space to obtain the running result.
可选地,获取模块802,包括:调用单元,用于调用第一接口对目标数据包进行分析,得到目标运算资源,其中,目标运算资源用于表示运算目标数据包所需要的资源;第一确定单元,用于基于目标运算资源确定第一参数,其中,第一参数为计算目标资源空间中的目标运算资源所需要的第一组件的数量;第一获取单元,用于获取第二参数,其中,第二参数为用于管理目标资源空间的第二组件的数量;第二确定单元,用于基于第一参数和第二参数,确定配置参数。Optionally, the obtaining module 802 includes: a calling unit, configured to call a first interface to analyze the target data packet, and obtain the target computing resource, wherein the target computing resource is used to represent the resource required for computing the target data packet; the first a determining unit, configured to determine a first parameter based on the target computing resource, where the first parameter is the number of first components required to calculate the target computing resource in the target resource space; the first obtaining unit is configured to obtain the second parameter, Wherein, the second parameter is the number of second components used for managing the target resource space; the second determining unit is configured to determine the configuration parameter based on the first parameter and the second parameter.
可选地,该装置还包括:第二获取模块,用于获取初始编排模板的目标关键字,其中,目标关键字为初始编排模板中的待调整字段;在目标关键字的预设位置添加目标下划线,得到目标占位符;基于目标占位符对初始编排模板进行调整,得到预设编排文件。Optionally, the device further includes: a second obtaining module, configured to obtain a target keyword of the initial arrangement template, wherein the target keyword is a field to be adjusted in the initial arrangement template; adding the target keyword at a preset position of the target keyword Underline, get the target placeholder; adjust the initial arrangement template based on the target placeholder to get the preset arrangement file.
可选地,处理模块808,包括:采集单元,用于基于预设资源空间和日志目录采集目标资源空间的日志文件;监测单元,用于基于日志文件对目标资源空间的运行目标数据包的过程进行监测,得到监测结果,其中,监测结果用于表示目标资源空间运行目标数据包的过程中是否出现异常。Optionally, the processing module 808 includes: a collection unit, used for collecting log files of the target resource space based on a preset resource space and a log directory; a monitoring unit, used for the process of running the target data package of the target resource space based on the log file Monitoring is performed to obtain a monitoring result, wherein the monitoring result is used to indicate whether an abnormality occurs in the process of running the target data package in the target resource space.
可选地,监测单元,还用于响应于对预设资源空间的目标指令,停止基于日志文件对目标资源空间的处理过程进行监测,其中,目标指令在目标资源空间停止运行之后的预设时间段生成。Optionally, the monitoring unit is further configured to stop monitoring the processing process of the target resource space based on the log file in response to the target instruction for the preset resource space, wherein the target instruction is at a preset time after the target resource space stops running. segment generation.
可选地,获取模块802,还包括:第二获取单元,用于响应于对目标平台中第一界面中第一控件的触控指令,获取目标数据包,其中,第一界面用于从至少一个数据包中确定目标数据包;上传单元,用于响应于对目标平台中第二界面的第二控件的触控指令,上传目标数据包对应的配置信息至所述目标平台,其中,第二界面用于对目标数据包对应的配置信息进行编辑。Optionally, the obtaining module 802 further includes: a second obtaining unit, configured to obtain a target data packet in response to a touch instruction to the first control in the first interface in the target platform, wherein the first interface is used to obtain a target data packet from at least one A target data packet is determined in one data packet; the uploading unit is used for uploading the configuration information corresponding to the target data packet to the target platform in response to the touch command on the second control of the second interface in the target platform, wherein the second The interface is used to edit the configuration information corresponding to the target data package.
可选地,上传单元:包括:获取子单元,用于获取目标资源空间对应的第一版本信息;确定子单元,用于基于第一版本信息确定目标镜像,其中,目标镜像用于提供运行目标资源空间的环境;运行子单元,用于基于目标镜像和目标资源空间运行目标数据包,得到运行结果。Optionally, the uploading unit includes: an acquiring subunit, used for acquiring first version information corresponding to the target resource space; a determining subunit, used for determining a target image based on the first version information, wherein the target image is used to provide a running target The environment of the resource space; the operation subunit is used to run the target data package based on the target image and the target resource space, and obtain the operation result.
可选地,获取子单元,还用于响应于对目标平台中第三界面中第三控件的触控指令,获取目标资源空间对应的第一版本信息,其中,第三界面用于对目标资源空间对应的第一版本信息进行编辑。Optionally, the obtaining subunit is further configured to obtain the first version information corresponding to the target resource space in response to the touch command on the third control in the third interface in the target platform, wherein the third interface is used for controlling the target resource. Edit the first version information corresponding to the space.
可选地,获取子单元,还用于响应于对目标资源空间升级指令,获取第二接口,其中,第二接口与第二版本信息关联,第二版本信息为升级后的目标资源空间对应的版本信息;将第二接口添加至第三界面。Optionally, the obtaining subunit is further configured to obtain a second interface in response to the upgrade instruction for the target resource space, wherein the second interface is associated with the second version information, and the second version information is corresponding to the upgraded target resource space. Version information; add the second interface to the third interface.
可选地,调取模块806,包括:预处理单元,用于对目标数据包进行预处理,得到预处理结果,其中,预处理结果用于表示目标数据包是否能够正常运行在目标环境中;分析单元,用于在预处理结果为目标数据包能够正常运行在所述目标资源的情况下,基于第一接口对目标数据包进行分析,得到目标运算资源。Optionally, the calling module 806 includes: a preprocessing unit, configured to preprocess the target data packet to obtain a preprocessing result, wherein the preprocessing result is used to indicate whether the target data packet can normally run in the target environment; The analyzing unit is configured to analyze the target data packet based on the first interface to obtain the target computing resource when the preprocessing result is that the target data packet can normally run on the target resource.
需要说明的是,上述各个单元、模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述单元、模块均位于同一处理器中;或者,上述各个单元、模块以任意组合的形式分别位于不同的处理器中。It should be noted that the above-mentioned units and modules can be implemented by software or hardware, and the latter can be implemented in the following ways, but not limited to this: the above-mentioned units and modules are all located in the same processor; Units and modules are located in different processors in any combination.
本发明的实施例还提供了一种计算机可读存储介质,该非易失性存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。An embodiment of the present invention also provides a computer-readable storage medium, where a computer program is stored in the non-volatile storage medium, wherein the computer program is configured to execute the steps in any of the above method embodiments when running .
可选地,在本实施例中,上述计算机可读存储介质可以被设置为存储用于执行以下步骤的计算机程序:Optionally, in this embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the following steps:
S1,获取目标数据包和目标数据包对应的配置参数,其中,目标数据包为待运行的数据包,配置参数用于确定运行目标数据包待使用的资源。S1: Acquire a target data package and configuration parameters corresponding to the target data package, where the target data package is a data package to be run, and the configuration parameters are used to determine resources to be used for running the target data package.
S2,基于配置参数对预设编排文件中的目标占位符进行替换,得到目标编排文件,其中,目标占位符所处位置的字段为待调整的字段。S2: Replacing the target placeholder in the preset arrangement file based on the configuration parameters to obtain the target arrangement file, wherein the field where the target placeholder is located is the field to be adjusted.
S3,基于目标编排文件确定目标资源空间,其中,目标资源空间用于为目标数据包提供一独立的运行资源。S3: Determine a target resource space based on the target arrangement file, where the target resource space is used to provide an independent running resource for the target data package.
S4,基于目标资源空间运行目标数据包,得到运行结果。S4, run the target data package based on the target resource space to obtain the running result.
可选地,在本实施例中,上述计算机可读存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。Optionally, in this embodiment, the above-mentioned computer-readable storage medium may include, but is not limited to, a USB flash drive, a read-only memory (Read-Only Memory, referred to as ROM), and a random access memory (Random Access Memory, referred to as abbreviated as ROM). Various media that can store computer programs, such as RAM), removable hard disks, magnetic disks or optical disks.
可选地,在本实施例中,上述计算机可读存储介质可以位于计算机网络中计算机终端群中的任意一个计算机终端中,或者位于移动终端群中的任意一个移动终端中。Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
可选地,上述计算机可读存储介质还被设置为存储用于执行以下步骤的程序代码:Optionally, the above-mentioned computer-readable storage medium is further configured to store program codes for performing the following steps:
可选地,获取目标数据包对应的配置参数,包括:调用第一接口对目标数据包进行分析,得到目标运算资源,其中,目标运算资源用于表示运算目标数据包所需要的资源;基于目标运算资源确定第一参数,其中,第一参数为计算目标资源空间中的目标运算资源所需要的第一组件的数量;获取第二参数,其中,第二参数为用于管理目标资源空间的第二组件的数量;基于第一参数和第二参数,确定配置参数。Optionally, acquiring configuration parameters corresponding to the target data packet includes: calling a first interface to analyze the target data packet, and obtaining target computing resources, where the target computing resources are used to represent resources required for computing the target data packet; The computing resource determines a first parameter, where the first parameter is the number of first components required to calculate the target computing resource in the target resource space; acquires a second parameter, where the second parameter is the first parameter used to manage the target resource space The number of two components; based on the first parameter and the second parameter, the configuration parameter is determined.
可选地,该方法还包括:获取初始编排模板的目标关键字,其中,目标关键字为初始编排模板中的待调整字段;在目标关键字的预设位置添加目标下划线,得到目标占位符;基于目标占位符对初始编排模板进行调整,得到预设编排文件。Optionally, the method further includes: acquiring a target keyword of an initial arrangement template, where the target keyword is a field to be adjusted in the initial arrangement template; adding a target underline to a preset position of the target keyword to obtain a target placeholder ; Adjust the initial arrangement template based on the target placeholder to obtain a preset arrangement file.
可选地,目标资源空间与预设资源空间共享日志目录,在利用目标资源空间运行目标数据包的过程中,方法还包括:基于预设资源空间和日志目录采集目标资源空间的日志文件;基于日志文件对目标资源空间的运行目标数据包的过程进行监测,得到监测结果,其中,监测结果用于表示目标资源空间运行目标数据包的过程中是否出现异常。Optionally, the target resource space and the preset resource space share a log directory, and in the process of using the target resource space to run the target data package, the method further includes: collecting log files of the target resource space based on the preset resource space and the log directory; The log file monitors the process of running the target data package in the target resource space, and obtains a monitoring result, wherein the monitoring result is used to indicate whether an abnormality occurs in the process of running the target data package in the target resource space.
可选地,该方法还包括:响应于对预设资源空间的目标指令,停止基于日志文件对目标资源空间的处理过程进行监测,其中,目标指令在目标资源空间停止运行之后的预设时间段生成。Optionally, the method further includes: in response to the target instruction for the preset resource space, stopping monitoring the processing process of the target resource space based on the log file, wherein the target instruction is in a preset time period after the target resource space stops running. generate.
可选地,获取目标数据包和目标数据包对应的配置参数,包括:响应于对目标平台中第一界面中第一控件的触控指令,获取目标数据包,其中,第一界面用于从至少一个数据包中确定目标数据包;响应于对目标平台中第二界面的第二控件的触控指令,上传目标数据包对应的配置信息至目标平台,其中,第二界面用于对目标数据包对应的配置信息进行编辑。Optionally, acquiring the target data package and the configuration parameters corresponding to the target data package includes: in response to a touch instruction to the first control in the first interface in the target platform, acquiring the target data package, wherein the first interface is used to retrieve the target data package. Determining a target data packet in at least one data packet; in response to a touch command on a second control of a second interface in the target platform, uploading configuration information corresponding to the target data packet to the target platform, wherein the second interface is used to monitor the target data Edit the configuration information corresponding to the package.
可选地,利用目标资源空间对目标数据包进行处理,得到处理结果,包括:获取目标资源空间对应的第一版本信息;基于第一版本信息确定目标镜像,其中,目标镜像用于提供运行目标资源空间的环境;基于目标镜像和目标资源空间运行目标数据包,得到运行结果。Optionally, using the target resource space to process the target data packet to obtain a processing result, including: acquiring first version information corresponding to the target resource space; determining a target image based on the first version information, wherein the target image is used to provide a running target The environment of the resource space; run the target data package based on the target image and the target resource space, and get the operation result.
可选地,获取目标资源空间对应的第一版本信息,包括:响应于对目标平台中第三界面中第三控件的触控指令,获取目标资源空间对应的第一版本信息,其中,第三界面用于对目标资源空间对应的第一版本信息进行编辑。Optionally, acquiring the first version information corresponding to the target resource space includes: in response to a touch instruction to a third control in the third interface in the target platform, acquiring the first version information corresponding to the target resource space, wherein the third The interface is used to edit the first version information corresponding to the target resource space.
可选地,该方法还包括:响应于对目标资源空间升级指令,获取第二接口,其中,第二接口与第二版本信息关联,第二版本信息为升级后的目标资源空间对应的版本信息;将第二接口添加至第三界面。Optionally, the method further includes: in response to an upgrade instruction for the target resource space, acquiring a second interface, where the second interface is associated with second version information, and the second version information is version information corresponding to the upgraded target resource space. ;Add the second interface to the third interface.
可选地,在基于第一接口对目标数据包进行分析,得到目标运算资源之前,该方法还包括:对目标数据包进行预处理,得到预处理结果,其中,预处理结果用于表示目标数据包是否能够正常运行在目标环境中;在预处理结果为目标数据包能够正常运行在目标资源的情况下,基于第一接口对目标数据包进行分析,得到目标运算资源。Optionally, before analyzing the target data packet based on the first interface to obtain the target computing resource, the method further includes: preprocessing the target data packet to obtain a preprocessing result, wherein the preprocessing result is used to represent the target data. Whether the package can run normally in the target environment; if the preprocessing result is that the target data package can run normally on the target resource, analyze the target data package based on the first interface to obtain the target computing resource.
在该实施例的计算机可读介质中,通过先获取目标数据包和目标数据包对应的配置参数,其中,目标数据包为待运行的数据包,配置参数用于确定运行目标数据包待使用的资源;之后再基于配置参数对预设编排文件中的目标占位符进行替换,得到目标编排文件,其中,目标占位符所处位置的字段为待调整的字段;紧接着基于目标编排文件确定目标资源空间,其中,目标资源空间用于为目标数据包提供一独立的运行资源;最后基于目标资源空间运行目标数据包,得到运行结果。容易想到的是,在基于配置参数对预设编排文件中的目标占位符进行替换,从而得到目标编排文件之后,可以再基于目标编排文件确定目标资源空间,从而进一步实现了对数据的处理的效率和准确度,进而解决了相关技术资源空间中的数据运行时效率较低的技术问题。In the computer-readable medium of this embodiment, the target data packet and the configuration parameter corresponding to the target data packet are obtained first, wherein the target data packet is the data packet to be run, and the configuration parameter is used to determine the target data packet to be used for running. resource; then replace the target placeholder in the preset arrangement file based on the configuration parameters to obtain the target arrangement file, in which the field where the target placeholder is located is the field to be adjusted; then determine based on the target arrangement file The target resource space, wherein the target resource space is used to provide an independent operating resource for the target data package; finally, the target data package is run based on the target resource space to obtain the operating result. It is easy to think that, after replacing the target placeholder in the preset arrangement file based on the configuration parameters to obtain the target arrangement file, the target resource space can be determined based on the target arrangement file, thereby further realizing the processing of data. Efficiency and accuracy, thereby solving the technical problem of low data runtime efficiency in the relevant technical resource space.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本发明实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个计算机可读存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本发明实施方式的方法。From the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein may be implemented by software, or may be implemented by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, and the software product can be stored in a computer-readable storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on a network, Several instructions are included to cause a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to perform a method according to an embodiment of the present invention.
在本申请的示例性实施例中,计算机可读存储介质上存储有能够实现本实施例上述方法的程序产品。在一些可能的实施方式中,本发明实施例的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述终端设备执行本实施例上述“示例性方法”部分中描述的根据本发明各种示例性实施方式的步骤。In an exemplary embodiment of the present application, a computer-readable storage medium stores a program product capable of implementing the above method of this embodiment. In some possible implementations, various aspects of the embodiments of the present invention can also be implemented in the form of a program product, which includes program codes, and when the program product runs on a terminal device, the program codes are used to make The terminal device performs the steps according to various exemplary embodiments of the present invention described in the above-mentioned "Exemplary Method" section of this embodiment.
根据本发明的实施方式的用于实现上述方法的程序产品,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本发明实施例的程序产品不限于此,在本发明实施例中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。A program product for implementing the above method according to an embodiment of the present invention may adopt a portable compact disc read only memory (CD-ROM) and include program codes, and may run on a terminal device, such as a personal computer. However, the program product of the embodiment of the present invention is not limited thereto. In the embodiment of the present invention, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or associated with an instruction execution system, apparatus, or device. In conjunction with.
上述程序产品可以采用一个或多个计算机可读介质的任意组合。该计算机可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列举)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The above-described program product may employ any combination of one or more computer-readable media. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read only memory (ROM), Erase programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
需要说明的是,计算机可读存储介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。It should be noted that the program code contained on the computer-readable storage medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the above.
本发明的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。An embodiment of the present invention also provides an electronic device, comprising a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above method embodiments.
可选地,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。Optionally, the above-mentioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the above-mentioned processor, and the input-output device is connected to the above-mentioned processor.
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:Optionally, in this embodiment, the above-mentioned processor may be configured to execute the following steps through a computer program:
S1,获取目标数据包和目标数据包对应的配置参数,其中,目标数据包为待运行的数据包,配置参数用于确定运行目标数据包待使用的资源。S1: Acquire a target data package and configuration parameters corresponding to the target data package, where the target data package is a data package to be run, and the configuration parameters are used to determine resources to be used for running the target data package.
S2,基于配置参数对预设编排文件中的目标占位符进行替换,得到目标编排文件,其中,目标占位符所处位置的字段为待调整的字段。S2: Replacing the target placeholder in the preset arrangement file based on the configuration parameters to obtain the target arrangement file, wherein the field where the target placeholder is located is the field to be adjusted.
S3,基于目标编排文件确定目标资源空间,其中,目标资源空间用于为目标数据包提供一独立的运行资源。S3: Determine a target resource space based on the target arrangement file, where the target resource space is used to provide an independent running resource for the target data package.
S4,基于目标资源空间运行目标数据包,得到运行结果。S4, run the target data package based on the target resource space to obtain the running result.
可选地,上述处理器还可以被设置为通过计算机程序执行以下步骤:调用第一接口对目标数据包进行分析,得到目标运算资源,其中,目标运算资源用于表示运算目标数据包所需要的资源;基于目标运算资源确定第一参数,其中,第一参数为计算目标资源空间中的目标运算资源所需要的第一组件的数量;获取第二参数,其中,第二参数为用于管理目标资源空间的第二组件的数量;基于第一参数和第二参数,确定配置参数。Optionally, the above-mentioned processor may also be configured to perform the following steps through a computer program: invoking the first interface to analyze the target data packet to obtain the target computing resource, wherein the target computing resource is used to represent the required data for computing the target data packet. resource; determine a first parameter based on the target computing resource, where the first parameter is the number of first components required to calculate the target computing resource in the target resource space; acquire a second parameter, where the second parameter is used to manage the target The number of second components of the resource space; based on the first parameter and the second parameter, the configuration parameter is determined.
可选地,上述处理器还可以被设置为通过计算机程序执行以下步骤:获取初始编排模板的目标关键字,其中,目标关键字为初始编排模板中的待调整字段;在目标关键字的预设位置添加目标下划线,得到目标占位符;基于目标占位符对初始编排模板进行调整,得到预设编排文件。Optionally, the above-mentioned processor may also be configured to perform the following steps through a computer program: obtaining a target keyword of an initial layout template, where the target keyword is a field to be adjusted in the initial layout template; presetting the target keyword Add the target underline to the position to obtain the target placeholder; adjust the initial arrangement template based on the target placeholder to obtain the preset arrangement file.
可选地,上述处理器还可以被设置为通过计算机程序执行以下步骤:基于预设资源空间和日志目录采集目标资源空间的日志文件;基于日志文件对目标资源空间的运行目标数据包的过程进行监测,得到监测结果,其中,监测结果用于表示目标资源空间运行目标数据包的过程中是否出现异常。Optionally, the above-mentioned processor can also be configured to execute the following steps through a computer program: collect the log file of the target resource space based on the preset resource space and the log directory; perform the process of running the target data package in the target resource space based on the log file Monitoring is performed to obtain a monitoring result, wherein the monitoring result is used to indicate whether an abnormality occurs in the process of running the target data package in the target resource space.
可选地,上述处理器还可以被设置为通过计算机程序执行以下步骤:响应于对预设资源空间的目标指令,停止基于日志文件对目标资源空间的处理过程进行监测,其中,目标指令在目标资源空间停止运行之后的预设时间段生成。Optionally, the above-mentioned processor may also be configured to perform the following steps through a computer program: in response to the target instruction for the preset resource space, stop monitoring the processing process of the target resource space based on the log file, wherein the target instruction is in the target resource space. Generated at a preset time period after the resource space stops running.
可选地,上述处理器还可以被设置为通过计算机程序执行以下步骤:响应于对目标平台中第一界面中第一控件的触控指令,获取目标数据包,其中,第一界面用于从至少一个数据包中确定目标数据包;响应于对目标平台中第二界面的第二控件的触控指令,上传目标数据包对应的配置信息至目标平台,其中,第二界面用于对目标数据包对应的配置信息进行编辑。Optionally, the above-mentioned processor may also be configured to perform the following steps through a computer program: in response to a touch instruction on the first control in the first interface in the target platform, acquire the target data packet, wherein the first interface is used to obtain the target data package from the first interface. Determining a target data packet in at least one data packet; in response to a touch command on a second control of a second interface in the target platform, uploading configuration information corresponding to the target data packet to the target platform, wherein the second interface is used to monitor the target data Edit the configuration information corresponding to the package.
可选地,上述处理器还可以被设置为通过计算机程序执行以下步骤:获取目标资源空间对应的第一版本信息;基于第一版本信息确定目标镜像,其中,目标镜像用于提供运行目标资源空间的环境;基于目标镜像和目标资源空间运行目标数据包,得到运行结果。Optionally, the above-mentioned processor may also be configured to perform the following steps through a computer program: acquiring first version information corresponding to the target resource space; determining a target image based on the first version information, wherein the target image is used to provide a running target resource space environment; run the target data package based on the target image and target resource space, and get the running result.
可选地,上述处理器还可以被设置为通过计算机程序执行以下步骤:响应于对目标平台中第三界面中第三控件的触控指令,获取目标资源空间对应的第一版本信息,其中,第三界面用于对目标资源空间对应的第一版本信息进行编辑。Optionally, the above-mentioned processor may also be configured to perform the following steps through a computer program: in response to a touch instruction to the third control in the third interface in the target platform, obtain the first version information corresponding to the target resource space, wherein, The third interface is used to edit the first version information corresponding to the target resource space.
可选地,上述处理器还可以被设置为通过计算机程序执行以下步骤:响应于对目标资源空间升级指令,获取第二接口,其中,第二接口与第二版本信息关联,第二版本信息为升级后的目标资源空间对应的版本信息;将第二接口添加至第三界面。Optionally, the above-mentioned processor may also be configured to perform the following steps through a computer program: in response to an instruction to upgrade the target resource space, obtain a second interface, where the second interface is associated with second version information, and the second version information is Version information corresponding to the upgraded target resource space; add the second interface to the third interface.
可选地,上述处理器还可以被设置为通过计算机程序执行以下步骤:对目标数据包进行预处理,得到预处理结果,其中,预处理结果用于表示目标数据包是否能够正常运行在目标环境中;在预处理结果为目标数据包能够正常运行在目标资源的情况下,基于第一接口对目标数据包进行分析,得到目标运算资源。Optionally, the above-mentioned processor may also be configured to perform the following steps through a computer program: preprocessing the target data packet to obtain a preprocessing result, wherein the preprocessing result is used to indicate whether the target data packet can run normally in the target environment. In the case where the preprocessing result is that the target data packet can normally run on the target resource, analyze the target data packet based on the first interface to obtain the target computing resource.
在该实施例的电子设备中,通过先获取目标数据包和目标数据包对应的配置参数,其中,目标数据包为待运行的数据包,配置参数用于确定运行目标数据包待使用的资源;之后再基于配置参数对预设编排文件中的目标占位符进行替换,得到目标编排文件,其中,目标占位符所处位置的字段为待调整的字段;紧接着基于目标编排文件确定目标资源空间,其中,目标资源空间用于为目标数据包提供一独立的运行资源;最后基于目标资源空间运行目标数据包,得到运行结果。容易想到的是,在基于配置参数对预设编排文件中的目标占位符进行替换,从而得到目标编排文件之后,可以再基于目标编排文件确定目标资源空间,从而进一步实现了对数据的处理的效率和准确度,进而解决了相关技术资源空间中的数据运行时效率较低的技术问题。In the electronic device of this embodiment, the target data packet and the configuration parameters corresponding to the target data packet are obtained first, wherein the target data packet is the data packet to be run, and the configuration parameter is used to determine the resource to be used for running the target data packet; Then, based on the configuration parameters, the target placeholder in the preset arrangement file is replaced to obtain the target arrangement file, wherein the field where the target placeholder is located is the field to be adjusted; then the target resource is determined based on the target arrangement file space, wherein the target resource space is used to provide an independent operating resource for the target data package; finally, the target data package is run based on the target resource space to obtain the operating result. It is easy to think that, after replacing the target placeholder in the preset arrangement file based on the configuration parameters to obtain the target arrangement file, the target resource space can be determined based on the target arrangement file, thereby further realizing the processing of data. Efficiency and accuracy, thereby solving the technical problem of low data runtime efficiency in the relevant technical resource space.
图9是根据本发明实施例的一种电子装置的示意图。如图9所示,电子装置900仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。FIG. 9 is a schematic diagram of an electronic device according to an embodiment of the present invention. As shown in FIG. 9 , the
如图9所示,电子装置900以通用计算设备的形式表现。电子装置900的组件可以包括但不限于:上述至少一个处理器910、上述至少一个存储器920、连接不同系统组件(包括存储器920和处理器910)的总线930和显示器940。As shown in FIG. 9, the
其中,上述存储器920存储有程序代码,所述程序代码可以被处理器910执行,使得处理器910执行本申请实施例的上述方法部分中描述的根据本发明各种示例性实施方式的步骤。The above-mentioned
存储器920可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)9201和/或高速缓存存储单元9202,还可以进一步包括只读存储单元(ROM)9203,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。The
在一些实例中,存储器920还可以包括具有一组(至少一个)程序模块9205的程序/实用工具9204,这样的程序模块13205包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。存储器920可进一步包括相对于处理器910远程设置的存储器,这些远程存储器可以通过网络连接至电子装置900。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。In some instances,
总线930可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理器910或者使用多种总线结构中的任意总线结构的局域总线。The
显示器940可以例如触摸屏式的液晶显示器(LCD),该液晶显示器可使得用户能够与电子装置900的用户界面进行交互。
可选地,电子装置900也可以与一个或多个外部设备900(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子装置900交互的设备通信,和/或与使得该电子装置900能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口950进行。并且,电子装置900还可以通过网络适配器960与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图9所示,网络适配器960通过总线930与电子装置900的其它模块通信。应当明白,尽管图9中未示出,可以结合电子装置900使用其它硬件和/或软件模块,可以包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。Optionally, the
上述电子装置900还可以包括:键盘、光标控制设备(如鼠标)、输入/输出接口(I/O接口)、网络接口、电源和/或相机。The above
本领域普通技术人员可以理解,图9所示的结构仅为示意,其并不对上述电子装置的结构造成限定。例如,电子装置900还可包括比图9中所示更多或者更少的组件,或者具有与图1所示不同的配置。存储器920可用于存储计算机程序及对应的数据,如本发明实施例中的数据处理方法对应的计算机程序及对应的数据。处理器910通过运行存储在存储器920内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的数据处理方法。Those of ordinary skill in the art can understand that the structure shown in FIG. 9 is only a schematic diagram, which does not limit the structure of the above-mentioned electronic device. For example, the
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages or disadvantages of the embodiments.
在本发明的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的技术内容,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,可以为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are only illustrative, for example, the division of the units may be a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components may be combined or Integration into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of units or modules, and may be in electrical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes .
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above are only the preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, without departing from the principles of the present invention, several improvements and modifications can be made. It should be regarded as the protection scope of the present invention.
Claims (13)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210699966.3A CN115129542A (en) | 2022-06-20 | 2022-06-20 | Data processing method, data processing device, storage medium and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210699966.3A CN115129542A (en) | 2022-06-20 | 2022-06-20 | Data processing method, data processing device, storage medium and electronic device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115129542A true CN115129542A (en) | 2022-09-30 |
Family
ID=83380476
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210699966.3A Pending CN115129542A (en) | 2022-06-20 | 2022-06-20 | Data processing method, data processing device, storage medium and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115129542A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116455781A (en) * | 2023-06-12 | 2023-07-18 | 江苏博云科技股份有限公司 | Method and system for realizing flow visualization based on flow analysis |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110704164A (en) * | 2019-09-30 | 2020-01-17 | 珠海市新德汇信息技术有限公司 | Cloud native application platform construction method based on Kubernetes technology |
CN114461304A (en) * | 2022-02-10 | 2022-05-10 | 浙江大华技术股份有限公司 | Configuration file determining method and device, storage medium and electronic equipment |
-
2022
- 2022-06-20 CN CN202210699966.3A patent/CN115129542A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110704164A (en) * | 2019-09-30 | 2020-01-17 | 珠海市新德汇信息技术有限公司 | Cloud native application platform construction method based on Kubernetes technology |
CN114461304A (en) * | 2022-02-10 | 2022-05-10 | 浙江大华技术股份有限公司 | Configuration file determining method and device, storage medium and electronic equipment |
Non-Patent Citations (2)
Title |
---|
周凯波: "Apache Flink 进阶(四):Flink on Yarn/K8s 原理剖析及实践", Retrieved from the Internet <URL:https://developer.aliyun.com/article/720813> * |
张智: "基于Kubernetes的批流融合数据处理支撑环境研究与实现", 中国优秀硕士学位论文全文数据库(信息科技辑), no. 2022, 15 January 2022 (2022-01-15), pages 138 - 695 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116455781A (en) * | 2023-06-12 | 2023-07-18 | 江苏博云科技股份有限公司 | Method and system for realizing flow visualization based on flow analysis |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11914486B2 (en) | Cloning and recovery of data volumes | |
US20240406261A1 (en) | Fault-tolerant and highly available configuration of distributed services | |
CN111263938B (en) | Rule-based autonomous database cloud service framework | |
US12013764B2 (en) | Past-state backup generator and interface for database systems | |
US12210419B2 (en) | Continuous data protection | |
US11042503B1 (en) | Continuous data protection and restoration | |
WO2020253079A1 (en) | Jmeter-based distributed performance test method and apparatus, device, and storage medium | |
US20140181816A1 (en) | Methods and apparatus to manage virtual machines | |
CN114090580A (en) | Data processing method, apparatus, equipment, storage medium and product | |
CN110908793A (en) | Long-time task execution method, device, equipment and readable storage medium | |
Menon | Cloudera administration handbook | |
CN108829505A (en) | A kind of distributed scheduling system and method | |
WO2024012082A1 (en) | Big data cluster deployment method and apparatus, device, and medium | |
US11533391B2 (en) | State replication, allocation and failover in stream processing | |
CN115129542A (en) | Data processing method, data processing device, storage medium and electronic device | |
CN111488321B (en) | A storage volume management system | |
US12174856B2 (en) | Database group management | |
KR102622170B1 (en) | Ai model serving system and method thereof | |
CN109766220A (en) | Backup and recovery method, device and computer-readable storage medium for application system | |
US11068352B2 (en) | Automatic disaster recovery mechanism for file-based version control system using lightweight backups | |
US20240241758A1 (en) | Flexible computing resource cluster allocation | |
Vyas et al. | Comparative study of MapReduce frameworks in big data analytics | |
Meng et al. | An Overview of PAI: Distributed Machine Learning Platform | |
CN119960959A (en) | Short-time operation concurrency upgrading system and method based on Kubernetes | |
CN120146802A (en) | Project delivery method, system, electronic equipment, medium and product |
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 |