CN113535148A - Source code generation method and device and electronic equipment - Google Patents

Source code generation method and device and electronic equipment Download PDF

Info

Publication number
CN113535148A
CN113535148A CN202110832202.2A CN202110832202A CN113535148A CN 113535148 A CN113535148 A CN 113535148A CN 202110832202 A CN202110832202 A CN 202110832202A CN 113535148 A CN113535148 A CN 113535148A
Authority
CN
China
Prior art keywords
function
data
data object
character string
function name
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.)
Granted
Application number
CN202110832202.2A
Other languages
Chinese (zh)
Other versions
CN113535148B (en
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 QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202110832202.2A priority Critical patent/CN113535148B/en
Publication of CN113535148A publication Critical patent/CN113535148A/en
Application granted granted Critical
Publication of CN113535148B publication Critical patent/CN113535148B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/70Software maintenance or management
    • G06F8/73Program documentation

Abstract

The embodiment of the invention provides a method and a device for generating a source code and electronic equipment, wherein the method comprises the following steps: acquiring a protocol file to be processed; identifying first key characters in a protocol file to be processed, and determining a character string between two adjacent first key characters as a data object; respectively identifying function name character strings in each data object and function value character strings corresponding to the function name character strings according to a predefined data format; generating a syntax tree based on the nesting relation among function name character strings in each data object; and aiming at each data object in the syntax tree, combining the function name character strings included in the data object and the function value character strings corresponding to the function name character strings based on the function form of the required calling function corresponding to the data object to obtain a source code for responding to the service request. The source code of the service request does not need to be compiled manually by technicians, so that the labor consumption is reduced, and the generation efficiency of the source code is greatly improved.

Description

Source code generation method and device and electronic equipment
Technical Field
The invention relates to the technical field of cloud computing, in particular to a code source generation method and device and electronic equipment.
Background
In some cases, a technician needs to feed back a request result to the front-end service according to a service request submitted by the front-end service to the background, or the technician needs to perform a service response to the service request of the front-end service.
At present, a scheme for performing service response on a service request of a front-end service generally includes: acquiring a service request of a front-end service, and analyzing request parameters in the service request by a technical staff, such as user attributes, query types, page presentation modes and the like; a technician compiles the processes of acquiring data, assembling data and feeding back a request result according to the request parameter of the service request to obtain a request code corresponding to the service request; and the back-end server acquires data and assembles the data according to the request code, and then feeds back the request result to the front-end service.
However, in the above solution, the service request response source code needs to be compiled manually by a technician, which consumes much labor and is inefficient.
Disclosure of Invention
The embodiment of the invention aims to provide a source code generation method, a source code generation device and electronic equipment, so that labor consumption is reduced, and source code generation efficiency is improved. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for generating a code, where the method includes:
acquiring a protocol file to be processed, wherein the protocol file to be processed is a file generated according to response data of a service request and a response flow according to a preset protocol rule;
identifying first key characters in the protocol file to be processed, and determining a character string between two adjacent first key characters as a data object;
respectively identifying function name character strings in each data object and function value character strings corresponding to the function name character strings according to a predefined data format;
generating a syntax tree based on the nesting relation among the function name character strings in each data object;
and aiming at each data object in the syntax tree, combining the function name character strings and the function value character strings corresponding to the function name character strings based on the function form of the required calling function corresponding to the data object to obtain a source code for responding to the service request.
Optionally, the combining the function name character string included in the data object and the function value character string corresponding to the function name character string based on the function form of the function to be called corresponding to the data object includes:
for each function name character string included in the data object, if the function name character string is located in a first level node corresponding to the data object in the syntax tree, combining the identifier of the data object, the function name character string and a function value character string corresponding to the function name character string based on a function form of a required calling function corresponding to the data object;
and if the function name character string is positioned at other level nodes except the first level node corresponding to the data object in the grammar tree, combining the function name character string and the function value character string corresponding to the function name character string based on the function form of the required calling function corresponding to the data object.
Optionally, the preset protocol rule includes a data source module field protocol, a data assembly module field protocol, and a result output module field protocol;
the acquiring of the protocol file to be processed includes:
generating a preset file template according to the data source module field protocol, the data assembly module field protocol, the result output module field protocol and a response flow of the service request;
and acquiring parameter values of all parameters in the preset file template according to the preset file template to generate a protocol file to be processed.
Optionally, the parameter includes at least one of: the data acquisition mode, the data set name, the data address, the data format, the processing mode and the output format.
Optionally, after the first key character in the protocol file to be processed is identified and the character string between two adjacent first key characters is determined as a data object, the method further includes:
classifying the data objects according to the identifications of the data objects to obtain data objects of different classes, wherein the classes comprise a data source class, a data assembly class and a result output class;
the method for combining the function name character string and the function value character string corresponding to the data object based on the function form of the required calling function corresponding to the data object aiming at each data object in the syntax tree comprises the following steps:
for each data object in the syntax tree, determining the function form of a required calling function corresponding to the data object based on the category to which the data object belongs;
and combining the function name character string included in the data object and the function value character string corresponding to the function name character string based on the function form.
Optionally, the identifying the function name character string and the function value character string corresponding to the function name character string in each data object according to a predefined data format includes:
for each data object, identifying a second key character in the data object;
in the data object, a character string before the second key character is determined as a function name character string, and a character string after the second key character is determined as a function value character string.
In a second aspect, an embodiment of the present invention further provides an apparatus for generating a source code, where the apparatus includes:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a protocol file to be processed, and the protocol file to be processed is a file generated according to response data of a service request and a response flow according to a preset protocol rule;
the determining module is used for identifying first key characters in the protocol file to be processed and determining a character string between two adjacent first key characters as a data object;
the identification module is used for respectively identifying the function name character string in each data object and the function value character string corresponding to the function name character string according to a predefined data format;
the generating module is used for generating a grammar tree based on the nesting relation among the function name character strings in each data object;
and the combination module is used for combining the function name character strings and the function value character strings corresponding to the function name character strings based on the function form of the required calling function corresponding to each data object in the grammar tree to obtain the source code for responding to the service request.
Optionally, the combination module includes:
a first combining submodule, configured to, for each function name string included in the data object, combine, based on a function form of a function to be called corresponding to the data object, an identifier of the data object, the function name string, and a function value string corresponding to the function name string, if the function name string is located in a first hierarchical node in the syntax tree;
and the second combination submodule is used for combining the function name character string and the function value character string corresponding to the function name character string based on the function form of the required calling function corresponding to the data object if the function name character string is positioned at other level nodes except the first level node corresponding to the data object in the grammar tree.
Optionally, the preset protocol rule includes a data source module field protocol, a data assembly module field protocol, and a result output module field protocol;
the acquisition module includes:
the file template generating submodule is used for generating a preset file template according to the data source module field protocol, the data assembling module field protocol, the result output module field protocol and the response flow of the service request;
and the protocol file generation submodule is used for acquiring parameter values of all parameters in the preset file template according to the preset file template and generating a protocol file to be processed.
Optionally, the parameter includes at least one of: the data acquisition mode, the data set name, the data address, the data format, the processing mode and the output format.
Optionally, the apparatus further comprises:
the classification module is used for classifying the data objects according to the identification of the data objects after identifying the first key characters in the protocol file to be processed and determining the character strings between two adjacent first key characters as the data objects, so as to obtain the data objects of different categories, wherein the categories comprise a data source category, a data assembly category and a result output category;
the combination module comprises:
the function determining submodule is used for determining the function form of a required calling function corresponding to each data object in the syntax tree based on the category to which the data object belongs;
and the function combination sub-module is used for combining the function name character string included by the data object and the function value character string corresponding to the function name character string based on the function form.
Optionally, the identification module includes:
the identification submodule is used for identifying a second key character in each data object;
and the determining submodule is used for determining a character string before the second key character as a function name character string and determining a character string after the second key character as a function value character string in the data object.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor and a memory;
a memory for storing a computer program;
a processor, configured to implement the method for generating a source code according to the first aspect when executing a program stored in a memory.
By applying the scheme provided by the invention, the electronic equipment can acquire the protocol file to be processed, wherein the protocol file to be processed is a file generated according to the response data of the service request and the response flow according to the preset protocol rule; identifying first key characters in a protocol file to be processed, and determining a character string between two adjacent first key characters as a data object; respectively identifying function name character strings in each data object and function value character strings corresponding to the function name character strings according to a predefined data format; generating a syntax tree based on the nesting relation among function name character strings in each data object; and aiming at each data object in the syntax tree, combining the function name character strings included in the data object and the function value character strings corresponding to the function name character strings based on the function form of the required calling function corresponding to the data object to obtain a source code for responding to the service request.
Therefore, in the scheme, as the protocol rule is preset, the electronic device can identify the data object in the protocol file to be processed only by inputting the protocol file to be processed generated according to the protocol rule by a technician, and further generate the grammar tree, so that the function name character string included in the data object and the function value character string corresponding to the function name character string are combined to obtain the source code corresponding to the protocol file to be processed, namely the source code for responding to the service request, according to the function form of the function to be called based on the grammar tree, the source code of the service request does not need to be compiled manually by the technician, the labor consumption is reduced, and the generation efficiency of the source code is greatly improved. Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method for generating source code according to an embodiment of the present invention;
FIG. 2 is a diagram of a syntax tree based on the embodiment shown in FIG. 1;
FIG. 3 is a flowchart illustrating a specific step S101 in the embodiment shown in FIG. 1;
FIG. 4 is a flowchart illustrating a specific step S105 in the embodiment shown in FIG. 1;
FIG. 5 is a flowchart illustrating the embodiment of FIG. 1 in a specific manner of step S103;
FIG. 6 is a schematic diagram of an application manner based on the embodiment shown in FIG. 1;
fig. 7 is a schematic structural diagram of an apparatus for generating a source code according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to reduce labor consumption and improve source code generation efficiency, embodiments of the present invention provide a method and an apparatus for generating a source code, an electronic device, a computer-readable storage medium, and a computer program product. First, a method for generating a source code according to an embodiment of the present invention will be described in detail.
Fig. 1 is a flowchart of a method for generating a code according to an embodiment of the present invention, where the method includes:
s101: acquiring a protocol file to be processed;
and the protocol file to be processed is a file generated according to the response data of the service request and the response flow according to a preset protocol rule.
S102, identifying first key characters in the protocol file to be processed, and determining a character string between two adjacent first key characters as a data object;
s103, respectively identifying function name character strings in each data object and function value character strings corresponding to the function name character strings according to a predefined data format;
s104, generating a grammar tree based on the nesting relation among the function name character strings in each data object;
and S105, aiming at each data object in the syntax tree, combining the function name character strings included in the data object and the function value character strings corresponding to the function name character strings based on the function form of the required calling function corresponding to the data object to obtain a source code for responding to the service request.
Therefore, in the scheme provided by the embodiment of the invention, the electronic device can acquire the protocol file to be processed, wherein the protocol file to be processed is a file generated according to the response data of the service request and the response flow according to the preset protocol rule; identifying first key characters in a protocol file to be processed, and determining a character string between two adjacent first key characters as a data object; respectively identifying function name character strings in each data object and function value character strings corresponding to the function name character strings according to a predefined data format; generating a syntax tree based on the nesting relation among function name character strings in each data object; and aiming at each data object in the syntax tree, combining the function name character strings included in the data object and the function value character strings corresponding to the function name character strings based on the function form of the required calling function corresponding to the data object to obtain a source code for responding to the service request. Because the protocol rule is preset, the electronic equipment can identify the data object in the protocol file to be processed only by inputting the protocol file to be processed generated according to the protocol rule by a technician, and further generate the grammar tree, so that the function name character string included in the data object and the function value character string corresponding to the function name character string are combined to obtain the source code corresponding to the protocol file to be processed, namely the source code for responding to the service request, according to the function form of the function to be called based on the grammar tree, the source code of the service request does not need to be compiled manually by the technician, the labor consumption is reduced, and the generation efficiency of the source code is greatly improved.
When the source code of the service request needs to be generated, the electronic equipment can acquire the protocol file to be processed. The protocol file to be processed is the protocol file which needs to be processed so as to obtain the source code responding to the service request. A protocol file is understood to be a file that describes a service request in a standardized manner. In order to obtain the protocol file conveniently, a preset protocol rule may be predefined, so that the protocol file may be generated according to the preset protocol rule according to the response data required by the service request and the response flow of the service request.
Because the protocol file can represent information such as response data required by the service request, a response flow of the service request and the like, according to the protocol file, subsequent processing steps can be carried out to generate source codes which can be executed by a computer program for responding to the service request submitted by the front-end service.
After acquiring the protocol file to be processed, the electronic device may execute step S102, that is, identify the first key character in the protocol file to be processed, and determine the character string between two adjacent first key characters as the data object.
The first key character may be preset according to factors such as a format of the source code, a writing habit of the file, and the like, and is not specifically limited herein. For example, the first key character may be "[ ]", if the protocol file to be processed is: and if the protocol file to be processed contains three first key characters, a character string between two adjacent first key characters can be determined as a data object, namely, the id of the file _ Source _ id, the result of the { } and the type of the JSON are determined as the data object.
The number of the first key characters included in the protocol file to be processed may be 3, 4, 6, and so on, and the number of the first key characters included in the specific protocol file to be processed is not limited, and may be determined by specific response data of the service request and a response flow.
Next, the electronic device may respectively identify the function name string and the corresponding function value string in each data object according to the predefined data format, i.e. execute step S103. In order to facilitate the identification of the function name string and the function value string corresponding thereto, the data format may be predefined, for example: the function name character string and the function value character string corresponding to the function name character string are expressed by adopting a key value pair format, so that the electronic equipment can identify the key value pair in the data object, and further can determine the function name character string and the function value character string corresponding to the function name character string.
In one embodiment, the electronic device may further determine whether a string in the data object matches a pre-recorded function name identifier; determining a character string matched with a function name identifier recorded in advance as a function name character string; and determining a character string which is not matched with the function name identification recorded in advance as a function value character string.
For example, if the function name recorded in advance is identified by id (Identity document), param (parameter), url (address of the acquired data), url-method (manner of processing data), and timeout (acquisition timeout). If the data object is:
id:film_source_id
param:qid{%1}
url:http://test.host/getdataentity_id=$qid
timeout:-1
then, the character strings that match the prerecorded function name identifications are "id", "param", "url", and "timeout", and "id", "param", "url", and "timeout" may be determined as function name character strings, and "file _ source _ id", "qid {% 1 }", "http:// test. host/getatationalty _ id ═ qid", and "-1" may be determined as function value character strings. The pre-recorded function name identifier may be id, param, url-method, timeout, type, etc., and the specific pre-recorded function name identifier is not limited.
In the above step S104, the electronic device may generate a syntax tree based on the nested relationship between the function name character strings in each data object. In order to determine the nesting relationship between the function name character strings, the function name character strings may be set according to an existing function nesting relationship, that is, the function name character string in the protocol file may be a predefined function name character string. Thus, the electronic equipment can accurately determine the nesting relation among the function name character strings in each data object, and further generate the grammar tree based on the nesting relation.
The syntax tree may include a plurality of layers of nodes, and the inheritance relationship between the nodes may be determined by the nesting relationship, so that the structure of the syntax tree may characterize the nesting relationship between the data objects and the function name strings included in each data object.
For example, if the pending protocol file qysm includes a data object Source:
[Source]
id:film_source_id
param:qid{%1}
url:http://test.host/getdataentity_id=$qid
url-method:GET
timeout:-1
then, the nesting relationship between function name strings in the Source of the data object can be determined as follows: the id contained under the Source frame is file _ Source _ id, and param, url-method and timeout are contained under the file _ Source _ id. Nodes corresponding to the data object Source in the syntax tree can be generated according to the nesting relationship, and reference can be made to a schematic diagram of the syntax tree shown in fig. 2. In fig. 2, a root node of the syntax tree is a filename "qym" of the protocol file to be processed, a secondary root node in the syntax tree is an identifier "Source" of the data object, a first level node in the syntax tree is "file _ Source _ id", and a second level node in the syntax tree includes "url txt ═ http:// test.
Next, in step S105, for each data object in the syntax tree, the electronic device may combine the function name character string included in the data object and the function value character string corresponding to the function name character string based on the function form of the required call function corresponding to the data object, so as to obtain a source code for responding to the service request.
For example, for a data source data object, the corresponding required calling function is generally a data obtaining function, and for a result output data object, the corresponding required calling function is generally a data output function. Therefore, the electronic device can determine the function form of the corresponding function to be called for each data object in the syntax tree, and further combine the function name character string included in the data object and the function value character string corresponding to the function name character string, so as to obtain the source code for responding to the service request.
For example, taking the Source node in the syntax tree shown in fig. 2 as an example, if the id of the Source node is file _ Source _ id, then traversing the child nodes of the file _ Source _ id node can obtain the function name string and the function value string. And in each function name character string, identifying the parameter name and the parameter value in the param node, and if the parameter name of the param node is qid and the parameter value is% 1, indicating that the parameter is the 1 st parameter provided for the technician by the user.
Since the data object Source represents a data Source, the functional form of the corresponding required calling function can be determined to be a data acquisition functional form, for example, it can be func Source _ filesource id () obj _ object _ filemtvitem { }. Furthermore, based on the function form, each function name character string and the corresponding function value character string can be combined to obtain the corresponding source code:
Figure BDA0003175950730000101
because the protocol rule is preset, the electronic equipment can identify the data object in the protocol file to be processed only by inputting the protocol file to be processed generated according to the protocol rule by a technician, and further generate the grammar tree, so that the function name character string included in the data object and the function value character string corresponding to the function name character string are combined to obtain the source code corresponding to the protocol file to be processed, namely the source code for responding to the service request, according to the function form of the function to be called based on the grammar tree, the source code of the service request does not need to be compiled manually by the technician, the labor consumption is reduced, and the generation efficiency of the source code is greatly improved.
As an implementation manner of the embodiment of the present invention, the preset protocol rule may include a data source module field protocol, a data assembly module field protocol, and a result output module field protocol.
Because the response process to the service request mainly comprises three parts of data source acquisition, data assembly and result output, corresponding protocols, namely a data source module field protocol, a data assembly module field protocol and a result output module field protocol, can be preset for the three process parts respectively, so that a protocol file which can be identified by the electronic equipment can be conveniently generated.
The data source module field protocol may define a data set and a data acquisition mode. Such as definition id to represent data set name, definition param to represent parameters required when acquiring data set, definition type to represent manner of acquiring data set, definition url to represent data address, definition url-method to represent manner of processing data address, definition timeout to represent acquisition data timeout, etc. The manner of acquiring the data set may be REST (Representational State Transfer), RPC (Remote Procedure Call), plugin (acquiring from a custom function), and the specific manner of acquiring the data set is not limited.
The data assembly module field protocol can define the structure of the user data set, the relation between the data sets, the data calculation and the mode of calling the data source module field. For example, the definition of SetName { d1: s1, d2: s2, … } indicates a user data set, wherein SetName indicates the name of the user data set, d1 indicates a first parameter in the user data set, s1 indicates a parameter value corresponding to the first parameter, d2 indicates a second parameter in the user data set, and s2 indicates a parameter value corresponding to the second parameter; the representation of the reference relationship between the data sets is defined, for example, the parameter B1 in the data set B refers to the parameter value of the parameter a1 in the data set A, which can be represented as B { B1: A.a1, … }, and so on.
The result output module protocol can output the result in a format and in a manner of outputting the data set. Such as defining Output to represent Output data, format to represent format of Output data, data to represent Output data set, type to represent manner of outputting data set, etc. The format of the output data may be JSON (JavaScript Object Notation), MAP (mapping), PB (Protocol Buffer), and the like, and the specific format of the output data is not limited; the way of outputting the data set may be REDIS (Remote Dictionary service), MongoDB (Mongo Database), Plug-in, etc., and the specific way of outputting the data set is not limited.
Correspondingly, as shown in fig. 3, the step of acquiring the protocol file to be processed may include:
s301, generating a preset file template according to the data source module field protocol, the data assembly module field protocol, the result output module field protocol and the response flow of the service request;
s302, according to the preset template, obtaining parameter values of all parameters in the preset template, and generating a protocol file to be processed.
The preset template may include a plurality of parameters, and the parameters may be specifically determined according to the data source module field protocol, the data assembly module field protocol, the result output module field protocol, and the response flow of the service request. For example, any one or more of the following may be included: the data acquisition mode, the data set name, the data address, the data format, the processing mode, the output format, and the like, and the specific parameters are not limited.
The user or the technician can provide the parameter values of the parameters according to the preset template according to the specific requirements of the service request, so that the electronic equipment can obtain the parameter values of the parameters in the preset template according to the preset template, and further generate the protocol file to be processed.
For example, if the preset template includes a name of the data set, parameters required for acquiring the data set, a data address, a manner of processing the data address, a timeout of acquired data, an association relationship of data, an output format, and output data, the electronic device may acquire the name of the data set, the parameters required for acquiring the data set, the data address, the manner of processing the data address, the timeout of acquired data, the association relationship of data, the output format, and parameter values corresponding to the output data, and further generate the protocol file to be processed, which may be, for example:
Figure BDA0003175950730000121
Figure BDA0003175950730000131
wherein, Source represents a data Source module field, id represents a data set name, param represents parameters required for acquiring a data set, url represents a data address, url-method represents a mode for processing the data address, timeout represents the time-out of acquired data, Mapping represents a data assembly module field, result represents the association relationship of data, Output represents a result processing module field, type represents an Output format, and data represents Output data.
It can be seen that, in this embodiment, the preset protocol rule may include a data source module field protocol, a data assembly module field protocol, and a result output module field protocol, so that a data source and a data set may be defined, an association relationship between the data sets is described in a normative manner, a preset file template is generated according to the definition and the description content, and then parameter values of each parameter in the preset file template are obtained, a protocol file is generated, and the protocol file may perform standard description on a service request, that is, the service request is described by using the protocol file, so that a description of a service request by a technician is more standard, and a subsequent process of converting the protocol file into a source code is optimized.
As an implementation manner of the embodiment of the present invention, after the step of identifying the first key character in the protocol file to be processed and determining the character string between two adjacent first key characters as the data object, the method may further include:
and classifying the data objects according to the identifications of the data objects to obtain the data objects of different categories.
The categories may include a data source category, a data assembly category, and a result output category. This may facilitate distinguishing between different data objects. The data object of the data source type is the data object which accords with the field protocol of the data source module; the data object of the data assembly type is the data object which accords with the field protocol of the data assembly module; the data object of the result output type is the data object which accords with the field protocol of the output module.
In one embodiment, the category of the data object may be represented by an identifier of the data object, the data object of the data assembly category may be represented by Source, the data object of the data assembly category may be represented by Mapping, and the data object of the Output category may be represented by Output. For example, the identifier of the data object may be a string included in the first key character, for example, if the protocol file to be processed is:
[Source]
id:film_source_id
[Mapping]
result:{}
[Output]
type:JSON
then, the data objects in the protocol file to be processed can be divided into three categories, the first category is a data Source category marked as Source, the second category is a data assembly category marked as Mapping, the third category is a result Output category marked as Output, that is, the category of the data object "id: file _ Source _ id" is a data Source category, the category of the data object "result { }" is a data assembly category, and the category of the data object "type: JSON" is a result Output category.
Accordingly, as shown in fig. 4, the step of combining, for each data object in the syntax tree, the function name character string included in the data object and the function value character string corresponding to the function name character string based on the function form of the desired calling function corresponding to the data object may include:
s401, aiming at each data object in the syntax tree, determining the function form of the required calling function corresponding to the data object based on the category to which the data object belongs;
since the required call functions corresponding to different classes of data objects are different, for each data object in the syntax tree, the electronic device may determine the functional form of the required call function corresponding to the data object based on the class to which the data object belongs.
For example, the category is a data object of the data source category, and the function form of the corresponding function to be called is a function form of the data source obtaining function. The category is a data object of the data assembly category, and the function form of the corresponding required calling function is the function form of the data assembly function. The category is a data object of the result output category, and the function form of the corresponding function to be called is the function form of the result output function.
S402, combining the function name character string and the corresponding function value character string included in the data object based on the function form.
After determining the function form, the electronic device may combine the function name string included in the data object and the function value string corresponding to the function name string based on the function form. The specific combination has been described in the above embodiments, and is not described herein again.
As can be seen, in this embodiment, for each data object in the syntax tree, the electronic device may determine, based on the category to which the data object belongs, a function form of a function to be called corresponding to the data object, and further combine, based on the function form, a function name character string included in the data object and a function value character string corresponding to the function name character string. Therefore, the function form can be quickly and accurately determined according to the category of the data object, and an accurate source code is obtained.
As an implementation manner of the embodiment of the present invention, as shown in fig. 5, the step of respectively identifying the function name character string and the function value character string corresponding to the function name character string in each data object according to the predefined data format may include:
s501, aiming at each data object, identifying a second key character in the data object;
s502, in the data object, a character string before the second key character is determined as a function name character string, and a character string after the second key character is determined as a function value character string.
The predefined data format may specify a second key character, which in one embodiment may be ": ", that is, the specific structure of each data object may be a key-value pair structure. The field before the second key character is a key, namely a function name character string, and the field after the second key character is a value corresponding to the key, namely a function value character string corresponding to the function name character string. It is reasonable that a data object may include a field of one key-value pair structure and may also include a field of multiple key-value pair structures.
For example, if the data object is "id: file _ source _ id", then ": "previous" id "is determined as a function name string, and": "subsequent" file _ source _ id "is determined as a function value string corresponding to the function name string" id ".
In one case, the function value character string after the second key character may be stored in txt (text document) format, and this character string stored in txt format is determined as the function value, and then, when the function is assigned, the function may be directly assigned in txt format. The storage format may be txt, lst (manifest file), etc., and the specific storage format is not limited.
As can be seen, in this embodiment, for each data object, the electronic device may identify the second key character in the data object, and further determine a character string before the second key character as a function name character string, and determine a character string after the second key character as a function value character string, so that the function name character string and the function value character string in each data object may be quickly determined, and the source code generation efficiency is further improved.
As an implementation manner of the embodiment of the present invention, the step of combining the function name character string included in the data object and the function value character string corresponding to the function name character string based on the function form of the required call function corresponding to the data object may include:
for each function name character string included in the data object, if the function name character string is located in a first level node corresponding to the data object in a syntax tree, combining the identifier of the data object, the function name character string and a function value character string corresponding to the function name character string based on a function form of a required calling function corresponding to the data object; and if the function name character string is positioned at other level nodes except the first level node corresponding to the data object in the grammar tree, combining the function name character string and the function value character string corresponding to the function name character string based on the function form of the required calling function corresponding to the data object.
If the function name character string is located in the first level node corresponding to the data object in the syntax tree, the nested relation of the function name character string to the character string capable of covering other function name character strings in the data object is shown, and the range of the nested relation is the largest, then the identifier of the data object, the function name character string and the function value character string corresponding to the function name character string can be combined to obtain the corresponding source code.
If the function name character string is not located in the first level node corresponding to the data object in the syntax tree, that is, located in other level nodes corresponding to the data object except the first level node, it is described that the function name character string belongs to a character string which cannot cover other function name character strings in the data object in the nesting relation, and then the function name character string and the corresponding function value character string can be combined to obtain the corresponding source code.
For example, in the syntax tree, the function name string "file _ Source _ id" is located in the first level node of the data object identified as Source in the syntax tree, and the function value string corresponding to the function name string is determined to be param1 interface (the 1 st parameter provided by the user to the technician), then the electronic device may combine the identification of the data object, the determined function value string, and the function name string to obtain the Source code as follows:
func Source_filmSourceId(param1 interface)obj_object_filmTvItem{}
where object _ filemTvItem represents the object name of the result returned by the function.
The function name strings "url", "param", "url-method", and "timeout" are located at a second level node of the Source-identified data object of the data object in the syntax tree, and the electronic device may combine the function value strings with the corresponding function name strings to obtain a Source code corresponding to each function name string, which may be called a secondary function code, for example, the Source code shown as follows:
url:=http://test.host/getdataentity_id={%1}
qid:=param1.toString()
url=strings.replace(url,“$qid”,qid)
timeout:=-1
dataObject:=httpFetchWithTimeout(url,timeout)
return dataObject
then, the electronic device may generate a source code corresponding to the protocol file and used for responding to the service request according to the source code and the secondary function code corresponding to the first hierarchical node. For example, it may be:
Figure BDA0003175950730000171
in one embodiment, the code of the protocol file to be processed may comprise codes of different classes of data objects.
For example, if the data objects are classified according to the identifiers of the data objects to obtain different types of data objects, the codes of the protocol file to be processed may include codes of the different types of data objects. If the classification result is Source type, Mapping type and Output type, the codes of the protocol file to be processed may include codes of data objects of Source type, Mapping type and Output type.
In some schemes, the types of the codes are not distinguished, so that different tests need to be performed on the same code segment when the codes are subsequently tested, so that the testing process is complicated. By applying the embodiment, in the case of testing the codes subsequently, the distinguishing test can be performed according to the category corresponding to the codes, for example, the Source category codes can perform the data acquisition test, the Mapping category codes can perform the data assembly test, and the Output category codes can perform the Output test. The process of testing is simplified compared to not distinguishing between classes of code.
An application manner of the method provided by the embodiment of the present invention is described below with reference to fig. 6, where the data mapping file in fig. 6 is a protocol file to be processed, the code generation module may execute the source code generation step described in the above embodiment, and after the data mapping file is processed by the code generation module, the data mapping file may be converted into codes of different computer languages, such as a code of a Java language, a code of a js (javascript) language, a code of a Python language, a code of a Golang language, and the like, according to actual situations, and a specific computer language is not limited.
Specifically, the code generation module may read the data mapping file, the electronic device may identify a first key character "[ ] in the data mapping file, mark a character string between two adjacent" [ ] "as a data object, identify an identifier within [ ], as an identifier of the data object, and further classify the data object according to the identifier, thereby obtaining different types of data objects. Identifying the second key character in each data object ": ", will": "preceding string is labeled as Key (function name string), and": the character string after "is marked as Value (function Value character string), and Value can be stored as txt text.
Further, the electronic device can generate a syntax tree for the data mapping file based on the nested relationship between keys in each data object. For example, if the data object is divided into a Source class, a Mapping class, and an Output class according to the identifier of the data object, each node in the data object of each class may be sequentially traversed according to the class of the data object.
Taking traversal of Source nodes as an example, if id is file _ Source _ id, then child nodes of the file _ Source _ id node may be traversed, keys and values included in the child nodes are identified, param child nodes are identified in the child nodes, a parameter qid is identified in the child nodes, and a parameter Value of the parameter is% 1, which represents a first parameter sent by a front-end service. Then, according to the file _ source _ id, param and the object name of the function return result, generating a function code as follows: func Source _ fileSource id (param1 interface) obj _ object _ fileTvItem { }.
The electronic device may combine the traversed function value string with the function name string to obtain a corresponding source code. For example, a function value of a function name string of the file _ source _ id node may be initialized, such as a function value of initializing url, a function value of initializing timeout, and the like, a value of the parameter param1 may be formatted and assigned to qid, and then the qid value may be replaced into url to complete the assembly of url. And then when a result is fed back to the front-end service, calling a pseudo code httpjetchwithtimeout to obtain a return value of url, and feeding the result serving as a feedback result back to the front-end service. Similarly, the Mapping node can be traversed to generate the code func makerresult (param1 interface { }) object _ result; the Output node may be traversed to generate the code func MakeOutput (param1 interface { }), and so on.
By applying the scheme provided by the embodiment of the invention, as the protocol rule is preset, the electronic equipment can identify the data object in the protocol file to be processed only by inputting the protocol file to be processed generated according to the protocol rule by a technician, and further generate the grammar tree, so that the function name character string included in the data object and the function value character string corresponding to the function name character string are combined to obtain the source code corresponding to the protocol file to be processed according to the function form of the required call function based on the grammar tree, namely the source code for responding the service request, and the source code of the service request does not need to be manually compiled by the technician, thereby reducing the labor consumption and greatly improving the generation efficiency of the source code.
Corresponding to the above method embodiment, an embodiment of the present invention further provides an apparatus for generating a source code, as shown in fig. 7, where the apparatus includes:
an obtaining module 710, configured to obtain a protocol file to be processed;
and the protocol file to be processed is a file generated according to the response data of the service request and the response flow according to a preset protocol rule.
A determining module 720, configured to identify a first key character in the protocol file to be processed, and determine a character string between two adjacent first key characters as a data object;
the identification module 730 is configured to identify the function name character string and the function value character string corresponding to the function name character string in each data object according to a predefined data format;
a generating module 740, configured to generate a syntax tree based on a nested relationship between the function name strings in each data object;
and the combining module 750 is configured to, for each data object in the syntax tree, combine the function name character string included in the data object and the function value character string corresponding to the function name character string based on the function form of the function to be called corresponding to the data object, and obtain a source code for responding to the service request.
Therefore, in the scheme provided by the embodiment of the invention, the electronic device can acquire the protocol file to be processed, wherein the protocol file to be processed is a file generated according to the response data of the service request and the response flow according to the preset protocol rule; identifying first key characters in a protocol file to be processed, and determining a character string between two adjacent first key characters as a data object; respectively identifying function name character strings in each data object and function value character strings corresponding to the function name character strings according to a predefined data format; generating a syntax tree based on the nesting relation among function name character strings in each data object; and aiming at each data object in the syntax tree, combining the function name character strings included in the data object and the function value character strings corresponding to the function name character strings based on the function form of the required calling function corresponding to the data object to obtain a source code for responding to the service request. Because the protocol rule is preset, the electronic equipment can identify the data object in the protocol file to be processed only by inputting the protocol file to be processed generated according to the protocol rule by a technician, and further generate the grammar tree, so that the function name character string included in the data object and the function value character string corresponding to the function name character string are combined to obtain the source code corresponding to the protocol file to be processed, namely the source code for responding to the service request, according to the function form of the function to be called based on the grammar tree, the source code of the service request does not need to be compiled manually by the technician, the labor consumption is reduced, and the generation efficiency of the source code is greatly improved.
In one embodiment, the combination module 750 may include:
a first combining submodule, configured to, for each function name string included in the data object, combine, based on a function form of a function to be called corresponding to the data object, an identifier of the data object, the function name string, and a function value string corresponding to the function name string, if the function name string is located in a first hierarchical node in the syntax tree;
and the second combination submodule is used for combining the function name character string and the function value character string corresponding to the function name character string based on the function form of the required calling function corresponding to the data object if the function name character string is positioned at other level nodes except the first level node corresponding to the data object in the grammar tree.
In one embodiment, the predetermined protocol rule may include a data source module field protocol, a data assembly module field protocol, and a result output module field protocol;
the obtaining module 710 may include:
the file template generating submodule is used for generating a preset file template according to the data source module field protocol, the data assembling module field protocol, the result output module field protocol and the response flow of the service request;
and the protocol file generation submodule is used for acquiring parameter values of all parameters in the preset file template according to the preset file template and generating the protocol file to be processed.
In one embodiment, the parameter may include at least one of: the data acquisition mode, the data set name, the data address, the data format, the data number, the processing mode and the output format.
In one embodiment, the apparatus may further include:
the classification module is used for classifying the data objects according to the identification of the data objects after identifying the first key characters in the protocol file to be processed and determining the character strings between two adjacent first key characters as the data objects, so as to obtain different types of data objects;
wherein the categories include a data source category, a data assembly category, and a result output category.
The combination module 750 may include:
the function determining submodule is used for determining the function form of a required calling function corresponding to each data object in the syntax tree based on the category to which the data object belongs;
and the function combination sub-module is used for combining the function name character string included by the data object and the function value character string corresponding to the function name character string based on the function form.
In one embodiment, the identifying module 730 may include:
the identification submodule is used for identifying a second key character in each data object;
and the determining submodule is used for determining a character string before the second key character as a function name character string and determining a character string after the second key character as a function value character string in the data object.
An electronic device is also provided in the embodiments of the present invention, as shown in fig. 8, including a processor 801 and a memory 802,
a memory 802 for storing a computer program;
the processor 801 is configured to implement the method for generating a source code according to any of the embodiments described above when executing the program stored in the memory 802.
The Memory mentioned in the above electronic device may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method for generating source code according to any one of the above embodiments.
In another embodiment, the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the method for generating source code according to any one of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, apparatus embodiments, electronic device embodiments, computer-readable storage medium embodiments, and computer program product embodiments are described with relative simplicity as they are substantially similar to method embodiments, where relevant only as described in portions of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (13)

1. A method for generating source code, the method comprising:
acquiring a protocol file to be processed, wherein the protocol file to be processed is a file generated according to response data of a service request and a response flow according to a preset protocol rule;
identifying first key characters in the protocol file to be processed, and determining a character string between two adjacent first key characters as a data object;
respectively identifying function name character strings in each data object and function value character strings corresponding to the function name character strings according to a predefined data format;
generating a syntax tree based on the nesting relation among the function name character strings in each data object;
and aiming at each data object in the syntax tree, combining the function name character strings and the function value character strings corresponding to the function name character strings based on the function form of the required calling function corresponding to the data object to obtain a source code for responding to the service request.
2. The method according to claim 1, wherein the combining the function name string and the function value string corresponding to the function name string included in the data object based on the function form of the called-needed function corresponding to the data object comprises:
for each function name character string included in the data object, if the function name character string is located in a first level node corresponding to the data object in the syntax tree, combining the identifier of the data object, the function name character string and a function value character string corresponding to the function name character string based on a function form of a required calling function corresponding to the data object;
and if the function name character string is positioned at other level nodes except the first level node corresponding to the data object in the grammar tree, combining the function name character string and the function value character string corresponding to the function name character string based on the function form of the required calling function corresponding to the data object.
3. The method of claim 1, wherein the predetermined protocol rules include a data source module field protocol, a data assembly module field protocol, and a result output module field protocol;
the acquiring of the protocol file to be processed includes:
generating a preset file template according to the data source module field protocol, the data assembly module field protocol, the result output module field protocol and a response flow of the service request;
and acquiring parameter values of all parameters in the preset file template according to the preset file template to generate a protocol file to be processed.
4. The method of claim 3, wherein the parameters comprise at least one of: the data acquisition mode, the data set name, the data address, the data format, the processing mode and the output format.
5. The method according to claim 1, wherein after identifying the first key character in the protocol file to be processed and determining a character string between two adjacent first key characters as a data object, the method further comprises:
classifying the data objects according to the identifications of the data objects to obtain data objects of different classes, wherein the classes comprise a data source class, a data assembly class and a result output class;
the method for combining the function name character string and the function value character string corresponding to the data object based on the function form of the required calling function corresponding to the data object aiming at each data object in the syntax tree comprises the following steps:
for each data object in the syntax tree, determining the function form of a required calling function corresponding to the data object based on the category to which the data object belongs;
and combining the function name character string included in the data object and the function value character string corresponding to the function name character string based on the function form.
6. The method of any one of claims 1 to 5, wherein the separately identifying the function name string and its corresponding function value string in each data object according to a predefined data format comprises:
for each data object, identifying a second key character in the data object;
in the data object, a character string before the second key character is determined as a function name character string, and a character string after the second key character is determined as a function value character string.
7. An apparatus for generating a source code, the apparatus comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a protocol file to be processed, and the protocol file to be processed is a file generated according to response data of a service request and a response flow according to a preset protocol rule;
the determining module is used for identifying first key characters in the protocol file to be processed and determining a character string between two adjacent first key characters as a data object;
the identification module is used for respectively identifying the function name character string in each data object and the function value character string corresponding to the function name character string according to a predefined data format;
the generating module is used for generating a grammar tree based on the nesting relation among the function name character strings in each data object;
and the combination module is used for combining the function name character strings and the function value character strings corresponding to the function name character strings based on the function form of the required calling function corresponding to each data object in the grammar tree to obtain the source code for responding to the service request.
8. The apparatus of claim 7, wherein the combining module comprises:
a first combining submodule, configured to, for each function name string included in the data object, combine, based on a function form of a function to be called corresponding to the data object, an identifier of the data object, the function name string, and a function value string corresponding to the function name string, if the function name string is located in a first hierarchical node in the syntax tree;
and the second combination submodule is used for combining the function name character string and the function value character string corresponding to the function name character string based on the function form of the required calling function corresponding to the data object if the function name character string is positioned at other level nodes except the first level node corresponding to the data object in the grammar tree.
9. The apparatus of claim 7, wherein the predetermined protocol rules include a data source module field protocol, a data assembly module field protocol, and a result output module field protocol;
the acquisition module includes:
the file template generating submodule is used for generating a preset file template according to the data source module field protocol, the data assembling module field protocol, the result output module field protocol and the response flow of the service request;
and the protocol file generation submodule is used for acquiring parameter values of all parameters in the preset file template according to the preset file template and generating a protocol file to be processed.
10. The apparatus of claim 9, wherein the parameter comprises at least one of: the data acquisition mode, the data set name, the data address, the data format, the processing mode and the output format.
11. The apparatus of claim 7, further comprising:
the classification module is used for classifying the data objects according to the identification of the data objects after identifying the first key characters in the protocol file to be processed and determining the character strings between two adjacent first key characters as the data objects, so as to obtain the data objects of different categories, wherein the categories comprise a data source category, a data assembly category and a result output category;
the combination module comprises:
the function determining submodule is used for determining the function form of a required calling function corresponding to each data object in the syntax tree based on the category to which the data object belongs;
and the function combination sub-module is used for combining the function name character string included by the data object and the function value character string corresponding to the function name character string based on the function form.
12. The apparatus according to any one of claims 7-11, wherein the identification module comprises:
the identification submodule is used for identifying a second key character in each data object;
and the determining submodule is used for determining a character string before the second key character as a function name character string and determining a character string after the second key character as a function value character string in the data object.
13. An electronic device comprising a processor and a memory;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored in the memory.
CN202110832202.2A 2021-07-22 2021-07-22 Source code generation method and device and electronic equipment Active CN113535148B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110832202.2A CN113535148B (en) 2021-07-22 2021-07-22 Source code generation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110832202.2A CN113535148B (en) 2021-07-22 2021-07-22 Source code generation method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN113535148A true CN113535148A (en) 2021-10-22
CN113535148B CN113535148B (en) 2023-07-21

Family

ID=78120639

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110832202.2A Active CN113535148B (en) 2021-07-22 2021-07-22 Source code generation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113535148B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008134906A (en) * 2006-11-29 2008-06-12 Hitachi Ltd Business process definition generation method, device and program
US20120311546A1 (en) * 2011-05-31 2012-12-06 Microsoft Corporation Transforming dynamic source code based on semantic analysis
US20140215446A1 (en) * 2013-01-29 2014-07-31 ArtinSoft Corporation Automated Porting of Application to Mobile Infrastructures
US9424003B1 (en) * 2014-10-24 2016-08-23 Emc Corporation Schema-less system output object parser and code generator
US20180136912A1 (en) * 2016-11-17 2018-05-17 The Mathworks, Inc. Systems and methods for automatically generating code for deep learning systems
CN108664250A (en) * 2018-03-27 2018-10-16 北京奇艺世纪科技有限公司 A kind of code process method and device
CN110908640A (en) * 2019-11-26 2020-03-24 京东数字科技控股有限公司 Method for realizing service function and script engine
CN111045678A (en) * 2019-11-06 2020-04-21 北京奇艺世纪科技有限公司 Method, device and equipment for executing dynamic code on page and storage medium
US10782936B1 (en) * 2019-01-30 2020-09-22 Architecture Technology Corporation Programming migration system and methods
CN112667287A (en) * 2020-12-28 2021-04-16 深圳前海微众银行股份有限公司 Method, device and equipment for creating rule file and computer readable storage medium
CN113126990A (en) * 2021-04-22 2021-07-16 北京京东振世信息技术有限公司 Page development method, device, equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008134906A (en) * 2006-11-29 2008-06-12 Hitachi Ltd Business process definition generation method, device and program
US20120311546A1 (en) * 2011-05-31 2012-12-06 Microsoft Corporation Transforming dynamic source code based on semantic analysis
US20140215446A1 (en) * 2013-01-29 2014-07-31 ArtinSoft Corporation Automated Porting of Application to Mobile Infrastructures
US9424003B1 (en) * 2014-10-24 2016-08-23 Emc Corporation Schema-less system output object parser and code generator
US20180136912A1 (en) * 2016-11-17 2018-05-17 The Mathworks, Inc. Systems and methods for automatically generating code for deep learning systems
CN108664250A (en) * 2018-03-27 2018-10-16 北京奇艺世纪科技有限公司 A kind of code process method and device
US10782936B1 (en) * 2019-01-30 2020-09-22 Architecture Technology Corporation Programming migration system and methods
CN111045678A (en) * 2019-11-06 2020-04-21 北京奇艺世纪科技有限公司 Method, device and equipment for executing dynamic code on page and storage medium
CN110908640A (en) * 2019-11-26 2020-03-24 京东数字科技控股有限公司 Method for realizing service function and script engine
CN112667287A (en) * 2020-12-28 2021-04-16 深圳前海微众银行股份有限公司 Method, device and equipment for creating rule file and computer readable storage medium
CN113126990A (en) * 2021-04-22 2021-07-16 北京京东振世信息技术有限公司 Page development method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN113535148B (en) 2023-07-21

Similar Documents

Publication Publication Date Title
US11669503B2 (en) Building and managing data-processing attributes for modeled data sources
CN110287109B (en) Protocol interface testing method and device, computer equipment and storage medium thereof
US8527811B2 (en) Problem record signature generation, classification and search in problem determination
WO2020232882A1 (en) Named entity recognition method and apparatus, device, and computer readable storage medium
US20210279115A1 (en) Automated api code generation
CN109800258B (en) Data file deployment method, device, computer equipment and storage medium
CN110737689B (en) Data standard compliance detection method, device, system and storage medium
CN113238740B (en) Code generation method, code generation device, storage medium and electronic device
AU2019204444A1 (en) System and method for enrichment of ocr-extracted data
JP2020030818A (en) System and method for generating proposal based on request for proposal (rfp)
CN112541002A (en) Program language conversion method, device, electronic equipment and storage medium
CN113961768B (en) Sensitive word detection method and device, computer equipment and storage medium
CN111723192A (en) Code recommendation method and device
CN111507400A (en) Application classification method and device, electronic equipment and storage medium
CN113434542B (en) Data relationship identification method and device, electronic equipment and storage medium
CN112000690B (en) Method and device for analyzing structured operation statement
CN115357286B (en) Program file comparison method and device, electronic equipment and storage medium
CN113535148B (en) Source code generation method and device and electronic equipment
CN113688134B (en) Visual variable management method, system and equipment based on multidimensional data
CN112130860B (en) JSON object analysis method and device, electronic equipment and storage medium
US20220351088A1 (en) Machine learning model-agnostic confidence calibration system and method
CN113050987A (en) Interface document generation method and device, storage medium and electronic equipment
US11068376B2 (en) Analytics engine selection management
CN111400623A (en) Method and apparatus for searching information
CN117171800B (en) Sensitive data identification method and device based on zero trust protection system

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
GR01 Patent grant
GR01 Patent grant