Movatterモバイル変換


[0]ホーム

URL:


CN113791779B - Data processing method, device and system - Google Patents

Data processing method, device and system
Download PDF

Info

Publication number
CN113791779B
CN113791779BCN202110950286.XACN202110950286ACN113791779BCN 113791779 BCN113791779 BCN 113791779BCN 202110950286 ACN202110950286 ACN 202110950286ACN 113791779 BCN113791779 BCN 113791779B
Authority
CN
China
Prior art keywords
data
fair
target
dsl
component
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.)
Active
Application number
CN202110950286.XA
Other languages
Chinese (zh)
Other versions
CN113791779A (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.)
Wuba Co Ltd
Original Assignee
Wuba 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 Wuba Co LtdfiledCriticalWuba Co Ltd
Priority to CN202110950286.XApriorityCriticalpatent/CN113791779B/en
Publication of CN113791779ApublicationCriticalpatent/CN113791779A/en
Application grantedgrantedCritical
Publication of CN113791779BpublicationCriticalpatent/CN113791779B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The application provides a data processing method, device and system, and relates to the technical field of computers. The method comprises the steps of converting Flutter source code data corresponding to an interface to be generated into initial FairDSL data through Fair, wherein Flutter source code data comprises Flutter source code data corresponding to a target component in the interface to be generated, and writing Flutter source code data of a specific method function. Component FairDSL data corresponding to the target component, and interface FairDSL data corresponding to the particular method function are extracted from the initial FairDSL data. Adding component FairDSL data corresponding to the target component into the interface FairDSL data to generate target FairDSL data, and analyzing the target FairDSL data by the client to generate an interface. The application reduces the code complexity in the specific method function.

Description

Data processing method, device and system
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method, apparatus, and system.
Background
Flutter is a Google (Google) open source mobile User Interface (UI) framework. It can support rapid construction of high quality native UI interfaces on various types of systems such as ios and Android (Android). However Flutter does not support dynamization, i.e., UI interfaces built using Flutter cannot be changed once published. Thus, fair has grown, which is an open source framework for UI and logic dynamics designed for Flutter, to enable dynamic updating of UI interfaces built based on Flutter framework. Wherein, the developer can use Flutter to write the description information and/or logic information of the components in the interface to be updated. The electronic device converts the Flutter written source code data into Fair domain-specific language (DSL) by Fair. The client parses the Fair DSL to generate a new UI interface.
However, if the Fair DSL generated by Fair can generate a complete interface after analysis, it needs to be ensured that all codes are written into the same specific method function (compiling build method function) when Flutter is adopted for writing. This makes the code in the specific method function complex, resulting in poor code readability and high maintenance costs in the specific method function.
Disclosure of Invention
In view of this, the present application provides a data processing method, apparatus and system, which reduce the complexity of codes in specific method functions to a certain extent, improve the readability of codes in specific method functions, and reduce the maintenance cost of codes.
According to a first aspect of the present application there is provided a data processing method, the method comprising:
Converting Flutter source code data corresponding to an interface to be generated into DSL data of specific language in the initial Fair field through Fair, wherein the Flutter source code data comprises first source code data and second source code data, the first source code data is Flutter source code data corresponding to a target component in the interface to be generated, the second source code data is Flutter source code data written into a specific method function, and the second source code data comprises calling sentences for the first source code data;
Extracting component Fair DSL data corresponding to the target component from the initial Fair DSL data, and interface Fair domain specific language DSL data corresponding to the specific method function, wherein the interface Fair DSL data comprises a target component identifier corresponding to the target component in the interface to be generated;
adding component Fair DSL data corresponding to the target component into the interface Fair DSL data to generate target Fair DSL data;
and sending the target Fair DSL data to a client so that the client analyzes the target Fair DSL data and generates an interface.
According to a second aspect of the present application, there is provided a data processing method, the method comprising:
receiving target Fair DSL data of an interface to be generated, which is sent by a server, wherein the target Fair DSL data is generated by the server by adopting the data processing method in the first aspect;
And analyzing the target Fair DSL data to generate an interface.
According to a third aspect of the present application, there is provided a data processing apparatus, the apparatus comprising:
The generating module is used for converting Flutter source code data corresponding to an interface to be generated into DSL data of specific language in the initial Fair field through Fair, wherein the Flutter source code data comprises first source code data and second source code data, the first source code data is Flutter source code data corresponding to a target component in the interface to be generated, the second source code data is Flutter source code data written into a specific method function, and the second source code data comprises a call statement for the first source code data;
The extracting module is used for extracting component Fair DSL data corresponding to the target component from the initial Fair DSL data and interface Fair DSL data corresponding to the specific method function, wherein the interface Fair DSL data comprises a target component identifier corresponding to the target component;
an adding module, configured to add component fairdsl data corresponding to the target component to the interface fairdsl data, to generate target fairdsl data;
and the sending module is used for sending the target Fair DSL data to a client so that the client analyzes the target Fair DSL data and generates an interface.
According to a fourth aspect of the present application, there is provided a data processing apparatus, the apparatus comprising:
The receiving module is used for receiving target Fair DSL data of an interface to be generated, which is sent by a server, wherein the target Fair DSL data is generated by the server by adopting the data processing method according to any one of claims 1 to 6;
and the analyzing module is used for analyzing the target Fair DSL data to generate an interface.
In a fifth aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the data processing method according to any of the first or second aspects.
In a sixth aspect, the application provides an electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the data processing method according to either the first or second aspect when the program is executed.
Aiming at the prior art, the application has the following advantages:
According to the data processing method provided by the embodiment of the application, flutter source code data corresponding to the interface to be generated are converted into DSL data of specific language in the initial Fair field through Fair. Component Fair DSL data corresponding to the target component and interface Fair DSL data corresponding to the specific method function are extracted from the initial Fair DSL data. And adding the component Fair DSL data corresponding to the target component into the interface Fair DSL data to generate target Fair DSL data. And sending the target Fair DSL data to the client, so that the client analyzes the target Fair DSL data and generates an interface. In the technical scheme, flutter source code data comprise first source code data and second source code data. The first source code data is Flutter source code data corresponding to a target component in the interface to be generated. The second source code data is Flutter source code data written into a specific method function, and the second source code data comprises a call statement for the first source code data. By calling the component Fair DSL data corresponding to the target component in the interface Fair DSL data, the complete interface can be generated by Fair based on Flutter source code data corresponding to the target component which is independently packaged and Flutter source code data of a specific method function. Compared with the technology, all Flutter source code data corresponding to all interfaces to be generated, including all components of the interfaces, are not required to be written into the specific method function, so that the complexity of codes in the specific method function is reduced, the readability of the codes in the specific method function is improved, and the maintenance cost is reduced.
Drawings
FIG. 1 is a schematic diagram of a data processing system according to an embodiment of the present application;
FIG. 2 is a flow chart of a data processing method according to an embodiment of the present application;
FIG. 3 is a flowchart of a data generation method according to an embodiment of the present application;
fig. 4 is a flowchart of a method dictionary and a DSL dictionary generating method provided in an embodiment of the present application;
FIG. 5 is a flow chart of another data processing method according to an embodiment of the present application;
fig. 6 is a flowchart of a target fairdsl data parsing method according to an embodiment of the present application;
FIG. 7 is a block diagram of a data processing apparatus provided by an embodiment of the present application;
FIG. 8 is a block diagram of a data processing apparatus provided by an embodiment of the present application;
fig. 9 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to FIG. 1, a data processing system is shown according to an embodiment of the present application. As shown in FIG. 1, the data processing system includes a client 101 and a server 102. The client 101 and the server 102 are connected through a wired network or a wireless network. It should be noted that, the implementation environment may include one or more clients, and fig. 1 illustrates that the implementation environment includes only one client.
The server 102 may be configured to generate target Fair DSL data of the interface to be generated. The generated target fairdsl data is transmitted to the client 101. The target Fair DSL data may be a structure description file corresponding to the interface to be generated. The client 101 may receive target fairdsl data sent by the server 102. The target Fair DSL data is parsed to generate an interface, i.e., the generated interface is displayed at the client. Alternatively, the client 101 may store the target FairDSL data of the interface to be generated after receiving the target fairdsl data sent by the server 102. And responding to an interface display instruction triggered by a user, acquiring stored target Fair DSL data, and displaying an interface. Or the client 101 may generate an interface display request in response to a trigger display operation of the user for a page to be generated. And sending the interface display request to the server to receive target Fair DSL data corresponding to the interface to be generated, which is sent by the server in response to the interface display request, so as to display the interface. Alternatively, the client 101 may be installed at a terminal. The terminal can be a mobile phone, a tablet computer or wearable equipment, etc. The server 102 may be one server, or may be a service cluster formed by a plurality of servers.
Referring to fig. 2, a flowchart of a data processing method according to an embodiment of the application is shown. The data processing method may be applied to the data processing system shown in fig. 1, and executed by a server in the data processing system shown in fig. 1. As shown in fig. 2, the data processing method may include:
Step 201, converting Flutter source code data corresponding to an interface to be generated into initial FairDSL data through Fair. The Flutter source code data comprise first source code data and second source code data, wherein the first source code data are Flutter source code data corresponding to a target component in an interface to be generated, the second source code data are Flutter source code data written into a specific method function, and the second source code data comprise calling sentences for the first source code data.
In the embodiment of the application, the server adopts Flutter and Fair to write the interface to be generated, and compiles the interface by utilizing a Flutter compiler to obtain initial Fair DSL data. The interface to be generated is Flutter interface, namely UI interface constructed by Flutter. The data structure of Flutter interfaces is a component (Widget) tree structure, i.e., a tree data structure composed of a plurality of components. The basic building element of Flutter interfaces is widgets, each of which may also include one or more widgets. And obtaining the Widget tree forming the interface through layer-by-layer wrapping of the Widget.
Wherein the interface may include a plurality of UI components. There is a class of widgets that can be used to encapsulate UI components. The component FairDSL data corresponding to the widgets can be used for describing the structure of the UI component, so that after the component FairDSL data is parsed, the UI component can be drawn. Alternatively, the target component (target Widget) may refer to an independent component for packaging the UI component. The Flutter source code data corresponding to the independent component is not written into the specific method function.
In the embodiment of the application, the server side can convert Flutter source code data corresponding to the interface to be generated into initial Fair DSL data through the Fair by utilizing Flutter compiler. In the process of converting the second source code data written into the specific method function, the first source code data is called through a calling statement aiming at the first source code data so as to convert the first source code data. And the Flutter source code data corresponding to the interface to be generated are converted into initial Fair DSL data.
Step 202, extracting component Fair DSL data corresponding to the target component from the initial Fair DSL data, and interface Fair DSL data corresponding to the specific method function, wherein the interface Fair DSL data comprises a target component identifier corresponding to the target component.
In an alternative implementation, as shown in fig. 3, the process of extracting, by the server, component fairdsl data corresponding to the target component and interface fairdsl data corresponding to the specific method function from the initial fairdsl data may include:
step 301, the server converts the initial Fair DSL data into abstract syntax tree data.
In the embodiment of the application, the server side can perform abstract syntax tree (Abstract Syntax Tree, AST) analysis on the initial Fair DSL data to obtain AST data corresponding to the initial Fair DSL data. AST is an abstract representation of the syntax structure of source code data (also known as source code). It represents the syntax structure of the programming language in the form of a tree, each node on the tree representing a structure in the source code data.
Step 302, the server side extracts the component data corresponding to the target component under the component label node in the AST, and generates component Fair DSL data corresponding to the target component identifier based on the component data.
In the embodiment of the application, the component tag node refers to a node for indicating a Flutter source code data corresponding structure for describing a target component. The server side can traverse all nodes in AST data, and the component data corresponding to the target component under the component label node is obtained through screening. In an alternative implementation, where the target component is used to encapsulate an independent component of the UI component, the component tag node refers to a node that is used to indicate an independent Flutter source code data structure.
Alternatively, in the case where the object of the target component is a function, i.e., the target component is an encapsulation function. The component identifier corresponding to the target component may be a function name (className). The component tag nodes may include nodes with a node type of function declaration (FunctionDeclaration) and/or nodes with a node type of method declaration (MethodDeclaration). For ease of illustration, function declaration nodes are employed to indicate that the node type is a function declaration node. The method declaration node is adopted to indicate that the node type is the node of the method declaration. The component tag node includes a function declaration node and/or a method declaration node. It should be noted that, in the case where the component tag node is of the method declaration type, the component identifier of the target component does not include a function name of a specific method function (build method function).
The process of extracting the component data corresponding to the target component under the component tag node in the AST by the server side may include extracting the component data (function data) corresponding to each function name under the function declaration node in the AST by the server side, and extracting the component data (function data) corresponding to each function name except the function name of the specific method function in each function under the method declaration node.
In the embodiment of the application, the server side adopts the standard format of the component FairDSL to convert the component data corresponding to the target component into the component FairDSL data. Alternatively, the data format of the component Fair DSL data may be JSON. For example, the component FairDSL standard format may be:
"{" className ":" target component identification ",
"Na": { component data } "and"
If the component data indicates that the target component indicated by the target component identifier has a sub-component (i.e. a nested dynamic component), the component fairdsl standard format may be:
In step 303, the server extracts the target data except the component data corresponding to the target component in the AST, and generates the interface Fair DSL data based on the target data.
In the embodiment of the application, the server can traverse each node in AST data, and screen and obtain the target data except the component data corresponding to the target component under each node. And the server side converts the target data into interface FairDSL data by adopting an interface Fair DSL standard format. The interface Fair DSL standard format can be set based on actual service requirements.
For example, as shown in fig. 4, the server generates initial fairdsl data, and traverses each node in AST data corresponding to the initial fairdsl data. For any node, the server side judges whether the node is a function declaration node. If the node is a function declaration node (FunctionDeclaration), extracting each function name and component data corresponding to the function name under the function declaration node, and generating component Fair DSL data corresponding to each function name. If the node is not a function declaration node, it is determined whether the node is a method declaration node (MethodDeclaration). If the node is not the method statement node, extracting target data under the node, and generating interface FairDSL data. If the node is a method declaration node, judging whether the function name corresponding to the component data is a specific function name (build) of a specific method function or not according to the component data under the method declaration node, namely judging whether the function corresponding to the component data is a specific method function or not. And if the function name is not the specific function name, extracting the function name and the component data corresponding to the function name, and generating the component Fair DSL data corresponding to the function name. And if the function name is a specific function name, extracting target data corresponding to the specific function name, and generating interface Fair DSL data. The function names and corresponding component Fair DSL data are written into a method dictionary (methodMap), and interface Fair DSL data are written into a DSL dictionary (Map).
In another alternative implementation, component Fair DSL data corresponding to the target component, and interface Fair DSL data corresponding to the specific method function may be manually extracted from the initial Fair DSL data.
And 203, adding component Fair DSL data corresponding to the target component to the interface Fair DSL data to generate target Fair DSL data.
Optionally, the server adds the component Fair DSL data corresponding to the target component to the interface Fair DSL data, and various implementation manners for generating the target Fair DSL data are provided.
In a first alternative implementation, the process of adding, by the server, component fairdsl data corresponding to the target component to the interface FairDSL data may include adding, by the server, first mapping data to the interface fairdsl data, to obtain target FairDSL data. The first mapping data includes a target component identification and associated stored component Fair DSL data corresponding to the target component.
The server may obtain, based on the target component identifier, component fairdsl data stored in association with the target component identifier from the stored component fairdsl data, and generate first mapping data. Alternatively, the data format of the first mapping data may be a dictionary format. The first mapping data may be referred to as a method dictionary (methodMap). The first mapping data includes a first key-value pair, a key field of the first key-value pair is used for storing a target component identifier, and a value field is used for storing corresponding component Fair DSL data.
In a second alternative implementation, the process of adding the component FairDSL data corresponding to the target component to the interface FairDSL data by the server may include generating second mapping data. The second mapping data includes method dictionary identifications and associated stored first mapping data. And adding second mapping data to the interface Fair DSL data to obtain target Fair DSL data. Wherein the method dictionary identification is used to indicate component FairDSL data support calls in the first mapping data.
The server may generate the second mapping data after generating the first mapping data. The generation of the first mapping data may refer to the generation of the first mapping data in the aforementioned second alternative implementation manner. The embodiments of the present application will not be described in detail again. Alternatively, the data format of the second mapping data may be a dictionary format. The second mapping data includes a second key-value pair, a key field of the second key-value pair is used for storing a method dictionary identification, and a value field is used for storing corresponding first mapping data.
In a third alternative implementation manner, the process of adding, by the server, component fairdsl data corresponding to the target component to the interface FairDSL data may include directly adding, by the server, component fairdsl data corresponding to the target component to the interface fairdsl data, to obtain the target fairdsl data.
The server may extract, from the stored component Fair DSL data, component Fair DSL data stored in association with the target component identifier based on the target component identifier. And adding the component Fair DSL data to the interface Fair DSL data to obtain target Fair DSL data. The target Fair DSL data is used for completely describing the structure corresponding to the interface to be generated. It should be noted that, after adding the component fairdsl data to the interface fairdsl data, the server may delete the target component identifier originally included from the interface fairdsl data. In this way, when the target FairDSL data is analyzed later, the repeated analysis and generation of the component Fair DSL data caused under the condition that the target Fair DSL data comprises the component Fair DSL data corresponding to the target component and the target component identifier are avoided. And the interface generation accuracy is ensured.
And 204, sending target Fair DSL data to the client so that the client analyzes the target Fair DSL data and generates an interface.
In the embodiment of the application, the server side can package the target Fair DSL data into the DSL dictionary (DSLMap), and send the DSL dictionary comprising the target Fair DSL data to the client side at a set time. After receiving the DSL dictionary, the client analyzes the DSL dictionary to obtain target Fair DSL data. And analyzing the target Fair DSL data to generate an interface. The setting time may be an interface update time triggered by the developer. For example, for an interface of an application, the update timing of the interface is the version update timing of the application. The server may add the target FairDSL data to the installation package corresponding to the application, and send the installation package to the client. When the client receives trigger display operation of a user for an interface to be generated, target Fair DSL data are obtained, and the target Fair DSL data are analyzed to generate the interface. Or the set opportunity may be a reception opportunity for the server to receive an interface display request for an interface to be generated. That is, the server may send the target Fair DSL data to the client after receiving the interface display request for the interface to be generated sent by the client.
In summary, in the data processing method provided by the embodiment of the present application, the Flutter source code data corresponding to the interface to be generated is converted into the DSL data of the specific language in the initial Fair domain by Fair. Component Fair DSL data corresponding to the target component and interface Fair DSL data corresponding to the specific method function are extracted from the initial Fair DSL data. And adding the component Fair DSL data corresponding to the target component into the interface Fair DSL data to generate target Fair DSL data. And sending the target Fair DSL data to the client, so that the client analyzes the target Fair DSL data and generates an interface. In the technical scheme, flutter source code data comprise first source code data and second source code data. The first source code data is Flutter source code data corresponding to a target component in the interface to be generated. The second source code data is Flutter source code data written into a specific method function, and the second source code data comprises a call statement for the first source code data. By calling the component Fair DSL data corresponding to the target component in the interface Fair DSL data, the complete interface can be generated by Fair based on Flutter source code data corresponding to the target component which is independently packaged and Flutter source code data of a specific method function. Compared with the technology, all Flutter source code data corresponding to all interfaces to be generated, including all components of the interfaces, are not required to be written into the specific method function, so that the complexity of codes in the specific method function is reduced, the readability of the codes in the specific method function is improved, and the maintenance cost is reduced.
And since it is not necessary to write all code to the same specific method function. Therefore, flutter source code data corresponding to different components in the interface can be developed by different personnel. And finally, the code is modularly developed by calling the interface Fair DSL data, so that the design thought of a developer is more met, the interface design experience of the developer is improved, and the development efficiency is improved.
Referring to fig. 5, a flowchart of another data processing method according to an embodiment of the application is shown. The data processing method may be applied to the data processing system shown in fig. 1, and executed by a client in the data processing system. As shown in fig. 5, the method includes:
Step 501, receiving target Fair DSL data of an interface to be generated, which is sent by a server.
In the embodiment of the application, the target FairDSL data is generated by the server side by adopting the data processing method provided by the embodiment of the application. The server may encapsulate the target Fair DSL data into a DSL dictionary (DSLMap) and send the DSL dictionary including the target Fair DSL data to the client at a set time. After receiving the DSL dictionary, the client analyzes the DSL dictionary to obtain target Fair DSL data. And analyzing the target Fair DSL data to generate an interface. The setting time may be an interface update time triggered by the developer. For example, for an interface of an application, the update timing of the interface is the version update timing of the application. The server may add the target FairDSL data to the installation package corresponding to the application, and send the installation package to the client. When the client receives trigger display operation of a user for an interface to be generated, target Fair DSL data are obtained, and the target Fair DSL data are analyzed to generate the interface. Or the set opportunity may be a reception opportunity for the server to receive an interface display request for an interface to be generated. That is, the server may send the target Fair DSL data to the client after receiving the interface display request for the interface to be generated sent by the client.
Step 502, parsing the target Fair DSL data to generate an interface.
In the embodiment of the application, the client can respond to the trigger display operation of the user for the interface to be generated to acquire the target Fair DSL data sent by the server end received by the client. The target Fair DSL data is parsed to generate an interface. The generating modes of the target Fair DSL data are different, and the corresponding analyzing modes of the target Fair DSL data are also different. The embodiment of the application respectively describes the corresponding target Fair DSL data analysis modes under the three target Fair DSL data generation implementation modes.
A first alternative implementation. As shown in fig. 6, the target fairdsl data includes first mapping data. The process of the client parsing the target Fair DSL data to generate an interface may include:
in step 601, the client extracts first mapping data from the target Fair DSL data, and deletes the first mapping data from the target Fair DSL data to obtain interface Fair DSL data. The interface Fair DSL data comprises a target component identifier corresponding to the target component in the interface to be generated.
Alternatively, the first mapping data may be added to the set location when added to the interface Fair DSL data. For example, the first or last bit. The client may extract the first mapping data from the set location in the target fairdsl data and delete the first mapping data from the target fairdsl data to obtain the interface fairdsl data. To avoid repeated parsing of the target fairdsl data corresponding to the target component.
For example, the client stores a loader (loader. Dart), a decoder (decoder. Dart), and a runner (loader. Dart). The client receives the DSL dictionary including the target Fair DSL data sent by the server. The DSL dictionary may be loaded by a loader driver. And transmits the loaded DSL dictionary to a decoder. The decoder extracts a method dictionary (first mapping data) from the DSL dictionary and deletes the method dictionary from the DSL dictionary. And transmitting the extracted method dictionary and DSL fields after deleting the method dictionary to a runner. The operator decodes the DSL dictionary and recursively and line by line obtains interface Fair DSL data.
Step 602, the client parses the interface Fair DSL data.
In the embodiment of the application, the interface Fair DSL data can be invoked line by line through a runtime mechanism of Flutter coding language Dart so as to analyze the interface Fair DSL data.
Wherein the interface Fair DSL data includes a target component identification of the target component. When the interface Fair DSL data is invoked line by line, whether the invoking object exists in the first mapping data or not can be judged, namely whether the invoking object is a target component identifier or not is judged.
If so, it is indicated that the interface Fair DSL data does not include the specific Fair DSL data that needs to be invoked. The specific Fair DSL data is component Fair DSL data corresponding to the target component identification in the first mapping data. If not, the interface Fair DSL data includes the specific Fair DSL data to be invoked. And continuing to call the interface Fair DSL data line by line.
Optionally, in the case that the object of the target component is a function, the client may determine whether the called function name exists in a key field of each key-value pair included in the first mapping data. If yes, go to step 603, if not, continue to call the interface Fair DSL data line by line. In an alternative implementation, the client may call the interface Fair DSL data line by line using a function.
In step 603, when the parsed component identifier exists in the first mapping data, the client extracts component fairdsl data corresponding to the component identifier from the first mapping data, and parses the component FairDSL data corresponding to the component identifier.
In the embodiment of the application, the client can call the target Fair DSL data corresponding to the target component extracted from the first mapping data line by line.
In step 604, the client uses Flutter an engine to draw an interface based on the interface FairDSL data and the analysis result of the component Fair DSL data corresponding to the component identifier in the first mapping data.
In the embodiment of the application, the client draws the interface by adopting Flutter engine based on the interface Fair DSL data and the calling result of the component Fair DSL data corresponding to the component identification in the first mapping data. Thereby completing the parsing of the DSL dictionary including the method dictionary to the rendering.
A second alternative implementation. The target FairDSL data includes second mapping data. The process by which the client parses the target Fair DSL data to generate the interface is substantially the same as in the first alternative implementation. The difference is that the process of extracting the first mapping data from the target FairDSL data by the client in step 601 includes extracting the corresponding first mapping data from the target fairdsl data based on the method dictionary identification in the second mapping data. In this way, the method dictionary identification and the first mapping data are mapped to the target Fair DSL data, so that the client side can conveniently extract the first mapping data from the target Fair DSL data based on the method dictionary identification, and the data extraction efficiency is improved.
In a third alternative implementation, the client may directly parse the target Fair DSL data to generate the interface. The process of parsing the target FairDSL data may refer to the aforementioned step 602, which is not described in detail in the embodiment of the present application.
In summary, according to the data processing method provided by the embodiment of the present application, the target fairdsl data of the interface to be generated, which is sent by the server side, is obtained by parsing, so as to generate the interface. The server side converts Flutter source code data corresponding to the interface to be generated into DSL data of specific language in the initial Fair field through Fair. Component Fair DSL data corresponding to the target component and interface Fair DSL data corresponding to the specific method function are extracted from the initial FairDSL data. And adding the component Fair DSL data corresponding to the target component into the interface Fair DSL data to generate target Fair DSL data. In the technical scheme, flutter source code data comprise first source code data and second source code data. The first source code data is Flutter source code data corresponding to a target component in the interface to be generated. The second source code data is Flutter source code data written into a specific method function, and the second source code data comprises a call statement for the first source code data. By calling the component Fair DSL data corresponding to the target component in the interface Fair DSL data, the complete interface can be generated by Fair based on Flutter source code data corresponding to the target component which is independently packaged and Flutter source code data of a specific method function. Compared with the technology, all Flutter source code data corresponding to all interfaces to be generated, including all components of the interfaces, are not required to be written into the specific method function, so that the complexity of codes in the specific method function is reduced, the readability of the codes in the specific method function is improved, and the maintenance cost is reduced.
The data processing method according to the embodiment of the present application may be applied to the data processing system shown in fig. 1. The method comprises the following steps:
In step 701, the server converts Flutter source code data corresponding to the interface to be generated into DSL data of the specific language in the initial Fair field through Fair. The Flutter source code data comprise first source code data and second source code data, wherein the first source code data are Flutter source code data corresponding to a target component in an interface to be generated, the second source code data are Flutter source code data written into a specific method function, and the second source code data comprise calling sentences for the first source code data.
In step 702, the server side extracts component fairdsl data corresponding to the target component and interface fairdsl data corresponding to the specific method function from the initial fairdsl data. The interface Fair DSL data includes a target component identifier corresponding to the target component.
In step 703, the server adds component fairdsl data corresponding to the target component to the interface fairdsl data, so as to generate target fairdsl data.
In step 704, the server sends the target Fair DSL data to the client.
The explanation and implementation of steps 701 to 704 may refer to the explanation and implementation of steps 201 to 204 in sequence, which is not repeated in the embodiment of the present invention.
Step 705, the client parses the target Fair DSL data to generate an interface.
The explanation and implementation of step 705 may refer to the explanation and implementation of step 502, which is not described in detail in the embodiments of the present invention.
In summary, in the data processing method provided by the embodiment of the present application, the Flutter source code data corresponding to the interface to be generated is converted into the DSL data of the specific language in the initial Fair domain by Fair. Component Fair DSL data corresponding to the target component and interface Fair DSL data corresponding to the specific method function are extracted from the initial Fair DSL data. And adding the component Fair DSL data corresponding to the target component into the interface Fair DSL data to generate target Fair DSL data. And sending the target Fair DSL data to the client, so that the client analyzes the target Fair DSL data and generates an interface. In the technical scheme, flutter source code data comprise first source code data and second source code data. The first source code data is Flutter source code data corresponding to a target component in the interface to be generated. The second source code data is Flutter source code data written into a specific method function, and the second source code data comprises a call statement for the first source code data. By calling the component Fair DSL data corresponding to the target component in the interface Fair DSL data, the complete interface can be generated by Fair based on Flutter source code data corresponding to the target component which is independently packaged and Flutter source code data of a specific method function. Compared with the technology, all Flutter source code data corresponding to all interfaces to be generated, including all components of the interfaces, are not required to be written into the specific method function, so that the complexity of codes in the specific method function is reduced, the readability of the codes in the specific method function is improved, and the maintenance cost is reduced.
And since it is not necessary to write all code to the same specific method function. Therefore, flutter source code data corresponding to different components in the interface can be developed by different personnel. And finally, the code is modularly developed by calling the interface Fair DSL data, so that the design thought of a developer is more met, the interface design experience of the developer is improved, and the development efficiency is improved.
Referring to fig. 7, a block diagram of a data processing apparatus according to an embodiment of the present application is shown. As shown in fig. 7, the data processing apparatus 800 includes a generation module 801, an extraction module 802, an addition module 803, and a transmission module 804.
The generating module 801 is configured to convert Flutter source code data corresponding to an interface to be generated into DSL data of a specific language in an initial fairfield by using a fairway, where the Flutter source code data includes first source code data and second source code data, the first source code data is Flutter source code data corresponding to a target component in the interface to be generated, the second source code data is Flutter source code data written into a specific method function, and the second source code data includes a call statement for the first source code data;
An extracting module 802, configured to extract, from initial Fair DSL data, component Fair DSL data corresponding to a target component, and interface Fair DSL data corresponding to a specific method function, where the interface Fair DSL data includes a target component identifier corresponding to the target component;
an adding module 803, configured to add component fairdsl data corresponding to the target component to the interface fairdsl data, and generate target fairdsl data;
A sending module 804, configured to send the target fairdsl data to the client, so that the client parses the target fairdsl data to generate an interface.
Optionally, the adding module 803 is further configured to:
And adding first mapping data to the interface Fair DSL data to obtain target Fair DSL data, wherein the first mapping data comprises a target component identifier and associated stored component Fair DSL data corresponding to the target component.
Optionally, the adding module 803 is further configured to:
Generating second mapping data, wherein the second mapping data comprises a method dictionary identifier and associated stored first mapping data, and the method dictionary identifier is used for indicating Fair DSL data in the first mapping data to support calling;
and adding second mapping data to the interface Fair DSL data to obtain target Fair DSL data.
Optionally, the data format of the first mapping data and/or the second mapping data is a dictionary format.
Optionally, the extracting module 802 is further configured to:
converting the initial Fair DSL data into abstract syntax tree AST data;
extracting component data corresponding to a target component under a component tag node in AST, and generating component Fair DSL data corresponding to a target component identifier based on the component data;
And extracting target data except component data corresponding to the target component under each node in the AST, and generating interface Fair DSL data based on the target data.
Optionally, the object of the target component is a function, the component identifier of the target component is a function name, the type of the component tag node comprises a function statement and/or a device statement, and the component identifier of the target component does not comprise the function name of the specific device function when the component tag node is a device statement type.
In summary, the data processing device provided by the embodiment of the present application converts Flutter source code data corresponding to the interface to be generated into DSL data of specific language in the initial Fair domain through Fair. Component Fair DSL data corresponding to the target component and interface Fair DSL data corresponding to the specific method function are extracted from the initial Fair DSL data. And adding the component Fair DSL data corresponding to the target component into the interface Fair DSL data to generate target Fair DSL data. And sending the target Fair DSL data to the client, so that the client analyzes the target Fair DSL data and generates an interface. In the technical scheme, flutter source code data comprise first source code data and second source code data. The first source code data is Flutter source code data corresponding to a target component in the interface to be generated. The second source code data is Flutter source code data written into a specific method function, and the second source code data comprises a call statement for the first source code data. By calling the component Fair DSL data corresponding to the target component in the interface Fair DSL data, the complete interface can be generated by Fair based on Flutter source code data corresponding to the target component which is independently packaged and Flutter source code data of a specific method function. Compared with the technology, all Flutter source code data corresponding to all interfaces to be generated, including all components of the interfaces, are not required to be written into the specific method function, so that the complexity of codes in the specific method function is reduced, the readability of the codes in the specific method function is improved, and the maintenance cost is reduced.
Referring to fig. 8, a block diagram of a data processing apparatus according to an embodiment of the present application is shown. As shown in fig. 8, the data processing apparatus 900 includes a receiving module 901 and an analyzing module 902.
The receiving module 901 is configured to receive target fairdsl data of an interface to be generated, where the target fairdsl data is sent by a server side, and the target fairdsl data is generated by the server side by using any one of the data processing methods provided by the embodiments of the present application;
A parsing module 902, configured to parse the target fairdsl data to generate an interface.
Optionally, the parsing module 902 is further configured to:
Extracting first mapping data from target Fair DSL data, and deleting the first mapping data from the target Fair DSL data to obtain interface Fair DSL data, wherein the interface Fair DSL data comprises target component identifications corresponding to target components in an interface to be generated;
analyzing interface Fair DSL data;
Extracting component Fair DSL data corresponding to the component identification from the first mapping data under the condition that the component identification obtained by analysis exists in the first mapping data, and analyzing the component Fair DSL data corresponding to the component identification;
And drawing an interface based on the interface Fair DSL data and the analysis result of the component Fair DSL data corresponding to the component identifier by adopting a Flutter engine.
Optionally, the parsing module 902 is further configured to extract corresponding first mapping data from the target fairdsl data based on the method dictionary identifier in the second mapping relationship.
In summary, the data processing device provided by the embodiment of the present application analyzes the target fairdsl data to generate the interface by receiving the target fairdsl data of the interface to be generated, which is sent by the server, so as to generate the interface. The server side converts Flutter source code data corresponding to the interface to be generated into DSL data of specific language in the initial Fair field through Fair. Component Fair DSL data corresponding to the target component and interface Fair DSL data corresponding to the specific method function are extracted from the initial Fair DSL data. And adding the component Fair DSL data corresponding to the target component into the interface Fair DSL data to generate target Fair DSL data. In the technical scheme, flutter source code data comprise first source code data and second source code data. The first source code data is Flutter source code data corresponding to a target component in the interface to be generated. The second source code data is Flutter source code data written into a specific method function, and the second source code data comprises a call statement for the first source code data. By calling the component Fair DSL data corresponding to the target component in the interface Fair DSL data, the complete interface can be generated by Fair based on Flutter source code data corresponding to the target component which is independently packaged and Flutter source code data of a specific method function. Compared with the technology, all Flutter source code data corresponding to all interfaces to be generated, including all components of the interfaces, are not required to be written into the specific method function, so that the complexity of codes in the specific method function is reduced, the readability of the codes in the specific method function is improved, and the maintenance cost is reduced.
The data processing device provided by the embodiment of the application is provided with the corresponding functional module for executing the data processing method, can execute any data processing method provided by the embodiment of the application, and can achieve the same beneficial effects.
In still another embodiment of the present application, an electronic device is provided, where the electronic device may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor, where the processor implements each process of the above-mentioned data processing method embodiment when executing the program, and the process can achieve the same technical effects, and for avoiding repetition, a description is omitted herein.
By way of example, as shown in FIG. 9, the electronic device may include a processor 1001, a storage device 1002, a display screen 1003 having a touch function, an input device 1004, an output device 1005, and a communication device 1006. The number of processors 1001 in the electronic device may be one or more, one processor 1001 being taken as an example in fig. 9. The processor 1001, storage 1002, display 1003, input 1004, output 1005, and communication 1006 of the electronic device may be connected by a bus or other means.
In yet another embodiment of the present application, a computer readable storage medium is provided, in which instructions are stored, which when run on a computer, cause the computer to perform the data processing method according to any of the above embodiments.
In a further embodiment of the present application, a computer program product comprising instructions which, when run on a computer, causes the computer to perform the data processing method according to any of the above embodiments is also provided.
It is noted that relational terms such as first and second, and the like are 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. Moreover, 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 one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
It should be noted that, in this document, 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 one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. The storage medium includes various media capable of storing program codes such as a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (14)

Translated fromChinese
1.一种数据处理方法,其特征在于,所述方法包括:1. A data processing method, characterized in that the method comprises:通过Fair将待生成界面对应的Flutter源码数据转换为初始Fair领域特定语言DSL数据,所述Flutter源码数据包括:第一源码数据以及第二源码数据,所述第一源码数据为所述待生成界面中目标组件对应的Flutter源码数据,所述第二源码数据为写入特定方法函数的Flutter源码数据,所述第二源码数据包括对所述第一源码数据的调用语句;Convert the Flutter source code data corresponding to the interface to be generated into initial Fair domain-specific language DSL data through Fair, wherein the Flutter source code data includes: first source code data and second source code data, wherein the first source code data is the Flutter source code data corresponding to the target component in the interface to be generated, and the second source code data is the Flutter source code data in which a specific method function is written, and the second source code data includes a call statement for the first source code data;从初始Fair DSL数据中提取所述目标组件对应的组件Fair DSL数据,以及所述特定方法函数对应的界面Fair DSL数据,所述界面Fair DSL数据包括:所述目标组件对应的目标组件标识;Extracting component Fair DSL data corresponding to the target component and interface Fair DSL data corresponding to the specific method function from the initial Fair DSL data, wherein the interface Fair DSL data includes: a target component identifier corresponding to the target component;向所述界面Fair DSL数据中添加所述目标组件对应的组件Fair DSL数据,生成目标Fair DSL数据;Adding the component Fair DSL data corresponding to the target component to the interface Fair DSL data to generate target Fair DSL data;向客户端发送所述目标Fair DSL数据,以使得所述客户端解析所述目标Fair DSL数据,生成界面;Sending the target Fair DSL data to the client, so that the client parses the target Fair DSL data and generates an interface;其中,所述特定方法函数是build方法函数。Wherein, the specific method function is a build method function.2.根据权利要求1所述的方法,其特征在于,所述向所述界面Fair DSL数据中添加所述目标组件对应的组件Fair DSL数据,生成目标Fair DSL数据,包括:2. The method according to claim 1, characterized in that the adding of the component Fair DSL data corresponding to the target component to the interface Fair DSL data to generate the target Fair DSL data comprises:向所述界面Fair DSL数据添加第一映射数据,得到目标Fair DSL数据,所述第一映射数据包括:所述目标组件标识以及关联存储的与所述目标组件对应的组件Fair DSL数据。First mapping data is added to the interface Fair DSL data to obtain target Fair DSL data, wherein the first mapping data includes: the target component identifier and the component Fair DSL data corresponding to the target component that is stored in association.3.根据权利要求2所述的方法,其特征在于,所述向所述界面Fair DSL数据添加第一映射数据,得到目标Fair DSL数据,包括:3. The method according to claim 2, wherein the adding the first mapping data to the interface Fair DSL data to obtain the target Fair DSL data comprises:生成第二映射数据,所述第二映射数据包括:方法字典标识以及关联存储的所述第一映射数据,所述方法字典标识用于指示所述第一映射数据中的组件Fair DSL数据支持调用;generating second mapping data, the second mapping data comprising: a method dictionary identifier and the first mapping data stored in association, the method dictionary identifier being used to indicate that the component Fair DSL data in the first mapping data supports calling;向所述界面Fair DSL数据添加所述第二映射数据,得到目标Fair DSL数据。The second mapping data is added to the interface Fair DSL data to obtain target Fair DSL data.4.根据权利要求3所述的方法,其特征在于,所述第一映射数据和/或所述第二映射数据的数据格式为字典格式。4 . The method according to claim 3 , wherein the data format of the first mapping data and/or the second mapping data is a dictionary format.5.根据权利要求1所述的方法,其特征在于,所述从初始Fair DSL数据中提取所述目标组件对应的组件Fair DSL数据,以及所述特定方法函数对应的界面Fair DSL数据,包括:5. The method according to claim 1, characterized in that extracting the component Fair DSL data corresponding to the target component and the interface Fair DSL data corresponding to the specific method function from the initial Fair DSL data comprises:将所述初始Fair DSL数据转换为抽象语法树AST数据;Convert the initial Fair DSL data into abstract syntax tree AST data;提取所述AST中,组件标签节点下所述目标组件对应的组件数据,基于所述组件数据生成所述目标组件标识对应的组件Fair DSL数据;Extracting component data corresponding to the target component under the component label node in the AST, and generating component Fair DSL data corresponding to the target component identifier based on the component data;提取所述AST中,各节点下除所述目标组件对应的组件数据之外的目标数据,基于所述目标数据生成所述界面Fair DSL数据。Extract the target data except the component data corresponding to the target component under each node in the AST, and generate the interface Fair DSL data based on the target data.6.根据权利要求5所述的方法,其特征在于,所述目标组件的对象为函数,所述目标组件的组件标识为函数名称;所述组件标签节点的类型包括:函数声明和/或方法声明;其中,在所述组件标签节点为方法声明类型的情况下,所述目标组件的组件标识不包括所述特定方法函数的函数名称。6. The method according to claim 5 is characterized in that the object of the target component is a function, and the component identifier of the target component is a function name; the type of the component label node includes: function declaration and/or method declaration; wherein, when the component label node is a method declaration type, the component identifier of the target component does not include the function name of the specific method function.7.一种数据处理方法,其特征在于,所述方法包括:7. A data processing method, characterized in that the method comprises:接收服务端发送的待生成界面的目标Fair DSL数据,所述目标Fair DSL数据为所述服务端采用如权利要求1至6任一所述的数据处理方法生成;Receiving target Fair DSL data of the interface to be generated sent by the server, wherein the target Fair DSL data is generated by the server using the data processing method according to any one of claims 1 to 6;解析所述目标Fair DSL数据,以生成界面。The target Fair DSL data is parsed to generate an interface.8.根据权利要求7所述的方法,其特征在于,所述目标Fair DSL数据包括第一映射数据,所述解析所述目标Fair DSL数据,以生成界面,包括:8. The method according to claim 7, wherein the target Fair DSL data comprises first mapping data, and the step of parsing the target Fair DSL data to generate an interface comprises:从所述目标Fair DSL数据中提取第一映射数据,并从所述目标Fair DSL数据中删除所述第一映射数据,得到界面Fair DSL数据,所述界面Fair DSL数据包括:所述目标组件对应的目标组件标识;extracting first mapping data from the target Fair DSL data, and deleting the first mapping data from the target Fair DSL data to obtain interface Fair DSL data, wherein the interface Fair DSL data includes: a target component identifier corresponding to the target component;解析所述界面Fair DSL数据;Parsing the interface Fair DSL data;在解析得到的组件标识存在于所述第一映射数据的情况下,从所述第一映射数据中提取所述组件标识对应的组件Fair DSL数据,并解析所述组件标识对应的组件Fair DSL数据;In a case where the component identifier obtained by parsing exists in the first mapping data, extracting component Fair DSL data corresponding to the component identifier from the first mapping data, and parsing the component Fair DSL data corresponding to the component identifier;采用Flutter引擎,基于所述界面Fair DSL数据以及所述组件标识对应的组件FairDSL数据的解析结果,绘制界面。The Flutter engine is used to draw the interface based on the analysis result of the interface Fair DSL data and the component Fair DSL data corresponding to the component identifier.9.根据权利要求8所述的方法,其特征在于,所述目标Fair DSL数据包括第二映射数据,所述从所述目标Fair DSL数据中提取第一映射数据,包括:9. The method according to claim 8, wherein the target Fair DSL data includes second mapping data, and extracting the first mapping data from the target Fair DSL data comprises:基于所述第二映射数据中方法字典标识,从所述目标Fair DSL数据中提取对应的所述第一映射数据。Based on the method dictionary identifier in the second mapping data, the corresponding first mapping data is extracted from the target Fair DSL data.10.一种数据处理装置,其特征在于,所述装置包括:10. A data processing device, characterized in that the device comprises:生成模块,用于通过Fair将待生成界面对应的Flutter源码数据转换为初始Fair领域特定语言DSL数据,所述Flutter源码数据包括:第一源码数据以及第二源码数据,所述第一源码数据为所述待生成界面中目标组件对应的Flutter源码数据,所述第二源码数据为写入特定方法函数的Flutter源码数据,所述第二源码数据包括对所述第一源码数据的调用语句;A generation module, configured to convert Flutter source code data corresponding to the interface to be generated into initial Fair domain-specific language DSL data through Fair, wherein the Flutter source code data includes: first source code data and second source code data, wherein the first source code data is the Flutter source code data corresponding to the target component in the interface to be generated, and the second source code data is the Flutter source code data in which a specific method function is written, and the second source code data includes a call statement for the first source code data;提取模块,用于从初始Fair DSL数据中提取所述目标组件对应的组件Fair DSL数据,以及所述特定方法函数对应的界面Fair DSL数据,所述界面Fair DSL数据包括:所述目标组件对应的目标组件标识;An extraction module, used to extract component Fair DSL data corresponding to the target component and interface Fair DSL data corresponding to the specific method function from the initial Fair DSL data, wherein the interface Fair DSL data includes: a target component identifier corresponding to the target component;添加模块,用于向所述界面Fair DSL数据中添加所述目标组件对应的组件Fair DSL数据,生成目标Fair DSL数据;An adding module, used for adding the component Fair DSL data corresponding to the target component to the interface Fair DSL data to generate target Fair DSL data;发送模块,用于向客户端发送所述目标Fair DSL数据,以使得所述客户端解析所述目标Fair DSL数据,生成界面;A sending module, used for sending the target Fair DSL data to the client, so that the client parses the target Fair DSL data and generates an interface;其中,所述特定方法函数是build方法函数。Wherein, the specific method function is a build method function.11.一种数据处理装置,其特征在于,所述装置包括:11. A data processing device, characterized in that the device comprises:接收模块,用于接收服务端发送的待生成界面的目标Fair DSL数据,所述目标FairDSL数据为所述服务端采用如权利要求1至6任一所述的数据处理方法生成;A receiving module, configured to receive target Fair DSL data of the interface to be generated sent by the server, wherein the target Fair DSL data is generated by the server using the data processing method according to any one of claims 1 to 6;解析模块,用于解析所述目标Fair DSL数据,以生成界面。The parsing module is used to parse the target Fair DSL data to generate an interface.12.一种电子设备,其特征在于,包括:处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至6中任一项所述的数据处理方法的步骤,或者实现如权利要求7至9中任一项所述的数据处理方法。12. An electronic device, characterized in that it comprises: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the data processing method as described in any one of claims 1 to 6 are implemented, or the data processing method as described in any one of claims 7 to 9 are implemented.13.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至6中任一项所述的数据处理方法的步骤,或者实现如权利要求7至9中任一项所述的数据处理方法。13. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the data processing method as described in any one of claims 1 to 6 are implemented, or the data processing method as described in any one of claims 7 to 9 are implemented.14.一种数据处理系统,其特征在于,所述系统包括:服务端以及客户端,所述服务端与所述客户端通信,所述服务端用于实现如权利要求1至6中任一项所述的数据处理方法的步骤,所述客户端用于实现如权利要求7至9中任一项所述的数据处理方法的步骤。14. A data processing system, characterized in that the system comprises: a server and a client, the server communicating with the client, the server being used to implement the steps of the data processing method as described in any one of claims 1 to 6, and the client being used to implement the steps of the data processing method as described in any one of claims 7 to 9.
CN202110950286.XA2021-08-182021-08-18 Data processing method, device and systemActiveCN113791779B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110950286.XACN113791779B (en)2021-08-182021-08-18 Data processing method, device and system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110950286.XACN113791779B (en)2021-08-182021-08-18 Data processing method, device and system

