CN114579107A - Data processing method, device, equipment and medium - Google Patents

Data processing method, device, equipment and medium Download PDF

Info

Publication number
CN114579107A
CN114579107A CN202210237573.0A CN202210237573A CN114579107A CN 114579107 A CN114579107 A CN 114579107A CN 202210237573 A CN202210237573 A CN 202210237573A CN 114579107 A CN114579107 A CN 114579107A
Authority
CN
China
Prior art keywords
function
code segment
target
preset
calling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210237573.0A
Other languages
Chinese (zh)
Inventor
黄文楷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202210237573.0A priority Critical patent/CN114579107A/en
Publication of CN114579107A publication Critical patent/CN114579107A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the disclosure relates to a data processing method, a device, equipment and a medium, wherein the method comprises the following steps: responding to a script writing request, and detecting a reference request for a preset type function; if the reference request is detected, acquiring a target function identifier corresponding to the reference request; determining a target function corresponding to the target function identifier in a preset custom function, and reading a target logic code segment of the target function in a preset storage position; and generating a calling code segment of the target logic code segment in the current script so as to call the target function according to the calling code segment. Therefore, code compiling is avoided when the target function is called every time, the calling efficiency of the functions is improved, cross-script calling among the functions is realized, and technical support is provided for improving task compiling efficiency.

Description

