Transcoding method, device, equipment, medium and program product

By converting JSP source code into JSON data and mapping it to the target component framework, the problem of difficult code combing in the upgrade of old JSP systems is solved, and efficient and low-cost front-end development is achieved.

CN120704675APending Publication Date: 2025-09-26INDUSTRIAL AND COMMERCIAL BANK OF CHINA +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510823910.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

When upgrading the old JSP system to a new technical framework structure with existing technology, front-end developers need to spend a lot of manpower and material resources to sort out the code structure and logic, resulting in low development efficiency and high cost.

Method used

Convert the standard source code of dynamic web page technology into JSON data, traverse the JSON data structure to obtain node information, and map it to the technical framework of the target component, generate the target component code, use the browser environment to preview and adjust, and use string splicing or template engine to generate the final code.

Benefits of technology

It realizes automatic code generation, reduces the reading and repetitive coding costs of front-end developers, and improves development efficiency and code accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120704675A_ABST
    Figure CN120704675A_ABST
Patent Text Reader

Abstract

The invention provides a transcoding method and device, equipment, a storage medium and a program product, relates to the technical field of software development, and particularly can be applied to front-end software development in the field of financial science and technology. The method comprises the following steps of: converting a dynamic webpage technical standard source code into JSON (JavaScript Object Notation) data; traversing a data structure of the JSON data to obtain JSON data node information; and mapping the JSON data node to a technical framework of the target component based on the JSON data node information, and generating a target component code.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software development technology, and can be specifically applied to front-end software development in the field of financial technology, and more specifically to a transcoding method, device, equipment, medium and program product. Background Art

[0002] With the development of internet technology, upgrading front-end systems based on the dynamic web page technology standard (JavaServer Pages, JSP) to newer frameworks (such as Vue+Element UI) can be done manually through recoding. However, upgrading legacy JSP systems requires a code structure that is tightly coupled with back-end technologies, making it difficult for front-end developers to understand the code. Even if they can understand it, it requires significant manpower and resources to analyze the code structure and logic, resulting in high costs. Summary of the Invention

[0003] In view of the above problems, the present application provides a transcoding method, apparatus, device, medium and program product that improve development efficiency and reduce development costs.

[0004] According to the first aspect of the present application, a transcoding method is provided, which includes: converting the dynamic web page technology standard source code into JSON data; traversing the data structure of the JSON data to obtain JSON data node information; and mapping the JSON data node to the technical framework of the target component based on the JSON data node information to generate the target component code.

[0005] According to an embodiment of the present application, converting the dynamic web page technology standard source code into JSON data includes: identifying the tags, types, attributes and node levels of the dynamic web page technology standard source code; data structure of the dynamic web page technology standard source code based on the tags, types, attributes and node levels; and converting the data structure into JSON data.

[0006] According to an embodiment of the present application, JSON data node information is mapped to the code structure of the target component to generate target component code, including: respectively corresponding the first label, first attribute value, first data, and first nested relationship in the JSON data node information to the second label, second attribute value, second data, and second nested relationship of the target component, mapping the JSON data node to a technical framework; and generating the target component code based on the mapped technical framework.

[0007] According to an embodiment of the present application, generating target component code based on the mapped technical framework includes: using string concatenation or a template engine to generate target component code based on the mapped technical framework.

[0008] According to an embodiment of the present application, the method further includes: before converting the dynamic web page technology standard source code into JSON data, running a dynamic web page development system in a browser environment to obtain the dynamic web page technology standard source code compiled by the browser.

[0009] According to an embodiment of the present application, the method further includes: previewing the target component code in a browser; and adjusting the target component code in the browser in response to a page effect corresponding to the target component code not meeting a preset condition.

[0010] According to an embodiment of the present application, the target components include at least: a form component, a table component, a layout component, and a list component.

[0011] The second aspect of the present application provides a transcoding device, which includes: a conversion module for converting dynamic web page technology standard source code into JSON data; an acquisition module for traversing the data structure of JSON data and obtaining JSON data node information; and a generation module for mapping JSON data nodes to the technical framework of the target component based on the JSON data node information and generating the target component code.

[0012] The third aspect of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0013] The fourth aspect of the present application further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the computer program or instructions are executed by a processor.

[0014] The fifth aspect of the present application further provides a computer program product, comprising a computer program or instructions, which implement the steps of the above method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The above contents and other objects, features and advantages of the present application will become more apparent through the following description of the embodiments of the present application with reference to the accompanying drawings, in which:

