CN109358848B - User-defined instruction editing method and device and computer equipment - Google Patents

User-defined instruction editing method and device and computer equipment Download PDF

Info

Publication number
CN109358848B
CN109358848B CN201811209498.7A CN201811209498A CN109358848B CN 109358848 B CN109358848 B CN 109358848B CN 201811209498 A CN201811209498 A CN 201811209498A CN 109358848 B CN109358848 B CN 109358848B
Authority
CN
China
Prior art keywords
instruction
editing
file
user
custom
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
CN201811209498.7A
Other languages
Chinese (zh)
Other versions
CN109358848A (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201811209498.7A priority Critical patent/CN109358848B/en
Publication of CN109358848A publication Critical patent/CN109358848A/en
Application granted granted Critical
Publication of CN109358848B publication Critical patent/CN109358848B/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

Abstract

The invention provides a custom instruction editing method, a custom instruction editing device and computer equipment, wherein the custom instruction editing method comprises the following steps: loading a user-defined instruction edited in real time; establishing a mapping relation between a pre-established element and a custom instruction, determining the custom instruction establishing the mapping relation with the pre-established element as an instruction to be used, and setting an attribute option of the instruction to be used according to a pre-established grammar rule; according to a preset element splicing combination scheme, quoting an instruction to be used in an editing area to generate an editing file; according to the attribute options corresponding to the instructions to be used in the editing file, performing attribute selection and/or assignment on the instructions to be used in the editing file to generate a final editing file; and outputting the final editing file according to the preset output mode and the preset output position. The user-defined instruction editing method can simplify the operation of multiplexing elements, thereby reducing the repeated editing work.

Description

User-defined instruction editing method and device and computer equipment
Technical Field
The invention relates to the technical field of editing, in particular to a custom instruction editing method, a custom instruction editing device, computer equipment and a computer storage medium.
Background
With the continuous development of the internet technology, the software requirement is increasingly improved, and the efficiency and quality requirements for software development are also continuously improved.
A large amount of code repeatability problems are often faced in the development process of software, and similar multiplexing problems are faced when documents are edited. In the prior art, code generation tools or document generation tools are generally used to face such multiplexing problems, but these tools have obvious disadvantages:
1. the self-definition is poor, the modification of the tool requires that a user firstly know the background programming logic of the tool, the modification difficulty is high, and the modification content is limited;
2. the reusability is poor, most of templates and background logics of the tools are fixed, splicing and combining operations are difficult to perform, and the functions are single.
Disclosure of Invention
In view of the above problems, the present invention provides a method, an apparatus, a computer device, and a computer storage medium for editing a custom instruction, so as to simplify operations when elements are multiplexed, thereby reducing repetitive editing work.
In order to achieve the purpose, the invention adopts the following technical scheme:
a custom instruction editing method is used for editing documents and codes and comprises the following steps:
loading a user-defined instruction edited in real time;
establishing a mapping relation between a pre-established element and the user-defined instruction, determining the user-defined instruction establishing the mapping relation with the pre-established element as an instruction to be used, and setting an attribute option of the instruction to be used according to a pre-established grammar rule;
according to a preset element splicing combination scheme, the instruction to be used is quoted in an editing area to generate an editing file;
according to the attribute options corresponding to the instructions to be used in the editing file, performing attribute selection and/or assignment on the instructions to be used in the editing file to generate a final editing file;
and outputting the final editing file according to a preset output mode and a preset output position.
Preferably, the element includes at least one of a code segment, a text field, an input box, and an option box.
Preferably, the method for editing a custom instruction further includes:
storing the mapping relation between the pre-established elements and the user-defined instruction, and generating element multiplexing links according to the user-defined instruction;
and determining the hierarchy of the elements according to a preset element splicing and combining scheme, wherein the custom instruction of the elements of the same hierarchy is unique, and the custom instruction is determined to be globally unique through the hierarchy of the corresponding elements.
Preferably, the method for editing a custom instruction further includes:
and when the file is edited again, the user-defined instruction which establishes the mapping relation with the pre-established elements is quoted in the editing area, or the element multiplexing link is triggered in the editing area to generate the editing file.
Preferably, the "performing attribute selection and/or assignment on the instruction to be used in the edit file according to the attribute option corresponding to the instruction to be used in the edit file, and generating a final edit file" includes:
converting the attribute option corresponding to the instruction self-defining instruction to be used in the editing file into option voice through a voice interface, and outputting the option voice to a user;
and receiving voice information input by a user, and performing attribute selection and/or assignment on the instruction to be used in the edited file according to the voice information to generate a final edited file.
Preferably, the "outputting the final editing file according to a preset output mode and a preset output position" includes:
outputting the final editing file according to a preset file format and a preset storage path; or
Splicing the final editing file into a pre-established file, and replacing a replacement mark preset in the pre-established file; or
And converting the final editing file into a voice file by using a TTS interface and outputting the voice file to a preset storage path.
The invention also provides a custom instruction editing device, which is used for editing documents and codes, and the device comprises:
the instruction loading module is used for loading the custom instruction edited in real time;
the element mapping module is used for establishing a mapping relation between a pre-established element and the user-defined instruction, determining the user-defined instruction establishing the mapping relation with the pre-established element as an instruction to be used, and setting an attribute option of the instruction to be used according to a pre-established grammar rule;
the editing file generation module is used for quoting the instruction to be used in the editing area according to a preset element splicing combination scheme to generate an editing file;
the attribute selection and assignment module is used for performing attribute selection and/or assignment on the instruction to be used in the editing file according to the attribute option corresponding to the instruction to be used in the editing file to generate a final editing file;
and the file output module is used for outputting the final editing file according to a preset output mode and a preset output position.
Preferably, the custom instruction editing apparatus further includes:
the element storage module is used for storing the mapping relation between the pre-established elements and the user-defined instruction and generating element multiplexing links according to the user-defined instruction;
and the hierarchy determining module is used for determining the hierarchy of the elements according to a preset element splicing and combining scheme, wherein the custom instruction of the elements of the same hierarchy is unique, and the custom instruction is determined to be globally unique through the hierarchy of the corresponding elements.
The invention also provides computer equipment, which comprises a memory and a processor, wherein the memory is used for storing the computer program, and the processor runs the computer program to enable the computer equipment to execute the self-defined instruction editing method.
The invention also provides a computer storage medium storing a computer program for use in the computer apparatus.
The invention provides a custom instruction editing method, which is used for editing documents and codes and comprises the following steps: loading a user-defined instruction edited in real time; establishing a mapping relation between a pre-established element and the user-defined instruction, determining the user-defined instruction establishing the mapping relation with the pre-established element as an instruction to be used, and setting an attribute option of the instruction to be used according to a pre-established grammar rule; according to a preset element splicing combination scheme, the instruction to be used is quoted in an editing area to generate an editing file; according to the attribute options corresponding to the instructions to be used in the editing file, performing attribute selection and/or assignment on the instructions to be used in the editing file to generate a final editing file; and outputting the final editing file according to a preset output mode and a preset output position. The user-defined instruction editing method can establish the user-defined mapping relation by using the elements and the instructions, thereby simplifying the operation of multiplexing the elements by using the instructions during editing and reducing the repeated editing work.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are required to be used in the embodiments will be briefly described below, and it should be understood that the following drawings only illustrate some embodiments of the present invention, and therefore should not be considered as limiting the scope of the present invention.
Fig. 1 is a flowchart of a custom instruction editing method provided in embodiment 1 of the present invention;
fig. 2 is a flowchart of a custom instruction editing method provided in embodiment 2 of the present invention;
fig. 3 is a flowchart of selecting an attribute option in a custom instruction editing method according to embodiment 3 of the present invention;
fig. 4 is a schematic structural diagram of a custom instruction editing apparatus according to embodiment 4 of the present invention;
fig. 5 is a schematic structural diagram of another custom instruction editing apparatus provided in embodiment 4 of the present invention;
fig. 6 is a schematic structural diagram of a file output module of a custom instruction editing apparatus according to embodiment 4 of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
Fig. 1 is a flowchart of a custom instruction editing method provided in embodiment 1 of the present invention, where the method is used for editing a document and a code, and includes the following steps:
step S11: and loading the custom instruction edited in real time.
In the embodiment of the invention, the user can edit the custom instruction in real time, and the user can input characters by using computer equipment so as to establish the custom instruction, wherein the computer equipment stores a computer program, and the method of the embodiment can be realized by running the computer program. Meanwhile, a prestored instruction can be loaded in a system of the computer equipment, wherein the self-defined instruction is a tag instruction written according to the grammar and the rules defined by the invention, and the system of the computer equipment can process according to the instruction to generate a corresponding function. Wherein, the grammar and the rule of the invention comprise:
1. the system instructions exist in a document form similar to the XML tag form.
2. The document of the tag structure is a tree structure that starts at the "root" and then extends to the "branches and leaves".
3. The document of the tag structure must contain the root instructions.
4. All tags must be closed.
5. The labels must be properly nested.
7. The system is case sensitive.
8. The label must be added with "bc" or "$ bc" to be recognized as a system instruction, "bc" as a system instruction keyword, and "$ bc" as a reference keyword of an external instruction.
9. English periods and English colons are used for representing the hierarchical relation of the instructions, the English periods and the instruction names after the keywords are represented as one instruction, the lower-level instructions of the instructions are referred, and the instruction names are separated by the English periods. The distinction between English sentence and English colon is that the instruction name after English sentence can be self-defined, and the attribute of reference system needs to use English colon ": to name a few.
10. Instruction references do not allow for special characters other than those specified by the system.
11. Self-closing and tags are used in the present system for instruction referencing and cannot modify properties at the time of referencing. Such as "< bc. name/>".
12. The full close and tag is used in the present system to instruct the assignment of the output content, such as "< bc. name > output content [ < bc. name >".
13. The attributes within the tag must be system-defined attributes, with custom attributes being invalid.
14. Tag attribute assignments must be quoted.
15. The method in the tag attribute assignment must be accompanied by english brackets.
16. In the case that the instruction sets output content, options and instruction references at the same time, the system priority is as follows: instruction references, options, output content.
17. In the same instruction, when the instruction is added, the instruction name cannot be repeated, and if the instruction is repeatedly regarded as the modification of the instruction. The instructions within the single text may be used as desired.
18. When the instruction content is used instead of the system tag, the tag name needs to be included by brackets in English, and the calling of multiple levels needs to be repeatedly used, such as "this [ tag name ]".
In the embodiment of the invention, the custom instruction can be set to be in a tree structure, namely the instruction can comprise multistage sub instructions such as a first-stage sub instruction and a second-stage sub instruction, so that when a system of computer equipment loads the custom instruction edited by a user, the custom instruction can be presented in a tree structure form according to a grammar rule, and the user can know the instructions and call the instructions conveniently. The custom instruction can be stored in a database of the computer device, and the user can load and call the instruction in the system through an algorithm or an application program.
Step S12: and establishing a mapping relation between the pre-established elements and the custom instruction, determining the custom instruction establishing the mapping relation with the pre-established elements as an instruction to be used, and setting attribute options of the instruction to be used according to a pre-established grammar rule.
In an embodiment of the present invention, the element includes at least one of a code segment, a text field, an input box, and an option box. When an element is a code segment, the element is a complete function embodied by the code segment, or is a component of a page, or is a logical action, for example, a list and a search bar in a page are provided, and the list and the search bar are elements of the page and are implemented by the code segment. When the element is a text segment, it may be a sentence, or a text segment, and the text segment may be continuous or missing, and the missing part may be a variable and is supplemented by the user. An element is a basic unit constituting a functional module, and has a hierarchical structure. For example, the user can use editing software in a system of computer equipment to edit a required element in advance, and then the mapping relation is established with at least one custom instruction, so that the purpose that the element can be called by using the instruction is achieved, and the difficulty of multiplexing the element is reduced. The process of establishing the mapping relationship between the elements and the instructions can be realized by using an algorithm or an application program, and after the mapping relationship is established, attribute options corresponding to the custom instructions are required to be set according to the grammar rules. After the mapping relation between the custom instruction and the elements is established, the custom instruction can be used for quoting the corresponding elements in the computer equipment, namely the custom instruction is converted into the functions.
Step S13: and according to a preset element splicing combination scheme, quoting an instruction to be used in an editing area to generate an editing file.
In the embodiment of the present invention, the element may also be specifically a variable element or a template element, where the template element is a part that does not need to be changed frequently when editing a document or a code, for example, a sentence in the document, "i call xiao ming", where "i call" is a template and "xiao ming" is a variable element, and accordingly, a code segment may be used to set the variable element as an input box, set a mapping relationship of corresponding instructions, and concatenate the two instructions to generate a custom template, which is "i call …", where "…" is an input box and a variable is input by a user. The variable element may also be an element such as a list box.
In the embodiment of the invention, the system in the computer equipment can also provide an editing area so that a user can input an instruction in the editing area to perform element splicing and combining operation to generate an editing file, the template can be established by the user in advance and stored in a database of the computer equipment, and can be called by using a custom instruction when the user needs to edit. The system of the computer equipment can also provide a display area, the effect of template editing can be displayed in the display area when the elements are spliced and combined by using the instruction, and a user can input variables in the template to view the final effect. The splicing combination of the elements can be splicing combination between code segments, splicing combination between text fields and text segments, or splicing combination between code segments and text segments.
Step S14: and according to the attribute options corresponding to the instructions to be used in the edited file, performing attribute selection and/or assignment on the instructions to be used in the edited file to generate a final edited file.
In the embodiment of the invention, the user can also select and assign the attributes by editing the attribute options corresponding to the custom instructions in the file. After the attribute selection and assignment operation of each instruction in the edited file are completed, the editing work of the whole file is completed, and a user can obtain a final edited file meeting the requirements. When the user uses the custom instruction to edit, after the user drags the instruction to the editing area, the editing program in the computer equipment prompts attribute options, so that the user can select the required custom instruction attribute options in the editing area or assign values to the custom attributes through the editing program. For example, in the above document example, the custom template "i am …", where "…" is an input box, that is, a variable element, and the user may assign a value to the input box by using the attribute option of the custom instruction as a name such as "xiao ming", or may set several different names in advance, such as "xiao ming" and "xiao just", as the attribute of the variable element corresponding to the custom instruction, and the variable element is selected by the user.
In the embodiment of the invention, the editing file can comprise a plurality of different custom instructions, so that a user can perform attribute selection and assignment operation for many times, and the attributes and assignments of the custom instructions in the editing file can be modified, so that the user can debug the optimal editing file into the final editing file.
Step S15: and outputting the final editing file according to the preset output mode and the preset output position.
In the embodiment of the present invention, the final editing file may be further output to a memory of a computer device for storage according to a preset output mode and an output position. For example, an output button may be provided in an editing program of the computer device, and the user may select an output mode and a location where the output file is stored by clicking the output button, and output the final edited file after determining.
In the embodiment of the present invention, the process of outputting the final editing file may include the following steps:
and outputting the final editing file according to a preset file format and a preset storage path.
In the embodiment of the invention, the user can directly specify the format of the final editing file and the storage path in the computer equipment in the system of the computer equipment and output the final editing file.
And splicing the final editing file into a pre-established file, and replacing a preset replacement mark in the pre-established file.
In the embodiment of the invention, a user can also splice the final edited file into the established file, wherein the file needs to be provided with the replacement mark in advance, and the content of the final edited file replaces the replacement mark and is spliced into the file in the splicing process. The replacement process may be implemented using an application program, for example, the application program may search for the location of a replacement mark in a pre-established file and then replace the contents of the final edited file. The replacement mark may be, for example, a special character, a special letter, or the like.
And converting the final editing file into a voice file by using a TTS interface and outputting the voice file to a preset storage path.
In the embodiment of the present invention, a TTS (Text to Speech) interface may be further provided in the computer device, and the final editing file is converted into a synthesized Speech file by a TTS application. For example, a final edited file, which is a text document, may be converted into a synthesized voice file and stored in a preset storage path of the computer device.
Therefore, by the user-defined instruction editing method, the element multiplexing operation can be simplified during document or code editing, the document editing efficiency can be improved, and meanwhile, a user-defined code generation tool system can be established based on the method, so that the software programming development is assisted, and the working efficiency is improved.
Example 2
Fig. 2 is a flowchart of a custom instruction editing method provided in embodiment 2 of the present invention, where the method is used to edit a document and a code, and includes the following steps:
step S21: and loading the custom instruction edited in real time.
This step is identical to step S11 described above, and will not be described herein again.
Step S22: and establishing a mapping relation between the pre-established elements and the custom instruction, determining the custom instruction establishing the mapping relation with the pre-established elements as an instruction to be used, and setting attribute options of the instruction to be used according to a pre-established grammar rule.
This step is identical to step S12 described above, and will not be described herein again.
Step S23: and according to a preset element splicing combination scheme, quoting an instruction to be used in an editing area to generate an editing file.
This step is identical to step S13 described above, and will not be described herein again.
Step S24: and according to the attribute options corresponding to the instructions to be used in the edited file, performing attribute selection and/or assignment on the instructions to be used in the edited file to generate a final edited file.
This step is identical to step S14 described above, and will not be described herein again.
Step S25: and outputting the final editing file according to the preset output mode and the preset output position.
This step is identical to step S15 described above, and will not be described herein again.
Step S26: and storing the mapping relation between the pre-established elements and the custom instruction, and generating element multiplexing links according to the custom instruction.
Step S27: and determining the hierarchy of the elements according to a preset element splicing and combining scheme, wherein the custom instruction of the elements of the same hierarchy is unique, and the custom instruction is determined to be globally unique through the hierarchy of the corresponding elements.
In the embodiment of the invention, the elements established in the computer equipment by the user and the mapping relation of the corresponding custom instruction can be stored in a pre-established element database. And the hierarchy of the element can be determined when the elements are spliced and combined through the instruction, and the elements at the same hierarchy cannot establish a mapping relation with the same instruction. If the same instruction of the same level element occurs when the user establishes the mapping relation, the system of the computer equipment can also send an error prompt and forbid the same level element from establishing the mapping relation with the same instruction so as to avoid the instruction from generating a confusion error when the elements are multiplexed.
In the embodiment of the invention, the custom instruction for establishing the mapping relation with the elements can also be converted into the functional link, namely the element multiplexing link, the element multiplexing link is also arranged in the editing area of the computer equipment, and a user can generate the corresponding custom instruction in the editing area by triggering the link, so that the custom instruction is functionalized. Wherein, the element multiplexing link can be set as various virtual keys of the editing area.
Step S28: when the file is edited again, the user-defined instruction which establishes the mapping relation with the pre-established elements is quoted in the editing area, or element multiplexing links are triggered in the editing area, and the editing file is generated.
In the embodiment of the invention, when the user edits the same file again or uses the same element, the user-defined instruction which establishes the mapping relation with the required element can be dragged to the corresponding position of the editing area in the system of the computer equipment for reference, or the user-defined instruction can be generated at the corresponding position for reference by triggering the link of element multiplexing in the editing area, so that the file to be edited can be generated.
The custom instruction editing method provided by the embodiment of the invention can assist the editing process of the custom instruction in a voice mode, so that the editing of the custom instruction is intelligent, and the editing efficiency is improved. And moreover, by storing the elements and the mapping relation, the editing and developing experience of a user can be effectively accumulated.
Example 3
Fig. 3 is a flowchart of selecting attribute options of a custom instruction editing method provided in embodiment 3 of the present invention, including the following steps:
step S31: and converting the attribute options corresponding to the instruction self-defining instruction to be used in the edited file into option voices through a voice interface, and outputting the option voices to the user.
In the embodiment of the invention, when the user selects the attribute option of the custom instruction, the computer equipment can convert the attribute option of the custom instruction into the option voice by using the voice interface and output the option voice to the user, so that the user can select the attribute option by the voice. The option voice may be a voice in a query mode, that is, the user is sequentially prompted to select the attribute option of the custom instruction through the sorted questions.
Step S32: and receiving voice information input by a user, and performing attribute selection and/or assignment according to an instruction to be used in the edited file according to the voice information to generate a final edited file.
In the embodiment of the invention, after the user obtains the option voice output by the computer equipment, the user can select or assign the attribute of the user-defined instruction according to the prompt of the option voice to generate the final editing file. The user can input voice information to the computer equipment, the voice is used for controlling the computer equipment to select and assign the attributes of the custom instruction, and the user can also directly select the attribute options in an operation interface of the computer equipment to select and assign the attributes of the custom instruction.
In the embodiment of the invention, when the user inputs the voice information to the computer equipment, the user-defined instruction can be searched and called by using the voice. For example, when the pre-established element and the mapping relation between the element and the custom instruction are stored, a keyword for searching can be set for the element, and a user can input the keyword to computer equipment through voice to search and call the corresponding custom instruction, so that the function of assisting editing by using voice is achieved.
In the embodiment of the invention, the voice interface is arranged in the computer equipment, so that a user can control the computer equipment by using voice and edit files by using a user-defined instruction. The method comprises the following steps that a user-defined instruction is controlled by voice to edit a document, wherein the method comprises the following two modes that voice is used as an auxiliary function during editing, elements stored in the user-defined instruction are searched by voice, and final file editing is finished through an operation interface of computer equipment; and moreover, the user is completely separated from manual operation by using the voice function to edit, the user-defined instruction is called by using voice, and the attribute of the user-defined instruction is selected and assigned through the prompt of a voice option, so that the final file editing is completed.
Example 4
Fig. 4 is a schematic structural diagram of a custom instruction editing apparatus according to embodiment 4 of the present invention.
The custom instruction editing apparatus 400 includes:
and the instruction loading module 410 is used for loading the custom instruction edited in real time.
The element mapping module 420 is configured to establish a mapping relationship between a pre-established element and the custom instruction, determine the custom instruction having established a mapping relationship with the pre-established element as an instruction to be used, and set an attribute option of the instruction to be used according to a pre-established syntax rule.
And the edit file generating module 430 is configured to reference the instruction to be used in the edit area according to a preset element splicing combination scheme, so as to generate an edit file.
And the attribute selecting and assigning module 440 is configured to select and/or assign an attribute for the instruction to be used in the edit file according to the attribute option corresponding to the instruction to be used in the edit file, so as to generate a final edit file.
The file output module 450 is configured to output the final edited file according to the preset output mode and the preset output position.
As shown in fig. 5, the custom instruction editing apparatus 400 further includes:
and the element storage module 460 is configured to store the mapping relationship between the pre-established elements and the custom instruction, and generate an element multiplexing link according to the custom instruction.
The hierarchy determining module 470 is configured to determine the hierarchy of the elements according to a predefined element splicing and combining scheme, where the custom instruction of the elements of the same hierarchy is unique, and the custom instruction is determined to be globally unique through the hierarchy of the corresponding element.
And the re-editing module 480 is configured to drag the custom instruction, which establishes the mapping relationship with the pre-established element, to a corresponding position of an editing area of the pre-established template to generate an editing file when the file is re-edited.
As shown in fig. 6, the file output module 450 includes:
a file output unit 451 for outputting a final edit file according to a preset file format and a preset storage path.
And the file splicing unit 452 is configured to splice the final edited file into the pre-established file, and replace a replacement flag preset in the pre-established file.
And a voice output unit 453 for converting the final edited file into a voice file using a TTS interface and outputting the voice file to a preset storage path.
In the embodiment of the present invention, when the computer device executes the functions of the modules and units, a functional interface for a user to operate may be generated in a system of the computer device, for example, after a controller of the computer device reads a custom instruction, the arrangement of the custom instruction is performed in the functional interface according to a tree structure, a natural logic, a page layout, or other logic, and after the controller determines an attribute in the custom instruction, a text input box or a route selection input box is generated and displayed in the functional interface.
In the embodiment of the present invention, for more detailed functional description of each module and each unit, reference may be made to contents of corresponding parts in the foregoing embodiment, which are not described herein again.
In addition, the invention also provides computer equipment which can comprise a smart phone, a tablet computer, a vehicle-mounted computer, intelligent wearable equipment and the like. The computer device comprises a memory and a processor, wherein the memory can be used for storing a computer program, and the processor can make the computer device execute the functions of each module in the method or the self-defined instruction editing device by operating the computer program.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for 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 (such as audio data, a phonebook, etc.) created according to the use of the computer device, and the like. Further, the memory 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.
The embodiment also provides a computer storage medium for storing a computer program used in the computer device.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or a part of the technical solution that contributes to the prior art in essence can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A custom instruction editing method is used for editing documents and codes, and is characterized by comprising the following steps:
loading a user-defined instruction edited in real time;
establishing a mapping relation between a pre-established element and the user-defined instruction, determining the user-defined instruction establishing the mapping relation with the pre-established element as an instruction to be used, and setting an attribute option of the instruction to be used according to a pre-established grammar rule;
according to a preset element splicing combination scheme, the instruction to be used is quoted in an editing area to generate an editing file;
according to the attribute options corresponding to the instructions to be used in the editing file, performing attribute selection and/or assignment on the instructions to be used in the editing file to generate a final editing file;
and outputting the final editing file according to a preset output mode and a preset output position.
2. The custom instruction editing method of claim 1, wherein the elements comprise at least one of a code segment, a text field, an input box, and an option box.
3. The custom instruction editing method according to claim 1, further comprising:
storing the mapping relation between the pre-established elements and the user-defined instruction, and generating element multiplexing links according to the user-defined instruction;
and determining the hierarchy of the elements according to a preset element splicing and combining scheme, wherein the custom instruction of the elements of the same hierarchy is unique, and the custom instruction is determined to be globally unique through the hierarchy of the corresponding elements.
4. The custom instruction editing method according to claim 3, further comprising:
and when the file is edited again, the user-defined instruction which establishes the mapping relation with the pre-established elements is quoted in the editing area, or the element multiplexing link is triggered in the editing area to generate the editing file.
5. The method for editing the custom instruction according to claim 1, wherein the step of performing attribute selection and/or assignment on the instruction to be used in the edit file according to an attribute option corresponding to the instruction to be used in the edit file to generate a final edit file comprises:
converting the attribute options corresponding to the instructions to be used in the editing file into option voices through a voice interface, and outputting the option voices to a user;
and receiving voice information input by a user, and performing attribute selection and/or assignment on the instruction to be used in the edited file according to the voice information to generate a final edited file.
6. The method for editing custom instructions according to claim 1, wherein the outputting the final editing file according to a preset output mode and a preset output position comprises:
outputting the final editing file according to a preset file format and a preset storage path; or
Splicing the final editing file into a pre-established file, and replacing a replacement mark preset in the pre-established file; or
And converting the final editing file into a voice file by using a TTS interface and outputting the voice file to a preset storage path.
7. An apparatus for editing a document and a code, the apparatus comprising:
the instruction loading module is used for loading the custom instruction edited in real time;
the element mapping module is used for establishing a mapping relation between a pre-established element and the user-defined instruction, determining the user-defined instruction establishing the mapping relation with the pre-established element as an instruction to be used, and setting an attribute option of the instruction to be used according to a pre-established grammar rule;
the editing file generation module is used for quoting the instruction to be used in the editing area according to a preset element splicing combination scheme to generate an editing file;
the attribute selection and assignment module is used for performing attribute selection and/or assignment on the instruction to be used in the editing file according to the attribute option corresponding to the instruction to be used in the editing file to generate a final editing file;
and the file output module is used for outputting the final editing file according to a preset output mode and a preset output position.
8. The custom instruction editing apparatus according to claim 7, further comprising:
the element storage module is used for storing the mapping relation between the pre-established elements and the user-defined instruction and generating element multiplexing links according to the user-defined instruction;
and the hierarchy determining module is used for determining the hierarchy of the elements according to a preset element splicing and combining scheme, wherein the custom instruction of the elements of the same hierarchy is unique, and the custom instruction is determined to be globally unique through the hierarchy of the corresponding elements.
9. A computer device comprising a memory for storing a computer program and a processor for executing the computer program to cause the computer device to perform the custom instruction editing method of any of claims 1-6.
10. A computer storage medium characterized in that it stores a computer program for use in the computer device of claim 9.
CN201811209498.7A 2018-10-17 2018-10-17 User-defined instruction editing method and device and computer equipment Active CN109358848B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811209498.7A CN109358848B (en) 2018-10-17 2018-10-17 User-defined instruction editing method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811209498.7A CN109358848B (en) 2018-10-17 2018-10-17 User-defined instruction editing method and device and computer equipment

Publications (2)

Publication Number Publication Date
CN109358848A CN109358848A (en) 2019-02-19
CN109358848B true CN109358848B (en) 2022-02-15

Family

ID=65349548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811209498.7A Active CN109358848B (en) 2018-10-17 2018-10-17 User-defined instruction editing method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN109358848B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110196714A (en) * 2019-06-04 2019-09-03 上海合桀软件技术有限公司 A kind of conversion restoring method of original directive, storage equipment and terminal
CN110262791B (en) * 2019-06-05 2023-10-10 北京蓝亚盒子科技有限公司 Visual programming method and device, operator and readable storage medium
CN110297838B (en) * 2019-07-04 2024-02-27 珠海金山数字网络科技有限公司 Terrain material editing method, device, computing equipment and storage medium
CN111026386A (en) * 2019-12-23 2020-04-17 杨宏伟 Jigsaw programmable instruction input method and system based on image recognition
CN111694574B (en) * 2020-06-12 2023-11-14 北京百度网讯科技有限公司 Method, device, equipment and storage medium for processing instruction codes
CN111813411A (en) * 2020-06-13 2020-10-23 立乐教育科技(上海)有限公司 Python script language-based instruction method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425485A (en) * 2013-05-18 2013-12-04 冯俊 Interface edition and operation system and method for ordinary users

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7337388B2 (en) * 2003-01-02 2008-02-26 Microsoft Corporation Tool-based iterative document management
US9213541B2 (en) * 2009-04-17 2015-12-15 ArtinSoft Corporation, S.A. Creation, generation, distribution and application of self-contained modifications to source code
CN102281416A (en) * 2010-06-11 2011-12-14 深圳Tcl新技术有限公司 On-screen display (OSD) editing system, editing method and television employing system
CN103577072A (en) * 2012-07-26 2014-02-12 中兴通讯股份有限公司 Terminal voice assistant editing method and device
CN104267947B (en) * 2014-09-23 2018-06-19 广州猎豹网络科技有限公司 A kind of editor's method of pop-up picture and pop-up picture editor's device
CN106469064A (en) * 2016-09-04 2017-03-01 深圳市云智易联科技有限公司 Code generating method and code generating unit
CN108614692A (en) * 2017-07-24 2018-10-02 深圳壹账通智能科技有限公司 Edit model method, apparatus, server and medium
CN107590046B (en) * 2017-09-05 2021-02-09 北京空间飞行器总体设计部 Remote sensing satellite load task instruction verification method and system
CN107665111A (en) * 2017-09-05 2018-02-06 北京空间飞行器总体设计部 A kind of remote sensing satellite load task parametric control method and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425485A (en) * 2013-05-18 2013-12-04 冯俊 Interface edition and operation system and method for ordinary users

Also Published As

Publication number Publication date
CN109358848A (en) 2019-02-19

Similar Documents

Publication Publication Date Title
CN109358848B (en) User-defined instruction editing method and device and computer equipment
US9348807B2 (en) Apparatus and method for providing a condition builder interface
JP2019502944A5 (en)
CN106775770A (en) The lookup method of query statement is built based on category information
KR20080086456A (en) A method and system for editing text with a find and replace function leveraging derivations of the find and replace input
CN105701183A (en) User personalized template implementation method and apparatus
CN111857810A (en) Front-end development file creating method and device and electronic equipment
Gómez et al. An approach to the co-creation of models and metamodels in Enterprise Architecture Projects.
CN115485039B (en) System and method for supporting creation of game scripts
CN106933568B (en) Configuration software system and industrial control method
CN109491919B (en) Software testing method and testing platform
JP5275087B2 (en) Program generating apparatus and block diagram generating apparatus
CN115374764A (en) Demand model automatic generation method and system based on user story
CN115291857A (en) Visual business rule arranging method and configurator
JP5082971B2 (en) A speech synthesizer and a reading system using the same.
WO2005038647A1 (en) User interface software design system
CN108920241B (en) Display state adjusting method, device and equipment
CN117111902B (en) AI intelligent software development method and device
JP4189400B2 (en) Conversion method automatic generation method, conversion method automatic generation program, and conversion method automatic generation device
CN110554860A (en) Construction method and code generation method of software project natural language programming interface (NLI)
JP4890584B2 (en) Ontology creation support device and program
US20230065428A1 (en) Programming support program storage medium, programming support device, and programming support method
JP2004325692A (en) Text speech synthesis apparatus, text processing apparatus and program, and recording medium for program thereof
Alvaro et al. Computer music cloud
Azevedo et al. BPMN Model and Text Instructions Automatic Synchronization.

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