CN110321125B - Data configuration method and device for cells and readable storage medium - Google Patents

Data configuration method and device for cells and readable storage medium Download PDF

Info

Publication number
CN110321125B
CN110321125B CN201910602796.0A CN201910602796A CN110321125B CN 110321125 B CN110321125 B CN 110321125B CN 201910602796 A CN201910602796 A CN 201910602796A CN 110321125 B CN110321125 B CN 110321125B
Authority
CN
China
Prior art keywords
cell
source code
same
control attribute
project file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910602796.0A
Other languages
Chinese (zh)
Other versions
CN110321125A (en
Inventor
许笼笼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baiyou Technology Co ltd
Original Assignee
Beijing Baiyou Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baiyou Technology Co ltd filed Critical Beijing Baiyou Technology Co ltd
Priority to CN201910602796.0A priority Critical patent/CN110321125B/en
Publication of CN110321125A publication Critical patent/CN110321125A/en
Application granted granted Critical
Publication of CN110321125B publication Critical patent/CN110321125B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a data configuration method, a data configuration device and a readable storage medium of a cell, wherein the data configuration method is used for acquiring a first project file, a second project file and a third project file which are matched with a display page to be configured; respectively writing the visual layout source code of each cell in the display page into a first project file; determining the cell type of each cell based on the display information indicated by the visual layout source code of each cell; determining the same control attribute source code of a plurality of cells belonging to the same cell category; and respectively writing the control attribute source codes into a second project file or a third project file. Therefore, the number of source codes in the engineering file and the size of the application program can be reduced, and the memory space of the application program is saved.

Description

Data configuration method and device for cells and readable storage medium
Technical Field
The present application relates to the field of intelligent terminal display technologies, and in particular, to a data configuration method, a data configuration apparatus, and a readable storage medium for a cell.
Background
With the development of the technology of the intelligent terminal, the development of the application program on the intelligent terminal is rapidly developed, in the development process of the application program, the development of the page display content of the application program is very important, and the display page with reasonable layout is very important for the popularization of the application program.
At present, in the process of configuring the display including multiple cells in the display interface of the application program, three project files need to be created for each cell, if there are N cells, N × 3 project files need to be created, and when the cells have the same control, multiple repeated definitions need to be performed in the project files, so that the number and size of the files of the application program are increased, and the memory space of the application program is wasted.
Disclosure of Invention
In view of this, an object of the present application is to provide a data configuration method, a data configuration apparatus, and a readable storage medium for cell display content, in which a visual layout source code of each cell in a page to be configured is written into a first engineering file, each cell is classified according to a control attribute in display information indicated by the visual layout source code, cells of the same category have the same control, and the same control attribute source code corresponding to the same control is written into a second engineering file or a third engineering file, so that for a control having the same control attribute information, it is only necessary to write the same control attribute source code into the second engineering file or the third engineering file, and therefore, the number of source codes in the engineering file and the size of an application program can be reduced, and a memory space of the application program is saved.
The embodiment of the application provides a data configuration method of a cell, which comprises the following steps:
acquiring a first project file, a second project file and a third project file which are matched with a display page to be configured;
respectively writing the visual layout source code of each cell in the display page into a first project file;
determining the cell category to which each cell belongs based on display information indicated by the visual layout source code of each cell;
determining the same control attribute source code of a plurality of cells belonging to the same cell category;
and writing the same control attribute source code into a second project file or a third project file.
Further, before the obtaining of the first project file, the second project file, and the third project file matched with the display page to be configured, the data configuration method further includes:
determining a first storage value occupied by the visual layout source code of each cell in the display page, and determining a second storage value occupied by the control attribute source code of each cell in the display page;
generating a first engineering file matched with the first total storage values of all the cells in the display page based on each first storage value;
and generating a second engineering file and a third engineering file which are matched with second total storage values of all cells in the display page on the basis of each second storage value.
Further, the determining, based on the display information indicated by the visual layout source code of each cell, the cell category to which each cell belongs includes:
determining control attribute information of each cell based on display information indicated by the visual layout source code of each cell;
and determining that the cells with the same control attribute information belong to the same cell category.
Further, the determining the same control attribute source code of multiple cells belonging to the same cell category includes:
acquiring at least one control attribute source code of each cell in the same cell type;
dividing control attribute source codes with the same expression form in a plurality of acquired control attribute source codes into the same source code set, wherein the expression form comprises the same number of source codes and the same source code statement;
and selecting any control attribute source code from the same source code set, and determining that the control attribute source code is the same control attribute source code corresponding to a plurality of cells in the same cell type.
Further, after writing the same control attribute source code into a second project file or a third project file, the data configuration method further includes:
performing association setting on each cell in the display page and a corresponding visual layout source code in the first engineering file, and performing association setting on each cell in the display page and a corresponding same control attribute source code in the second engineering file or a corresponding same control attribute source code in the third engineering file;
and when the display page is displayed, acquiring a visual layout source code corresponding to a target cell to be displayed from the first project file, and acquiring the same control attribute source code corresponding to the same cell type to which the target cell belongs from the second project file or the third project file.
An embodiment of the present application further provides a data configuration device for a cell, where the data configuration device includes:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a first project file, a second project file and a third project file which are matched with a display page to be configured;
the first writing module is used for respectively writing the visual layout source codes of each cell in the display page into the first project file acquired by the acquisition module;
the first determining module is used for determining the cell type of each cell based on the display information indicated by the visual layout source code of each cell;
the second determining module is used for determining the same control attribute source code of a plurality of cells belonging to the same cell category;
and the second writing module is used for writing the same control attribute source code determined by the second determining module into a second project file or a third project file.
Further, the data configuration apparatus further includes a generation module, where the generation module is configured to:
determining a first storage value occupied by the visual layout source code of each cell in the display page, and determining a second storage value occupied by the control attribute source code of each cell in the display page;
generating a first engineering file matched with the first total storage values of all the cells in the display page based on each first storage value;
and generating a second engineering file and a third engineering file which are matched with the second total storage value of all the cells in the display page based on each second storage value.
Further, the first determining module is configured to:
determining control attribute information of each cell based on display information indicated by the visual layout source code of each cell;
and determining that the cells with the same control attribute information belong to the same cell category.
Further, the second determining module is configured to:
acquiring at least one control attribute source code of each cell in the same cell type;
dividing control attribute source codes with the same expression form in a plurality of acquired control attribute source codes into the same source code set, wherein the expression form comprises the same number of source codes and the same source code statement;
and selecting any control attribute source code from the same source code set, and determining that the control attribute source code is the same control attribute source code corresponding to a plurality of cells in the same cell type.
Further, the data configuration apparatus further includes a display module, where the display module is configured to:
performing association setting on each cell in the display page and a corresponding visual layout source code in the first engineering file, and performing association setting on each cell in the display page and a corresponding same control attribute source code in the second engineering file or a corresponding same control attribute source code in the third engineering file;
and when the display page is displayed, acquiring a visual layout source code corresponding to a target cell to be displayed from the first project file, and acquiring the same control attribute source code corresponding to the same cell type to which the target cell belongs from the second project file or the third project file.
An embodiment of the present application further provides an electronic device, including: the device comprises a processor, a memory and a bus, wherein the memory stores machine readable instructions executable by the processor, the processor and the memory are communicated through the bus when the electronic device runs, and the machine readable instructions are executed by the processor to execute the steps of the data configuration method of the cell.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the data configuration method for a cell as described above are performed.
According to the data configuration method, the data configuration device and the readable storage medium of the cell, a first project file, a second project file and a third project file which are matched with a display page to be configured are obtained; respectively writing the visual layout source code of each cell in the display page into a first project file; determining the cell category to which each cell belongs based on display information indicated by the visual layout source code of each cell; determining the same control attribute source code of a plurality of cells belonging to the same cell category; and writing the same control attribute source code into a second project file or a third project file.
Therefore, a first project file, a second project file and a third project file which are matched with a display page to be configured are obtained, the visual layout source code of each cell in the display page to be configured is written into the first project file, the type of each unit is determined according to the visual layout source code of each cell, the same control attribute source code corresponding to the cell of the same type is written into the second project file or the third project file, the number of source codes in the project file and the size of an application program can be reduced, and the memory space of the application program is saved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
FIG. 1 is a block diagram of a system in one possible application scenario;
fig. 2 is a flowchart of a data configuration method for a cell according to an embodiment of the present disclosure;
fig. 3 is a flowchart of another data configuration method for a cell according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a data configuration apparatus for a cell according to an embodiment of the present disclosure;
fig. 5 is a second schematic structural diagram of a data allocation apparatus for cells according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as presented in the figures, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. Every other embodiment that one skilled in the art can obtain without inventive effort based on the embodiments of the present application falls within the scope of protection of the present application.
First, an application scenario to which the present application is applicable will be described. The application can be applied to the technical field of intelligent terminal display. Referring to fig. 1, fig. 1 is a system diagram in the application scenario. As shown in fig. 1, the system includes a file storage device and a data configuration device. The data configuration device acquires a first project file, a second project file and a third project file which are matched with a display page to be configured from the file storage device, respectively writes visual layout source codes of each cell in the display page into the first project file, and writes the same control attribute source codes of the cells with the same control into the second project file or the third project file, thereby completing the data configuration of the cells.
Research shows that, in the display configuration process of an application program display interface including a plurality of cells, three engineering files need to be created for each cell at the present stage, if there are N cells, N × 3 engineering files need to be created, and when the cells have the same control, repeated definition needs to be performed in the engineering files for many times, so that the number and the size of the files of the application program are increased, and the memory space of the application program is wasted.
In view of this, an object of the present application is to provide a data configuration method, a data configuration apparatus, and a readable storage medium for cell display content, in which a visual layout source code of each cell in a page to be configured is written into a first engineering file, and each cell is classified according to a control attribute in display information indicated by the visual layout source code, where cells of the same category have the same control, and the same control attribute source code corresponding to the same control is written into a second engineering file or a third engineering file, so that for the controls having the same control attribute information, it is only necessary to write the same control attribute source code into the second engineering file or the third engineering file, which can reduce the number of source codes in the engineering file and the size of an application program, and save a memory space of the application program.
Referring to fig. 2, fig. 2 is a flowchart illustrating a data allocation method for a cell according to an embodiment of the present disclosure. As shown in fig. 2, a data configuration method for a cell provided in an embodiment of the present application includes:
step 201, obtaining a first project file, a second project file and a third project file which are matched with a display page to be configured.
In the step, a first project file, a second project file and a third project file which are matched with a storage space and a storage path of a display page to be configured are obtained, so that source codes corresponding to cells in the display page to be configured are written into the corresponding files, and data configuration of each cell in the display page to be configured is completed.
Here, taking the system where the display page to be configured is located as an IOS system as an example, the engineering files configured for the display page to be configured are divided into three types, one type is an xib file, and a visual layout source code of the display page to be configured is written in the file to indicate what content is displayed at what position in the display page to be configured. The other two engineering files are the m file and the h file, and the two engineering files are used for writing in the control attribute source code of the control in the display page to be configured and indicating the specific display form of the control. For the control attribute source code of the same control, only one of the m file and the h file needs to be written, and the same control cannot be repeatedly declared in the m file and the h file.
The m file is a private attribute file, the h file is a public attribute file, and the control attribute source code written in the h file can only be read in other function functions which do not belong to the same class.
Step 202, respectively writing the visual layout source code of each cell in the display page into a first project file.
In the step, the visual layout source codes of each cell in the display page to be configured are written into the first project file at one time according to a preset writing sequence.
The preset writing sequence may be a sequence in which the cells appear in the display page to be configured, or the number of the statements of the visual layout source code corresponding to each cell is written into the first project file in an increasing (decreasing) sequence.
Here, the cells in the display page to be configured may be tables displayed in the display page, or menu bars that can be displayed in columns in the display page to be configured, or the like.
Taking a common mobile phone address book as an example, a column of each contact person can be called as a cell.
And step 203, determining the cell type of each cell based on the display information indicated by the visualized layout source code of each cell.
In this step, the display information indicated in the visualized layout source code of each cell may determine the control to be displayed and the display position of the control for each cell, and classify the cells according to the content of the control to be displayed.
The control to be displayed may be a picture, a text, a shape, or the like.
Here, for each cell, there is the same possibility of the control to be displayed, that is, taking a common mobile phone address book as an example, in each column, there is an icon at the top, and in the case that the user does not make any manual change, the icons are all self-contained by the system, each column is the same, and the column in which the same icon is located is of one type.
And 204, determining the same control attribute source code of a plurality of cells belonging to the same cell type.
In this step, at least two cells exist in the same cell type, each cell has its own corresponding control attribute source code, and it is determined that a plurality of cells in the same cell type all correspond to the same segment of control attribute source code.
And 205, writing the same control attribute source code into a second project file or a third project file.
In the step, the determined control attribute source codes are written into a second project file and a third project file according to a preset sequence.
The preset sequence may be an order in which the cells appear in a display page to be configured, or an association degree of each control attribute, or an order in which the number of control attribute source code statements increases (decreases).
Here, taking the system IOS system where the display page to be configured is located, the second engineering file and the third engineering file are the.m file and the.h file as an example, according to the requirement of product design, it is determined whether the attribute declaration of a certain control is public or private, the public control attribute source code is written into the.h file, and the private control attribute source code is written into the.m file, and after the attribute of a certain control is defined in the.h (.m), the definition in the.m (.h) file is not possible again, that is, the definition for a control should be unique.
According to the data configuration method of the cell, a first project file, a second project file and a third project file which are matched with a display page to be configured are obtained; respectively writing the visual layout source code of each cell in the display page into a first project file; determining the cell category to which each cell belongs based on display information indicated by the visual layout source code of each cell; determining the same control attribute source code of a plurality of cells belonging to the same cell category; and respectively writing the control attribute source codes into a second project file or a third project file.
Therefore, a first project file, a second project file and a third project file which are matched with a display page to be configured are obtained, the visual layout source code of each unit cell in the display page to be configured is written into the first project file, the type of each unit cell is determined according to the visual layout source code of each unit cell, the same control attribute source code corresponding to the unit cell of the same type is written into the second project file and the third project file, the number of source codes in the project files and the size of an application program can be reduced, and data space is saved.
Referring to fig. 3, fig. 3 is a flowchart illustrating another data allocation method for a cell according to an embodiment of the present disclosure. As shown in fig. 3, a data configuration method for a cell provided in an embodiment of the present application includes:
step 301, obtaining a first project file, a second project file and a third project file which are matched with a display page to be configured.
Step 302, respectively writing the visual layout source code of each cell in the display page into a first project file.
And step 303, determining control attribute information of each cell based on the display information indicated by the visualized layout source code of each cell.
In the step, according to the display information represented by the visual layout source code corresponding to each cell, the control attribute information in each cell is found from the display information.
Wherein the display information indicated by the visual layout source code comprises what control is to be displayed in each cell, and the display position of the display control in the cell; the control attribute information comprises the name of the control and the display form of the control. Such as whether the control is to display text or pictures, as well as text content and picture content, etc.
And step 304, determining that the cells with the same control attribute information belong to the same cell category.
In this step, cells with the same control attribute information, i.e., the name of the control and the display form of the control, are divided into the same cell type.
Here, each cell may be divided to belong to one or more cell categories.
Taking the example that the content displayed by a certain cell is triangle and character, the cell belongs to the triangle cell category and the character cell category, and the shapes and the sizes of the triangles to be displayed by the cells in the triangle cell category are the same; the text content, color, size, typographical form, etc. to be displayed by the cells in the text cell category are all the same.
And 305, determining the same control attribute source code of a plurality of cells belonging to the same cell type.
And step 306, writing the same control attribute source code into a second project file or a third project file.
The descriptions of step 301, step 302, step 305, and step 306 may refer to the descriptions of step 201, step 202, step 204, and step 205, and the same technical effect can be achieved, which is not described in detail herein.
Further, before step 301, the method further includes:
determining a first storage value occupied by the visual layout source code of each cell in the display page, and determining a second storage value occupied by the control attribute source code of each cell in the display page; generating a first engineering file matched with the first total storage values of all the cells in the display page based on each first storage value; and generating a second engineering file and a third engineering file which are matched with the second total storage value of all the cells in the display page based on each second storage value.
In the step, a first storage value is determined according to the size of a memory required by the visual layout source code corresponding to each cell in the display page; determining a second storage value according to the size of the required memory of the control attribute source code corresponding to each cell in the display page; adding the first stored values of all the cells in the display page to obtain the size of the total storage space of the internal memory required by the visual layout source codes of all the cells in the display page, determining the first total stored value, generating a first engineering file stored value which is greater than or equal to the first total stored value, and ensuring that the visual layout source codes of each cell in the display page can be written in; and adding the second stored values of all the cells in the display page to obtain the size of the total storage space of the memory required by the attribute source codes of all the cells in the display page, determining the second total stored value, generating a second engineering file and a third engineering file stored value which are greater than or equal to the second total stored value, and ensuring that the control attribute source codes of each cell in the display page can be written in.
Further, step 305 further includes:
acquiring at least one control attribute source code of each cell in the same cell type; dividing control attribute source codes with the same expression form in a plurality of acquired control attribute source codes into the same source code set, wherein the expression form comprises the same number of source codes and the same source code statement; and selecting any control attribute source code from the same source code set, and determining that the control attribute source code is the same control attribute source code corresponding to a plurality of cells in the same cell type.
In this step, through steps 303 to 304, a cell category to which each cell belongs in a display page is determined, at least one cell is included in the same cell category, control attribute source codes having the same expression form among a plurality of acquired control attribute source codes are divided into the same source code set according to at least one control attribute source code of each cell in the same cell category, and any control attribute source code is selected from the divided same source code set, where the control attribute source code is the same control attribute source code determined for the cell category to which the control attribute source code belongs in the same cell category. When the control attribute source codes are written into the second engineering file or the third engineering file, the control attribute source codes can be written once.
Wherein, the expression form comprises the same source code number and the same source code statement.
Taking the display page as a page of the mobile phone address book as an example, in each subfield, the frontmost icon is provided, under the condition that a user does not change the display page manually, the icon is carried by the system, all subfields in the whole page of the mobile phone address book are divided into the same icon category cells based on the frontmost icon, after at least one control attribute source code corresponding to each subfield is obtained, the source codes corresponding to the same icon in each subfield, which are the same in number and source code sentences, are divided into the same source code set, and any control attribute source code in the source code set is directed at the same attribute control source code corresponding to the icon in each subfield.
Further, after step 306, the method further includes:
performing association setting on each cell in the display page and a corresponding visual layout source code in the first engineering file, and performing association setting on each cell in the display page and a corresponding same control attribute source code in the second engineering file or a corresponding same control attribute source code in the third engineering file; and when the display page is displayed, acquiring a visual layout source code corresponding to a target cell to be displayed from the first project file, and acquiring the same control attribute source code corresponding to the same cell type to which the target cell belongs from the second project file or the third project file.
In the step, each cell in a display page is associated with a corresponding visual layout source code in a first project file, each cell in the display page is associated with a corresponding control attribute source code in a second project file or a corresponding control attribute source code in a third project file, when the page is displayed, which position of the target cell to be displayed is determined according to an indication of the visual layout source code associated with the target cell to be displayed in the display page, the specific content of the control is displayed according to the control source code associated with the target cell, the content display of the target cell is completed, the display of each cell is sequentially completed, and therefore the display of the display page is completed.
The association of the cells with the visual layout source codes and the control attribute source codes refers to the binding of the cells with the visual layout source codes and the control attribute source codes corresponding to the cells, and when the cells are displayed, the display of the contents of the cells is completed according to the bound visual layout source codes and the control attribute source codes.
According to the data configuration method of the cell, a first project file, a second project file and a third project file which are matched with a display page to be configured are obtained; respectively writing the visual layout source code of each cell in the display page into a first project file; determining control attribute information of each cell based on display information indicated by the visual layout source code of each cell; determining that the cells with the same control attribute information belong to the same cell category; determining the same control attribute source code of a plurality of cells belonging to the same cell category; and writing the same control attribute source code into a second project file or a third project file.
The method includes the steps of obtaining a first project file, a second project file and a third project file which are matched with a display page to be configured, writing a visual layout source code of each cell in the display page to be configured into the first project file, determining control attribute information of each cell according to display information indicated by the visual layout source code of each cell, determining that the cells with the same control attribute information belong to the same cell type, dividing the cells with the same control attribute into the cells of the same type, writing the same control attribute source code corresponding to the same control attribute information of a plurality of cells of the same type into the second project file or the third project file when the cells are written into the second project file or the third project file, reducing the number of source codes in the project file and the size of an application program, and saving the memory space of the application program.
Referring to fig. 4 to 5, fig. 4 is a first schematic structural diagram of a data allocation apparatus for a cell provided in an embodiment of the present application, and fig. 5 is a second schematic structural diagram of the data allocation apparatus for a cell provided in the embodiment of the present application. As shown in fig. 4, the data configuration apparatus 400 of the cell includes:
the first obtaining module 410 is configured to obtain a first project file, a second project file, and a third project file that are matched with a display page to be configured.
The first writing module 420 is configured to write the visual layout source code of each cell in the display page into the first project file acquired by the acquiring module 410, respectively.
The first determining module 430 is configured to determine a cell category to which each cell belongs based on the display information indicated by the visualized layout source code of each cell.
And a second determining module 440, configured to determine the same control attribute source code of multiple cells belonging to the same cell category.
The second writing module 450 is configured to write the control attribute source code determined by the second determining module 440 into the second project file or the third project file, respectively.
Further, as shown in fig. 5, the data configuration apparatus 400 of the cell further includes:
a generation module 460 and a display module 470.
Further, the generating module 460 is configured to:
determining a first storage value occupied by the visual layout source code of each cell in the display page, and determining a second storage value occupied by the control attribute source code of each cell in the display page;
generating a first engineering file matched with the first total storage values of all the cells in the display page based on each first storage value;
and generating a second engineering file and a third engineering file which are matched with second total storage values of all cells in the display page on the basis of each second storage value.
Further, the display module 470 is configured to:
performing association setting on each cell in the display page and a corresponding visual layout source code in the first engineering file, and performing association setting on each cell in the display page and a corresponding same control attribute source code in the second engineering file or a corresponding same control attribute source code in the third engineering file;
and when the display page is displayed, acquiring a visual layout source code corresponding to a target cell to be displayed from the first project file, and acquiring the same control attribute source code corresponding to the same cell type to which the target cell belongs from the second project file or the third project file.
Further, the first determining module 430 is configured to:
determining control attribute information of each cell based on display information indicated by the visual layout source code of each cell;
and determining that the cells with the same control attribute information belong to the same cell category.
Further, the second determining module 440 is configured to:
acquiring at least one control attribute source code of each cell in the same cell type;
dividing control attribute source codes with the same expression form in a plurality of acquired control attribute source codes into the same source code set, wherein the expression form comprises the same number of source codes and the same source code statement;
and selecting any control attribute source code from the same source code set, and determining that the control attribute source code is the same control attribute source code corresponding to a plurality of cells in the same cell type.
The data configuration device for the cell, provided by the embodiment of the application, acquires a first project file, a second project file and a third project file which are matched with a display page to be configured; respectively writing the visual layout source code of each cell in the display page into a first project file; determining the cell type of each cell based on the display information indicated by the visual layout source code of each cell; determining the same control attribute source code of a plurality of cells belonging to the same cell category; and respectively writing the control attribute source codes into a second project file or a third project file.
Therefore, a first project file, a second project file and a third project file which are matched with a display page to be configured are obtained, the visual layout source code of each cell in the display page to be configured is written into the first project file, the type of each unit is determined according to the visual layout source code of each cell, the same control attribute source code corresponding to the cells of the same type is written into the second project file and the third project file only once, the number of source codes in the project file and the size of an application program can be reduced, and the memory space of the application program is saved.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 6, the electronic device 600 includes a processor 610, a memory 620, and a bus 630.
The memory 620 stores machine-readable instructions executable by the processor 610, when the electronic device 600 runs, the processor 610 communicates with the memory 620 through the bus 630, and when the machine-readable instructions are executed by the processor 610, the steps of the data configuration method of the cell in the method embodiment shown in fig. 2 and fig. 3 may be executed.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program may perform the steps of the cell data configuration method in the method embodiments shown in fig. 2 and fig. 3.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solutions of the present application, which are essential or part of the technical solutions contributing to the prior art, may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. A data configuration method of a cell, the data configuration method comprising:
acquiring a first project file, a second project file and a third project file which are matched with a display page to be configured;
respectively writing the visual layout source code of each cell in the display page into a first project file;
determining the cell type of each cell based on the display information indicated by the visual layout source code of each cell;
determining the same control attribute source code of a plurality of cells belonging to the same cell category;
writing the same control attribute source code into a second project file or a third project file;
the determining the same control attribute source code of a plurality of cells belonging to the same cell category includes:
acquiring at least one control attribute source code of each cell in the same cell type;
dividing control attribute source codes with the same expression form in a plurality of acquired control attribute source codes into the same source code set, wherein the expression form comprises the same number of source codes and the same source code statement;
and selecting any control attribute source code from the same source code set, and determining that the control attribute source code is the same control attribute source code corresponding to a plurality of cells in the same cell type.
2. The data configuration method according to claim 1, wherein before the obtaining of the first project file, the second project file, and the third project file that match the display page to be configured, the data configuration method further comprises:
determining a first storage value occupied by the visual layout source code of each cell in the display page, and determining a second storage value occupied by the control attribute source code of each cell in the display page;
generating a first engineering file matched with the first total storage values of all the cells in the display page based on each first storage value;
and generating a second engineering file and a third engineering file which are matched with the second total storage value of all the cells in the display page based on each second storage value.
3. The data configuration method according to claim 1, wherein the determining the cell category to which each cell belongs based on the display information indicated by the visualized layout source code of each cell comprises:
determining control attribute information of each cell based on display information indicated by the visual layout source code of each cell;
and determining that the cells with the same control attribute information belong to the same cell category.
4. The data configuration method of claim 1, wherein after writing the same control property source code into a second project file or a third project file, the data configuration method further comprises:
performing association setting on each cell in the display page and a corresponding visual layout source code in the first engineering file, and performing association setting on each cell in the display page and a corresponding same control attribute source code in the second engineering file or a corresponding same control attribute source code in the third engineering file;
and when the display page is displayed, acquiring a visual layout source code corresponding to a target cell to be displayed from the first project file, and acquiring the same control attribute source code corresponding to the same cell type to which the target cell belongs from the second project file or the third project file.
5. A data configuration apparatus for a cell, the data configuration apparatus comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a first project file, a second project file and a third project file which are matched with a display page to be configured;
the first writing module is used for respectively writing the visual layout source code of each cell in the display page into the first project file acquired by the acquisition module;
the first determining module is used for determining the cell type of each cell based on the display information indicated by the visual layout source code of each cell;
the second determining module is used for determining the same control attribute source code of a plurality of cells belonging to the same cell category;
the second writing module is used for writing the same control attribute source code determined by the second determining module into a second project file or a third project file;
the second determination module is to:
acquiring at least one control attribute source code of each cell in the same cell type;
dividing control attribute source codes with the same expression form in a plurality of acquired control attribute source codes into the same source code set, wherein the expression form comprises the same number of source codes and the same source code statement;
and selecting any control attribute source code from the same source code set, and determining that the control attribute source code is the same control attribute source code corresponding to a plurality of cells in the same cell type.
6. The data configuration apparatus according to claim 5, wherein the data configuration apparatus further comprises a generation module, and the generation module is configured to:
determining a first storage value occupied by the visual layout source code of each cell in the display page, and determining a second storage value occupied by the control attribute source code of each cell in the display page;
generating a first engineering file matched with the first total storage values of all the cells in the display page based on each first storage value;
and generating a second engineering file and a third engineering file which are matched with the second total storage value of all the cells in the display page based on each second storage value.
7. The data configuration apparatus of claim 5, further comprising a display module, wherein the display module is configured to:
performing association setting on each cell in the display page and a corresponding visual layout source code in the first engineering file, and performing association setting on each cell in the display page and a corresponding same control attribute source code in the second engineering file or a corresponding same control attribute source code in the third engineering file;
and when the display page is displayed, acquiring a visual layout source code corresponding to a target cell to be displayed from the first project file, and acquiring the same control attribute source code corresponding to the same cell type to which the target cell belongs from the second project file or the third project file.
8. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is operating, the machine-readable instructions, when executed by the processor, performing the steps of the data configuration method of a cell of any one of claims 1 to 4.
9. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, performs the steps of the data arrangement method of a cell according to any one of claims 1 to 4.
CN201910602796.0A 2019-07-05 2019-07-05 Data configuration method and device for cells and readable storage medium Active CN110321125B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910602796.0A CN110321125B (en) 2019-07-05 2019-07-05 Data configuration method and device for cells and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910602796.0A CN110321125B (en) 2019-07-05 2019-07-05 Data configuration method and device for cells and readable storage medium

Publications (2)

Publication Number Publication Date
CN110321125A CN110321125A (en) 2019-10-11
CN110321125B true CN110321125B (en) 2023-03-28

Family

ID=68122736

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910602796.0A Active CN110321125B (en) 2019-07-05 2019-07-05 Data configuration method and device for cells and readable storage medium

Country Status (1)

Country Link
CN (1) CN110321125B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113393572B (en) * 2021-06-17 2023-07-21 北京千丁互联科技有限公司 Point cloud data generation method and device, mobile terminal and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488468A (en) * 2012-06-13 2014-01-01 腾讯科技(北京)有限公司 Compiling method and system for portal web site pages
CN103853845A (en) * 2014-03-24 2014-06-11 南通大学 Dynamic analytic method of complex form
US9158743B1 (en) * 2011-03-28 2015-10-13 Amazon Technologies, Inc. Grid layout control for network site design
CN106844307A (en) * 2017-01-05 2017-06-13 上海核工程研究设计院 It is a kind of to realize that Excel turns the system and method for Word based on mark
CN107544806A (en) * 2017-09-04 2018-01-05 江苏中威科技软件系统有限公司 Visualize list method for drafting

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9158743B1 (en) * 2011-03-28 2015-10-13 Amazon Technologies, Inc. Grid layout control for network site design
CN103488468A (en) * 2012-06-13 2014-01-01 腾讯科技(北京)有限公司 Compiling method and system for portal web site pages
CN103853845A (en) * 2014-03-24 2014-06-11 南通大学 Dynamic analytic method of complex form
CN106844307A (en) * 2017-01-05 2017-06-13 上海核工程研究设计院 It is a kind of to realize that Excel turns the system and method for Word based on mark
CN107544806A (en) * 2017-09-04 2018-01-05 江苏中威科技软件系统有限公司 Visualize list method for drafting

Also Published As

Publication number Publication date
CN110321125A (en) 2019-10-11

Similar Documents

Publication Publication Date Title
CN108388598B (en) Electronic device, data storage method, and storage medium
US10120842B2 (en) Font preloading
CN103678631A (en) Page rendering method and device
EP2977913A1 (en) Type setting method and apparatus
CN104503957A (en) Formula graph automatic generation method and device
CN103559184A (en) Form page display method and device
CN105389184A (en) Configuration method and apparatus for product interface information
CN113111624A (en) Text display method and device, electronic equipment and storage medium
CN110321125B (en) Data configuration method and device for cells and readable storage medium
CN111400998A (en) Text display method and device, electronic equipment and readable storage medium
CN114942863A (en) Cascade snapshot processing method, device and equipment and storage medium
CN109240660B (en) Access method of advertisement data, storage medium, electronic device and system
CN115359828A (en) Server firmware refreshing method, device, terminal and storage medium
CN107818000B (en) Operation method and device of page table
CN114548040A (en) Note processing method, electronic device and storage medium
CN113342420A (en) Firmware configuration method, device, equipment and storage medium
CN112464618A (en) Method and device for paging document data, storage medium and electronic equipment
CN109165065B (en) Method, device and equipment for processing word list
US9619915B2 (en) Method and apparatus for converting an animated sequence of images into a document page
KR20090000485A (en) Method and system for providing font
CN114625365B (en) Webpage editing system, webpage editing method, electronic device and storage medium
CN118261128A (en) Method, medium and device for typesetting electronic book content
CN118193941A (en) Address de-duplication method, device, HMI device and storage medium
CN114415900A (en) Method and device for quickly positioning list, electronic equipment and storage medium
CN115358915A (en) Video memory data processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant