Code processing method, system and electronic device based on function vertical call

By vertically calling methods through functions, the problem of low code readability and maintainability in existing technologies is solved, achieving efficient code compilation and rapid business response, and improving the accuracy and maintainability of code generation.

CN122489074APending Publication Date: 2026-07-31GUANGZHOU YUNBIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU YUNBIAO NETWORK TECH CO LTD
Filing Date
2026-04-30
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies suffer from low code readability and maintainability, as well as low compilation efficiency, when dealing with complex function calls, especially in scenarios with multiple callback functions, complex parameter structures, or chained calls, thus failing to meet business requirements.

Method used

The method of vertical function invocation is adopted. By obtaining the data to be processed associated with the business call request, the vertical function invocation rules are invoked in response to the code editing operation, including function operator application, parameter definition, object creation, callback function definition and exception handling sub-rules, to generate target code data and integrate callback functions and exception handling, following the principle of locality.

Benefits of technology

It improves code readability and maintainability, reduces reliance on external documentation, enhances code compilation efficiency, and meets the need for rapid implementation of business call requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122489074A_ABST
    Figure CN122489074A_ABST
Patent Text Reader

Abstract

This invention discloses a code processing method, system, and electronic device based on vertical function invocation. The specific solution includes: acquiring data to be processed associated with a business invocation request; responding to code editing operations, retrieving the vertical function invocation rule matching the business invocation request; wherein, the vertical function invocation rule characterizes the hierarchical processing method of function calls, and includes at least: function operator application sub-rules, parameter definition sub-rules, object creation sub-rules, callback function definition sub-rules, and exception handling sub-rules; based on the vertical function invocation rule and the data to be processed, determining the target code data corresponding to the vertical function invocation rule; executing the target code data to obtain the processing result corresponding to the business invocation request. This invention improves the readability and maintainability of code data, while also improving code compilation efficiency, meeting the need for rapid implementation of business invocation requests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of code processing technology, and in particular to a code processing method, system, and electronic device based on vertical function calls. Background Technology

[0002] Function calls are one of the fundamental operations in programming languages. In early assembly languages, function calls required manual management of stack frames, parameter passing, and return values, making the code complex and error-prone. With the advent of high-level languages, function calls gradually became more abstract and easier to use.

[0003] However, with the increasing complexity of code, especially the widespread use of asynchronous programming, event-driven architecture, and callback functions, traditional function calling methods have limitations in certain scenarios. For example, when dealing with multiple callback functions, complex parameter structures, or chained calls, the code generated by traditional methods not only has low readability and maintainability, but also has low subsequent code compilation efficiency. Summary of the Invention

[0004] This invention provides a code processing method, system, and electronic device based on vertical function calls, which improves the readability and maintainability of code data, while also increasing code compilation efficiency and meeting the need for rapid implementation of business call requests.

[0005] According to one aspect of the present invention, a code processing method based on vertical function calls is provided, the method comprising: Retrieve pending data associated with the business call request; In response to a code editing operation, the vertical function invocation rule matching the business invocation request is retrieved; wherein, the vertical function invocation rule is used to characterize the hierarchical processing method of function invocation, and the vertical function invocation rule includes at least: function operator application sub-rules, parameter definition sub-rules, object creation sub-rules, callback function definition sub-rules, and exception handling sub-rules; Based on the function vertical invocation rule and the data to be processed, determine the target code data corresponding to the function vertical invocation rule; The target code data is executed to obtain the processing result corresponding to the business call request.

[0006] According to another aspect of the present invention, a code processing system based on vertical function calls is provided, the system comprising: The data acquisition module is used to acquire the data to be processed that is associated with the business call request; The rule invocation module is used to respond to code editing operations and retrieve the function vertical invocation rules that match the business invocation request; wherein, the function vertical invocation rules are used to characterize the hierarchical processing method of function invocation, and the function vertical invocation rules include at least: function operator application sub-rules, parameter definition sub-rules, object creation sub-rules, callback function definition sub-rules, and exception handling sub-rules; The code data generation module is used to determine the target code data corresponding to the function vertical calling rule based on the function vertical calling rule and the data to be processed; The code data execution module is used to execute the target code data and obtain the processing result corresponding to the business call request.

[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to execute the code processing method based on vertical function calls as described in any embodiment of the present invention.

[0008] According to another aspect of the present invention, a computer-readable storage medium is provided that stores computer instructions for causing a processor to execute and implement the code processing method based on vertical function calls as described in any embodiment of the present invention.

[0009] According to another aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements a code processing method based on vertical function calls as described in any embodiment of the present invention.

[0010] The technical solution of this invention obtains pending data associated with a business call request; in response to code editing operations, it retrieves the function vertical call rule matching the business call request. Based on the function vertical call rule and the pending data, it determines the target code data associated with the function vertical call rule. By unifying function calls, object creation, and partial function definitions under the same syntax structure through the function vertical call rule, it reduces the number of syntax rules, improves the accuracy of generated code, and the generated target code data can serve as documentation, improving code readability and reducing reliance on external interpretive documentation. Furthermore, integrating callback functions, exception handling, and function calls follows the principle of locality, improving code maintainability. Executing the target code data yields the processing result corresponding to the business call request. This invention solves the problems of low code readability and maintainability, and low subsequent code compilation efficiency in existing technologies under specific business scenarios, failing to meet actual business needs. It improves the readability and maintainability of code data, while simultaneously improving code compilation efficiency, meeting the need for rapid implementation of business call requests.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a flowchart of a code processing method based on vertical function calls provided by an embodiment of the present invention; Figure 2 This is an example diagram of the object creation code block provided in an embodiment of the present invention; Figure 3 This is an example diagram of a callback function determined based on a callback function definition sub-rule provided in an embodiment of the present invention; Figure 4 This is an example diagram of the exception handling code for the exception handling sub-rule provided in this embodiment of the invention; Figure 5 This is an example diagram of the third code block provided in an embodiment of the present invention; Figure 6 This is an example diagram of the calling code based on the invocation of integrated sub-rules provided in an embodiment of the present invention; Figure 7This is a code example diagram provided by an embodiment of the present invention after embedding the exception handling code block into the second callback function code block; Figure 8 This is a flowchart of a code processing method based on vertical function calls provided by an embodiment of the present invention; Figure 9 This is an example diagram of the target code data corresponding to the asynchronous operation processing request provided in an embodiment of the present invention; Figure 10 This is an example diagram of the target code data corresponding to an HTTP request provided in an embodiment of the present invention; Figure 11 This is a schematic diagram of the structure of a code processing system based on vertical function calls provided in an embodiment of the present invention; Figure 12 This is a schematic diagram of the structure of an electronic device that implements the code processing method based on vertical function calls according to an embodiment of the present invention. Detailed Implementation

[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0016] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0017] Example 1 Figure 1This is a flowchart of a code processing method based on vertical function calls provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where code data matching a business call request is generated based on vertical function call rules, and the code data is executed to obtain a processing result corresponding to the business call request. This method can be executed by a code processing system based on vertical function calls, which can be implemented in hardware and / or software. This code processing system based on vertical function calls can be configured in electronic devices such as mobile phones, computers, or servers. Figure 1 As shown, the method includes: S110. Obtain the pending data associated with the business call request.

[0018] The business call request can be a business request that requires generating and processing code data based on function vertical call rules. Optionally, the business call request can be an asynchronous operation processing request, an HTTP request, a data query request, or a UI event processing request, etc. The data to be processed can be the business data corresponding to the business call request. For example, if the business call request is a data query request, the data to be processed can at least include: the database table to be queried and the user information to be queried. As another example, if the business call request is an HTTP request, the corresponding data to be processed can at least include: HTTP request method information, a Uniform Resource Locator (URL), and the data to be transmitted, etc.

[0019] Specifically, it retrieves the pending data associated with the business call request, and uses the pending data to generate code data corresponding to the business call request.

[0020] It should be noted that before processing the data to be processed associated with the business call request, the function vertical invocation rules can be determined in the following way, and the data to be processed can be processed based on the determined function vertical invocation rules. See below for specific processing methods: Configure first configuration information related to function calls or function definitions for function operators to obtain function operator application sub-rules; determine the parameter arrangement format and the parameter template corresponding to each parameter type based on each parameter type, and obtain parameter definition sub-rules based on the parameter arrangement format and parameter template; determine object creation sub-rules based on second configuration information associated with object creation; determine callback parameter templates based on callback function start identifiers and callback function types, and determine callback function definition sub-rules based on callback parameter templates and callback function end identifiers; determine exception handling sub-rules based on exception handling logic and exception handling identifiers; and determine function vertical call rules based on function operator application sub-rules, parameter definition sub-rules, object creation sub-rules, callback function definition sub-rules, and exception handling sub-rules.

[0021] The first configuration information can be used to configure the application sub-rules for function operators. These sub-rules can be understood as the syntax rules corresponding to the function operators. Optionally, the first configuration information corresponding to the function operator application sub-rules can be: when the function operator is "->", the meaning of "->" in different contexts is determined by the content on its right: if there is no data on the right side of "->", it indicates a function call or a vertical function call; if there is data on the right side of "->", it is used for partial function definitions. Based on this, not only can the function call syntax be unified, but the number of preset keywords in subsequent target identification information can also be reduced, improving compilation efficiency.

[0022] The parameter type can be any parameter type associated with the business call request in the data to be processed. Optionally, the parameter type can be: ordinary parameters (e.g., string parameters, numeric parameters, variable parameters), named parameters, placeholder parameters, etc. The parameter arrangement format can be a vertical arrangement of parameters. The parameter template can be a code template corresponding to the parameter type. Parameter definition sub-rules can be understood as the definition requirements for parameters under various parameter types. Optionally, parameter definition sub-rules include: a vertically arranged parameter arrangement format, and the following parameter template requirements: each parameter occupies an independent line of code, uses a preset keyword or symbol as the parameter start identifier, and uses a newline character or preset parameter indentation rule as the parameter end identifier.

[0023] Different parameter types use different start and end identifiers. Optionally, the parameter definition sub-rule supports mixing parameters of multiple types. For ordinary parameters, the parameter value or variable name can be written directly; for named parameters, they can be defined in the format "parameter name:value". It should be noted that parameters of different types can be freely combined and vertically arranged to meet the actual needs of various business call request scenarios. Furthermore, long text parameters can be presented naturally in a vertical arrangement across multiple lines of code without the need for specific line continuation characters. This ensures clear boundaries for each parameter, improving the speed of parameter location.

[0024] Object creation subrules can be understood as constraints that must be satisfied when creating an object. The second configuration information for object creation subrules can include: unifying object creation within function calls and defining object creation information in the format of "property:value," without needing to correspond to the parameter order of the constructor. Object creation subrules not only simplify object creation syntax and clarify the correspondence between properties and values, but also eliminate the need to adhere to the parameter order of the constructor. For example, the object creation code block obtained by applying object creation subrules could be as follows: Figure 2 As shown.

[0025] The callback function start identifier indicates the beginning of the callback function. The callback function type specifies the type of the callback function. Different callback function parameters and return values ​​correspond to different callback function types. The callback parameter template can be a parameter template used to fill in the callback function parameters corresponding to the callback function type. The callback function end identifier indicates the end of the callback function.

[0026] Callback function definition sub-rules can be understood as the syntax rules for applying callback functions. A callback function is a function passed as an argument to other functions. A callback function is invoked when a specific event occurs or a condition is met. Callback functions are commonly used in asynchronous programming, array operations, and other scenarios. Optionally, callback function definition sub-rules include: using "<>" as the callback function start identifier, and defining at least one callback function parameter in the start identifier. Using "end" as the callback function end identifier. The start and end identifiers can include multiple lines of code to represent the internal logic of the callback function. A callback function defined according to the callback function definition sub-rules can be as follows: Figure 3 As shown. Figure 3 This is an example diagram of a callback function determined based on the sub-rules defined by the callback function definition. Figure 3 The processing in this way can make the callback function definition more natural and adaptable to the context of the call.

[0027] Exception handling logic can be the execution logic corresponding to a code exception. Exception handling identifiers can be identifiers related to exception handling logic. For example, exception handling identifiers can be "catch", "prefer", etc. Exception handling sub-rules can be understood as the syntax rules that must be followed when handling exceptions. Optionally, exception handling sub-rules include: allowing exception handling logic to be inlined within function calls, so that exception handling and the operation that triggered the exception are strongly associated, clarifying the causal relationship in the code, which is beneficial for subsequent code adjustments and maintenance. Optionally, based on exception handling sub-rules, the following can be determined: Figure 4 The exception handling logic is shown.

[0028] Vertical function call rules can be understood as the function call syntax rules applied to the Phoenix language. These rules require that the generated code blocks adopt a vertically arranged syntax structure. Phoenix is ​​a new language evolved from ObjectSense (OSE), retaining object-oriented features while adding support for functional programming. Vertical function call is also known as vertical calling.

[0029] It should also be noted that the function vertical call rules also include: air conditioner sub-rules, which are the syntax rules that function calls without parameters must satisfy. Optionally, a function call implemented by an air conditioner sub-rule can be represented as: Work -> empty end The above processing is equivalent to the `work()` function in traditional programming languages, but the function call boundaries are clearer compared to traditional programming languages.

