Script detection method, device and electronic device

By detecting and displaying the corresponding metadata of the integrated flow configuration script in the iPaaS platform, the problem of data conversion errors and the accuracy of the integrated flow configuration script is solved, and errors are quickly identified and corrected, which improves the integrated flow configuration script Accuracy and writing speed.

CN113849409BActive Publication Date: 2025-02-14BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111148009.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-28
Publication Date
2025-02-14
Estimated Expiration
2041-09-28

AI Technical Summary

Technical Problem

In the iPaaS platform, it is difficult for users to effectively detect and display metadata during data conversion when configuring integrated streams, resulting in data conversion errors and the accuracy of integrated stream configuration scripts that are difficult to ensure.

Method used

Provide a script detection method, by obtaining the integrated flow configuration script to be detected, converting the metadata of the obtained second integrated application data item, and displaying these metadata, helping users quickly identify and correct data conversion errors.

Benefits of technology

Through the detection and display of integrated flow configuration scripts and metadata, users can quickly identify data conversion errors, improving the accuracy and writing speed of integrated flow configuration scripts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113849409B_ABST
    Figure CN113849409B_ABST
Patent Text Reader

Abstract

The disclosed embodiments disclose a script detection method, device, and electronic device. A specific implementation of the method includes: obtaining an integrated flow configuration script to be detected, wherein the integrated flow configuration script is used to convert a first integrated application data item into a second integrated application data item; for the second integrated application data item converted by the integrated flow configuration script, determining metadata describing the second integrated application data item; and displaying the metadata of the second integrated application data item. Thus, a new script detection method is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a script detection method, device and electronic device. Background Art

[0002] iPaaS (Integration Platform as a Service) is an integration service provider that can support enterprises to quickly build system integration models, rationally manage data, and easily provide an aggregated platform for any user who needs integration. Through UI integration, application integration, and data integration, it can achieve lightweight, full-scenario, and dynamically scalable integrated system integration requirements among various business systems of the enterprise.

[0003] iPaaS is an integration service provider platform where users can configure integration flows to complete integration tasks. When users configure integration flows, data conversion between different integrated applications is usually involved. Summary of the invention

[0004] This disclosure section is provided to introduce concepts in a brief form, which will be described in detail in the detailed description section below. This disclosure section is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] In a first aspect, an embodiment of the present disclosure provides a script detection method, the method comprising: obtaining an integration flow configuration script to be detected, wherein the integration flow configuration script is used to convert a first integrated application data item into a second integrated application data item; for the second integrated application data item converted by the integration flow configuration script, determining metadata describing the second integrated application data item; and displaying the metadata of the second integrated application data item.

[0006] In a second aspect, an embodiment of the present disclosure provides a script detection device, comprising: an acquisition unit, used to acquire an integrated flow configuration script to be detected, wherein the integrated flow configuration script is used to convert a first integrated application data item into a second integrated application data item; a determination unit, used to determine metadata describing the second integrated application data item obtained by converting the integrated flow configuration script; and a display unit, used to display the metadata of the second integrated application data item.

[0007] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the script detection method as described above in the first aspect.

[0008] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the script detection method described above in the first aspect.

[0009] The script detection method, device, and electronic device provided by the embodiments of the present disclosure detect an integrated flow configuration script, where the integrated flow configuration script is used to convert a first integrated application data item into a second integrated application data item, and determine the metadata of the data (i.e., the second integrated application data item) obtained by the conversion according to the integrated flow configuration script, and then display the metadata of the second integrated application data item. Thus, the user (i.e., the staff) can know whether the output data is correct, thereby improving the speed and accuracy of writing the integrated flow configuration script. In other words, if the user finds that the metadata of the data converted by the integrated flow configuration script that has been written does not match the expected data, the integrated flow configuration script can be modified as soon as possible to improve the accuracy of the integrated flow configuration script. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0011] Figure 1 is a flow chart of an embodiment of a script detection method according to the present disclosure;

[0012] Figure 2 is a schematic diagram of an application scenario of the script detection method according to the present disclosure;

[0013] Figure 3 is a flow chart of an optional implementation of the script detection method according to the present disclosure;

[0014] Figure 4A is a flow chart of an optional implementation of the script detection method according to the present disclosure;

[0015] Figure 4B is a schematic diagram of an application scenario of the script detection method according to the present disclosure;

[0016] Figure 5 is a flow chart of an optional implementation of the script detection method according to the present disclosure;

[0017] Figure 6 is a flow chart of an optional implementation of the script detection method according to the present disclosure;

[0018] Figure 7is a structural schematic diagram of an embodiment of a script detection device according to the present disclosure;

[0019] Figure 8 is an exemplary system architecture in which the script detection method of an embodiment of the present disclosure can be applied;

[0020] Fig. 9 It is a schematic diagram of the basic structure of an electronic device provided according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0021] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0022] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0023] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0024] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0025] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0026] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0027] Please refer to Figure 1 , which shows the process of an embodiment of the script detection method according to the present disclosure. Figure 1 The script detection method shown includes the following steps:

[0028] Step 101: Obtain the integration flow configuration script to be tested.

[0029] In this embodiment, the execution subject of the script detection method (such as a server and / or a terminal device) may obtain the integrated flow configuration script to be detected.

[0030] Here, the above integration flow configuration script is used to convert the first integrated application data item into the second integrated application data item. The first integrated application data item belongs to the first integrated application, and the second integrated application data item belongs to the second application. In other words, the first and second are used to distinguish the integrated applications.

[0031] Here, application integration can organically integrate different application software and systems based on various platforms and built with different solutions into a seamless, parallel, and easy-to-access single system, and make them act like a whole to process business and share information. Application integration consists of three levels: database, business logic, and user interface. The various applications that are integrated can be called integrated applications.

[0032] As an example, integrated application A can be used to manage recruitment affairs, and job candidate C can enter contact information in the client of integrated application A. Integrated application B can be used for communication between internal members of the enterprise. When integrated application A confirms that job candidate C has passed the interview and is to be hired as an employee of the enterprise, integrated application B can be notified; integrated application B can be the account of job candidate C and generate account-related information based on the contact information of job candidate C. Account-related information may include account name, account initial password and account contact information.

[0033] In the example of creating an account for a job candidate, the data entered in integrated application A is converted into data in integrated application B, which requires staff to configure the integration flow. The integration flow configuration may include writing an integration flow configuration script (also called a data conversion script in some cases). The integration flow configuration script can be used to convert the data of integrated application A into the data of integrated application B.

[0034] Here, the integration flow configuration script may be in text form. Then, the integration flow configuration script input by the staff may be detected.

[0035] Step 102: for the second integrated application data item converted by the above integration flow configuration script, determine metadata describing the second integrated application data item.

[0036] Here, metadata can be understood as data about data, which is generally structured data (such as data stored in a database, which specifies the length and type of the field). With reference to metadata, users can infer whether the written integration flow configuration script is correct. For example, if an error occurs in the script, the metadata of the output data may also be wrong. Users may have expectations for the metadata of the output data; when the metadata inferred by the invention based on the script does not match the expected metadata, users can assume that an error occurs in the script.

[0037] Step 103: display the metadata of the second integrated application data item.

[0038] Here, the second integrated application data and the metadata of the second integrated application data may be displayed correspondingly.

[0039] It should be noted that the script detection method provided in this embodiment detects the integrated flow configuration script, which is used to convert the first integrated application data item into the second integrated application data item, and determines the metadata of the data (i.e., the second integrated application data item) obtained by the conversion according to the integrated flow configuration script, and then displays the metadata of the second integrated application data item. In this way, the user (i.e., the staff) can know whether the output data is correct, thereby improving the speed and accuracy of writing the integrated flow configuration script. In other words, if the user finds that the metadata of the data converted by the integrated flow configuration script that has been written does not match the expected data, the integrated flow configuration script can be modified as soon as possible to improve the accuracy of the integrated flow configuration script.

[0040] In some embodiments, the above method may further include: correspondingly displaying the first integrated application data item and the second integrated application data item having a conversion relationship, and displaying metadata of the first integrated application data item.

[0041] Here, the conversion relationship indicates that the second integrated application data item is converted based on the first integrated application data item.

[0042] Here, the specific manner of the conversion relationship can be set according to the actual application scenario and is not limited here. In some application scenarios, the conversion relationship may include at least one of the following but is not limited to: direct mapping, conversion based on intermediate variables, and conversion based on functions.

[0043] Here, direct mapping can include the output field directly referencing the input field. For example, the output field is named "Mobile Number" and the input field is named "Contact Information"; directly mapping the value in the input field to the output field completes the direct mapping.

[0044] Here, the conversion based on intermediate variables may include the conversion between input fields and output fields that requires the use of intermediate variables.

[0045] Here, the function-based conversion may include conversion between input fields and output fields using a function.

[0046] Please refer to Figure 2 , Figure 2 A schematic diagram showing metadata of a first integrated application data item and a second integrated application data item is shown.

[0047] Figure 2 In the example, the first display area 201 is used to display the integrated flow configuration script. The second display area 202 is used to display the detection result of the integrated flow configuration script. Specifically, the metadata of the second integrated application data item can be displayed in the second display area 202; for example, the metadata number of the second integrated application data item aaa can be displayed; for another example, the metadata string of the second integrated application data item bbb can be displayed.

[0048] As an example, the connection between the second integrated application data item aaa and the first integrated application data item ddd can indicate that the connection between the second integrated application data item aaa and the first integrated application data item ddd has a conversion relationship, and this connection can indicate that the second integrated application data item aaa and the first integrated application data item ddd are displayed correspondingly.

[0049] Thus, the metadata of the first integrated application data item is displayed in correspondence with the first integrated application data item, the first integrated application data item and the second integrated application data item having a conversion relationship are displayed in correspondence, and the metadata of the second integrated application data item is also displayed in correspondence with the second integrated application data item. The user can view the metadata of the second integrated application data item obtained by conversion according to the metadata of the first integrated application data item and the corresponding relationship, so that the user can compare the metadata of the first integrated application data item with the metadata of the second integrated application data item and quickly determine whether the metadata of the second integrated application data item is correct. This can facilitate the user to make adjustments quickly.

[0050] In some embodiments, the above step 102 may include: Figure 3 Step 301, step 302, step 303 and step 304 are shown.

[0051] Step 301: parse the integration flow configuration script to obtain an abstract syntax tree of the integration flow configuration script.

[0052] It can be understood that in computer science, the Abstract Syntax Tree (AST), or simply the syntax tree, is an abstract representation of the syntax structure of the source code. It represents the syntax structure of the programming language in a tree-like form, and each node on the tree represents a structure in the source code. The reason why the syntax is "abstract" is that the syntax here does not represent every detail that appears in the real syntax. For example, nested brackets are implied in the tree structure and are not presented in the form of nodes.

[0053] Step 302: Create a scope linked list for the integration flow configuration script.

[0054] Scope is the accessibility of functions and variables in different parts of the runtime code. In other words, scope can prevent variables belonging to its own domain from being easily leaked out, that is, scope can isolate variables, and variables with the same name in different scopes will not conflict.

[0055] The scope chain can be understood as a linked list consisting of variable objects of multiple execution contexts. In other words, when searching for a variable, it will first be searched from the variable object of the current context. If it is not found, it will be searched from the variable object of the parent (lexical parent) execution context until it finds the variable object of the global context, that is, the global object.

[0056] Step 303: Determine metadata of the data returned by the node in the abstract syntax tree based on the established scope linked list.

[0057] Here, the scope list can be understood as a path, which is used to provide a tracking basis for determining the metadata of the data returned by the node.

[0058] Optionally, metadata of data returned by each node in the abstract syntax tree may be determined. Metadata of data returned by a node may be determined for some nodes in the abstract syntax tree.

[0059] Step 304: Determine metadata of the second integrated application data according to metadata of the data returned by the nodes in the abstract syntax tree.

[0060] It can be understood that the second integrated application data has a corresponding node in the abstract syntax tree. In other words, the second integrated application data can be data returned by certain nodes in the abstract syntax tree. Generally, the data returned by the terminal node of the abstract syntax tree can include the second integrated application data.

[0061] It should be noted that through Figure 3The process shown can first parse the integrated flow configuration script into an abstract syntax tree, and then simulate the behavior of the runtime script parser to perform dynamic analysis and traverse the abstract syntax tree. During the traversal process, the metadata of the data returned by the node is tracked through the scope linked list. As a result, in the process of writing the integrated flow configuration script, the metadata of the second integrated application data output by the integrated flow configuration script can be determined by analyzing the syntax in the integrated flow configuration script without actually inputting the usage data. Thus, it is possible to quickly and accurately automatically determine the metadata of the output data, improve the convenience of users checking the integrated flow configuration script, and improve the accuracy of writing the integrated flow configuration script.

