Method, device and equipment for synchronizing front end and rear end of page development based on configuration file and medium

Through the automatic synchronization update of configuration files and the collaborative work of front-end and back-end, the effect of intuitively rendering the page without writing code is achieved, which solves the problem of low development efficiency in the existing technology and improves the efficiency and accuracy of page development.

CN118567640APending Publication Date: 2024-08-30GUANGZHOU YIHU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410488472.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-23
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing front-end development software requires developers to have high professional skills and is inefficient. It is impossible to visually see the page development effect and render the page correctly without writing code.

Method used

Through the front-end and back-end synchronization method of page development based on configuration files, the package management tool private library is used to realize automatic synchronization update of configuration files. The front-end visually edits and generates page rendering requests. The back-end determines the target file based on the configuration file version number and component library directory. render.

Benefits of technology

It improves the synchronization efficiency and usage accuracy of configuration files, ensures that the back-end successfully renders the front-end page editing results, reduces development difficulty and improves efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567640A
    Figure CN118567640A
Patent Text Reader

Abstract

The invention discloses a page development front and back end synchronization method and device based on a configuration file, equipment and a medium, and belongs to the technical field of Internet. The method comprises the following steps: receiving a page rendering request of a front end; obtaining version number information of a configuration file in a packet management tool private library; under the condition that the version number information of the configuration file is matched with the version number of a locally pre-stored configuration file, obtaining a component library directory of the locally pre-stored configuration file; determining a target file according to the page rendering request and the component library directory; copying the target file to a generation directory; and rendering the development page based on the target file in the generation directory to obtain code information of the development page. According to the technical scheme, by using the packet management tool private library, automatic synchronous updating of the configuration files at the front end and the rear end of page development can be achieved, the synchronization efficiency and the use accuracy of the configuration files are improved, and then successful rendering of the rear end to the page editing result at the front end is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of Internet technology, and specifically relates to a front-end and back-end synchronization method, device, equipment and medium for page development based on configuration files. Background Art

[0002] As the main component of the user interface, the page provides an intuitive, easy-to-use, and beautiful interactive interface, allowing users to easily exchange information and perform operation controls. Existing front-end development software such as Visual Studio Code, Sublime Text, and Atom can support developers to write page codes and compile the page codes to obtain actual pages.

[0003] However, this development method of directly writing code requires high professional skills of developers and is inefficient. Therefore, how to enable developers to intuitively see the page development effect during the development process without writing code, and to correctly render the page development effect and obtain the page code is an urgent problem to be solved by people in this field. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a method, device, equipment and medium for synchronization of front-end and back-end of page development based on configuration files, so as to realize automatic synchronization and update of configuration files of front-end and back-end of page development, improve the synchronization efficiency and use accuracy of configuration files, and thus ensure the successful rendering of the page editing results of the front-end by the back-end.

[0005] In a first aspect, an embodiment of the present application provides a method for synchronizing front-end and back-end of page development based on a configuration file, the method being executed by a back-end of page development; the method comprising:

[0006] Receive page rendering requests from the front end;

[0007] Get the version number information of the configuration file in the private library of the package management tool;

[0008] When the version number information of the configuration file matches the version number of the configuration file pre-stored locally, obtaining the component library directory of the configuration file pre-stored locally;

[0009] Determine a target file according to the page rendering request and the component library directory;

[0010] Copy the target file to the generated directory;

[0011] The development page is rendered based on the target file in the generation directory to obtain code information of the development page.

[0012] In a second aspect, an embodiment of the present application provides a method for synchronizing front-end and back-end of page development based on a configuration file, wherein the method is executed by the front-end of page development; the method comprises:

[0013] In response to a page editing request, the configuration file is introduced through the import code;

[0014] An editor based on the front-end editing project performs visual editing on the development page based on the configuration file;

[0015] After the editing is completed, in response to a rendering operation of the edited page, a page rendering request is generated; wherein the page rendering request includes the editing result data.

[0016] In a third aspect, an embodiment of the present application provides a front-end and back-end synchronization device for page development based on a configuration file, wherein the device is arranged at the back-end of the page development; the device comprises:

[0017] The rendering request receiving module is used to receive the page rendering request from the front end;

[0018] The version information acquisition module is used to obtain the version number information of the configuration file in the private library of the package management tool;

[0019] A component library directory acquisition module, used to acquire the component library directory of the locally pre-stored configuration file when the version number information of the configuration file matches the version number of the locally pre-stored configuration file;

[0020] A target file determination module, used to determine the target file according to the page rendering request and the component library directory;

[0021] A target file generation module, used for copying the target file to a generation directory;

[0022] The code information acquisition module is used to render the development page based on the target file in the generation directory to obtain the code information of the development page.

[0023] In a fourth aspect, an embodiment of the present application provides a front-end and back-end synchronization device for page development based on a configuration file, wherein the device is arranged at the front end of page development; the device comprises:

[0024] The configuration file import module is used to import the configuration file through the import code in response to the page editing request;

[0025] A visual editing module, used for visually editing the development page based on the configuration file based on the editor of the front-end editing project;

[0026] The rendering request generating module is used to generate a page rendering request in response to a rendering operation of the editing page after the editing is completed; wherein the page rendering request includes the editing result data.

[0027] In a fifth aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0028] In a sixth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0029] In a seventh aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0030] In an embodiment of the present application, a page rendering request is received from the front end; the version number information of the configuration file in the private library of the package management tool is obtained; when the version number information of the configuration file matches the version number of the configuration file pre-stored locally, the component library directory of the configuration file pre-stored locally is obtained; the target file is determined according to the page rendering request and the component library directory; the target file is copied to the generation directory; the development page is rendered based on the target file in the generation directory to obtain the code information of the development page. The above-mentioned front-end and back-end synchronization method of page development based on configuration files can realize the automatic synchronization and update of the configuration files of the front-end and back-end of page development by using the private library of the package management tool, thereby improving the synchronization efficiency and usage accuracy of the configuration files, and thus ensuring the successful rendering of the front-end page editing results by the back-end. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a flow chart of the front-end and back-end synchronization method for page development based on configuration files provided in the first embodiment of the present application;

[0032] Figure 2 It is a flow chart of the front-end and back-end synchronization method for page development based on configuration files provided in the second embodiment of the present application;

[0033] Figure 3 It is a flow chart of the front-end and back-end synchronization method for page development based on configuration files provided in the third embodiment of the present application;

[0034] Figure 4 It is a structural diagram of a front-end and back-end synchronization device for page development based on configuration files provided in the fourth embodiment of the present application;

[0035] Figure 5 It is a structural diagram of a front-end and back-end synchronization device for page development based on configuration files provided in Embodiment 5 of the present application;

[0036] Figure 6 It is a structural diagram of an electronic device provided in Example 6 of the present application. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all of the content is shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0038] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0039] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0040] In conjunction with the accompanying drawings, the following detailed description is given of the configuration file-based page development front-end and back-end synchronization method, device, equipment and medium provided in the embodiments of the present application through specific embodiments and their application scenarios.

[0041] Embodiment 1

[0042] Figure 1 1 is a flow chart of the front-end and back-end synchronization method for page development based on configuration files provided in the first embodiment of the present application. Figure 1 As shown, the specific steps include:

[0043] S101, receiving a page rendering request from a front-end;

[0044] First of all, this application is applicable to the scenario where the front end supports visual editing components and the back end renders them. Based on the above usage scenarios, it can be understood that the execution subject of this application can be the back end of page development. Specifically, the installation and introduction of configuration files and the rendering of development pages can be performed by the back end of page development, and the back end returns the code information of the development page to the front end for user use.

[0045] Web page development refers to the process of creating and building a web page, which includes designing, writing, and implementing the appearance and functionality of a web page.

[0046] The front end of page development can refer to the client part that can perform visual editing to build the development page; the back end of page development can refer to the server part that is responsible for the visual editing results of the front end, that is, rendering the development page built on the front end to obtain the code of the development page.

[0047] A page rendering request may refer to a request for instructing the backend to render a development page. A request may be a way of communicating between a client and a server, and the components of a request include a request method, a request URL (Uniform Resource Locator), a request header, a request body, and request parameters. Specifically, the request body of a page rendering request stores the file identifier of a configuration file used by the development page and the editing result data of the front-end development page.

[0048] The method of receiving the page rendering request from the front end is to create a network server on the back end and use the network server to listen to the network port for communicating with the front end.

[0049] S102, obtaining version number information of the configuration file in the private library of the package management tool;

[0050] A package management tool private library can be a package repository used to help developers download, install, update, and manage packages. A package can refer to a collection of code and resources.

[0051] In this solution, the package management tool library can specifically refer to NPM (Node Package Manager, Node.js package manager). NPM is an open source JavaScript library that allows Node.js developers to download and install packages shared by other developers from the NPM repository into their environment to facilitate package publishing and updating.

[0052] The configuration file here may refer to a file obtained after the component library obtained in the front-end development of the page development is converted into a format accessible to the back-end of the page development. The version number information of the configuration file may be an identifier for identifying a specific version of the configuration file.

[0053] The method for obtaining the version number information of the configuration file may be to read the configuration file name of the configuration file in the page rendering request, use the configuration file name as a query condition, and query the private library of the package management tool to obtain the version number information of the configuration file.

[0054] S103, when the version number information of the configuration file matches the version number of the configuration file pre-stored locally, obtaining a component library directory of the configuration file pre-stored locally;

[0055] The locally pre-stored configuration file may refer to a configuration file that has been downloaded and installed to the backend of the page development.

[0056] The version number information of the configuration file matches the version number of the locally pre-stored configuration file, that is, there is a locally pre-stored configuration file whose version number is consistent with the version number information of the configuration file.

[0057] A directory can be a container in a file system that is used to store files and other directories. A component library directory is a directory used to store components in a configuration file.

[0058] The method for obtaining the component library directory of the locally pre-stored configuration file is to obtain the storage path of the locally pre-stored configuration file in the backend of the development page, and obtain the storage path of the component in the configuration file, and combine the storage path and the storage path to obtain a path, and the directory corresponding to the path is the component library directory.

[0059] S104, determining a target file according to the page rendering request and the component library directory;

[0060] The target file may refer to a file composed solely of a target component, wherein the target component may refer to each component used in the editing result data in the page rendering request.

[0061] Specifically, the names of the components used are stored in the editing result data, and a file whose file name is consistent with the name of the target component is searched in the component library directory as the target file.

[0062] S105, copying the target file to a generated directory;

[0063] The generation directory may refer to a directory for storing various generated objects in the current page rendering project.

[0064] Copy the target file to the generated directory, indicating that the target component has been generated in the current page rendering project.

[0065] The method of copying the target files to the generated directory may include reading the editing result data, determining the number of target components, copying the target components and pasting the target files of the number in the generated directory.

[0066] S106, rendering the development page based on the target file in the generation directory to obtain code information of the development page.

[0067] The code information for developing a page can specifically refer to the codes of the three core technologies for building a page: HTML (Hypertext Markup Language), CSS (Cascading Style Sheets), and JavaScript. HTML is used to describe the structure and content of a page; CSS is used to control the appearance and layout of a page; and JavaScript is used to add interactive behaviors and dynamic functions to a page.

[0068] The rendering method may adopt the method of reading the editing result data in the page rendering request, referencing each target file in the generation directory according to the editing result data, and generating code information of the development page.

[0069] In an embodiment of the present application, a page rendering request is received from the front end; the version number information of the configuration file in the private library of the package management tool is obtained; when the version number information of the configuration file matches the version number of the configuration file pre-stored locally, the component library directory of the configuration file pre-stored locally is obtained; the target file is determined according to the page rendering request and the component library directory; the target file is copied to the generation directory; the development page is rendered based on the target file in the generation directory to obtain the code information of the development page. The above-mentioned front-end and back-end synchronization method of page development based on configuration files can realize the automatic synchronization and update of the configuration files of the front-end and back-end of page development by using the private library of the package management tool, thereby improving the synchronization efficiency and usage accuracy of the configuration files, and thus ensuring the successful rendering of the front-end page editing results by the back-end.

[0070] Embodiment 2

[0071] Figure 2 It is a flow chart of the front-end and back-end synchronization method for page development based on configuration files provided in Example 2 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: after obtaining the version number information of the configuration file in the private library of the package management tool, the method also includes: when the version number information of the configuration file does not match the version number of the configuration file pre-stored locally, the configuration file is installed from the private library of the package management tool to the local.

[0072] like Figure 2 As shown, the specific steps include:

[0073] S201, receiving a page rendering request from the front end;

[0074] S202, obtaining version number information of the configuration file in the private library of the package management tool;

[0075] S203, identifying whether the version number information of the configuration file matches the version number of the locally pre-stored configuration file; if not, executing S204; if so, executing S205;

[0076] S204, installing the configuration file from the private library of the package management tool to the local computer;

[0077] The method of installing the configuration file from the private library of the package management tool to the local computer can be to determine the target configuration file to be installed locally in the private library of the package management tool according to the configuration file name of the configuration file, set the storage location of the target configuration file in the backend of the page development, and download the target configuration file.

[0078] In the technical solution, optionally, when the version number information of the configuration file does not match the version number of the configuration file pre-stored locally, installing the configuration file from the private library of the package management tool to the local includes:

[0079] When the version number information of the configuration file does not match the version number of the configuration file pre-stored locally, the configuration file is installed locally from the private library of the package management tool through the yarn add configuration file name command.

[0080] A file name is a string used to identify and reference files in a computer, and a configuration file name refers to the file name of a configuration file.

[0081] The yarn add command is a command of the yarn package manager, which is used to add dependencies to the project's package.json file. Specifically, the yarn add configuration file name command is used to install the configuration file corresponding to the configuration file name locally.

[0082] The benefit of this setting is that, thanks to yarn's parallel download and caching mechanism, yarn is faster than NPM in performance. Using the yarn add command can more effectively utilize network bandwidth than directly using NPM's npminstall command, thereby increasing the installation speed.

[0083] S205, obtaining a component library directory of the locally pre-stored configuration file;

[0084] S206, determining a target file according to the page rendering request and the component library directory;

[0085] S207, copying the target file to a generated directory;

[0086] S208: Render the development page based on the target file in the generation directory to obtain code information of the development page.

[0087] The advantage of this setting is that by installing the configuration file from the private library of the package management tool to the local computer when the version number information of the configuration file does not match the version number of the configuration file pre-stored locally, the latest version of the configuration file can be installed and synchronized to the back end of page development in a timely manner. Compared with directly copying the configuration file from the front end to the back end, this method is more efficient and avoids confusion in configuration file installation management due to untimely communication between the front end and the back end.

[0088] In this technical solution, optionally, the configuration file includes a component library for page development.

[0089] A component library for page development is a collection of reusable components and styles for building the user interface of a page.

[0090] A component can be a series of UI (User Interface) components, including buttons, input boxes, drop-down menus, lists, cards, navigation bars, dialog boxes, sliders, labels, progress bars, and icons.

[0091] The benefit of this solution is that the component library is designed to provide a consistent interface style and functionality so that these components can be quickly built and combined during page development. The backend needs to use the same component library as the frontend for rendering in order to render the correct code information for the development page.

[0092] Embodiment 3

[0093] Figure 3 1 is a flow chart of the front-end and back-end synchronization method for page development based on configuration files provided in the first embodiment of the present application. Figure 3 As shown, the specific steps include:

[0094] like Figure 3 As shown, the specific steps include:

[0095] S301, in response to a page editing request, introducing a configuration file through an import code;

[0096] The response to the page editing request may be detecting that the user starts editing the page, for example, the user clicks a "start editing" button or the user starts running the front end.

[0097] If the user chooses to confirm the configuration file, the configuration file selected by the user is introduced through the import code. If the user does not choose to confirm the configuration file, the default configuration file can be introduced through the import code.

[0098] In ES6 (ECMAScript 6), the import statement is used to import functions or objects exported by other modules. ES6 is the sixth version of JavaScript, a set of JavaScript standard specifications developed by the Ecma International Organization and released in 2015.

[0099] S302, based on the editor of the front-end editing project, visually edit the development page based on the configuration file;

[0100] The front-end editing process refers to the projects created and managed during the front-end development process. The editor of the front-end editing process refers to the software tool used to write, edit and manage the front-end project code.

[0101] In this solution, the editor may refer to an editor capable of visual editing. Further, visual editing may refer to the process of creating and editing pages through a graphical interface and drag-and-drop operations without directly writing code.

[0102] S303, after the editing is completed, in response to a rendering operation of the editing page, generating a page rendering request; wherein the page rendering request includes editing result data.

[0103] The rendering operation of the edit page may refer to the operation of determining to render after the user completes the page editing. The operation is listened to by using an event listener to respond to it in time. Among them, the event listener is a mechanism for listening to the occurrence of an event and performing a corresponding operation.

[0104] The editing result data may include the page design, content layout, interactive functions, data presentation and other related data of the development page after the user completes the editing. Among them, the component-related data may include the component's position parameters, size parameters, containing objects, contained objects, displayed content, interactive operations and interactive results.

[0105] The method of generating a page rendering request may be to define a request and determine the parameters of the request to be related to page rendering. Specifically, the request method of the request is determined to be POST, the request URL of the request is determined to be the backend of page development, and the editing structure data and the configuration file name of the configuration file are added to the request body of the request.

[0106] In this technical solution, optionally, the method further includes:

[0107] In response to the configuration file publishing operation, the configuration file in the private library of the package management tool is updated to obtain the first format file and the second format file of the updated configuration file; wherein the first format file of the configuration file is used for back-end access for page development, and the second format file of the configuration file is used for front-end access for page development.

[0108] The publishing operation of the configuration file may refer to the operation of the user determining to publish the component library to the private library of the package management tool after completing the development of the component library. The operation is listened to by using an event listener to respond to it in a timely manner.

[0109] The first format may refer to a file format that can be accessed and read by the front end of page development and can be introduced through import code. Accordingly, the first format file is the file obtained after the component library is converted into the first format.

[0110] The second format may refer to a file format that can be accessed and read by the backend of page development and can be installed through the yarn add configuration file name command. Accordingly, the second format file is the file obtained after the component library is converted to the second format.

[0111] To update the configuration file in the private library of the package management tool, you can use the npm publish command to publish the configuration file to the private library of the package management tool. If a configuration file with the same configuration file name already exists in the private library of the package management tool, then replace the configuration file with the configuration file published by the npm publish command.

[0112] The advantage of this setting is that by obtaining the first format file and the second format file of the configuration file and publishing them in the private library of the package management tool, the configuration file used by the backend of page development for rendering can be automatically updated to ensure consistency with the configuration file used by the frontend of page development.

[0113] In an embodiment of the present application, in response to a page editing request, a configuration file is introduced through the import code; an editor based on the front-end editing project visually edits the development page based on the configuration file; after the editing is completed, a page rendering request is generated in response to a rendering operation of the edited page; wherein the page rendering request includes editing result data. The above-mentioned front-end and back-end synchronization method for page development based on configuration files, which introduces configuration files through the import code, allows users to use the built component library for visual editing. By performing visual editing, users do not have to write code directly, which reduces difficulty and improves efficiency. By generating a page rendering request, the back-end of the page development can render the page, avoiding direct rendering on the front-end of the page development, which results in slow rendering speed and prone to errors.

[0114] Embodiment 4

[0115] Figure 4 Schematic diagram of the structure of the front-end and back-end synchronization device for page development based on configuration files provided in the fourth embodiment of the present application. Figure 4 As shown, the device comprises:

[0116] The rendering request receiving module 410 is used to receive a page rendering request from a front end;

[0117] The version information acquisition module 420 is used to obtain the version number information of the configuration file in the private library of the package management tool;

[0118] The component library directory acquisition module 430 is used to acquire the component library directory of the locally pre-stored configuration file when the version number information of the configuration file matches the version number of the locally pre-stored configuration file;

[0119] A target file determination module 440 is used to determine a target file according to the page rendering request and the component library directory;

[0120] The target file copy module 450 is used to copy the target file to the generated directory;

[0121] The code information acquisition module 460 is used to render the development page based on the target file in the generation directory to obtain the code information of the development page.

[0122] In an embodiment of the present application, a rendering request receiving module is used to receive a page rendering request from the front end; a version information obtaining module is used to obtain the version number information of the configuration file in the private library of the package management tool; a component library directory obtaining module is used to obtain the component library directory of the locally pre-stored configuration file when the version number information of the configuration file matches the version number of the locally pre-stored configuration file; a target file determination module is used to determine the target file according to the page rendering request and the component library directory; a target file generation module is used to copy the target file to the generation directory; a code information acquisition module is used to render the development page based on the target file in the generation directory to obtain the code information of the development page. The above-mentioned front-end and back-end synchronization device for page development based on configuration files can realize the automatic synchronization and update of the configuration files of the front-end and back-end of page development by using the private library of the package management tool, thereby improving the synchronization efficiency and usage accuracy of the configuration files, and thus ensuring the successful rendering of the front-end page editing results by the back-end.

[0123] The front-end and back-end synchronization device for page development based on configuration files in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0124] The configuration file-based front-end and back-end synchronization device for page development in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0125] The configuration file-based front-end and back-end synchronization device for page development provided in the embodiment of the present application can implement the various processes implemented in the above-mentioned embodiments one and two, and will not be described again here to avoid repetition.

[0126] Embodiment 5

[0127] Figure 5Schematic diagram of the structure of the front-end and back-end synchronization device for page development based on configuration files provided in the fifth embodiment of the present application. Figure 5 As shown, the device comprises:

[0128] The configuration file import module 510 is used to import the configuration file through the import code in response to the page editing request;

[0129] A visual editing module 520, which is used to perform visual editing on the development page based on the configuration file based on the editor of the front-end editing project;

[0130] The rendering request generating module 530 is used to generate a page rendering request in response to a rendering operation of the editing page after the editing is completed; wherein the page rendering request includes the editing result data.

[0131] In an embodiment of the present application, a configuration file introduction module is used to introduce a configuration file through an import code in response to a page editing request; a visual editing module is used to perform visual editing of a development page based on the configuration file based on an editor of a front-end editing project; a rendering request generation module is used to generate a page rendering request in response to a rendering operation of the edited page after the editing is completed; wherein the page rendering request includes editing result data. The above-mentioned front-end and back-end synchronization device for page development based on configuration files, which introduces configuration files through import codes, can enable users to use a built component library for visual editing. By performing visual editing, users do not have to write code directly, which reduces difficulty and improves efficiency. By generating a page rendering request, the back-end of the page development can render the page, avoiding direct rendering at the front-end of the page development, which results in slow rendering and prone to errors.

[0132] The front-end and back-end synchronization device for page development based on configuration files in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0133] The configuration file-based front-end and back-end synchronization device for page development in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0134] The configuration file-based front-end and back-end synchronization device for page development provided in the embodiment of the present application can implement each process implemented in the above-mentioned embodiment 3, and will not be described again here to avoid repetition.

[0135] Embodiment 6

[0136] like Figure 6 As shown, an embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and a program or instruction stored in the memory 602 and executable on the processor 601. When the program or instruction is executed by the processor 601, each process of the above-mentioned configuration file-based page development front-end and back-end synchronization device embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0137] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0138] Embodiment 7

[0139] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned configuration file-based page development front-end and back-end synchronization device embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0140] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0141] Embodiment 8

[0142] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned configuration file-based page development front-end and back-end synchronization device embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0143] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0144] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be noted that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0145] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0146] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0147] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.

Claims

1. A front-end and back-end synchronization method for page development based on configuration files, characterized in that: The method is executed by a backend developed by the page; the method comprises: Receive page rendering requests from the front end; Get the version number information of the configuration file in the private library of the package management tool; When the version number information of the configuration file matches the version number of the configuration file pre-stored locally, obtaining the component library directory of the configuration file pre-stored locally; Determine a target file according to the page rendering request and the component library directory; Copy the target file to the generated directory; The development page is rendered based on the target file in the generation directory to obtain code information of the development page.

2. The front-end and back-end synchronization method for page development based on configuration files according to claim 1, characterized in that: After obtaining the version number information of the configuration file in the private library of the package management tool, the method further includes: When the version number information of the configuration file does not match the version number of the configuration file pre-stored locally, the configuration file is installed locally from the private library of the package management tool.

3. The front-end and back-end synchronization method for page development based on configuration files according to claim 2 is characterized in that: When the version number information of the configuration file does not match the version number of the configuration file pre-stored locally, installing the configuration file from the private library of the package management tool to the local, including: When the version number information of the configuration file does not match the version number of the configuration file pre-stored locally, the configuration file is installed locally from the private library of the package management tool through the yarn add configuration file name command.

4. The front-end and back-end synchronization method for page development based on configuration files according to any one of claims 1 to 3, characterized in that: The configuration file includes a component library for page development.

5. A front-end and back-end synchronization method for page development based on configuration files, characterized in that: The method is executed by the front end of page development; the method includes: In response to a page editing request, the configuration file is introduced through the import code; An editor based on the front-end editing project performs visual editing on the development page based on the configuration file; After the editing is completed, in response to a rendering operation of the edited page, a page rendering request is generated; wherein the page rendering request includes the editing result data.

6. The front-end and back-end synchronization method for page development based on configuration files according to claim 5, characterized in that: The method further comprises: In response to the configuration file publishing operation, the configuration file in the private library of the package management tool is updated to obtain the first format file and the second format file of the updated configuration file; wherein the first format file of the configuration file is used for back-end access for page development, and the second format file of the configuration file is used for front-end access for page development.

7. A front-end and back-end synchronization device for page development based on configuration files, characterized in that: The device is arranged at the back end of the page development; the device comprises: The rendering request receiving module is used to receive the page rendering request from the front end; The version information acquisition module is used to obtain the version number information of the configuration file in the private library of the package management tool; A component library directory acquisition module, used to acquire the component library directory of the locally pre-stored configuration file when the version number information of the configuration file matches the version number of the locally pre-stored configuration file; A target file determination module, used to determine the target file according to the page rendering request and the component library directory; A target file generation module, used for copying the target file to a generation directory; The code information acquisition module is used to render the development page based on the target file in the generation directory to obtain the code information of the development page.

8. A front-end and back-end synchronization device for page development based on configuration files, characterized in that: The device is arranged at the front end of page development; the device comprises: The configuration file import module is used to import the configuration file through the import code in response to the page editing request; A visual editing module, used for visually editing the development page based on the configuration file based on the editor of the front-end editing project; The rendering request generating module is used to generate a page rendering request in response to a rendering operation of the editing page after the editing is completed; wherein the page rendering request includes the editing result data.

9. An electronic device, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of the front-end and back-end synchronization method for page development based on a configuration file are implemented as described in any one of claims 1 to 4 or claims 5 to 6.

10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the front-end and back-end synchronization method for page development based on a configuration file are implemented as described in any one of claims 1-4 or claims 5-6.