Data processing method and device, electronic equipment and storage medium

By obtaining and converting application page element data and generating a data model suitable for the headless content management system, it solves the problem of low development efficiency of Headless CMS, achieves rapid development and flexible management, and improves development efficiency and data consistency.

CN118656072APending Publication Date: 2024-09-17LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410703145.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

Existing headless CMS requires developers to have a high technical level in application page development, resulting in low development efficiency, and manually created content data models can easily cause deviations and redundancies, affecting data transmission efficiency.

Method used

By obtaining the element data to be created in the application page, the first data model is generated, and converted into a second data model adapted to the headless content management system according to the element type, utilizing the low-code platform and the headless content management system. advantages to achieve rapid development and flexible management of application pages.

Benefits of technology

It improves the efficiency of application page development, reduces maintenance costs, ensures data consistency and maintainability, and makes application pages more flexible and scalable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656072A
    Figure CN118656072A
Patent Text Reader

Abstract

The invention provides a data processing method. The method comprises the following steps: acquiring respective element data of a plurality of to-be-created elements in an application page; a first data model is generated based on the plurality of element data. According to the element types of the to-be-created elements, the first data model is converted into a second data model, and the second data model is matched with an application page generated based on the headless content management system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of page development, and in particular to a data processing method, device, electronic device and storage medium. Background Art

[0002] Application page development refers to the process of designing and implementing the user interface (UI) of an application when building an application (such as a website, mobile application, desktop application, etc.). For example, it includes creating, optimizing, and maintaining each page in the application to provide intuitive, easy-to-use, and attractive user interaction.

[0003] Currently, application page development is mainly based on Headless CMS (headless content management system). However, Headless CMS has high requirements for developers. The webpage structure and layout of different websites may be very different. Designers and developers are required to constantly confirm the page structure, and then developers manually adjust the content model, which leads to low development efficiency.

[0004] In addition, manually created content data models are prone to deviations from page structures, and the models are prone to generating redundant fields, resulting in excessive content API data. This not only affects the presentation of content data, but also consumes a lot of time during data transmission. Summary of the invention

[0005] One aspect of the present disclosure provides a data processing method, comprising: obtaining element data of each of a plurality of elements to be created in an application page. Based on the plurality of element data, generating a first data model. And according to element types of the plurality of elements to be created, converting the first data model into a second data model, wherein the second data model is adapted to an application page generated based on a headless content management system.

[0006] Optionally, converting the first data model into the second data model according to the element types of the multiple elements to be created includes: based on the mapping relationship, converting the types of the multiple element data in the first data model to obtain multiple target data. And generating the second data model based on the multiple target data. Wherein, the mapping relationship represents the conversion relationship between the element types of the multiple elements to be created and the element types adapted by the headless content management system.

[0007] Optionally, converting the first data model into the second data model according to the element types of the multiple elements to be created further includes: obtaining a first historical model associated with the application page, the historical data model being adapted to the application page generated based on the headless content management system; and using the multiple target data, updating the first historical model to obtain the second data model.

[0008] Optionally, generating the first data model based on the plurality of element data includes: parsing the plurality of element data to obtain element types of the plurality of elements to be created, classifying the plurality of element data according to the element types to obtain a plurality of element sets, and generating the first data model based on the plurality of element sets.

[0009] Optionally, generating the first data model based on the plurality of element data further includes: acquiring a second history model associated with the application page, the second history model including the history element data of the elements created in the application page, and updating the history element data based on the plurality of element data to obtain the first data model.

[0010] Optionally, obtaining element data of each of the multiple elements to be created on the application page includes: obtaining element identifiers of the multiple elements to be created, and obtaining element data of the multiple elements to be created based on the element identifiers.

[0011] Optionally, converting the first data model into the second data model according to the element types of the multiple elements to be created includes: in response to the model building request, calling the model building engine. Using the model building engine, obtaining the first data model. And performing type matching on the element types corresponding to the multiple element data included in the first data model to obtain the headless content management system model.

[0012] Another aspect of the present disclosure provides a data processing device, including: an acquisition module, used to acquire element data of each of a plurality of elements to be created in an application page; a generation module, used to generate a first data model based on the plurality of element data; and a conversion module, used to convert the first data model into a second data model according to the element types of the plurality of elements to be created, the second data model being adapted to the application page generated based on the headless content management system.

[0013] Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute any of the above methods.

[0014] Another aspect of the present disclosure provides a non-volatile storage medium storing computer executable instructions, which are used to implement the data processing method described above when executed. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0016] Figure 1 The application scenario diagram of the data processing method according to the embodiment of the present disclosure is schematically shown;

[0017] Figure 2 A flowchart schematically shows a data processing method according to an embodiment of the present disclosure;

[0018] Figure 3 A flowchart of a model conversion method according to an embodiment of the present disclosure is schematically shown;

[0019] Figure 4 A flowchart of a model conversion method according to another embodiment of the present disclosure is schematically shown;

[0020] Figure 5 A flowchart of a method for generating a first data model according to an embodiment of the present disclosure is schematically shown;

[0021] Figure 6 A flowchart of a method for generating a first data model according to another embodiment of the present disclosure is schematically shown;

[0022] Figure 7 A flowchart of a method for obtaining element data according to an embodiment of the present disclosure is schematically shown;

[0023] Figure 8 A flowchart of a model conversion method according to another embodiment of the present disclosure is schematically shown;

[0024] Fig. 9 A flowchart schematically shows a data processing method according to another embodiment of the present disclosure;

[0025] Fig.10 The structure block diagram of the data processing device according to the embodiment of the present disclosure is schematically shown;

[0026] Fig.11 A block diagram of an electronic device suitable for implementing a data processing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0027] Hereinafter, embodiments of the present disclosure 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 disclosure. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

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

[0029] All terms (including technical and scientific terms) used herein 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.

[0030] Some block diagrams and / or flow charts are shown in the accompanying drawings. It should be understood that some blocks or combinations thereof in the block diagrams and / or flow charts may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that these instructions, when executed by the processor, may create a device for implementing the functions / operations described in these block diagrams and / or flow charts.

[0031] Therefore, the technology of the present disclosure can be implemented in the form of hardware and / or software (including firmware, microcode, etc.). In addition, the technology of the present disclosure can take the form of a computer program product on a computer-readable medium storing instructions, which can be used by an instruction execution system or in combination with an instruction execution system. In the context of the present disclosure, a computer-readable medium can be any medium that can contain, store, transmit, propagate, or transmit instructions. For example, a computer-readable medium can include, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, device, or propagation medium. Specific examples of computer-readable media include: magnetic storage devices, such as magnetic tape or hard disk (HDD); optical storage devices, such as compact disk (CD-ROM); memory, such as random access memory (RAM) or flash memory; and / or wired / wireless communication links.

[0032] An embodiment of the present disclosure provides a data processing method for improving the efficiency of application page development. The method includes: obtaining element data of each of a plurality of elements to be created in an application page. Based on the plurality of element data, a first data model is generated. And according to the element types of the plurality of elements to be created, the first data model is converted into a second data model, and the second data model is adapted to the application page generated based on the headless content management system. By using an independent development platform for development, the development advantages of the development platform itself can be fully utilized to create a variety of content models, so that the content model is not restricted by headless CMS. Then, the types of elements in the content model are pre-aggregated to obtain headless CMS, thereby improving the development efficiency of the application page.

[0033] Figure 1 The application scenario diagram of the data processing method according to the embodiment of the present disclosure is schematically shown.

[0034] like Figure 1As shown, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0035] The user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 101, 102, 103, such as software development applications, security applications, shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0036] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0037] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed or applications logged in by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device to efficiently build and convert the content model of the application page developed by the user, so as to facilitate the subsequent generation and update of the application page.

[0038] It should be noted that the data processing method provided in the embodiment of the present disclosure can generally be executed by the server 105 or by the terminal device. Accordingly, the data processing device provided in the embodiment of the present disclosure can generally be set in the server 105. The data processing method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the data processing device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.

[0039] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0040] The following will be based on Figure 1The scene described by Figure 2~Figure 9 The data processing method of the disclosed embodiment is described in detail.

[0041] Figure 2 The flowchart of the data processing method according to the embodiment of the present disclosure is schematically shown.

[0042] According to the embodiments of the present disclosure, Figure 2 As shown, the data processing method of this embodiment includes, for example, operations S210 to S230.

[0043] In operation S210, element data of each of a plurality of elements to be created in the application page is obtained.

[0044] In operation S220, a first data model is generated based on the plurality of element data.

[0045] In operation S230 , the first data model is converted into a second data model according to element types of the multiple elements to be created, and the second data model is adapted to an application page generated based on a headless content management system.

[0046] In some embodiments, for example, in an e-commerce application page, multiple product display elements need to be created, each product element including element data such as product name, image link, price, etc.

[0047] Get the product list data through the state management library (such as Redux, Vuex, etc.) of the front-end development framework (such as React, Vue, etc.) or API call to the back-end service, where each product data item is the element data of the element to be created.

[0048] In low-code platforms (such as OutSystems, Mendix, etc.), developers create a page content model based on the acquired product data. The model is an intermediate representation that contains text fields for product names, image components for product images, numeric fields for prices, and layout information of these components on the page (such as position, size, etc.).

[0049] Developers can drag and configure these components through the low-code platform's visual interface to quickly generate page content models.

[0050] Since the application page needs to be generated based on a headless content management system (such as WordPress's headless CMS mode, Contentful, etc.), the first data model generated by the low-code platform needs to be converted into a second data model adapted to the system. The second data model is usually a data structure, such as JSON, XML, etc., which contains fields and relationships that the headless content management system can understand.

[0051] In this example, the transformation might involve mapping the text, image, and numeric fields in the page content model to corresponding properties of the JSON object, and might include additional metadata (such as SEO tags, publication date, etc.). The transformation process can be accomplished by writing a custom transformation script or using an existing data mapping tool.

[0052] This data processing method achieves rapid development and flexible management of application pages by combining the advantages of low-code platforms and headless content management systems. First, the page content model is quickly built through the low-code platform, reducing the coding workload and complexity in traditional front-end development. Then, through the conversion of the data model, the content generated by the low-code platform is adapted to the headless content management system, so that the application page can be dynamically updated and managed based on the system. This method improves development efficiency, reduces maintenance costs, and makes application pages more flexible and scalable.

[0053] Figure 3 The flowchart of the model conversion method according to the embodiment of the present disclosure is schematically shown.

[0054] According to the embodiments of the present disclosure, Figure 3 In addition to the above references Figure 2 In addition to the operations S210 to S230 described above, the method of this embodiment can also convert the first data model into the second data model according to the element types of the multiple elements to be created through operations S331 to S332. For the sake of brevity, the description of operations S210 to S230 is omitted here, and the subsequent related method embodiments are similar and will not be repeated.

[0055] In operation S331, based on the mapping relationship, types of multiple element data in the first data model are converted to obtain multiple target data.

[0056] In operation S332, a second data model is generated based on the plurality of target data, wherein the mapping relationship represents a conversion relationship between the element types of the plurality of elements to be created and the element types adapted by the headless content management system.

[0057] In some embodiments, for example, there is an application page of an e-commerce website, which contains multiple elements to be created, such as a product list, a carousel, user comments, etc. These elements have been created and configured in a low-code platform (such as Mendix) to form a first data model. Now, this first data model needs to be converted into a second data model adapted by a headless content management system (such as Contentful).

[0058] First, it is necessary to clarify the mapping relationship between the element type of each element to be created and the adapted element type in the headless content management system. This mapping relationship can be preset in the low-code platform.

[0059] For example, a product list may be mapped to the "Product Collection" type in Contentful, a carousel may be mapped to the "Carousel" type, and a user comment may be mapped to the "Comment" type. For a product list element, it may contain fields such as product name (text type), product image (image type), price (numeric type), etc.

[0060] Then, according to the mapping relationship, these fields need to be extracted from the first data model and converted to the type according to Contentful's requirements. For example, the product name may be directly used as a text field, the product image may need to be converted to an image URL or file ID accepted by Contentful, and the price may need to be converted to a specific numeric format.

[0061] After completing the type conversion of all element data, you can combine these data into one or more second data models according to the API or data structure requirements of Contentful. For a product list, you may generate a JSON array containing multiple "Product" entries, each of which contains fields such as product name, image URL, price, etc. For carousels and user comments, you can also use a similar method to generate the corresponding second data model.

[0062] Finally, you can use the API or management tools provided by Contentful to import or publish the generated second data model into the system. In this way, the application page based on the headless content management system can dynamically obtain data from Contentful and display and update it.

[0063] By defining a clear mapping relationship, the element data in the first data model generated by the low-code platform can be converted into the data format and type adapted by the headless content management system. In this process, the key is to ensure the accuracy and consistency of the type conversion and that the generated second data model meets the requirements of the headless content management system. This approach can achieve rapid development and flexible management of application pages while maintaining data consistency and maintainability.

[0064] Figure 4 The following schematically shows a flow chart of a model conversion method according to another embodiment of the present disclosure.

[0065] According to the embodiments of the present disclosure, Figure 4As shown, for example, operations S431 to S432 may be performed to convert the first data model into the second data model according to the element types of multiple elements to be created.

[0066] In operation S431 , a first history model associated with an application page is acquired, where the history data model is adapted to the application page generated based on the headless content management system.

[0067] In operation S432, the first historical model is updated using the plurality of target data to obtain a second data model.

[0068] In some embodiments, for example, when developing a news website, the application page needs to display a list of news and news details. In the previous iteration, the first historical model of the news page has been generated based on a headless content management system (such as Contentful) and stored in Contentful. Now, this model needs to be updated according to new design or business requirements.

[0069] First, use the Contentful API or management interface to obtain the first history model associated with the news page. This model contains the fields, types, and relationships between the previously defined news list and news details.

[0070] Then, based on the new design or business needs, determine the types of elements that need to be added or modified. For example, you may want to add an "Author Introduction" element to the news detail page.

[0071] And, define the mapping between this new element type and existing or newly created fields in Contentful. For example, "Author Biography" may be mapped to a new text field in Contentful.

[0072] Then, obtain the element data of multiple elements to be created from the low-code platform or other data sources. Such data include, for example, the title and release date of the news list, as well as the text of the news details and the author introduction.

[0073] According to the previously defined mapping relationship, the element data type obtained from the low-code platform is converted to a type acceptable to Contentful. For example, the news title is converted from a string to a text field in Contentful, and the publication date is converted from a date object to a date field in Contentful.

[0074] With the converted target data, you can update the first historical model. For existing fields, update their data values. For newly added fields (such as "Author Biography"), create new fields in the model and fill them with data. This process can be done programmatically through Contentful's API, or manually using Contentful's admin interface.

[0075] After the above steps are completed, the first historical model is updated to a second data model including new elements and data. This model can be adapted to application pages generated based on a headless content management system (Contentful).

[0076] By combining the first historical model and the new element data, the application pages based on the headless content management system can be updated efficiently. This approach allows for flexible adaptation to business or design changes while maintaining data consistency and maintainability. In addition, using the API and management tools of headless content management systems such as Contentful, model updates and data synchronization can be easily achieved, thereby accelerating the development process and improving the maintainability of application pages.

[0077] Figure 5 A flow chart of a method for generating a first data model according to an embodiment of the present disclosure is schematically shown.

[0078] According to the embodiments of the present disclosure, Figure 5 As shown, for example, a first data model can be generated based on multiple element data through operations S521 to S523.

[0079] In operation S521, a plurality of element data are parsed to obtain element types of respective elements to be created.

[0080] In operation S522, the plurality of element data are classified according to element types to obtain a plurality of element sets.

[0081] In operation S523, a first data model is generated based on the plurality of element sets.

[0082] In some embodiments, for example, an online education platform is developed, where the application page needs to contain different types of course elements, such as video courses, text courses, and interactive courses. Each course element contains some basic information, such as title, description, duration, etc., but their display methods and functions may vary.

[0083] First, get the data of multiple course elements from the database or API interface. This data may be a JSON array containing multiple course objects, each of which contains fields such as the course title, description, duration, type, etc.

[0084] Parse this data and extract basic information such as the title, description, duration, and type of each course element (such as "video", "text", "interactive", etc.).

[0085] Next, all course elements are classified according to the extracted course element types. For example, all course elements of type "video" are put into one set, all course elements of type "text" are put into another set, and so on. In this way, multiple course element sets classified by type are obtained.

[0086] After obtaining a plurality of element sets classified by type, the first data model may be generated. This model may be an object containing a plurality of sub-models or components, each of which corresponds to a type of course element.

[0087] For each type of course element, define the corresponding data structure and function according to the characteristics and requirements of the type. For example, for a video course, you may need to define the video URL, playback control, etc. For a text course, you may need to define the text format, highlight, etc.

[0088] Finally, use classes or objects in programming languages ​​(such as JavaScript, Python, etc.) to represent these sub-models or components and combine them into a complete first data model.

[0089] By parsing multiple element data and classifying them according to their types, the first data model can be effectively generated. This approach allows different data structures and functions to be defined according to the type of element, thereby meeting the needs of different elements in the application page. In addition, by classifying element data and generating sub-models or components, the readability and maintainability of the code can be improved and the development cost can be reduced. This approach is particularly useful when developing complex application pages because it can help better organize and manage the elements and data in the page.

[0090] Figure 6 A flowchart of a method for generating a first data model according to another embodiment of the present disclosure is schematically shown.

[0091] According to the embodiments of the present disclosure, Figure 6 As shown, for example, the first data model can also be generated based on multiple element data through operations S621~S622.

[0092] In operation S621 , a second history model associated with the application page is acquired, where the second history model includes history element data of elements created in the application page.

[0093] In operation S622, based on the plurality of element data, the historical element data is updated to obtain a first data model.

[0094] In some embodiments, for example, when developing a social media platform, there is a "user homepage" page that needs to display the user's personal information, dynamics, pictures, etc. With the continuous iteration of the platform, the "user homepage" page needs to be updated to display new elements or adjust the display method of existing elements. In this process, the existing second historical model can be used to accelerate the generation of the first data model.

[0095] First, retrieve the second history model associated with the "User Homepage" page from the data store. This model contains the historical element data of the elements created on the page, such as the historical configuration and data of the previous user information fields, dynamic lists, picture walls, etc.

[0096] Next, new or updated multiple element data are obtained from the data source (such as a database, API interface, etc.). This data may include new user information fields, newly published dynamics, newly uploaded pictures, etc.

[0097] Then, the newly acquired element data is compared with the historical element data in the second historical model. For existing elements, such as user information fields or dynamic lists, the new data values ​​are updated to the corresponding fields. For newly added elements, such as new picture wall components, the corresponding data structures and fields are added to the second historical model and filled with new data.

[0098] If some elements are outdated or no longer needed, they can be selectively removed during this process.

[0099] After the above steps are completed, a new first data model containing the latest data and structure can be obtained. This model not only retains the stability and known structure of the historical model, but also incorporates new elements and data to meet the new requirements of the page.

[0100] By combining the second historical model associated with the application page to generate the first data model, the existing data and structure can be effectively utilized, duplication of work can be reduced, and development efficiency can be improved. At the same time, this method also ensures the stability and consistency of the page, because the original structure and configuration are retained while the data is updated. This method is particularly effective in application scenarios with rapid iteration and updates, because it allows new features and elements to be easily added without destroying existing features.

[0101] Figure 7 A flow chart of a method for acquiring element data according to an embodiment of the present disclosure is schematically shown.

[0102] According to the embodiments of the present disclosure, Figure 7 As shown, for example, element data of each of a plurality of elements to be created on the application page may be obtained through operations S711 to S712.

[0103] In operation S711, element identifiers of multiple elements to be created are obtained.

[0104] In operation S712, element data of a plurality of elements to be created are acquired based on the element identifiers.

[0105] In some embodiments, for example, a page editor is developed for a content management system (CMS), which allows users to create customized pages by dragging and configuring different elements. These elements may be text paragraphs, pictures, videos, forms, etc. In this scenario, it is necessary to obtain element data of multiple elements to be created that the user wants to create on the page.

[0106] When the user selects one or more elements from the element library and decides to create them in the page, the system needs to obtain the identifiers of these elements. The element identifier is usually a unique string or ID that is used to identify different types of elements. For example, the identifier of a text element may be "text" and the identifier of a picture element may be "image". These element identifiers can be stored in a database or as configuration information for the page editor. When the user selects an element, the system can read this information to obtain the element identifier.

[0107] After the system obtains the element's identifier, it can obtain the corresponding element data based on these identifiers. The element data may include the element's default configuration, attributes, style, and other information. This data can be stored in a database or provided as a static resource file (such as a JSON file).

[0108] The system can query the corresponding data from the database according to the element identifier, or read the corresponding configuration information from the static resource file. For some elements that need to dynamically generate data (such as forms that obtain data according to API interfaces), the system needs to perform additional steps to obtain this data and use it as part of the element data.

[0109] For example, a user wants to create an image element and a text element on a page.

[0110] The user selects the "image" element from the element library, and the system obtains the element's identifier as "image". Based on the "image" identifier, the system queries the default configuration information of the element from the database, such as the default size and border style of the image.

[0111] The user specifies the URL of the image or other necessary information, which is also included as part of the element data.

[0112] Similarly, the user can also select the "text" element, and the system obtains the element's identifier as "text". The system queries the default configuration information of the element from the database based on the "text" identifier, such as the font, color, size, etc. of the text.

[0113] The user enters text content, which is also considered part of the element data.

[0114] By obtaining the element identifiers of the elements to be created and obtaining the corresponding element data based on these identifiers, a flexible and configurable page editor can be implemented. This method allows element data to be dynamically loaded and configured according to the type and requirements of the element, thereby improving the flexibility and scalability of the system. At the same time, the use of element identifiers also ensures the accuracy and consistency of element data, allowing users to correctly create and display these elements in the CMS.

[0115] Figure 8 The following schematically shows a flow chart of a model conversion method according to another embodiment of the present disclosure.

[0116] According to the embodiments of the present disclosure, Figure 8 As shown, for example, operations S831 to S833 may be performed to convert the first data model into the second data model according to the element types of multiple elements to be created.

[0117] In operation S831 , in response to a model building request, a model building engine is called.

[0118] In operation S832, a first data model is acquired using a model building engine.

[0119] In operation S833, type matching is performed on element types corresponding to the plurality of element data included in the first data model to obtain a headless content management system model.

[0120] In some embodiments, for example, a product details page is developed for an e-commerce platform. This page consists of multiple elements to be created, including product title, product image, price, description, etc. In order to make these elements compatible with a headless content management system (Headless CMS), it is necessary to convert a first data model (which may be obtained from a data source or an existing system) into a second data model suitable for the headless content management system.

[0121] First, a user or developer requests to build a product details page in the platform, and this request triggers the model conversion process.

[0122] After receiving the request, the system calls the model building engine. This engine may be a service or module that encapsulates the model transformation logic. The model building engine obtains the first data model from the data source (such as a database, API interface, etc.). This model contains the data of all the elements to be created for the product detail page, but it may not be organized according to the requirements of the headless content management system.

[0123] The engine traverses each element data in the first data model and identifies their types (such as text, image, number, etc.). Then, these element types are matched with the model types supported by the headless content management system. For example, the product title may be matched to the "text" type, the product image may be matched to the "image" or "media" type, and the price may be matched to the "number" or "currency" type.

[0124] Based on the results of the type matching, the engine reorganizes the element data in the first data model into a format and structure that meets the requirements of the headless content management system. This may include creating new fields, adjusting the data format, adding necessary metadata, etc.

[0125] Finally, the engine generates a new data model (i.e., the second data model), which can be directly used by the headless content management system to create and display product detail pages.

[0126] For example, the product title data in the first data model is a simple string, the product image data is a JSON object containing a URL, and the price data is a floating point number.

[0127] The engine recognizes that the product title is of text type and puts it in the "Text" field. It also recognizes that the product image is of image type and puts its URL in the "Image" field and may add additional metadata such as image dimensions, thumbnail URL, etc. It may also recognize that the price is of number type but needs to be converted to currency format. Therefore, it may convert the price to a string with a currency symbol and thousands separator and put it in the "Price" field.

[0128] By combining the model building engine with the requirements of the headless content management system, the first data model can be efficiently converted into a second data model suitable for the system. This approach not only improves development efficiency, but also ensures data consistency and accuracy. At the same time, due to the flexibility and extensibility of the model building engine, it can easily adapt to different types of data and model conversion requirements.

[0129] Fig. 9 The flowchart schematically shows a data processing method according to another embodiment of the present disclosure.

[0130] According to the embodiments of the present disclosure, Fig. 9As shown in the figure, low-code users can first build applications in the low-code platform. When building a page, the low-code platform has already specified the content display objects and different channels of the page, such as the text introduction, carousel, loop cards and other display contents contained in the home page of the enterprise website on computers, mobile phones and other devices.

[0131] Then, by analyzing the constructed page types, based on the known display element object properties of the low-code platform application page, a page content pre-aggregation model is automatically established by type.

[0132] During page design, initiate pre-aggregation model caching of page content or create and update based on the generated model.

[0133] When the application is built, the CMS model building API is called to initiate multi-page content model aggregation analysis, and create and update the Headless CMS content model. For example, if there is an image on the page, the type of the image on the page is converted to the media type (the image type in CMS).

[0134] Specifically, interactive pages can be created by dragging and dropping on the low-code platform. When the CMS model building flag is turned on in the page properties, the page element collector will be automatically called during the page building process to capture page data in real time.

[0135] The page parser will obtain the element name and element type from the element attribute configuration from the data in the collector, and use the classification algorithm to classify the elements of the application page according to type, and create page element model data.

[0136] Parse the model data, and convert the page element model into a CMS data model through the platform's content model building engine. The CMS data model used for model building can be stored by type using a cache strategy (can be offline). For example, if there are multiple pages, you can use the page as a dimension to count the elements included in each page: Page A has 3 buttons, 5 pictures, and so on. For multiple pages, pre-aggregate the page elements included in each page (type conversion, etc.) to obtain the content model of each page. Multiple pages can be converted into multiple CMS models. When building an aggregate model based on a page, cache the page model first, and then build multiple page models together.

[0137] When a user initiates a CMS content model building request in a low-code application, the Headless model building engine is called through the API to generate a content model using the application page structure data.

[0138] For example, you can get a token for authentication from Headless CMS.

[0139] After successfully obtaining the authentication token, use the token and cached application page structure data (that is, the content model generated or cached on the low-code platform) as parameters to initiate a model API call.

[0140] The headless CMS model building engine obtains the above application page structure data from the API request, parses the data and matches it according to the mapping relationship between the element type and the CMS model data type, such as (title: string, image: media), and converts it into a CMS model data object (headless cms).

[0141] Create the converted CMS model object to complete the construction of the CMS content model.

[0142] Based on the above data processing method, the present disclosure also provides a data processing device. Fig.10 The data processing device is described in detail.

[0143] Fig.10 The structure block diagram of a data processing device according to an embodiment of the present disclosure is schematically shown.

[0144] like Fig.10 As shown, the data processing device 1000 of this embodiment includes, for example: an acquisition module 1010, a generation module 1020 and a conversion module 1030. The device 1000 can execute the above reference Figure 2~Figure 9 Described method to achieve efficient development of application pages.

[0145] Specifically, the acquisition module 1010 is used to acquire element data of each of the multiple elements to be created in the application page. In one embodiment, the acquisition module 1010 can be used to perform the operation S210 described above, which will not be repeated here.

[0146] The generating module 1020 is used to generate a first data model based on a plurality of element data. In one embodiment, the generating module 1020 can be used to perform the operation S220 described above, which will not be described in detail here.

[0147] The conversion module 1030 is used to convert the first data model into a second data model according to the element types of the multiple elements to be created, and the second data model is adapted to the application page generated based on the headless content management system. In one embodiment, the conversion module 1030 can be used to perform the operation S230 described above, which will not be repeated here.

[0148] It is understandable that the acquisition module 1010, the generation module 1020 and the conversion module 1030 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 1010, the generation module 1020 and the conversion module 1030 can 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 can be implemented in hardware or firmware in any other reasonable way of integrating or packaging the circuit, or in a proper combination of software, hardware and firmware. Alternatively, at least one of the acquisition module 1010, the generation module 1020 and the conversion module 1030 can be at least partially implemented as a computer program module, and when the program is run by a computer, the function of the corresponding module can be executed.

[0149] Fig.11 A block diagram of an electronic device suitable for implementing a data processing method according to an embodiment of the present disclosure is schematically shown.

[0150] like Fig.11 As shown, the electronic device 1100 according to an embodiment of the present disclosure includes a processor 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage part 1108 to a random access memory (RAM) 1103. The processor 1101 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 1101 may also include an onboard memory for caching purposes. The processor 1101 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0151] In RAM 1103, various programs and data required for the operation of electronic device 1100 are stored. Processor 1101, ROM 1102 and RAM 1103 are connected to each other through bus 1104. Processor 1101 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 1102 and / or RAM 1103. It should be noted that the program can also be stored in one or more memories other than ROM 1102 and RAM 1103. Processor 1101 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0152] According to an embodiment of the present disclosure, the electronic device 1100 may further include an input / output (I / O) interface 1105, which is also connected to the bus 1104. The electronic device 1100 may further include one or more of the following components connected to the I / O interface 1105: an input portion 1106 including a keyboard, a mouse, etc.; an output portion 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 1108 including a hard disk, etc.; and a communication portion 1109 including a network interface card such as a LAN card, a modem, etc. The communication portion 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed, so that a computer program read therefrom is installed into the storage portion 1108 as needed.

[0153] The present disclosure 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 without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the data processing method according to the embodiment of the present disclosure is implemented.

[0154] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is 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 disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus, or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 1102 and / or RAM 1103 described above and / or one or more memories other than ROM 1102 and RAM 1103.

[0155] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains 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 data processing method provided by the embodiment of the present disclosure.

[0156] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 1101. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0157] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 1109, and / or installed from a removable medium 1111. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0158] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1109, and / or installed from the removable medium 1111. When the computer program is executed by the processor 1101, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0159] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the 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 through the Internet).

[0160] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the 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 from the order 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 flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0161] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0162] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A data processing method, comprising: Obtain element data of each of multiple elements to be created in the application page; Based on the plurality of element data, generating a first data model; as well as According to element types of the multiple elements to be created, the first data model is converted into a second data model, where the second data model is adapted to an application page generated based on a headless content management system.

2. The method according to claim 1, wherein: The converting the first data model into a second data model according to the element types of the multiple elements to be created includes: Based on the mapping relationship, convert the types of the plurality of element data in the first data model to obtain a plurality of target data; and Based on the plurality of target data, generating the second data model; The mapping relationship represents a conversion relationship between element types of the multiple elements to be created and element types adapted by the headless content management system.

3. The method according to claim 2, wherein: The converting the first data model into a second data model according to the element types of the multiple elements to be created further includes: Obtaining a first history model associated with the application page, the history data model being adapted for the application page generated based on a headless content management system; and The first historical model is updated using the plurality of target data to obtain the second data model.

4. The method according to claim 1, wherein: The step of generating a first data model based on the plurality of element data comprises: Parsing the plurality of element data to obtain element types of the plurality of elements to be created; Classifying the plurality of element data according to the element type to obtain a plurality of element sets; and Based on the multiple element sets, the first data model is generated.

5. The method according to claim 4, wherein: The generating a first data model based on the plurality of element data further comprises: acquiring a second history model associated with the application page, the second history model comprising history element data of elements created in the application page; and Based on the plurality of element data, the historical element data is updated to obtain the first data model.

6. The method according to claim 1, wherein: The step of obtaining element data of each of the multiple elements to be created on the application page includes: Obtaining element identifiers of the multiple elements to be created; and Based on the element identifiers, element data of the multiple elements to be created are obtained.

7. The method according to claim 1, wherein: The converting the first data model into a second data model according to the element types of the multiple elements to be created includes: In response to the model building request, calling the model building engine; Using the model building engine, obtaining the first data model; and Type matching is performed on element types corresponding to the multiple element data included in the first data model to obtain the headless content management system model.

8. A data processing device, comprising: An acquisition module, used to acquire element data of each of multiple elements to be created in the application page; A generating module, used for generating a first data model based on a plurality of element data; as well as A conversion module is used to convert the first data model into a second data model according to the element types of the multiple elements to be created, and the second data model is adapted to the application page generated based on the headless content management system.

9. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.