[0062] It should be noted that due to the complexity of the integration scenario and the large number of data conversion steps, the input field may not be a direct mapping of the input field, but it is necessary to introduce complex intermediate steps such as function calls and intermediate variables for calculation to form the final output data. Figure 3 The provided method uses the abstract syntax tree and scope chain to track variables, which can track the complete variable conversion chain, so that accurate metadata can be determined in scenarios of indirect conversion such as function calls and intermediate variables.

[0063] In some embodiments, please refer to Figure 4A , Figure 4A An exemplary implementation of the above step 303 is shown. Figure 4A The process shown may include step 401 and step 402 .

[0064] Step 401: Add the metadata and script built-in functions of the first integrated application data item to the header of the established scope linked list.

[0065] Here, the first integrated application data item may be an integrated flow configuration script input data item, and the metadata of the data is known.

[0066] Here, the script built-in function can be used to characterize the correspondence between the function type and the metadata. In other words, the script built-in function can include the correspondence between the function name and the metadata, which is used to represent the metadata of the data output by the function indicated by the function name.

[0067] Step 402: for a node in the abstract syntax tree, update the terminal scope of the scope linked list based on the node; and determine the metadata of the data returned by the node according to the updated terminal scope and the upstream scope of the terminal scope.

[0068] Optionally, updating the terminal scope of the scope linked list may include adding a new node at the end of the scope linked list, and also may include adding a new variable in the terminal scope of the scope linked list.

[0069] As an example, see Figure 4B , Figure 4B A schematic diagram of a scope list is shown. Figure 4B Each circle in the figure can be used to represent a scope. The arrows between scopes can indicate the direction from downstream to upstream. The most upstream scope can be called the header of the scope list, or the head, as shown by the word "head" in the figure; the most downstream scope can be called the tail of the scope list, or the tail, as shown by the word "tail" in the figure.

[0070] In some application scenarios, the updated terminal scope may include the variable name (e.g., aaa) of the variable to be searched; the variable name may be searched in the current scope, and if found in the current scope, it may be searched in the upstream scopes along the scope linked list. Before the search, metadata corresponding to the variable name may or may not exist in the current scope or the upstream scope. Therefore, if the variable name is not found at the very beginning of the search, a null value is returned; if the variable name (e.g., aaa) is found in the current scope or the upstream scope, the metadata corresponding to the variable name (e.g., aaa) may be used as the metadata corresponding to the variable name (e.g., aaa) in the terminal scope.

[0071] It should be noted that by updating the end of the scope linked list based on the nodes in the abstract syntax tree, it is possible to accurately determine the scope and upstream scope of the node in the function execution environment corresponding to the currently executed node in a timely manner during the execution of the program, thereby accurately determining the metadata of the data returned by the node.

[0072] In some embodiments, please refer to Figure 5 , Figure 5 FIG. 4 shows an optional implementation of the above step 402. Figure 5 The process shown may include step 501 , step 502 and step 503 .

[0073] Step 501: If the currently executed node indicates a variable, the variable name of the variable is added to the end scope of the scope linked list.

[0074] When declaring variables, you can add corresponding variables in the end scope of the scope list.

[0075] Step 502, starting from the end scope, searching for the variable name along the scope linked list from the end to the head.

[0076] Step 503: Determine metadata of the variable indicated by the node according to the search result.

[0077] In actual use, corresponding push and pop operations can be performed in the variable scope list according to the execution process.

[0078] It should be noted that using the scope linked list data structure for variable management can achieve accurate tracking of variable metadata. In the scenario of indirect variable conversion (for example, introducing intermediate variables for indirect conversion), the above variable tracking method can find accurate metadata along the conversion path, thereby improving the scope of application and accuracy of the script verification method.

[0079] In some embodiments, the above step 503 may include: if a read instruction is received, in response to finding the variable name, using the metadata corresponding to the variable name as the metadata of the data returned by the above node; in response to not finding the variable name, returning a predefined null value.

[0080] In some application scenarios, when the user is writing the integration flow configuration script or after writing it, it may be necessary to display the metadata corresponding to the second integrated application data item in the script. At this time, the computer may generate a read instruction to perform a read scenario. In the read scenario, if the corresponding metadata is found, the found metadata can be used as the metadata of the returned data. If the corresponding metadata is not found, it means that the metadata corresponding to the node is determined based on the integration flow configuration script that has been written, and it is more appropriate to return a null value.

[0081] In some embodiments, the above step 503 may include: if metadata corresponding to a variable name written by a user is detected, when the variable name is found, the metadata corresponding to the found variable name is modified to the metadata written by the user; when the variable name is not found, the metadata written by the user is added to the variable name in the terminal scope.

[0082] In some application scenarios, when users are writing basic flow configuration scripts, staff can actively write metadata. This process can be called a write scenario. In a write scenario, through the scope chain, the metadata written by the user can be accurately written to the corresponding location, so that metadata can be quickly written and displayed.

[0083] In some embodiments, please refer to Figure 6 , Figure 6 An optional implementation of step 402 is shown. Figure 6 The process shown may include step 601 , step 602 and step 603 .

[0084] Step 601: If the currently executed node indicates a function, a variable scope corresponding to the function is added to the end of the scope linked list.

[0085] When a function call is encountered, a new variable scope can be constructed, that is, a new variable scope is added to the end of the scope linked list, and the newly added variable scope corresponds to the above function.

[0086] Step 602: Add the metadata of the parameters of the above function to the variable scope corresponding to the above function with the parameter name as the variable name.

[0087] In actual applications, the parameter metadata of the above functions can be added to the variable scope one by one. When adding to the variable scope, the parameter name is used as the variable name.

[0088] Step 603, parse the statements in the above function to obtain the return value of the above function.

[0089] Here, some preset rules can be used to parse the function statement and obtain the metadata of the function return value. These preset rules can be set according to the actual application scenario and are not limited here.

[0090] In general, the return value of a function can be understood as the data returned by the currently executed node. Correspondingly, the metadata of the return value of a function can also be used as the metadata of the data returned by the node.

[0091] In some application scenarios, the statements in a function can be analyzed one by one along the abstract syntax tree corresponding to the function. When a return statement is encountered or the current statement is the last statement (that is, there is no last statement), the metadata of the return value of the return statement can be calculated based on the expression in the return statement. After the metadata calculation is completed, the scope corresponding to the function can be removed from the scope list.

[0092] It should be noted that if the currently executed node indicates a function, the metadata of the function return value can be determined by combining the input parameters and visible variables during the execution of the function, and the function definition (which can be linked to the script built-in function). Thus, even if the first integrated application data item is processed by the function to obtain the second integrated application data item, the metadata of the second integrated application data item can be accurately obtained.

[0093] Further references Figure 7 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a script detection device. Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0094] like Figure 7As shown, the script detection device of this embodiment includes: an acquisition unit 701, a determination unit 702 and a display unit 703. The acquisition unit is used to acquire the integration flow configuration script to be detected, wherein the integration flow configuration script is used to convert the first integration application data item into the second integration application data item; the determination unit is used to determine the metadata describing the second integration application data item obtained by the integration flow configuration script; and the display unit is used to display the metadata of the second integration application data item.

[0095] In this embodiment, the specific processing of the acquisition unit 701, the determination unit 702 and the display unit 703 of the script detection device and the technical effects thereof can be referred to in Figure 1 The relevant descriptions of step 101, step 102 and step 103 in the corresponding embodiment are not repeated here.

[0096] In some embodiments, the above-mentioned device is also used to: correspondingly display a first integrated application data item and a second integrated application data item having a conversion relationship, and display metadata of the first integrated application data item, wherein the conversion relationship indicates that the second integrated application data item is converted based on the first integrated application data item.

[0097] In some embodiments, the second integrated application data item obtained by converting the above-mentioned integrated flow configuration script determines the metadata describing the second integrated application data item, including: parsing the above-mentioned integrated flow configuration script to obtain an abstract syntax tree of the above-mentioned integrated flow configuration script; establishing a scope linked list for the above-mentioned integrated flow configuration script; based on the established scope linked list, determining the metadata of the data returned by the nodes in the above-mentioned abstract syntax tree; and determining the metadata of the second integrated application data according to the metadata of the data returned by the nodes in the abstract syntax tree.

[0098] In some embodiments, the above-mentioned determination of metadata of data returned by the node in the above-mentioned abstract syntax tree based on the established scope linked list includes: adding the metadata of the first integrated application data item and the script built-in function to the header of the established scope linked list; for the node in the above-mentioned abstract syntax tree, updating the end node of the above-mentioned scope linked list based on the node; and determining the metadata of the data returned by the node according to the updated end scope and the upstream scope of the above-mentioned end scope.

[0099] In some embodiments, for the node in the above-mentioned abstract syntax tree, the terminal node of the above-mentioned scope linked list is updated based on the node; according to the updated terminal scope and the upstream scope of the above-mentioned terminal scope, the metadata of the data returned by the node is determined, including: if the currently executed node indicates a variable, the variable name of the above-mentioned variable is added to the terminal scope of the above-mentioned scope linked list; starting from the terminal scope, along the direction from the end to the head of the above-mentioned scope linked list, the variable name is searched; according to the search result, the metadata of the variable indicated by the above-mentioned node is determined.

[0100] In some embodiments, the above-mentioned determining the metadata of the variable indicated by the above-mentioned node based on the search result includes: if a read instruction is received, in response to finding the variable name, using the metadata corresponding to the variable name as the metadata of the data returned by the above-mentioned node; in response to not finding the variable name, returning a predefined null value.

[0101] In some embodiments, the above-mentioned determination of the metadata of the variable indicated by the above-mentioned node based on the search results includes: if metadata corresponding to a variable name written by a user is detected, when the variable name is found, the metadata corresponding to the found variable name is modified to the metadata written by the user; when the variable name is not found, the metadata written by the user is added to the variable name in the terminal scope.

[0102] In some embodiments, for the node in the above-mentioned abstract syntax tree, the terminal node of the above-mentioned scope linked list is updated based on the node; according to the updated terminal scope and the upstream scope of the above-mentioned terminal scope, the metadata of the data returned by the node is determined, including: if the currently executed node indicates a function, at the end of the above-mentioned scope linked list, the variable scope corresponding to the above-mentioned function is added; the parameters of the above-mentioned function are added to the variable scope corresponding to the above-mentioned function with the parameter name as the variable name; the statements in the above-mentioned function are parsed to obtain the metadata of the return value of the above-mentioned function.

[0103] Please refer to Figure 8 , Figure 8 An exemplary system architecture is shown in which the script detection method according to an embodiment of the present disclosure can be applied.

[0104] like Figure 8 As shown, the system architecture may include terminal devices 801, 802, 803, a network 804, and a server 805. The network 804 is used to provide a medium for communication links between the terminal devices 801, 802, 803 and the server 805. The network 804 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0105] The terminal devices 801, 802, and 803 can interact with the server 805 through the network 804 to receive or send messages, etc. Various client applications, such as web browser applications, search applications, and news information applications, can be installed on the terminal devices 801, 802, and 803. The client applications in the terminal devices 801, 802, and 803 can receive user instructions and perform corresponding functions according to the user instructions, such as adding corresponding information to the information according to the user instructions.

[0106] Terminal devices 801, 802, and 803 can be hardware or software. When terminal devices 801, 802, and 803 are hardware, they can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) players, laptop computers, and desktop computers, etc. When terminal devices 801, 802, and 803 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0107] The server 805 may be a server that provides various services, such as receiving information acquisition requests sent by the terminal devices 801, 802, and 803, acquiring display information corresponding to the information acquisition requests in various ways according to the information acquisition requests, and sending the relevant data of the display information to the terminal devices 801, 802, and 803.

[0108] It should be noted that the script detection method provided in the embodiment of the present disclosure can be executed by a terminal device, and accordingly, the script detection device can be set in the terminal devices 801, 802, and 803. In addition, the script detection method provided in the embodiment of the present disclosure can also be executed by a server 805, and accordingly, the script detection device can be set in the server 805.

[0109] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0110] Reference below Fig. 9 , which shows an electronic device (eg, Figure 8The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0111] like Fig. 9 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0112] Typically, the following devices may be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 908 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 909. The communication device 909 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Fig. 9 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0113] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0114] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0115] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0116] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0117] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains an integrated flow configuration script to be detected, wherein the integrated flow configuration script is used to convert a first integrated application data item into a second integrated application data item; determines metadata describing the second integrated application data item obtained by converting the integrated flow configuration script; and displays the metadata of the second integrated application data item.

[0118] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0119] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0120] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, a display unit may also be described as a "unit for displaying metadata of the second integrated application data item".

