CN113326035B - Data processing method, device, electronic equipment and computer storage medium - Google Patents
Data processing method, device, electronic equipment and computer storage medium Download PDFInfo
- Publication number
- CN113326035B CN113326035B CN202010606128.8A CN202010606128A CN113326035B CN 113326035 B CN113326035 B CN 113326035B CN 202010606128 A CN202010606128 A CN 202010606128A CN 113326035 B CN113326035 B CN 113326035B
- Authority
- CN
- China
- Prior art keywords
- component
- information
- request information
- components
- calling
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 43
- 238000012545 processing Methods 0.000 claims description 57
- 238000000034 method Methods 0.000 claims description 50
- 230000006870 function Effects 0.000 claims description 25
- 238000004891 communication Methods 0.000 claims description 16
- 238000011144 upstream manufacturing Methods 0.000 claims description 11
- 230000002452 interceptive effect Effects 0.000 claims description 10
- 230000008569 process Effects 0.000 claims description 6
- 238000004590 computer program Methods 0.000 claims description 3
- 238000011161 development Methods 0.000 abstract description 11
- 230000003993 interaction Effects 0.000 description 18
- 238000012423 maintenance Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 6
- 230000008859 change Effects 0.000 description 5
- 230000007774 longterm Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011022 operating instruction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/10—Requirements analysis; Specification techniques
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the invention provides a data processing method, a device, electronic equipment and a computer storage medium, wherein the data processing method comprises the following steps: acquiring first request information; acquiring component information and calling sequence of at least one component corresponding to the first request information in a preset database according to the first request information; instantiating the at least one component based on the component information of the at least one component; and generating a component form corresponding to the first request information according to the instantiated at least one component and the calling sequence. Because the component information and the calling sequence can be directly acquired from the preset database according to the first request information, the components can be linked, and the component forms can be formed by splicing the instantiated components, so that the decoupling of the development and upgrading of the components and the generation of the component forms can be realized, the program code is not required to be written by a developer, the workload of the developer is reduced, the efficiency is higher, and the use is more flexible.
Description
Technical Field
The embodiment of the invention relates to the technical field of electronic information, in particular to a data processing method, a data processing device, electronic equipment and a computer storage medium.
Background
The operation of the white screen is to be performed relative to the realization mode of the black screen operation, the black screen operation is to be performed on the machine manually, the white screen operation is to be performed by directly performing the black screen operation on the machine, and the white screen operation is to be fixed on a front-end form, so that the manual operation is reduced, and the misoperation is avoided. For example, in an operation and maintenance scenario, an operation and maintenance worker needs to maintain a device, the operation and maintenance needs are frequent and changeable, different programs need to be developed for different needs to be implemented, and if the needs change, program codes need to be modified, which increases the workload of many developers.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a data processing method, apparatus, electronic device, and computer storage medium, so as to solve some or all of the above problems.
According to a first aspect of an embodiment of the present invention, there is provided a data processing method, including: acquiring first request information; acquiring component information and calling sequence of at least one component corresponding to the first request information in a preset database according to the first request information; instantiating the at least one component based on the component information of the at least one component; and generating a component form corresponding to the first request information according to the instantiated at least one component and the calling sequence.
According to a second aspect of an embodiment of the present invention, there is provided a data processing method, including: acquiring second request information; acquiring a corresponding component form according to the second request information, wherein the component form comprises at least one component which needs to be called for executing the operation corresponding to the second request information and a calling sequence of the at least one component, and the component form is generated according to the method of the first aspect; and calling at least one component to execute the operation corresponding to the second request information according to the calling sequence indicated by the component form, and obtaining a processing result.
According to a third aspect of an embodiment of the present invention, there is provided a data processing apparatus including: the request module is used for acquiring first request information; the component information module is used for acquiring the component information of at least one component corresponding to the first request information from a preset database according to the first request information; an instantiation module for instantiating the at least one component based on the component information of the at least one component; and the form module is used for generating a component form corresponding to the first request information according to the instantiated at least one component and the calling sequence.
According to a fourth aspect of an embodiment of the present invention, there is provided a data processing apparatus including: the request module is used for acquiring second request information; the form module is used for acquiring a corresponding component form according to the second request information, wherein the component form comprises at least one component which needs to be called for executing the operation corresponding to the second request information and a calling sequence of the at least one component, and the component form is generated according to the method of the first aspect of the claims; and the processing module is used for calling at least one component to execute the operation corresponding to the second request information according to the calling sequence indicated by the component form and obtaining a processing result.
According to a fifth aspect of an embodiment of the present invention, there is provided an electronic apparatus including: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface are communicated with each other through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute operations corresponding to the data processing method according to the first aspect or the second aspect.
According to a sixth aspect of embodiments of the present invention, there is provided a computer storage medium having stored thereon a computer program which, when executed by a processor, implements a data processing method as in the first or second aspect.
The data processing method, the data processing device, the electronic equipment and the computer storage medium provided by the embodiment of the invention acquire first request information; acquiring component information and calling sequence of at least one component corresponding to the first request information in a preset database according to the first request information; instantiating the at least one component based on the component information of the at least one component; and generating a component form corresponding to the first request information according to the instantiated at least one component and the calling sequence. Because the component information and the calling sequence can be directly acquired from the preset database according to the first request information, the components can be linked, the instantiated components can be spliced to form the component form, the development and upgrading of the components and the generation of the component form are decoupled, a developer is not required to write program codes, the workload of the developer is reduced, and the component form is spliced, if the user needs change, the components in the component form and the calling sequence thereof can be adjusted, the workload of the developer is further reduced, the efficiency is higher, and the use is more flexible.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present invention, and other drawings may be obtained according to these drawings for a person having ordinary skill in the art.
Fig. 1 is a schematic view of a scenario of a data processing method according to a first embodiment of the present application;
FIG. 2 is a flowchart of a data processing method according to a first embodiment of the present application;
FIG. 2A is a flowchart of a data processing method according to a first embodiment of the present application;
FIG. 2B is a schematic diagram of a component form according to a first embodiment of the present application;
fig. 3 is a schematic view of a scenario of a data processing method according to a second embodiment of the present application;
FIG. 4 is a flowchart of a data processing method according to a second embodiment of the present application;
FIG. 5 is a block diagram illustrating a data processing apparatus according to a third embodiment of the present application;
FIG. 6 is a block diagram illustrating a data processing apparatus according to a fourth embodiment of the present application;
Fig. 7 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present application.
Detailed Description
In order to better understand the technical solutions in the embodiments of the present invention, the following description will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which are derived by a person skilled in the art based on the embodiments of the present invention, shall fall within the scope of protection of the embodiments of the present invention.
The implementation of the embodiments of the present invention will be further described below with reference to the accompanying drawings.
Example 1
In order to facilitate understanding, an application scenario of the data processing method provided by the first embodiment of the present application is described, referring to fig. 1, and fig. 1 is a schematic diagram of a scenario of the data processing method provided by the first embodiment of the present application. The scenario shown in fig. 1 includes an electronic device 101 and a user 102; the electronic device 101 may be a device that performs the data processing method provided in the first embodiment of the present application.
The electronic device 101 may be an electronic device having a man-machine interaction function, such as a desktop computer, a tablet computer, a notebook computer, an intelligent terminal, etc. The electronic device 101 may include a display screen through which the electronic device 101 displays images, text, or video to a user.
It should be noted that, the electronic device 101 may also access a network, where the network includes a local area network (Local Area Network, LAN), a wide area network (Wide Area Network, WAN), and a mobile communication network; such as the World Wide Web (WWW), long term evolution (english: long Term Evolution, LTE) networks, 2G networks (english: 2th Generation Mobile Network), 3G networks (english: 3th Generation Mobile Network), 5G networks (english: 5th Generation Mobile Network), etc. Of course, the description is intended to be illustrative only and is not to be taken in a limiting sense.
The user 102 can inform the electronic device 101 of the user requirement by performing man-machine interaction with the electronic device 101, and the electronic device 101 generates a corresponding component form according to the user requirement.
Referring to fig. 1, a data processing method according to an embodiment of the present application is described in detail, and the method may be applied to a data processing apparatus, which may be an electronic color device 101 shown in fig. 1, it should be noted that fig. 1 is only an application scenario of the data processing method according to the embodiment of the present application, and does not represent that the data processing method must be applied to the scenario shown in fig. 1, and referring to fig. 2, fig. 2 is a flowchart of a data processing method according to the embodiment of the present application, and the method includes the following steps:
step 201, obtaining first request information.
It should be noted that, the first request information may include a parameter name of at least one component, where the at least one component is a component that needs to be called to execute an operation corresponding to the first request information. For example, the first request message may be a hypertext transfer protocol (English: hyper Text Transfer Protocol, HTTP) request, although this is merely exemplary and not intended to limit the present application.
Optionally, in one implementation, acquiring the first request information includes: receiving the interactive operation, and determining the parameter name of at least one corresponding component according to the interactive operation; the first request message is generated based on the parameter name of the at least one component. It should be noted that, the interactive operation may be a key operation, a touch operation, a voice interactive operation, or the like. For example, the key operation may include a keyboard input operation, a mouse input operation, and the like; the touch operation may include a single-point touch operation, a multi-point touch operation, or the like on the touch screen; the voice interaction may include a user inputting a voice signal through a microphone. Of course, the foregoing is illustrative only and is not intended to be limiting. The first request information is generated by receiving the interaction operation, so that the user can directly interact with the data processing device, and the operation is more convenient.
Optionally, in another implementation, acquiring the first request information includes receiving the first request information sent by the other device. The data processing device receives the first request information sent by other equipment, and does not interact with the user directly, so that an interaction component is reduced, and the load of the data processing device is reduced.
Step 202, acquiring component information and calling sequence of at least one component corresponding to the first request information in a preset database according to the first request information.
The preset database may include at least one pre-stored form, one form including component information of at least one component. The component information for a component may include an identification of the component, a parameter name for a downstream component, configuration information for the component, and the like. A form may include a form name of the form, component information for at least one component, and a presentation order for at least one component. Exemplary, the fields in the form are described in detail.
The field of the form name may be denoted by "form_name", and the components under the same form_name form a form;
the field of the display order of the components in the form can be represented by an order, and the display order represents the outward display order of at least one component in the form;
for component information, further examples are as follows:
The identification field of the component may be denoted by "component_name", the identification of the component corresponds to the instance of the component, and the identification of the component is used to locate the instance of the component;
the parameter name field of the component can be expressed by a parameter_name, one parameter name expresses one component, and the parameter name corresponds to the back-end interface, so as to facilitate the identification of the back-end interface;
The parameter name field of the downstream component may be denoted by "downstreams", where the parameter name of the downstream component is used to indicate that the component may be called by the component, for example, for the component a, if the component indicated by the parameter name of the downstream component of the component a is the component B, it indicates that the component a may call the component B, that is, the calling order of the components is to call the component a first and then call the component B;
the configuration information of the component may include at least one configuration parameter, here, three examples are illustrated, and the three configuration parameters are an initialization parameter, a stacking style parameter, and an extended attribute parameter, respectively;
Wherein the initialization parameter field may be denoted by "initial", the initialization parameter may indicate an initialization value of the component, and exemplary initialization parameters may include the following: 1) initial Value, which represents a direct definition initialization Value; 2) initial ByField: indicating that the self-initialization value is changed according to another parameter value; 3) initial ToLower: indicating whether to convert the initialization value to a lower case initialization upon selection initial ByField; of course, the initialization parameters may have other definitions, which are not limited by the present application;
The cascading style parameter field may be denoted by "layout" and the cascading style parameter may indicate a cascading style sheet (English: CASCADING STYLE SHEETS, CSS) attribute of the component;
The extended attribute parameter field may be denoted by "attribute," and the extended attribute parameter may indicate an extended attribute object of the component, meaning that when the component is implemented, a logical decision or extension may be made based on a fixed attribute.
Of course, the above is merely exemplary of the fields contained in the form and is not intended to limit the present application thereto. In step 202, the first request information includes a parameter name of at least one component, the preset database includes the parameter name of the component and the identifier of the component, the identifier of the at least one component can be determined according to the parameter name of the at least one component included in the first request information, the preset database also includes a parameter name of a downstream component, the calling relationship between the components can be determined according to the parameter names of the downstream component, that is, the calling sequence is determined, the preset database also includes configuration information of the components, and the components can be instantiated according to the configuration information of the components. The component information is more convenient and flexible to obtain through the preset database, and the efficiency of generating the component form is improved.
Step 203, instantiating the at least one component according to the component information of the at least one component.
The components may be used after they are instantiated, and exemplary instantiations of the components are described in detail herein:
Optionally, the component information includes identification and configuration information of the component; instantiating the at least one component from the component information of the at least one component, including:
Acquiring at least one class of the component from a component registry according to the identification contained in the component information of the at least one component, wherein the component registry is used for indicating the corresponding relation between the component and the class of the component; and instantiating the class of the at least one component according to the configuration information contained in the component information of the at least one component to obtain the instantiated at least one component.
It should be noted that, the component registry includes at least one component that is already registered, in an application scenario, the calling order of the components is determined by the calling relationship between the components, so the components registered in the component registry need to support the calling function, where, for example, the procedure of component registration is described as follows:
Optionally, the method further comprises: determining a component to be registered which meets a registration condition in at least one candidate component; and obtaining the identification of the component to be registered and the class of the component to be registered, and adding the component to be registered in the component registry according to the identification of the component to be registered and the class of the component to be registered.
Further optionally, determining a component to be registered that satisfies a registration condition in the at least one component includes: among the at least one candidate component, a component having a calling function for calling the next component and an upstream processing function for returning to the previous component is determined as a component to be registered.
It should be noted that, the component registry is used to indicate the correspondence between the identifier of the component and the class of the component, and the component registry is used to determine the class of the component according to the identifier of the component, so as to implement instantiation, which is, of course, only illustrative, and not representative of the present application.
Of course, the registration conditions may also include other conditions, as described herein by way of example only, and in an alternative implementation, the registration conditions may include: 1) The component can store control values, e.g., the component has a value attribute; 2) The component can submit a control value, i.e., the component has a call function, e.g., the component supports the onChange () method; 3) The component has upstream processing functionality, i.e., the component can return to an upstream component, e.g., the component supports handleByUpstream () method; 4) Component references can be returned, e.g., component support GETINSTANCE () method; 5) When the component is used for generating a component form, arbitrary attribute is supported to be transmitted to the component; components satisfying these 5 conditions can all be registered in the component registry. Of course, the description is intended to be illustrative only and is not to be taken in a limiting sense.
And 204, generating a component form corresponding to the first request information according to the instantiated at least one component and the calling sequence.
Because the component information is acquired, the calling sequence is determined, the components are instantiated according to the component information, and then the component forms are generated by using the instantiated components, the operations do not need the participation of users, the workload of developers is reduced, the error rate is also reduced, and the development efficiency is improved.
Optionally, in combination with the description of the parameter names of the downstream components in step 202, generating, according to the instantiated at least one component, a component form corresponding to the first request information according to the calling sequence, including: determining call relations among the instantiated components according to the call sequence, adding call information to the components with the call relations, wherein the call information is used for indicating the components to call the next component in the execution process; and splicing at least one component added with the calling information to generate a component form. The addition of call information, which is in effect the registration of call relationships between components, may be implemented by the onChange () function illustrated in step 203, although this is merely exemplary and not intended to limit the present application.
In addition, optionally, after generating the component form corresponding to the first request information according to the call sequence according to the instantiated at least one component, the method further includes: and displaying the user interface corresponding to the component form according to the component form. After the user interface corresponding to the component form is displayed to the user, the user can realize the function corresponding to the component form through the operation of the user interface.
In combination with the application scenario shown in fig. 1, in a specific application scenario, as shown in fig. 2A, fig. 2A is a flowchart of a data processing method provided in a first embodiment of the present application, first, a user performs man-machine interaction with an electronic device, and the electronic device generates first request information according to detected interaction operation; acquiring the component information of at least one component in a preset database according to the parameter name of the at least one component contained in the first request information;
Secondly, traversing at least one component, acquiring the class of the component in a component registry according to the component information acquired from a preset database, and instantiating the component, wherein the component in the component registry is registered in advance; circularly executing the process of instantiating the components until the components in the components indicated in the first request information are instantiated, and ending the traversal;
And finally, determining the identification of the components and the parameter names of the downstream components of the components, and determining the calling relationship among the components according to the parameter names of the downstream components of the components, namely determining the calling sequence of the components, and splicing the instantiated components according to the calling sequence of the components to generate a component form. As shown in fig. 2B, in the component form shown in fig. 2B, call and return between components are implemented through onChange () function and handleByUpstream () function, that is, a component to be called next can be automatically determined in the process of executing the component, and linkage between components can be implemented; and the decoupling between the development and the upgrading of the components and the generation of the component forms is realized, because the components are automatically linked, the generation of the component forms is not influenced by the development or the upgrading of the components, the development and the upgrading of the components are not influenced by the generation of the component forms, the maintenance cost is reduced, the user is not required to write codes for control, the formation of the component forms is more flexible and efficient, and the adjustment is convenient.
The data processing method provided by the embodiment of the invention acquires the first request information; acquiring component information and calling sequence of at least one component corresponding to the first request information in a preset database according to the first request information; instantiating the at least one component based on the component information of the at least one component; and generating a component form corresponding to the first request information according to the instantiated at least one component and the calling sequence. Because the component information and the calling sequence can be directly acquired from the preset database according to the first request information, the components can be linked, the instantiated components can be spliced to form the component form, the development and upgrading of the components and the generation of the component form are decoupled, a developer is not required to write program codes, the workload of the developer is reduced, and the component form is spliced, if the user needs change, the components in the component form and the calling sequence thereof can be adjusted, the workload of the developer is further reduced, the efficiency is higher, and the use is more flexible.
Example two
Based on the data processing method described in the first embodiment, a second embodiment of the present application provides a data processing method, which describes in detail how the component form generated by the method according to the first embodiment is applied. For easy understanding, fig. 3 is a schematic view of an application scenario of a data processing method provided in the second embodiment of the present application, fig. 3 is only an exemplary application scenario, and the data processing method described in the second embodiment of the present application is not represented as being necessarily applied to the scenario shown in fig. 3, in the scenario shown in fig. 3, the electronic device 101 and the user 102 are shown, and the electronic device 101 and the user 102 are already described in the first embodiment, which is not repeated herein. Taking an operation and maintenance scenario as an example, the user 102 may be an operation and maintenance staff, where the operation and maintenance staff needs to maintain background servers such as Application (APP), web pages, etc., for example, maintenance version upgrade and maintenance program upgrade; repairing equipment faults, restarting equipment, releasing memory, upgrading kernel versions and the like. Optionally, as shown in fig. 3, the scenario shown in fig. 3 also shows a server 103, where the server 103 may be a device that an operation and maintenance worker needs to maintain. As shown in fig. 1, the user 102 may perform man-machine interaction with the electronic device 101, where the electronic device 101 generates the second request information according to the interaction operation, determines a component form corresponding to the second request information, and executes an operation corresponding to the first request information on the server 103 according to at least one component in the component form, and returns a processing result.
With reference to the scenario shown in fig. 3, the data processing method provided in the second embodiment of the present application is described in detail, and the method may be applied to a data processing apparatus, where the data processing apparatus may be the electronic color device 101 shown in fig. 1 and fig. 3, it should be noted that fig. 3 is only an application scenario of the data processing method provided in the first embodiment of the present application, and does not represent that the data processing method must be applied to the scenario shown in fig. 3, and referring to fig. 4, fig. 4 is a flowchart of a data processing method provided in the first embodiment of the present application, and the method includes the following steps:
Step 401, obtaining second request information.
It should be noted that, the second request information is used to instruct to perform a corresponding operation to implement a corresponding user requirement. The second request information may be generated according to user interaction operation, or may be sent by the receiving other device.
Optionally, in one implementation, acquiring the second request information includes: receiving the interactive operation, and determining a corresponding component form according to the interactive operation; and generating second request information according to the corresponding component form. The second request information may include an identification of the component form, and the second request information may indicate that the corresponding operation is performed according to the corresponding component form. It should be noted that, the interactive operation may be a key operation, a touch operation, a voice interactive operation, or the like. For example, the key operation may include a keyboard input operation, a mouse input operation, and the like; the touch operation may include a single-point touch operation, a multi-point touch operation, or the like on the touch screen; the voice interaction may include a user inputting a voice signal through a microphone. Of course, the foregoing is illustrative only and is not intended to be limiting. And receiving the interaction operation to generate second request information, so that a user can directly interact with the data processing device, and the operation is more convenient.
Optionally, in another implementation, obtaining the second request information includes receiving the second request information sent by the other device. The data processing device receives the second request information sent by other equipment, and does not interact with the user directly, so that an interaction component is reduced, and the load of the data processing device is reduced.
Step 402, acquiring a corresponding component form according to the second request information.
The component form comprises at least one component which needs to be called for executing the operation corresponding to the second request information and a calling sequence of the at least one component. The component form may be generated according to the method at the data described in the first embodiment, and will not be described here.
Step 403, calling at least one component to execute the operation corresponding to the second request information according to the calling sequence indicated by the component form, and obtaining the processing result.
Here, an example is specifically described as to how component calls may be made, and of course, this is merely illustrative and not representative of the present application.
Optionally, in the first example, the component form includes a calling relationship between components, and calling at least one component to execute an operation corresponding to the second request information according to a calling sequence indicated by the component form, and obtaining a processing result includes: and according to the calling relation among the components in the component form, sequentially calling at least one component to execute the operation corresponding to the second request information, and obtaining a processing result.
In combination with the scenario shown in fig. 3, in a specific application scenario, the user may perform man-machine interaction with the electronic device, and the electronic device may generate second request information according to the detected interaction operation, as shown in fig. 3, where the interaction operation may be clicking on the touch screen to obtain a corresponding component form according to the second request information, and one request information may correspond to one component form, that is, one requirement on the user interface may correspond to one component form, which is, of course, only illustrated herein. According to at least one component contained in the component form and the calling relation among the components, calling the at least one component to execute the operation corresponding to the second request information according to the calling sequence indicated by the component form, and in combination with the scenario shown in fig. 3, calling the at least one component to execute the operation corresponding to the second request information on the server so as to maintain the server, obtain a processing result, and displaying the processing result to a user.
The data processing method provided by the embodiment of the invention acquires the second request information; acquiring a corresponding component form according to the second request information, wherein the component form comprises at least one component which needs to be called for executing the operation corresponding to the second request information and a calling sequence of the at least one component, and the component form is generated according to the method of the first aspect; and calling at least one component to execute the operation corresponding to the second request information according to the calling sequence indicated by the component form, and obtaining a processing result. The automatic calling of the components is realized through the component form, and the user is not required to write codes for realizing, so that the development efficiency is improved, and the use is more urgent and flexible.
Example III
Based on the methods described in the first and second embodiments, a third embodiment of the present application provides a data processing apparatus for performing the method described in the first embodiment, and referring to fig. 5, the data processing apparatus 50 includes: a request module 501, a component information module 502, an instantiation module 503, a form module 504;
the request module 501 is configured to obtain first request information;
the component information module 502 is configured to obtain, according to the first request information, component information of at least one component corresponding to the first request information in a preset database;
an instantiation module 503, configured to instantiate at least one component according to component information of the at least one component;
and the form module 504 is configured to generate, according to the instantiated at least one component, a component form corresponding to the first request information according to the calling order.
Optionally, the form module 504 is specifically configured to determine a calling relationship between the instantiated components according to a calling sequence, add calling information to the components with the calling relationship, where the calling information is used to instruct the components to call the next component in the execution process; and splicing at least one component added with the calling information to generate a component form.
Optionally, the request module 501 is specifically configured to receive an interaction operation, and determine a parameter name of at least one corresponding component according to the interaction operation; the first request message is generated based on the parameter name of the at least one component.
Optionally, the instantiation module 503 is specifically configured to obtain, according to an identifier included in the component information of at least one component, a class of the at least one component in a component registry, where the component registry is used to indicate a correspondence between the component and the class of the component; and instantiating the class of the at least one component according to the configuration information contained in the component information of the at least one component to obtain the instantiated at least one component.
Optionally, the instantiation module 503 is further configured to determine a component to be registered that meets a registration condition from at least one candidate component; and obtaining the identification of the component to be registered and the class of the component to be registered, and adding the component to be registered in the component registry according to the identification of the component to be registered and the class of the component to be registered.
Optionally, the instantiation module 503 is specifically configured to determine, among at least one candidate component, a component having a calling function and an upstream processing function as a component to be registered, where the calling function is used to call a next component, and the upstream processing function is used to return to a previous component.
Optionally, the form module 504 is further configured to display a user interface corresponding to the component form according to the component form.
The data processing device provided by the embodiment of the invention acquires the first request information; acquiring component information and calling sequence of at least one component corresponding to the first request information in a preset database according to the first request information; instantiating the at least one component based on the component information of the at least one component; and generating a component form corresponding to the first request information according to the instantiated at least one component and the calling sequence. Because the component information and the calling sequence can be directly acquired from the preset database according to the first request information, the components can be linked, the instantiated components can be spliced to form the component form, the development and upgrading of the components and the generation of the component form are decoupled, a developer is not required to write program codes, the workload of the developer is reduced, and the component form is spliced, if the user needs change, the components in the component form and the calling sequence thereof can be adjusted, the workload of the developer is further reduced, the efficiency is higher, and the use is more flexible.
Example IV
Based on the methods described in the first and second embodiments, a fourth embodiment of the present application provides a data processing apparatus for executing the method described in the second embodiment, and referring to fig. 6, the data processing apparatus 60 includes: a request module 601, a form module 602, and a processing module 603;
The request module 601 is configured to obtain second request information;
The form module 602 is configured to obtain a corresponding component form according to the second request information, where the component form includes at least one component that needs to be called when the operation corresponding to the second request information is executed, and a calling order of the at least one component, and the component form is generated according to the data processing method described in the first embodiment;
And the processing module 603 is configured to call at least one component to execute the operation corresponding to the second request information according to the call sequence indicated by the component form, and obtain a processing result.
Optionally, the processing module 603 is specifically configured to call at least one component in sequence to execute an operation corresponding to the second request information according to a call relationship between components in the component form, and obtain a processing result.
The data processing device provided by the embodiment of the invention acquires the second request information; acquiring a corresponding component form according to the second request information, wherein the component form comprises at least one component which needs to be called for executing the operation corresponding to the second request information and a calling sequence of the at least one component, and the component form is generated according to the method of the first aspect; and calling at least one component to execute the operation corresponding to the second request information according to the calling sequence indicated by the component form, and obtaining a processing result. The automatic calling of the components is realized through the component form, and the user is not required to write codes for realizing, so that the development efficiency is improved, and the use is more urgent and flexible.
Example five
Based on the methods described in the first and second embodiments, the fifth embodiment of the present application provides an electronic device for executing the method described in the first or second embodiment, and referring to fig. 7, fig. 7 is a schematic structural diagram of the electronic device provided in the fifth embodiment of the present application, and the specific embodiment of the present application is not limited to the specific implementation of the electronic device.
As shown in fig. 7, the electronic device may include: a processor 702, a communication interface (Communications Interface), a memory 706, and a communication bus 708.
Wherein:
Processor 702, communication interface 704, and memory 706 perform communication with each other via a communication bus 708.
A communication interface 704 for communicating with other electronic devices, such as terminal devices or servers.
The processor 702 is configured to execute the program 710, and may specifically perform relevant steps in the method embodiments described above.
In particular, program 710 may include program code including computer-operating instructions.
The processor 702 may be a central processing unit CPU, or an ASIC
(Application SPECIFIC INTEGRATED circuits), or one or more integrated circuits configured to implement embodiments of the invention. The one or more processors included in the electronic device may be the same type of processor, such as one or more CPUs; but may also be different types of processors such as one or more CPUs and one or more ASICs.
Memory 706 for storing programs 710. The memory 706 may comprise high-speed RAM memory or may further comprise non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 710 may be specifically configured to cause the processor 702 to perform any of the methods described in the foregoing embodiment one or embodiment two.
The specific implementation of each step in the program 710 may refer to the corresponding steps and corresponding descriptions in the units in the above data processing method embodiment, which are not repeated herein. It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus and modules described above may refer to corresponding procedure descriptions in the foregoing method embodiments, which are not repeated herein.
The electronic equipment provided by the embodiment of the invention acquires the first request information; acquiring component information and calling sequence of at least one component corresponding to the first request information in a preset database according to the first request information; instantiating the at least one component based on the component information of the at least one component; and generating a component form corresponding to the first request information according to the instantiated at least one component and the calling sequence. Because the component information and the calling sequence can be directly acquired from the preset database according to the first request information, the components can be linked, the instantiated components can be spliced to form the component form, the development and upgrading of the components and the generation of the component form are decoupled, a developer is not required to write program codes, the workload of the developer is reduced, and the component form is spliced, if the user needs change, the components in the component form and the calling sequence thereof can be adjusted, the workload of the developer is further reduced, the efficiency is higher, and the use is more flexible.
Example six
Based on the methods described in the first and second embodiments, a fifth embodiment of the present application provides a computer storage medium having a computer program stored thereon, which when executed by a processor, implements the method described in the first or second embodiment.
It should be noted that, according to implementation requirements, each component/step described in the embodiments of the present invention may be split into more components/steps, or two or more components/steps or part of operations of the components/steps may be combined into new components/steps, so as to achieve the objects of the embodiments of the present invention.
The above-described methods according to embodiments of the present invention may be implemented in hardware, firmware, or as software or computer code storable in a recording medium such as a CD ROM, RAM, floppy disk, hard disk, or magneto-optical disk, or as computer code originally stored in a remote recording medium or a non-transitory machine-readable medium and to be stored in a local recording medium downloaded through a network, so that the methods described herein may be stored on such software processes on a recording medium using a general purpose computer, special purpose processor, or programmable or special purpose hardware such as an ASIC or FPGA. It is understood that a computer, processor, microprocessor controller, or programmable hardware includes a memory component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the data processing methods described herein. Further, when a general-purpose computer accesses code for implementing the data processing methods illustrated herein, execution of the code converts the general-purpose computer into a special-purpose computer for executing the data processing methods illustrated herein.
Those of ordinary skill in the art will appreciate that the elements and method steps of the examples described in connection with the embodiments disclosed herein can be implemented as electronic hardware, or as a combination 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 embodiments of the present invention.
The above embodiments are only for illustrating the embodiments of the present invention, but not for limiting the embodiments of the present invention, and various changes and modifications may be made by one skilled in the relevant art without departing from the spirit and scope of the embodiments of the present invention, so that all equivalent technical solutions also fall within the scope of the embodiments of the present invention, and the scope of the embodiments of the present invention should be defined by the claims.
Claims (13)
1. A method of data processing, comprising:
Acquiring first request information;
Acquiring component information and calling sequence of at least one component corresponding to the first request information in a preset database according to the first request information, wherein the component information of one component comprises configuration information of the component and parameter names of downstream components, the configuration information is used for instantiating classes of the component, and the parameter names of the downstream components are used for indicating the components which can be called by the component;
Instantiating the at least one component according to the component information of the at least one component;
Generating a component form corresponding to the first request information according to the instantiated at least one component and the calling sequence;
the registration condition of the at least one component includes: the component can store control values, the component has a calling function, the component has an upstream processing function, the component references can be returned, and when the component forms are generated by using the component, the component can be supported to be imported with any attribute.
2. The method of claim 1, wherein generating, according to the instantiated at least one component, a component form corresponding to the first request information according to the call order, includes:
determining call relations among the instantiated components according to the call sequence, and adding call information to the components with the call relations, wherein the call information is used for indicating the components to call the next component in the execution process;
and splicing the at least one component added with the calling information to generate the component form.
3. The method of claim 1, wherein the obtaining the first request information comprises:
Receiving an interactive operation, and determining a parameter name of at least one corresponding component according to the interactive operation;
And generating the first request information according to the parameter name of the at least one component.
4. The method of claim 1, wherein the component information includes identification and configuration information of the component; the instantiating the at least one component according to the component information of the at least one component includes:
Acquiring the class of the at least one component from a component registry according to the identification contained in the component information of the at least one component, wherein the component registry is used for indicating the corresponding relation between the components and the class of the components;
And instantiating the class of the at least one component according to configuration information contained in the component information of the at least one component to obtain the instantiated at least one component.
5. The method of claim 4, wherein the method further comprises:
Determining a component to be registered which meets a registration condition in at least one candidate component;
and acquiring the identification of the component to be registered and the class of the component to be registered, and adding the component to be registered into the component registry according to the identification of the component to be registered and the class of the component to be registered.
6. The method of claim 5, wherein the determining, among the at least one component, a component to be registered that satisfies a registration condition comprises:
And determining a component with a calling function and an upstream processing function as the component to be registered in the at least one candidate component, wherein the calling function is used for calling the next component, and the upstream processing function is used for returning to the last component.
7. The method according to any one of claims 1-6, wherein after the generating, according to the instantiated at least one component, a component form corresponding to the first request information according to the calling order, the method further includes:
And displaying a user interface corresponding to the component form according to the component form.
8. A method of data processing, comprising:
acquiring second request information;
Acquiring a corresponding component form according to the second request information, wherein the component form comprises component information of components, the components are at least one component which needs to be called for executing an operation corresponding to the second request information, and a calling sequence of the at least one component, the component form is generated according to the method of any one of claims 1-6, the component information of one component comprises configuration information of the component and parameter names of downstream components, the configuration information is used for instantiating classes of the component, and the parameter names of the downstream components are used for indicating the components which can be called by the component;
Invoking the at least one component to execute the operation corresponding to the second request information according to the invoking sequence indicated by the component form, and obtaining a processing result;
the registration condition of the at least one component includes: the component can store control values, the component has a calling function, the component has an upstream processing function, the component references can be returned, and when the component forms are generated by using the component, the component can be supported to be imported with any attribute.
9. The method of claim 8, wherein the component form includes a call relation between components, the calling the at least one component to execute the operation corresponding to the second request information according to the call order indicated by the component form, and obtaining a processing result includes:
And according to the calling relation among the components in the component form, sequentially calling the at least one component to execute the operation corresponding to the second request information, and obtaining the processing result.
10. A data processing apparatus, comprising:
the request module is used for acquiring first request information;
The component information module is used for acquiring component information and calling sequence of at least one component corresponding to the first request information in a preset database according to the first request information, wherein the component information of one component comprises configuration information of the component and parameter names of downstream components, the configuration information is used for instantiating classes of the component, and the parameter names of the downstream components are used for indicating the components which can be called by the component;
An instantiation module for instantiating the at least one component according to the component information of the at least one component;
The form module is configured to generate, according to the instantiated at least one component and according to the call sequence, a registration condition of the at least one component in the component form corresponding to the first request information, where the registration condition includes: the component can store control values, the component has a calling function, the component has an upstream processing function, the component references can be returned, and when the component forms are generated by using the component, the component can be supported to be imported with any attribute.
11. A data processing apparatus, comprising:
the request module is used for acquiring second request information;
The form module is configured to obtain a corresponding component form according to the second request information, where the component form includes component information of a component, the component is at least one component that needs to be called when an operation corresponding to the second request information is executed, and a calling sequence of the at least one component, the component form is generated according to the method of any one of claims 1-6, the component information of one component includes configuration information of the component and a parameter name of a downstream component, the configuration information is used to instantiate a class of the component, and the parameter name of the downstream component is used to indicate a component that can be called by the component;
The processing module is configured to call the at least one component to execute the operation corresponding to the second request information according to the call sequence indicated by the component form, and obtain a processing result, where the registration condition of the at least one component includes: the component can store control values, the component has a calling function, the component has an upstream processing function, the component references can be returned, and when the component forms are generated by using the component, the component can be supported to be imported with any attribute.
12. An electronic device, comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
the memory is configured to store at least one executable instruction, where the executable instruction causes the processor to perform operations corresponding to the data processing method according to any one of claims 1 to 7;
Or cause the processor to perform operations corresponding to the data processing method according to any one of claims 8 to 9.
13. A computer storage medium having stored thereon a computer program which when executed by a processor implements the data processing method according to any of claims 1-7;
Or which when executed by a processor implements a data processing method as claimed in any one of claims 8 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010606128.8A CN113326035B (en) | 2020-06-29 | 2020-06-29 | Data processing method, device, electronic equipment and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010606128.8A CN113326035B (en) | 2020-06-29 | 2020-06-29 | Data processing method, device, electronic equipment and computer storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113326035A CN113326035A (en) | 2021-08-31 |
CN113326035B true CN113326035B (en) | 2024-08-06 |
Family
ID=77413392
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010606128.8A Active CN113326035B (en) | 2020-06-29 | 2020-06-29 | Data processing method, device, electronic equipment and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113326035B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106687920A (en) * | 2014-09-02 | 2017-05-17 | 起元科技有限公司 | Managing invocation of tasks |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9128803B2 (en) * | 2010-12-15 | 2015-09-08 | Microsoft Technology Licensing, Llc | Application model for implementing composite applications |
AU2015312012B2 (en) * | 2014-09-02 | 2020-02-27 | Ab Initio Technology Llc | Compiling graph-based program specifications |
CN104699537B (en) * | 2015-03-18 | 2017-05-31 | 北京奇虎科技有限公司 | Control method and movable component dispatching method and its corresponding device |
CN108920246B (en) * | 2017-08-23 | 2021-09-21 | 北京五八信息技术有限公司 | Form draft component sharing method and device, terminal device and readable storage medium |
CN110059110B (en) * | 2019-04-12 | 2021-05-28 | 北京百度网讯科技有限公司 | Business data security processing method and device, computer equipment and storage medium |
CN110837369A (en) * | 2019-10-24 | 2020-02-25 | 山东中创软件工程股份有限公司 | Form generation method and device, electronic equipment and storage medium |
CN111191228A (en) * | 2019-12-20 | 2020-05-22 | 京东数字科技控股有限公司 | Service processing method and device, equipment and storage medium |
CN111080170B (en) * | 2019-12-30 | 2023-09-05 | 北京云享智胜科技有限公司 | Workflow modeling method and device, electronic equipment and storage medium |
-
2020
- 2020-06-29 CN CN202010606128.8A patent/CN113326035B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106687920A (en) * | 2014-09-02 | 2017-05-17 | 起元科技有限公司 | Managing invocation of tasks |
Also Published As
Publication number | Publication date |
---|---|
CN113326035A (en) | 2021-08-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8751558B2 (en) | Mashup infrastructure with learning mechanism | |
CN113312037B (en) | Data processing method, device, equipment and storage medium applied to micro-service | |
CN105354014B (en) | Application interface renders methods of exhibiting and device | |
US9189210B2 (en) | Using source code generated from a data model file to generate a graphical user interface from objects in a database | |
EP2958061A1 (en) | Method of developing an application for execution in a workflow management system and apparatus to assist with generation of an application for execution in a workflow management system | |
US9372885B2 (en) | System and methods thereof for dynamically updating the contents of a folder on a device | |
US20140082511A1 (en) | Method and system for emulating desktop software applications in a mobile communication network | |
CN111241454A (en) | Method, system and device for generating webpage code | |
CN111611357B (en) | Configuration method of man-machine conversation system, multi-round conversation configuration platform and electronic equipment | |
CN110955409B (en) | Method and device for creating resources on cloud platform | |
CN108197024B (en) | Embedded browser debugging method, debugging terminal and computer readable storage medium | |
US20240160410A1 (en) | Application Development Platform, Micro-program Generation Method, and Device and Storage Medium | |
US20180173520A1 (en) | Transactional distributed data analysis and transformation | |
CN112506854B (en) | Page template file storage and page generation methods, devices, equipment and media | |
CN111930290A (en) | Resource deployment method and device | |
CN111625312A (en) | APP skin changing method and device, electronic equipment and storage medium | |
CN110727429A (en) | Front-end page generation method, device and equipment | |
CN106873989A (en) | Application program building method and device | |
CN110764864A (en) | Terraform-based visual resource arrangement method | |
CN113326035B (en) | Data processing method, device, electronic equipment and computer storage medium | |
US11803609B2 (en) | Method and system for navigation control to select a target page from possible target pages | |
CN116048515A (en) | Virtual scene editing method, device, equipment and readable storage medium | |
CN110599112A (en) | Method and device for developing and maintaining network page | |
US8656293B1 (en) | Configuring mobile devices | |
CN103917944B (en) | The system and method for dynamic more new equipment Chinese part folder content |
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 | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40058029 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant |