CN114385946A - Data structure editing method and device, electronic equipment and storage medium - Google Patents
Data structure editing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114385946A CN114385946A CN202011139968.4A CN202011139968A CN114385946A CN 114385946 A CN114385946 A CN 114385946A CN 202011139968 A CN202011139968 A CN 202011139968A CN 114385946 A CN114385946 A CN 114385946A
- Authority
- CN
- China
- Prior art keywords
- data structure
- reference object
- target
- text
- text content
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
- G06F16/986—Document structures and storage, e.g. HTML extensions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Data Mining & Analysis (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the application discloses a method and a device for editing a data structure, electronic equipment and a storage medium, wherein the method comprises the following steps: displaying a data structure page, wherein the data structure page comprises a text editing area and a text format conversion area, the text format conversion area comprises an identification selection control corresponding to a prefix identification, and the text editing area is used for editing a data structure of a service; responding to the operation aiming at the text editing area, and acquiring text content to be edited; in response to the operation of selecting a control aiming at the target identifier, displaying a reference object list corresponding to the target prefix identifier, wherein the reference object list comprises at least one reference object corresponding to the target file extension prefix; and in response to the object selection operation aiming at the reference object list, adding the selected reference object to the target position of the text content to edit the text content of the target data structure type. The scheme can improve the efficiency of editing the data structure.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for editing a data structure, an electronic device, and a storage medium.
Background
Currently, most web pages are written in hypertext Markup Language (HTML). HTML defines the way images, multimedia and text are displayed in a web page.
Because the data structures maintained by different web pages are different, the contents specifically embodied in web page display and editing are determined by services, and for some specific grammars, the grammars are only applicable to some specific scenes, for example, for a Markdown grammar, the Markdown grammar is used for creating a web page document, the Markdown employs a plain text format to compile a document, and then converts the document into an HTML document to be published, for a plain text page, the editing efficiency of the Markdown grammar is very high, but the Markdown grammar is difficult to meet the requirements of scenes including pictures, sounds, videos and the like, and at this time, the grammar needs to be reselected, so for text contents rich in text, the efficiency of editing the data structure is low at present.
Disclosure of Invention
The embodiment of the application provides a method and a device for editing a data structure, electronic equipment and a storage medium, and can improve the efficiency of editing the data structure.
The embodiment of the application provides a method for editing a data structure, which comprises the following steps:
displaying a data structure page, wherein the data structure page comprises a text editing area and a text format conversion area, the text format conversion area comprises an identification selection control corresponding to a prefix identification, and the text editing area is used for editing a data structure of a service;
responding to the operation aiming at the text editing area, and acquiring text content to be edited;
responding to the operation of selecting a control aiming at the target identification, and displaying a reference object list corresponding to the target prefix identification, wherein the reference object list comprises at least one reference object corresponding to the target file extension prefix, and each reference object corresponds to a preset data structure;
and in response to the object selection operation aiming at the reference object list, adding the selected reference object to the target position of the text content to edit the text content of the target data structure type.
Correspondingly, an embodiment of the present application further provides an editing apparatus for a data structure, including:
the first display module is used for displaying a data structure page, the data structure page comprises a text editing area and a text format conversion area, the text format conversion area comprises an identification selection control corresponding to a prefix identification, and the text editing area is used for editing a data structure of a service;
the acquisition module is used for responding to the operation aiming at the text editing area and acquiring the text content to be edited;
the second display module is used for responding to the operation of selecting a control aiming at the target identifier, and displaying a reference object list corresponding to the target prefix identifier, wherein the reference object list comprises at least one reference object corresponding to the target file extension prefix;
and the editing module is used for responding to the object selection operation aiming at the reference object list, adding the selected reference object to the target position of the text content so as to edit the text content of the target data structure type.
Optionally, in some embodiments of the present application, the second display module includes:
the acquisition unit is used for responding to the operation of selecting the control aiming at the target identifier and acquiring the configuration information corresponding to the target prefix identifier according to the pre-stored mapping relation;
and the display unit is used for displaying the reference object list corresponding to the configuration information.
Optionally, in some embodiments of the present application, the display unit includes:
the extracting subunit is used for extracting the reference object contained in the configuration information;
and the display subunit is used for displaying the reference object list corresponding to the configuration information based on the arrangement sequence and the association relationship between the extracted reference objects.
Optionally, in some embodiments of the present application, the display subunit is specifically configured to:
identifying an object reference relationship for each reference object;
determining a parent-level reference object and a child-level reference object in the extracted reference objects according to the identified object reference relationship;
and displaying a reference object list corresponding to the configuration information based on the extracted arrangement sequence and the object reference relationship among the reference objects, wherein the reference object list comprises a first-level menu corresponding to each parent-level reference object and submenus under each first-level menu.
Optionally, in some embodiments of the present application, the method further includes a building unit, where the building unit is specifically configured to:
collecting configuration information corresponding to a plurality of reference objects;
and constructing a mapping relation between each configuration information and the prefix identification.
Optionally, in some embodiments of the present application, the editing module includes:
a determination unit configured to determine the selected reference object as a target reference object in response to an object selection operation for the reference object list;
the analysis unit is used for analyzing the target reference object;
and the editing unit is used for editing the text content based on the analysis result so as to obtain the text content of the target data structure type.
Optionally, in some embodiments of the present application, the editing unit is specifically configured to:
editing the text content based on the analysis result to obtain edited text content;
and acquiring a preset suffix identifier, and adding the preset suffix identifier to the tail of the edited text content to obtain the text content of the target data structure type.
Optionally, in some embodiments of the present application, the obtaining module is specifically configured to:
acquiring text content corresponding to the initial data structure, and displaying the text content corresponding to the initial data structure in a text editing area;
and responding to the operation of the content displayed in the text editing area, and acquiring the text content to be edited.
Optionally, in some embodiments of the present application, the data structure page further includes a preview display control, and further includes a preview module, where the preview module is specifically configured to:
and previewing the text content of the target data structure type in response to the operation of the preview display control.
After a data structure page is displayed, the data structure page includes a text editing area and a text format conversion area, the text format conversion area includes an identifier selection control corresponding to a prefix identifier, the text editing area is used for editing a data structure of a service, a text content to be edited is acquired in response to an operation on the text editing area, a reference object list corresponding to a target prefix identifier is displayed in response to an operation on the target identifier selection control, the reference object list includes at least one reference object corresponding to a target file extension prefix, and the selected reference object is added to a target position of the text content in response to an object selection operation on the reference object list, so as to edit the text content of a target data structure type. Accordingly, efficiency of editing the data structure can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1a is a scene schematic diagram of an editing method of a data structure according to an embodiment of the present application
Fig. 1b is a schematic flowchart of a method for editing a data structure according to an embodiment of the present application;
FIG. 2a is another schematic flow chart of a method for editing a data structure according to an embodiment of the present application;
FIG. 2b is a schematic structural diagram of a data structure analysis system provided in an embodiment of the present application;
fig. 2c is a schematic diagram of a data structure page in the method for editing a data structure provided in the embodiment of the present application;
fig. 2d is another schematic diagram of a data structure page in the method for editing a data structure provided in the embodiment of the present application;
fig. 2e is another schematic diagram of a data structure page in the method for editing a data structure provided in the embodiment of the present application;
FIG. 3a is a schematic structural diagram of an editing apparatus for data structure provided in an embodiment of the present application;
FIG. 3b is a schematic structural diagram of an editing apparatus for data structure according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
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 of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a method and a device for editing a data structure.
The editing device of the data structure may be specifically integrated in a server or a terminal, the server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, middleware service, a domain name service, a security service, a CDN, a big data and artificial intelligence platform, and the like. The terminal may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
Taking as an example that the editing apparatus of the data structure is integrated in a terminal, please refer to fig. 1a, when the data structure needs to be edited, after the terminal receives the editing request of the data structure, the editing request of the data structure can be triggered by a user, a data structure page is displayed, the data structure page includes a text editing region and a text format conversion region, the text format conversion region includes an identifier selection control corresponding to a prefix identifier, the text editing region is used for editing the data structure of a service, wherein the number of the identifier selection controls is at least one, as specifically described below by taking a plurality of examples as examples, the terminal responds to the operation of the user on the text editing region to obtain the text content to be edited, for example, the user inputs the text content to be edited in the text editing region, and then when the terminal detects the selection operation on the plurality of identifier selection controls, and determining the selected identification selection control as a target identification selection control, displaying and displaying a reference object list corresponding to the target prefix identification, wherein the reference object list comprises at least one reference object corresponding to the target file extension prefix, each reference object corresponds to a preset data structure, and responding to the object selection operation aiming at the reference object list by the terminal, adding the selected reference object to the target position of the text content, so as to edit the text content of the target data structure type.
According to the editing method of the data structure, the mapping relation between the reference object and the data structure is established in advance, and when the text content needs to be edited, the text content of the target data structure type is edited according to the visual identification selection control, so that the efficiency of editing the data structure can be improved, and the flexibility is high.
The following are detailed below. It should be noted that the description sequence of the following embodiments is not intended to limit the priority sequence of the embodiments.
A method of editing a data structure, comprising: and displaying a data structure page, responding to the operation aiming at the text editing area, acquiring text content to be edited, responding to the operation aiming at the target identification selection control, displaying a reference object list corresponding to the target prefix identification, responding to the object selection operation aiming at the reference object list, and adding the selected reference object to the target position of the text content so as to edit the text content of the target data structure type.
Referring to fig. 1b, fig. 1b is a schematic flowchart illustrating an editing method for a data structure according to an embodiment of the present disclosure. The specific flow of the editing method of the data structure may be as follows:
101. a data structure page is displayed.
For example, a data structure page of a client may be specifically displayed, where the client may be a parser, such as a Markdown parser or an Angular parser, the data structure page may include a text editing region and a text format conversion region, the text format conversion region includes an identifier selection control corresponding to a prefix identifier, the text editing region is used to edit a data structure of a service, the text editing region may be located in a top region, a bottom region, a middle region, or any position of the data structure page, and similarly, the text format conversion region may also be located in the top region, the bottom region, the middle region, or any position of the data structure page, and is specifically set according to an actual situation.
It should be noted that each identifier selection control corresponds to a prefix identifier, the style of the identifier selection control is a symbol corresponding to the prefix identifier, such as "@", "#", and "-", and is specifically set according to an actual situation, and a user can determine the prefix identifier corresponding to the selected identifier selection control according to the style of the identifier selection control.
102. And responding to the operation aiming at the text editing area, and acquiring the text content to be edited.
The text content to be edited may be locally stored, for example, a piece of text content locally stored; the text content to be edited may also be obtained through network pulling, for example, a piece of code obtained through network pulling, that is, optionally, in some embodiments, the step "obtaining the text content to be edited in response to an operation on the text editing region" specifically may include:
(11) acquiring text content corresponding to the initial data structure, and displaying the text content corresponding to the initial data structure in a text editing area;
(12) and acquiring the text content to be edited in response to the operation on the content displayed in the text editing area.
For example, a user copies a piece of text content (i.e., text content corresponding to the initial data structure) in a web page through a network, pastes the copied text content into a text editing area, and then adds text elements to be added, such as characters or punctuations, to the copied text content to display the text content to be edited in the text editing area.
103. And responding to the operation of selecting the control aiming at the target identifier, and displaying a reference object list corresponding to the target prefix identifier.
The reference object list comprises at least one reference object corresponding to the target file extension prefix, the representation form of the reference object is the same as that of the text content to be edited, each prefix identifier corresponds to a preset data structure, it can be understood that when an operation for the target identifier selection control is detected, the reference object list corresponding to the target data structure (that is, the preset data structure corresponding to the target identifier selection control) is displayed, and all objects which can be referred under the data structure are covered in the reference object list.
The preset data structure may be an array, an object, a character string, a number, or a boolean value, and is specifically set according to the service type, and further, in some embodiments, after the text content to be edited is obtained, a corresponding identifier selection control may be displayed according to the text content to be edited, for example, if the text content to be edited only supports two data structures, namely, a number and a boolean value, then the identifier selection control corresponding to the two data structures, namely, the number and the boolean value, is displayed; or only the identification selection control corresponding to the two data structures of the number and the Boolean value is displayed in a highlighted color, and the corresponding control state is adjusted to be a selectable state, wherein the selectable state indicates that the identification selection control can be used by the text content to be marked.
For example, if the function corresponding to the prefix identifier of the target identifier selection control is an adjusted font style, then a list of reference objects corresponding to the adjusted font style is displayed, where the list of reference objects includes a reference object a, and the reference object a is "< span style ═ font-size:16px" > text "", and the reference object a indicates that the font size is adjusted to 12, and further, in response to the operation on the target identifier selection control, a list of reference objects of configuration information corresponding to the target prefix identifier is displayed, that is, optionally, in some embodiments, the step "displaying the list of reference objects corresponding to the target prefix identifier in response to the operation on the target identifier selection control" may specifically include:
(21) responding to the operation of selecting a control for the target identifier, and acquiring configuration information corresponding to the target prefix identifier according to a pre-stored mapping relation;
(22) and displaying a reference object list corresponding to the configuration information.
In some embodiments, the configuration information may include a reference object set corresponding to the prefix identifier and an arrangement order between reference objects in the reference object set, and when actually displaying, a reference object list corresponding to the target prefix identifier is displayed according to the arrangement order and the association relationship between the reference objects in the reference object set and the reference object set, that is, optionally, in some embodiments, the step "displaying the reference object list corresponding to the configuration information" may specifically include:
(31) extracting a reference object contained in the configuration information;
(32) and displaying a reference object list corresponding to the configuration information based on the extracted arrangement sequence and incidence relation between the reference objects.
For example, the configuration information includes sequentially arranged reference objects a, b, and c, and the sequentially arranged reference objects a, b, and c are displayed in the data structure page based on the arrangement order and the association relationship between the reference objects, and further, the reference objects in the displayed reference object list are description information of reference data, such as functions performed by the reference objects, so that the user can know the description information; if the reference object in the displayed reference object list is the description information of the reference data, when the information acquisition operation triggered by the description information is detected, for example, when the mouse is moved to the reference object, the specific content of the reference data is displayed in a thumbnail mode, which can be specifically set according to the practice and is not described herein again.
Further, the association relationship between the reference object and the reference object may specifically be the reference relationship between the reference objects, for example, reference object a is a parent-level reference object of reference object to reference object b, then, when displaying, a corresponding reference object list may be displayed, for example, the reference object list is displayed in a form of a two-level menu, that is, optionally, the step "displaying the reference object list corresponding to the configuration information based on the extracted arrangement order and association relationship between the reference objects" may specifically include:
(41) identifying an object reference relationship for each reference object;
(42) determining a parent-level reference object and a child-level reference object in the extracted reference objects according to the identified object reference relationship;
(43) and displaying a reference object list corresponding to the configuration information based on the extracted arrangement sequence and the object reference relation between the reference objects.
In the present application, a parent-level referencing object refers to that the referencing object does not reference other referencing objects, that is, serves as a first-level menu of a multi-level menu, it can be understood that a child-level referencing object refers to that the referencing object references other referencing objects, for example, referencing object q references referencing object w, referencing object w references referencing object e, referencing object e references referencing object r, and referencing object r does not reference other referencing objects, that is, referencing object q, referencing object w, and referencing object e are all child-level referencing objects, and referencing object r is a parent-level referencing object.
In addition, the mapping relationship between the configuration information and the prefix identifier may be previously constructed by operation and maintenance personnel, and specifically, the configuration information corresponding to a plurality of reference objects may be collected, and then, the mapping relationship between each configuration information and the prefix identifier may be constructed.
104. And in response to the object selection operation aiming at the reference object list, adding the selected reference object to the target position of the text content to edit the text content of the target data structure type.
For example, specifically, the reference object list includes a plurality of reference objects, and when an object selection operation for the reference object list is detected, the selected reference object is determined as a target reference object, and then the target application object is parsed to obtain the text content of the target data structure type, that is, optionally, in some embodiments, the step "in response to the object selection operation for the reference object list, add the selected reference object to a target position of the text content to edit the text content of the target data structure type" may specifically include:
(41) in response to an object selection operation for the reference object list, determining the selected reference object as a target reference object;
(42) analyzing the target reference object;
(43) and editing the text content based on the analysis result to obtain the text content of the target data structure type.
For example, specifically, the Markdown parser may be used to parse the target referencing object to obtain target referencing data corresponding to the target referencing object, and then add the target referencing data to the target position of the text content to complete editing of the text content, that is, to obtain the text content of the target data structure type.
It should be noted that, in the present application, the visual identification selection control assists the user to select different types of data structures, the range explicitly referenced is identified by a suffix, and after target reference data is added to a target position of text content, the suffix is automatically supplemented to complete editing of the text content, that is, optionally, in some embodiments, the step "editing the text content based on a parsing result to obtain the text content of the target data structure type" may specifically include:
(51) editing the text content based on the analysis result to obtain edited text content;
(52) and acquiring a preset suffix identifier, and adding the preset suffix identifier to the tail of the edited text content to obtain the text content of the target data structure type.
The suffix identifier may be preset, and the corresponding style may be set according to the actual situation, for example, the style corresponding to the suffix identifier is "+", for example, specifically, the input text content to be edited is "www.qq.com", the target reference object is a definition hyperlink, the data of the target reference object is "a", the hyperlink is used to link from one page to another page, and the result obtained after editing "www.qq.com" is "www.qq.com".
In order to facilitate the user to observe the editing result, optionally, in some embodiments, the data structure page further includes a preview display control, and after obtaining the text content of the target data structure type, the user may further trigger a preview display request for the preview display control, so as to preview the text content of the target data structure type, that is, in response to an operation on the preview display control, the text content of the target data structure type is previewed.
According to the method and the device for editing the text content, after a data structure page is displayed, the text content to be edited is obtained in response to the operation aiming at the text editing area, a reference object list corresponding to the target prefix identification is displayed in response to the operation aiming at the target identification selection control, and the selected reference object is added to the target position of the text content in response to the object selection operation aiming at the reference object list so as to edit the text content of the target data structure type. According to the editing method of the data structure, the mapping relation between the reference object and the data structure is established in advance, and when the text content needs to be edited, the text content of the target data structure type is edited according to the visual identification selection control, so that the efficiency of editing the data structure can be improved, and the flexibility is high.
The method according to the examples is further described in detail below by way of example.
In this embodiment, an example will be described in which the editing apparatus of the data structure is specifically integrated in a terminal.
Referring to fig. 2a, a specific process of the method for editing a data structure may be as follows:
201. the terminal displays a data structure page.
For example, a data structure page may be displayed in a client, which may be a parser, and may include a text editing region including an identifier selection control corresponding to a prefix identifier and a text format conversion region for editing a data structure of a service.
202. And the terminal responds to the operation aiming at the text editing area and acquires the text content to be edited.
For example, specifically, a user copies a text content (i.e., a text content corresponding to the initial data structure) in a web page through a network, and pastes the copied text content into the text editing area, the terminal obtains the text content to be edited in response to an operation of the user on the content displayed in the text editing area, for example, the user inputs a certain text in the text content corresponding to the initial data structure, and the terminal displays the text content to be marked in response to the input operation of the user.
203. And the terminal responds to the operation of selecting the control aiming at the target identifier and displays a reference object list corresponding to the target prefix identifier.
The reference object list includes at least one reference object corresponding to the target file extension prefix, the preset data structure may be an array, an object, a character string, a number, or a boolean value, and is specifically set according to the service type, for example, specifically, the terminal first displays a plurality of identifier selection controls, when detecting a control selection operation of a user for the identifier selection controls, the terminal determines the selected identifier selection controls as target identifier selection controls, and then, the terminal displays the reference object list corresponding to the configuration information corresponding to the target prefix identifier in response to a click operation of the user for the target identifier selection controls.
204. The terminal adds the selected reference object to a target position of the text content in response to an object selection operation for the reference object list to edit the text content of the target data structure type.
For example, specifically, the terminal determines the selected reference object as a target reference object, then parses the target application object to obtain text content of a target data structure type, and the terminal may specifically use a Markdown parser to parse the target reference object to obtain target reference data corresponding to the target reference object, and then add the target reference data to a target position of the text content to complete editing of the text content.
In order to further understand the editing scheme of the data structure of the present application, please refer to fig. 2B, which takes a scenario of data structure analysis as an example for specific description, the data structure analysis system includes a terminal 10, a parser 20, a database 30, and a data structure analysis engine 40, specifically, refer to fig. 2C, the terminal 10 displays a data structure page, the data structure page may include a text editing area 10A, a text format conversion area 10B, an editing state area 10C, and a view switching area 10D, the text editing area 10A is used for editing a data structure of a service, the text format conversion area 10B includes an identifier selection control corresponding to a prefix identifier, a style of the identifier selection control is a symbol corresponding to the prefix identifier, such as "@", "#", and "-", which are specifically set according to an actual situation, after a user triggers an editing event, when detecting an operation of selecting a control for a target identifier, the terminal 10 displays a list of reference objects corresponding to the target prefix identifier, please refer to fig. 2d, when detecting an operation of selecting a control "#" for the target identifier, the terminal 10 displays a list of reference objects corresponding to the target prefix identifier "#" in a data structure page, where the list of reference objects includes a first-level object menu and a sub-menu corresponding to each reference object in the first-level object menu, when detecting text content input by a user, the terminal 10 generates a normal text and a structured text, and displays the normal text on the data structure page, for example, whether the input text content is "AAA is equal to", whether the generated normal text is "AAA is equal to xxx. example 1", and simultaneously stores the structured text into the database 30, and when data structure analysis needs to be performed on the structured text, the data structure analysis engine 40 then pulls the structured text from the database 30 and analyzes it, and finally the data structure analysis engine 40 stores the analysis results in the database 30. In addition, referring to fig. 2e, when the terminal 10 detects a click operation triggered by the preview display control, the text content "AAA" of the preview display target data structure is equal to xxx.
It should be noted that the Structured text, also called Structured document programming language (ST language), is a programming language designed for Programmable Logic Controllers (PLC), and is one of the supporting languages in the related IEC 61131-3 standard [1 ]. The structured document programming language is a high-level language that supports block structured (block structured) and is based on Pascal, which is also similar in syntax. All IEC 61131-3 languages support IEC61131 Common Elements (IEC61131 Common Elements). The variables and function calls are specified by IEC61131 common elements, so that different languages in IEC 61131-3 can be used in the same program. The structural formula document programming language is similar to the PASCAL and C languages, so that the same programming technology as that of microcomputer and personal computer can be used to perform complex calculation which is difficult to be executed by ladder diagram, and complete the establishment of program. The conventional program and loop can be easily reused through the establishment of FB (function Block)
As can be seen from the above, after the terminal displays the data structure page, the terminal responds to the operation on the text editing area to acquire text content to be edited, responds to the operation on the target identifier selection control to display a reference object list corresponding to the target prefix identifier, and responds to the object selection operation on the reference object list to add the selected reference object to the target position of the text content to edit the text content of the target data structure type. The terminal provided by the application establishes the mapping relation between the reference object and the data structure in advance, and edits the text content of the target data structure type according to the visual identification selection control when the text content needs to be edited, so that the efficiency of editing the data structure can be improved, and the flexibility is high.
In order to better implement the method for editing the data structure according to the embodiment of the present application, an editing apparatus (editing apparatus for short) based on the data structure is further provided in the embodiment of the present application. The meaning of the noun is the same as that in the editing method of the data structure, and the specific implementation details can refer to the description in the method embodiment.
Referring to fig. 3a, fig. 3a is a schematic structural diagram of an editing apparatus for data structure provided in an embodiment of the present application, where the editing apparatus may include a first display module 301, an obtaining module 302, a second display module 303, and an editing module 304, which may specifically be as follows:
the first display module 301 is configured to display a data structure page.
For example, the first display module 301 may specifically display a data structure page of a client, where the client may be a parser, such as a Markdown parser or an Angular parser, the data structure page may include a text editing region and a text format conversion region, the text format conversion region includes an identifier selection control corresponding to a prefix identifier, the text editing region is used for editing a data structure of a service, the text editing region may be located in a top region, a bottom region, a middle region, or any position of the data structure page, and similarly, the text format conversion region may also be located in the top region, the bottom region, the middle region, or any position of the data structure page, and is specifically set according to an actual situation.
An obtaining module 302, configured to obtain text content to be edited in response to an operation on the text editing region.
The text content to be edited may be locally stored, for example, a piece of text content locally stored; or may be obtained through network pulling, for example, a piece of code obtained through network pulling, and optionally, in some embodiments, the obtaining module 302 may specifically be configured to: acquiring text content corresponding to the initial data structure, displaying the text content corresponding to the initial data structure in a text editing area, and responding to the operation aiming at the content displayed in the text editing area to acquire the text content to be edited.
And a second display module 303, configured to display, in response to an operation on the target identifier selection control, a list of reference objects corresponding to the target prefix identifier.
The reference object list includes at least one reference object corresponding to the target file extension prefix, and when detecting an operation on the target identifier selection control, the second display module 303 displays the reference object list corresponding to the target data structure (i.e., a preset data structure corresponding to the target identifier selection control), where the reference object list covers all objects that can be referred to under the data structure.
Optionally, in some embodiments, the second display module 303 may specifically include:
the acquisition unit is used for responding to the operation of selecting the control aiming at the target identifier and acquiring the configuration information corresponding to the target prefix identifier according to the pre-stored mapping relation;
and the display unit is used for displaying the reference object list corresponding to the configuration information.
Optionally, in some embodiments, the display unit may specifically include:
the extraction subunit is used for extracting the reference object contained in the configuration information;
and the display subunit is used for displaying the reference object list corresponding to the configuration information based on the arrangement sequence and the association relationship between the extracted reference objects.
Optionally, in some embodiments, the editing apparatus may further include a construction unit, and the construction unit may be specifically configured to: and acquiring configuration information corresponding to the plurality of reference objects, and constructing a mapping relation between each configuration information and the prefix identification.
And the editing module 304 is used for responding to an object selection operation aiming at the reference object list, adding the selected reference object to the target position of the text content so as to edit the text content of the target data structure type.
For example, specifically, the reference object list includes a plurality of reference objects, and when detecting an object selection operation for the reference object list, the editing module 304 determines the selected reference object as a target reference object, and then parses the target application object to obtain the text content of the target data structure type, that is, optionally, in some embodiments, the editing module 304 may specifically include:
a determination unit configured to determine the selected reference object as a target reference object in response to an object selection operation for the reference object list;
the analysis unit is used for analyzing the target reference object;
and the editing unit is used for editing the text content based on the analysis result so as to obtain the text content of the target data structure type.
Optionally, in some embodiments, the editing unit may be specifically configured to: editing the text content based on the analysis result to obtain the edited text content, acquiring a preset suffix identifier, and adding the preset suffix identifier to the tail of the edited text content to obtain the text content of the target data structure type.
Optionally, in some embodiments, the data structure page further includes a preview display control, and the editing apparatus may further include a preview module 305, as shown in fig. 3b, where the preview module 305 may be specifically configured to: and previewing the text content of the target data structure type in response to the operation of the preview display control.
After the first display module 301 displays the data structure page, the obtaining module 302 obtains text content to be edited in response to an operation on a text editing area, the second display module 302 displays a list of referencing objects corresponding to target prefix identifiers in response to an operation on a target identifier selection control, and the editing module 304 adds the selected referencing objects to target positions of the text content in response to an object selection operation on the list of referencing objects to edit the text content of the target data structure type. According to the editing device for the data structure, the mapping relation between the reference object and the data structure is established in advance, and when the text content needs to be edited, the text content of the target data structure type is edited according to the visual identification selection control, so that the efficiency of editing the data structure can be improved, and the flexibility is high.
In addition, the present application also provides an electronic device, as shown in fig. 4, which shows a schematic structural diagram of the electronic device related to the present application, specifically:
the electronic device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 4 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the whole electronic device by various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 through a power management system, so that functions of managing charging, discharging, and power consumption are realized through the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may further include an input unit 404, and the input unit 404 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application program stored in the memory 402, thereby implementing various functions as follows:
and displaying a data structure page, responding to the operation aiming at the text editing area, acquiring text content to be edited, responding to the operation aiming at the target identification selection control, displaying a reference object list corresponding to the target prefix identification, responding to the object selection operation aiming at the reference object list, and adding the selected reference object to the target position of the text content so as to edit the text content of the target data structure type.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
According to the method and the device for editing the text content, after a data structure page is displayed, the text content to be edited is obtained in response to the operation aiming at the text editing area, a reference object list corresponding to the target prefix identification is displayed in response to the operation aiming at the target identification selection control, and the selected reference object is added to the target position of the text content in response to the object selection operation aiming at the reference object list so as to edit the text content of the target data structure type. According to the editing method of the data structure, the mapping relation between the reference object and the data structure is established in advance, and when the text content needs to be edited, the text content of the target data structure type is edited according to the visual identification selection control, so that the efficiency of editing the data structure can be improved, and the flexibility is high.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present application provides a storage medium having stored therein a plurality of instructions that can be loaded by a processor to perform the steps of any of the methods for editing a data structure provided herein. For example, the instructions may perform the steps of:
and displaying a data structure page, responding to the operation aiming at the text editing area, acquiring text content to be edited, responding to the operation aiming at the target identification selection control, displaying a reference object list corresponding to the target prefix identification, responding to the object selection operation aiming at the reference object list, and adding the selected reference object to the target position of the text content so as to edit the text content of the target data structure type.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any data structure editing method provided by the present application, beneficial effects that can be achieved by any data structure editing method provided by the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations described above.
The method, the apparatus, the electronic device, and the storage medium for editing a data structure provided by the present application are described in detail above, and a specific example is applied in the present application to illustrate the principles and embodiments of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (12)
1. A method for editing a data structure, comprising:
displaying a data structure page, wherein the data structure page comprises a text editing area and a text format conversion area, the text format conversion area comprises an identification selection control corresponding to a prefix identification, and the text editing area is used for editing a data structure of a service;
responding to the operation aiming at the text editing area, and acquiring text content to be edited;
in response to the operation of selecting a control aiming at the target identifier, displaying a reference object list corresponding to the target prefix identifier, wherein the reference object list comprises at least one reference object corresponding to the target file extension prefix;
and in response to the object selection operation aiming at the reference object list, adding the selected reference object to the target position of the text content to edit the text content of the target data structure type.
2. The method of claim 1, wherein displaying a list of reference objects corresponding to the target prefix tag in response to the operation of selecting the control for the target tag comprises:
responding to the operation of selecting a control for the target identifier, and acquiring configuration information corresponding to the target prefix identifier according to a pre-stored mapping relation;
and displaying a reference object list corresponding to the configuration information.
3. The method according to claim 2, wherein the displaying the list of reference objects corresponding to the configuration information comprises:
extracting a reference object contained in the configuration information;
and displaying a reference object list corresponding to the configuration information based on the extracted arrangement sequence and incidence relation between the reference objects.
4. The method according to claim 3, wherein the displaying a list of reference objects corresponding to the configuration information based on the extracted reference objects in an arrangement order and an association relationship comprises:
identifying an object reference relationship for each reference object;
determining a parent-level reference object and a child-level reference object in the extracted reference objects according to the identified object reference relationship;
and displaying a reference object list corresponding to the configuration information based on the extracted arrangement sequence and the object reference relationship among the reference objects, wherein the reference object list comprises a first-level menu corresponding to each parent-level reference object and submenus under each first-level menu.
5. The method of claim 2, further comprising:
collecting configuration information corresponding to a plurality of reference objects;
and constructing a mapping relation between each configuration information and the prefix identification.
6. The method according to any one of claims 1 to 5, wherein the adding the selected reference object to the target position of the text content in response to the object selection operation for the reference object list to edit the text content of the target data structure type comprises:
in response to an object selection operation for the list of reference objects, determining the selected reference object as a target reference object;
analyzing the target reference object;
and editing the text content based on the analysis result to obtain the text content of the target data structure type.
7. The method according to claim 6, wherein editing the text content based on the parsing result to obtain the text content of the target data structure type comprises:
editing the text content based on the analysis result to obtain edited text content;
and acquiring a preset suffix identifier, and adding the preset suffix identifier to the tail of the edited text content to obtain the text content of the target data structure type.
8. The method according to any one of claims 1 to 5, wherein the obtaining the text content to be edited in response to the operation on the text editing area comprises:
acquiring text content corresponding to the initial data structure, and displaying the text content corresponding to the initial data structure in a text editing area;
and responding to the operation of the content displayed in the text editing area, and acquiring the text content to be edited.
9. The method of any of claims 1 to 5, wherein the data structure page further comprises a preview display control, and wherein the method further comprises, after the step of adding the selected reference object to the target position of the text content to edit the text content of the target data structure type in response to the object selection operation for the reference object list, the step of:
and previewing the text content of the target data structure type in response to the operation of the preview display control.
10. An apparatus for editing a data structure, comprising:
the first display module is used for displaying a data structure page, the data structure page comprises a text editing area and a text format conversion area, the text format conversion area comprises an identification selection control corresponding to a prefix identification, and the text editing area is used for editing a data structure of a service;
the acquisition module is used for responding to the operation aiming at the text editing area and acquiring the text content to be edited;
the second display module is used for responding to the operation of selecting a control aiming at the target identifier, and displaying a reference object list corresponding to the target prefix identifier, wherein the reference object list comprises at least one reference object corresponding to the target file extension prefix;
and the editing module is used for responding to the object selection operation aiming at the reference object list, adding the selected reference object to the target position of the text content so as to edit the text content of the target data structure type.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method of editing a data structure according to any one of claims 1-9 are implemented when the program is executed by the processor.
12. A computer-readable storage medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, carries out the steps of the method of editing a data structure according to any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011139968.4A CN114385946A (en) | 2020-10-22 | 2020-10-22 | Data structure editing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011139968.4A CN114385946A (en) | 2020-10-22 | 2020-10-22 | Data structure editing method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114385946A true CN114385946A (en) | 2022-04-22 |
Family
ID=81194830
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011139968.4A Pending CN114385946A (en) | 2020-10-22 | 2020-10-22 | Data structure editing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114385946A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114863907A (en) * | 2022-07-07 | 2022-08-05 | 北京中电慧声科技有限公司 | Marking method and device for text-to-speech processing |
-
2020
- 2020-10-22 CN CN202011139968.4A patent/CN114385946A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114863907A (en) * | 2022-07-07 | 2022-08-05 | 北京中电慧声科技有限公司 | Marking method and device for text-to-speech processing |
CN114863907B (en) * | 2022-07-07 | 2022-10-28 | 北京中电慧声科技有限公司 | Marking method and device for text-to-speech processing |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10824691B2 (en) | Page rendering method, device, and data storage medium | |
CN111045655A (en) | Page rendering method and device, rendering server and storage medium | |
CN104484171A (en) | System, method and associated equipment for designing terminal interface | |
CN109254771B (en) | Monitoring page generation method and device | |
WO2009011837A1 (en) | Extraction and reapplication of design information to existing websites | |
CN110609965B (en) | Page display method, device and storage medium | |
US20090037801A1 (en) | Method and apparatus for automatic user manual generation | |
CN114218052B (en) | Service interaction diagram generation method, device, equipment and storage medium | |
CN115379136B (en) | Special effect prop processing method and device, electronic equipment and storage medium | |
CN113158619A (en) | Document processing method and device, computer readable storage medium and computer equipment | |
CN113535541A (en) | Test method, test device, storage medium and computer equipment | |
CN115576974B (en) | Data processing method, device, equipment and medium | |
CN112001153A (en) | Text processing method and device, computer equipment and storage medium | |
US20040103374A1 (en) | Function extension type browser, browser component, program and recording medium | |
CN114385946A (en) | Data structure editing method and device, electronic equipment and storage medium | |
CN112632917B (en) | Online document processing method and device, electronic equipment and storage medium | |
CN113268232B (en) | Page skin generation method and device and computer readable storage medium | |
CN112988255B (en) | Data processing method, device and computer readable storage medium | |
US8452814B1 (en) | Gathering context in action to support in-context localization | |
CN111782212A (en) | View assembly creating method and device and storage medium | |
CN113867726A (en) | Method and device for expanding page rich text editor, storage medium and electronic equipment | |
CN113934959A (en) | Program preview method and device, computer equipment and storage medium | |
CN113918194A (en) | Page component display method and device, electronic equipment and storage medium | |
CN109032907B (en) | Data monitoring method and system for equipment application | |
CN113709575A (en) | Video editing 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 |