[0121] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0122] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0123] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0124] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0125] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A script detection method, characterized in that: include: Acquire an integration flow configuration script to be detected, wherein the integration flow configuration script is used to convert a first integrated application data item into a second integrated application data item; Determine metadata describing the second integrated application data item for the second integrated application data item obtained by converting the integration flow configuration script; Displaying metadata of the second integrated application data item; The step of determining the metadata describing the second integrated application data item obtained by converting the integrated flow configuration script comprises: parsing the integrated flow configuration script to obtain an abstract syntax tree of the integrated flow configuration script; establishing a scope linked list for the integrated flow configuration script; determining the metadata of the data returned by the nodes in the abstract syntax tree based on the established scope linked list; and determining the metadata of the second integrated application data according to the metadata of the data returned by the nodes in the abstract syntax tree. Among them, determining the metadata of the data returned by the node in the abstract syntax tree based on the established scope linked list includes: adding the metadata of the first integrated application data item and the script built-in function to the header of the established scope linked list; for the node in the abstract syntax tree, updating the end node of the scope linked list based on the node; and determining the metadata of the data returned by the node according to the updated end scope and the upstream scope of the end scope.

2. The method according to claim 1, characterized in that The method further comprises: Correspondingly displaying a first integrated application data item and a second integrated application data item having a conversion relationship, and displaying metadata of the first integrated application data item, wherein the conversion relationship indicates that the second integrated application data item is converted based on the first integrated application data item.

3. The method according to claim 1, characterized in that: For a node in the abstract syntax tree, updating an end node of the scope linked list based on the node; According to the updated terminal scope and the upstream scope of the terminal scope, metadata of the data returned by the node is determined, including: If the currently executed node indicates a variable, the variable name of the variable is added to the end scope of the scope linked list; Starting from the end scope, searching for the variable name along the scope linked list from the end to the head; According to the search result, metadata of the variable indicated by the node is determined.

4. The method according to claim 3, characterized in that: The step of determining metadata of the variable indicated by the node according to the search result includes: If a read instruction is received, in response to finding the variable name, the metadata corresponding to the variable name is used as the metadata of the data returned by the node; in response to not finding the variable name, a predefined null value is returned.

5. The method according to claim 3, characterized in that: The step of determining metadata of the variable indicated by the node according to the search result includes: If metadata corresponding to a variable name written by a user is detected, when the variable name is found, the metadata corresponding to the found variable name is modified to the metadata written by the user; when the variable name is not found, the metadata written by the user is added to the variable name in the terminal scope.

6. The method according to claim 1, characterized in that For a node in the abstract syntax tree, updating an end node of the scope linked list based on the node; According to the updated terminal scope and the upstream scope of the terminal scope, metadata of the data returned by the node is determined, including: If the currently executed node indicates a function, a variable scope corresponding to the function is added to the end of the scope linked list; Add the function parameters to the variable scope corresponding to the function with the parameter names as variable names; Parse the statements in the function to obtain metadata of the return value of the function.

7. A script detection device, characterized in that: include: An acquisition unit, configured to acquire an integration flow configuration script to be detected, wherein the integration flow configuration script is used to convert a first integrated application data item into a second integrated application data item; A determining unit, configured to determine metadata describing the second integrated application data item, with respect to the second integrated application data item obtained by converting the integrated flow configuration script; A display unit, used to display the metadata of the second integrated application data item; The step of determining the metadata describing the second integrated application data item obtained by converting the integrated flow configuration script comprises: parsing the integrated flow configuration script to obtain an abstract syntax tree of the integrated flow configuration script; establishing a scope linked list for the integrated flow configuration script; determining the metadata of the data returned by the nodes in the abstract syntax tree based on the established scope linked list; and determining the metadata of the second integrated application data according to the metadata of the data returned by the nodes in the abstract syntax tree. Among them, determining the metadata of the data returned by the node in the abstract syntax tree based on the established scope linked list includes: adding the metadata of the first integrated application data item and the script built-in function to the header of the established scope linked list; for the node in the abstract syntax tree, updating the end node of the scope linked list based on the node; and determining the metadata of the data returned by the node according to the updated end scope and the upstream scope of the end scope.

8. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Code text conversion method and device and storage medium

    CN113420531A

  • Test script transformation architecture

    US20090217302A1