Data processing method and device, electronic equipment and storage medium
By automatically executing data processing methods, using preset syntax rules to parse data execution scripts, and automatically executing processing functions, the problem of low efficiency of multi-model joint processing in the field of financial private deployment is solved, and efficient data processing is achieved.
Patent Information
- Application Number
- CN202411368717.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-03
Smart Images

Figure CN119248382A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data processing method, device, electronic device and storage medium. Background Art
[0002] With the development of artificial intelligence technology, more and more companies are actively applying models in data processing scenarios to improve data processing efficiency.
[0003] In the related technology, in the field of private financial deployment, a large number of models are needed to complete the functional application of specific scenarios. In the private deployment scenarios in the financial field, the application of models is gradually applied in various small scenarios, such as edge computing and private stand-alone software. In the process of data processing, multiple models are often required to complete a certain calculation, which causes the staff to manually send the output results of the model to another model for further processing. The whole process requires human intervention and the data processing efficiency is low. Therefore, it is urgent to provide a data processing method to solve the above technical problems. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a data processing method, device, electronic device and storage medium, which can automatically execute the entire process of data processing without human intervention, thereby improving data processing efficiency.
[0005] To achieve the above object, a first aspect of an embodiment of the present application provides a data processing method, the method comprising:
[0006] Get data execution script and data to be processed;
[0007] The data execution script is parsed using a preset grammar rule to parse out a plurality of processing functions and a processing order between the plurality of processing functions;
[0008] According to the processing order, the first processing function to be processed is determined as the target processing function;
[0009] Calling the target processing function to process the data to be processed to obtain a processing result;
[0010] According to the processing order, the next processing function of the target processing function is updated to the target processing function, and the processing result is updated to the data to be processed, and the step of returning to execute calling the target processing function to process the data to be processed and obtain the processing result is obtained, until each processing function is processed and the output result is obtained.
[0011] In some embodiments, the step of parsing the data execution script using a preset grammar rule to parse out a plurality of processing functions and a processing order between the plurality of processing functions includes:
[0012] Parsing the data execution script using preset grammar rules to construct an abstract syntax tree;
[0013] Determine each parent node in the abstract syntax tree as a processing function;
[0014] The sorting order of each parent node is obtained in sequence from top to bottom, and the sorting order of each parent node is determined as the processing order of the corresponding processing function.
[0015] In some embodiments, the step of parsing the data execution script using preset grammar rules to construct an abstract syntax tree includes:
[0016] Recognizing a plurality of grammatical morphemes in the data execution script, wherein the grammatical morphemes are specified by preset grammatical rules;
[0017] Based on the plurality of grammatical morphemes and the preset grammatical rule, selecting a target grammatical morpheme as a parent node from the plurality of grammatical morphemes;
[0018] The grammatical morphemes between adjacent target grammatical morphemes are determined as leaf nodes of the parent nodes corresponding to the target grammatical morphemes that are located in front of the adjacent target grammatical morphemes;
[0019] According to the sorting order of the target grammatical morphemes in the data execution script, parent nodes are constructed from top to bottom, and corresponding leaf nodes are constructed under each parent node to obtain an abstract syntax tree.
[0020] In some embodiments, calling the target processing function to process the data to be processed to obtain a processing result includes:
[0021] Calling the target processing function to process the data to be processed;
[0022] Obtain the target output data name corresponding to the target processing function;
[0023] When it is detected that target generated data whose data name is the target output data name exists in the generated data generated by the target processing function, the target generated data is determined as the processing result.
[0024] In some embodiments, the processing until each processing function is completed and an output result is obtained includes:
[0025] After each processing function is processed, the last processing result among the multiple processing results is determined as the output result.
[0026] In some embodiments, the processing until each processing function is completed and an output result is obtained includes:
[0027] Until each processing function is processed, each processing result is determined as the output result.
[0028] In some embodiments, calling the target processing function to process the data to be processed to obtain a processing result includes:
[0029] Configuring corresponding operating resources for the target processing function;
[0030] The data to be processed is processed using the running resources corresponding to the target processing function to obtain a processing result.
[0031] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a data processing device, including:
[0032] An acquisition unit, used to acquire data execution scripts and data to be processed;
[0033] A parsing unit, used to parse the data execution script using preset grammar rules, and parse out a plurality of processing functions and a processing order between the plurality of processing functions;
[0034] A determination unit, configured to determine the first processing function to be processed as a target processing function according to the processing sequence;
[0035] A processing unit, used for calling the target processing function to process the data to be processed and obtain a processing result;
[0036] An execution unit is used to update the next processing function of the target processing function to the target processing function according to the processing order, and to update the processing result to the data to be processed, and return to execute the step of calling the target processing function to process the data to be processed and obtain the processing result, until each processing function is processed and the output result is obtained.
[0037] In some embodiments, the parsing unit includes:
[0038] A construction subunit, used to parse the data execution script using preset grammar rules to construct an abstract syntax tree;
[0039] A first determining subunit, configured to determine each parent node in the abstract syntax tree as a processing function;
[0040] The second determining subunit is used to obtain the sorting order of each parent node in order from top to bottom, and determine the sorting order of each parent node as the processing order of the corresponding processing function.
[0041] In some embodiments, a subunit is constructed to:
[0042] Recognizing a plurality of grammatical morphemes in the data execution script, wherein the grammatical morphemes are specified by preset grammatical rules;
[0043] Based on the plurality of grammatical morphemes and the preset grammatical rule, selecting a target grammatical morpheme as a parent node from the plurality of grammatical morphemes;
[0044] The grammatical morphemes between adjacent target grammatical morphemes are determined as leaf nodes of the parent nodes corresponding to the target grammatical morphemes that are located in front of the adjacent target grammatical morphemes;
[0045] According to the sorting order of the target grammatical morphemes in the data execution script, parent nodes are constructed from top to bottom, and corresponding leaf nodes are constructed under each parent node to obtain an abstract syntax tree.
[0046] In some embodiments, the processing unit includes:
[0047] A calling subunit, used for calling the target processing function to process the data to be processed;
[0048] An acquisition subunit, used to acquire the target output data name corresponding to the target processing function;
[0049] The third determining subunit is configured to determine the target generated data as the processing result when it is detected that the generated data generated by the target processing function includes target generated data whose data name is the target output data name.
[0050] In some embodiments, a subunit is called to:
[0051] Configuring corresponding operating resources for the target processing function;
[0052] The data to be processed is processed using the operating resources corresponding to the target processing function.
[0053] In some embodiments, the execution unit is configured to:
[0054] After each processing function is processed, the last processing result among the multiple processing results is determined as the output result.
[0055] In some embodiments, the execution unit is configured to:
[0056] Until each processing function is processed, each processing result is determined as the output result.
[0057] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0058] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0059] The data processing method, device, electronic device and storage medium proposed in the present application obtain a data execution script and data to be processed; parse the data execution script using preset grammatical rules to parse out multiple processing functions and the processing order between the multiple processing functions; determine the first processing function to be processed as the target processing function according to the processing order; call the target processing function to process the data to be processed to obtain a processing result; update the next processing function of the target processing function to the target processing function according to the processing order, and update the processing result to the data to be processed, and return to execute the step of calling the target processing function to process the data to be processed to obtain the processing result, until each processing function is processed and the output result is obtained. In this way, by obtaining the data execution script and the data to be processed, and parsing the data execution script in sequence according to the preset grammatical rules, the processing function is automatically executed to realize the automatic processing of data, avoid manual operation, and improve processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 is a flow chart of a data processing method provided in an embodiment of the present application;
[0061] Figure 2 yes Figure 1 Flow chart of step S102 in FIG.
[0062] Figure 3 It is a schematic diagram of the abstract syntax tree of the data execution script transformation;
[0063] Figure 4 yes Figure 2 Flow chart of step S201 in FIG.
[0064] Figure 5 yes Figure 1 Flow chart of step S104 in FIG.
[0065] Figure 6 yes Figure 5 Flow chart of step S401 in FIG.
[0066] Figure 7 yes Figure 1 Flow chart of step S105 in FIG.
[0067] Figure 8 yes Figure 1 Flowchart of step S105 in .
[0068] Fig. 9 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0069] Fig.10 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0071] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0072] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0073] First, some nouns involved in this application are analyzed:
[0074] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0075] Network model: A network model is an abstract representation and mathematical description of various network systems in the real world. It usually consists of a set of nodes and edges connecting the nodes, and is used to simulate and analyze different types of network structures and their behaviors. The components include: 1. Nodes, which represent entities in the network. They can be physical entities such as computers, sensors, etc., or abstract concepts such as people, organizations, etc. Each node may have specific attributes such as name, status, function, etc. 2. Edges, which represent the relationship or connection between nodes. Edges can be directed or undirected, with or without weights. For example, in a social network, an edge can represent the relationship between people, and the weight can represent the strength of the relationship.
[0076] The functions of network models include: 1. Understanding and analyzing network structure: By analyzing the network model, we can understand the network's topological structure, connection patterns between nodes, centrality and other characteristics. This helps to discover key nodes, community structures and potential vulnerabilities in the network. 2. Predicting network behavior: Based on the network model, various predictions can be made, such as the speed of information propagation in the network, the reliability of the network, the behavioral changes of nodes, etc. This is very important for decision-making and risk management. 3. Optimizing network performance: Network models can be used to optimize the performance indicators of the network, such as improving the throughput of communication networks, reducing the congestion of traffic networks, and enhancing the information dissemination efficiency of social networks. By adjusting the network structure, node attributes or edge weights, the optimal network configuration can be found. 4. Designing and planning networks: Network models can provide guidance when designing new network systems or expanding existing networks. According to specific needs and goals, appropriate network models can be constructed, and simulations and analyses can be performed to determine the best design solution.
[0077] Backus-Naur Form (BNF) is a formal symbolic representation for context-free grammars. It is used to define the grammatical rules of programming languages, markup languages, or other formal languages. In BNF, grammar rules consist of productions, each of which represents the definition of a grammatical structure. The left side of the production is a non-terminal symbol, which represents the name of the grammatical structure to be defined, and the right side is a sequence of symbols consisting of terminals and non-terminals, which indicates which elements the grammatical structure can be composed of.
[0078] Based on this, the embodiments of the present application provide a data processing method and device, an electronic device and a storage medium, which aim to automatically execute processing functions, realize automated processing of data, avoid manual operations, and improve processing efficiency.
[0079] The data processing method and device, electronic device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the data processing method in the embodiments of the present application is described.
[0080] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0081] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0082] The data processing method provided in the embodiment of the present application relates to the field of artificial intelligence technology. The data processing method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the data processing method, etc., but is not limited to the above forms.
[0083] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0084] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0085] Figure 1 is an optional flowchart of the data processing method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S105.
[0086] Step S101, obtaining a data execution script and data to be processed.
[0087] The data execution script is a script edited by Backus-Naur Form (BNF) for automatic execution, and the data to be processed is the data that needs to be processed for the first time when the data execution script is executed.
[0088] Specifically, the data execution script edited by BNF can clearly define the process and rules of data processing. When the script is executed, the system will automatically process according to the rules in the script. The data to be processed is the data that needs to be processed first in this automated execution process.
[0089] In addition, since the data execution script code edited using BNF is shorter, it is convenient for parameter passing during input, and easy for developers to read, and convenient for manual maintenance and parameter interaction.
[0090] Step S102: parse the data execution script using preset grammar rules to parse out a plurality of processing functions and a processing order between the plurality of processing functions.
[0091] Among them, since the data execution script is edited by BNF, the preset grammar rules that can parse the data execution script must also be BNF, that is, the preset grammar rules are BNF, and the data execution script is parsed to parse out the multiple processing functions contained in the data execution script and the processing order between the multiple processing functions. The purpose is to clarify in which order these processing functions should be called when executing data processing tasks, so as to realize the automated data processing process.
[0092] For example, the data execution script is:
[0093] <expression> ::= <number> | <expression> + <expression> | <expression> - <expression> <number>::=[0-9]+;
[0094] The data execution script can be: "2+3-1" processing function includes addition and subtraction operations, first perform addition operation (2+3), get the result 5, and then perform subtraction operation (5-1). In this way, when executing data processing tasks, it is clear that these processing functions should be called in the order of addition first and then subtraction, thereby realizing an automated data processing flow.
[0095] Step S103: According to the processing sequence, the first processing function to be processed is determined as the target processing function.
[0096] Among them, after the processing order between the processing functions is parsed in step S102, the first processing function that needs to be processed is determined as the target processing function, so that the processing data is subsequently processed by the target processing function so that the processing functions are automatically executed according to the data execution script.
[0097] For example, in the data execution script "x+yz", the parsed processing order is to perform addition operation first and then subtraction operation. Then in step S103, the addition operation will be determined as the first target processing function to be processed, and it will be determined as the target processing function. Next, in the subsequent steps, this target processing function will be called to process the data to be processed.
[0098] Step S104, calling the target processing function to process the data to be processed to obtain a processing result.
[0099] Among them, since the data to be processed is the first data to be processed in the data execution script, and the target processing function determined in step S103 is also the first processing function for data processing in the data execution script, the data to be processed is the data processed by the target processing function. Therefore, the target processing function is called to process the data to be processed to obtain the processing result.
[0100] Specifically, when using the processing function in the model to process data, when calling the processing function in the local model, the API of the locally loaded model can be called by internal call (call); when calling the remote model, the API of the corresponding model can be called by HyperText Transfer Protocol (HTTP) Remote Procedure Call (RPC).
[0101] Step S105, updates the next processing function of the target processing function to the target processing function according to the processing order, and updates the processing result to the data to be processed, and returns to execute the step of calling the target processing function to process the data to be processed and obtain the processing result, until each processing function is processed and the output result is obtained.
[0102] Among them, in step S104, the data to be processed is processed by the target processing function, and after the processing result is obtained, in order to realize the automatic execution of multiple processing functions, it is necessary to update the next processing function of the target processing function to the target processing function according to the processing order determined in step S102, and update the processing result to the data to be processed, and return to execute the step of calling the target processing function to process the data to be processed and obtain the processing result, until each processing function is processed, indicating that the data execution script has been executed, and the output result is obtained.
[0103] For example, in the example of "2+3-1", the result 5 is obtained after the addition operation in step S104 is completed, and then in this step S105, the subtraction operation is updated to the target processing function, 5 is updated to the data to be processed, and the subtraction operation is performed to obtain the final output result 4.
[0104] Specifically, the following will take the model for processing image data as an example to achieve automated execution through data execution scripts and data to be processed. 1. Get the data execution script and the data to be processed: The data execution script specifies the processing steps to be performed on the image, such as grayscale conversion, edge detection, and image compression. The data to be processed is an image that needs to be processed. 2. Use the preset grammar rules to parse the data execution script, parse out multiple processing functions and the processing order between multiple processing functions: By parsing the script, the order of processing functions is determined to be grayscale conversion, edge detection, and image compression. 3. According to the processing order, the first processing function for data processing is determined as the target processing function: First, the grayscale conversion function is determined as the target processing function. 4. Call the target processing function to process the data to be processed and obtain the processing result: Call the grayscale conversion function to process the image and convert the image into a grayscale image. 5. Update the next processing function of the target processing function to the target processing function in the processing order, and update the processing result to the data to be processed, and return to execute the call to the target processing function to process the data to be processed until each processing function is processed and the output result is obtained: After the grayscale conversion is completed, the edge detection function is updated to the target processing function, and the grayscale image is processed as the data to be processed to obtain the image after edge detection. Next, update the image compression function to the target processing function, compress the image after edge detection, and obtain the final output result, that is, the compressed image. In this example, the model automatically calls each processing function in turn to process the image according to the instructions of the data execution script, without manual intervention, and finally obtains the processed output result.
[0105] Steps S101 to S105 shown in the embodiment of the present application are performed by obtaining a data execution script and data to be processed; parsing the data execution script using preset grammatical rules to parse multiple processing functions and the processing order between the multiple processing functions; determining the first processing function to be processed as the target processing function according to the processing order; calling the target processing function to process the data to be processed to obtain a processing result; updating the next processing function of the target processing function to the target processing function according to the processing order, and updating the processing result to the data to be processed, and returning to execute the step of calling the target processing function to process the data to be processed to obtain a processing result, until each processing function is processed and an output result is obtained. In this way, by obtaining the data execution script and the data to be processed, and parsing the data execution script in sequence according to the preset grammatical rules, the processing function is automatically executed to realize automatic processing of data, avoid manual operation, and improve processing efficiency.
[0106] See also Figure 2 In some embodiments, step S102 may include but is not limited to steps S201 to S203:
[0107] Step S201, parse the data execution script using preset grammar rules to construct an abstract syntax tree.
[0108] Among them, the data execution script is parsed by the parser and preset grammar rules to build an abstract syntax tree. The role of the parser is to analyze and combine the lexical units generated by the lexical analyzer according to the grammatical rules of the programming language to build an abstract syntax tree (AST). The abstract syntax tree represents the grammatical structure of the code in a tree structure, which is convenient for subsequent processing and analysis. The parser will check whether the order and combination of lexical units conform to the grammatical rules. If so, it will build the corresponding abstract syntax tree; otherwise, it will report a syntax error.
[0109] For example, for the above lexical unit, the parser will determine according to the grammatical rules that "int" is a type declaration, "x" is an identifier, "=" is an assignment operator, "5" is a constant, ";" is a statement terminator, and construct the corresponding abstract syntax tree.
[0110] Step S202: determine each parent node in the abstract syntax tree as a processing function.
[0111] Among them, since the construction rules when constructing the abstract syntax tree stipulate that the position of each parent node in the abstract syntax tree is a processing function for processing data, and the child node is the processing data of the corresponding parent node, each parent node in the abstract syntax tree can be determined as a processing function.
[0112] For details, please refer to Figure 3 , Figure 3 Schematic diagram of the abstract syntax tree for performing script conversion for the following data: AudioTrans(configId=wav_16k), UWFunc(0.8, abc=(-0.45L+0.89L), def=Sum(0.01, 0.02)), AudioTrans(configId=wav_16k), ExtractFile(ccc= / nfsc / ddddd-aaaaaa_bbbbb / yyyyy.wav; / nfsc / ddddd-aaaaaa_bbbbbb / yyyyy2.wav, ddd=http: / / www.abc.com / fffff / china?xyz.wav), AudioFeature, GetFeature. Among them, each parent node in the abstract syntax tree is: AudioTrans (audio conversion) processing function, UWFunc (numerical calculation) processing function, ExtractFile (file extraction) processing function, AudioFeature (audio feature extraction) processing function and GetFeature (feature extraction) processing function.
[0113] Step S203 , obtaining the sorting order of each parent node in order from top to bottom, and determining the sorting order of each parent node as the processing order of the corresponding processing function.
[0114] Among them, since the construction rules when constructing the abstract syntax tree stipulate that the abstract syntax tree is built one by one from top to bottom, the sorting order of the processing functions in the data execution script corresponds to the sorting order of the parent nodes in the abstract syntax tree. In this way, the sorting order of each parent node can be determined as the processing order of the corresponding processing function.
[0115] Specifically, according to the result of the abstract syntax tree, the entire tree is traversed in a depth-first manner, and all commands are parsed and executed, and the corresponding parameters are passed.
[0116] For example, Figure 3 As shown, the sorting order of the parent nodes from top to bottom in the abstract syntax tree is AudioTrans corresponding to sorting order 1, UWFunc corresponding to sorting order 2, AudioTrans corresponding to sorting order 3, ExtractFile corresponding to sorting order 4, AudioFeature corresponding to sorting order 5, and GetFeature corresponding to sorting order 6. Therefore, the processing order of the AudioTrans (audio conversion) processing function is 1, the processing order of the UWFunc (numerical calculation) processing function is 2, the processing order of the AudioTrans (audio conversion) processing function is 3, the processing order of the ExtractFile (extract file) processing function is 4, the processing order of the AudioFeature (audio feature extraction) processing function is 5, and the processing order of the GetFeature (feature extraction) processing function is 6.
[0117] In this way, by constructing an abstract syntax tree through a parser and preset syntax rules, the syntax structure of the data execution script can be accurately represented, syntax errors can be avoided, and the reliability of the code can be improved. The parent node in the abstract syntax tree is determined as a processing function, and the child node is determined as processing data, so that the relationship between the processing function and the data is clear and unambiguous, which is convenient for subsequent processing and analysis. The processing order of the processing function is determined according to the sorting order of the parent node in the abstract syntax tree, which ensures that the execution order of the processing function is consistent with the meaning of the data execution script. Figure 1 The accuracy and efficiency of data processing are improved. This method of constructing an abstract syntax tree and determining processing functions and sequences makes the structure of the code clearer and easier for developers to understand and maintain. It can automatically parse data execution scripts, construct an abstract syntax tree, and determine processing functions and sequences, thus automating data processing, improving processing efficiency, and reducing the need for human intervention.
[0118] See also Figure 4 In some embodiments, step S201 may include but is not limited to steps S301 to S304:
[0119] Step S301, identifying and obtaining a plurality of grammatical morphemes in the data execution script, wherein the grammatical morphemes are specified by preset grammatical rules.
[0120] Among them, when using preset grammar rules to parse the data execution script and build an abstract syntax tree, in addition to the parser (Parser), a lexical analyzer (Lexer) is also needed. The function of the lexical analyzer is to decompose the input source code or text into multiple grammatical morphemes (Tokens). These grammatical morphemes usually include keywords, identifiers, operators, constants, etc. The lexical analyzer reads the input character by character according to the lexical rules of the programming language and combines it into meaningful lexical units.
[0121] Specifically, since the data execution script is compiled by BNF, the grammatical morphemes used therein are all grammatical morphemes specified by BNF.
[0122] For example, for the code snippet "intx=5;", the lexical analyzer will decompose it into lexical units such as "int", "x", "=", "5" and ";".
[0123] Step S302: based on the plurality of grammatical morphemes and the preset grammatical rules, a target grammatical morpheme as a parent node is selected from the plurality of grammatical morphemes.
[0124] Among them, according to the target grammatical rules, the grammatical morphemes defined as parent nodes are selected from the identified grammatical morphemes. These parent nodes usually represent higher-level grammatical structures.
[0125] For example, in the following data execution script:
[0126] AudioTrans(configId=wav_16k),UWFunc(0.8,abc=(-0.45L+0.89L),def=Sum(0.01,0.02)),AudioTrans(configId=wav_16k),ExtractFile(ccc= / nfsc / ddddd-aaaaaa_bbbbb / yyyyy.wav; / nfsc / ddddd-aaaaaa_bbbbb / yyyyy2.wav,ddd=http: / / www.abc.com / fffff / china?xyz.wav),AudioFeature,GetFeature" According to the preset grammar rules, the parent node target grammar morphemes filtered out are AudioTrans, UWFunc, AudioTrans, ExtractFile, AudioFeature, GetFeature. These functions represent different processing units in the entire script structure, which conforms to the definition of the parent node.
[0127] Step S303: determine the grammatical morphemes between adjacent target grammatical morphemes as leaf nodes of the parent node corresponding to the target grammatical morphemes that are located in the front position among the adjacent target grammatical morphemes.
[0128] After the target grammatical morphemes of the parent node are determined, the other grammatical morphemes between the target grammatical morphemes of the two adjacent parent nodes are assigned to the parent node at the front position as its leaf node. The leaf node is usually the data or specific operation object processed by the parent node.
[0129] For example, in the following data execution script:
[0130] AudioTrans(configId=wav_16k),UWFunc(0.8,abc=(-0.45L+0.89L),def=Sum(0.01,0.02)), configId=wav_16k is between the parent node AudioTrans and the parent node UWFunc, then configId=wav_16k is the leaf node of the parent node AudioTrans.
[0131] Step S304, constructing parent nodes from top to bottom in sequence according to the sorting order of the target grammatical morphemes in the data execution script, and constructing corresponding leaf nodes under each parent node to obtain an abstract syntax tree.
[0132] Among them, according to the order in which the target grammatical morphemes appear in the data execution script, parent nodes are constructed from top to bottom, and corresponding leaf nodes are created under each parent node. In this way, an abstract syntax tree is formed, which shows the grammatical structure and hierarchical relationship of the data execution script in a tree structure.
[0133] In this way, the data execution script is decomposed into grammatical morphemes by the lexical analyzer according to the preset grammatical rules, so that the complex script is broken down into basic components, which provides a basis for the subsequent construction of the abstract syntax tree. The flow of data between different processing units, that is, the processing process from the parent node to its leaf node, is clarified, which helps to track and manage data during the script execution process. The grammatical structure and hierarchical relationship of the data execution script are displayed in a tree structure, and the abstract script is converted into an intuitive visual structure, which is convenient for developers to grasp and analyze the whole. Constructing an abstract syntax tree according to the sorting order of the target grammatical morphemes can reflect the order of script execution, which is conducive to optimizing the processing flow and improving the efficiency of script execution. It is also convenient for quick location and debugging when problems occur.
[0134] See also Figure 5 In some embodiments, step S104 may include but is not limited to steps S401 to S403:
[0135] Step S401, calling the target processing function to process the data to be processed.
[0136] The target processing function is a function that is determined to perform specific operations on the data to be processed. The data to be processed is input into the target processing function, and the target processing function executes the algorithm and operation flow set inside it to process the data to be processed.
[0137] Step S402, obtaining the target output data name corresponding to the target processing function.
[0138] Each processing function may specify the name of the output data when it is designed. This name is used to identify the purpose or type of the data generated by the processing function. Based on this, in order to clarify whether the target processing function has been processed, it is necessary to obtain the target output data name corresponding to the target processing function, so as to check the name of the output data according to the target output data name, thereby determining whether the processing has been completed.
[0139] For example, in an image recognition system, there is a processing function for edge detection, and its corresponding target output data name may be "edge_detected_image" (image after edge detection).
[0140] Step S403: when it is detected that there is target generated data whose data name is the target output data name in the generated data generated by the target processing function, the target generated data is determined as the processing result.
[0141] Among them, some data will be generated after the processing function is executed. It is necessary to search among these generated data to see whether there is data that matches a specific name, that is, the target output data name. If so, it means that the target processing function has been executed and the processing result has been generated.
[0142] For example, after the edge detection function is executed, multiple data may be generated, such as intermediate process data, etc. However, when we detect that there is a data named "edge_detected_image", we determine this data as the processing result, which is the image data after edge detection.
[0143] Or, in a data statistics program, there is a processing function for calculating the average scores of multiple values in an array, and its target output data name is "average_score". After the function is executed, some data is generated, such as the total score, the highest score, the lowest score and other related data. The data name of each generated data is monitored in real time. When a data name is found to be "average_score", it means that the processing function has been executed.
[0144] In this way, by detecting whether the name of the generated data generated by the target processing function matches the name of the target output data, a clear end mark is provided for the processing process. Whether it is the processing of a single processing function or the continuous processing of multiple processing functions, it can be clearly known whether each processing function has completed its predetermined task, which is conducive to the orderly progress of the entire data processing flow.
[0145] See also Figure 6 In some embodiments, step S401 may include but is not limited to steps S501 to S502:
[0146] Step S501, configuring corresponding operating resources for the target processing function.
[0147] Among them, it is necessary to configure the corresponding running resources for the target processing function. The running resources are specifically reflected in: in the runtime environment, a certain amount of memory space is allocated to the target processing function to store the data, intermediate results, and local variables involved in the function execution process. For example, if the target processing function operates on a large array, then sufficient memory needs to be allocated to accommodate the array.
[0148] Set an appropriate garbage collection strategy based on the characteristics of the target processing function and the expected data processing scale. For example, if the target processing function frequently creates temporary objects, a more aggressive garbage collection mechanism may be needed to release memory space in a timely manner to avoid memory leaks.
[0149] Space is reserved for the target processing function in the call stack to save the context information of the function call. For example, when the target processing function calls other sub-functions, the call stack will record the order of function calls and return addresses.
[0150] Step S502: Process the data to be processed using the running resources corresponding to the target processing function.
[0151] The target processing function reads the data to be processed in the memory space allocated to it and performs calculations according to the algorithm inside the function.
[0152] For example, in an image processing function, it loads the image data in the allocated memory and performs operations such as color adjustment on each pixel.
[0153] During the processing, if memory data that is no longer used (such as temporary variables, etc.) is generated, the garbage collector will reclaim the memory in a timely manner according to its configured strategy.
[0154] For example, a large number of temporary variables are created in a loop. When these variables go out of scope or are no longer referenced, the garbage collector will reclaim the memory they occupy.
[0155] The target processing function executes the code in the corresponding frame of the call stack. When a function calls other sub-functions, the new sub-function will create a new stack frame on the call stack to save the local information of the sub-function.
[0156] For example, in a recursive function, each recursive call adds a new stack frame to the call stack until the recursive end condition is met.
[0157] In this way, memory is allocated according to the needs of the target processing function, ensuring that there is enough space to process data structures such as large arrays, avoiding program crashes or slow operation due to insufficient memory. For example, when processing large images or complex data sets, reasonable memory allocation can ensure efficient function execution. By setting a suitable garbage collection strategy, especially for functions that frequently create temporary objects, no longer used memory can be recycled in time to ensure effective use of system memory and avoid the impact of memory leaks on system performance and stability. Space is reserved in the call stack to save context information. When functions are nested or recursively called, the order and return position of function execution can be accurately recorded to ensure the correct execution of the program. For example, in complex algorithm implementations, this helps to ensure that functions can correctly return and continue to execute subsequent operations at different levels of calls.
[0158] See also Figure 7 In some embodiments, step S105 may include but is not limited to step S601:
[0159] Step S601, until each processing function is processed, the last processing result among the multiple processing results is determined as the output result.
[0160] There are multiple different processing tasks for different data execution scripts. Some tasks use the final processing results as output results; some tasks use the processing results obtained by each processing function in the processing process as output results.
[0161] For the first case, common calculations include calculating the mean, sum, division, etc. of certain arrays, and only the final calculation result is used as the output result.
[0162] See also Figure 8 In some embodiments, step S105 may include but is not limited to step S701:
[0163] Step S701, until each processing function is processed, each processing result is determined as the output result.
[0164] In the second case, for example, an image is processed as follows: first, a grayscale conversion processing function is performed to convert the color image into a grayscale image, then an edge detection processing function is performed, and then an image enhancement processing function is performed.
[0165] Specifically, in the whole processing process, the processing results of each step will be used as output results. For example, the grayscale image after grayscale conversion is used as an output result to check the state of the image at this stage; the image after edge detection (showing the edge information of the image) is also used as an output result to analyze the effect of edge detection; and finally the image after image enhancement is used as an output result.
[0166] The embodiment of the present application obtains a data execution script and data to be processed; uses preset grammatical rules to parse the data execution script, parses multiple processing functions and the processing order between the multiple processing functions; according to the processing order, determines the first processing function that performs data processing as the target processing function; calls the target processing function to process the data to be processed to obtain a processing result; updates the next processing function of the target processing function to the target processing function according to the processing order, and updates the processing result to the data to be processed, and returns to execute the call to the target processing function to process the data to be processed until each processing function is processed and an output result is obtained. In this way, by obtaining the data execution script and the data to be processed, and parsing the data execution script according to the preset grammatical rules, the processing function is automatically executed, the automatic processing of data is realized, manual operation is avoided, and processing efficiency is improved.
[0167] See also Fig. 9 The present application also provides a data processing device that can implement the above data processing method. The device includes:
[0168] An acquisition unit, used to acquire data execution scripts and data to be processed;
[0169] A parsing unit, used to parse the data execution script using preset grammar rules, and parse out a plurality of processing functions and a processing order between the plurality of processing functions;
[0170] A determination unit, configured to determine the first processing function to be processed as a target processing function according to the processing sequence;
[0171] A processing unit, used for calling the target processing function to process the data to be processed and obtain a processing result;
[0172] An execution unit is used to update the next processing function of the target processing function to the target processing function according to the processing order, and to update the processing result to the data to be processed, and return to execute the step of calling the target processing function to process the data to be processed and obtain the processing result, until each processing function is processed and the output result is obtained.
[0173] In some embodiments, the parsing unit includes:
[0174] A construction subunit, used to parse the data execution script using preset grammar rules to construct an abstract syntax tree;
[0175] A first determining subunit, configured to determine each parent node in the abstract syntax tree as a processing function;
[0176] The second determining subunit is used to obtain the sorting order of each parent node in order from top to bottom, and determine the sorting order of each parent node as the processing order of the corresponding processing function.
[0177] In some embodiments, a subunit is constructed to:
[0178] Recognizing a plurality of grammatical morphemes in the data execution script, wherein the grammatical morphemes are specified by preset grammatical rules;
[0179] Based on the plurality of grammatical morphemes and the preset grammatical rule, selecting a target grammatical morpheme as a parent node from the plurality of grammatical morphemes;
[0180] The grammatical morphemes between adjacent target grammatical morphemes are determined as leaf nodes of the parent nodes corresponding to the target grammatical morphemes that are located in front of the adjacent target grammatical morphemes;
[0181] According to the sorting order of the target grammatical morphemes in the data execution script, parent nodes are constructed from top to bottom, and corresponding leaf nodes are constructed under each parent node to obtain an abstract syntax tree.
[0182] In some embodiments, the processing unit includes:
[0183] A calling subunit, used for calling the target processing function to process the data to be processed;
[0184] An acquisition subunit, used to acquire the target output data name corresponding to the target processing function;
[0185] The third determining subunit is configured to determine the target generated data as the processing result when it is detected that the generated data generated by the target processing function includes target generated data whose data name is the target output data name.
[0186] In some embodiments, a subunit is called to:
[0187] Configuring corresponding operating resources for the target processing function;
[0188] The data to be processed is processed using the operating resources corresponding to the target processing function.
[0189] In some embodiments, the execution unit is configured to:
[0190] After each processing function is processed, the last processing result among the multiple processing results is determined as the output result.
[0191] In some embodiments, the execution unit is configured to:
[0192] Until each processing function is processed, each processing result is determined as the output result. The data processing device provided by the embodiment of the present application obtains the data execution script and the data to be processed by the acquisition unit; the parsing unit uses the preset grammatical rules to parse the data execution script, and parses out multiple processing functions and the processing order between the multiple processing functions; the determination unit determines the first processing function to be processed as the target processing function according to the processing order; the processing unit calls the target processing function to process the data to be processed and obtains the processing result; the execution unit updates the next processing function of the target processing function to the target processing function according to the processing order, and updates the processing result to the data to be processed, and returns to execute the step of calling the target processing function to process the data to be processed and obtain the processing result, until each processing function is processed and the output result is obtained. In this way, by acquiring the data execution script and the data to be processed, and parsing the data execution script in sequence according to the preset grammatical rules, the processing function is automatically executed, the automatic processing of data is realized, manual operation is avoided, and processing efficiency is improved. By constructing an abstract syntax tree through a parser and preset syntax rules, the syntax structure of the data execution script can be accurately represented, syntax errors can be avoided, and the reliability of the code can be improved. The parent node in the abstract syntax tree is determined as a processing function, and the child node is determined as processing data, so that the relationship between the processing function and the data is clear and unambiguous, which is convenient for subsequent processing and analysis. The processing order of the processing function is determined according to the sorting order of the parent node in the abstract syntax tree, which ensures that the execution order of the processing function is consistent with the meaning of the data execution script. Figure 1 The data execution script can be automatically parsed, the abstract syntax tree can be constructed, and the processing function and order can be determined, which improves the accuracy and efficiency of data processing. The method of constructing the abstract syntax tree and determining the processing function and order makes the structure of the code clearer and easier to understand, and is convenient for developers to understand and maintain. The data execution script can be automatically parsed, the abstract syntax tree can be constructed, and the processing function and order can be determined, which realizes the automation of data processing, improves the processing efficiency, and reduces the need for human intervention. The data execution script is decomposed into grammatical morphemes according to the preset grammatical rules by the lexical analyzer, so that the complex script is divided into basic components, which provides a basis for the subsequent construction of the abstract syntax tree. The flow of data between different processing units, that is, the processing process from the parent node to its leaf node, is clarified, which helps to track and manage data during the script execution process. The grammatical structure and hierarchical relationship of the data execution script are displayed in a tree structure, and the abstract script is converted into an intuitive visual structure, which is convenient for developers to grasp and analyze the whole. The abstract syntax tree is constructed according to the sorting order of the target grammatical morphemes, which can reflect the order of script execution, which is conducive to optimizing the processing flow and improving the efficiency of script execution. It is also convenient for rapid location and debugging when problems occur. By checking whether the name of the generated data generated by the target processing function matches the name of the target output data, a clear end mark is provided for the processing process. Whether it is the processing of a single processing function or the continuous processing of multiple processing functions, it is clear whether each processing function has completed its predetermined task, which is conducive to the orderly progress of the entire data processing process. Allocate memory according to the needs of the target processing function to ensure that there is enough space to process data structures such as large arrays, and avoid program crashes or slow operation due to insufficient memory. For example, when processing large images or complex data sets, reasonable memory allocation can ensure efficient execution of functions. By setting a suitable garbage collection strategy, especially for functions that frequently create temporary objects, you can recycle unused memory in time to ensure the effective use of system memory and avoid affecting system performance and stability due to memory leak accumulation. Reserve space in the call stack to save context information. When functions are nested or recursively called, the order and return position of function execution can be accurately recorded to ensure the correct execution of the program. For example, in complex algorithm implementations, this helps to ensure that functions can correctly return and continue to execute subsequent operations in different levels of calls.
[0193] The specific implementation of the data processing device is basically the same as the specific implementation of the above-mentioned data processing method, and will not be repeated here.
[0194] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above data processing method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0195] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0196] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0197] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the data processing method of the embodiment of this application;
[0198] Input / output interface 903, used to implement information input and output;
[0199] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0200] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0201] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0202] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and the computer program implements the above-mentioned data processing method when executed by a processor.
[0203] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0204] The data processing method, data processing device, electronic device and storage medium provided by the embodiment of the present application are as follows: acquiring a data execution script and data to be processed; parsing the data execution script using preset grammatical rules, parsing out multiple processing functions and the processing order between the multiple processing functions; determining the first processing function to be processed as the target processing function according to the processing order; calling the target processing function to process the data to be processed to obtain a processing result; updating the next processing function of the target processing function to the target processing function according to the processing order, and updating the processing result to the data to be processed, and returning to execute the step of calling the target processing function to process the data to be processed to obtain the processing result, until each processing function is processed and an output result is obtained. In this way, by acquiring the data execution script and the data to be processed, and parsing the data execution script in sequence according to the preset grammatical rules, the processing function is automatically executed, the automatic processing of data is realized, manual operation is avoided, and processing efficiency is improved.
[0205] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0206] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0207] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0208] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0209] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0210] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or plural.
[0211] 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. For example, the device embodiments described above are only schematic. For example, the division of the above 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 integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0212] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, 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 solution of this embodiment.
[0213] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0214] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0215] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.< / number> < / expression> < / expression> < / expression> < / expression> < / number> < / expression>
Claims
1. A data processing method, characterized in that: include: Get data execution script and data to be processed; The data execution script is parsed using a preset grammar rule to parse out a plurality of processing functions and a processing order between the plurality of processing functions; According to the processing order, the first processing function to be processed is determined as the target processing function; Calling the target processing function to process the data to be processed to obtain a processing result; According to the processing order, the next processing function of the target processing function is updated to the target processing function, and the processing result is updated to the data to be processed, and the step of returning to execute calling the target processing function to process the data to be processed and obtain the processing result is obtained, until each processing function is processed and the output result is obtained.
2. The data processing method according to claim 1, characterized in that: The method of using a preset grammar rule to parse the data execution script to parse out a plurality of processing functions and a processing sequence between the plurality of processing functions includes: Parsing the data execution script using preset grammar rules to construct an abstract syntax tree; Determine each parent node in the abstract syntax tree as a processing function; The sorting order of each parent node is obtained in sequence from top to bottom, and the sorting order of each parent node is determined as the processing order of the corresponding processing function.
3. The data processing method according to claim 2, characterized in that: The step of using preset grammar rules to parse the data execution script and construct an abstract syntax tree includes: Recognizing a plurality of grammatical morphemes in the data execution script, wherein the grammatical morphemes are specified by preset grammatical rules; Based on the plurality of grammatical morphemes and the preset grammatical rule, selecting a target grammatical morpheme as a parent node from the plurality of grammatical morphemes; The grammatical morphemes between adjacent target grammatical morphemes are determined as leaf nodes of the parent nodes corresponding to the target grammatical morphemes that are located in front of the adjacent target grammatical morphemes; According to the sorting order of the target grammatical morphemes in the data execution script, parent nodes are constructed from top to bottom, and corresponding leaf nodes are constructed under each parent node to obtain an abstract syntax tree.
4. The data processing method according to claim 1, characterized in that: The calling of the target processing function to process the data to be processed to obtain a processing result includes: Calling the target processing function to process the data to be processed; Obtain the target output data name corresponding to the target processing function; When it is detected that target generated data whose data name is the target output data name exists in the generated data generated by the target processing function, the target generated data is determined as the processing result.
5. The data processing method according to claim 4, characterized in that: The calling of the target processing function to process the data to be processed includes: Configuring corresponding operating resources for the target processing function; The data to be processed is processed using the operating resources corresponding to the target processing function.
6. The data processing method according to claim 1, characterized in that: The process is performed until each processing function is completed and an output result is obtained, including: After each processing function is processed, the last processing result among the multiple processing results is determined as the output result.
7. The data processing method according to claim 1, characterized in that: The process is performed until each processing function is completed and an output result is obtained, including: Until each processing function is processed, each processing result is determined as the output result.
8. A data processing device, characterized in that: include: An acquisition unit, used to acquire data execution scripts and data to be processed; A parsing unit, used to parse the data execution script using preset grammar rules, and parse out a plurality of processing functions and a processing order between the plurality of processing functions; A determination unit, configured to determine the first processing function to be processed as a target processing function according to the processing sequence; A processing unit, used for calling the target processing function to process the data to be processed and obtain a processing result; An execution unit is used to update the next processing function of the target processing function to the target processing function according to the processing order, and to update the processing result to the data to be processed, and return to execute the step of calling the target processing function to process the data to be processed and obtain the processing result, until each processing function is processed and the output result is obtained.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the data processing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the data processing method according to any one of claims 1 to 7 is implemented.