[0016] Figure 1 Schematically illustrates an application scenario diagram of the transcoding method, apparatus, device, medium, and program product according to an embodiment of the present application;

[0017] Figure 2 The following schematically shows a flow chart of a transcoding method according to an embodiment of the present application;

[0018] Figure 3 A flowchart of converting JSP source code into JSON data according to an embodiment of the present application is schematically shown;

[0019] Figure 4 A flowchart for generating target component code based on JSON data according to an embodiment of the present application is schematically shown;

[0020] Figure 5 A diagram schematically illustrates a mapping diagram of a technical framework of JSON data nodes and target components according to an embodiment of the present application;

[0021] Figure 6 A flowchart of a transcoding method according to another embodiment of the present application is schematically shown;

[0022] Figure 7 Schematically shows an interface diagram of a dynamic web page development system running in a browser environment according to an embodiment of the present application;

[0023] Figure 8 A schematic diagram of a transcoding device according to an embodiment of the present application is shown; and

[0024] Figure 9 A block diagram of an electronic device suitable for implementing the transcoding method according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION

[0025] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present application. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present application. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present application.

[0026] The terms used herein are only for describing specific embodiments and are not intended to limit this application. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0027] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0028] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0029] In the technical solution of this application, the user information involved (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0030] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided in the embodiments of the present application all provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.

[0031] In one example, to adapt to a wider range of browser versions, legacy SP system code was refactored, specifically the JSP front-end system, for upgrades and transformations. This could be achieved by manually analyzing the system code logic and, based on the JSP code and front-end display, manually restoring it 1:1 using the new framework technology. This approach requires careful analysis of the code structure and logic, and requires highly skilled front-end developers. The JSP code structure is tightly coupled with back-end technologies, including Structured Query Language (SQL), Java, Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), and JavaScript. This makes code reading extremely difficult for dedicated front-end developers. Perfectly restoring the front-end structure and logic from such a code structure requires significant manpower and time, resulting in low development efficiency and high development costs.

[0032] In view of this, embodiments of the present application provide a transcoding method, apparatus, device, medium, and program product. The method includes: converting standard source code for dynamic web page technology into JSON data; traversing the data structure of the JSON data to obtain JSON data node information; and mapping the JSON data nodes to a target component's technical framework based on the JSON data node information to generate target component code.

[0033] Figure 1 The application scenario diagram of the transcoding method, apparatus, device, medium and program product according to the embodiments of the present application is schematically shown.

[0034] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a dynamic web page development system 104, and a backend server 105. The first terminal device 101, the second terminal device 102, the third terminal device 103, and the dynamic web page development system 104 can be used for front-end development, and can be, for example, computers such as desktop computers and laptops, mobile devices such as smartphones and tablets, or debugging tools such as browser developer tools, simulators, and emulators. The web page development system 104 can run in the browser environment of the first terminal device 101, the second terminal device 102, and the third terminal device 103. The backend server 105 can be used for back-end development, collaborating with front-end development to provide technical support for the complete execution of the entire business process. The backend server 105 can communicate with the first terminal device 101, the second terminal device 102, and the third terminal device 103 via a network 106. The network 106 can include various connection types, such as wired or wireless communication links or fiber optic cables.

[0035] Front-end developers can develop front-end codes based on the first terminal device 101, the second terminal device 102, and the third terminal device 103. The dynamic web page development system 104 can transcode the JSP source code and use the obtained target component code to assist front-end developers, reduce repetitive coding work, and improve development efficiency.

[0036] It should be understood that Figure 1 The number of terminal devices and web page development systems in the figure is merely illustrative. Any number of terminal devices and web page development systems may be provided according to implementation requirements.

[0037] It should be noted that the forwarding method and device of the embodiment of the present application can be applied to the field of financial technology. With the explosive growth of related business volume in the field of financial technology, in order to meet the business needs of users, powerful background function codes are needed to support it. At this time, front-end code development and back-end code development are particularly important. For example, in order to be able to mine target users from a large number of users and make recommendations for corresponding financial products, etc., it is necessary to analyze a large amount of data, so that forms, tables, and lists are widely used. The development of the front-end code corresponding to the corresponding form components, table components, and list components is particularly important. In order to reduce the development cost of front-end developers and improve development efficiency, the transcoding method and device provided by the embodiment of the present application can be adopted to better meet the needs of financial business.

[0038] It should be noted that the transcoding method and device of the embodiment of the present application can be used in scenarios such as front-end code development in the financial field, and can also be used in any field other than the financial field, such as e-commerce, logistics, etc. The application field of the transcoding method and device of the present application is not limited.

[0039] The following will be based on Figure 1 The scene described by Figures 2 to 7 The transcoding method according to the embodiment of the present application is described in detail.

[0040] Figure 2 The flowchart of the transcoding method according to an embodiment of the present application is schematically shown.

[0041] like Figure 2 As shown, the transcoding of this embodiment includes operations S210 to S230, and the transcoding method can be performed by a code recognition and forwarding system deployed in a terminal.

[0042] In operation S210 , the dynamic web page technology standard source code is converted into JSON data.

[0043] In operation S220 , the data structure of the JSON data is traversed to obtain JSON data node information.

[0044] In operation S230 , the JSON data node is mapped to a technical framework of the target component based on the JSON data node information, and a target component code is generated.

[0045] In the embodiments of the present disclosure, the dynamic web page technology standard may be a technology for dynamically generating web page content, and the dynamic web page technology standard source code may be understood as source code written by dynamically generating web page content using the dynamic web page technology standard.

[0046] In the embodiments of this disclosure, JSON (JavaScript Object Notation) data may refer to a lightweight, text-based, language-independent data exchange format for transmitting structured data between clients and servers. It organizes data in key-value pairs. JSON data is characterized by readability, lightweight, cross-language support, and flexibility. In JSON data, a node is the basic unit of data structure, which can be an array or a value.

[0047] In the embodiments of the present disclosure, front-end development can be understood as the process of creating the user interface of an internet product. A front-end technical framework can be a reconfigurable design for the entire or partial technical system. A target component can be a reusable, independent module used to build a portion of the user interface. The target component code can be code used to dynamically generate webpage content displayed in the user interface based on the target component.

[0048] In the embodiment of the present application, the development language used for front-end development can be any one of JavaScript, HTML, and CSS.

[0049] It should be noted that the transcoding method can be run on the front end, that is, the identification, conversion, and code generation of the JSP source code can all be completed on the front end.

[0050] Through the transcoding method of the embodiment of the present application, the JSP source code is first converted into JSON data, which can automatically separate the code structure, style and logic. Then, based on the technical framework syntax of the target component, the JSON data node information is directly mapped to the technical framework syntax of the target component, and the framework code that meets the required components can be obtained without sorting out the code structure and logic, thereby realizing automatic code generation, reducing the development cost and reading cost of front-end personnel, reducing repetitive coding work, and improving development efficiency.

[0051] In some embodiments of the present application, converting the dynamic webpage technology standard source code into JSON data may include:

[0052] Identify the tags, types, attributes, and node hierarchies of standard source code for dynamic web page technologies.

[0053] A data structure based on the standard source code of tags, types, attributes and node hierarchy dynamic web page technology.

[0054] Figure 3 The flowchart of converting JSP source code into JSON data according to an embodiment of the present application is schematically shown.

[0055] like Figure 3As shown, for example, JavaScript can be used to identify the JSP source code's tags, types, attributes, node levels and other features to obtain the JSP source code structure, and generate JSON data according to the node level.

[0056] JSP source code tags can be used to embed dynamic content or syntax elements that perform specific functions in JSP pages. These tags enable developers to mix Java code and static content in HTML pages to generate dynamic web pages.

[0057] The types of JSP source code mainly refer to the different components or code structure categories that make up the JSP page. These types play their own unique roles in the development and operation of JSP pages. For example, they can include static content, JSP instructions, JSP script elements, JSP action tags, etc.

[0058] JSP source code attributes can be used to configure and control key parameters of tag behavior, directive scope, or script variable characteristics. These attributes are defined in JSP tags, directives, or script elements, and directly affect the dynamic behavior and output of the page.

[0059] The node hierarchy of JSP source code refers to the organization and nesting of elements within a page (such as HTML tags, JSP directives, action tags, script snippets, and EL expressions). This hierarchy describes the hierarchical layout from the root node to its child nodes. Understanding the node hierarchy helps developers master JSP page parsing logic, scope transfer, and dynamic content generation.

[0060] Through the transcoding method of the embodiment of the present application, the JSP source code is converted into a JSON structure based on tags, types, attributes and node hierarchies, which can ensure that dynamic logic and structure are not lost and integrity is guaranteed; it can support JSON data to regenerate functionally equivalent JSP or front-end code with reversibility; it can adapt to front-end frameworks and automated testing; it can improve code readability and reduce long-term maintenance costs.

[0061] In some embodiments of the present application, the JSON data node information is mapped to the code structure of the target component to generate the target component code. The card may include:

[0062] The first label, first attribute value, first data, and first nested relationship in the JSON data node information are respectively matched with the second label, second attribute value, second data, and second nested relationship of the target component, and the JSON data node is mapped to the technical framework.

[0063] Generate target component code based on the mapped technical framework.

[0064] Figure 4A flowchart for generating target component code based on JSON data according to an embodiment of the present application is schematically shown. Figure 5 A mapping diagram of the technical framework of JSON data nodes and target components according to an embodiment of the present application is schematically shown.

[0065] like Figure 4 and Figure 5 As shown, front-end developers can choose the technical framework to be used, select the appropriate component as the target component according to the user interface effect of the old JSP system, and then use JavaScript technology to traverse the data structure of the JSON object and obtain the JSON data node information. According to the component's code structure, tags, attribute values, data, nested relationships, etc., and one-to-one mapping with the node attribute values, JavaScript is used to generate new framework code, that is, the target component code, for the JSON data node according to the component's technical framework.

[0066] Through the transcoding method of the embodiment of the present application, mapping is performed based on tags, attributes, and nested relationships, and JSON nodes can be efficiently and accurately mapped to the target framework. Standardized components can be quickly generated according to the configuration file, reducing repetitive coding work and improving the accuracy and efficiency of transcoding.

[0067] In some embodiments of the present application, generating target component code based on the mapped technical framework may include:

[0068] Use string concatenation or template engine to generate target component code based on the mapped technical framework.

[0069] According to the embodiments of the present application, string concatenation can refer to concatenating code fragments to form a complete component code. The template engine can refer to the developer using the template file to generate the final code by replacing the placeholders or executing the template logic. After the JSP source code has been mapped to the new technical framework through data conversion and mapping, the code is still some fragments. Combined with string concatenation or template engine, the complete code after the JSP source code is transcoded can be obtained.

[0070] The transcoding method of the present application embodiment uses string concatenation or a template engine to generate the target component code. String concatenation is powerful and straightforward in generating dynamic content, making it suitable for lightweight dynamic content. Template engines provide clearer syntax, separate logic from views, and enhance code readability. This reduces development costs and improves efficiency.

[0071] In some embodiments of the present application, the transcoding method further includes:

[0072] Before converting the dynamic web page technology standard source code into JSON data, the dynamic web page development system is run in the browser environment to obtain the dynamic web page technology standard source code compiled by the browser.

[0073] For example, dynamic web page technology generates HTML files, CSS code, and JavaScript code on the server. After this code is sent to the browser, the browser further parses and executes it to form the final Document Object Model (DOM) structure. Use the browser developer tools to obtain the compiled source code. For example, the View Elements tab displays the browser-parsed DOM structure, including dynamically generated content; the View Source tab displays all JavaScript files loaded by the page, including embedded and externally linked scripts; and the Network tab displays all resource requests loaded by the page, including HTML, CSS, JavaScript, images, and so on.

[0074] Through the transcoding method of the embodiment of the present application, transcoding is performed in a browser environment, making the transcoding method more suitable for front-end development.

[0075] In some embodiments, the transcoding method may further include:

[0076] Preview the target component code in the browser.

[0077] In response to the page effect corresponding to the target component code not meeting a preset condition, the target component code is adjusted in the browser.

[0078] Figure 6 The following schematically shows a flow chart of a transcoding method according to another embodiment of the present application.

[0079] Figure 7 The following schematically shows an interface diagram of a dynamic web page development system running in a browser environment according to an embodiment of the present application.

[0080] like Figure 6 and Figure 7 As shown, compared with the transcoding method provided in the previous embodiment, the transcoding method of this embodiment further includes: based on the preview module (you can click Figure 7 The generated framework code, also known as the target component code, can be previewed using the preview control shown. If the target component code meets expectations, the code can be directly obtained. Otherwise, the framework code can be manually fine-tuned. Technical frameworks for the target component can include Vue and React, for example. Vue is a progressive framework for building user interfaces, while React is a JavaScript library for building user interfaces.

[0081] For example, first, preview the target component code: you can open the generated HTML file of the target component code in the browser, and use the browser's developer tools to check the page structure, style, and functions to ensure that the page loads normally and there are no obvious layout errors or functional deficiencies.

[0082] Next, compare the interface with the legacy JSP system: Open the corresponding page in the legacy JSP system. Take a screenshot in the browser or use developer tools to record its layout and style. Compare the page generated by the new framework code with the legacy system page item by item. Compare the layout structure (such as the navigation bar, sidebar, content area, etc.), style (such as color, font, spacing, alignment, etc.), and functional performance (such as form submission, button response, dynamic content loading, etc.).

[0083] Finally, determine whether it meets expectations: If the page generated by the new framework code is completely consistent with the old system in layout, style, and function, or has only minor differences, and these differences do not affect the user experience and system functions, then it is determined to be in line with expectations and you can click Figure 7 Download the control shown, download this code to the new technical framework for use, and ensure that the code can be compiled and run normally in the new technical framework.

[0084] If the page generated by the new framework code differs significantly from the old system in layout, style, or functionality, impacting the user experience or system functionality, return to the new framework code and manually fine-tune the code to correct the differences. Manual fine-tuning can include adjusting tags and attributes, adjusting styles, and adjusting functionality.

[0085] For example, you can use a text editor to open the generated framework code, adjust the HTML tags, CSS class names, IDs, etc. according to the comparison results to match the structure and style of the old JSP system, and ensure that the necessary attributes (such as class, id, style, data, etc.) are set correctly.

[0086] For example, adjusting styles might involve using a specific CSS framework or custom styles in the old JSP system, ensuring that the code generated by the new framework also references the same style files or copies the necessary style rules. You can use the browser's developer tools to dynamically adjust styles, observe the effects, and apply effective style changes to the code.

[0087] Adjusting functionality can mean: If the old JSP system includes JavaScript functionality (such as form validation and dynamic content loading), ensure that the code generated by the new framework also implements the same functionality. Check the JavaScript code to ensure that event listeners, function calls, etc. are consistent with the old system.

[0088] With the transcoding method of this embodiment, the transcoded code can be adjusted in real time by previewing the target component code in advance, thereby further ensuring the accuracy of the transcoded code.

[0089] Further, see Figure 7 , the target components include at least: form components, table components, layout components, and list components. That is, the transcoding method of the embodiment of the present application can be applied to components of various forms, and has greater applicability.

[0090] Based on the above transcoding method, this application also provides a transcoding device. Figure 8 The device is described in detail.

[0091] Figure 8 The structural block diagram of the transcoding device according to an embodiment of the present application is schematically shown.

[0092] like Figure 8 As shown, the transcoding device 800 of this embodiment includes a conversion module 810 , an acquisition module 820 and a generation module 830 .

[0093] The conversion module 810 is used to convert the dynamic webpage technology standard source code into JSON data. In one embodiment, the conversion module 810 can be used to perform the operation S210 described above, which will not be repeated here.

[0094] The acquisition module 820 is used to traverse the data structure of the JSON data and obtain the JSON data node information. In one embodiment, the acquisition module 820 can be used to perform the operation S220 described above, which will not be repeated here.

[0095] The generation module 830 is used to map the JSON data node to the target component's technical framework based on the JSON data node information and generate the target component code. In one embodiment, the generation module 830 can be used to perform the operation S230 described above, which will not be repeated here.

[0096] According to an embodiment of the present application, the conversion module 810 converts the dynamic webpage technology standard source code into JSON data, which may include: identifying the tags, types, attributes, and node hierarchy of the dynamic webpage technology standard source code; generating a data structure of the dynamic webpage technology standard source code based on the tags, types, attributes, and node hierarchy; and converting the data structure into JSON data.

[0097] According to an embodiment of the present application, the generation module 830 maps the JSON data node information to the code structure of the target component to generate the target component code, which may include: corresponding the first label, first attribute value, first data, and first nested relationship in the JSON data node information to the second label, second attribute value, second data, and second nested relationship of the target component, respectively, and mapping the JSON data node to the technical framework. The target component code is generated based on the mapped technical framework.

[0098] According to an embodiment of the present application, the generation module 830 generates the target component code based on the mapped technical framework, which may include: using string concatenation or a template engine to generate the target component code based on the mapped technical framework.

[0099] According to an embodiment of the present application, the acquisition module 820 may also be used to:

[0100] Before converting the dynamic web page technology standard source code into JSON data, the dynamic web page development system is run in the browser environment to obtain the dynamic web page technology standard source code compiled by the browser.

[0101] According to an embodiment of the present application, the transcoding device 800 further includes: a browsing and adjustment module for previewing the target component code in a browser; and adjusting the target component code in the browser in response to the page effect corresponding to the target component code not meeting a preset condition.

[0102] According to an embodiment of the present application, the target components include at least: a form component, a table component, a layout component, and a list component.

[0103] According to embodiments of the present application, any multiple modules among the conversion module 810, acquisition module 820, and generation module 830 may be combined into a single module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present application, at least one of the conversion module 810, acquisition module 820, and generation module 830 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or may be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of these. Alternatively, at least one of the conversion module 810, acquisition module 820, and generation module 830 may be at least partially implemented as a computer program module that, when executed, performs the corresponding functionality.

[0104] Figure 9 A block diagram of an electronic device suitable for implementing the transcoding method according to an embodiment of the present application is schematically shown.

[0105] like Figure 9 As shown, an electronic device 900 according to an embodiment of the present application includes a processor 901, which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 902 or programs loaded from a storage unit 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or related chipsets and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present application.

[0106] Various programs and data required for the operation of the electronic device 900 are stored in the RAM 903. The processor 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. The processor 901 performs various operations of the method flow according to the embodiment of the present application by executing the programs in the ROM 902 and / or the RAM 903. It should be noted that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flow according to the embodiment of the present application by executing the programs stored in the one or more memories.

[0107] According to an embodiment of the present application, electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to bus 904. Electronic device 900 may also include one or more of the following components connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 908 including a hard disk; and a communication section 909 including a network interface card such as a LAN card or modem. Communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. Removable media 911, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 910 as needed, so that computer programs read from the removable media can be installed into storage section 908 as needed.

[0108] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of this application is implemented.

[0109] According to an embodiment of the present application, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.

[0110] The embodiments of the present application also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided in the embodiments of the present application.

[0111] The computer program executes the above functions defined in the system / device of the embodiment of the present application when the processor 901 executes the computer program. According to the embodiment of the present application, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0112] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0113] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from a removable medium 911. When the computer program is executed by the processor 901, the above-mentioned functions defined in the system of the embodiment of the present application are performed. According to the embodiment of the present application, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.

[0114] According to an embodiment of the present application, the program code for executing the computer program provided by the embodiment of the present application can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).

[0115] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0116] Those skilled in the art will appreciate that the features described in the various embodiments of this application may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in this application. In particular, the features described in the various embodiments of this application may be combined and / or coupled in various ways without departing from the spirit and teachings of this application. All such combinations and / or couplings fall within the scope of this application.

Claims

1. A transcoding method, characterized in that: The method comprises: Convert dynamic web page technology standard source code into JSON data; Traversing the data structure of the JSON data to obtain JSON data node information; and A technical framework that maps JSON data nodes to target components based on JSON data node information and generates target component code.

2. The method according to claim 1, characterized in that The conversion of the dynamic webpage technical standard source code into JSON data includes: Identify the tags, types, attributes and node levels of the dynamic web page technology standard source code; Data structures based on the standard source code of tags, types, attributes, and node hierarchies for dynamic web page technologies; and Convert the data structure into JSON data.

3. The method according to claim 1, characterized in that The step of mapping the JSON data node information to the code structure of the target component to generate the target component code includes: Matching the first label, first attribute value, first data, and first nested relationship in the JSON data node information to the second label, second attribute value, second data, and second nested relationship of the target component, respectively, and mapping the JSON data node to the technical framework; and The target component code is generated based on the mapped technical framework.

4. The method according to claim 3, characterized in that The generating of the target component code based on the mapped technical framework includes: String concatenation or template engine is used to generate the target component code based on the mapped technical framework.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Before converting the dynamic web page technology standard source code into JSON data, a dynamic web page development system is run in a browser environment to obtain the dynamic web page technology standard source code compiled by the browser.

6. The method according to any one of claim 5, characterized in that The method further comprises: Previewing the target component code in the browser; and In response to the page effect corresponding to the target component code not meeting a preset condition, the target component code is adjusted in the browser.

7. The method according to claim 1, characterized in that The target components include at least: form components, table components, layout components, and list components.

8. A transcoding device, characterized in that: The device comprises: The conversion module is used to convert the dynamic web page technology standard source code into JSON data; An acquisition module, configured to traverse the data structure of the JSON data and obtain JSON data node information; and A generation module is used to map JSON data nodes to a technical framework of a target component based on JSON data node information and generate target component code.

9. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.