An XAML file correction method and device, computer equipment and storage medium
By parsing and optimizing the tree-like data model of XAML files, and combining it with the optimization rules of the analyzer, the problem of XAML file design complexity is solved, and the performance of process automation is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- YGSOFT INC
- Filing Date
- 2023-02-28
- Publication Date
- 2026-06-16
AI Technical Summary
In existing technologies, XAML files in RPA process automation design often lead to design complexity and low performance due to a lack of understanding of components or improper use.
By receiving RPA process parsing requests from user terminals, the parser is invoked to parse the XAML process engine file, generate a tree-structured data model, modify the data in the custom designer interface, generate a list of modification methods using the analyzer's optimization rules, and finally correct the data model.
It simplifies process design, improves operational performance, and reduces low-quality automated process output.
Smart Images

Figure CN116166270B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of workflow management technology, and in particular to a method, apparatus, computer device and storage medium for modifying XAML files. Background Technology
[0002] With the development and popularization of computer technology, network technology, and database technology, various enterprise and personal information applications are emerging in an endless stream, giving rise to RPA (Robotic Process Automation). In RPA process automation design, XAML files define the entire activity of the customized process. However, due to a lack of understanding of the components used in the process or their inappropriate use, the designed automated process becomes overly complex and suffers from low performance. Therefore, how to automatically analyze XAML files and provide optimization suggestions has become a major research direction. Summary of the Invention
[0003] The purpose of this application is to provide a method, apparatus, computer device, and storage medium for XAML file correction, in order to solve the problem that traditional automated processes are becoming increasingly complex and have low performance.
[0004] To address the aforementioned technical problems, this application provides a method for correcting XAML files, employing the following technical solution:
[0005] Receive an RPA process parsing request sent by a user terminal, wherein the RPA process parsing request carries a XAML process engine file running on Microsoft Workflow;
[0006] The parser is invoked, and the XAML process engine file is parsed according to the parser to obtain a tree-structured data model;
[0007] The tree-like data model is displayed through the custom designer interface, allowing users to modify the data in the tree-like data model using the custom designer interface.
[0008] After the user completes the modification operation, the user-modified custom tree data model is obtained from the custom designer interface.
[0009] The analyzer is invoked, and the custom tree data model is analyzed according to the analyzer's optimization rules to obtain a list of modification methods object;
[0010] The custom tree data model is modified based on the list of modification methods to obtain the modified tree data model.
[0011] Furthermore, the step of invoking the parser and parsing the XAML workflow engine file according to the parser to obtain the tree-like data model specifically includes the following steps:
[0012] Read the class factory and retrieve the parsing class corresponding to the node name information of the XAML process engine file from the class factory;
[0013] Call the parsing interface of the parsing class to obtain the node data corresponding to the node name information;
[0014] The node data is encapsulated to obtain the tree-like data model.
[0015] Furthermore, before the step of reading the class factory and obtaining the parsing class corresponding to the node name information of the XAML process engine file, the following step is also included:
[0016] The Extensible Markup Language (XML) file is invoked, and the XAML process engine file is loaded based on the XML file to obtain the node name information.
[0017] Furthermore, the analyzer includes an Analyse method. The step of calling the analyzer and performing analysis operations on the custom tree data model according to the analyzer's optimization rules to obtain a list of modified methods specifically includes the following steps:
[0018] The custom tree data model is converted into a string using the Analyse method.
[0019] The string is optimized and detected according to the optimization rules to obtain the list of modification methods object.
[0020] Furthermore, the step of performing optimization detection processing on the string according to the optimization rules to obtain the modification method list object specifically includes the following steps:
[0021] After performing optimization and detection processing on the string according to the optimization rules, the modified method data is obtained;
[0022] The modified method data is optimized and categorized to obtain the modified method list object.
[0023] To address the aforementioned technical problems, this application also provides a XAML file correction device, which employs the following technical solution:
[0024] The request receiving module is used to receive RPA process parsing requests sent by user terminals, wherein the RPA process parsing requests carry XAML process engine files running on Microsoft Workflow.
[0025] The file parsing module is used to call the parser and perform parsing operations on the XAML process engine file according to the parser to obtain a tree-like data model;
[0026] The model display module is used to display the tree data model according to the custom designer interface, so that users can modify the data of the tree data model according to the custom designer interface;
[0027] The data receiving module is used to obtain the user-modified custom tree data model according to the custom designer interface after the user completes the modification operation.
[0028] The data analysis module is used to call the analyzer and perform analysis operations on the custom tree data model according to the optimization rules of the analyzer to obtain a list of modification methods object;
[0029] The data correction module is used to correct the custom tree data model according to the list of modification methods to obtain a corrected tree data model.
[0030] Furthermore, the data analysis module includes:
[0031] The data transformation submodule is used to convert the custom tree data model into a string according to the Analyse method;
[0032] The optimization detection submodule is used to perform optimization detection processing on the string according to the optimization rules to obtain the modification method list object.
[0033] Furthermore, the optimized detection submodule includes:
[0034] The data acquisition unit is modified to perform optimization detection processing on the string according to the optimization rules to obtain the modification method data;
[0035] An optimization classification unit is used to optimize and classify the modified method data to obtain the modified method list object.
[0036] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution:
[0037] The system includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the XAML file correction method as described above.
[0038] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solution described below:
[0039] The computer-readable storage medium stores computer-readable instructions that, when executed by a processor, implement the steps of the XAML file correction method as described above.
[0040] This application provides a method for correcting XAML files, comprising: receiving an RPA process parsing request sent by a user terminal, wherein the RPA process parsing request carries a XAML process engine file running on Microsoft Workflow; invoking a parser and performing parsing operations on the XAML process engine file according to the parser to obtain a tree-like data model; displaying the tree-like data model according to a custom designer interface so that the user can modify the data of the tree-like data model according to the custom designer interface; after the user completes the modification operation, obtaining the user-modified custom tree-like data model according to the custom designer interface; invoking an analyzer and performing analysis operations on the custom tree-like data model according to the analyzer's optimization rules to obtain a list of modification methods; and correcting the custom tree-like data model according to the list of modification methods to obtain a corrected tree-like data model. Compared with the prior art, this application uses an analyzer to analyze the process XAML file designed by the user, and combines the optimization suggestion rules built into the analyzer to provide optimization suggestions for the user-designed process automation XAML file, providing design hints during the design phase. This simplifies process design, improves process performance, and reduces the output of inferior automated processes. Attached Figure Description
[0041] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;
[0043] Figure 2 This is a flowchart illustrating the implementation of the XAML file correction method provided in Embodiment 1 of this application;
[0044] Figure 3 yes Figure 2 A flowchart of a specific implementation of step S202;
[0045] Figure 4 yes Figure 3 A flowchart of a specific implementation method prior to step S301;
[0046] Figure 5 yes Figure 2 A flowchart of a specific implementation of step S205;
[0047] Figure 6 yes Figure 5 A flowchart of a specific implementation of step S502;
[0048] Figure 7 This is a schematic diagram of the structure of the XAML file correction device provided in Embodiment 2 of this application;
[0049] Figure 8 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation
[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.
[0051] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0052] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0053] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0054] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.
[0055] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.
[0056] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.
[0057] It should be noted that the XAML file correction method provided in this application embodiment is generally executed by a server / terminal device, and correspondingly, the XAML file correction device is generally set in the server / terminal device.
[0058] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0059] Example 1
[0060] Continue to refer to Figure 2 The diagram shows the implementation flowchart of the XAML file correction method provided in Embodiment 1 of this application. For ease of explanation, only the parts related to this application are shown.
[0061] The above-mentioned XAML file correction method includes: steps S201, S202, S203, S204, S205 and S206.
[0062] In step S201, an RPA process parsing request sent by a user terminal is received, wherein the RPA process parsing request carries a XAML process engine file running on Microsoft Workflow.
[0063] In this embodiment, RPA refers to Robotic Process Automation, whose main function is to use robots to execute work information and business interactions according to pre-designed processes. Thus, when there is a large amount of work information and business interaction, RPA can efficiently handle these complex processes and save labor costs.
[0064] In this application's embodiments, "Workflow" refers to the automation of a part or all of a business process within a computer application environment. It is an abstract and generalized description of a workflow and the business rules governing its various operational steps. In computers, workflow is part of Computer-Supported Collaborative Work (CSCW). The latter broadly studies how a group can collaborate with the help of computers.
[0065] In this embodiment, XAML is an abbreviation for eXtensible Application Markup Language, a descriptive language created by Microsoft for building application user interfaces. XAML provides an easily extensible and locatable syntax for defining user interfaces that are separate from program logic, an implementation very similar to the "code-behind" model in ASP.NET. XAML is a parsed language, although it can also be compiled. Its advantage is simplifying the programmatic user creation process, eliminating the need for adding code and configuration at application time.
[0066] In step S202, the parser is invoked, and the XAML process engine file is parsed according to the parser to obtain a tree-like data model.
[0067] In this embodiment of the application, parsing the XAML process engine file according to the parser may involve reading the class factory, obtaining the parsing class corresponding to the node name information of the XAML process engine file from the class factory; calling the parsing interface of the parsing class to obtain the node data corresponding to the node name information; and encapsulating the node data to achieve the above parsing operation.
[0068] In step S203, a tree-like data model is displayed according to the custom designer interface so that the user can modify the data of the tree-like data model according to the custom designer interface.
[0069] In this embodiment, the display unit of the parser is the user input interface of the B-end automated process designer, which can view the Microsoft Workflow automated process XAML file; the parser parses the automated process XAML file and returns a custom tree data model, and displays the custom designer interface.
[0070] In this embodiment, users can modify Microsoft Workflow automation process XAML files according to the custom designer interface, and modify custom tree data model data based on user operation of the designer interface.
[0071] In step S204, after the user completes the modification operation, the user-modified custom tree data model is obtained from the custom designer interface.
[0072] In this embodiment of the application, after the user modifies the Microsoft Workflow automation process XAML file, the user's modified custom tree data model can be obtained.
[0073] In step S205, the analyzer is invoked, and the custom tree data model is analyzed according to the analyzer's optimization rules to obtain a list of modification methods.
[0074] In the embodiments of this application, the analyzer is pre-set with optimization rules, such as merging duplicate components, replacing components, etc. It should be understood that the examples of optimization rules here are only for ease of understanding and are not intended to limit this application.
[0075] In this embodiment, the analysis operation may involve converting a custom tree-like data model into a string using the Analyse method, performing optimization detection processing on the string according to optimization rules, and obtaining a list of modified methods object.
[0076] In step S206, the custom tree data model is modified according to the modification method list object to obtain the modified tree data model.
[0077] In this embodiment, the process of automatically modifying the XAML file of the application's method list object is mainly described, specifically:
[0078] ① Obtain the custom data model from the input XAML file;
[0079] ② Iterate through the list of descriptive modification methods input;
[0080] ③ Based on the descriptive modification method list object, modify the custom data model generated by the parser to obtain the modified corrected tree data model.
[0081] This application provides a method for correcting XAML files, comprising: receiving an RPA process parsing request sent by a user terminal, wherein the RPA process parsing request carries a XAML process engine file running on Microsoft Workflow; invoking a parser and performing parsing operations on the XAML process engine file according to the parser to obtain a tree-like data model; displaying the tree-like data model according to a custom designer interface so that the user can modify the data of the tree-like data model according to the custom designer interface; after the user completes the modification operation, obtaining the user-modified custom tree-like data model according to the custom designer interface; invoking an analyzer and performing analysis operations on the custom tree-like data model according to the analyzer's optimization rules to obtain a list of modification methods; and correcting the custom tree-like data model according to the list of modification methods to obtain a corrected tree-like data model. Compared with the prior art, this application uses an analyzer to analyze the process XAML file designed by the user, and combines the optimization suggestion rules built into the analyzer to provide optimization suggestions for the user-designed process automation XAML file, providing design hints during the design phase. This simplifies process design, improves process performance, and reduces the output of inferior automated processes.
[0082] Continue reading Figure 3 , showed Figure 2 The flowchart of a specific implementation of step S202 is shown. For ease of explanation, only the parts relevant to this application are shown.
[0083] In some optional implementations of this embodiment, step S202 specifically includes: step S301, step S302 and step S303.
[0084] In step S301, the class factory is read, and the parsing class corresponding to the node name information of the XAML process engine file is obtained from the class factory;
[0085] In step S302, the parsing interface of the parsing class is called to obtain the node data corresponding to the node name information;
[0086] In step S303, the node data is encapsulated to obtain a tree-like data model.
[0087] In this embodiment, the input Microsoft Workflow is a workflow XAML file; all nodes in the document are traversed, and the parsing class of the node is obtained from the class factory by the node name. For example, for a Sequence node, the parsing class of Sequence is obtained from the class factory by the node name Sequence; the parsing interface Read method of the parsing class is called to return data containing all information of the node; the node information data is encapsulated to form a data model with a custom name; after the parsing of other nodes is completed, a custom data model containing all information of the nodes with the same structure as the XAML document is finally generated; the parser finally outputs a custom tree-like data model (with the same structure as the XAML document).
[0088] Continue reading Figure 4 , showed Figure 3 The flowchart of a specific implementation prior to step S301 is shown for ease of explanation, showing only the parts relevant to this application.
[0089] In some optional implementations of this embodiment, step S401 is included before step S301.
[0090] In step S401, the Extensible Markup Language (XML) file is invoked, and the XAML process engine file is loaded based on the XML file to obtain node name information.
[0091] Continue reading Figure 5 , showed Figure 2 The flowchart of a specific embodiment of step S205 is shown. For ease of explanation, only the parts relevant to this application are shown.
[0092] In some optional implementations of this embodiment, the analyzer includes the Analyse method, and step S205 specifically includes steps S501 and S502.
[0093] In step S501, the custom tree data model is converted into a string according to the Analyse method;
[0094] In step S502, the string is optimized and detected according to the optimization rules to obtain a list of modified methods object.
[0095] In this embodiment, the process of generating a list of modification methods object based on the automatic XAML file analysis of the Microsoft Workflow workflow is mainly described. Specifically:
[0096] ① Use the Workflow workflow automatic XAML parser to parse and generate custom data models;
[0097] ② Call the analyzer's Analyse method via the interface, passing in the analyzer output as desired.
[0098] Meaningful data model JSON format string;
[0099] ③ Traverse all optimization rules of the analyzer and run each optimization rule in an independent thread, such as the [component replacement rule]. This rule internally determines whether the component replacement method can be used in the data model to replace the components in the original Workflow. The execution result remains unchanged, and a new Workflow is generated.
[0100] If it exists, generate data for a descriptive modification method;
[0101] ④ After the traversal is complete, summarize the data of the descriptive modification methods generated by each rule to obtain the list object of the modification methods.
[0102] Continue reading Figure 6 , showed Figure 5 The flowchart of a specific embodiment of step S502 is shown. For ease of explanation, only the parts relevant to this application are shown.
[0103] In some optional implementations of this embodiment, step S502 specifically includes: step S601 and step S602.
[0104] In step S601, after the string is optimized and detected according to the optimization rules, the modified method data is obtained;
[0105] In step S602, the modified method data is optimized and classified to obtain a list of modified methods.
[0106] In the embodiments of this application, the optimization classification process can be based on the optimization target classification, wherein the optimization target classification can be low IO, low CPU, short runtime, etc. It should be understood that the examples of optimization target classification here are only for ease of understanding and are not intended to limit this application.
[0107] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware with computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium, and when executed, they can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0108] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0109] Example 2
[0110] Further reference Figure 7 As a response to the above Figure 2 The implementation of the method shown in this application provides an embodiment of a XAML file correction device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0111] like Figure 7 As shown, the XAML file correction device 200 of this embodiment includes: a request receiving module 210, a file parsing module 220, a model display module 230, a data receiving module 240, a data analysis module 250, and a data correction module 260. Wherein:
[0112] The request receiving module 210 is used to receive the RPA process parsing request sent by the user terminal, wherein the RPA process parsing request carries a XAML process engine file running on Microsoft Workflow.
[0113] The file parsing module 220 is used to call the parser and perform parsing operations on the XAML process engine file according to the parser to obtain a tree-like data model.
[0114] The model display module 230 is used to display the tree data model according to the custom designer interface, so that users can modify the data of the tree data model according to the custom designer interface;
[0115] The data receiving module 240 is used to obtain the user-modified custom tree data model from the custom designer interface after the user completes the modification operation.
[0116] The data analysis module 250 is used to call the analyzer and perform analysis operations on the custom tree data model according to the analyzer's optimization rules to obtain a list of modification methods object;
[0117] The data correction module 260 is used to correct the custom tree data model based on the modification method list object to obtain the corrected tree data model.
[0118] In this embodiment, RPA refers to Robotic Process Automation, whose main function is to use robots to execute work information and business interactions according to pre-designed processes. Thus, when there is a large amount of work information and business interaction, RPA can efficiently handle these complex processes and save labor costs.
[0119] In this application's embodiments, "Workflow" refers to the automation of a part or all of a business process within a computer application environment. It is an abstract and generalized description of a workflow and the business rules governing its various operational steps. In computers, workflow is part of Computer-Supported Collaborative Work (CSCW). The latter broadly studies how a group can collaborate with the help of computers.
[0120] In this embodiment, XAML is an abbreviation for eXtensible Application Markup Language, a descriptive language created by Microsoft for building application user interfaces. XAML provides an easily extensible and locatable syntax for defining user interfaces that are separate from program logic, an implementation very similar to the "code-behind" model in ASP.NET. XAML is a parsed language, although it can also be compiled. Its advantage is simplifying the programmatic user creation process, eliminating the need for adding code and configuration at application time.
[0121] In this embodiment of the application, parsing the XAML process engine file according to the parser may involve reading the class factory, obtaining the parsing class corresponding to the node name information of the XAML process engine file from the class factory; calling the parsing interface of the parsing class to obtain the node data corresponding to the node name information; and encapsulating the node data to achieve the above parsing operation.
[0122] In this embodiment, the display unit of the parser is the user input interface of the B-end automated process designer, which can view the Microsoft Workflow automated process XAML file; the parser parses the automated process XAML file and returns a custom tree data model, and displays the custom designer interface.
[0123] In this embodiment, users can modify Microsoft Workflow automation process XAML files according to the custom designer interface, and modify custom tree data model data based on user operation of the designer interface.
[0124] In this embodiment of the application, after the user modifies the Microsoft Workflow automation process XAML file, the user's modified custom tree data model can be obtained.
[0125] In the embodiments of this application, the analyzer is pre-set with optimization rules, such as merging duplicate components, replacing components, etc. It should be understood that the examples of optimization rules here are only for ease of understanding and are not intended to limit this application.
[0126] In this embodiment, the analysis operation may involve converting a custom tree-like data model into a string using the Analyse method, performing optimization detection processing on the string according to optimization rules, and obtaining a list of modified methods object.
[0127] In this embodiment, the process of automatically modifying the XAML file of the application's method list object is mainly described, specifically:
[0128] ① Obtain the custom data model from the input XAML file;
[0129] ② Iterate through the list of descriptive modification methods input;
[0130] ③ Based on the descriptive modification method list object, modify the custom data model generated by the parser to obtain the modified corrected tree data model.
[0131] In this embodiment, a XAML file correction device 200 is provided, comprising: a request receiving module 210, used to receive an RPA process parsing request sent by a user terminal, wherein the RPA process parsing request carries a XAML process engine file running on Microsoft Workflow; a file parsing module 220, used to call a parser and perform parsing operations on the XAML process engine file according to the parser to obtain a tree data model; a model display module 230, used to display the tree data model according to a custom designer interface, so that the user can modify the data of the tree data model according to the custom designer interface; a data receiving module 240, used to obtain the user-modified custom tree data model according to the custom designer interface after the user completes the modification operation; a data analysis module 250, used to call an analyzer and perform analysis operations on the custom tree data model according to the analyzer's optimization rules to obtain a modification method list object; and a data correction module 260, used to correct the custom tree data model according to the modification method list object to obtain a corrected tree data model. Compared with existing technologies, this application uses an analyzer to analyze the process XAML files designed by the user, and combines the analyzer's built-in optimization suggestion rules to provide optimization suggestions for the user-designed process automation XAML files, providing design hints during the design phase. This simplifies process design, improves process performance, and reduces the output of poor-quality automated processes.
[0132] In some optional implementations of this embodiment, the file parsing module 220 includes:
[0133] The parsing class acquisition submodule is used to read the class factory and retrieve the parsing class corresponding to the node name information in the XAML process engine file.
[0134] The node data acquisition submodule is used to call the parsing interface of the parsing class to obtain the node data corresponding to the node name information;
[0135] The encapsulation submodule is used to encapsulate node data to obtain a tree-like data model.
[0136] In this embodiment, the input Microsoft Workflow is a workflow XAML file; all nodes in the document are traversed, and the parsing class of the node is obtained from the class factory by the node name. For example, for a Sequence node, the parsing class of Sequence is obtained from the class factory by the node name Sequence; the parsing interface Read method of the parsing class is called to return data containing all information of the node; the node information data is encapsulated to form a data model with a custom name; after the parsing of other nodes is completed, a custom data model containing all information of the nodes with the same structure as the XAML document is finally generated; the parser finally outputs a custom tree-like data model (with the same structure as the XAML document).
[0137] In some optional implementations of this embodiment, the parsing module 220 further includes:
[0138] The node name retrieval submodule is used to call the Extensible Markup Language (XML) file and load the XAML workflow engine file based on the XML file to obtain the node name information.
[0139] In some optional implementations of this embodiment, the data analysis module 250 includes:
[0140] The data transformation submodule is used to convert a custom tree-structured data model into a string based on the Analyse method.
[0141] The optimization detection submodule is used to perform optimization detection processing on strings according to optimization rules, and obtain a list of modification methods object.
[0142] In this embodiment, the process of generating a list of modification methods object based on the automatic XAML file analysis of the Microsoft Workflow workflow is mainly described. Specifically:
[0143] ① Use the Workflow workflow automatic XAML parser to parse and generate custom data models;
[0144] ② Call the analyzer's Analyse method via the interface, passing in the analyzer output as desired.
[0145] Meaningful data model JSON format string;
[0146] ③ Traverse all optimization rules of the analyzer and run each optimization rule in an independent thread, such as the [component replacement rule]. This rule internally determines whether the component replacement method can be used in the data model to replace the components in the original Workflow. The execution result remains unchanged, and a new Workflow is generated.
[0147] If it exists, generate data for a descriptive modification method;
[0148] ④ After the traversal is complete, summarize the data of the descriptive modification methods generated by each rule to obtain the list object of the modification methods.
[0149] In some optional implementations of this embodiment, the above-mentioned optimized detection submodule includes:
[0150] The modified data acquisition unit is used to perform optimization detection processing on the string according to the optimization rules to obtain the modified method data;
[0151] The optimized classification unit is used to optimize and classify the modified method data to obtain a list of modified methods object.
[0152] In the embodiments of this application, the optimization classification process can be based on the optimization target classification, wherein the optimization target classification can be low IO, low CPU, short runtime, etc. It should be understood that the examples of optimization target classification here are only for ease of understanding and are not intended to limit this application.
[0153] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 8 , Figure 8 This is a basic structural block diagram of the computer device in this embodiment.
[0154] The computer device 300 includes a memory 310, a processor 320, and a network interface 330 that are interconnected via a system bus. It should be noted that only the computer device 300 with components 310-330 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0155] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.
[0156] The memory 310 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 310 may be an internal storage unit of the computer device 300, such as the hard disk or memory of the computer device 300. In other embodiments, the memory 310 may also be an external storage device of the computer device 300, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. Of course, the memory 310 may also include both internal storage units and external storage devices of the computer device 300. In this embodiment, the memory 310 is typically used to store the operating system and various application software installed on the computer device 300, such as computer-readable instructions for XAML file correction methods. Furthermore, the memory 310 can also be used to temporarily store various types of data that have been output or will be output.
[0157] In some embodiments, the processor 320 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 320 is typically used to control the overall operation of the computer device 300. In this embodiment, the processor 320 is used to execute computer-readable instructions stored in the memory 310 or to process data, for example, to execute computer-readable instructions for the XAML file correction method.
[0158] The network interface 330 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 300 and other electronic devices.
[0159] The computer equipment provided in this application analyzes the process XAML files designed by personnel using an analyzer, and combines this with the optimization suggestion rules built into the analyzer to provide optimization suggestions for the user-designed process automation XAML files, offering design hints during the design phase. This simplifies process design, improves process performance, and reduces the output of substandard automated processes.
[0160] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the XAML file correction method described above.
[0161] The computer-readable storage medium provided in this application analyzes the process XAML files designed by the user through an analyzer. Combining this with the analyzer's built-in optimization suggestion rules, it provides optimization suggestions for the user-designed process automation XAML files, offering design hints during the design phase. This simplifies process design, improves process performance, and reduces the output of substandard automated processes.
[0162] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0163] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.
Claims
1. A method for correcting XAML files, characterized in that, Includes the following steps: Receive an RPA process parsing request sent by a user terminal, wherein the RPA process parsing request carries a XAML process engine file running on Microsoft Workflow; The parser is invoked, and the XAML process engine file is parsed according to the parser to obtain a tree-structured data model; The tree-like data model is displayed through the custom designer interface, allowing users to modify the data in the tree-like data model using the custom designer interface. After the user completes the modification, the user-modified custom tree data model is obtained from the custom designer interface. The analyzer is invoked, and the custom tree data model is analyzed according to the analyzer's optimization rules to obtain a list of modification methods object; The custom tree data model is modified according to the list of modification methods to obtain the modified tree data model; The step of calling the parser and parsing the XAML workflow engine file according to the parser to obtain the tree-like data model specifically includes the following steps: Read the class factory and retrieve the parsing class corresponding to the node name information of the XAML process engine file from the class factory; Call the parsing interface of the parsing class to obtain the node data corresponding to the node name information; The node data is encapsulated to obtain the tree-like data model; The analyzer includes an Analyse method. The step of calling the analyzer and performing analysis operations on the custom tree data model according to the analyzer's optimization rules to obtain a list of modified methods specifically includes the following steps: The custom tree data model is converted into a string using the Analyse method. The string is optimized and detected according to the optimization rules to obtain the list of modification methods object.
2. The XAML file correction method according to claim 1, characterized in that, Before the step of retrieving the parsing class corresponding to the node name information of the XAML process engine file from the class factory, the following steps are also included: The Extensible Markup Language (XML) file is invoked, and the XAML process engine file is loaded based on the XML file to obtain the node name information.
3. The XAML file correction method according to claim 1, characterized in that, The step of performing optimization detection processing on the string according to the optimization rules to obtain the modification method list object specifically includes the following steps: After performing optimization and detection processing on the string according to the optimization rules, the modified method data is obtained; The modified method data is optimized and categorized to obtain the modified method list object.
4. A XAML file correction device, characterized in that, include: The request receiving module is used to receive RPA process parsing requests sent by user terminals, wherein the RPA process parsing requests carry XAML process engine files running on Microsoft Workflow. The file parsing module is used to call the parser and perform parsing operations on the XAML process engine file according to the parser to obtain a tree-like data model; The model display module is used to display the tree data model according to the custom designer interface, so that users can modify the data of the tree data model according to the custom designer interface; The data receiving module is used to obtain the user-modified custom tree data model according to the custom designer interface after the user completes the modification. The data analysis module is used to call the analyzer and perform analysis operations on the custom tree data model according to the optimization rules of the analyzer to obtain a list of modification methods object; The data correction module is used to correct the custom tree data model according to the modification method list object to obtain a corrected tree data model. The file parsing module includes: The parsing class acquisition submodule is used to read the class factory and obtain the parsing class corresponding to the node name information of the XAML process engine file from the class factory; The node data acquisition submodule is used to call the parsing interface of the parsing class to obtain the node data corresponding to the node name information; The encapsulation submodule is used to encapsulate the node data to obtain the tree-like data model; The data analysis module includes: The data transformation submodule is used to convert the custom tree-structured data model into a string according to the Analyse method; The optimization detection submodule is used to perform optimization detection processing on the string according to the optimization rules to obtain the modification method list object.
5. The XAML file correction device according to claim 4, characterized in that, The optimized detection submodule includes: The data acquisition unit is modified to perform optimization detection processing on the string according to the optimization rules to obtain the modification method data; An optimization classification unit is used to optimize and classify the modified method data to obtain the modified method list object.
6. A computer device, characterized in that, The system includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the XAML file correction method as described in any one of claims 1 to 3.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the XAML file correction method as described in any one of claims 1 to 3.