[0030] Specifically, first configuration information related to function calls or function definitions is configured for function operators to determine function operator application sub-rules based on this first configuration information. Correspondingly, parameter arrangement formats and parameter templates corresponding to each parameter type are determined based on the parameter types involved in the function call. Parameter definition sub-rules are determined based on the parameter templates and parameter arrangement formats. Object creation sub-rules corresponding to the second configuration information are determined based on the second configuration information. Callback parameter templates are determined based on the callback function start identifier and callback function type to determine callback function definition sub-rules based on the callback parameter templates and callback function end identifiers. Exception handling sub-rules are determined based on the exception handling logic associated with code data and the exception handling identifiers corresponding to the exception handling logic. Based on the function operator application sub-rules, parameter definition sub-rules, object creation sub-rules, callback function definition sub-rules, and exception handling sub-rules, the function vertical call rules are obtained.

[0031] Accordingly, after determining the vertical function invocation rules, the compiler used for code compilation can be adjusted so that it can compile the code according to the rules to obtain an executable file. Similarly, the virtual machine used to run the executable file can be adjusted so that it can process the executable file related to the vertical function invocation rules.

[0032] S120. In response to code editing operations, retrieve the function vertical calling rules that match the business call request.

[0033] The code editing operation refers to the user's operation of editing code in the code editing interface. The function vertical call rules are used to characterize the hierarchical processing of function calls, and include at least the following sub-rules: function operator application sub-rules, parameter definition sub-rules, object creation sub-rules, callback function definition sub-rules, and exception handling sub-rules.

[0034] Specifically, in response to code editing operations, the function vertical invocation rules that match the business call request are retrieved. Based on the function operator application sub-rules, parameter definition sub-rules, object creation sub-rules, callback function definition sub-rules, and exception handling sub-rules in the function vertical invocation rules, the data to be processed is processed to obtain the corresponding code data.

[0035] S130. Based on the function vertical call rules and the data to be processed, determine the target code data corresponding to the function vertical call rules.

[0036] The target code data includes at least the target calling function, and the target calling function includes at least the first code block corresponding to the parameter definition sub-rule, the second code block corresponding to the object creation sub-rule, the third code block corresponding to the callback function definition sub-rule, and the fourth code block corresponding to the exception handling sub-rule.

[0037] The target function call can be the function call code data determined according to the function vertical call rules and the data to be processed. The first code block can be the parameter definition code data determined according to the parameter definition sub-rule and the data to be processed. The second code block can be the object creation code data determined according to the object creation sub-rule and the data to be processed. The third code block can be the callback function code data determined according to the callback function definition sub-rule and the data to be processed. The fourth code block can be the exception handling code data determined according to the exception handling sub-rule and the data to be processed.

[0038] Specifically, the first code block is determined based on the parameter definition sub-rules in the function vertical invocation rules and the parameter data in the data to be processed that matches the parameter definition sub-rules. The second code block is determined based on the object creation sub-rules in the function vertical invocation rules and the data to be processed. The third code block is determined based on the callback function definition sub-rules in the function vertical invocation rules and the data to be processed. The fourth code block is determined based on the exception handling sub-rules in the function vertical invocation rules and the data to be processed. The first, second, third, and fourth code blocks are integrated to obtain the target invocation function. Based on the target invocation function, the target code data associated with the business invocation request is determined.

[0039] In this embodiment of the invention, the first code block corresponding to the parameter definition sub-rule is determined in the following manner: parsing the data to be processed to determine the parameter to be used under at least one parameter type; determining the parameter template that matches the parameter type in the parameter definition sub-rule based on at least one parameter type; for at least one parameter type, determining at least one line of parameter code corresponding to the parameter type based on the parameter template corresponding to the parameter type and the parameter to be used; and obtaining the first code block according to the parameter code corresponding to each parameter type and the parameter arrangement format of the parameter definition sub-rule.

[0040] At least one parameter type can include at least one of the following: ordinary parameters (e.g., string parameters, numeric parameters, variable parameters), named parameters, and placeholder parameters. At least one line of parameter code can be code data obtained by filling the parameters to be used into the corresponding parameter template. The parameter arrangement format can be understood as a format where each line of parameter code is arranged vertically.

[0041] Specifically, the data to be processed is parsed to determine the parameters to be used under at least one parameter type. For at least one parameter type, a parameter template corresponding to each parameter type is determined according to the parameter definition sub-rules. The parameters to be used under the same parameter type are filled into the parameter template to obtain at least one line of parameter code corresponding to the parameter type. According to the parameter arrangement format, the lines of parameter code under all parameter types are adjusted to obtain the first code block corresponding to the parameter definition sub-rules.

[0042] For example, if the data to be processed only includes parameters of the ordinary parameter type, such as "hello" (string parameter), 42, and someVariable, then the following parameter code is obtained based on the parameter template corresponding to the ordinary parameter type (the parameter template at least contains information that the ordinary parameter is represented by a value or variable name and occupies a separate line) and the parameters to be used: Work -> "hello" / / String parameter 42 / / Numerical parameters someVariable / / Variable parameter end If the data to be processed only includes parameters of the named parameter type, then the parameter to be used is filled into the parameter template corresponding to the named parameter type (the parameter template must at least contain information that the named parameter uses the format "parameter name: value" and the order of the named parameters does not have to be consistent with the order of the parameters in the function definition), resulting in the following parameter code: Work -> first: "xxx" second: 42 third: someVariable end Since the order of named parameters can be arbitrary and does not have to match the order of parameters in the function definition, the goal of improving code flexibility is achieved.

[0043] If the data to be processed only includes parameters to be used under the placeholder parameter type, then the parameter to be used is filled into the parameter template corresponding to the placeholder parameter type (the parameter template must at least contain: the placeholder parameter is represented by "b:none", which is used to place the information in the partial function definition), resulting in the following parameter code: partialFun -> t:Work() b:none / / Placeholder for the first parameter <message> / / The second parameter is the callback echo message end b:none / / The third parameter is a placeholder end The above is the definition of a partial function, and the corresponding vertical call to a partial function is as follows: partialFun -> parameter1 / / The first parameter parameter2 / / The second parameter, corresponding to the third parameter of the original function. end By using placeholder parameters, the compiler can determine that the positional parameter will be provided in subsequent calls, thus enabling the application of partial functions.

