CN115756433A - Code platform migration method and device, electronic equipment and readable storage medium - Google Patents

Code platform migration method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN115756433A
CN115756433A CN202211488670.3A CN202211488670A CN115756433A CN 115756433 A CN115756433 A CN 115756433A CN 202211488670 A CN202211488670 A CN 202211488670A CN 115756433 A CN115756433 A CN 115756433A
Authority
CN
China
Prior art keywords
code platform
component
event
migrated
platform
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211488670.3A
Other languages
Chinese (zh)
Inventor
李宏亮
颜超亚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202211488670.3A priority Critical patent/CN115756433A/en
Publication of CN115756433A publication Critical patent/CN115756433A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the invention provides a code platform migration method and device, electronic equipment and a readable storage medium. According to the method, the establishment of the configuration information of the code platform to be migrated and the configuration information of the target code platform in the system is realized through a visual migration interface, the establishment of a conversion rule for converting the configuration information of the code platform to be migrated to the configuration information of the target code platform is realized, and after a first-field special language file of the code platform to be migrated is obtained, the first-field special language file is automatically converted into a second-field special language file of the target code platform according to the conversion rule.

Description

Code platform migration method and device, electronic equipment and readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for migrating a code platform, an electronic device, and a readable storage medium.
Background
The low-code technology provides visual development capability, the development threshold can be reduced, the online speed of business requirements of enterprises is greatly improved after the low-code technology is introduced, and the innovation capability of the enterprises is improved.
At present, a plurality of low-code platforms may coexist in different departments inside an enterprise, or an old low-code platform may be replaced with a new low-code platform, which results in that a file migration requirement between the low-code platforms exists at present to meet mutual compatibility between the platforms, and the file migration requirement may be implemented in a manual migration manner at present.
However, different low-code technology architectures may be completely different, making manual migration very costly and inefficient.
Disclosure of Invention
The invention provides a code platform migration method, a code platform migration device, an electronic device and a readable storage medium, and aims to solve the technical problems of high cost and low efficiency caused by existing manual migration.
In a first aspect, the present invention provides a migration method of a code platform, where the method includes:
in response to the creation instruction, creating configuration information of the code platform to be migrated and configuration information of the target code platform in a creation interface;
responding to a configuration instruction, and setting a conversion rule for converting the configuration information of the code platform to be migrated to the configuration information of the target code platform in a configuration interface; (ii) a
And after the first domain specific language file of the code platform to be migrated is obtained, converting the first domain specific language file into a second domain specific language file of the target code platform according to the conversion rule.
In a second aspect, the present invention provides an apparatus for migrating a code platform, the apparatus comprising:
the creating module is used for responding to a creating instruction and creating the configuration information of the code platform to be migrated and the configuration information of the target code platform in a creating interface;
the setting module is used for responding to a configuration instruction and setting a conversion rule for converting the configuration information of the code platform to be migrated to the configuration information of the target code platform in a configuration interface;
and the conversion module is used for converting the first domain specific language file into a second domain specific language file of the target code platform according to the conversion rule after the first domain specific language file of the code platform to be migrated is obtained.
In a third aspect, the present invention provides an electronic device comprising: a processor, a memory and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the migration method of the code platform when executing the program.
In a fourth aspect, the present invention provides a readable storage medium, wherein instructions of the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the migration method of the code platform.
In the embodiment of the invention, the establishment of the configuration information of the code platform to be migrated and the configuration information of the target code platform are realized through a visual migration interface, the establishment of the conversion rule for converting the configuration information of the code platform to be migrated into the configuration information of the target code platform is realized, and after the first-field special language file of the code platform to be migrated is obtained, the first-field special language file is automatically converted into the second-field special language file of the target code platform according to the conversion rule.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating steps of a method for migrating a code platform according to an embodiment of the present invention;
fig. 2 is a diagram of an implementation scenario provided by the embodiment of the present invention;
FIG. 3 is a flowchart illustrating steps of a method for migrating a code platform according to an embodiment of the present invention;
FIG. 4 is a flow chart of the creation of a code platform according to an embodiment of the present invention;
FIG. 5 is a flow chart of a rule configuration of a code platform according to an embodiment of the present invention;
FIG. 6 is a flow chart of migration of a code platform according to an embodiment of the present invention;
FIG. 7 is a block diagram of a migration apparatus for a code platform according to an embodiment of the present invention;
fig. 8 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of steps of a migration method of a code platform according to an embodiment of the present invention, and as shown in fig. 1, the method may include:
step 101, responding to a creating instruction, and creating configuration information of a code platform to be migrated and configuration information of a target code platform in a creating interface.
In the embodiment of the invention, low Code (Low Code) is a visual application development method, the application program is delivered at a higher speed by using less Code, and the Code which a programmer does not want to develop is automated, which is called Low Code, and a Low Code platform is a platform for developing and using Low Code files. The low-code platform can realize rapid construction and data arrangement based on more efficient modes such as graphical dragging, parametric configuration and the like, so that scene application innovation in digital transformation is realized through a small amount of codes or no codes. The configuration capability of the low-code platform provides a templated configuration that can be quickly revised based on the template to form a desired external low-code platform configuration. The low-code platform configuration capability also provides a batch import mode, a template form can be downloaded, the configuration of related components, events and the like can be added and revised on the template form, and then the configuration is imported through a visual interface.
Specifically, referring to fig. 2, an application scenario diagram of a migration method of a code platform provided in an embodiment of the present invention is shown, where the application scenario of the migration method of the code platform may include: the system comprises a migration service end, a working service end 1 and a working service end 2, wherein a code platform to be migrated is deployed in the working service end 1, a target code platform is deployed in the working service end 2, a configuration management module and a conversion engine module are deployed in the migration service end, and the configuration management module comprises: platform configuration service, template configuration service, component library configuration service, event configuration service, component mapping service and event mapping service; the conversion engine module comprises a conversion processing service, a component conversion service and an event conversion service. The migration server is configured to convert the first domain specific language file of the code platform to be migrated into a second domain specific language file that can be directly used by the target code platform, and send the second domain specific language file to the work server 2. Certainly, the migration server may also be integrally deployed in the work server 1 or the work server 2, which is not limited in this embodiment of the present invention.
In this step, the platform migration software of the migration service end may provide a creation interface, and create configuration information of the code platform to be migrated and configuration information of the target code platform in the creation interface through the platform configuration service, the template configuration service, the component library configuration service, and the event configuration service based on a response of the creation instruction. Specifically, the compatible use of the files of different low-code platforms relates to the compatible use of components, events and page templates of different low-code platforms, and the configuration information configured in the configuration process includes basic information of the code platform to be migrated, a component library, an event library and a page template used by the code platform to be migrated, and basic information of a target code platform, a component library, an event library and a page template used by the code platform to be migrated; after the configuration information is created, the initial creation of the two platforms is considered to be completed at the migration server. The creation of the configuration information supports visualization operations, such as visualization input, visualization import data operation, and the like.
Step 102, responding to a configuration instruction, and setting a conversion rule for converting the configuration information of the code platform to be migrated to the configuration information of the target code platform in a configuration interface.
In the embodiment of the present invention, after the configuration information of the code platform to be migrated and the configuration information of the target code platform are created, the platform migration software of the migration server may further provide a visual conversion rule configuration to configure a conversion rule for converting the configuration information of the code platform to be migrated to the configuration information of the target code platform.
Specifically, the configuration of the conversion rule also includes: the method comprises the steps of converting a component library of a code platform to be migrated into a component library of a target code platform, converting an event library of the code platform to be migrated into an event library of the target code platform, and converting a template of the code platform to be migrated into a template of the target code platform. Wherein the creation of the transformation rules also supports visualization operations.
Step 103, after obtaining the first domain specific language file of the code platform to be migrated, converting the first domain specific language file into a second domain specific language file of the target code platform according to the conversion rule.
In the embodiment of the present invention, after the migration service end completes the configuration information of the code platform to be migrated and the target code platform and the setting of the conversion rule in the platform migration software, the migration service end may further upload a first Domain Specific Language (DSL) file of the code platform to be migrated in the platform migration software. DSL is a computer language created specifically for a particular problem and domain, and in embodiments of the present invention, the architectures of different low-code platforms may be completely different, so that the DSL language on which the files of different low-code platforms are based may also be different.
After the first domain specific language file of the code platform to be migrated is obtained, the platform migration software may convert the first domain specific language file into a second domain specific language file of the target code platform according to a conversion rule based on a conversion engine module, and the whole conversion includes component library conversion, event library conversion, template conversion, and the like. After the conversion is completed, the file of the code platform to be migrated can be compatibly used on the target code platform without obstacles.
In summary, according to the migration method of the code platform provided in the embodiment of the present invention, the creation of the configuration information of the code platform to be migrated and the creation of the configuration information of the target code platform in the code platform to be migrated and the creation of the conversion rule for converting the configuration information of the code platform to be migrated to the configuration information of the target code platform are realized through the visual migration interface, and after the first domain specific language file of the code platform to be migrated is obtained, the first domain specific language file is automatically converted into the second domain specific language file of the target code platform according to the conversion rule.
Fig. 3 is a flowchart of specific steps of a migration method for a code platform according to an embodiment of the present invention, and as shown in fig. 3, the method may include:
step 201, setting respective basic information of the code platform to be migrated and the target code platform in the creation interface.
Wherein the basic information comprises: one or more of a platform name, a platform code, a platform description, a file directory.
In the embodiment of the present invention, the migration server may first start the platform migration software, and set respective basic information of the configuration information of the code platform to be migrated and the configuration information of the target code platform in the creation interface, where the basic information includes, but is not limited to, a platform name, a platform code, a platform description, a file directory, and the like, and the basic information is used to describe the content of the corresponding low code platform, so that the low code platform has the corresponding identifier, code, file storage directory, and the like, so as to subsequently process the low code platform.
Step 202, in the creation interface, creating event libraries of the code platform to be migrated and the target code platform respectively.
Wherein, the event library comprises one or more of event name, event code, event description and event attribute of the event.
In the embodiment of the invention, in order to realize the code development with high efficiency and low code amount, the event library can be introduced to assist the code development, that is, a developer can rapidly introduce an event from the event library to compile the code, however, the event libraries used by the low code platforms with different architectures are different, so that the migration of the event library needs to be completed when the code platform migrates, so that the target code platform can be used compatibly for the event library of the code platform to be migrated.
Therefore, in the embodiment of the invention, event libraries of the code platform to be migrated and the target code platform need to be constructed first, and the construction of the event libraries can be imported in a visualized batch manner and can also be configured one by one in a creation interface.
Step 203, in the creation interface, creating respective component libraries of the code platform to be migrated and the target code platform.
Wherein, the component library comprises one or more of component name, component code, component description, component attribute, component style and component event of the component.
In the embodiment of the invention, in order to realize the code development with high efficiency and low code amount, the low-code platform can introduce the component library to assist the code development, that is, a developer can quickly introduce mature component modules from the component library to compile codes, but the component libraries used by the low-code platforms with different architectures are different, so that the migration of the component library needs to be completed when the code platform is migrated, so that the target code platform can be used compatibly for the component library of the code platform to be migrated.
Therefore, in the embodiment of the invention, the respective component libraries of the code platform to be migrated and the target code platform need to be constructed, and the component libraries can be constructed through visual batch import and can also be configured one by one in a creation interface.
And 204, creating page templates of the code platform to be migrated and the target code platform in the creation interface.
The page template comprises one or more of page basic information, a page component list and a page event.
Furthermore, the low code platform is a visual code compiling platform, so that the low code platform has corresponding compiling interfaces, the compiling interfaces of different low code platforms are possibly different, and in order to meet the compatibility and intercommunication of different low code platforms, the embodiment of the invention can also complete the migration between the respective page templates of the code platform to be migrated and the target code platform, so as to ensure that the file of the code platform to be migrated can be displayed and used under the interface of the target code platform. Therefore, in the embodiment of the invention, the respective page templates of the code platform to be migrated and the target code platform need to be constructed, and the page templates can be constructed through visual batch import or can be configured one by one in the creation interface.
In addition, the page target may also establish an association with the event library and the component library in addition to the page basic information, that is, the page template may also include a list of used page components, page events, and the like.
In summary, referring to fig. 4, it shows a flowchart of creating a code platform according to an embodiment of the present invention, including: step 1.1, configuring basic information of a low-code platform; step 1.2, configuring a component library of a low-code platform; step 1.3, configuring an event library of a low-code platform; and step 1.4, configuring a page template of the low-code platform.
Step 205, in the configuration interface, setting one or more of a rule name, a rule description and a storage directory of the conversion rule.
Wherein the conversion rule comprises: component transformation rules and event transformation rules.
In this step, after the configuration information of the code platform to be migrated and the configuration information of the target code platform are created, a conversion rule for converting the configuration information of the code platform to be migrated to the configuration information of the target code platform needs to be configured next.
Step 206, in the configuration interface, setting a component mapping relationship between the component of the code platform to be migrated and the component of the target code platform in the component conversion rule.
In the embodiment of the present invention, in order to implement efficient and low-code-amount code development, a component library may be introduced to assist code development, and migration between different low-code platforms requires a migration process of converting a component of a code platform to be migrated to a component of a target code platform, and the component migration process may be automatically implemented based on a component mapping relationship in a conversion rule, where the component mapping relationship includes, but is not limited to, component name mapping, component attribute mapping, and component style mapping.
That is, in the step, in the configuration interface, a component mapping relationship between the component of the code platform to be migrated and the component of the target code platform in the component conversion rule is set, and the component of the code platform to be migrated can be automatically converted into the component of the target code platform subsequently through the component mapping relationship.
Step 207, in the configuration interface, setting an event mapping relationship between the event of the code platform to be migrated and the event of the target code platform in the event conversion rule.
Optionally, the component mapping relationship includes one or more of a component name mapping, a component attribute mapping, and a component style mapping; the event mapping relation comprises one or more of an event name mapping and an event attribute mapping.
In the embodiment of the present invention, in order to implement efficient and low-code-amount code development, an event library may be introduced to assist code development, and migration between different low-code platforms requires a migration process of converting an event of a code platform to be migrated to an event of a target code platform, and the event migration process may be automatically implemented based on an event mapping relationship in a conversion rule, where the event mapping relationship includes, but is not limited to, event name mapping and event attribute mapping.
In the step, in a configuration interface, an event mapping relationship between an event of the code platform to be migrated and an event of the target code platform in the event conversion rule is set, and the event of the code platform to be migrated can be automatically converted into the event of the target code platform subsequently through the event mapping relationship.
It should be noted that, because the page template of the low-code platform includes the used event and component, while configuring the event mapping relationship and the component mapping relationship, the mapping relationship between the page template of the code platform to be migrated and the page template of the target code platform may also be established, and then the page template of the code platform to be migrated and the page template of the target code platform may be found through the mapping relationship, and then the component and the event may be migrated between the page templates of the two platforms.
In summary, referring to fig. 5, it shows a flowchart of rule configuration of a code platform according to an embodiment of the present invention, including: step 3.1, mapping rule basic information is configured; step 3.2, configuring wood template information mapping; step 3.3, configuring component mapping; step 3.4, event mapping is configured.
And 208, after the first domain specific language file of the code platform to be migrated is obtained, creating a context calling file in the configuration interface.
In practical application, before the execution stage, the compiled code has a preloading process, which aims to establish the execution environment of the current code, and the execution environment is context (context), and the establishment of the context is also called the establishment of the execution environment, and the compiled code is executed after the context is established; the context calling is also called a method borrowing mode and is divided into application and call; the call method may call a function and may specify the this point of the function; the application method functions similarly to the call method, with one difference that the application method accepts an array containing multiple parameters, while the call method accepts a list of parameters. Each time a function is called, the parser passes a context object (this) as an implicit parameter into the function
In the embodiment of the present invention, after obtaining the first domain-specific language file of the code platform to be migrated, in order to convert the first domain-specific language file of the code platform to be migrated into the second domain-specific language file usable by the target code platform, the service end to be migrated first needs to create an execution environment through the conversion engine module, that is, create the context call file in the configuration interface.
Step 209, obtaining the first domain specific language file according to the file directory corresponding to the configuration information of the code platform to be migrated, and analyzing the first domain specific language file into a first JSON object.
In the embodiment of the present invention, the first domain specific language file is stored in the file directory defined in the configuration information of the code platform to be migrated, so that the first domain specific language file can be acquired from the file directory, the first domain specific language file is parsed into a first JSON (JSON Object Notation) Object, and after the first domain specific language file is parsed into the JSON, the data in the first domain specific language file can be clearly and indirectly stored and represented through uniform JSON-format data, thereby improving the data processing efficiency.
Step 210, loading the configuration information of the code platform to be migrated, the configuration information of the target code platform, the conversion rule and the first JSON object to the context call file.
In the embodiment of the invention, the configuration information of the code platform to be migrated, the configuration information of the target code platform, the conversion rule and the first JSON object can be loaded to the created context call file, so that the construction of the migration execution environment is completed.
And step 211, operating the context calling file, and converting the first JSON object to obtain a second JSON object.
In the embodiment of the invention, the operating context calling file is improved, the first JSON object can be converted according to the conversion rule to obtain the second JSON object corresponding to the target code platform, and the process relates to the mapping conversion of the components and the events in the JSON (the conversion of the page template between the two platforms is realized after the conversion of the components and the events).
Optionally, step 211 may specifically include:
a substep 2111 of converting the basic information in the first JSON object into the basic information of the second JSON object according to the conversion rule; the components in the first JSON object form a first component tree.
And a substep 2112 of performing component conversion and event conversion in the component on each node in the first component tree from a root node according to the component conversion rule and the event conversion rule to obtain a second component tree of the second JSON object.
And a substep 2113 of constructing the second component tree of the second JSON object and the basic information of the second JSON object into the second JSON object.
Optionally, the component conversion includes: one or more of component transcoding, component property conversion, and component style conversion; the event transition includes: event transcoding, event attribute conversion.
In this embodiment of the present invention, for sub-steps 2111 to 2113, referring to fig. 6, it illustrates a migration flowchart of a code platform provided in this embodiment of the present invention, including: step A.1, creating a context; step A.2, converting template information and template events; step A.3, recursively analyzing the component tree of the JSON object until the component tree has no lower level components; step A.4, component conversion: converting basic information, attributes and styles; step A.5, event conversion: event conversion is carried out when an event exists under the component; and step A.6, returning the converted JSON object.
Specifically, after the context is constructed in the whole conversion process, the page template conversion can be performed on the first-domain specific language file of the code platform to be migrated, that is, the conversion of the template basic information and the event in the template is completed; then, because the components of the page template of the low-code platform exist in the form of a tree structure, the component tree of the template needs to be recursively analyzed, the tree is traversed from the root node to the leaf nodes of the tree, all the components used by the page template of the first domain specific language file are found, and then the components of the first domain specific language file of the code platform to be migrated are converted into the components used by the target code platform and the events quoted in the components of the code platform to be migrated are converted into the events used by the target code platform according to the component mapping relationship and the event mapping relationship respectively configured in steps 206 and 207, so that the migration is completed, and the second JSON object is obtained.
And 212, coding the second JSON object into the second field special language file.
In the process, the second JSON object is bottom-layer logic data in the JSON form, and in order that the second JSON object can be used on the target code platform, the second JSON object needs to be converted into a second domain specific language file, and the DSL of the second domain specific language file is the DSL used by the target code platform.
And 213, storing the second domain specific language file to a file directory corresponding to the configuration information of the object code platform.
And finally, storing the second field special language file to a file directory corresponding to the configuration information of the target code platform, so that the target code platform can call the second field special language file for compatible use, and migration intercommunication between the code platform to be migrated and the target code platform is achieved.
In summary, according to the migration method of the code platform provided in the embodiment of the present invention, the creation of the configuration information of the code platform to be migrated and the creation of the configuration information of the target code platform in the code platform to be migrated and the creation of the conversion rule for converting the configuration information of the code platform to be migrated to the configuration information of the target code platform are realized through the visual migration interface, and after the first domain specific language file of the code platform to be migrated is obtained, the first domain specific language file is automatically converted into the second domain specific language file of the target code platform according to the conversion rule.
Fig. 7 is a block diagram of a migration apparatus of a code platform according to an embodiment of the present invention, where the apparatus may include:
the creating module 301 is configured to create, in response to the creating instruction, configuration information of the code platform to be migrated and configuration information of the target code platform in a creating interface;
a setting module 302, configured to set, in response to a configuration instruction, a conversion rule for converting the configuration information of the code platform to be migrated to the configuration information of the target code platform in a configuration interface;
the conversion module 303 is configured to, after obtaining the first domain specific language file of the code platform to be migrated, convert the first domain specific language file into a second domain specific language file of the target code platform according to the conversion rule.
Optionally, the creating module 301 is specifically configured to:
setting respective basic information of the code platform to be migrated and the target code platform in the creation interface;
in the creation interface, creating event libraries of the code platform to be migrated and the target code platform respectively;
in the creation interface, creating component libraries of the code platform to be migrated and the target code platform respectively;
and in the creation interface, creating page templates of the code platform to be migrated and the target code platform respectively.
Optionally, the basic information includes: one or more of a platform name, a platform code, a platform description, and a file directory;
the event library comprises one or more of event names, event codes, event descriptions and event attributes of events;
the component library comprises one or more of component names, component codes, component descriptions, component attributes, component styles and component events of the components;
the page template comprises one or more of page basic information, a page component list and a page event.
Optionally, the conversion rule includes: component conversion rules and event conversion rules;
the setting module 302 is specifically configured to:
setting one or more of a rule name, a rule description and a storage directory of the conversion rule in the configuration interface;
in the configuration interface, setting a component mapping relation between a component of the code platform to be migrated and a component of the target code platform in the component conversion rule;
and in the configuration interface, setting an event mapping relation between the event of the code platform to be migrated and the event of the target code platform in the event conversion rule.
Optionally, the component mapping relationship includes one or more of a component name mapping, a component attribute mapping, and a component style mapping; the event mapping relation comprises one or more of an event name mapping and an event attribute mapping.
Optionally, the conversion module 303 is specifically configured to:
creating a context calling file;
acquiring the first domain specific language file according to the file directory corresponding to the configuration information of the code platform to be migrated, and analyzing the first domain specific language file into a first JSON object;
loading the configuration information of the code platform to be migrated, the configuration information of the target code platform, the conversion rule and the first JSON object to the context calling file;
operating the context calling file, and converting the first JSON object to obtain a second JSON object;
encoding the second JSON object into the second domain-specific language file;
and storing the second domain specific language file to a file directory corresponding to the configuration information of the target code platform.
Optionally, the conversion module 303 is specifically configured to:
converting the basic information in the first JSON object into the basic information of the second JSON object according to the conversion rule; the components in the first JSON object form a first component tree;
according to the component conversion rule and the event conversion rule, starting from a root node, performing component conversion and event conversion in a component on each node in the first component tree to obtain a second component tree of the second JSON object;
and forming the second component tree of the second JSON object and the basic information of the second JSON object into the second JSON object.
Optionally, the component conversion includes: one or more of component transcoding, component attribute conversion, and component style conversion;
the event transition includes: event transcoding, event attribute conversion.
In summary, according to the migration method of the code platform provided in the embodiment of the present invention, the creation of the configuration information of the code platform to be migrated and the creation of the configuration information of the target code platform in the code platform to be migrated and the creation of the conversion rule for converting the configuration information of the code platform to be migrated to the configuration information of the target code platform are realized through the visual migration interface, and after the first domain specific language file of the code platform to be migrated is obtained, the first domain specific language file is automatically converted into the second domain specific language file of the target code platform according to the conversion rule.
The present invention also provides an electronic device, see fig. 8, including: a processor 901, a memory 902 and a computer program 9021 stored on and executable on the memory, which when executed by the processor implements the migration method of the code platform of the foregoing embodiments.
The present invention also provides a readable storage medium, wherein when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the migration method of the code platform of the foregoing embodiment.
For the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
It should be noted that various information and data acquired in the embodiment of the present invention are acquired under the authorization of the information/data holder.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed to reflect the intent: rather, the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore, may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in a sequencing device according to the present invention. The present invention may also be embodied as an apparatus or device program for carrying out a part or all of the methods described herein. Such programs implementing the present invention may be stored on a computer readable medium or may be in the form of one or more signals. Such a signal may be downloaded from an internet website, or provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The user information (including but not limited to the device information of the user, the personal information of the user, etc.), the related data, etc. related to the present invention are all information authorized by the user or authorized by each party.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (11)

1. A method for migrating a code platform, the method comprising:
in response to the creation instruction, creating configuration information of the code platform to be migrated and configuration information of the target code platform in a creation interface;
responding to a configuration instruction, and setting a conversion rule for converting the configuration information of the code platform to be migrated to the configuration information of the target code platform in a configuration interface;
and after the first domain specific language file of the code platform to be migrated is obtained, converting the first domain specific language file into a second domain specific language file of the target code platform according to the conversion rule.
2. The method of claim 1, wherein creating the configuration information of the code platform to be migrated and the configuration information of the target code platform in the creation interface comprises:
setting respective basic information of the code platform to be migrated and the target code platform in the creation interface;
in the creation interface, creating event libraries of the code platform to be migrated and the target code platform respectively;
in the creation interface, creating component libraries of the code platform to be migrated and the target code platform respectively;
and in the creation interface, creating page templates of the code platform to be migrated and the target code platform respectively.
3. The method of claim 2, wherein the basic information comprises: one or more of a platform name, a platform code, a platform description, and a file directory; (ii) a
The event library comprises one or more of event names, event codes, event descriptions and event attributes of events;
the component library comprises one or more of component names, component codes, component descriptions, component attributes, component styles and component events of the components;
the page template comprises one or more of page basic information, a page component list and a page event.
4. A method according to claim 2 or 3, wherein the transformation rules comprise: component conversion rules and event conversion rules;
setting a conversion rule for converting the configuration information of the code platform to be migrated to the configuration information of the target code platform in a configuration interface in response to a configuration instruction, wherein the conversion rule comprises:
setting one or more of a rule name, a rule description and a storage directory of the conversion rule in the configuration interface;
in the configuration interface, setting a component mapping relation between a component of the code platform to be migrated and a component of the target code platform in the component conversion rule;
and in the configuration interface, setting an event mapping relation between the event of the code platform to be migrated and the event of the target code platform in the event conversion rule.
5. The method of claim 4, wherein the component mapping relationship comprises one or more of a component name mapping, a component attribute mapping, and a component style mapping; the event mapping relation comprises one or more of an event name mapping and an event attribute mapping.
6. The method of claim 4, wherein said converting the first domain-specific language file to a second domain-specific language file of the object code platform according to the conversion rules comprises:
creating a context calling file;
acquiring the first domain specific language file according to the file directory corresponding to the configuration information of the code platform to be migrated, and analyzing the first domain specific language file into a first JSON object;
loading the configuration information of the code platform to be migrated, the configuration information of the target code platform, the conversion rule and the first JSON object to the context calling file;
operating the context calling file, and converting the first JSON object to obtain a second JSON object;
encoding the second JSON object into the second domain-specific language file;
and storing the second domain specific language file to a file directory corresponding to the configuration information of the target code platform.
7. The method of claim 6, wherein the converting the first JSON object to obtain the second JSON object according to the context call file comprises:
converting the basic information in the first JSON object into the basic information of the second JSON object according to the conversion rule; the components in the first JSON object form a first component tree;
according to the component conversion rule and the event conversion rule, starting from a root node, performing component conversion and event conversion in a component on each node in the first component tree to obtain a second component tree of the second JSON object;
and forming the second component tree of the second JSON object and the basic information of the second JSON object into the second JSON object.
8. The method of claim 7, wherein the component transformation comprises: one or more of component transcoding, component property conversion, and component style conversion;
the event transition includes: event transcoding, event attribute conversion.
9. An apparatus for migrating a code platform, the apparatus comprising:
the creating module is used for responding to a creating instruction and creating the configuration information of the code platform to be migrated and the configuration information of the target code platform in a creating interface;
the setting module is used for responding to a configuration instruction and setting a conversion rule for converting the configuration information of the code platform to be migrated to the configuration information of the target code platform in a configuration interface;
and the conversion module is used for converting the first domain specific language file into a second domain specific language file of the target code platform according to the conversion rule after the first domain specific language file of the code platform to be migrated is obtained.
10. 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 method of any of claims 1-8 when executing the program.
11. A readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any of claims 1-8.
CN202211488670.3A 2022-11-22 2022-11-22 Code platform migration method and device, electronic equipment and readable storage medium Pending CN115756433A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211488670.3A CN115756433A (en) 2022-11-22 2022-11-22 Code platform migration method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211488670.3A CN115756433A (en) 2022-11-22 2022-11-22 Code platform migration method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN115756433A true CN115756433A (en) 2023-03-07

Family

ID=85337896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211488670.3A Pending CN115756433A (en) 2022-11-22 2022-11-22 Code platform migration method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115756433A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116414447A (en) * 2023-05-17 2023-07-11 北京比格大数据有限公司 Cross-architecture migration method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116414447A (en) * 2023-05-17 2023-07-11 北京比格大数据有限公司 Cross-architecture migration method and device, electronic equipment and storage medium
CN116414447B (en) * 2023-05-17 2023-09-22 北京比格大数据有限公司 Cross-architecture migration method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
EP3631618B1 (en) Automated dependency analyzer for heterogeneously programmed data processing system
US10481884B2 (en) Systems and methods for dynamically replacing code objects for code pushdown
US9037595B2 (en) Creating graphical models representing control flow of a program manipulating data resources
US20240045850A1 (en) Systems and methods for database orientation transformation
CN110244942B (en) Page generation method, device and system
US9524279B2 (en) Help document animated visualization
CN111427561A (en) Service code generation method and device, computer equipment and storage medium
CN115617327A (en) Low code page building system, method and computer readable storage medium
CN109408354B (en) Data processing method and device for application component
CN110515620B (en) Automatic resource processing method and system
US8615729B2 (en) Extending existing model-to-model transformations
CN112328229A (en) Method for quickly creating Jenkins assembly line
CN115756433A (en) Code platform migration method and device, electronic equipment and readable storage medium
CN113934429B (en) Design draft conversion method and device, computer equipment and storage medium
CN112861059A (en) Visual component generation method and device, computer equipment and readable storage medium
CN112068879A (en) Method and device for constructing client application development framework based on configuration
CN114254068B (en) Data transfer method and system
CN111309332A (en) File content on-demand loading method and device, electronic equipment and storage medium
CN113885844A (en) Business service arranging method and related device
CN111124386B (en) Animation event processing method, device, equipment and storage medium based on Unity
CN107506299B (en) Code analysis method and terminal equipment
CN111782196A (en) MVP architecture-based development method and device
CN116185425B (en) Event flow arrangement method, device, equipment and medium based on node combination
CN116431142B (en) High-efficiency programming method capable of being quickly constructed and not prone to error
Winetzhammer et al. ModGraph meets Xcore: Combining rule-based and procedural behavioral modeling for EMF

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