Data processing method, device, terminal and medium
By analyzing and configuring interface management of the target page, the page update process is simplified, the cumbersome problems of page update in the existing technology are solved, and the development efficiency and flexibility of page update are improved.
Patent Information
- Application Number
- CN202010348617.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-28
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2040-04-28
AI Technical Summary
In the existing technology, the page update process is cumbersome, developers need to edit a large amount of code, and have high requirements for coding capabilities, resulting in low page development efficiency and inability to cope with the growing demand for page updates.
By analyzing the target page, obtaining page information, including the connection relationship between page elements and elements, determining the configuration interface, receiving configuration instructions, and updating the page according to the instructions, simplifying the development process.
Improves the efficiency of page updates, allowing developers to easily modify data in the configuration interface, thereby achieving rapid updates to pages and reducing the requirements for coding capabilities.
Smart Images

Figure CN111694549B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a data processing method, device, terminal and medium. Background Art
[0002] With the development of computer technology, terminals (mobile phones, computers, tablets, etc.) have become necessities in users' daily lives. Users can browse a variety of pages (application pages, web pages, etc.) through terminals. However, as users' browsing needs for pages change, page developers also need to update the pages in a timely manner to meet user needs.
[0003] Currently, when developers update a page, they need to edit a large amount of code. The update process is long, and the page needs to be completely redeveloped when it is updated. While this requires high coding skills from developers, the page development efficiency is also low and cannot cope with the increasing demand for page updates. Summary of the invention
[0004] The embodiments of the present invention provide a data processing method, device, terminal and medium, which can parse a page to obtain a configuration interface, so that developers can modify data in the configuration interface to update the page, thereby improving the update efficiency of the page.
[0005] In a first aspect, an embodiment of the present invention provides a data processing method, the method comprising:
[0006] Get the target page;
[0007] Parsing the target page to obtain page information corresponding to the target page, wherein the page information includes at least one element constituting the target page and a connection relationship between the elements;
[0008] Determining a configuration interface for the target page according to the page information, the configuration interface including a tree structure diagram of elements constructed by the connection relationship and initial style information of each element;
[0009] Receiving a configuration instruction for any one or more elements in the target page input in the configuration interface, wherein the configuration instruction indicates a style corresponding to each element in the target page;
[0010] The target page is updated according to the configuration instruction.
[0011] In a second aspect, an embodiment of the present invention provides a data processing device, the device comprising:
[0012] Acquisition module, used to obtain the target page;
[0013] A parsing module, used to parse the target page to obtain page information corresponding to the target page, wherein the page information includes at least one element constituting the target page and a connection relationship between the elements;
[0014] A determination module, configured to determine a configuration interface for the target page according to the page information, wherein the configuration interface includes a structure diagram of the element structure constructed by the connection relationship and initial style information of each element;
[0015] A receiving module, configured to receive configuration instructions for any one or more elements in the target page input in the configuration interface, wherein the configuration instructions indicate the styles corresponding to the elements in the target page;
[0016] An updating module is used to update the target page according to the configuration instruction.
[0017] In a third aspect, an embodiment of the present invention provides a terminal, comprising a processor, an input interface, an output interface and a memory, wherein the processor, input interface, output interface and memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method described in the first aspect.
[0018] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method described in the first aspect.
[0019] In the embodiment of the present invention, the terminal obtains the target page, parses the target page, obtains the page information corresponding to the target page, determines the configuration interface for the target page according to the page information, and receives the configuration instructions for any one or more elements in the target page input in the configuration interface, and updates the target page according to the target preset configuration instructions. By implementing the above method, the page can be parsed to obtain the configuration interface, so that the developer can modify the data in the configuration interface to update the page, thereby improving the efficiency of updating the page. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0021] Figure 1 It is a flowchart of a data processing method provided by an embodiment of the present invention;
[0022] Figure 2 is a flow chart of another data processing method provided by an embodiment of the present invention;
[0023] Figure 3 is a flowchart of another data processing method provided by an embodiment of the present invention;
[0024] Figure 4 is a structural schematic diagram of a data processing device provided by an embodiment of the present invention;
[0025] Figure 5 It is a schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] Figure 1 FIG. 1 is a flow chart of a data processing method in an embodiment of the present invention. Figure 1 As shown, the process of the data processing method in this embodiment may include:
[0028] S101. The terminal obtains a target page.
[0029] In an embodiment of the present invention, in an embodiment of the present invention, the target page can be any application page of an application (Application, APP), or the target page can also be a web page. After detecting the page acquisition operation input by the user, the terminal can obtain the target page required by the user according to the information carried by the page acquisition operation, wherein the information carried by the page acquisition operation can specifically be a URL, a database address, an image, text, etc.
[0030] S102: The terminal parses the target page to obtain page information corresponding to the target page.
[0031] In an embodiment of the present invention, after the terminal obtains the target page, it will parse the target page to obtain page information corresponding to the target page, wherein the page information includes at least one element constituting the target page and the connection relationship between the elements. The elements may specifically be text, images, background, etc. in the target page.
[0032] In one implementation, the terminal parses the target page, and the specific method of obtaining the page information corresponding to the target page can be that the terminal obtains the source code corresponding to the target page, and determines at least one element constituting the target page based on at least one object included in the source code, and determines the connection relationship between the elements based on the coding structure of the at least one object. That is, the terminal extracts the objects included in the source code, and determines each object as an element. Further, the terminal determines the connection relationship between the elements based on the coding structure of the code in the source code, and the terminal determines the at least one element obtained by parsing and the connection relationship between the elements as the page information corresponding to the target page.
[0033] In one implementation, the terminal parses the target page, and the specific method of obtaining the page information corresponding to the target page can be that the terminal disassembles the target page based on a preset disassembly rule to obtain at least one element, and determines the connection relationship between the elements based on the position of each element obtained by disassembly in the target page, wherein the preset disassembly rule can be a disassembly rule based on color change and space interval, that is, the terminal first separates the text and image in the page to obtain the text part and the incomplete image without the text part, and the terminal uses the color of the image closest to the incomplete part as the background color to fill the incomplete part in the incomplete image. Further, for the extracted text part, the terminal detects the interval distance between each text area, and determines the text area with an interval distance greater than the preset distance as an element, and for the filled image part, the terminal determines the color change between different image areas, and determines the image area with a color change greater than the preset change as an element. Then, the terminal determines the connection relationship between the elements based on the position relationship between the elements disassembled, and the terminal determines the at least one element obtained by parsing and the connection relationship between the elements as the page information corresponding to the target page.
[0034] In one implementation, the target page is developed by a developer based on a preset development architecture, which indicates the various elements included in the target page and the connection relationship between the elements. The terminal parses the target page, and the specific method for obtaining the page information corresponding to the target page can be that the terminal obtains the development architecture of the target page from the background data of the target page, and obtains the indication information corresponding to the target page from the development architecture.
[0035] Furthermore, after the terminal determines the elements constituting the target page, it can also obtain initial style information of each element, wherein the initial style information of the element includes the size, format, color, position, transparency, etc. of the element.
[0036] S103: The terminal determines a configuration interface for the target page according to the page information.
[0037] In an embodiment of the present invention, the configuration interface includes an element structure tree diagram constructed by connection relationships and initial style information of each element. After the terminal parses the target page and obtains the page information corresponding to the target page, it will determine the configuration interface for the target page based on the page information. The user can enter text in the configuration interface or click on the options provided in the configuration interface to modify the style of the element.
[0038] In one implementation, the terminal determines the configuration interface for the target page according to the page information in a specific manner that the terminal determines the root element and the child element in at least one element according to the connection relationship between the elements in the target page, and connects the root element and the child element to obtain the element structure tree diagram corresponding to the target page; specifically, the terminal determines the element with the largest range as the root element, and then obtains other independent elements included in the range of the root element as the child elements of the root element, wherein the independent element is not included in other elements except the root element, and the terminal establishes a connection between the root element and the included child elements to obtain the first branch in the element structure tree diagram, and further, the terminal re-uses the child element in the root element as the second root element, and obtains other independent elements included in the range of the second root element as the second child elements of the second root element, and the terminal establishes a connection between the second root element and the second child element to obtain the second branch in the element structure tree diagram. By repeating the above method, a complete element structure tree diagram corresponding to the target page can be obtained. For example, the target page includes a home page element, a top area element, a bottom area element, a top advertising area element, a top content area element, a bottom advertising area element, and a bottom content area element, wherein the top advertising area element and the top content area element are included in the top area element, the bottom advertising area element and the bottom content area element are included in the bottom area element, and the top area element and the bottom area element are included in the home page element. Then the terminal determines the home page element as the root element, and the top area element and the bottom area element as the child elements corresponding to the root element, and connects the home page element with the top area element and the bottom area element respectively. The terminal determines the top area element and the bottom area element as the second root element, and the top advertising area element and the top content area element as the second child elements corresponding to the top area element, and the bottom advertising area element and the bottom content area element as the second child elements corresponding to the bottom area element. The terminal connects the top area element with the top advertising area element and the top content area element respectively, and connects the bottom area element with the bottom advertising area element and the bottom content area element respectively. Further, the terminal places the initial style information of each element in the target page at the corresponding position in the element structure tree diagram to obtain a configuration interface for the target page.
[0039] In one implementation, the target page is developed by the developer based on a preset development architecture, the development architecture indicates the various elements included in the target page and the connection relationship between the elements, as well as the element structure tree generated based on the elements and the element relationship. The terminal determines the configuration interface for the target page according to the page information in a specific manner. After the terminal obtains the page information of the target page, it determines the target development architecture corresponding to the page information, and directly obtains the element structure tree of the target page from the target development architecture. Further, the terminal places the initial style information of each element in the target page at the corresponding position in the element structure tree to obtain the configuration interface for the target page. The initial style information of each element includes the initial title, initial content, initial color, initial background, display status, etc. of the element.
[0040] S104: The terminal receives configuration instructions for any one or more elements in the target page input in the configuration interface.
[0041] In the embodiment of the present invention, after the terminal determines the configuration interface for the target page according to the page information, it can receive configuration instructions for any one or more elements in the target page input by the user in the configuration interface, wherein the configuration instructions indicate the styles corresponding to each element in the target page.
[0042] In a specific implementation, the user can set the size, position, content, background, display status, etc. of each element in the configuration interface. Furthermore, the terminal can also provide recommended configuration options for each element for the user to choose when configuring the element. For example, for the top advertising element, the commonly used size configuration is 10 cm long and 5 cm wide. The terminal can use the commonly used configuration as a recommended configuration item and display it in the configuration interface for the user to choose. The specific determination method of the recommended configuration item can be that the terminal obtains the historical configuration instructions for each element input from the historical record, and the historical configuration instructions include at least one historical configuration option; and determines the configuration frequency of each historical configuration option in the historical configuration instructions, and determines the historical configuration frequency with a configuration frequency greater than the preset frequency as the recommended configuration item, that is, the terminal determines the configuration item with more historical use as the recommended configuration item based on the results of data statistics. Further, when the terminal detects a display trigger instruction, the terminal recommends the configuration item in the configuration interface display for the target page. Among them, the display trigger instruction can be a user's click operation on a preset area, or the display trigger instruction can also be a configuration duration for an element that is greater than a preset duration. That is, when the terminal detects that the user configures an element for a duration greater than the preset duration, it displays recommended configuration items to improve the user's configuration efficiency for the element.
[0043] S105: The terminal updates the target page according to the configuration instruction.
[0044] In an embodiment of the present invention, after receiving the configuration instruction for the target page input in the configuration interface, the terminal will update the target page according to the configuration instruction. Specifically, the terminal determines the code corresponding to the configuration instruction according to the configuration instruction input by the user, and applies the code to the target page, so that the target page is updated based on the code. Among them, the terminal can obtain the code template corresponding to the configuration instruction from a pre-established code database, wherein at least one code template is stored in the code database, the code template is generated by the code and interface data, and there is a one-to-one correspondence between each code template and the configuration item in the code template library. Further, the specific way for the terminal to obtain the code template corresponding to the configuration instruction can be that the terminal parses the configuration instruction to obtain all the configuration items contained in the configuration instruction, and finds at least one code template corresponding to all the configuration items in the configuration instruction according to the correspondence between the configuration item and the code template, and the terminal combines at least one code template corresponding to all the configuration items to obtain the code applied to the target page.
[0045] In the embodiment of the present invention, the terminal obtains the target page, parses the target page, obtains the page information corresponding to the target page, determines the configuration interface for the target page according to the page information, and receives the configuration instructions for any one or more elements in the target page input in the configuration interface, and updates the target page according to the target preset configuration instructions. By implementing the above method, the page can be parsed to obtain the configuration interface, so that the developer can modify the data in the configuration interface to update the page, thereby improving the efficiency of updating the page.
[0046] Figure 2 FIG. 1 is a flow chart of another data processing method according to an embodiment of the present invention. Figure 2 As shown, the process of the data processing method in this embodiment may include:
[0047] S201. The terminal obtains a target page.
[0048] In the embodiment of the present invention, the target page may be any application page of an application program, or the target page may also be a web page.
[0049] S202: The terminal parses the target page to obtain page information corresponding to the target page.
[0050] In an embodiment of the present invention, after the terminal obtains the target page, it will parse the target page to obtain page information corresponding to the target page, wherein the page information includes at least one element constituting the target page and the connection relationship between the elements. The elements may specifically be text, images, background, etc. in the target page.
[0051] S203: The terminal determines a configuration interface for the target page according to the page information.
[0052] In an embodiment of the present invention, the configuration interface includes an element tree structure diagram constructed by connection relationships and initial style information of each element. After the terminal parses the target page and obtains the page information corresponding to the target page, it determines the configuration interface for the target page based on the page information.
[0053] S204: The terminal receives configuration instructions for any one or more elements in the target page input in the configuration interface.
[0054] In the embodiment of the present invention, after the terminal determines the configuration interface for the target page according to the page information, it can receive configuration instructions for any one or more elements in the target page input by the user in the configuration interface, wherein the configuration instructions indicate the styles corresponding to each element in the target page.
[0055] S205: The terminal detects the similarity between the configuration instruction and each configuration instruction in the preset configuration instruction set.
[0056] In an embodiment of the present invention, the preset configuration instruction set includes a plurality of preset configuration instructions set by developers, each of which can be used to generate a preset page, and the preset configuration instructions can be pre-configured by the developer according to the user's preferences, or the terminal determines the configuration instructions for the target page in the historical record as the preset configuration instructions. In the process of the terminal obtaining the configuration instructions of the user in the configuration interface, the similarity between the currently received configuration instructions and each configuration instruction in the preset configuration instruction set will be detected in real time. Among them, the configuration instructions currently received by the terminal include at least one configuration item, and the preset configuration instructions include at least one preset configuration item, and each configuration item is used to configure an element in the target page.
[0057] Specifically, the terminal may detect the similarity between the configuration instruction and the preset configuration instruction in such a way that the terminal obtains a first number corresponding to the same configuration items included in the configuration instruction and the preset configuration instruction, and a second number corresponding to all configuration items included in the preset configuration instruction, and the terminal determines the ratio between the first number and the second number as the similarity between the configuration instruction and the preset configuration instruction.
[0058] S206: If there is a target preset configuration instruction whose similarity with the configuration instruction is greater than a preset similarity, the terminal displays the target preset page corresponding to the target preset configuration instruction in the configuration interface in the form of a thumbnail.
[0059] In an embodiment of the present invention, after the terminal detects the similarity between the configuration instruction and each configuration instruction in the preset configuration instruction set, if a target preset configuration instruction whose similarity with the configuration instruction is greater than the preset similarity is detected, the terminal displays the target preset page corresponding to the target preset configuration instruction in the configuration interface in the form of a thumbnail. Among them, the target preset configuration instruction is any one or more configuration instructions in the preset configuration instruction set, and the preset similarity is specifically determined according to the number of elements included in the target page, such as the greater the number of elements, the smaller the preset similarity, or the preset similarity can also be pre-set by the user before inputting the configuration instruction. After the terminal displays the target preset page corresponding to the target preset configuration instruction in the configuration interface in the form of a thumbnail, the user can select any thumbnail in the configuration interface.
[0060] S207: When receiving a selection instruction for a thumbnail, the terminal adjusts the configuration instruction to a target preset configuration instruction, and updates the target page according to the target preset configuration instruction.
[0061] In an embodiment of the present invention, after the terminal displays the target preset page corresponding to the target preset configuration instruction in the form of a thumbnail in the configuration interface, it can receive a user's selection operation for any thumbnail. When the terminal receives the selection instruction for the thumbnail, the terminal adjusts the configuration instruction to the target preset configuration instruction, and updates the target page according to the target preset configuration instruction.
[0062] For example, the target page includes a top element, a middle element, and a bottom element. The configuration instruction input by the user includes a top element "width 15 cm" and a middle element "width 10 cm". The preset configuration instruction 1 is a top element "width 15 cm", a middle element "width 10 cm", and a bottom element "width 8 cm". The preset configuration instruction 2 is a top element "width 15 cm", a middle element "width 10 cm", and a bottom element "width 6 cm". The preset configuration instruction 3 is a top element "width 15 cm", a middle element "width 8 cm", and a bottom element "width 5 cm". The terminal detects the similarity between the configuration instruction and the preset configuration instruction 1. The similarity between preset configuration instruction 1 and preset configuration instruction 2 is 66.7%, the similarity between preset configuration instruction 2 and preset configuration instruction 3 is 33.3%, and the preset similarity is 50%. The terminal determines that preset configuration instruction 1 and preset configuration instruction 2 are target preset configuration instructions, and displays the pages corresponding to preset configuration instruction 1 and preset configuration instruction 2 in the configuration interface in the form of thumbnails, which are target preset configuration interface 1 and target preset configuration page 2, respectively. When receiving the user's selection operation for the target preset configuration interface 1, the terminal determines preset configuration instruction 1 as the target preset configuration instruction, and updates the target page according to the target preset configuration instruction.
[0063] Through the above method, when the user configures the page, he does not need to enter the complete configuration instructions, but only enters the configuration instructions for some elements in the page. The terminal can provide a thumbnail corresponding to the complete configuration instructions including the configuration instructions for some elements in the page. The user can directly select the thumbnail to complete the configuration for the target, which improves the configuration efficiency of the user when configuring the page, and also facilitates the user to preview various possible pages, so that the user can better select the desired page.
[0064] In an embodiment of the present invention, the terminal obtains a target page, parses the target page, obtains page information corresponding to the target page, determines a configuration interface for the target page according to the page information, and receives configuration instructions for any one or more elements in the target page input in the configuration interface, detects the similarity between the configuration instruction and each configuration instruction in the preset configuration instruction set, and if there is a target preset configuration instruction whose similarity with the configuration instruction is greater than the preset similarity, the terminal displays the target preset page corresponding to the target preset configuration instruction in the configuration interface in the form of a thumbnail, and when receiving a selection instruction for the thumbnail, the terminal adjusts the configuration instruction to the target preset configuration instruction, and updates the target page according to the target preset configuration instruction. By implementing the above method, the page can be parsed to obtain a configuration interface, so that the developer can modify the data in the configuration interface to update the page, thereby improving the update efficiency of the page. In addition, the user can directly select the thumbnail to complete the configuration for the target, thereby improving the configuration efficiency when the user performs page configuration.
[0065] Figure 3 FIG. 1 is a flow chart of another data processing method according to an embodiment of the present invention. Figure 3 As shown, the process of the data processing method in this embodiment may include:
[0066] S301: The terminal obtains a target page.
[0067] In the embodiment of the present invention, the target page may be any application page of an application program, or the target page may also be a web page.
[0068] S302: The terminal parses the target page to obtain page information corresponding to the target page.
[0069] In an embodiment of the present invention, after the terminal obtains the target page, it will parse the target page to obtain page information corresponding to the target page, wherein the page information includes at least one element constituting the target page and the connection relationship between the elements. The elements may specifically be text, images, background, etc. in the target page.
[0070] S303: The terminal determines a configuration interface for the target page according to the page information.
[0071] In an embodiment of the present invention, the configuration interface includes an element tree structure diagram constructed by connection relationships and initial style information of each element. After the terminal parses the target page and obtains the page information corresponding to the target page, it determines the configuration interface for the target page based on the page information.
[0072] S304: The terminal receives a configuration requirement for the target page in the configuration interface.
[0073] In an embodiment of the present invention, after the terminal determines the configuration interface for the target page based on the page information, it will receive the configuration requirements for the target page in the configuration interface, where the configuration requirements can be the form in which the user wants to change the target page, such as changing the theme, content, or background, etc. For example, the user can enter "winter theme", "youth background", etc. in the search box provided in the configuration interface as the configuration requirements for the target page.
[0074] S305: The terminal searches a preset database for at least one reference configuration instruction corresponding to the configuration requirement according to the configuration requirement.
[0075] In the embodiment of the present invention, after receiving the configuration requirement for the target page, the terminal will query at least one reference configuration instruction corresponding to the configuration requirement in the preset database according to the configuration requirement. Each reference configuration instruction can be used to generate a page in a certain form, the reference configuration instruction can be preset by the R&D personnel or can be a configuration instruction received by the terminal in history, each configuration requirement can correspond to multiple reference configuration instructions, and the terminal can determine at least one reference configuration instruction corresponding to the configuration requirement input by the user based on the fuzzy query method, and display the reference configuration instruction found in the configuration interface.
[0076] S306. The terminal receives a selection operation for any one of the at least one reference configuration instruction.
[0077] In the embodiment of the present invention, after the terminal searches the preset database for at least one reference configuration instruction corresponding to the configuration requirement according to the configuration requirement, the user inputs a selection operation to select any reference configuration instruction.
[0078] S306: The terminal updates the target page according to the selected reference configuration instruction.
[0079] In this hair style embodiment, after the terminal receives the selection operation for the reference configuration instruction input by the user, the terminal can update the target page according to the selected reference configuration instruction. Specifically, the terminal changes the style of each element in the target page according to the reference configuration instruction; and displays each element after the style change in the target page to update the target page.
[0080] In one implementation, after the user selects a reference configuration instruction, the user can also modify the reference configuration instruction to obtain the configuration instruction required by the user. The terminal receives the user's modification operation on the reference configuration instruction and updates the target page according to the modified reference configuration instruction. In the above manner, the user does not need to enter a complete configuration instruction every time, and can directly modify the subsequent configuration instructions to meet the user's needs, thereby improving the configuration efficiency for the target page.
[0081] In an embodiment of the present invention, the terminal obtains a target page, parses the target page, obtains page information corresponding to the target page, determines a configuration interface for the target page based on the page information, and receives configuration instructions for any one or more elements in the target page input in the configuration interface, receives configuration requirements for the target page in the configuration interface, and queries at least one reference configuration instruction corresponding to the configuration requirements in a preset database based on the configuration requirements, receives a selection operation for any one of the at least one reference configuration instructions, and updates the target page based on the selected reference configuration instruction. By implementing the above method, the page can be parsed to obtain a configuration interface, so that developers can modify data in the configuration interface to update the page, thereby improving the efficiency of updating the page.
[0082] The following will be combined with the attached Figure 4 The data processing device provided by the embodiment of the present invention is described in detail. Figure 4 The data processing device shown is used to execute the present invention Figure 1-Figure 3 For the convenience of explanation, only the part related to the embodiment of the present invention is shown, and the specific technical details are not disclosed. Figure 1-Figure 3 The embodiment shown.
[0083] See also Figure 4 , is a structural diagram of a data processing device provided by the present invention, the data processing device 40 may include: an acquisition module 401, a parsing module 402, a determination module 403, a receiving module 404, and an update module 405.
[0084] Acquisition module 401, used to acquire a target page;
[0085] A parsing module 402 is used to parse the target page to obtain page information corresponding to the target page, wherein the page information includes at least one element constituting the target page and a connection relationship between the elements;
[0086] A determination module 403 is used to determine a configuration interface for the target page according to the page information, wherein the configuration interface includes a structure diagram of the element structure constructed by the connection relationship and initial style information of each element;
[0087] The receiving module 404 is used to receive a configuration instruction for any one or more elements in the target page input in the configuration interface, wherein the configuration instruction indicates a style corresponding to each element in the target page;
[0088] The updating module 405 is used to update the target page according to the configuration instruction.
[0089] In one implementation, the parsing module 402 is specifically configured to:
[0090] Obtaining the source code corresponding to the target page;
[0091] determining at least one element constituting the target page based on at least one object included in the source code, and,
[0092] A connection relationship between the elements is determined based on the coding structure of the at least one object.
[0093] In one implementation, the determining module 403 is specifically configured to:
[0094] Determine the root element and the sub-elements in the at least one element according to the connection relationship between the elements in the target page, and connect the root element and the sub-elements accordingly to obtain an element structure tree corresponding to the target page;
[0095] The initial style information of each element in the target page is placed at a corresponding position in the element structure tree diagram to obtain a configuration interface for the target page.
[0096] In one implementation, the determining module 403 is further configured to:
[0097] Obtaining a historical configuration instruction input for each element of the historical record, wherein the historical configuration instruction includes at least one historical configuration item;
[0098] Determining the configuration frequency of each historical configuration item in the historical configuration instruction, and determining the historical configuration item whose configuration frequency is greater than a preset frequency as a recommended configuration item;
[0099] When a display trigger instruction is detected, the recommended configuration items are displayed in a configuration interface for the target page.
[0100] In one implementation, the updating module 405 is specifically configured to:
[0101] Detecting the similarity between the configuration instruction and each preset configuration instruction in a preset configuration instruction set;
[0102] If there is a target preset configuration instruction whose similarity with the configuration instruction is greater than a preset similarity, displaying the target preset page corresponding to the target preset configuration instruction in the configuration interface in the form of a thumbnail;
[0103] When a selection instruction for the target preset page is received, the configuration instruction is adjusted to the target preset configuration instruction, and the target page is updated according to the target preset configuration instruction.
[0104] In one implementation, the updating module 405 is specifically configured to:
[0105] Changing the style of each element in the target page according to the configuration instruction;
[0106] Each element after the style change is displayed in the target page to update the target page.
[0107] In one implementation, the updating module 405 is further configured to:
[0108] Receiving a configuration requirement for the target page in the configuration interface;
[0109] Querying a preset database for at least one reference configuration instruction corresponding to the configuration requirement;
[0110] receiving a selection operation for any one of the at least one reference configuration instruction;
[0111] The target page is updated according to the selected reference configuration instruction.
[0112] In the embodiment of the present invention, the acquisition module 401 acquires the target page, the parsing module 402 parses the target page to obtain the page information corresponding to the target page, the determination module 403 determines the configuration interface for the target page according to the page information, the receiving module 404 receives the configuration instructions for any one or more elements in the target page input in the configuration interface, and the update module 405 updates the target page according to the target preset configuration instructions. By implementing the above method, the page can be parsed to obtain the configuration interface, so that the developer can modify the data in the configuration interface to update the page, thereby improving the update efficiency of the page.
[0113] See also Figure 5 , which is a schematic diagram of the structure of a terminal according to an embodiment of the present invention. Figure 5 As shown, the terminal includes: at least one processor 501, an input device 503, an output device 504, a memory 505, and at least one communication bus 502. The communication bus 502 is used to realize the connection and communication between these components. The input device 503 can be a control panel or a microphone, etc., and the output device 504 can be a display screen, etc. The memory 505 can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The memory 505 can also be at least one storage device located away from the aforementioned processor 501. The processor 501 can be combined with Figure 4 In the described apparatus, a set of program codes is stored in the memory 505, and the processor 501, the input device 503, and the output device 504 call the program codes stored in the memory 505 to perform the following operations:
[0114] Processor 501, used to obtain a target page;
[0115] The processor 501 is used to parse the target page to obtain page information corresponding to the target page, where the page information includes at least one element constituting the target page and a connection relationship between the elements;
[0116] The processor 501 is used to determine a configuration interface for the target page according to the page information, wherein the configuration interface includes a structure diagram of the element structure constructed by the connection relationship and initial style information of each element;
[0117] The processor 501 is configured to receive a configuration instruction for any one or more elements in the target page input in the configuration interface, wherein the configuration instruction indicates a style corresponding to each element in the target page;
[0118] The processor 501 is configured to update the target page according to the configuration instruction.
[0119] In one implementation, the processor 501 is specifically configured to:
[0120] Obtaining the source code corresponding to the target page;
[0121] determining at least one element constituting the target page based on at least one object included in the source code, and,
[0122] A connection relationship between the elements is determined based on the coding structure of the at least one object.
[0123] In one implementation, the processor 501 is specifically configured to:
[0124] Determine the root element and the sub-elements in the at least one element according to the connection relationship between the elements in the target page, and connect the root element and the sub-elements accordingly to obtain an element structure tree corresponding to the target page;
[0125] The initial style information of each element in the target page is placed at a corresponding position in the element structure tree diagram to obtain a configuration interface for the target page.
[0126] In one implementation, the processor 501 is specifically configured to:
[0127] Obtaining a historical configuration instruction input for each element of the historical record, wherein the historical configuration instruction includes at least one historical configuration item;
[0128] Determining the configuration frequency of each historical configuration item in the historical configuration instruction, and determining the historical configuration item whose configuration frequency is greater than a preset frequency as a recommended configuration item;
[0129] When a display trigger instruction is detected, the recommended configuration items are displayed in a configuration interface for the target page.
[0130] In one implementation, the processor 501 is specifically configured to:
[0131] Detecting the similarity between the configuration instruction and each preset configuration instruction in a preset configuration instruction set;
[0132] If there is a target preset configuration instruction whose similarity with the configuration instruction is greater than a preset similarity, displaying the target preset page corresponding to the target preset configuration instruction in the configuration interface in the form of a thumbnail;
[0133] When a selection instruction for the target preset page is received, the configuration instruction is adjusted to the target preset configuration instruction, and the target page is updated according to the target preset configuration instruction.
[0134] In one implementation, the processor 501 is specifically configured to:
[0135] Changing the style of each element in the target page according to the configuration instruction;
[0136] Each element after the style change is displayed in the target page to update the target page.
[0137] In one implementation, the processor 501 is specifically configured to:
[0138] Receiving a configuration requirement for the target page in the configuration interface;
[0139] Querying a preset database for at least one reference configuration instruction corresponding to the configuration requirement;
[0140] receiving a selection operation for any one of the at least one reference configuration instruction;
[0141] The target page is updated according to the selected reference configuration instruction.
[0142] In the embodiment of the present invention, the processor 501 obtains the target page, the processor 501 parses the target page, obtains the page information corresponding to the target page, the processor 501 determines the configuration interface for the target page according to the page information, the processor 501 receives the configuration instructions for any one or more elements in the target page input in the configuration interface, and the processor 501 updates the target page according to the target preset configuration instructions. By implementing the above method, the page can be parsed to obtain the configuration interface, so that the developer can modify the data in the configuration interface to update the page, thereby improving the update efficiency of the page.
[0143] The modules described in the embodiments of the present invention may be implemented by a general integrated circuit, such as a CPU (Central Processing Unit), or by an ASIC (Application Specific Integrated Circuit).
[0144] It should be understood that in the embodiment of the present invention, the processor 501 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0145] The bus 402 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 502 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 It is represented by only one thick line, but it does not mean that there is only one bus or one type of bus.
[0146] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The computer-readable storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0147] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A data processing method, characterized in that: The method comprises: Get the target page; The target page is parsed to obtain page information corresponding to the target page, wherein the page information includes at least one element constituting the target page and a connection relationship between each element; the method for parsing the target page includes: disassembling the target page using a disassembly rule based on color change and space interval to obtain at least one element, and determining the connection relationship between each element based on the position of each element obtained by disassembly in the target page; wherein the disassembly rule includes: separating the text and image in the page to obtain a text part and a defective image lacking the text part, and filling the defective part in the defective image with the color of the image closest to the defective part as the background color; for the extracted text part, detecting the spacing distance between each text area, and determining the text area with a spacing distance greater than a preset distance as an element, for the filled image part, determining the color change between different image areas, and determining the image area with a color change greater than a preset change as an element; determining the connection relationship between each element based on the positional relationship between each element obtained by disassembly, and determining the at least one element obtained by parsing and the connection relationship between each element as the page information corresponding to the target page; Determining a configuration interface for the target page according to the page information, the configuration interface including a tree structure diagram of elements constructed by the connection relationship and initial style information of each element; Obtaining a historical configuration instruction input for each element of the history record, wherein the historical configuration instruction includes at least one historical configuration item; determining the configuration frequency of each historical configuration item in the historical configuration instruction, and determining the historical configuration item with a configuration frequency greater than a preset frequency as a recommended configuration item; when a display trigger instruction is detected, displaying the recommended configuration item in a configuration interface for the target page; if a selection instruction for any recommended configuration item is received, performing page configuration according to the selected recommended configuration item; the display trigger instruction is triggered based on a user's click operation on a preset area or a configuration duration for an element greater than a preset duration; Receiving a configuration instruction for any one or more elements in the target page input in the configuration interface, wherein the configuration instruction indicates a style corresponding to each element in the target page; Detecting the similarity between the configuration instruction and each preset configuration instruction in the preset configuration instruction set; wherein the similarity between the configuration instruction and the preset configuration instruction is detected by: obtaining a first number corresponding to the same configuration items included in the configuration instruction and the preset configuration instruction, and a second number corresponding to all configuration items included in the preset configuration instruction, and determining the ratio between the first number and the second number as the similarity between the configuration instruction and the preset configuration instruction; If there is a target preset configuration instruction whose similarity with the configuration instruction is greater than a preset similarity, displaying the target preset page corresponding to the target preset configuration instruction in the configuration interface in the form of a thumbnail; When a selection instruction for the target preset page is received, the configuration instruction is adjusted to the target preset configuration instruction, and the target page is updated according to the target preset configuration instruction.
2. The method according to claim 1, characterized in that The step of parsing the target page to obtain page information corresponding to the target page includes: Obtaining the source code corresponding to the target page; determining at least one element constituting the target page based on at least one object included in the source code, and, A connection relationship between the elements is determined based on the coding structure of the at least one object.
3. The method according to claim 1, characterized in that The determining a configuration interface for the target page according to the page information includes: Determine the root element and the sub-elements in the at least one element according to the connection relationship between the elements in the target page, and connect the root element and the sub-elements accordingly to obtain an element structure tree corresponding to the target page; The initial style information of each element in the target page is placed at a corresponding position in the element structure tree diagram to obtain a configuration interface for the target page.
4. The method according to claim 1, characterized in that: The updating of the target page according to the configuration instruction includes: Changing the style of each element in the target page according to the configuration instruction; Each element after the style change is displayed in the target page to update the target page.
5. The method according to claim 1, characterized in that After determining the configuration interface for the target page according to the page information, the method further includes: Receiving a configuration requirement for the target page in the configuration interface; Querying a preset database for at least one reference configuration instruction corresponding to the configuration requirement; receiving a selection operation for any one of the at least one reference configuration instruction; The target page is updated according to the selected reference configuration instruction.
6. A data processing device, characterized in that: The device comprises: Acquisition module, used to obtain the target page; A parsing module is used to parse the target page to obtain page information corresponding to the target page, wherein the page information includes at least one element constituting the target page and a connection relationship between each element; the method of parsing the target page includes: disassembling the target page using a disassembly rule based on color change and space interval to obtain at least one element, and determining the connection relationship between each element based on the position of each element obtained by disassembly in the target page; wherein the disassembly rule includes: separating the text and image in the page to obtain a text part and a defective image lacking the text part, and filling the defective part in the defective image with the color of the image closest to the defective part as the background color; for the extracted text part, detecting the spacing distance between each text area, and determining the text area with a spacing distance greater than a preset distance as an element, for the filled image part, determining the color change between different image areas, and determining the image area with a color change greater than a preset change as an element; determining the connection relationship between each element based on the positional relationship between each element obtained by disassembly, and determining the at least one element obtained by parsing and the connection relationship between each element as the page information corresponding to the target page; A determination module, configured to determine a configuration interface for the target page according to the page information, wherein the configuration interface includes a structure diagram of the element structure constructed by the connection relationship and initial style information of each element; The determination module is further used to obtain a historical configuration instruction input for each element of the historical record, wherein the historical configuration instruction includes at least one historical configuration item; determine the configuration frequency of each historical configuration item in the historical configuration instruction, and determine the historical configuration item with a configuration frequency greater than a preset frequency as a recommended configuration item; when a display trigger instruction is detected, display the recommended configuration item in the configuration interface for the target page; if a selection instruction for any recommended configuration item is received, perform page configuration according to the selected recommended configuration item; the display trigger instruction is triggered based on a user's click operation on a preset area or a configuration duration for an element that is greater than a preset duration; A receiving module, configured to receive a configuration instruction for any one or more elements in the target page input in the configuration interface, wherein the configuration instruction indicates a style corresponding to each element in the target page; An updating module is used to detect the similarity between the configuration instruction and each preset configuration instruction in the preset configuration instruction set; wherein, the similarity between the configuration instruction and the preset configuration instruction is detected in the following manner: obtaining a first number corresponding to the same configuration items included in the configuration instruction and the preset configuration instruction, and a second number corresponding to all configuration items included in the preset configuration instruction, and determining the ratio between the first number and the second number as the similarity between the configuration instruction and the preset configuration instruction; if there is a target preset configuration instruction whose similarity with the configuration instruction is greater than a preset similarity, displaying a target preset page corresponding to the target preset configuration instruction in the configuration interface in the form of a thumbnail; when receiving a selection instruction for the target preset page, adjusting the configuration instruction to the target preset configuration instruction, and updating the target page according to the target preset configuration instruction.
7. A terminal, characterized in that: The method comprises a processor, an input interface, an output interface and a memory, wherein the processor, the input interface, the output interface and the memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Page updating method
CN110457037A
Page display method and device, electronic equipment and medium
CN110955428A