Data processing method, device, equipment and medium
Technical Field
The present disclosure relates to the field of computer application technologies, and in particular, to a method, an apparatus, a device, and a medium for processing data.
Background
With the development of computer application technology, an integration service providing platform can be configured with integration streams on the platform to complete integration tasks.
In the related art, in order to implement an integration task, a plurality of integration components of the integration task are written, each integration component having a script writing capability, and thus, a user implements the integration task by writing script code of each integration component.
However, when an integration task contains a large number of integration components, a user needs to write a large number of scripts, resulting in inefficient writing of the task.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the disclosure provides a data processing method, device, equipment and medium, which avoid that code compiling is required to call a target function every time, improve the call efficiency of functions, realize cross-script call between functions, and provide technical support for improving the task compiling efficiency.
The embodiment of the disclosure provides a data processing method, which comprises the following steps: responding to a script writing request, and detecting a reference request for a preset type function; if the reference request is detected, acquiring a target function identifier corresponding to the reference request; determining a target function corresponding to the target function identifier in a preset custom function, and reading a target logic code segment of the target function in a preset storage position; and generating a calling code segment of the target logic code segment in the current script so as to call the target function according to the calling code segment. The embodiment of the present disclosure further provides a data processing apparatus, where the apparatus includes: the detection module is used for responding to the script writing request and detecting a reference request of a preset type function; the acquisition module is used for acquiring a target function identifier corresponding to the reference request when the reference request is detected; the determining module is used for determining a target function corresponding to the target function identifier in a preset custom function; the reading module is used for reading the target logic code segment of the target function in a preset storage position; and the generation module is used for generating a calling code segment of the target logic code segment in the current script so as to call the target function according to the calling code segment.
An embodiment of the present disclosure further provides an electronic device, which includes: a processor; a memory for storing the processor-executable instructions; the processor is used for reading the executable instructions from the memory and executing the instructions to realize the data processing method provided by the embodiment of the disclosure.
The embodiment of the disclosure also provides a computer readable storage medium, wherein the storage medium stores a computer program, and the computer program is used for executing the data processing method provided by the embodiment of the disclosure.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
the data processing scheme provided by the embodiment of the disclosure responds to a script writing request, detects a reference request for a preset type function, determines a target function corresponding to a target function identifier in a preset self-defined function if the reference request is detected, reads a target logic code segment of the target function in a preset storage position, and further generates a calling code segment of the target logic code segment in a current script so as to call the target function according to the calling code segment. Therefore, code compiling is avoided when the target function is called every time, the calling efficiency of the functions is improved, cross-script calling among the functions is realized, and technical support is provided for improving task compiling efficiency.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a schematic flow chart of a data processing method according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of another data processing method provided in the embodiment of the present disclosure;
fig. 3 is a schematic diagram of a call scenario of a function according to an embodiment of the present disclosure;
FIG. 4 is a schematic structural diagram of a custom module according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a call scenario of another function provided in the embodiment of the present disclosure;
fig. 6 is a schematic flow chart of another data processing method provided in the embodiment of the present disclosure;
fig. 7 is a schematic diagram of a call scenario of another function provided in the embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and the embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
In order to solve the above problem, the embodiments of the present disclosure provide a data processing method, in which duplicate code logics may exist in different scripts, and therefore, the duplicate code logics may be defined as functions, and computations are called in different script boxes, so that the efficiency of integrating stream coding can be greatly improved.
The data processing method is described below with reference to specific embodiments.
Fig. 1 is a flowchart illustrating a method for processing data according to an embodiment of the present disclosure, where the method may be performed by a data processing apparatus, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 1, the method includes:
step 101, responding to a script writing request, and detecting a reference request for a preset type function.
In an embodiment of the present disclosure, the script writing request may be obtained when it is detected that the user is in a script writing box interface of the integrated component, or when it is detected that the user triggers a corresponding script writing control, and the like, which is not limited herein.
It should be emphasized that the preset type function in this embodiment can be understood as: in the embodiment, the related integrated task platform can accept the self-definition of the preset type function by a user, and after the self-defined preset type function is released, the preset type function is persistently stored.
The preset type function may include a custom code logic, and may also include a custom constant, for example, the preset type function "myAdd" may be:
function myAdd(num1,num2){
return num1+num2}
const myConst=12345
besides the code logic of the custom function myAdd, a custom constant myConst is defined as an example.
In one embodiment of the disclosure, at the time of script writing, whether a function of a preset type has a reference request is detected, so as to determine whether a current script has a code writing request of the function of the preset type.
It should be noted that, in different application scenarios, the manner of detecting a reference request for a preset type function is different, and the following example is given:
in one embodiment of the present disclosure, as shown in fig. 2, detecting a reference request for a function of a preset type includes:
step 201, acquiring a current input field when the script is written.
Step 202, detecting whether the current input field is a preset key field.
In one embodiment of the disclosure, a current input field during script writing is obtained, and whether the current input field is a preset key field is detected, wherein if the current input field is the preset key field, a reference request is detected.
The preset key field may be any predefined field that calls a preset type function, for example, if the call field is predefined to be "require", when the current input field is detected to be "require", the current input field is considered to be the preset field. In another embodiment of the present disclosure, a "preset type function call control" is provided on a preset script writing interface, and if it is detected that the control is triggered by a user, the reference request is obtained.
And 102, if the reference request is detected, acquiring a target function identifier corresponding to the reference request.
And 103, reading a target logic code segment corresponding to the target function identifier in a preset storage position, wherein the preset storage position stores the corresponding relation between the preset function identifier of the self-defined function and the logic code segment.
It will be appreciated that, prior to obtaining the target function identification, in response to the function customization request, the function identification and logic code of the customized function are obtained, wherein, the function identifier may be a function name customized by the user, such as "myAdd" in the above embodiment, and further, determine the logic code of the customized function written by the user in the definition module, the logic code is the function code of the self-defining function, after the user writes the corresponding logic code, if the self-defining function is bound to the self-defining module export item, i.e., the custom function export interface, etc., is invoked, the release request for the custom function is obtained, and, in response to the release request for the custom function, and constructing and storing a corresponding relation between the function identifier and the logic code at a preset storage position so as to call the self-defined function based on the corresponding relation. Namely, when the self-defining module is actually executed, the self-defining module is defined to realize the definition and the release of the self-defining function of the preset type.
The user-defined module is used for providing user-defined service of the preset type functions, the user-defined preset type functions can be renamed, a group of user-defined preset type functions are often used together to solve the same problem, and the user-defined preset type functions have certain relevance.
For example, as shown in fig. 4, the custom module defines 2 custom functions and corresponding custom constants, the custom module defines the custom module derived content by using a keyword of modules, ports { }, modules, ports { "myAdd": myAdd, "mycconst": myConst }, and by setting modules, ports as an object of { "myAdd": myAdd, "mycconst": myConst }, the module derived content is defined as myAdd and myConst.
In this example, a custom module is newly created, a custom module identifier is defined, further, a service logic for writing a custom preset type function is defined in the custom module, a lead-out item of the custom module is specified, the custom module is released, the custom module is persisted after being released, and is used for loading and calling in the later runtime. If the quoting request is detected, the target function identifier corresponding to the quoting request is determined, and the preset storage position stores the corresponding relation between the function identifier and the logic code, so that the target logic code segment corresponding to the target function identifier is further read at the preset storage position, the code logic of the predefined target function is conveniently reused, manual writing by a user is not needed, the script writing efficiency is improved, and the writing efficiency of the integrated task is improved.
For example, when the target function is the myadd function, the running logic of the corresponding myadd function may be multiplexed, and the corresponding summation code does not need to be written manually. In the actual execution process, considering that some custom functions have strong correlation with each other, a plurality of custom functions jointly complete one function, for example, an obtaining function of the employee identity card number is commonly used with a function of the employee age to complete the function of employee information management, so that after a citation request of a user is detected, one target function may be obtained, and a plurality of target functions may also be obtained.
In some possible embodiments, a specific function corresponding to the reference request may be obtained, where the specific function may be a single preset type function currently referenced by the user, for example, in response to the reference request, multiple candidate function identifiers as shown in fig. 3 may be displayed, the multiple candidate function identifiers may be displayed in a sliding manner in a list form, and the like, where the multiple candidate function identifiers correspond to multiple custom functions, and then, in response to a trigger request for the target function identifier by the user, the specific function corresponding to the determined function identifier may be obtained. In fig. 3, the function corresponding to the user-specified function is identified as S3.
For another example, if the current input field is a preset key field, a reference function identifier of the current input key field is obtained, where the reference function identifier is an identifier that is pre-stored in the database and corresponds to a preset type function, and therefore, in this embodiment, the preset database may be queried to obtain the reference function identifier. For example, if it is detected that the input preset key field is required and the detected reference function identifier is myAdd, determining that myAdd is a corresponding reference function identifier, where generally, the reference function identifier is adjacent to the preset key field.
Further, after the reference function identifier is obtained, the target function identifier corresponding to the reference function identifier is determined, in an embodiment of the present disclosure, a corresponding relationship between function identifiers of the user-defined function may be stored, a preset corresponding relationship is queried according to the reference function identifier, and if an associated function identifier corresponding to the reference function identifier is queried, the reference function identifier and the associated function identifier are determined to be the target function identifier.
And 104, generating a calling code segment of the target logic code segment in the current script so as to call the target function according to the calling code segment.
And calling the code segment so as to call the corresponding target function according to the calling code segment.
In an embodiment of the present disclosure, a calling code segment of the target logic code segment is generated in a current script, and the calling code segment is added in a corresponding script, so that the script can call a corresponding target function according to the calling code segment when being loaded. In order to facilitate the user to write other script codes in the integrated component, the logic code of the target function corresponding to the calling code segment can be displayed in the preset area to be referred to when the user writes the code.
The calling code segment can be input by a user or automatically generated according to a preset calling rule and a target function identifier, and if the calling code segment is automatically generated, the code compiling efficiency is further improved.
For example, if the target function is identified as "mymodule.
myModule=require(“myModule”)
res=myModule.myAdd(1,2)。
In an embodiment of the disclosure, when a user wishes to multiplex a code module, a requirement and other preset key fields are developed, the user inputs a function name as a reference identifier to load, the user refers to a custom function to compile a script, a module loader is called during running, logic code segments of the persistent custom function in the foregoing are loaded in combination with cache optimization and are analyzed into corresponding run-time objects, and then the logic code segments are executed to obtain corresponding running results to be used for calling other scripts during running. For example, in the above example, the service script of the user loads a module, myModule, through a require keyword, and then performs service computation using a myAdd function in the myModule, and uses the computation structure for use of other script codes.
It should be emphasized that the call of the target function in this embodiment may be multiplexed between different scripts, and only the call code segment of the target logic code segment needs to be generated in the current script, for example, as shown in fig. 5, when the integrated component includes a component a and a component B, since the preset type function is already persisted on the platform before, the custom function Si may be multiplexed not only when the script code of a is written, but also when the script code of B is written, thereby improving the publishing efficiency of the integration task.
In summary, the function calling method according to the embodiment of the disclosure, in response to a script writing request, detects a reference request for a preset type function, determines a target function corresponding to a target function identifier in a preset custom function if the reference request is detected, reads a target logic code segment of the target function in a preset storage location, and further generates a calling code segment of the target logic code segment in a current script, so as to call the target function according to the calling code segment. Therefore, code compiling is avoided when the target function is called every time, the calling efficiency of the function is improved, cross-script calling between the functions is realized, and technical support is provided for improving the task compiling efficiency.
Based on the embodiment, when the actual script runs, the multiplexing of the logic code of the target function can be realized based on the calling code segment, and the repeated writing of related codes is not needed.
In one embodiment of the present disclosure, as shown in fig. 6, the calling the target function according to the calling code segment includes: the method comprises the following steps:
step 601, responding to the loading request to the calling code segment, and judging whether the calling code segment is loaded for the first time.
In one embodiment of the present disclosure, in order to improve the execution efficiency of the related task, the execution result of the objective function may also be multiplexed, for example, the operation result of the objective function may be multiplexed, and the like.
In an embodiment of the present disclosure, before determining whether the calling code segment is first loaded, a function type of the target function may be further obtained, and the function type is determined to be a preset type, where the preset type function does not include a variable parameter, or input parameters of the preset type function during each operation in the current integrated component are all the same.
Step 602, if the loading is the first time, obtaining an input variable parameter of the target logic code segment, and identifying a variable value corresponding to the input variable parameter in the current script.
If the target logic code segment is loaded to the current script, the variable value of the corresponding input variable parameter is derived from the current script, so that the input variable parameter of the target logic code segment is obtained, and the variable value corresponding to the input variable parameter is identified in the current script.
For example, when the target logic code is function myAdd (num1, num2) { return num1+ num2}, num1 and num2 are input variable parameters of the target logic code, and parameter values a and b corresponding to num1 and num2 are identified in the current script, so that the role operation result of a + b is obtained. The parameter values corresponding to num1 and num2 may be identified by the definition code segment of the current script (for example, num1 ═ a, num2 ═ b, and the like are defined in the current script by the user). In order to further improve the operation efficiency, before the target logic code is operated, whether the calling code segment is loaded for the first time is also judged, if the calling code segment is loaded for the first time, the input variable parameter of the target logic code segment is obtained as mentioned above, and the variable value corresponding to the input variable parameter is identified in the current script.
Step 603, the target logic code segment is run to obtain a running result corresponding to the variable value, so as to realize the call of the target function.
In this embodiment, after the variable value is obtained, the target logic code segment is run to obtain the run result corresponding to the variable value, so as to implement the call of the target function, and further, the script after the code segment is executed in the script according to the run result, so that the logic code corresponding to the target function does not need to be repeatedly written, and the multiplexing of the logic code of the target function can be implemented.
In the actual execution process, the corresponding logic code segment may also be directly parsed and compiled to obtain the execution code segment, where the execution logic in the execution code segment is consistent with the logic code segment, and the variable value of the executed variable parameter is consistent with the variable value related to the current script.
In one embodiment of the present disclosure,
the operation result of the calling execution code segment can be stored in the preset storage position, so that the corresponding operation result can be directly multiplexed when the target function is called subsequently, and the corresponding logic code segment does not need to be executed again.
If the loading is not the first time, the operation result of the calling execution code segment is obtained at the preset storage position, and the operation result is the stored historical operation result, so that the corresponding logic code is not required to be executed, analyzed and compiled again, the corresponding execution result can be obtained according to the corresponding execution code segment, and the execution efficiency of related tasks is greatly improved.
In an embodiment of the present disclosure, referring to fig. 7, when the execution is performed to the preset calling code segment, the calling module loader performs loading processing on the logic code segment corresponding to the target function, the module loader first determines whether the calling code segment has been loaded, if so, the module loader directly returns the execution result of the module, and if not, the corresponding logic code segment is loaded from the persistent storage, then parsed/compiled into a runtime object (i.e. an executable segment of executable code is generated according to the logic code segment, the input variable value, etc.), and finally the executable segment of executable code is run for the script running to obtain the corresponding running result, so that, after the self-defined module is defined, the cross-script frame is quoted and called, so that the problems that the same self-defined function is repeatedly written and the scattered same self-defined function is difficult to modify are solved.
In summary, according to the data processing method in the embodiments of the present disclosure, after the calling code segment is obtained, if the calling code segment is loaded for the first time, the corresponding executing code segment is called to execute the target function, and if the calling code segment is not loaded for the first time, the operation result data after the historical loading is multiplexed, so that the script execution efficiency is improved.
In order to implement the above embodiments, the present disclosure further provides a data processing apparatus.
Fig. 8 is a schematic structural diagram of a data processing apparatus provided in an embodiment of the present disclosure, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 8, the apparatus includes:
the detection module 810 is configured to detect a reference request for a preset type function in response to a script writing request;
an obtaining module 820, configured to obtain, when a reference request is detected, a target function identifier corresponding to the reference request;
a determining module 830, configured to determine, in a preset custom function, an objective function corresponding to the objective function identifier;
a reading module 840, configured to read a target logic code segment of a target function in a preset storage location;
the generating module 850 is configured to generate a calling code segment of the target logic code segment in the current script, so as to call the target function according to the calling code segment. The data processing device provided by the embodiment of the disclosure can execute the data processing method provided by any embodiment of the disclosure, and has corresponding functional modules and beneficial effects of the execution method.
In order to implement the above embodiments, the present disclosure also proposes a computer program product comprising a computer program/instructions which, when executed by a processor, implement the processing method of data in the above embodiments.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Referring now specifically to fig. 9, a schematic diagram of an electronic device 900 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device 900 in the disclosed embodiments may include, but is not limited to, mobile terminals such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle mounted terminal (e.g., a car navigation terminal), and the like, and fixed terminals such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 9, electronic device 900 may include a processor (e.g., central processing unit, graphics processor, etc.) 901 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from a memory 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the electronic apparatus 900 are also stored. The processor 901, ROM 902, and RAM 903 are connected to each other by a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
Generally, the following devices may be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 907 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; a memory 908 including, for example, a magnetic tape, a hard disk, and the like; and a communication device 909. The communication device 909 may allow the electronic apparatus 900 to perform wireless or wired communication with other apparatuses to exchange data. While fig. 9 illustrates an electronic device 900 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, the processes described above with reference to the flow diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure 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 method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device 909, or installed from the memory 908, or installed from the ROM 902. The computer program performs the above-described functions defined in the processing method of data of the embodiment of the present disclosure when executed by the processor 901.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: responding to a script writing request, and detecting a reference request for a preset type function; if the reference request is detected, acquiring a target function identifier corresponding to the reference request; determining a target function corresponding to the target function identifier in a preset custom function, and reading a target logic code segment of the target function in a preset storage position; and generating a calling code segment of the target logic code segment in the current script so as to call the target function according to the calling code segment. Therefore, code compiling is avoided when the target function is called every time, the calling efficiency of the function is improved, cross-script calling between the functions is realized, and technical support is provided for improving the task compiling efficiency.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a data processing method including:
responding to a script writing request, and detecting a reference request for a preset type function;
if the reference request is detected, acquiring a target function identifier corresponding to the reference request;
reading a target logic code segment corresponding to the target function identifier in a preset storage position, wherein the preset storage position stores the corresponding relation between the function identifier of a preset self-defined function and the logic code segment;
and generating a calling code segment of the target logic code segment in the current script so as to call the target function according to the calling code segment.
According to one or more embodiments of the present disclosure, the data processing method further includes:
responding to the function self-defining request, and acquiring a function identifier and a logic code of a self-defining function;
and responding to the issuing request of the self-defined function, and constructing and storing the corresponding relation between the function identifier and the logic code in the preset storage position.
In accordance with one or more embodiments of the present disclosure,
the calling the target function according to the calling code segment comprises the following steps:
responding to a loading request of the calling code segment, and judging whether the calling code segment is loaded for the first time;
if the loading is the first time, acquiring an input variable parameter of the target logic code segment, and identifying a variable value corresponding to the input variable parameter in the current script;
and operating the target logic code segment to obtain an operation result corresponding to the variable value so as to realize the calling of the target function.
According to one or more embodiments of the present disclosure, the data processing method further includes:
and if the loading is not the first time, acquiring the operation result of the calling code segment at a preset storage position so as to realize the calling of the target function.
According to one or more embodiments of the disclosure, in the data processing method provided by the disclosure,
the detecting a reference request to a preset type function includes:
acquiring a current input field when a script is compiled;
detecting whether the current input field is a preset key field;
and if the key field is the preset key field, detecting the reference request.
According to one or more embodiments of the disclosure, in the data processing method provided by the disclosure,
the obtaining of the target function identifier corresponding to the reference request includes:
displaying a plurality of candidate function identifications in response to the reference request;
and acquiring a target function identifier triggered by the user in the candidate function identifiers. According to one or more embodiments of the disclosure, in the data processing method provided by the disclosure,
the obtaining of the target function identifier corresponding to the reference request includes:
detecting a reference function identifier corresponding to the reference request in a current script; and querying a preset database to determine a target function identifier corresponding to the reference function identifier.
According to one or more embodiments of the present disclosure, there is provided a data processing apparatus including:
the detection module is used for responding to the script writing request and detecting a reference request for a preset type function;
the acquisition module is used for acquiring a target function identifier corresponding to the reference request when the reference request is detected;
the determining module is used for determining a target function corresponding to the target function identifier in a preset user-defined function;
the reading module is used for reading the target logic code segment of the target function in a preset storage position;
and the generation module is used for generating a calling code segment of the target logic code segment in the current script so as to call the target function according to the calling code segment.
According to one or more embodiments of the present disclosure, the data processing method further includes:
the code acquisition module is used for responding to the function self-defining request and acquiring the function identifier and the logic code of the self-defining function;
and the relation storage module is used for responding to the release request of the self-defined function and constructing and storing the corresponding relation between the function identifier and the logic code in the preset storage position.
According to one or more embodiments of the present disclosure, in the data processing apparatus, the generating module is specifically configured to:
responding to a loading request of the calling code segment, and judging whether the calling code segment is loaded for the first time;
if the loading is the first time, acquiring an input variable parameter of the target logic code segment, and identifying a variable value corresponding to the input variable parameter in the current script;
and operating the target logic code segment to obtain an operation result corresponding to the variable value so as to realize the calling of the target function.
According to one or more embodiments of the present disclosure, in the data processing apparatus, the generating module is specifically configured to:
and if the loading is not the first time, acquiring the operation result of the calling code segment at a preset storage position so as to realize the calling of the target function.
According to one or more embodiments of the present disclosure, in the data processing apparatus, the detection module is specifically configured to:
acquiring a current input field when a script is compiled;
detecting whether the current input field is a preset key field;
and if the key field is the preset key field, detecting the reference request.
According to one or more embodiments of the present disclosure, in the data processing apparatus, the obtaining module is specifically configured to:
displaying a plurality of candidate function identifications in response to the reference request;
and acquiring a target function identifier triggered by the user in the candidate function identifiers.
According to one or more embodiments of the present disclosure, in the data processing apparatus, the obtaining module is specifically configured to:
detecting a reference function identifier corresponding to the reference request in a current script; and querying a preset database to determine a target function identifier corresponding to the reference function identifier.
In accordance with one or more embodiments of the present disclosure, there is provided an electronic device including:
a processor;
a memory for storing the processor-executable instructions;
the processor is used for reading the executable instructions from the memory and executing the instructions to realize the data processing method provided by the present disclosure.
According to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium storing a computer program for executing the method of processing data according to any one of the methods provided by the present disclosure.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A method for processing data, comprising the steps of: responding to a script writing request, and detecting a reference request for a preset type function;
if the reference request is detected, acquiring a target function identifier corresponding to the reference request;
reading a target logic code segment corresponding to the target function identifier in a preset storage position, wherein the preset storage position stores the corresponding relation between the function identifier of a preset self-defined function and the logic code segment;
and generating a calling code segment of the target logic code segment in the current script so as to call the target function according to the calling code segment.
2. The method of claim 1, wherein prior to said reading the target logical code segment corresponding to the target function identification in the preset storage location, comprising:
responding to the function self-defining request, and acquiring a function identifier and a logic code of a self-defining function;
and responding to the issuing request of the self-defined function, and constructing and storing the corresponding relation between the function identifier and the logic code in the preset storage position.
3. The method of claim 2, wherein said calling said target function according to said calling code segment comprises:
responding to a loading request of the calling code segment, and judging whether the calling code segment is loaded for the first time;
if the loading is the first time, acquiring an input variable parameter of the target logic code segment, and identifying a variable value corresponding to the input variable parameter in the current script;
and operating the target logic code segment to obtain an operation result corresponding to the variable value so as to realize the calling of the target function.
4. The method of claim 3, further comprising:
and if the loading is not the first time, acquiring the operation result of the calling code segment at a preset storage position so as to realize the calling of the target function.
5. The method of claim 1, wherein the detecting a reference request to a function of a preset type comprises:
acquiring a current input field when a script is compiled;
detecting whether the current input field is a preset key field;
and if the key field is the preset key field, detecting the reference request.
6. The method of claim 1, wherein the obtaining an identification of an objective function corresponding to the quote request comprises:
displaying a plurality of candidate function identifications in response to the reference request;
and acquiring a target function identifier triggered by a user in the candidate function identifiers.
7. The method of claim 1, wherein said obtaining an identification of an objective function corresponding to the quote request comprises:
detecting a reference function identifier corresponding to the reference request in a current script; and querying a preset database to determine a target function identifier corresponding to the reference function identifier.
8. An apparatus for processing data, comprising:
the detection module is used for responding to the script writing request and detecting a reference request for a preset type function;
the acquisition module is used for acquiring a target function identifier corresponding to the reference request when the reference request is detected;
the determining module is used for determining a target function corresponding to the target function identifier in a preset custom function;
the reading module is used for reading the target logic code segment of the target function in a preset storage position;
and the generation module is used for generating a calling code segment of the target logic code segment in the current script so as to call the target function according to the calling code segment.
9. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing the processor-executable instructions;
the processor is used for reading the executable instructions from the memory and executing the executable instructions to realize the data processing method of any one of the claims 1 to 7.
10. A computer-readable storage medium, characterized in that it stores a computer program for executing the method of processing data according to any one of the preceding claims 1 to 7.
CN202210237573.0A 2022-03-11 2022-03-11 Data processing method, device, equipment and medium Pending CN114579107A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210237573.0A CN114579107A (en) 2022-03-11 2022-03-11 Data processing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210237573.0A CN114579107A (en) 2022-03-11 2022-03-11 Data processing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN114579107A true CN114579107A (en) 2022-06-03