[0044] If the data to be processed includes: parameters to be used under named parameter type, parameters to be used under callback parameter type, and parameters to be used under ordinary parameter type, then the parameters to be used can be filled into the parameter template under the corresponding parameter type to obtain the following code data. It should be noted that the parameters to be used under callback parameter type can be filled according to the callback parameter template of the callback function definition sub-rule.

[0045] Work -> first: "xxx" / / Named parameter <data> / / Callback function parameters process(data) end "hello" / / Normal parameter <callback> / / Another callback function parameter handle(callback) end third: "xxx" / / Another named parameter catch / / Error handling Flaw1 -> echo "error1" Flaw2 -> echo "error2" end In this embodiment of the invention, the second code block corresponding to the object creation sub-rule can be determined as follows: Based on the data to be processed, determine the variable name and the class name to be instantiated; process the data to be processed in key-value pair format (e.g., attribute:value) to obtain object creation information. Fill the variable name, the class to be instantiated, and the object creation information into the object creation template of the object creation sub-rule to obtain the second code block.

[0046] Optionally, the object creation template corresponding to the object creation sub-rule can be represented as: instance = Class-Identifier -> property1: value1 property2: value2 ... propertyN: valueN end In this context, instance represents the variable name used to store the created instance object; Class-Identifier represents the class name to be instantiated; propertyN: valueN represents the Nth key-value pair, including the object's property name and initial value.

[0047] Accordingly, by substituting the variable names corresponding to the data to be processed, the class to be instantiated, and the object creation information into the above object creation template, we can obtain, as follows: Figure 2 The code data shown above demonstrates that, compared to traditional object creation methods, this method offers more consistent syntax and semantics with function calls, ensuring the maintainability of subsequent code.

[0048] In this embodiment of the invention, the third code block corresponding to the callback function definition sub-rule is determined in the following manner: Based on the data to be processed, callback function parameters corresponding to at least one callback function type are determined; for at least one callback function type, callback parameter code corresponding to the callback function type is determined based on the callback parameter template in the callback function definition sub-rule and the callback function parameters under the callback function type; wherein, the callback parameter template includes at least: a callback function start identifier; based on the callback data in the data to be processed corresponding to each callback function type, at least one line of callback function code corresponding to each callback function type is determined; based on the callback parameter code under each callback function type, at least one line of callback function code, and the callback function end identifier in the callback function definition sub-rule, a callback function code block under each callback function type is determined; based on at least one callback function code block, the third code block is obtained.

[0049] The callback parameter template must include at least a callback function start identifier. Optionally, "<>" can be used as the callback function start identifier, and the callback function start identifier filled with callback function parameters can be used as the callback parameter code to indicate the start of the callback function.

[0050] Callback data can be business data from the data to be processed that is compatible with the current callback function type. Callback function code can be code data determined based on the callback data. A callback function end identifier is used to indicate the end of the callback function. Optionally, "end" can be used as the callback function end identifier.

[0051] A callback function code block can be a code block defined by callback parameter codes, at least one line of callback function code, and a callback function end identifier. The third code block can include callback function code blocks for all callback function types corresponding to the data to be processed. It should also be noted that arranging multiple callback function code blocks vertically within the third code block not only improves the readability of the callback function code blocks but also ensures clear boundaries for each callback function code block.

[0052] Specifically, based on the data to be processed, determine the callback function parameters corresponding to at least one callback function type. For at least one callback function type associated with the data to be processed, determine the callback parameter code corresponding to each callback function type based on the function parameter template in the function definition sub-rule and the callback function parameters under each callback function type. Based on the callback data corresponding to each callback function type in the data to be processed, determine at least one line of callback function code corresponding to each callback function type. For all callback function types associated with the data to be processed, integrate the callback parameter code, at least one line of callback function code, and callback function end identifier under each callback function type to obtain the callback function code block under each callback function type. Integrate the callback function code blocks of all callback function types to obtain the third code block.

[0053] For example, based on the data to be processed, the callback function parameter for the first callback function type is determined to be "data", and the callback function parameters for the second callback function type are determined to be "message" and "name". Based on the callback parameter template and the callback function parameter "data", the callback parameter code corresponding to the first callback function type is determined to be "". <data>Accordingly, based on the callback parameter template and the callback function parameters "message" and "name", the callback parameter code corresponding to the second callback function type is determined.<message, name> For the first callback function type, based on the callback data in the data to be processed that matches the first callback function type, determine the processing logic corresponding to the first callback function type. Based on the processing logic, determine at least one line of callback function code as follows: echo "Processing data:" echo data Accordingly, based on the callback data in the data to be processed that matches the type of the second callback function, the processing logic corresponding to the type of the second callback function is determined, and based on the processing logic, at least one line of callback function code is determined as follows: echo "Message from " + name echo message Based on the above, and according to the callback function end identifier "end", the callback parameter code and callback function code under each callback function type, the third code block is determined as follows: Figure 5 As shown. It should be noted that the callback function code can be business logic adapted to the data to be processed. The callback function code can include complex processing logic such as conditional statements, loops, or other function calls.

[0054] Optionally, the function vertical invocation rule also includes: invoking an integration sub-rule. The method further includes: in response to a chained invocation request related to function vertical invocation, adding target function information after the callback function end identifier of the target callback function code block according to the invocation integration sub-rule, and adding code information determined based on the chained invocation request and the data to be processed after the target function information to obtain an adjusted code block; updating the third code block based on the adjusted code block to obtain an updated third code block.

[0055] The call integration sub-rule can be a syntax rule for embedding vertical function calls within chained calls. The chained call related to vertical function calls can be a request for embedding vertical function calls within chained calls. The target callback function code block is a callback function code block within at least one callback function code block. The target function information can be function identification information used to identify continued chained calls. The code information determined based on the call integration request and the data to be processed can be used to characterize the processing logic for continuing chained calls. The adjustment code block can be a code block that integrates chained calls and vertical function calls, obtained by adjusting the callback function code block. The updated third code block can include the adjustment code block and other callback function code blocks.

[0056] Specifically, in response to a chained call request related to vertical function calls, a target callback function block is determined from at least one callback function block. According to the call integration sub-rules, target function information indicating continued chained calls is added after the callback function end identifier of the target callback function block. Based on the call integration request and pending data, code information indicating continued chained calls is determined. This code information is added after the target function information to adjust the target callback function block, resulting in an adjusted code block. The third code block is then updated based on the adjusted code block, resulting in an updated third code block.

[0057] For example, the call integration sub-rule supports integrating vertical function calls in the middle of a chain of calls; optionally, the continuation of the call can be marked with ".function name". See, for example, [link to relevant documentation]. Figure 6 , Figure 6 This is an example diagram of the calling code based on the invocation of integrated sub-rules provided in an embodiment of the present invention. Figure 6 In this context, ".Then" indicates that the chain of calls should continue.