Publications (2)

Publication NumberPublication Date
CN113791779A CN113791779A (en)2021-12-14
CN113791779Btrue CN113791779B (en)2025-07-11

Family

ID=78876085

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110950286.XAActiveCN113791779B (en)2021-08-182021-08-18 Data processing method, device and system

Country Status (1)

CountryLink
CN (1)CN113791779B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN119512547A (en)*2024-11-202025-02-25珠海格力电器股份有限公司 User interface updating method, device, electronic device and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112612470A (en)*2021-01-052021-04-06北京城市网邻信息技术有限公司User interface file generation method and device
CN112667263A (en)*2021-01-052021-04-16北京城市网邻信息技术有限公司Dynamic updating method and device of Flutter component, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20200301761A1 (en)*2019-03-202020-09-24International Business Machines CorporationCognitive application programming interface discovery from legacy system code
CN112825033B (en)*2019-11-212025-06-13北京京东尚科信息技术有限公司 Interface code generation method, device, equipment and storage medium
CN112965731B (en)*2021-02-262023-02-14平安壹钱包电子商务有限公司Method, device, equipment and storage medium for Flutter hot update based on Tinker
CN113064593B (en)*2021-04-122022-04-12深圳市活力天汇科技股份有限公司Method and device for dynamic mobile APP, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112612470A (en)*2021-01-052021-04-06北京城市网邻信息技术有限公司User interface file generation method and device
CN112667263A (en)*2021-01-052021-04-16北京城市网邻信息技术有限公司Dynamic updating method and device of Flutter component, electronic equipment and storage medium

Also Published As

Publication numberPublication date
CN113791779A (en)2021-12-14

Similar Documents

PublicationPublication DateTitle
CN106569900B (en)Applied program processing method and device
CN111680253B (en)Page application data packet generation method and device, computer equipment and storage medium
US20190243866A1 (en)Mobile enablement of existing web sites
CN111740948B (en)Data packet issuing method, dynamic updating method, device, equipment and medium
US9805009B2 (en)Method and device for cascading style sheet (CSS) selector matching
US10176270B2 (en)Performance of template based javascript widgets
US8402319B2 (en)Method and system to extract a navigation model for analysis of a web application
CN111736840A (en)Compiling method and running method of applet, storage medium and electronic equipment
CN110109983B (en)Method and device for operating Redis database
WO2022142743A1 (en)Visualized page rendering method, device, equipment, and storage medium
KR20080053293A (en) Server-Side Initial Content Rendering for Client Script Web Pages
CN105354014A (en)Application interface rendering display method and apparatus
CN107454954A (en) Data Binding Correlation Analysis
CN113094138B (en)Interface display method and device, electronic equipment and storage medium
CN114297549B (en)Component processing method and device
CN114968241A (en)Interactive page rendering method and device, computer equipment and storage medium
US20160103815A1 (en)Generating mobile web browser views for applications
CN114443041A (en)Method for parsing abstract syntax tree and computer program product
CN113642295B (en)Page typesetting method, device and computer program product
US20210274017A1 (en)Request processing method and apparatus, electronic device, and computer storage medium
US9571557B2 (en)Script caching method and information processing device utilizing the same
CN113791779B (en) Data processing method, device and system
US20250005261A1 (en)Systems, methods, and devices for e-mail rendering
CN113961215B (en)Application updating method, device, equipment and storage medium
CN115687815B (en)Page information display method, device, equipment and medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp