A stream computing execution method, device and computer readable storage medium
By receiving custom flow computing algorithms, selecting matching execution engines, and performing standardized processing and verification, the problem of tedious and fragmented customized programs in flow computing technology is solved, and the standardization and stability of flow computing are achieved.
Patent Information
- Application Number
- CN202010126806.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-28
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2040-02-28
AI Technical Summary
Existing stream computing technology suffers from the problems of cumbersome, fragmented and non-standardized customized procedures, resulting in each algorithm execution process being cumbersome and non-standardized.
Provides a flow computing execution method, including receiving a custom flow computing algorithm, selecting a matching execution engine, performing correctness verification and dependency analysis, initializing the buffer pool, standardizing the processing of flow data, and executing the flow computing algorithm in the engine execution environment , to obtain standardized execution results.
It realizes the standardized processing of flow computing, simplifies the algorithm application process, reduces the focus on the execution environment, supports multiple algorithm access, and ensures the stability and reliability of execution.
Smart Images

Figure CN111414385B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data computing, and in particular to a stream computing execution method, device and computer-readable storage medium. Background Art
[0002] Stream computing is a core scenario in big data computing, and its main function is to calculate the data collected in real time. Stream computing specifically includes data processing, anomaly detection, traffic analysis, etc., covering a wide range of areas and using a wide variety of algorithms. For stream computing, algorithms are the core capabilities. Rapidly applying algorithms and obtaining results in a timely manner can quickly test and implement algorithms.
[0003] At present, stream computing capabilities rely on execution engines, and different execution engines require different customized programs to execute. In addition, stream computing applications cover a wide range of algorithms, but the algorithms are highly customized. In this way, on the one hand, the execution engine environment needs to be customized and adjusted, and the process is personalized, which makes the process of each algorithm more cumbersome. On the other hand, because the mode of applying stream computing is to use specific programs to solve specific applications, this method is not standardized, and each algorithm needs to re-activate a different program, resulting in fragmentation and non-standardization of stream computing. Summary of the invention
[0004] In order to solve the above-mentioned defects of the existing stream computing, the embodiments of the present invention creatively provide a stream computing execution method, device and computer-readable storage medium.
[0005] According to a first aspect of the present invention, a stream computing execution method is provided, the method comprising: receiving a custom stream computing algorithm; selecting an execution engine that matches the stream computing algorithm from an execution engine library; receiving stream data; performing standardization processing on the stream data; and executing the stream computing algorithm on the standardized stream data using the matching execution engine to obtain a standardized execution result.
[0006] According to one embodiment of the present invention, after receiving a customized stream computing algorithm, the method further includes: verifying the correctness of the stream computing algorithm; accordingly, selecting an execution engine that matches the stream computing algorithm from an execution engine library, including: selecting an execution engine that matches the stream computing algorithm that has passed the correctness verification from the execution engine library.
[0007] According to one embodiment of the present invention, the method further includes: performing dependency parsing on the stream computing algorithm to obtain a dependency parsing result; accordingly, selecting an execution engine that matches the stream computing algorithm from an execution engine library, and further includes: selecting a dependency execution engine that matches the dependency parsing result from the execution engine library.
[0008] According to one embodiment of the present invention, the receiving of stream data includes: initializing a buffer pool, the buffer pool is used to cache data to be executed stream calculation; updating and storing the received stream data in the buffer pool according to the stream window; and correspondingly, performing standardization processing on the stream data, including: performing standardization processing on the stream data updated and stored in the buffer pool.
[0009] According to one embodiment of the present invention, the stream computing algorithm is executed on the standardized stream data using the matched execution engine, including: transmitting the standardized stream data and the stream computing algorithm to the engine execution environment respectively; and executing the stream computing algorithm in the engine execution environment using the matched execution engine.
[0010] According to the second aspect of the present invention, a stream computing execution device is also provided, which includes: a receiving module for receiving a custom stream computing algorithm; a selection module for selecting an execution engine that matches the stream computing algorithm from an execution engine library; the receiving module is also used to receive stream data; a standardization processing module is used to standardize the stream data; and an execution module is used to execute the stream computing algorithm on the standardized stream data using the matching execution engine to obtain a labeled execution result.
[0011] According to one embodiment of the present invention, the device also includes: a correctness verification module, which is used to verify the correctness of the custom stream computing algorithm after receiving the custom stream computing algorithm through the receiving module; accordingly, the selection module is also used to select an execution engine from the execution engine library that matches the old computing algorithm that has passed the correctness verification.
[0012] According to one embodiment of the present invention, the device also includes: a dependency parsing module, which is used to perform dependency parsing on the stream computing algorithm to obtain a dependency parsing result; accordingly, the selection module is also used to select a dependency execution engine that matches the dependency parsing result from an execution engine library.
[0013] According to one embodiment of the present invention, the receiving module is specifically used to initialize a buffer pool, which is used to cache data for stream calculation to be executed; the received stream data is updated and stored in the buffer pool according to the stream window; accordingly, the standardization processing module is specifically used to perform standardization processing on the stream data updated and stored in the buffer pool.
[0014] According to an embodiment of the present invention, the execution module is specifically used to transmit the standardized stream data and the stream computing algorithm to the engine execution environment respectively; and execute the stream computing algorithm in the engine execution environment using the matched execution engine.
[0015] According to a third aspect of the present invention, a computer-readable storage medium is provided, wherein the storage medium comprises a set of computer-executable instructions, and when the instructions are executed, the instructions are used for any of the above-mentioned stream computing execution methods.
[0016] The stream computing execution method, device, and computer-readable storage medium of the embodiment of the present invention first receive a custom stream computing algorithm; select an execution engine that matches the stream computing algorithm from an execution engine library; then receive stream data and perform standardization processing on the stream data; finally, use the matching execution engine to execute the stream computing algorithm on the standardized stream data to obtain a standardized execution result. In this way, the present invention standardizes the input of the stream computing algorithm on the basis of structuring the access of stream data, so that the user can access the custom core algorithm to the standardized input, and directly apply the user-defined algorithm to the stream data through the stream computing engine, thereby standardizing the stream computing problem.
[0017] It should be understood that the teachings of the present invention are not required to achieve all of the beneficial effects described above, but specific technical solutions can achieve specific technical effects, and other embodiments of the present invention can also achieve beneficial effects not mentioned above. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:
[0019] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.
[0020] Figure 1 The following is a schematic diagram showing the implementation process of the stream computing execution method according to an embodiment of the present invention. Figure 1 ;
[0021] Figure 2 A schematic diagram of a specific implementation process of a flow calculation execution method of an application example of the present invention is shown;
[0022] Figure 3 The following is a schematic diagram showing the implementation process of the stream computing execution method according to an embodiment of the present invention. Figure 2 ;
[0023] Figure 4 A schematic diagram of the composition structure of a stream computing execution device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0024] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.
[0025] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0026] Figure 1 The following is a schematic diagram showing the implementation process of the stream computing execution method according to an embodiment of the present invention. Figure 1 ; Figure 2 A schematic diagram of a specific implementation flow of a stream computing execution method of an application example of the present invention is shown.
[0027] refer to Figure 1 An embodiment of the present invention provides a stream computing execution method, the method comprising: operation 101, receiving a custom stream computing algorithm; operation 102, selecting an execution engine matching the stream computing algorithm from an execution engine library; operation 103, receiving stream data; operation 104, performing standardization processing on the stream data; operation 105, executing the stream computing algorithm on the standardized stream data using the matching execution engine to obtain a standardized execution result.
[0028] Here, operations 101 to 102 belong to the algorithm preparation period of stream computing, wherein operation 101 is equivalent to the algorithm submission phase, and operation 102 is equivalent to the execution phase preparation phase.
[0029] refer to Figure 2 Specifically, in operation 101, the user first submits a custom stream computing algorithm to the algorithm library, and the algorithm library can perform correctness verification and dependency analysis on the submitted algorithm; further, the stream computing algorithm that has been verified, that is, passed the correctness verification, is submitted to the execution engine. In operation 102, after the stream computing algorithm that has passed the correctness verification is submitted to the execution engine, an execution engine that matches the current algorithm is selected from the execution engine library. Of course, if a dependency analysis result is obtained after dependency analysis, a dependent execution engine that matches the dependency analysis result will also be selected from the execution engine library to write the algorithm that the current algorithm depends on into the execution environment of the current algorithm; further, the execution engine and the dependent execution engine are stored in the algorithm library.
[0030] Here, operations 103 to 105 belong to the stream computing execution period, wherein operations 103 to 104 are equivalent to the stream data preparation phase, and operation 105 is equivalent to the algorithm extraction execution phase.
[0031] Specifically, in operations 103 to 104, a buffer pool is first initialized, the buffer pool being used to cache data to be executed for stream computing; then the received stream data is updated and stored in the buffer pool according to the stream window; further, the stream data updated and stored in the buffer pool is standardized.
[0032] refer to Figure 2 In operation 103, stream data is received from the stream engine, and the stream data is segmented according to the time window and marked as a stream window ID. For example, taking the data of user browsing web pages as an example, the stream data of the user browsing web pages is received according to the time window of 10 minutes. In operation 104, the buffer pool for caching the data to be executed stream calculation is initialized, and the received stream data is updated and stored in the buffer pool according to the stream window; after the stream data in the buffer pool remains intact, the stream data is standardized to format the stream data into a standard format.
[0033] Specifically, in operation 105, the standardized stream data and the stream computing algorithm are transmitted to an engine execution environment respectively; and the stream computing algorithm is executed in the engine execution environment by using the matched execution engine.
[0034] refer to Figure 2 In operation 105, first, according to the current stream computing settings, the current stream computing algorithm stored in the algorithm library of operations 101-102 is extracted; then, the stream computing algorithm and the stream data processed by the standardized processing of operations 103-104 are pushed to the engine execution environment; then, the current stream computing algorithm can be executed by using the matching execution engine in the engine execution environment; finally, the standardized execution result is output after the algorithm execution is completed.
[0035] In this way, the present invention standardizes the input of stream computing algorithms on the basis of stream data access structure, so that users can access customized core algorithms to standardized inputs, and directly apply user-defined algorithms to stream data through the stream computing engine, thereby standardizing stream computing problems. The access algorithm of the present invention supports multiple languages, that is, it can support the access of stream computing algorithms in multiple languages and multiple versions; it has a standardized execution engine, and the execution is more stable and reliable.
[0036] Figure 3 The following is a schematic diagram showing the implementation process of the stream computing execution method according to an embodiment of the present invention. Figure 2 .
[0037] refer to Figure 3The stream computing execution method of the embodiment of the present invention includes: operation 301, receiving a user-defined stream computing algorithm; operation 302, verifying the correctness of the stream computing algorithm; operation 303, selecting an execution engine that matches the stream computing algorithm that has passed the correctness verification from an execution engine library; operation 304, receiving stream data; operation 305, standardizing the stream data; operation 306, using the matching execution engine to execute the stream computing algorithm on the standardized stream data to obtain a standardized execution result.
[0038] The specific implementation process of operation 301 and operations 304 to 306 is the same as Figure 1 The specific implementation processes of operation 101 and operations 103 to 105 in the illustrated embodiment are similar and will not be described in detail herein.
[0039] In operations 302-303, refer to Figure 2 , the user first submits the custom stream computing algorithm to the algorithm library, and the algorithm library can verify the correctness and resolve the dependencies of the submitted algorithm; further, the stream computing algorithm that has been verified, that is, passed the correctness verification, is submitted to the execution engine; after the stream computing algorithm that has passed the correctness verification is submitted to the execution engine, the execution engine that matches the current algorithm is selected from the execution engine library. Among them, the correctness verification of the submitted algorithm, that is, the correctness verification of the expected input and input of the submitted algorithm, specifically includes: first, using the submitted algorithm to operate on the sample data attached to the submitted algorithm to obtain the operation result; then checking whether the operation result is consistent with the corresponding labeled data; if consistent, it indicates that the correctness verification of the submitted algorithm is completed.
[0040] In one embodiment of the present invention, Figure 3 As shown, the embodiment of the present invention may also include the following operation flow: performing dependency parsing on the stream computing algorithm to obtain a dependency parsing result; selecting a dependency execution engine that matches the dependency parsing result from the execution engine library. Among them, performing dependency parsing on multiple submitted algorithms means parsing all dependent algorithms that need to be called in the submitted algorithm.
[0041] Specifically, refer to Figure 2 After the user submits a customized stream computing algorithm to the algorithm library, the algorithm library can also perform dependency parsing on the submitted algorithm to obtain a dependency parsing result; further, a dependency execution engine matching the dependency parsing result is selected from the execution engine library to write the algorithm on which the current algorithm depends into the execution environment of the current algorithm; finally, the execution engine and the dependency engine are stored in the algorithm library to achieve the standardization of the stream computing algorithm.
[0042] In this way, the present invention will perform correctness verification and / or dependency analysis on the user-defined algorithm, thereby standardizing the algorithm, allowing algorithm engineers to focus on the algorithm itself, thereby reducing the focus on data preparation and the engine execution environment, and annotating stream computing problems.
[0043] Similarly, based on the stream computing execution method described above, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program. When the program is executed by a processor, the processor performs at least the following operation steps: operation 101, receiving a custom stream computing algorithm; operation 102, selecting an execution engine that matches the stream computing algorithm from an execution engine library; operation 103, receiving stream data; operation 104, performing standardization processing on the stream data; operation 105, using the matching execution engine to execute the stream computing algorithm on the standardized stream data to obtain a standardized execution result.
[0044] Furthermore, based on the stream computing execution method described above, an embodiment of the present invention further provides a stream computing execution device, such as Figure 4 As shown, the device 40 includes: a receiving module 401, which is used to receive a custom stream computing algorithm; a selection module 402, which is used to select an execution engine that matches the stream computing algorithm from an execution engine library; the receiving module 401 is also used to receive stream data; a standardization processing module 403, which is used to standardize the stream data; and an execution module 404, which is used to execute the stream computing algorithm on the standardized stream data using the matching execution engine to obtain a labeled execution result.
[0045] According to one embodiment of the present invention, the device 40 also includes: a correctness verification module, which is used to verify the correctness of the custom stream computing algorithm after receiving it through the receiving module; correspondingly, the selection module is also used to select an execution engine from the execution engine library that matches the old computing algorithm that has passed the correctness verification.
[0046] According to one embodiment of the present invention, the device 40 also includes: a dependency parsing module, which is used to perform dependency parsing on the stream computing algorithm to obtain a dependency parsing result; correspondingly, the selection module is also used to select a dependency execution engine that matches the dependency parsing result from an execution engine library.
[0047] According to one embodiment of the present invention, the receiving module 401 is specifically used to initialize a buffer pool, which is used to cache data for stream calculation to be executed; the received stream data is updated and stored in the buffer pool according to the stream window; correspondingly, the standardization processing module 403 is specifically used to perform standardization processing on the stream data updated and stored in the buffer pool.
[0048] According to an embodiment of the present invention, the execution module 404 is specifically used to transmit the standardized stream data and the stream computing algorithm to the engine execution environment respectively; and execute the stream computing algorithm in the engine execution environment using the matched execution engine.
[0049] It should be noted that: the above description of the stream computing execution device embodiment is different from the above Figures 1 to 3 The description of the method embodiment shown is similar, with the same Figures 1 to 3 The method embodiment shown in the figure has similar beneficial effects, so it will not be described in detail. For technical details not disclosed in the embodiment of the stream computing execution device of the present invention, please refer to the aforementioned Figures 1 to 3 The description of the method embodiment shown in the figure can be understood, and in order to save space, it will not be repeated.
[0050] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0051] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0052] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0053] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, 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 in the form of hardware plus software functional units.
[0054] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0055] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0056] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A stream computing execution method, It is characterized in that The method comprises: Receive a custom stream computing algorithm so that the algorithm library can verify the correctness and perform dependency analysis on the stream computing algorithm; Selecting an execution engine that matches the stream computing algorithm from an execution engine library, including: submitting the stream computing algorithm that has passed the correctness verification to the execution engine, and selecting an execution engine that matches the stream computing algorithm from the execution engine library; obtaining a dependency parsing result through dependency parsing, and selecting a dependency execution engine that matches the dependency parsing result from the execution engine library; Receive streaming data; Performing standardization processing on the stream data; The matched execution engine is used to execute the stream computing algorithm on the standardized stream data to obtain a standardized execution result.
2. The method according to claim 1, It is characterized in that The receiving stream data comprises: Initialize a buffer pool, where the buffer pool is used to cache data to be executed for stream computing; Update and store the received stream data into the buffer pool according to the stream window; Accordingly, the stream data is standardized, including: Normalizes stream data that is updated and stored in the buffer pool.
3. The method according to claim 1, It is characterized in that Utilizing the matched execution engine to execute the stream computing algorithm on the standardized stream data includes: Transmitting the standardized stream data and stream computing algorithm to the engine execution environment respectively; The stream computing algorithm is executed in the engine execution environment using the matched execution engine.
4. A stream computing execution device, It is characterized in that The device comprises: The receiving module is used to receive the customized stream computing algorithm; The correctness verification module is used to verify the correctness of the custom stream computing algorithm after receiving it through the receiving module; the dependency parsing module is used to perform dependency parsing on the stream computing algorithm to obtain a dependency parsing result; A selection module is used to select an execution engine that matches the stream computing algorithm from an execution engine library, including: submitting the stream computing algorithm that has passed the correctness verification to the execution engine, and selecting an execution engine that matches the stream computing algorithm from the execution engine library; obtaining a dependency parsing result through dependency parsing, and selecting a dependency execution engine that matches the dependency parsing result from the execution engine library; The receiving module is further used to receive stream data; A standardization processing module, used for performing standardization processing on the stream data; The execution module is used to use the matched execution engine to execute the stream computing algorithm on the standardized stream data to obtain a labeled execution result.
5. The device according to claim 4, It is characterized in that The receiving module is specifically used to initialize a buffer pool, which is used to cache data to be executed for stream computing; update and store the received stream data into the buffer pool according to the stream window; Correspondingly, the standardization processing module is specifically used to perform standardization processing on the stream data updated and stored in the buffer pool.
6. A computer-readable storage medium, It is characterized in that The storage medium includes a set of computer executable instructions, which are used to execute the stream computing execution method according to any one of claims 1 to 3 when the instructions are executed.
