Data processing method, device, electronic device and storage medium
By generating target data files and performing data processing by controlling instance scheduling execution instances, the serious problem of instance coupling in the prior art is solved, and the high scalability and low modification cost of the code are achieved.
Patent Information
- Application Number
- CN202011112272.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-16
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2040-10-16
AI Technical Summary
In the prior art, there is serious coupling between instances, resulting in poor code scalability and high modification cost.
By generating a target data file, it includes the pending data, the first instance identifier and the next execution instance attribute in the data attribute, and calls the corresponding execution instance through the preset control instance to perform data processing, setting and updating the next execution instance attribute.
Reduces coupling between instances, improves code scalability and maintenance, and reduces modification costs.
Smart Images

Figure CN114385274B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of network technology, and in particular relates to a data processing method, device, electronic equipment and storage medium. Background Art
[0002] At present, in order to process data, it is often necessary to set multiple instances in the program code to process data, wherein one instance can be used to implement one operation processing logic.
[0003] In the prior art, when an instance processes data, it often needs to internally call the processing logic of other instances. In this way, when the processing flow is more complicated, it will lead to more serious coupling between instances, which will lead to poor code scalability and high modification costs. Summary of the invention
[0004] In view of this, the present invention provides a data processing method, device, electronic device and storage medium to solve the problems of code extensibility and high modification cost in the prior art.
[0005] According to a first aspect of an embodiment of the present invention, a data processing method is provided, which may include:
[0006] Generate a target data file according to the data to be processed; the target data file includes the data to be processed, the first instance identifier and data attributes, and the data attributes include the next execution instance attributes;
[0007] Calling the first execution instance indicated by the first instance identifier through a preset control instance to perform data processing according to the target data file, and setting the value of the next execution instance attribute to represent the next execution instance;
[0008] After setting the value of the next execution instance attribute, the control instance calls the next execution instance according to the value of the next execution instance attribute to continue data processing according to the target data file, and resets the value of the next execution instance attribute.
[0009] According to a second aspect of an embodiment of the present invention, a data processing device is provided, which may include:
[0010] A generating module, used to generate a target data file according to the data to be processed; the target data file includes the data to be processed, a first instance identifier and data attributes, and the data attributes include attributes of the next execution instance;
[0011] A first processing module, configured to call the first execution instance indicated by the first instance identifier through a preset control instance to perform data processing according to the target data file, and to set the value of the next execution instance attribute to represent the next execution instance;
[0012] The second processing module is used to call the next execution instance through the control instance according to the value of the next execution instance attribute after setting the value of the next execution instance attribute to continue data processing according to the target data file, and reset the value of the next execution instance attribute.
[0013] According to a third aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data processing method described in the first aspect are implemented.
[0014] According to a fourth aspect of an embodiment of the present invention, an electronic device is provided, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the data processing method as described in the first aspect are implemented.
[0015] In an embodiment of the present invention, a target data file is generated according to the data to be processed, the target data file includes the data to be processed, the first instance identifier and the data attributes, the data attributes at least include the next execution instance attributes, the first execution instance indicated by the first instance identifier is called by a preset control instance to perform data processing according to the target data file, and the value of the next execution instance attribute is set to represent the next execution instance, after the value of the next execution instance attribute is set, the next execution instance is called by the control instance according to the value of the next execution instance attribute to continue to perform data processing according to the target data file, and the value of the next execution instance attribute is reset. In an embodiment of the present invention, by setting the control instance, and after an execution instance completes data processing, the value of the next execution instance attribute is maintained and updated, and accordingly, the control instance sequentially schedules the execution instance to process according to the value of the next execution instance attribute, the data processing process of each instance is independent of each other, and the coupling between each instance is low, so that it is convenient to modify and maintain the code later, reduce the modification cost, and improve the scalability of the code.
[0016] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0018] Figure 1 It is a schematic diagram of an existing processing flow provided by an embodiment of the present invention;
[0019] Figure 2 is a flow chart of steps of a data processing method provided by an embodiment of the present invention;
[0020] Figure 3 It is a schematic diagram of a data processing framework design provided by an embodiment of the present invention;
[0021] Figure 4 It is a core class schematic diagram of a framework component provided by an embodiment of the present invention;
[0022] Figure 5 is a schematic diagram of a specific application scenario provided by an embodiment of the present invention;
[0023] Figure 6 is a block diagram of a data processing device provided by an embodiment of the present invention;
[0024] Figure 7 It is a block diagram of an electronic device structure provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0026] First, an application scenario of an embodiment of the present invention is described. As the business scenario becomes more complicated, the logic of processing data becomes more and more complicated. For example, in the security industry, in order to implement business logic, the business processing flow generally includes multiple processing nodes for logic processing and judgment, and different processing nodes control different data flows. This often leads to complex data processing flows.
[0027] When faced with complex data processing flows, a series of problems such as scalability and code maintainability will be faced when implementing the program coding. In an existing implementation method, the most commonly used Model-View-Controller (MVC) design framework is often used as the basis, and the implementation of all processing nodes is concentrated in the business logic layer (also known as the Service layer). In this implementation method, a Service instance is generally written for each processing logic. In addition to executing its own business processing and judgment logic, the Service instance is also responsible for calling the logic method of the next Service instance, and the resources occupied by the instance of this layer will not be released until the next layer of instances called are executed. In this method, since various instances are nested and dependent on each other, when the processing logic of a certain instance changes and the interface changes, the caller's instance also has to modify the code. If the calling logic is more complex, it may cause multiple caller instances to need to be modified accordingly. Therefore, the scalability of the code is poor and the cost of modification and maintenance is high.
[0028] Furthermore, since the entire processing flow is completed by each instance calling the next instance, it will be impossible to track and record the processing progress. At the same time, when an instance calls other instances internally, although the instance does not execute its own processing logic, the resources occupied by the instance will also be occupied at the same time, resulting in unnecessary resource consumption. For example, Figure 1 is a schematic diagram of an existing processing flow provided by an embodiment of the present invention, such as Figure 1 As shown in the figure, the business logic of Service1 includes calls to Service2 and Service4. Since the method calls in the program are implemented based on the first-in-last-out stack model, that is, while waiting for Service2 and Service4 to execute, although Service1 does not execute its own logic, the resources occupied by Service1 will not be released, which will cause additional resource consumption.
[0029] Therefore, the embodiment of the present invention proposes a data processing method to solve the above problem, which is described in detail below.
[0030] Figure 2 is a flow chart of steps of a data processing method provided by an embodiment of the present invention, such as Figure 2 As shown, the method may include:
[0031] Step 101 : Generate a target data file according to the data to be processed; the target data file includes the data to be processed, a first instance identifier and data attributes, and the data attributes include attributes of the next execution instance.
[0032] In an embodiment of the present invention, the data to be processed may be data that needs to be processed, and the data to be processed may be pictures, videos, texts, and the like. The first instance identifier may be an instance identifier that can uniquely indicate the first execution instance, and different execution instances may correspond to different instance identifiers. Corresponding to different business processing requirements, the first execution instance used to process the data to be processed may be different. In this step, by encapsulating the first instance identifier, it is convenient to determine the first execution instance according to the first instance identifier in the subsequent step, and then the data processing process can be quickly started to improve processing efficiency.
[0033] Furthermore, data attributes may be used to characterize information related to the data to be processed. For example, the next execution instance attribute (nextHandler) may characterize the next execution instance that processes the data to be processed after the current execution instance completes the processing.
[0034] Step 102: calling the first execution instance indicated by the first instance identifier through a preset control instance to perform data processing according to the target data file, and setting the value of the next execution instance attribute to represent the next execution instance.
[0035] In an embodiment of the present invention, the control instance may be a pre-created instance for controlling the overall processing flow. By way of example, the control instance may be an instance of a data flow execution engine (Engine). Specifically, calling the first execution instance may be starting the first execution instance, and accordingly, after the first execution instance is started, data processing may be performed on the target data file according to the internal processing logic. By way of example, when data processing is performed according to the target data file, the data to be processed in the target data file may be processed. The specific processing logic may be pre-set according to actual needs. For example, the data to be processed is a picture, and data processing according to the target data file may be cropping the picture.
[0036] Furthermore, the value of the next execution instance attribute can be set before the first execution instance completes data processing. The value of the next execution instance attribute can be the instance identifier of the next execution instance, so that the next execution instance can be accurately indicated by the value of the instance attribute. Accordingly, by setting the value of the next execution instance attribute, the control instance can conveniently know which execution instance needs to be scheduled for processing next, thereby facilitating the control instance to continue to advance the subsequent processing flow.
[0037] Step 103: After setting the value of the next execution instance attribute, the control instance calls the next execution instance according to the value of the next execution instance attribute to continue data processing according to the target data file, and resets the value of the next execution instance attribute.
[0038] In an embodiment of the present invention, the control instance may read the value of the attribute of the next execution instance after each step of setting the value of the attribute of the next execution instance, and call the operation of the next execution instance according to the read value. When the next execution instance continues to process data according to the target data file, since the target data file has been processed by the previous execution instance, the content of the target data file will change accordingly. Accordingly, this step continues to process data, which may be based on the changed target data file obtained after the previous processing. For example, assuming that the data processing performed by the next execution instance is specifically to convert a picture into a grayscale image, then specifically, the next execution instance may be to convert the picture cropped in the previous step into a grayscale image.
[0039] Furthermore, the value of the next execution instance attribute may be reset before the next execution instance completes processing. Specifically, the value of the next execution instance attribute may be set to the next execution instance of the next execution instance that completes processing. For example, assuming that the next execution instance is instance A, after instance A is processed, it needs to be processed by instance B, then the value of the next execution instance attribute may be set to the instance identifier of instance B. In this way, by re-executing the operation of setting the value of the next execution instance attribute, the subsequent control instance will continue to call the subsequent next execution instance for processing according to the reset value, thereby realizing the sequential scheduling of the corresponding execution instances to process the data to be processed.
[0040] In summary, the data processing method provided in the embodiment of the present invention generates a target data file according to the data to be processed, wherein the target data file includes the data to be processed, the first instance identifier and the data attributes, wherein the data attributes at least include the next execution instance attributes, and the first execution instance indicated by the first instance identifier is called by a preset control instance to perform data processing according to the target data file, and the value of the next execution instance attribute is set to characterize the next execution instance, and after the value of the next execution instance attribute is set, the next execution instance is called by the control instance according to the value of the next execution instance attribute to continue to perform data processing according to the target data file, and the value of the next execution instance attribute is reset. In the embodiment of the present invention, by setting the control instance, and after an execution instance completes data processing, the value of the next execution instance attribute is maintained and updated, and accordingly, the control instance sequentially schedules the execution instance for processing according to the value of the next execution instance attribute, and the data processing process of each instance is independent of each other, and the coupling between each instance is low, so that it is convenient to modify and maintain the code later, reduce the modification cost, and improve the scalability of the code.
[0041] Furthermore, in an embodiment of the present invention, by updating the value of the next execution instance attribute, the control instance externally advances the overall processing flow. In this way, the processing progress can be easily monitored. At the same time, by updating the value of the next execution instance attribute, the control instance externally advances the overall processing flow, and each instance is independent of each other, so that each execution instance has its own method stack and context space during operation, and all resource occupancy is within the business cycle of the current execution instance, and then after an instance executes the processing logic, the occupied resources can be released immediately, thereby avoiding unnecessary resource consumption and improving resource utilization.
[0042] Optionally, in an embodiment of the present invention, the operation of generating a target data file according to the data to be processed may include the following sub-steps:
[0043] Sub-step (1): Set the value of the next execution instance attribute to the first instance identifier.
[0044] For example, the first instance identifier may be assigned to the next execution instance attribute to achieve the setting.
[0045] Sub-step (2): encapsulating the data attributes for the data to be processed according to a preset data structure model.
[0046] In the embodiment of the present invention, the preset data structure model can be selected according to actual needs, and the embodiment of the present invention is not limited to this. For example, the data structure model can be a DataContext model. Accordingly, when encapsulating, the preset pack method can be executed according to the data structure defined in the DataContext model to pack the data to be processed and the data attributes according to a fixed paradigm, thereby obtaining a target data file that can flow in each execution instance in a fixed paradigm. Among them, the obtained target data file can be called "DataConext".
[0047] It should be noted that the data to be processed in the embodiment of the present invention can be obtained from a preset data source (DataSource). Specifically, DataSource can register with the control instance after the control instance is created, and each control instance can be bound to one or more DataSources to access the original data to be processed. Among them, the control instance can be created during the program initialization phase. Furthermore, through active query or passive listening mode, when it is determined that DataSource starts data stream acquisition, the data to be processed can be obtained from DataSource. Furthermore, after encapsulation, the receive method of the control instance can be called to pass in the target data file. At the same time, after encapsulation, the processing flow of the control instance can be triggered, that is, the control instance is triggered to execute the operation of calling the first execution instance.
[0048] In the embodiment of the present invention, by setting the value of the next execution instance attribute to the first instance identifier, the control instance can conveniently obtain the first instance identifier, thereby facilitating the control instance to call the first execution instance. At the same time, by encapsulating the data attributes for the data to be processed according to the preset data structure model, the target data file finally obtained can have a more standardized and orderly file structure, thereby facilitating subsequent processing.
[0049] Optionally, in an embodiment of the present invention, the data attribute also includes a business processing result attribute. Accordingly, after data processing is performed according to the target data file, an operation may be performed: adding the processing result of the data processing to the business processing result attribute. The processing result may be information obtained after the execution instance performs data processing according to the target data file. For example, assuming that instance A obtains the face area in the picture after performing data processing according to the target data file, the face area may be added to the business processing result attribute.
[0050] In the embodiment of the present invention, by decoupling each execution instance and setting the business processing result (result) attribute, the business processing result attribute of the data to be processed is given. After each execution instance completes the data processing operation, the processing result is added to the business processing result attribute, thereby conveniently tracking and recording the processing results of each link. At the same time, by adding the processing result, it can be ensured that when the subsequent execution instance needs to combine the processing result of the previous execution instance for data processing, the processing result can be conveniently obtained, thereby ensuring that the data processing is carried out normally.
[0051] Optionally, in one embodiment of the present invention, data attributes may further include data processing status attributes. Accordingly, the embodiment of the present invention may further include: before encapsulating the data attributes for the data to be processed, setting the data processing status attributes in the data attributes to a pending state; after calling the first execution instance indicated by the first instance identifier through a preset control instance, that is, after the current execution instance starts the data processing operation, setting the data processing status attribute to a processing state; after completing the data processing operation on the target data file, setting the data processing status attribute to a processing completed state.
[0052] Among them, the pending status can be represented by "todo", the processing status can be represented by "doing", and the processing completed status can be represented by "done". Specifically, after the control instance receives the target data file through the receive method, the data processing status attribute is set to "doing". After completing the entire processing flow of the target data file, the data processing status attribute is set to "done". In the embodiment of the present invention, by assigning the data to be processed a data processing status attribute and setting the data processing status attribute accordingly in each link, the life cycle of the data to be processed can be conveniently known through the data processing status attribute.
[0053] Optionally, in one embodiment of the present invention, the value of the next execution instance attribute may be the instance identifier of the next execution instance. Accordingly, before generating the target data file according to the data to be processed, the following steps may be performed: Step A, registering the instance identifier and call address of each available instance to the control instance. Specifically, the available instances may be all instances created after the program is started. When the program is initialized, the available instances may pass their instance identifiers and call addresses to the control instance to achieve registration.
[0054] Correspondingly, the calling of the next execution instance to continue data processing according to the target data file may include: searching for the calling address corresponding to the instance identifier of the next execution instance according to the registered instance identifier and the calling address; and calling the next execution instance according to the corresponding calling address to continue data processing according to the target data file. In an embodiment of the present invention, the control instance may establish a corresponding relationship (HandlerList) between the instance identifier and the calling address according to the instance identifier and the calling address received in the registration link. Accordingly, the instance identifier of the next execution instance may be matched in the corresponding relationship, and the calling address corresponding to the matched instance identifier may be used as the calling address of the next execution instance. When calling according to the calling address, the calling address may be accessed to find the next execution instance, and then the next execution instance may be controlled to start.
[0055] In the embodiment of the present invention, each available instance is first registered with the control instance, so that the control node can subsequently conveniently call the next execution instance according to the registered instance identifier and call address, thereby improving data processing efficiency to a certain extent.
[0056] Optionally, in one embodiment of the present invention, after calling the next execution instance to continue data processing according to the target data file through the control instance according to the value of the next execution instance attribute, and before resetting the value of the next execution instance attribute, the following steps can be performed: Step B, setting the current value of the next execution instance attribute to empty.
[0057] Specifically, the control instance may perform an operation of setting to null. Furthermore, when the control instance calls the next execution instance according to the value of the next execution instance attribute, it often reads the value of the next execution instance attribute first, and then calls according to the read value. Accordingly, the control instance may set the value of the current next execution instance attribute to null each time after reading the value of the next execution instance attribute.
[0058] In the embodiment of the present invention, after calling the next execution instance through the control instance, before resetting the value of the next execution instance attribute, by setting the value of the current next execution instance attribute to null, it is possible to avoid confusion between the re-set value and the previous value, thereby causing the subsequent control instance to be unable to correctly call the next execution instance. At the same time, by setting it to null in advance, when resetting, only the operation of adding a new instance identifier needs to be performed, thereby improving processing efficiency to a certain extent.
[0059] Optionally, in an embodiment of the present invention, the operation of setting the value of the next execution instance attribute may include:
[0060] Sub-step (3): If the next execution instance is associated with the processing result of the data processing, the first instance identifier associated with the processing result pre-set in the current execution instance is set as the value of the next execution instance attribute; the current execution instance is the execution instance currently performing data processing. For example, when the execution instance currently performing data processing is the first execution instance, the first execution instance is the current execution instance, and when the execution instance currently performing data processing is the next execution instance, the next execution instance is the current execution instance. For example, the first execution instance is instance 001 and the next execution instance is instance 002. Then, when instance 001 performs data processing, the current execution instance is instance 001, and when instance 002 performs data processing, the current execution instance is instance 002. .
[0061] In an embodiment of the present invention, since the processing logic of the current execution instance may contain judgment logic, the next execution instance to be called may be different corresponding to different judgment results. Therefore, the first instance identifier may include multiple first instance identifiers corresponding to multiple possible processing results. For example, the current execution instance is used to determine whether a picture contains a face. If a face is contained, instance C needs to be called to perform a face area extraction operation on the picture. If a face is not contained, instance D needs to be called to perform a labeling operation on the picture. Accordingly, the instance identifier of instance C and the instance identifier of instance D can be used as the first instance identifier, wherein the instance identifier of instance C is associated with the processing result: containing a face, and the instance identifier of instance D is associated with the processing result: not containing a face.
[0062] Furthermore, a first instance identifier associated with the current actual processing result can be selected from the multiple first instance identifiers according to the processing result. Assuming that the processing result of the current execution instance contains a face, the instance identifier of instance C can be set as the value of the next execution instance attribute.
[0063] Sub-step (4): If the next execution instance is not associated with the processing result, the second instance identifier pre-set in the current execution instance is set as the value of the next execution instance attribute.
[0064] Correspondingly, if the current execution instance does not have multiple processing results, a second instance identifier preset in the current execution instance can be directly set as the value of the next execution instance attribute.
[0065] Of course, the setting can also be implemented in other ways in the embodiments of the present invention. For example, the execution order information can be pre-generated and registered to the control instance, and the control instance can subsequently determine the instance identifier of the next execution instance of the current execution instance based on the execution order information. Among them, the execution order information can be an instance identification table, and the instance identification table can record the instance identification of the next execution instance of each execution instance when processing the data to be processed according to the execution order of the execution instance. Accordingly, the control instance can determine the instance identification of the next execution instance of the current execution instance by looking up the table based on the current execution instance and the processing result of the current execution instance, and set the instance identification to the value of the next execution instance attribute.
[0066] It should be noted that the control instance can call the handle method of the execution instance to trigger the execution instance to start executing the internal processing logic. After executing the logic of the current execution instance in the handle method, the value of the next execution instance property can be specified. Specifically, the control instance can call the nextHandler method preset for DataContext to specify the value of the next execution instance property.
[0067] In the embodiment of the present invention, the instance identifier to be set is determined according to the processing result, so that the setting can be accurately implemented in the case of a selection branch, that is, when the next execution instance is determined by the processing result of the previous execution instance. At the same time, by presetting the instance identifier of the next execution instance in the execution instance, the setting of the next execution instance attribute can be quickly implemented. And by presetting the instance identifier of the next execution instance of the execution instance only in each execution instance, there is no strong dependency between the execution instances, and each only needs to care about its own business logic. When the internal logic is modified, it will not affect other nodes, and the processing logic of the execution instance can be avoided from being coupled with the processing logic of the next execution instance. In this way, when the processing logic of the next execution instance changes and the code needs to be modified, there is no need to modify the previous execution instance, thereby reducing the maintenance and modification cost of the code. When the overall process changes, it is only necessary to modify the instance identifier of the next execution instance specified in the corresponding execution instance, and the code modification cost is small.
[0068] Optionally, in one embodiment of the present invention, if the first instance identifier or the second instance identifier that is pre-set does not exist in the current execution instance, the operation of resetting the value of the next execution instance attribute is stopped, and the processed target data file is output. Wherein, if the first instance identifier or the second instance identifier that is pre-set does not exist in the current execution instance, it means that the current execution instance is the last execution instance that processes the target data file. Accordingly, in this case, the processing flow of the target data file can be ended, resetting the value of the next execution instance attribute can be stopped, and the final processed target data file can be output. Furthermore, after outputting the final processed target data file, the resource release stage can be entered. Specifically, the receive method of the Engine can be popped out of the stack to release the resource occupation of the target data file, and wait for the next data to be processed to enter.
[0069] For example, the value of the next execution instance attribute can be represented as NextHandlerId. Since the value of the next execution instance attribute is not reset after the processing flow of the target data file is completed, the value of the next execution instance attribute is empty at this time. Therefore, when the NextHandlerId obtained by the Engine instance from DataConext is empty, it can be confirmed that the business process has ended. Accordingly, the final processed target data file can be output in this case.
[0070] In an embodiment of the present invention, by detecting whether a pre-set first instance identifier or a second instance identifier exists in the current execution instance, it is possible to quickly determine whether the processing flow has ended. If not, the processing flow is stopped in time to avoid executing unnecessary processing operations.
[0071] Optionally, in an embodiment of the present invention, the data attribute may further include a historical execution instance attribute. Accordingly, the embodiment of the present invention may further include the following steps:
[0072] Step C: for any current execution instance, after the current execution instance completes the data processing operation, the instance identifier of the current execution instance is added to the historical execution instance attributes.
[0073] For example, the instance identifier of the current execution instance and the historical execution instance attributes may be stored in the target data file in correspondence, thereby achieving addition.
[0074] Step D: After completing the data processing operation on the target data file, the instance identifier recorded in the historical execution instance attribute is stored in a first preset format.
[0075] In an embodiment of the present invention, each current execution instance will add its own instance identifier to the historical execution instance attribute after completion, thereby enabling the historical processing process to be recorded through the historical execution instance attribute. The historical execution instance attribute can be represented as a "HandlerHistory field". Furthermore, the first preset format can be pre-set according to actual needs. For example, the first preset format can be a log format. In this step, a data link log can be generated and stored based on the instance identifier recorded in the historical execution instance attribute.
[0076] In the embodiment of the present invention, by assigning the historical execution instance attribute to the data to be processed, after each execution instance completes the data processing operation, its own instance identifier is added to the historical execution instance attribute, thereby conveniently tracking the data processing process. At the same time, by storing the instance identifier recorded in the historical execution instance attribute in accordance with the first preset format, it is convenient to conveniently obtain the data processing link according to the recorded content later.
[0077] Optionally, in an embodiment of the present invention, the following steps may also be included:
[0078] Step E: registering the category information and execution order information of each enhanced instance into the control instance.
[0079] In this step, the category information of the enhancement instance can be used to indicate which category of enhancement instance the enhancement instance belongs to, for example, the enhancement instance belongs to the first category. The execution order information can be used to indicate the execution order of the enhancement instance, specifically, the execution order of the enhancement instance relative to the enhancement instances in the category to which it belongs. Furthermore, all enhancement instances can be registered to the enhancer list (AdvisorList) of the control instance during the program initialization phase.
[0080] Step F: determining a target category enhancement instance according to the category information, and calling the target category enhancement instance to perform a corresponding enhancement operation according to the execution sequence information of the target category enhancement instance through the control instance.
[0081] Wherein, determining the target category enhancement instance according to the category information includes:
[0082] Before calling the first execution instance through the control instance, the enhancement instance with the category information of the first category is determined as the target category enhancement instance. And / or, after stopping the operation of resetting the value of the attribute of the next execution instance, the enhancement instance with the category information of the second category is determined as the target category enhancement instance. And / or, for any of the current execution instances, before the current execution instance is called, the enhancement instance with the category information of the third category is determined as the target category enhancement instance. And / or, after the current execution instance completes the data processing operation, the enhancement instance with the category information of the fourth category is determined as the target category enhancement instance.
[0083] Specifically, the enhanced instances of the first category, the enhanced instances of the second category, the enhanced instances of the third category, and the enhanced instances of the fourth category in the embodiments of the present invention can be enhancers, wherein the enhanced instances of the first category can be pre-enhancers (EnginePreAdvisor) at the process level, and the enhanced instances of the second category can be post-enhancers (EnginePostAdvisor) at the process level. In this way, by additionally setting and executing the enhanced instances of the first category and / or the second category at the lifecycle level of the entire processing flow of the data to be processed, it is possible to additionally execute other functions at the process level and achieve functional enhancement. The enhanced instances of the third category can be pre-enhancers (HandlerPreAdvisor) at the execution instance level, and the enhanced instances of the fourth category can be post-enhancers (HandlerPostAdvisor) at the execution instance level. In this way, by additionally setting and executing the enhanced instances of the third category and / or the fourth category before and after each execution instance, it is possible to additionally execute other functions at the execution instance level and achieve functional enhancement.
[0084] For example, in the process-level pre-enhancement stage, after receiving the target data file through the receive method and setting the data processing state attribute to "doing", the control instance can search for all enhancers with Level = Engine & Type = Pre in the AdvisorList as the first category enhancement instances, and call them in sequence, so that the first category enhancement instances are executed in sequence according to the Order attribute order. Further, in the process-level post-enhancement stage, after judging that the processing flow is completed, all enhancers with Level = Engine & Type = Post can be searched in the AdvisorList as the second category enhancement instances, and called in sequence, so that the second category enhancement instances are executed in sequence according to the Order attribute order. Further, in the processor-level pre-enhancement stage In the process, after finding the first execution instance, you can search for all enhancers with Level=Handler&Type=Pre in the AdvisorList as the third category enhancement instances, and call them in sequence, so that the third category enhancement instances are executed in sequence according to the Order attribute order. Furthermore, in the processor-level post-enhancement stage, after the execution instance executes the handle method, you can search for all enhancers with Level=Handler&Type=Post in the AdvisorList as the fourth category enhancement instances, and call them in sequence, so that the fourth category enhancement instances are executed in sequence according to the Order attribute order. In this way, by pre-registering, searching for the execution order information according to the registered information, and calling them in sequence according to the execution order information, it can be ensured that the enhancement processing is carried out in an orderly manner.
[0085] It should be noted that the functions implemented by the enhanced instances in the embodiments of the present invention can be set according to actual needs. For example, in an optional implementation, when the target category enhanced instance is an enhanced instance of the first category, the calling of the target category enhanced instance to perform the corresponding enhanced operation may include: adding a time-consuming record attribute to the data attribute. The time-consuming record attribute can be represented as a StopWatch attribute instance, which can be used to store the time-consuming information of the execution instance.
[0086] Further, in the case where the target category enhancement instance is an enhancement instance of the third category, the calling of the target category enhancement instance to perform the corresponding enhancement operation may include: adding timing tracking information in the execution method of the current execution instance to time the execution process of the current execution instance. The tracking information may be stored in the StopWatch attribute, and the tracking information may be a method function for starting the timing operation. The tracking information may be added through tracking before the execution instance executes the handle method.
[0087] Correspondingly, in the case where the target category enhancement instance is an enhancement instance of the fourth category, the calling of the target category enhancement instance to perform the corresponding enhancement operation may include: reading the timing result, and updating the time-consuming record attribute according to the timing result. Specifically, it may be to perform a point-taking operation on the execution instance by executing the handle method to calculate the time taken for the execution instance. Furthermore, updating the time-consuming record attribute may be to increase the time obtained by this timing on the basis of the current timely time corresponding to the time-consuming record attribute, or it may be to directly store the time obtained by this timing into the time-consuming record attribute.
[0088] Finally, when the target category enhancement instance is an enhancement instance of the second category, the calling of the target category enhancement instance to perform the corresponding enhancement operation may include: storing the timing result recorded in the time-consuming record attribute in accordance with the second preset format. Among them, storing in accordance with the second preset format may specifically be to take out the duration information recorded in the StopWatch attribute, output the log, and store it in the log format. Alternatively, it may be to perform persistent storage to achieve record persistence.
[0089] In the embodiment of the present invention, by decoupling the execution instances, the added enhanced instance can conveniently realize the statistics of the time consumption of the processing flow, thereby improving the efficiency of the time consumption statistics to a certain extent. Of course, in other optional embodiments of the present invention, an enhanced instance whose function is to count the data flow of the execution instance can also be set to realize flow statistics.
[0090] It should be noted that the above-mentioned step D in the embodiment of the present invention can be implemented by a pre-set second category enhancement instance that is executed after the execution of the entire process is completed. Specifically, the processing logic of the second category enhancement instance can be based on the HandlerHistory field, and the data information therein is non-class stored. Furthermore, in the embodiment of the present invention, the interface specifications of the enhancement instances of each category, the interface specifications of the execution instances, and the interface specifications of the DataSource can be set by the developer according to the specific business processing logic, and the embodiment of the present invention is not limited to this. In the embodiment of the present invention, a fixed program model and interface can be provided to form a framework-type component, and the developer can implement specific functional instances according to the actual business scenarios, thereby improving the scenarios that the method can adapt to and improving usability.
[0091] Optionally, the execution instance in the embodiment of the present invention may also be called a service processor or a logical node. Figure 3 is a schematic diagram of a data processing framework design provided by an embodiment of the present invention, such as Figure 3As shown, after registration, the enhancer list AdvisorList and the business processor list HandlerList can be obtained. The control instance Engine can be the core module of the framework, which can be used to be responsible for data packaging, scheduling and execution of business processors and process enhancers, and maintaining AdvisorList and HandlerList. Furthermore, for the data input to DataSource, the target data file DataContext can be obtained through data encapsulation <data>. Based on AdvisorLis, before the entire processing flow starts, the first category enhancement instance EnginePreAdvisor can be executed, and after the entire processing flow ends, the fourth category enhancement instance EnginePostAdvisor can be executed to achieve process-level enhancement. The second category enhancement instance HandlerPreAdvisor and the third category enhancement instance HandlerPostAdvisor can be executed respectively before and after the execution instance starts processing. Based on the HandlerList control instance, the next execution instance NextHandler can be called, and by judging whether the value of the next execution instance attribute is empty (hasNextHandler()?), if it is empty, that is, it does not exist, the process ends. If it is not empty, that is, it still exists, continue to call the next execution instance.
[0092] Furthermore, the instance in the embodiment of the present invention may be a class in code development. Figure 4 is a core class schematic diagram of a framework component provided by an embodiment of the present invention, such as Figure 4 As shown in the figure, Engine is the core engine of the entire framework to implement the data stream processing framework. It drives the execution of the entire data processing process and manages three types of executable modules: Datasource, Handler, and Advisor. Among them, these three types of executable modules can agree on the specifications that need to be followed during development in the form of interfaces. Under this premise, any business logic implemented by each module through coding will not affect the execution method of driving the data processing process, that is, these modules can be managed and executed by the framework, thereby making the program flexible and scalable.
[0093] The data processing method of the embodiment of the present invention is described below with a specific implementation. Figure 5 is a schematic diagram of a specific application scenario provided by an embodiment of the present invention, such as Figure 5 As shown, in this specific implementation, it is necessary to obtain the snapshot of passers-by in the subsidiary park from the monitoring equipment in this area, and collide the snapshot through the interface of the head office face library, that is, through the interface of the head office face library, the work card picture in the head office face library is compared with the snapshot picture, wherein the work card picture contains the employee's face picture and the employee's work number, and the work number contains a part that represents the subsidiary to which the employee belongs. The content of this part is different for employees of different subsidiaries. Further, if the comparison is successful, that is, if the head office face library contains a work card picture that matches the face picture and the snapshot picture, the matching work card picture and work number information can be obtained. Further, the personnel in the obtained snapshot picture can be entered into different databases (the personnel database of this subsidiary, the database of other subsidiaries coming to this subsidiary, the database of key personnel, the database of temporary visitors or the database of outsourced personnel) by the work number, focusing on passers-by who appear in the subsidiary for many consecutive days or multiple times and are not matched by the provincial department.
[0094] Through the framework assembly provided by the embodiment of the present invention, only Figure 5 Each judgment and processing node in the list is listed, and instances for implementing the logic of individual nodes are created one by one to obtain multiple execution instances. The entire processing flow can be realized by scheduling these execution instances one by one through the control instance, thereby reducing the development difficulty to a certain extent and improving the implementation efficiency. Among them, some of the created execution instances can be shown in the following Table 1:
[0095]
[0096] Table 1
[0097] Furthermore, considering data operation and maintenance, the enhancer shown in the following Table 2 can be added to store the processing flow of each snapshot for later data classification and statistical analysis, determine the operating time proportion of each business processor, and monitor the performance bottleneck of the system.
[0098]
[0099] Table 2
[0100] In this specific implementation, it is only necessary to create an execution instance according to the specific processing logic that needs to be implemented. There is no logical coupling between the processing logic codes of each execution instance. By controlling the instance to drive these execution instances from the outside, the processing of the image can be achieved, thereby improving the processing efficiency to a certain extent.
[0101] At the same time, in the embodiment of the present invention, based on the idea of data packing, the data to be processed and the data attributes are encapsulated and packaged, the driver of the global data flow is separated from the specific business logic, and each execution instance in the data processing process is monitored and managed through an independent driver engine (i.e., control instance). A business logic layer processing framework suitable for complex data flows, with strong code scalability, coordinated management and business isolation, and balanced and stable performance consumption can be formed, thereby improving the processing effect on complex streaming data processing business scenarios.
[0102] Figure 6 is a block diagram of a data processing device provided by an embodiment of the present invention, such as Figure 6 As shown, the device 600 includes:
[0103] A generating module 601 is used to generate a target data file according to the data to be processed; the target data file includes the data to be processed, a first instance identifier and data attributes, and the data attributes include attributes of the next execution instance;
[0104] A first processing module 602 is used to call the first execution instance indicated by the first instance identifier through a preset control instance to perform data processing according to the target data file, and set the value of the next execution instance attribute to represent the next execution instance;
[0105] The second processing module 603 is used to call the next execution instance through the control instance according to the value of the next execution instance attribute after setting the value of the next execution instance attribute to continue data processing according to the target data file, and reset the value of the next execution instance attribute.
[0106] Optionally, the generating module is specifically used for:
[0107] Setting the value of the next execution instance attribute to the first instance identifier;
[0108] According to a preset data structure model, the data attributes are encapsulated for the data to be processed.
[0109] Optionally, the device 600 further includes:
[0110] A first registration module, used to register the instance identifier and calling address of each available instance to the control instance;
[0111] Accordingly, the second processing module 603 is specifically configured to:
[0112] According to the registered instance identifier and the calling address, searching for the calling address corresponding to the instance identifier of the next execution instance;
[0113] According to the corresponding calling address, the next execution instance is called to continue data processing according to the target data file.
[0114] Optionally, the device 600 further includes:
[0115] The first setting module is used to set the value of the current attribute of the next execution instance to be empty.
[0116] Optionally, the device 600 further includes:
[0117] The first adding module is used to add the processing result of the data processing to the business processing result attribute.
[0118] Optionally, the setting of the value of the attribute of the next execution instance includes:
[0119] If the next execution instance is associated with the processing result of the current execution instance, setting the first instance identifier associated with the processing result pre-set in the current execution instance as the value of the next execution instance attribute;
[0120] If the next execution instance is not associated with the processing result, setting the second instance identifier preset in the current execution instance as the value of the next execution instance attribute;
[0121] The current execution instance is an execution instance that is currently performing data processing.
[0122] Optionally, the device 600 further includes:
[0123] The output module is used to stop the operation of resetting the value of the next execution instance attribute if the first instance identifier or the second instance identifier preset in the current execution instance does not exist, and output the processed target data file.
[0124] Optionally, the device 600 further includes:
[0125] A second registration module, used to register the category information and execution order information of each enhanced instance to the control instance;
[0126] The enhancement module is used to determine a target category enhancement instance according to the category information, and call the target category enhancement instance to perform a corresponding enhancement operation according to the execution sequence information of the target category enhancement instance through the control instance.
[0127] Optionally, the enhancement module is specifically used to:
[0128] Before calling the first execution instance through the control instance, determining the enhancement instance whose category information is the first category as the target category enhancement instance;
[0129] and / or, after stopping the operation of resetting the value of the attribute of the next execution instance, determining the enhancement instance whose category information is the second category as the target category enhancement instance;
[0130] and / or, for any current execution instance, before the current execution instance is called, determining the enhancement instance whose category information is the third category as the target category enhancement instance; the current execution instance is the execution instance currently performing data processing;
[0131] And / or, after the current execution instance completes the data processing operation, the enhancement instance whose category information is the fourth category is determined as the target category enhancement instance.
[0132] Optionally, in the case where the target category enhancement instance is an enhancement instance of the first category, the calling of the target category enhancement instance to perform a corresponding enhancement operation includes: adding a time-consuming record attribute to the data attribute;
[0133] In the case where the target category enhancement instance is an enhancement instance of the second category, the calling of the target category enhancement instance to perform the corresponding enhancement operation includes: storing the timing result recorded in the time-consuming record attribute in a second preset format;
[0134] In the case where the target category enhancement instance is an enhancement instance of the third category, the calling of the target category enhancement instance to perform the corresponding enhancement operation includes: adding timing tracking information in the execution method of the current execution instance to time the execution process of the current execution instance;
[0135] In the case that the target category enhancement instance is an enhancement instance of the fourth category, the calling of the target category enhancement instance to perform the corresponding enhancement operation includes: reading the timing result, and updating the time-consuming record attribute according to the timing result.
[0136] Optionally, the data attribute further includes a historical execution instance attribute; and the device 600 further includes:
[0137] A second adding module is used for adding, for any current execution instance, an instance identifier of the current execution instance to the historical execution instance attribute after the current execution instance completes the data processing operation; the current execution instance is the execution instance currently performing data processing;
[0138] The storage module is used to store the instance identifier recorded in the historical execution instance attribute in a first preset format after stopping the operation of resetting the value of the next execution instance attribute.
[0139] Optionally, the data attribute further includes a data processing state attribute, and the device 600 further includes:
[0140] A second setting module, used for setting the data processing state attribute in the data attributes to a pending state before encapsulating the data attributes for the pending data;
[0141] A third setting module is used to set the data processing state attribute to a processing state after the current execution instance starts the data processing operation; the current execution instance is the execution instance currently performing data processing;
[0142] The fourth setting module is used to set the data processing state attribute to a processing completion state after stopping the operation of resetting the value of the next execution instance attribute.
[0143] The various steps implemented by the above device and the effects that can be achieved can be referred to the aforementioned method embodiments, and will not be described in detail here.
[0144] In addition, an embodiment of the present invention further provides an electronic device, such as Figure 7 As shown, the electronic device 700 includes a processor 720, a memory 710, and a computer program stored in the memory 710 and executable on the processor. When the computer program is executed by the processor 720, the various processes of the data processing method embodiments described in the above embodiments are implemented, and the same technical effects can be achieved. To avoid repetition, they will not be described here.
[0145] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the above-mentioned data processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0146] As for the above-mentioned device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0147] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0148] It is easy for a person skilled in the art to think that any combination of the above embodiments is feasible, so any combination of the above embodiments is an implementation scheme of the present invention. However, due to space limitations, this specification will not describe them in detail here.
[0149] The data processing method provided at this is not inherently related to any specific computer, virtual system or other equipment. Various general systems can also be used together with the teaching based on this. According to the above description, it is obvious that the structure required by the system with the scheme of the present invention is constructed. In addition, the present invention is not directed to any specific programming language yet. It should be understood that various programming languages can be utilized to realize the content of the present invention described here, and the description of the above specific language is for disclosing the best mode of the present invention.
[0150] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0151] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those expressly recited in each claim. Rather, as reflected in the claims, inventive aspects lie in less than all of the features of the individual embodiments previously disclosed. Therefore, the claims that follow the detailed description are hereby expressly incorporated into the detailed description, with each claim itself serving as a separate embodiment of the present invention.
[0152] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0153] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims, any one of the claimed embodiments may be used in any combination.
[0154] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the data acquisition method according to an embodiment of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0155] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.< / data>
Claims
1. A data processing method, characterized in that: The method comprises: Generate a target data file according to the data to be processed; the target data file includes the data to be processed, the first instance identifier and data attributes, and the data attributes include the next execution instance attributes; Calling the first execution instance indicated by the first instance identifier through a preset control instance to perform data processing according to the target data file, and setting the value of the next execution instance attribute to represent the next execution instance; After setting the value of the next execution instance attribute, calling the next execution instance to continue data processing according to the target data file through the control instance according to the value of the next execution instance attribute, and resetting the value of the next execution instance attribute; Among them, in the program initialization stage, the category information and execution sequence information of each enhancement instance are registered to the control instance; the target category enhancement instance is determined according to the category information, and the target category enhancement instance is called by the control instance to perform the corresponding enhancement operation according to the execution sequence information of the target category enhancement instance.
2. The method according to claim 1, characterized in that The step of generating a target data file according to the data to be processed includes: Setting the value of the next execution instance attribute to the first instance identifier; According to a preset data structure model, the data attributes are encapsulated for the data to be processed.
3. The method according to claim 1, characterized in that The value of the next execution instance attribute is the instance identifier of the next execution instance; before generating the target data file according to the data to be processed, the method further includes: Registering the instance identifier and calling address of each available instance to the control instance; Accordingly, calling the next execution instance to continue data processing according to the target data file includes: According to the registered instance identifier and the calling address, searching for the calling address corresponding to the instance identifier of the next execution instance; According to the corresponding calling address, the next execution instance is called to continue data processing according to the target data file.
4. The method according to claim 1, characterized in that: After calling the next execution instance according to the value of the next execution instance attribute through the control instance to continue data processing according to the target data file, and before resetting the value of the next execution instance attribute, the method further includes: Set the current value of the next execution instance attribute to null.
5. The method according to claim 1, characterized in that The data attributes also include business processing result attributes; after performing data processing according to the target data file, the method further includes: The processing result of the data processing is added to the business processing result attribute.
6. The method according to claim 1, characterized in that The step of setting the value of the attribute of the next execution instance includes: If the next execution instance is associated with the processing result of the current execution instance, setting the first instance identifier associated with the processing result pre-set in the current execution instance as the value of the next execution instance attribute; If the next execution instance is not associated with the processing result, setting the second instance identifier preset in the current execution instance as the value of the next execution instance attribute; The current execution instance is an execution instance that is currently performing data processing.
7. The method according to claim 6, characterized in that The method further comprises: If the first instance identifier or the second instance identifier that is preset does not exist in the current execution instance, the operation of resetting the value of the next execution instance attribute is stopped, and the processed target data file is output.
8. The method according to claim 1, characterized in that: The step of determining the target category enhancement instance according to the category information includes: Before calling the first execution instance through the control instance, determining the enhancement instance whose category information is the first category as the target category enhancement instance; and / or, after stopping the operation of resetting the value of the attribute of the next execution instance, determining the enhancement instance whose category information is the second category as the target category enhancement instance; and / or, for any current execution instance, before the current execution instance is called, determining the enhancement instance whose category information is the third category as the target category enhancement instance; the current execution instance is the execution instance currently performing data processing; And / or, after the current execution instance completes the data processing operation, the enhancement instance whose category information is the fourth category is determined as the target category enhancement instance.
9. The method according to claim 8, characterized in that In the case where the target category enhancement instance is an enhancement instance of the first category, the calling of the target category enhancement instance to perform a corresponding enhancement operation includes: adding a time-consuming record attribute to the data attribute; In the case where the target category enhancement instance is an enhancement instance of the second category, the calling of the target category enhancement instance to perform the corresponding enhancement operation includes: storing the timing result recorded in the time-consuming record attribute in a second preset format; In the case where the target category enhancement instance is an enhancement instance of the third category, the calling of the target category enhancement instance to perform the corresponding enhancement operation includes: adding timing tracking information in the execution method of the current execution instance to time the execution process of the current execution instance; In the case that the target category enhancement instance is an enhancement instance of the fourth category, the calling of the target category enhancement instance to perform the corresponding enhancement operation includes: reading the timing result, and updating the time-consuming record attribute according to the timing result.
10. The method according to claim 1, characterized in that The data attributes also include historical execution instance attributes; The method further comprises: For any current execution instance, after the current execution instance completes the data processing operation, the instance identifier of the current execution instance is added to the historical execution instance attribute; the current execution instance is the execution instance currently performing data processing; After the operation of resetting the value of the next execution instance attribute is stopped, the instance identifier recorded in the historical execution instance attribute is stored in a first preset format.
11. The method according to any one of claims 1 to 10, characterized in that: The data attributes further include a data processing status attribute, and the method further includes: Before encapsulating the data attributes for the data to be processed, setting the data processing state attribute in the data attributes to a pending state; After the current execution instance starts the data processing operation, the data processing state attribute is set to a processing state; the current execution instance is the execution instance currently performing data processing; After stopping the operation of resetting the value of the next execution instance attribute, the data processing state attribute is set to a processing completion state.
12. A data processing device, characterized in that: The device comprises: A generating module, used to generate a target data file according to the data to be processed; the target data file includes the data to be processed, a first instance identifier and data attributes, and the data attributes include attributes of the next execution instance; A first processing module, configured to call the first execution instance indicated by the first instance identifier through a preset control instance to perform data processing according to the target data file, and to set the value of the next execution instance attribute to represent the next execution instance; a second processing module, configured to, after setting the value of the attribute of the next execution instance, call the next execution instance through the control instance according to the value of the attribute of the next execution instance to continue data processing according to the target data file, and reset the value of the attribute of the next execution instance; Among them, the device also includes: a second registration module, used to register the category information and execution sequence information of each enhancement instance to the control instance during the program initialization phase; an enhancement module, used to determine the target category enhancement instance based on the category information, and call the target category enhancement instance through the control instance according to the execution sequence information of the target category enhancement instance to perform the corresponding enhancement operation.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 11 are implemented.
14. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the data processing method according to any one of claims 1 to 11 when executed by the processor.