[0058] Based on the call integration sub-rules, chained calls can be used in simple scenarios, and vertical function calls mentioned in the embodiments of this invention can be applied in complex scenarios, which improves the call flexibility and ensures the simplicity and clarity of code data.

[0059] In this embodiment of the invention, the fourth code block corresponding to the exception handling sub-rule can be determined as follows: Based on the exception handling sub-rule, the third code block is analyzed to determine the exception handling logic information corresponding to the third code block. The exception handling logic information includes: logic information for exception handling of the third code block and logic information for exception handling of at least one callback function code block within the third code block; based on the exception handling logic information and the data to be processed, at least one exception handling code block is determined. The fourth code block is determined based on the at least one exception handling code block, so that the exception handling code block in the fourth code block is integrated into a preset position of the third code block.

[0060] The exception handling sub-rules allow the use of catch, prefer, and other clauses within function calls to inline exception handling logic. The exception handling logic for the third code block can be determined based on the overall processing logic of the third code block. The exception handling logic for at least one callback function code block within the third code block can be determined based on the processing logic of that callback function code block. At least one exception handling code block includes the exception handling code block corresponding to the third code block and the exception handling code block corresponding to at least one callback function code block. It should be noted that, according to the exception handling sub-rules, exception handling code blocks typically begin with "catch" as the exception handling identifier, and exception handling code blocks may also include exception handling identifiers such as "prefer".

[0061] The preset position can be a pre-defined location for the exception handling code block. For example, if the exception handling code block is adapted to a callback function code block, then the exception handling code block is embedded in that callback function code block; similarly, if the exception handling code block is adapted to a third code block, then the exception handling code block is embedded in the third code block.

[0062] For example, see below, the third code block includes two callback function code blocks: <data>……end”、" <message>...end". Based on the exception handling sub-rules, the two callback function code blocks of the third code block are analyzed to determine the exception handling logic information corresponding to the second callback function code block. Based on the exception handling logic information, the exception handling code block corresponding to the second callback function code block is determined, and thus the exception handling code block is embedded within the second callback function code block. For example... Figure 7 As shown. Figure 7 This is a code example diagram showing the embedding of the exception handling code block into the second callback function code block. Based on the above, strongly associating exception handling with the code that triggers the exception makes the code structure clear, improves the coherence of the code logic, and ensures the maintainability of subsequent code.

[0063] After obtaining the first code block, the second code block, the third code block, and the fourth code block, the first code block, the second code block, the third code block, and the fourth code block can be integrated and processed according to the function operator and the sub-rules to obtain the target calling function; based on the target calling function and the supplementary code data corresponding to the data to be processed, the target code data is determined.

[0064] The target calling function can be the calling function corresponding to the function vertical calling rule and the data to be processed. Supplementary code data can be code data that needs to be added to the target calling function based on the data to be processed, to ensure the integrity and executability of the code.

[0065] Specifically, based on the function operator application sub-rules, the first, second, third, and fourth code blocks are integrated and processed to obtain the target calling function. Based on the target calling function and the business logic of the data to be processed, supplementary code data corresponding to the data to be processed is determined. Based on the supplementary code data and the target calling function, the target code data is obtained.

[0066] Optionally, the format of the integrated target function call can be as follows: [object.]function-name -> parameter1 parameter2 ... parameterN end[.verti-call] Here, `object.` is optional, indicating that the method is called through an object, and `function-name` is the name of the function to be called. `->` represents the function operator, used to mark the beginning of a vertical function call. `parameter1` to `parameterN` are the parameters arranged vertically, and `end` marks the end of the vertical call. `.verti-call` indicates continued chaining of calls. It should be noted that, generally, it is not limited to `verti-call`; other function names are also acceptable, i.e., `.function_name`. Furthermore, whether to continue chaining calls is optional and can be determined based on the actual application scenario.

[0067] S140. Execute the target code data to obtain the processing result corresponding to the business call request.

[0068] The processing result can be the execution result corresponding to the business call request. For example, if the business call request is a data query request, the processing result can be the queried data.

[0069] Specifically, by executing the target code data, the processing result corresponding to the business call request is obtained, which improves the efficiency of business call request processing and meets the need for rapid implementation of business call requests.

[0070] The technical solution of this embodiment obtains the data to be processed associated with the business call request; in response to the code editing operation, it retrieves the function vertical call rule matching the business call request. Based on the function vertical call rule and the data to be processed, the target code data associated with the function vertical call rule is determined. By unifying function calls, object creation, and partial function definitions under the same syntax structure through the function vertical call rule, the number of syntax rules is reduced, the accuracy of generated code is improved, and the generated target code data can serve as documentation, improving code readability and reducing reliance on external interpretive documentation. Furthermore, integrating callback functions, exception handling, and function calls follows the principle of locality, improving code maintainability. The target code data is executed to obtain the processing result corresponding to the business call request. This invention solves the problems of low code readability and maintainability, and low subsequent code compilation efficiency in existing technologies under specific business scenarios, failing to meet actual business needs. It improves the readability and maintainability of code data, while also improving code compilation efficiency, meeting the need for rapid implementation of business call requests.

[0071] Example 2 Figure 8 This is a flowchart of a code processing method based on vertical function calls provided in Embodiment 2 of the present invention. This embodiment is a preferred embodiment of the above embodiments, and its specific implementation can be found in the technical solution of this embodiment. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here. Figure 8 As shown, the method includes: S210. Obtain the pending data associated with the business call request.

[0072] S220: In response to code editing operations, retrieve the function vertical calling rules that match the business call request.

[0073] Among them, the vertical function call rules are used to characterize the hierarchical processing method of function calls. The vertical function call rules include at least the following: function operator application sub-rules, parameter definition sub-rules, object creation sub-rules, callback function definition sub-rules, and exception handling sub-rules.

[0074] S230. Based on the function vertical call rules and the data to be processed, determine the target code data corresponding to the function vertical call rules.

[0075] For example, based on the above example, the target code data is determined according to the vertical function call rules and the data to be processed. The target call function in the target code data adopts a vertically arranged syntax structure. Function parameters are organized using line breaks and indentation. The function operator "->" marks the beginning of the vertical call, and the "end" keyword marks the end of the call. The target call function can contain vertically arranged parameters of various parameter types, including ordinary parameters, named parameters, callback function parameters (marked with "<>"), and placeholder parameters, etc.

[0076] S240. Perform lexical analysis on the target code data according to the vertical function call rules to determine the tag sequence corresponding to the target code data.