Family

ID=81775079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210237573.0A Pending CN114579107A (en) 2022-03-11 2022-03-11 Data processing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN114579107A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116450250A (en) * 2023-06-16 2023-07-18 天津金城银行股份有限公司 Dynamic scenario execution method, system and storage medium
CN116541019A (en) * 2023-06-28 2023-08-04 深圳市极限网络科技有限公司 Data forwarding method, system, device and readable storage medium
CN117118962A (en) * 2023-07-25 2023-11-24 领悦数字信息技术有限公司 Method and system for deploying user methods across multiple cloud platforms
CN118245090A (en) * 2024-05-24 2024-06-25 浪潮计算机科技有限公司 Method, system and device for double flash memory refreshing of basic input/output system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116450250A (en) * 2023-06-16 2023-07-18 天津金城银行股份有限公司 Dynamic scenario execution method, system and storage medium
CN116450250B (en) * 2023-06-16 2023-09-19 天津金城银行股份有限公司 Dynamic scenario execution method, system and storage medium
CN116541019A (en) * 2023-06-28 2023-08-04 深圳市极限网络科技有限公司 Data forwarding method, system, device and readable storage medium
CN116541019B (en) * 2023-06-28 2023-09-29 深圳市极限网络科技有限公司 Data forwarding method, system, device and readable storage medium
CN117118962A (en) * 2023-07-25 2023-11-24 领悦数字信息技术有限公司 Method and system for deploying user methods across multiple cloud platforms
CN117118962B (en) * 2023-07-25 2024-03-22 领悦数字信息技术有限公司 Method and system for deploying user methods across multiple cloud platforms
CN118245090A (en) * 2024-05-24 2024-06-25 浪潮计算机科技有限公司 Method, system and device for double flash memory refreshing of basic input/output system

Similar Documents

Publication Publication Date Title
CN114579107A (en) Data processing method, device, equipment and medium
CN111581291A (en) Data processing method and device, electronic equipment and readable medium
CN111291103A (en) Interface data analysis method and device, electronic equipment and storage medium
CN111930534A (en) Data calling method and device and electronic equipment
CN109766127B (en) Method for updating application version information
US20210200806A1 (en) Method and apparatus for parallel processing of information
CN111638983A (en) Interface calling method, interface calling device and terminal equipment
CN111796865B (en) Byte code file modification method, device, terminal equipment and medium
CN114035805A (en) Code conversion method, apparatus, medium, and device for pre-compiler
CN113886336A (en) Flow detection method, device, equipment and medium
CN111506904B (en) Method and device for online bug repair
CN111338944A (en) Remote Procedure Call (RPC) interface test method, device, medium and equipment
CN111628938A (en) Branch merging method and device, electronic equipment and computer storage medium
CN111581431B (en) Data exploration method and device based on dynamic evaluation
CN113656050B (en) Method and apparatus for generating version number
CN111625232B (en) Method and device for generating application program installation package, readable medium and electronic equipment
CN116679930A (en) Front-end project construction method and device, electronic equipment and storage medium
CN112527302A (en) Error detection method and device, terminal and storage medium
CN114510334A (en) Class instance calling method and device, electronic equipment and automatic driving vehicle
CN113986959A (en) Logistics information acquisition method and device, electronic equipment and computer readable medium
CN114936021A (en) Data processing method, device, equipment and medium
CN113778850A (en) Data processing method and device, electronic equipment and computer readable medium
CN109298831B (en) Information storage method and device
CN112487416A (en) Business process verification method and device and electronic equipment
CN111309323A (en) Parameter initialization method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination