Chinese character description analysis method applied to computer software development

Through the descriptive parsing method of Chinese characters, the problem of difficult-to-understand document structures such as XML is solved, low-code and efficient software development is realized, development efficiency and reading are improved, and it is suitable for multi-language environments.

CN119225732APending Publication Date: 2024-12-31GUIZHOU HAOYI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411267827.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

In the prior art, document structures such as XML are difficult to understand and read for non-professional and technical personnel, especially developers who are not very good in English, resulting in low development efficiency and development model dependent on cooperation of multiple personnel, which is inefficient.

Method used

The Chinese character descriptive analysis method is adopted to define the document structure through specific Chinese words and symbols, including node definition, attribute definition and child node processing, generate corresponding view components and business components, and dynamically generate interfaces and process business logic.

Benefits of technology

It realizes high reading and low code quality of documents, reduces development cycles, improves development efficiency, and allows developers to describe the document structure in Chinese, which is easy to understand and remember, and is suitable for multilingual development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225732A_ABST
    Figure CN119225732A_ABST
Patent Text Reader

Abstract

The invention discloses a Chinese character description analysis method applied to computer software development. The Chinese character description analysis method comprises the following steps: S1, using a Chinese word 'A' as a node definition in a document; s2, defining attributes of nodes by using Chinese 'B'; s3, representing values of the attributes, sub-nodes of the attributes and sub-nodes of the nodes by using contents in a symbol C and a symbol D; s4, taking a symbol 'E' as a segmentation symbol of each attribute in the node; s5, the attribute name shows that the attribute is an array with the end of 'H'; s6, using 'F' or 'G' to represent that one attribute is True or False; s7, defining that the document structure only has one main node; s8, when real 'C' and 'D' are encountered in the attribute content, adding ' / ' for escape; and S9, starting document analysis according to the definition. The method has the characteristics of easy understanding, easy memorization, easy writing, low code and the like, and is easy to analyze.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a Chinese character description parsing method applied to computer software development, belonging to the technical field of software development. Background Art

[0002] With the continuous development of information technology, in the document storage structure and development mode, we use document structures such as XML, JSON, HTML and other document structures, especially XML document structure, which has many specific restrictions, such as file header definition, node definition must be in <xxx>< / xxx> Definitions, as well as some other proprietary definitions. Such a document structure is not easy for non-professional technicians to understand and read, let alone remember, especially for developers who are not very good at English.

[0003] At the same time, the current development model generally relies on front-end personnel, back-end personnel, and artists to cooperate with each other to complete the development of a functional module. This model leads to low development efficiency. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a Chinese character descriptive parsing method applied to computer software development to solve the technical problems existing in the above-mentioned prior art.

[0005] The technical solution adopted by the present invention is: a Chinese character descriptive parsing method applied to computer software development, comprising the following steps:

[0006] S1, using the Chinese word "A" as the node definition in the document, encountering "A" during document parsing indicates the start of a new document node, until encountering the next node definition indicates the end of the node;

[0007] S2, uses Chinese “B” to define the attributes of the node;

[0008] S3, use a symbol "C" and the content in "D" to represent the value of an attribute, the child node of an attribute, and the child node of a node. When "C" is located after "is", the content in "D" represents the value of the attribute. When "C" and "D" each occupy a line, it means that it is a child node of the current attribute or a child node of the current node.

[0009] S4, uses the symbol "E" as the separator of each attribute in the node, and the line break not in "C" and "D" indicates the end of the current attribute;

[0010] S5, the attribute name ends with "H" which means that the attribute is an array, and the elements in the array can be a string array or a node group;

[0011] S6, use "F" or "G" to indicate that an attribute is True or False, and attributes without "F" or "G" default to True;

[0012] S7, defines that the document structure has only one main node, and the rest of the nodes are in the main node;

[0013] S8, when encountering a real "C" or "D" in the attribute content, escape it by adding a " / " in front of it;

[0014] S9, document parsing starts according to the above definition. When "A" is encountered in document parsing, it means that there is a node A1 starting, then the attributes of A1 are parsed, and the attributes and attribute values ​​are separated according to "B". The attribute values ​​can be contained by "C" and "D". If the character after the attribute is "H", it means that the attribute is an array, and the elements of the array are located in "C" and "D". The character array is separated by "E"; the node array is contained in "C" and "D" and defined according to the node definition method; the attribute parsing is completed. If "C" is encountered alone in a line, it means that the sub-nodes of the current node are parsed, until the corresponding "D" is encountered, indicating that the sub-node parsing is completed.

[0015] Preferably, A, B, C, D, E, F, G, and H represent any Chinese characters and are different from each other.

[0016] Preferably, A=type, B=yes, C=[, D=], E=,, F=on, G=off, H=group.

[0017] Preferably, the method further comprises the following steps:

[0018] S10, parsing is performed using different development languages ​​according to steps S1-S9 to obtain an object "I" with key-value pairs and child nodes;

[0019] S11, using the type corresponding to A in object I to map different view components or business components;

[0020] Preferably, the method further comprises the following steps:

[0021] S12, for the view component, first create a top-level control according to the type and properties of the top-level node, then determine whether there is a child node, if there is a child node, create a child control according to the type and properties of the child node, and add the child control to the parent control, and recursively create controls until the control creation is completed; the view component includes a panel component, a tree component, an image component, a text component, a list component, a table component, and other different view components expanded according to needs;

[0022] For the web interface, the view component is executed to generate the corresponding front-end HTML and its corresponding javascript and CSS style code, which are output to the browser for interface display;

[0023] For the winform interface, add the generated controls to the form to display the interface.

[0024] Preferably, the method further comprises the following steps:

[0025] S13, for business components, first create the top-level component through the type and attributes of the top-level node,

[0026] At the same time, business processing of business components is executed. After the processing is completed, the processing results are saved as parameters for subsequent processing, and then it is determined whether there are child nodes. If there are child nodes, the corresponding business components are created according to the type and attributes of the child nodes, and the corresponding business processing is executed. In this way, the execution process of all nodes is recursively completed; the business components include data addition components, data editing components, data deletion components, data query components and business components expanded according to different business logics.

[0027] Beneficial effects of the present invention:

[0028] 1. Compared with the prior art, the present invention uses commonly used Chinese words and symbols to describe documents for data storage or configuration file storage, and uses the objects parsed from the structured document to create corresponding business components, and then completes the corresponding business logic, and creates corresponding view components to dynamically generate interfaces. It has good readability and low code, and is not restricted by special characters and many escape characters.

[0029] 2. Compared with the prior art, the present invention develops interfaces and processes business logic through Chinese document descriptions, allowing later developers to develop a functional module through simple descriptions, which can greatly shorten the development cycle and implement a base code development method to improve development efficiency and make it easier for other developers to take over.

[0030] 3. Compared with the prior art, the present invention enables software developers to use specific Chinese words and Chinese symbols to describe the document structure in Chinese, just like writing an essay, so that readers can understand it at a glance.

[0031] 4. Compared with the prior art, the present invention has the characteristics of being easy to understand, easy to remember, easy to write, low in code, and easy to parse. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0033] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.

[0034] Embodiment 1:

[0035] The Chinese character descriptive parsing method used in computer software development includes the following steps:

[0036] S1, using the Chinese word "A" as the node definition in the document, encountering "A" during document parsing indicates the start of a new document node, until encountering the next node definition indicates the end of the node;

[0037] S2, uses Chinese “B” to define the attributes of the node;

[0038] S3, use a symbol "C" and the content in "D" to represent the value of an attribute, the child node of an attribute, and the child node of a node. When "C" is located after "is", the content in "D" represents the value of the attribute. When "C" and "D" each occupy a line, it means that it is a child node of the current attribute or a child node of the current node.

[0039] S4, uses the symbol "E" as the separator of each attribute in the node, and the line break not in "C" and "D" indicates the end of the current attribute;

[0040] S5, the attribute name ends with "H" which means that the attribute is an array, and the elements in the array can be a string array or a node group;

[0041] S6, use "F" or "G" to indicate that an attribute is True or False, and attributes without "F" or "G" default to True;

[0042] S7, defines that the document structure has only one main node, and the rest of the nodes are in the main node;

[0043] S8, when encountering a real "C" or "D" in the attribute content, escape it by adding a " / " in front of it;

[0044] S9, document parsing starts according to the above definition. When "A" is encountered in document parsing, it means that there is a node A1 starting, so the attributes of A1 are parsed, and the attributes and attribute values ​​are separated according to "B". The attribute values ​​can be contained by "C" and "D". If the character after the attribute is "H", it means that the attribute is an array, and the elements of the array are located in "C" and "D". The character array is separated by "E"; the node array is contained in "C" and "D" and defined according to the node definition method; the attribute parsing is completed. If "C" is encountered in a single line, it means that the sub-nodes of the current node are parsed, until the corresponding "D" is encountered, indicating that the sub-node parsing is completed;

[0045] S10, the above A, B, C, D, E, F, G, H are arbitrary Chinese characters and are different from each other. In this embodiment, A=type, B=yes, C=[, D=], E=,, F=open, G=close, H=group are defined. The document written in this way is easy to understand. According to the above method, we can implement the parsing through different development languages ​​to obtain an object "I" with key-value pairs and child nodes;

[0046] S11, using the value corresponding to A in object I to map different view components or business components;

[0047] S12, taking the view component as an example, the steps of automatically generating a web interface using the Chinese document structure are as follows: Taking the following components as examples, the value of the type in object I corresponds to the flow layout component according to A1, the panel component with title, A3, the data table component, and A4, the value of other attributes of the component comes from other attributes of object I, and the subcomponents contained in the component come from the subnodes of object I;

[0048] Create different top-level components according to the value corresponding to attribute A in object I, set the attributes of the component through other attributes of I, and then determine whether object I has child nodes and whether the current component is a container component. If the conditions are met, continue to create its child components through child nodes and add the child components to the parent component; after obtaining the component, generate the corresponding html code according to the component, and present the code to the browser to obtain the corresponding interface;

[0049] In this embodiment, we define A = type, B = is, C = [, D = ], E =,, F = open, G = close, H = group, A1 = flow component, referred to as flow, A2 = panel component, referred to as panel, A3 = data table component, referred to as table, A4 = tree structure component, referred to as tree;

[0050] The present invention first parses the corresponding key-value object I, creates the corresponding top-level component through the type of I after obtaining I, then creates the corresponding sub-component through the child node object of I, adds the sub-component to the parent component, and then calls the component to generate the corresponding html code and outputs it to the browser to present the corresponding interface.

[0051] For example:

[0052] The type is stream, the ID is div, the width is 600, the height is 400, and it is displayed horizontally.

【

[0054] The type is tree, the Id is tree, and the width is 100

[0055] The data source is / xxx / getTreeData

[0056] The type is table, the Id is grid, full

[0057] The data source is / xxx / getGridData

【

[0059] Type is object, attribute is ID, name is ID, width is 80

[0060] The type is object, the attribute is NAME, and the name is name

[0061] The type is object, the attribute is AGE, and the name is age 】 】

[0064] The above document represents an interface view with a left-right structure, with a tree view on the left and a table view on the right. The present invention is used to first parse the top-level object stream, and then parse the attributes of the object stream, such as ID, width, height, etc., through the attribute parsing method defined in the present invention. Since the object stream also has lower-level nodes, two child node object trees and a table are further parsed according to the present invention, wherein the child object nodes of the table are used to parse the columns displayed as a table, such as: ID, NAME, AGE, etc. After obtaining the corresponding key-value object, the corresponding view component is created according to the attributes of the object and its child node objects. For example, in the above example, a stream component is first created, and the corresponding ID, width, height and other attributes are set for the stream component. Then, a tree component is created based on the child nodes and the tree's ID, data source, width and other attributes are set. Then, a table component is created and the table's ID, data source, whether it is full and other attributes are set. Then, the columns displayed in the table are set based on the child nodes of the table. The columns contain corresponding attributes, names, widths, etc. After obtaining the component, the corresponding interface html source code is generated through the component to complete the interface presentation.

[0065] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A Chinese character descriptive parsing method for computer software development, characterized in that: The following steps are involved: S1, using the Chinese word "A" as the node definition in the document, encountering "A" during document parsing indicates the start of a new document node, until encountering the next node definition indicates the end of the node; S2, uses Chinese "B" to define the attributes of the node; S3, use the symbol "C" and the content in "D" to represent the value of the attribute, the child node of the attribute, and the child node of the node. When "C" is located after "is", the content in "D" represents the value of the attribute. When "C" and "D" each occupy a line, it means that it is the child node of the current attribute or the child node of the current node. S4, uses the symbol "E" as the separator of each attribute in the node, and the line break not in "C" and "D" indicates the end of the current attribute; S5, the attribute name ends with "H" which means that the attribute is an array, and the elements in the array can be a string array or a node group; S6, use "F" or "G" to indicate that an attribute is True or False, and attributes without "F" or "G" default to True; S7, defines that the document structure has only one main node, and the rest of the nodes are in the main node; S8, when encountering a real "C" or "D" in the attribute content, escape it by adding a " / " in front of it; S9, document parsing starts according to the above definition. When "A" is encountered in document parsing, it means that there is a node A1 starting, then the attributes of A1 are parsed, and the attributes and attribute values ​​are separated according to "B". The attribute values ​​can be contained by "C" and "D". If the character after the attribute is "H", it means that the attribute is an array, and the elements of the array are located in "C" and "D". The character array is separated by "E"; the node array is contained in "C" and "D" and defined according to the node definition method; the attribute parsing is completed. If "C" is encountered alone in a line, it means that the sub-nodes of the current node are parsed, until the corresponding "D" is encountered, indicating that the sub-node parsing is completed.

2. The Chinese character descriptive parsing method for computer software development according to claim 1, characterized in that: A, B, C, D, E, F, G, and H represent any Chinese characters and are different from each other.

3. The Chinese character descriptive parsing method for computer software development according to claim 2, characterized in that: A=Type, B=Yes, C=[, D=], E=,, F=On, G=Off, H=Group.

4. The Chinese character descriptive parsing method for computer software development according to claim 3, characterized in that: The following steps are also included: S10, according to steps S1-S9, the parsing is performed using different development languages ​​to obtain an object "I" with key-value pairs and child nodes; S11, using the type corresponding to A in object I to map different view components or business components.

5. The Chinese character descriptive parsing method for computer software development according to claim 4, characterized in that: The following steps are also included: S12, for the view component, first create a top-level control according to the type and properties of the top-level node, then determine whether there is a child node, if there is a child node, create a child control according to the type and properties of the child node, and add the child control to the parent control, and recursively create controls until the control creation is completed; the view component includes a panel component, a tree component, an image component, a text component, a list component, a table component, and other different view components expanded according to needs; For the web interface, the view component is executed to generate the corresponding front-end HTML and its corresponding javascript and CSS style code, which are output to the browser for interface display; For the winform interface, add the generated controls to the form to display the interface.

6. The Chinese character descriptive parsing method for computer software development according to claim 4, characterized in that: The following steps are also included: S13, for business components, first create the top-level component through the type and attributes of the top-level node, and execute business processing for the business component at the same time. After the processing is completed, save the processing result as a parameter for subsequent processing, and then determine whether there are child nodes. If there are child nodes, create the corresponding business component through the type and attributes of the child nodes, and execute the corresponding business processing. In this way, the execution process of all nodes is recursively completed; the business components include data addition components, data editing components, data deletion components, data query components and business components expanded according to different business logics.