[0077] The tag sequence includes multiple target identification information, which at least includes: preset keywords, parameter information, and operators. Preset keywords may include: the function operator "->" in the function vertical call rule, the start identifier "catch" for exception handling, the keyword "prefer" for exception handling, and the end identifier "end" for callback functions. Parameter information can be the parameters to be used under various parameter types defined in the target code data. Operators can be the operators in the target code data.

[0078] Specifically, the compiler-based lexical analyzer performs lexical analysis on the target code data according to the vertical function call rules, determines the target identifier information such as preset keywords, parameter information and operators in the target code data, and obtains the tag sequence corresponding to the target code data.

[0079] It should be noted that when performing lexical analysis on the target code data based on the compiler, the integrity of the target code data can also be verified according to the vertical function call rules. Lexical analysis can then be performed on the target code data only after the integrity verification is confirmed to be successful.

[0080] Optionally, the integrity verification process for the target code data may include at least the following: performing parameter integrity verification on the target code data to determine whether the target code data includes the required parameters; verifying the parameter types in the target code data to determine whether the parameter types match the function definitions; verifying the callback function parameters and parameter types in the callback functions in the target code data to ensure the correctness of the callback function parameters and parameter types; and performing validity verification on the named parameters in the target code data to determine the validity of the parameter names of the named parameters.

[0081] By validating the target code data at compile time, runtime errors can be reduced and the accuracy of the code data can be improved.

[0082] For example, the lexer in the compiler identifies preset keywords (such as "->", "catch", "prefer", "end", etc.), identifiers, operators and various parameters, and converts the source code character stream (corresponding to the target code data) into a token sequence based on the identified target identifier information.

[0083] S250. Parse the tag sequence according to the function vertical call rules to determine the abstract syntax tree corresponding to the tag sequence and the executable file corresponding to the abstract syntax tree.

[0084] An Abstract Syntax Tree (AST) can be understood as a tree-like representation of the abstract syntactic structure of a sequence of tokens. An AST includes at least: parameter hierarchy information, callback function nesting structure information, and code block boundary information. Parameter hierarchy information is used to characterize parameter passing and dependencies during function calls. Callback function nesting structure information is used to characterize the nesting relationships between multiple callback functions. Code block boundary information can be understood as the start and end identifiers of each code block. For example, the callback function start identifier and callback function end identifier for the callback function code block.

[0085] An executable file can be an executable binary file obtained by performing semantic analysis, intermediate code generation, optimization, and other processes on an abstract syntax tree. Optionally, the executable file can be in a preset executable file format, such as RSE format. The executable file includes all the instructions and data required to run on the target virtual machine.

[0086] Specifically, the compiler-based parser parses the tokenized sequence according to the vertical function call rules to determine the abstract syntax tree corresponding to the tokenized sequence. Semantic analysis, intermediate code generation, and optimization are then performed on the abstract syntax tree to obtain the executable file.

[0087] S260. Based on the target virtual machine, the executable file is processed to obtain the processing result corresponding to the business call request.

[0088] The target virtual machine can be a virtual machine used to run an executable file determined based on vertical calling rules.

[0089] Specifically, the executable file is loaded into the target virtual machine (such as a virtual machine named "Rhino"). The target virtual machine interprets or just-in-time compiles the instructions in the executable file to complete the function call logic, including parameter passing, callback function triggering, and exception handling, and obtain the processing result corresponding to the business call request.

[0090] For example, referring to the above example, if the business call request is an asynchronous operation processing request, the corresponding data to be processed may include file path information and file encoding information. For example, see... Figure 9 The file path information can be " / data / config.json", and the file encoding information can be "utf-8". Based on the parameter definition sub-rules, determine the parameter code corresponding to the named parameter type. That is, "path: " / data / config.json"", "encoding: "utf-8"". Arrange the two lines of parameter code vertically to obtain the first code block.

[0091] Based on the data to be processed, the callback function parameter is determined to be "content", and the callback parameter code is determined to be " <content>Based on the data to be processed, determine at least one callback function corresponding to the callback parameter code. Based on the callback parameter code and the at least one callback function, obtain the callback function code block, i.e. Figure 9 " in <content>...end".

[0092] Accordingly, based on the exception handling sub-rules, the exception handling code block corresponding to the error handling in the callback function code block is determined, that is, Figure 9 The `catch...useDefaultConfig()` block. And the exception handling block corresponding to the exception handling in the overall third code block, i.e. Figure 9 The `catch...retryReading()` block. Based on the first code block, the callback function code block, and the two exception handling code blocks mentioned above, determine the target code data corresponding to the asynchronous operation processing request, such as... Figure 9 As shown.

[0093] Referring to the above example, if the business call request is an HTTP request, the corresponding data to be processed may include HTTP request method information, the HTTP request's Uniform Resource Locator (URL), HTTP request header information, and the request body (the actual data submitted). For example, see... Figure 10 The HTTP request method can be "POST", and the Uniform Resource Locator can be "https: / / api.example.com / users". The HTTP request headers can be... Figure 10 The data information corresponding to the headers. The request body can be... Figure 10 The data information corresponding to the body. Based on the parameter definition sub-rules, determine the corresponding parameter codes. That is... Figure 10 The code snippet "method:……stringify(newUser)" is used to exemplify this. Arranging the above parameter code vertically creates the first code block.

[0094] Based on the data to be processed, determine the callback function parameter as "response" and the callback parameter code as " <response>Based on the data to be processed, determine at least one callback function corresponding to the callback parameter code. Based on the callback parameter code and the at least one callback function, obtain the callback function code block, i.e. Figure 10 " in <response>...end".

[0095] Accordingly, based on the exception handling sub-rules, the exception handling code block corresponding to the callback function code block is determined, that is, Figure 10 The `catch...showConnectionError()` block. Based on the first code block, the callback function code block, and the exception handling code block mentioned above, determine the target code data corresponding to the HTTP request, such as... Figure 10 As shown.

[0096] The technical solution of this embodiment obtains the data to be processed associated with the business call request, and in response to the code editing operation, retrieves the function vertical call rule matching the business call request. Based on the function vertical call rule and the data to be processed, the target code data corresponding to the function vertical call rule is determined. By unifying function calls, object creation, and partial function definitions under the same syntactic structure through the function vertical call rule, the number of syntactic rules is reduced, the accuracy of generated code is improved, and the generated target code data can serve as documentation, improving code readability and reducing reliance on external interpretive documentation. Furthermore, integrating callback functions, exception handling, and function calls follows the principle of locality, improving code maintainability. Lexical analysis is performed on the target code data according to the function vertical call rule to determine the tag sequence corresponding to the target code data. The tag sequence is parsed according to the function vertical call rule to determine the abstract syntax tree corresponding to the tag sequence and the executable file corresponding to the abstract syntax tree. The executable file is run based on the target virtual machine to obtain the processing result corresponding to the business call request. This invention significantly improves the readability and maintainability of code data in complex scenarios by vertically arranging parameters, defining callback functions inline, supporting named parameters, and exception handling. It solves the problems of low code readability and maintainability, low subsequent code compilation efficiency, and inability to meet actual business needs in scenarios with multiple callback functions, complex parameter lists, and chained calls. It improves the readability and maintainability of code data, while also improving code compilation efficiency, thus meeting the need for rapid implementation of business call requests.

[0097] Example 3 Figure 11 This is a schematic diagram of the structure of a code processing system based on vertical function calls provided in Embodiment 3 of the present invention. Figure 11 As shown, the system includes: a data acquisition module 310, a rule invocation module 320, a code data generation module 330, and a code data execution module 340.

[0098] The data acquisition module 310 is used to acquire data to be processed associated with the business call request; the rule invocation module 320 is used to invoke the function vertical invocation rule matching the business call request in response to the code editing operation; wherein, the function vertical invocation rule is used to characterize the hierarchical processing method of function calls, and the function vertical invocation rule includes at least: function operator application sub-rules, parameter definition sub-rules, object creation sub-rules, callback function definition sub-rules, and exception handling sub-rules; the code data generation module 330 is used to determine the target code data corresponding to the function vertical invocation rule based on the function vertical invocation rule and the data to be processed; the code data execution module 340 is used to execute the target code data to obtain the processing result corresponding to the business call request.

[0099] The technical solution of this embodiment obtains the data to be processed associated with the business call request; in response to the code editing operation, it retrieves the function vertical call rule matching the business call request. Based on the function vertical call rule and the data to be processed, the target code data associated with the function vertical call rule is determined. By unifying function calls, object creation, and partial function definitions under the same syntax structure through the function vertical call rule, the number of syntax rules is reduced, the accuracy of generated code is improved, and the generated target code data can serve as documentation, improving code readability and reducing reliance on external interpretive documentation. Furthermore, integrating callback functions, exception handling, and function calls follows the principle of locality, improving code maintainability. The target code data is executed to obtain the processing result corresponding to the business call request. This invention solves the problems of low code readability and maintainability, and low subsequent code compilation efficiency in existing technologies under specific business scenarios, failing to meet actual business needs. It improves the readability and maintainability of code data, while also improving code compilation efficiency, meeting the need for rapid implementation of business call requests.

[0100] Optionally, based on the above embodiments, the system further includes: a function vertical call rule determination module, configured to configure first configuration information related to function calls or function definitions for function operators to obtain function operator application sub-rules; determine parameter arrangement format and parameter templates corresponding to each parameter type according to each parameter type, and obtain parameter definition sub-rules based on the parameter arrangement format and the parameter templates; determine object creation sub-rules based on second configuration information associated with object creation; determine callback parameter templates based on callback function start identifiers and callback function types, and determine callback function definition sub-rules based on the callback parameter templates and callback function end identifiers; determine exception handling sub-rules based on exception handling logic and exception handling identifiers; and determine function vertical call rules based on the function operator application sub-rules, the parameter definition sub-rules, the object creation sub-rules, the callback function definition sub-rules, and the exception handling sub-rules.

[0101] Optionally, the target code data includes at least a target calling function, and the target calling function includes at least a first code block corresponding to the parameter definition sub-rule, a second code block corresponding to the object creation sub-rule, a third code block corresponding to the callback function definition sub-rule, and a fourth code block corresponding to the exception handling sub-rule.

[0102] Optionally, the code data generation module includes: a first code block generation unit, configured to parse the data to be processed, determine at least one parameter type under which a parameter is to be used; determine a parameter template in the parameter definition sub-rule that matches the parameter type based on the at least one parameter type; for at least one parameter type, determine at least one line of parameter code corresponding to the parameter type based on the parameter template corresponding to the parameter type and the parameter to be used; and obtain the first code block according to the parameter code corresponding to each parameter type and the parameter arrangement format of the parameter definition sub-rule.

[0103] Optionally, the code data generation module includes: a third code block generation unit, configured to: determine callback function parameters corresponding to at least one callback function type based on the data to be processed; for at least one callback function type, determine callback parameter code corresponding to the callback function type based on the callback parameter template in the callback function definition sub-rule and the callback function parameters under the callback function type; wherein, the callback parameter template includes at least: a callback function start identifier; determine at least one line of callback function code corresponding to each callback function type based on the callback data corresponding to each callback function type in the data to be processed; determine a callback function code block under each callback function type based on the callback parameter code under each callback function type, the at least one line of callback function code, and the callback function end identifier in the callback function definition sub-rule; and obtain a third code block based on at least one callback function code block.

[0104] Optionally, the function vertical invocation rule further includes: invocation integration sub-rules, a code data generation module, and a third code block update unit, used to respond to a chained invocation request related to function vertical invocation, add target function information after the callback function end identifier of the target callback function code block according to the invocation integration sub-rules, and add code information determined based on the chained invocation request and the data to be processed after the target function information to obtain an adjusted code block; wherein, the target callback function code block is a code block in at least one of the callback function code blocks; and the third code block is updated based on the adjusted code block to obtain an updated third code block.

[0105] Optionally, the code data generation module includes: a target code generation unit, used to perform integrated processing on the first code block, the second code block, the third code block, and the fourth code block according to the function operator application sub-rules to obtain a target calling function; and to determine target code data based on the target calling function and supplementary code data corresponding to the data to be processed.

[0106] Optionally, the code data execution module is used to perform lexical analysis on the target code data according to the function vertical invocation rules to determine the tag sequence corresponding to the target code data. The tag sequence includes multiple target identifiers, which at least include: preset keywords, parameter information, and operators. The module then parses the tag sequence according to the function vertical invocation rules to determine the abstract syntax tree (AST) corresponding to the tag sequence and the executable file corresponding to the AST. The AST includes at least: parameter hierarchy information, callback function nesting structure information, and code block boundary information. Finally, the module runs the executable file based on the target virtual machine to obtain a processing result corresponding to the business invocation request.

[0107] The code processing system based on vertical function calls provided in the embodiments of the present invention can execute the code processing method based on vertical function calls provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0108] Example 4 Figure 12 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0109] like Figure 12 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0110] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0111] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as code processing methods based on function vertical calls.

[0112] In some embodiments, the function vertical call-based code processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the function vertical call-based code processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the function vertical call-based code processing method by any other suitable means (e.g., by means of firmware).

[0113] Various embodiments of the systems and techniques described above herein can be implemented in digital circuit systems, integrated circuits, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, at least one input device, and at least one output device.

[0114] Computer programs for implementing the function vertical call-based code processing method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0115] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.

[0116] Example 5 Embodiment 5 of the present invention also provides a computer-readable storage medium storing computer instructions for causing a processor to execute a code processing method based on vertical function calls, the method comprising: Retrieve pending data associated with the business call request; In response to a code editing operation, the vertical function invocation rule matching the business invocation request is retrieved; wherein, the vertical function invocation rule is used to characterize the hierarchical processing method of function invocation, and the vertical function invocation rule includes at least: function operator application sub-rules, parameter definition sub-rules, object creation sub-rules, callback function definition sub-rules, and exception handling sub-rules; Based on the function vertical invocation rule and the data to be processed, determine the target code data corresponding to the function vertical invocation rule; The target code data is executed to obtain the processing result corresponding to the business call request.

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

[0118] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0119] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0120] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0121] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the code processing method based on vertical function calls as provided in any embodiment of this application.

[0122] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone 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 remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider). This program product belongs to the same inventive concept as the function vertical call-based code processing method disclosed in the embodiments of this application, and therefore will not be described further here.

[0123] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0124] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.< / response> < / response> < / content> < / content> < / message> < / data> < / data> < / callback> < / data> < / message>

Claims

1. A code processing method based on vertical function calls, characterized in that, include: Retrieve pending data associated with the business call request; In response to a code editing operation, the vertical function invocation rule matching the business invocation request is retrieved; wherein, the vertical function invocation rule is used to characterize the hierarchical processing method of function invocation, and the vertical function invocation rule includes at least: function operator application sub-rules, parameter definition sub-rules, object creation sub-rules, callback function definition sub-rules, and exception handling sub-rules; Based on the function vertical invocation rule and the data to be processed, determine the target code data corresponding to the function vertical invocation rule; The target code data is executed to obtain the processing result corresponding to the business call request.

2. The method according to claim 1, characterized in that, Before acquiring the pending data associated with the business call request, the method further includes: Configure the first configuration information related to function calls or function definitions for function operators to obtain function operator application sub-rules; Based on each parameter type, determine the parameter arrangement format and the parameter template corresponding to each parameter type, and based on the parameter arrangement format and the parameter template, obtain the parameter definition sub-rules; Based on the second configuration information associated with object creation, determine the object creation sub-rules; Based on the callback function start identifier and callback function type, determine the callback parameter template, and based on the callback parameter template and callback function end identifier, determine the callback function definition sub-rule; Based on the exception handling logic and exception handling identifier, determine the exception handling sub-rules; Based on the function operator application sub-rule, the parameter definition sub-rule, the object creation sub-rule, the callback function definition sub-rule, and the exception handling sub-rule, the function vertical invocation rule is determined.

3. The method according to claim 1, characterized in that, The target code data includes at least a target calling function, and the target calling function includes at least a first code block corresponding to the parameter definition sub-rule, a second code block corresponding to the object creation sub-rule, a third code block corresponding to the callback function definition sub-rule, and a fourth code block corresponding to the exception handling sub-rule.

4. The method according to claim 3, characterized in that, The first code block corresponding to the parameter definition sub-rule is determined in the following manner: The data to be processed is parsed to determine at least one parameter of a parameter type to be used; Based on the at least one parameter type, determine the parameter template in the parameter definition sub-rule that matches the parameter type; For at least one of the parameter types, at least one line of parameter code corresponding to the parameter type is determined based on the parameter template corresponding to the parameter type and the parameter to be used; The first code block is obtained based on the parameter codes corresponding to each parameter type and the parameter arrangement format of the parameter definition sub-rules.

5. The method according to claim 3, characterized in that, The third code block corresponding to the callback function definition sub-rule is determined in the following way: Based on the data to be processed, determine the callback function parameters corresponding to at least one callback function type; For at least one of the callback function types, the callback parameter code corresponding to the callback function type is determined based on the callback parameter template in the callback function definition sub-rule and the callback function parameters under the callback function type; wherein, the callback parameter template includes at least: a callback function start identifier; Based on the callback data corresponding to each callback function type in the data to be processed, determine at least one line of callback function code corresponding to each callback function type; Based on the callback parameter code for each callback function type, at least one line of callback function code, and the callback function end identifier in the callback function definition sub-rule, determine the callback function code block for each callback function type; A third code block is obtained based on at least one of the aforementioned callback function code blocks.

6. The method according to claim 5, characterized in that, The vertical function invocation rule also includes: invoking integrated sub-rules, and the method further includes: In response to a chained call request related to vertical function calls, target function information is added after the callback function end identifier of the target callback function code block according to the call integration sub-rule, and code information determined based on the chained call request and the data to be processed is added after the target function information to obtain an adjusted code block; wherein, the target callback function code block is at least one code block in the callback function code block; The third code block is updated based on the adjusted code block to obtain the updated third code block.

7. The method according to claim 3, characterized in that, The target code data is determined in the following manner: The first code block, the second code block, the third code block, and the fourth code block are integrated and processed according to the function operator application sub-rules to obtain the target calling function; The target code data is determined based on the target function call and the supplementary code data corresponding to the data to be processed.

8. The method according to claim 1, characterized in that, The execution of the target code data to obtain the processing result corresponding to the business call request includes: Lexical analysis is performed on the target code data according to the function vertical call rules to determine the tag sequence corresponding to the target code data. The tag sequence includes multiple target identification information, which includes at least: preset keywords, parameter information, and operators. The marked sequence is parsed according to the vertical function call rules to determine the abstract syntax tree corresponding to the marked sequence and the executable file corresponding to the abstract syntax tree; wherein, the abstract syntax tree includes at least: parameter hierarchy information, function nesting structure information of callback functions, and boundary information of each code block; The executable file is processed by the target virtual machine to obtain the processing result corresponding to the business call request.

9. A code processing system based on vertical function calls, characterized in that, include: The data acquisition module is used to acquire the data to be processed that is associated with the business call request; The rule invocation module is used to respond to code editing operations and retrieve the function vertical invocation rules that match the business invocation request; wherein, the function vertical invocation rules are used to characterize the hierarchical processing method of function invocation, and the function vertical invocation rules include at least: function operator application sub-rules, parameter definition sub-rules, object creation sub-rules, callback function definition sub-rules, and exception handling sub-rules; The code data generation module is used to determine the target code data corresponding to the function vertical calling rule based on the function vertical calling rule and the data to be processed; The code data execution module is used to execute the target code data and obtain the processing result corresponding to the business call request.

10. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the code processing method based on vertical function calls as described in any one of claims 1-8.