Method, device, electronic equipment and system for processing content in editor

By integrating a YAML editor plug-in into the target application, the user input content is monitored and verified in real time, solving the problems of cumbersome client downloads and inaccurate error correction in the existing technology, and achieving efficient and accurate content editing and error correction.

CN120671643APending Publication Date: 2025-09-19SHENZHEN GREEN CONNECTION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510536835.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

In the prior art, content editors need to download a client and register, which results in low efficiency, especially when the network is poor, and error correction is not timely or accurate.

Method used

By integrating a YAML-type editor plug-in on the target application, user input is monitored in real time and content verification is performed, including verification of data types, values, and business fields. The verification results are displayed and corrected on the page.

Benefits of technology

It simplifies the content editing process, improves editing efficiency and accuracy, displays grammatical errors in a timely manner, and users can quickly correct them, reducing the steps of downloading the client and network dependence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120671643A_ABST
    Figure CN120671643A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of file editing, and particularly discloses a method, a device, electronic equipment and a system for processing contents in an editor. A front end monitors the contents input by a user through the editor integrated on a target application program; the method comprises the following steps: executing verification operation on a data type of content input by a user, a numerical value corresponding to the data type and a business field corresponding to the data type based on an editor to obtain a corresponding content verification result, and displaying the content on a page of a target application program according to the content verification result. According to the method, the editor is integrated on the target application program, such as a browser, so that content editing and real-time verification can be performed without downloading a corresponding client, content editing and error correction operations are simplified, the content editing efficiency and accuracy are improved, wrong contents, such as grammar errors, are timely and clearly output to a user, and the user experience is improved. Therefore, the user can clearly know the wrong place in time, and the content correction efficiency and accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of file editing technology, and in particular to a method, device, electronic device and system for processing content in an editor. Background Art

[0002] With the rapid development of Internet technology, various editing clients have emerged in order to meet users' various editing needs, such as office editing needs.

[0003] Currently, when editing content, one generally needs to first download the corresponding editing client, then open the editing client and log in. If logging in for the first time, one must first register before using the editing client to edit content. As can be seen, the existing method of downloading a client to edit content is cumbersome, especially when the network is poor. The client download time is long, resulting in low content editing efficiency. In addition, when it comes to content correction, error correction for content with complex semantics cannot be timely or is inaccurate.

[0004] Therefore, it is particularly important to propose a simplified content editing and error correction method to improve the efficiency and accuracy of content editing. Summary of the Invention

[0005] The present invention provides a method, device, electronic device and system for processing content in an editor, which can simplify content editing and error correction methods to improve content editing efficiency and accuracy.

[0006] To solve the above technical problems, the present invention discloses, in a first aspect, a method for processing content in an editor. The method is applied to a front-end having a target application installed thereon, the front-end being communicatively connected to a network-attached storage device, and the front-end accessing the network-attached storage device through the target application. The method comprises:

[0007] The front end monitors first content input by a target user into an editor integrated on the target application through an editor integrated on the target application, wherein the editor is a YAML-type editor that has been instance-initialized on the target application and is integrated on the target application in the form of an editor plug-in;

[0008] The front end determines, based on the editor, a data type of the first content, a value corresponding to the data type, and a business field corresponding to the data type, performs a verification operation on the data type of the first content and the value corresponding to the data type to obtain a verification result, and performs a verification operation on the business field corresponding to the data type of the first content based on the verification result to obtain a content verification result of the first content;

[0009] The front end performs a display operation on the first content on the page of the target application according to the content verification result, and the editor is located in the page of the target application.

[0010] As an optional implementation, in the first aspect of the present invention, the editor plug-in is determined in the following manner:

[0011] Obtain a verification rule file for verifying the content, wherein the verification rule file includes a YAML syntax verification rule file and / or a configuration verification rule file;

[0012] Setting the verification rule file in the code of the editor, wherein the code of the editor is a YAML language service type code;

[0013] In the editor plug-in, an instance of the editor is created based on the code provided with the verification rule file, to obtain an editor plug-in including the instance of the editor;

[0014] The editor plug-in is used to be integrated into the target application, and the editor plug-in is stored in a predetermined target directory.

[0015] As an optional implementation manner, in the first aspect of the present invention, the front end performs a verification operation on the data type of the first content and a numerical value corresponding to the data type to obtain a verification result, and based on the verification result, performs a verification operation on the service field corresponding to the data type of the first content to obtain a content verification result of the first content, including:

[0016] The front end verifies whether the data type of the first content is one of a predetermined YAML data type set and whether the value corresponding to the data type of the first content is within a preset value range, to obtain a verification result;

[0017] When the verification result indicates that the data type of the first content is one of the YAML data types and the value corresponding to the data type of the first content is within a preset value range, the front end determines whether the business field corresponding to the first content meets the preset field condition, and obtains the content verification result of the first content;

[0018] Wherein, when it is determined that the business field corresponding to the first content meets the preset field condition, the content verification result is used to indicate that the first content has passed the verification;

[0019] When the verification result is used to indicate that the data type of the first content is not one of the predetermined YAML data type set or the numerical value corresponding to the data type of the first content is not within a preset numerical range, or when it is determined that the business field corresponding to the first content does not meet the preset field condition, the content verification result is used to indicate that the first content has failed the verification.

[0020] As an optional implementation, in the first aspect of the present invention, the front end performs a display operation on the first content on the page of the target application according to the content verification result, including:

[0021] When the content verification result indicates that the first content has failed verification, the front end determines, based on the content verification result, a second content in the first content that has failed verification;

[0022] The front end displays the second content in an editor of the target application in a first preset display mode, so that the target user can perform a modification operation on the second content;

[0023] The method further comprises:

[0024] When it is detected that the target content has completed the correction of the second content, the front end re-executes the YAML verification operation on the first content based on the editor to obtain the content verification result of the first content.

[0025] As an optional embodiment, in the first aspect of the present invention, the method further comprises:

[0026] When the content verification result indicates that the first content has passed verification, the front end transmits the first content to the back end via a predetermined transmission protocol. Alternatively, the front end detects an interactive operation triggered by the target user on the page of the target application program with respect to the first content, obtains an interactive operation result, and transmits the first content to the back end via a predetermined transmission protocol based on the interactive operation result, thereby triggering the back end to perform a configuration verification operation on the received first content, obtain a configuration verification result, and return the configuration verification result to the front end.

[0027] The front end receives the configuration verification result as a content verification result of the first content.

[0028] As an optional implementation, in the first aspect of the present invention, the front end performs a display operation on the first content on the page of the target application according to the content verification result, including:

[0029] When the content verification result indicates that the target content fails the configuration verification, the front end filters third content that fails the verification from the first content according to the content verification result, and displays the third content on the page of the target application in a second preset display mode;

[0030] The method further comprises:

[0031] When the content verification result indicates that the target content has passed the configuration verification, the front end determines display parameters of the editor in the page of the target application, where the display parameters corresponding to the editor include display size and / or display resolution, and the display size corresponding to the editor includes display height and / or display width;

[0032] The front end calculates the amount of content required to be displayed on the page of the target application within a unit time based on the display parameters corresponding to the editor.

[0033] As an optional embodiment, in the first aspect of the present invention, the method further comprises:

[0034] The front end determines a business scenario of the first content;

[0035] The front end filters out fourth content requiring a target identifier from the first content according to a business scenario of the first content;

[0036] The front end sets, in the editor of the target application, a target identifier matching the fourth content for the fourth content;

[0037] The front end performs a display operation on the fourth content according to the target identifier corresponding to the fourth content.

[0038] A second aspect of the present invention discloses a device for processing content in an editor. The device is applied to a front end having a target application installed thereon. The front end is communicatively connected to a network attached storage device, and the front end accesses the network attached storage device through the target application. The device comprises:

[0039] a monitoring module, configured to monitor, through an editor integrated on the target application, first content input by a target user into the editor, wherein the editor is a YAML-type editor that has been instance-initialized on the target application and is integrated on the target application in the form of an editor plug-in;

[0040] a verification module configured to determine, based on the editor, a data type of the first content, a value corresponding to the data type, and a service field corresponding to the data type, perform a verification operation on the data type of the first content and the value corresponding to the data type to obtain a verification result, and perform a verification operation on the service field corresponding to the data type of the first content based on the verification result to obtain a content verification result for the first content;

[0041] A display module is configured to display the first content on a page of the target application according to the content verification result, wherein the editor is located in the page of the target application.

[0042] As an optional implementation, in the second aspect of the present invention, the editor plug-in is determined in the following manner:

[0043] Obtain a verification rule file for verifying the content, wherein the verification rule file includes a YAML syntax verification rule file and / or a configuration verification rule file;

[0044] Setting the verification rule file in the code of the editor, wherein the code of the editor is a YAML language service type code;

[0045] In the editor plug-in, an instance of the editor is created based on the code provided with the verification rule file, to obtain an editor plug-in including the instance of the editor;

[0046] The editor plug-in is used to be integrated into the target application, and the editor plug-in is stored in a predetermined target directory.

[0047] As an optional implementation manner, in the second aspect of the present invention, the verification module performs a verification operation on the data type of the first content and a numerical value corresponding to the data type to obtain a verification result, and performs a verification operation on the service field corresponding to the data type of the first content based on the verification result to obtain a content verification result for the first content. Specific methods include:

[0048] The front end verifies whether the data type of the first content is one of a predetermined YAML data type set and whether the value corresponding to the data type of the first content is within a preset value range, to obtain a verification result;

[0049] When the verification result indicates that the data type of the first content is one of the YAML data types and the value corresponding to the data type of the first content is within a preset value range, the front end determines whether the business field corresponding to the first content meets the preset field condition, and obtains the content verification result of the first content;

[0050] Wherein, when it is determined that the business field corresponding to the first content meets the preset field condition, the content verification result is used to indicate that the first content has passed the verification;

[0051] When the verification result is used to indicate that the data type of the first content is not one of the predetermined YAML data type set or the numerical value corresponding to the data type of the first content is not within a preset numerical range, or when it is determined that the business field corresponding to the first content does not meet the preset field condition, the content verification result is used to indicate that the first content has failed the verification.

[0052] As an optional implementation, in the second aspect of the present invention, the specific manner in which the display module performs a display operation on the first content on the page of the target application according to the content verification result includes:

[0053] When the content verification result indicates that the first content has failed verification, determining, based on the content verification result, a second content in the first content that has failed verification;

[0054] Displaying the second content in an editor of the target application in a first preset display manner, so that the target user can perform a modification operation on the second content;

[0055] The method further comprises:

[0056] When it is detected that the target content has completed the correction of the second content, the verification module is triggered to re-execute the YAML verification operation on the first content based on the editor to obtain the content verification result of the first content.

[0057] As an optional implementation, in the second aspect of the present invention, the verification module performs a YAML verification operation on the first content based on the editor to obtain a content verification result of the first content, further comprising:

[0058] When the content verification result indicates that the first content has passed verification, the first content is transmitted to the backend via a predetermined transmission protocol. Alternatively, the frontend detects an interactive operation triggered by the target user on the page of the target application program with respect to the first content, obtains an interactive operation result, and transmits the first content to the backend via a predetermined transmission protocol based on the interactive operation result, so as to trigger the backend to perform a configuration verification operation on the received first content, obtain a configuration verification result, and return the configuration verification result to the frontend.

[0059] The configuration verification result is received as a content verification result of the first content.

[0060] As an optional implementation, in the second aspect of the present invention, the specific manner in which the display module performs a display operation on the first content on the page of the target application according to the content verification result includes:

[0061] When the content verification result indicates that the target content fails the configuration verification, filtering third content that fails the verification from the first content according to the content verification result, and displaying the third content on the page of the target application in a second preset display mode;

[0062] The method further comprises:

[0063] When the content verification result indicates that the target content passes the configuration verification, determining display parameters of the editor in the page of the target application, wherein the display parameters corresponding to the editor include display size and / or display resolution, and the display size corresponding to the editor includes display height and / or display width;

[0064] The amount of content required to be displayed on the page of the target application within a unit time is calculated according to the display parameters corresponding to the editor.

[0065] As an optional embodiment, in the second aspect of the present invention, the device further includes:

[0066] a determination module, configured to determine a business scenario of the first content;

[0067] a screening module, configured to screen out fourth content requiring a target identifier from the first content according to a business scenario of the first content;

[0068] A setting module, configured to set, for the fourth content in an editor of the target application, a target identifier that matches the fourth content;

[0069] The display module is further configured to perform a display operation on the fourth content according to a target identifier corresponding to the fourth content.

[0070] A third aspect of the present invention discloses an electronic device, comprising:

[0071] a memory storing executable program code;

[0072] a processor coupled to the memory;

[0073] The processor calls the executable program code stored in the memory to execute the method for processing content in an editor disclosed in the first aspect of the present invention.

[0074] A fourth aspect of the present invention discloses a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions. When the computer instructions are called, they are used to execute the method for processing content in an editor disclosed in the first aspect of the present invention.

[0075] A fifth aspect of the present invention discloses a system for processing content in an editor, the system comprising the apparatus for processing content in an editor as described in the second aspect, a backend in communication with the apparatus, and a network attached storage device in communication with both the backend and the apparatus, wherein the apparatus and the backend exchange data via a preset transmission protocol to execute the method for processing content in an editor disclosed in the first aspect of the present invention; or

[0076] The system includes the electronic device as described in the third aspect and a network attached storage device communicatively connected to the electronic device, wherein the electronic device is used to execute the method for processing content in an editor disclosed in the first aspect of the present invention.

[0077] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0078] In an embodiment of the present invention, the front end monitors the content input by the user into the editor through an editor integrated on the target application, wherein the editor is an editor of YAML type that has been initialized by an instance on the target application, and the editor is integrated on the target application in the form of an editor plug-in; the front end performs a verification operation on the data type of the content input by the user, the numerical value corresponding to the data type, and the business field corresponding to the data type based on the editor, obtains the corresponding content verification result, and then performs a display operation on the content on the page of the target application based on the content verification result, that is, by integrating the editor on the target application, such as a browser, there is no need to download the corresponding client, and the content can be edited and verified in real time, which simplifies content editing and error correction operations, improves content editing efficiency and accuracy, and outputs erroneous content, such as grammatical errors, to the user in a timely and clear manner so that the user can clearly know the error in a timely manner, which is conducive to improving the efficiency and accuracy of content correction. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0080] Figure 1 This is a flowchart of a method for processing content in an editor disclosed in an embodiment of the present invention;

[0081] Figure 2 This is a schematic structural diagram of a device for processing content in an editor disclosed in an embodiment of the present invention;

[0082] Figure 3 is a schematic structural diagram of another device for processing content in an editor disclosed in an embodiment of the present invention;

[0083] Figure 4 This is a schematic structural diagram of an electronic device disclosed in an embodiment of the present invention;

[0084] Figure 5 This is a schematic diagram of the structure of a system for processing content in an editor disclosed in an embodiment of the present invention;

[0085] Figure 6 This is a schematic diagram of the structure of another system for processing content in an editor disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0086] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0087] The terms "first," "second," and so on, in the description and claims of the present invention and the accompanying drawings are used to distinguish between different items, not to describe a specific order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or end comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed therein, or may optionally include other steps or elements inherent to such process, method, product, or end.

[0088] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute a separate or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0089] The present invention discloses a method, device, electronic device and system for processing content in an editor, wherein the front end monitors the content input by the user into the editor through an editor integrated on the target application, wherein the editor is an editor of YAML type that has been initialized by an instance on the target application, and the editor is integrated on the target application in the form of an editor plug-in; the front end performs a verification operation on the data type of the content input by the user, the numerical value corresponding to the data type and the business field corresponding to the data type based on the editor, obtains the corresponding content verification result, and then performs a display operation on the content on the page of the target application based on the content verification result, that is, by integrating the editor on the target application, such as a browser, the relevant content can be edited without downloading the corresponding client, and the content can be verified in real time, which simplifies the content editing and error correction operations, improves the content editing efficiency and accuracy, and outputs the wrong content, such as grammatical errors, to the user in a timely and clear manner so that the user can clearly know the error in a timely manner, which is conducive to improving the content correction efficiency and accuracy. Regarding other technical contents, they are described in detail below.

[0090] Example 1

[0091] See also Figure 1 , Figure 1 This is a flow chart of a method for processing content in an editor disclosed in an embodiment of the present invention. Figure 1 The described method can be applied to any scenario where content editing is required through a front-end installed with a target application. The front-end is in communication with a network attached storage device, and the front-end accesses the network attached storage device through the target application. Figure 1 As shown, the method may include the following steps:

[0092] 101. The front end monitors the first content input by the target user into the editor through an editor integrated in the target application. The editor is a YAML type editor that has been initialized on the target application. The editor is integrated into the target application in the form of an editor plug-in, and the editor is located in the page of the target application.

[0093] In the embodiment of the present invention, optionally, the editor plug-in is determined in the following manner:

[0094] Obtain a verification rule file for verifying the content, which includes a YAML syntax verification rule file and / or a configuration verification rule file;

[0095] Set the validation rule file in the editor code. The editor code is the YAML language service type code, that is, it is mounted in the editor code.

[0096] In the editor plug-in, based on the code of the validation rule file, an instance of the editor is created to obtain the editor plug-in including the instance of the editor;

[0097] The editor plug-in is used to be integrated into the target application, and the editor plug-in is stored in a predetermined target directory.

[0098] In an embodiment of the present invention, the editor plug-in optionally carries specified parameters including, but not limited to, file types that require verification (e.g., image types) and file operation flags, such as a read-only flag that prohibits modification by others, which helps improve content security. Furthermore, after creating an instance, i.e., obtaining the editor plug-in, during actual use, the method can also obtain user display requirements, such as theme text color, and display the editor or the first content in the editor in the target application based on the user's display requirements, so that users can edit content and correct errors more quickly.

[0099] In an embodiment of the present invention, optionally, the YAML syntax verification rule file includes a data structure and format verification file (such as schema.json) and a file name (such as docker-compose.yml).

[0100] In an embodiment of the present invention, optionally, the target directory can be any predetermined directory, as long as the editor plug-in can be obtained, such as a static resource directory. This can reduce dependence on external networks, so that even in the absence of a network, the editor plug-in can be obtained through the local area network, and can be used out of the box for content editing and verification.

[0101] In an embodiment of the present invention, optionally, the code of the V editor is written through one of the codes in HTML, CSS, and JS so that it can be deployed to any device without the need for a specific deployment environment (such as Node, Python). It can also be built into each front-end framework for encapsulation or secondary development, and has extremely strong compatibility. In particular, JS code does not involve a framework or tool library, which improves the maintainability of the plug-in, reduces the amount of plug-in data, and saves space resources; and displays the content in the hidden input box in the editor, which can render the content on the page in real time. And because JS can be directly recognized and run by the target application, there is no need for a specific development or packaging environment, which greatly reduces development dependencies, and the plug-in can be deployed to any target application, improving the applicability and deployment flexibility of the plug-in. Furthermore, the code of the editor is encapsulated into a base class using object-oriented and singleton or multi-instance modes, and the parameters exposed to the outside are set, such as bianjiqi.html.

[0102] In an embodiment of the present invention, the editor and the page are optionally bidirectionally bound. This means that a target user can directly enter first content into the editor, which will then transfer the first content to the target application's page. Alternatively, the target user can enter content into the target application's page, which will then transfer the content to the editor. In other words, regardless of the method used, the editor can monitor the first content entered by the target user, improving the efficiency of content input into the editor and thereby facilitating improved content verification efficiency.

[0103] In an embodiment of the present invention, optionally, a filling example that meets the requirements of the rules is output to the target user, such as a YAML example, so that the target user can enter the first content according to the example. This allows users who do not understand the grammar to quickly enter content that meets the requirements. Outputting the example to the user first is helpful in reducing the occurrence of incorrect content input or improving the efficiency of verification after content input. Alternatively, a filling example that meets the requirements of the rules is output to the target user, such as a YAML example, so that the target user can fill in the first content according to the example, and then generate a file that meets the requirements of the rules for the first content with one click.

[0104] In an embodiment of the present invention, optionally, when the editor plug-in is initialized, the corresponding DOM node can be specified, and the initialization process, that is, the instance initialization, can be pushed into the Web Worker for processing without affecting other operations during the process, so that the script can run in the background without blocking the front-end page, and even in complex task calculations or data processing, it can still provide an efficient and smooth user experience.

[0105] 102. The front end determines the data type of the first content, the numerical value corresponding to the data type, and the business field corresponding to the data type based on the editor, and performs a verification operation on the data type of the first content and the numerical value corresponding to the data type to obtain a verification result, and based on the verification result, performs a verification operation on the business field corresponding to the data type of the first content to obtain a content verification result of the first content.

[0106] In an embodiment of the present invention, optionally, after the target user enters the first content, a YAML verification operation can be directly performed on the first content, or a YAML verification operation can be performed on the first content when a submission prompt triggered by the target user is detected, such as clicking a "Submit" button in the editor, that is, performing a YAML verification operation on the first content.

[0107] 103. The front end performs a display operation on the first content on the page of the target application according to the content verification result.

[0108] In the embodiments of the present invention, it should be noted that the input and verification of the first content are implemented synchronously. That is, while the target user is entering the first content into the editor, the front-end simultaneously performs verification operations on the first content being input in real time based on the editor. Furthermore, if the first content is verified to contain non-compliant content, such as grammatical non-compliance, this will be displayed in real time on the page or in the editor, such as a red error message appearing below the editor. Clicking the error line will scroll the cursor to the specified position, facilitating user input.

[0109] It can be seen that the front end of the embodiment of the present invention monitors the content input by the user into the editor through an editor integrated on the target application, wherein the editor is an editor of YAML type that has been initialized by an instance on the target application, and the editor is integrated on the target application in the form of an editor plug-in; the front end is based on the editor, and performs a verification operation on the data type of the content input by the user, the numerical value corresponding to the data type, and the business field corresponding to the data type to obtain the corresponding content verification result, and then performs a display operation on the content on the page of the target application based on the content verification result, that is, by integrating the editor on the target application, such as a browser, there is no need to download the corresponding client, and the relevant content can be edited and the content can be verified in real time, which simplifies the content editing and error correction operations, improves the content editing efficiency and accuracy, and outputs the wrong content, such as grammatical errors, to the user in a timely and clear manner, so that the user can clearly know the error in a timely manner, which is conducive to improving the efficiency and accuracy of content correction.

[0110] In an embodiment of the present invention, optionally, the front end performs a verification operation on the data type of the first content and a numerical value corresponding to the data type to obtain a verification result, and based on the verification result, performs a verification operation on the service field corresponding to the data type of the first content to obtain a content verification result of the first content, including:

[0111] The front end verifies whether the data type of the first content is one of a predetermined YAML data type set and whether the value corresponding to the data type of the first content is within a preset value range, and obtains a verification result;

[0112] When the verification result indicates that the data type of the first content is one of the YAML data type set and the value corresponding to the data type of the first content is within the preset value range, the front end determines whether the business field corresponding to the first content meets the preset field condition and obtains the content verification result of the first content;

[0113] Wherein, when it is determined that the business field corresponding to the first content meets the preset field condition, the content verification result is used to indicate that the first content has passed the verification;

[0114] When the verification result is used to indicate that the data type of the first content is not one of the predetermined YAML data type set or the numerical value corresponding to the data type of the first content is not within the preset numerical range, or when it is determined that the business field corresponding to the first content does not meet the preset field conditions, the content verification result is used to indicate that the first content has failed the verification.

[0115] In an embodiment of the present invention, optionally, the data type and the corresponding numerical value of the first content are verified based on the A.json file in the editor, and the business field corresponding to the data type of the first content is verified based on the B.json file in the editor. Among them, the YAML data type includes but is not limited to one of enumerated data, integer data, and Boolean data types. Different data types have different corresponding preset numerical ranges and corresponding business fields. For example, the preset numerical range corresponding to integer data is 42 to 1337, and the corresponding business field is 3.9.

[0116] It can be seen that the embodiment of the present invention performs syntax verification on the data type, value, field, etc. of the content input by the user at the front end. If there are errors, the errors can be quickly and comprehensively verified and displayed in a timely and accurate manner so that the user can quickly correct them.

[0117] In the embodiment of the present invention, further optionally, the front end performs a display operation on the first content on the page of the target application according to the content verification result, including:

[0118] When the content verification result indicates that the first content has failed verification, the front end determines, based on the content verification result, a second content in the first content that has failed verification;

[0119] The front end displays the second content in an editor of the target application in a first preset display mode, so that the target user can perform a correction operation on the second content;

[0120] The method may further comprise the following steps:

[0121] When it is detected that the target content has completed the correction of the second content, the front end re-executes the above-mentioned editor-based YAML verification operation on the first content to obtain the content verification result of the first content.

[0122] In an embodiment of the present invention, the first preset display mode can optionally be a pre-set unified display mode for each type of error, such as uniformly displaying incoherent sentences with yellow underlines and red text. It can also be a display mode pre-determined by the target user, or it can be a display mode adaptively determined by the front end based on the attribute parameters of the currently used device (such as screen size, resolution, etc.), the attribute parameters of the content (such as font type, font size), and the attribute parameters of the target user (such as student, wearing glasses, etc.). Furthermore, the error type of the second content and its position in the first content can also be output in combination with voice.

[0123] It can be seen that the embodiment of the present invention selects a suitable display mode to display erroneous content to the user, thereby improving the display accuracy and pertinence of the erroneous content, so that the user can quickly and accurately capture the erroneous content and correct it.

[0124] In an optional embodiment, the method may include the following steps:

[0125] When the content verification result indicates that the first content has passed verification, the front end transmits the first content to the back end via a predetermined transmission protocol. Alternatively, the front end detects an interactive operation triggered by the target user on the page of the target application program with respect to the first content, obtains an interactive operation result, and transmits the first content to the back end via a predetermined transmission protocol based on the interactive operation result, thereby triggering the back end to perform a configuration verification operation on the received first content, obtain a configuration verification result, and return the configuration verification result to the front end.

[0126] The front end receives the configuration verification result as the content verification result of the first content.

[0127] In this optional embodiment, the transmission protocol may include, but is not limited to, HTTP or WebSocket. Interaction operations include, but are not limited to, an operation triggered by the target user on a "Submit" button on a page or editor, or an operation in which the target user verbally outputs "Submit," or an operation detected by the target user to indicate "Submit," such as a blink or a W-shaped gesture.

[0128] In this optional embodiment, optionally, the backend performs a configuration verification operation on the received first content, obtains a configuration verification result, and returns the configuration verification result to the frontend. Specifically, the backend transmits the first content to a processing engine, such as a docker engine, to trigger the processing engine to perform a configuration verification on the first content, obtain a configuration verification result, and transmit it to the frontend through the backend. The configuration verification result includes but is not limited to one or more of the file length verification result (such as the length is too long or too short, etc.) and / or the file type verification result (such as the lack of pictures, etc.), the configuration amount (such as the need to add 100 lines of text, add 3 pictures of people), and the accuracy and validity of the file path. Furthermore, the processing engine can be combined with systems such as Linux or MACO.

[0129] In this optional embodiment, the content transmission between the front-end and the back-end can be optionally performed in a variety of encoding methods, such as base64, plain text (allowed to contain line breaks), etc.

[0130] It can be seen that this optional embodiment further verifies the configuration of the content on the back end on the basis of the syntax verification that has been performed on the front end. Through the mutual cooperation of the front end and the back end, the consumption of storage and computing resources on each end is saved, the time cost of the front end and the back end transmission is greatly shortened, and the flexibility, efficiency and accuracy of the verification are improved without sacrificing the correctness; and through the back-end engine verification method, the configuration of the content is verified without blocking the content editing and verification on the front end, and even in complex task calculations or data processing, it can still provide an efficient and smooth user experience.

[0131] In this optional embodiment, optionally, the front end performs a display operation on the first content on a page of the target application according to the content verification result, including:

[0132] When the content verification result indicates that the target content fails the configuration verification, the front end filters the third content that fails the verification from the first content based on the content verification result, and displays the third content on the page of the target application in a second preset display mode.

[0133] In this optional embodiment, the method may further include the following steps:

[0134] When the content verification result indicates that the target content has passed the configuration verification, the front end determines the display parameters of the editor in the page of the target application. For example, the display parameters corresponding to the editor include display size and / or display resolution, and the display size corresponding to the editor includes display height and / or display width.

[0135] The front end calculates the amount of content that needs to be displayed on the target application page per unit time based on the display parameters corresponding to the editor.

[0136] In this optional embodiment, the second preset display mode can be set in the same manner as the first preset display mode, which will not be described in detail here. Alternatively, the second preset display mode can be determined based solely on the error type and configuration amount of the third content, or in combination with at least one of the factors considered in determining the first preset display mode.

[0137] In this optional embodiment, optionally, the display parameters corresponding to the editor can be understood as the display parameters of the editor itself, or as the display parameters of the page where the editor is located. Further, the amount of content required to be displayed can be understood as the area of ​​the editor or page, such as 1 / 4 area, or can be understood as the number of items (virtual list) displayed on the editor or page, such as 18 items. Specifically, as the screen of the editor or page becomes larger and the resolution becomes higher, the amount of content that can be displayed becomes more. Further, when there is new content to be displayed, if the position required for the content to be displayed is larger than the area that the editor or page can present, the front end will delete the content of the editor or part of the page position (such as the top) from the visible area, and display the new content in sequence, and so on. This can improve the compatibility of the target application, such as being compatible with older protocol browsers.

[0138] It can be seen that this optional embodiment improves the display accuracy of erroneous content by feeding back the errors verified by the back-end engine to the front-end for display, and displays them in a display mode that matches the user, so that the user can quickly correct them. Furthermore, when the back-end engine also passes the verification, the correct content is displayed in combination with the current display parameters of the editor or page, improving the accuracy of the content display and the readability of the content; and by using a virtual list of lost old content, it can cope with massive file content, such as scenarios where multiple lines are operated simultaneously, and realize content editing and verification, ensuring smooth operation of content display without frame drops or freezes.

[0139] In another optional embodiment, the method may include the following steps:

[0140] The front end determines the business scenario of the first content;

[0141] The front end selects the fourth content that needs to be set with a target identifier from the first content according to the business scenario of the first content;

[0142] The front end sets a target identifier matching the fourth content for the fourth content in an editor of the target application;

[0143] The front end performs a display operation on the fourth content according to the target identifier corresponding to the fourth content.

[0144] In this optional embodiment, the target identifier can optionally include a read-only identifier. Furthermore, it can also include but is not limited to one or more of a copy-only identifier, a modification-only identifier, and a retain-only revision format identifier, depending on the specific business scenario. And different business scenarios require different fourth contents of the target identifier. For example, after the docker container application is installed, the business party hopes to only allow viewing in the project console, not modification. For this reason, the read-only identifier is turned on, and it is notified in yellow text below the editor that editing is not supported. If the user insists on editing, a bubble will appear, prompting that it cannot be modified, and this is a read-only configuration.

[0145] It can be seen that this optional embodiment sets corresponding identifiers for different contents in different business scenarios to restrict users from operating relevant content in the business scenario, thereby reducing the occurrence of relevant content being modified and further improving the security of the content.

[0146] Example 2

[0147] See also Figure 2 , Figure 2 This is a schematic diagram of the structure of a device for processing content in an editor disclosed in an embodiment of the present invention. Figure 2 The described apparatus can be applied to any scenario where content editing is required through a front-end installed with a target application. The front-end is in communication with a network attached storage device, and the front-end accesses the network attached storage device through the target application. Figure 2 As shown, the device may include:

[0148] The monitoring module 201 is used to monitor the first content input by the target user into the editor through an editor integrated in the target application. The editor is a YAML type editor that has been initialized through an instance on the target application. The editor is integrated into the target application in the form of an editor plug-in, and the editor is located in the page of the target application.

[0149] In the embodiment of the present invention, optionally, the editor plug-in is determined in the following manner:

[0150] Obtain a verification rule file for verifying the content, which includes a YAML syntax verification rule file and / or a configuration verification rule file;

[0151] Set the validation rule file in the editor code. The editor code is the YAML language service type code, that is, it is mounted in the editor code.

[0152] In the editor plug-in, based on the code of the validation rule file, an instance of the editor is created to obtain the editor plug-in including the instance of the editor;

[0153] The editor plug-in is used to be integrated into the target application, and the editor plug-in is stored in a predetermined target directory.

[0154] In an embodiment of the present invention, the editor plug-in optionally carries specified parameters including, but not limited to, file types that require verification (e.g., image types) and file operation flags, such as a read-only flag that prohibits modification by others, which helps improve content security. Furthermore, after creating an instance, i.e., obtaining the editor plug-in, during actual use, the method can also obtain user display requirements, such as theme text color, and display the editor or the first content in the editor in the target application based on the user's display requirements, so that users can edit content and correct errors more quickly.

[0155] In an embodiment of the present invention, optionally, the YAML syntax verification rule file includes a data structure and format verification file (such as schema.json) and a file name (such as docker-compose.yml).

[0156] In an embodiment of the present invention, optionally, the target directory can be any predetermined directory, as long as the editor plug-in can be obtained, such as a static resource directory. This can reduce dependence on external networks, so that even in the absence of a network, the editor plug-in can be obtained through the local area network, and can be used out of the box for content editing and verification.

[0157] In an embodiment of the present invention, optionally, the code of the V editor is written through one of the codes in HTML, CSS, and JS so that it can be deployed to any device without the need for a specific deployment environment (such as Node, Python). It can also be built into each front-end framework for encapsulation or secondary development, and has extremely strong compatibility. In particular, JS code does not involve a framework or tool library, which improves the maintainability of the plug-in, reduces the amount of plug-in data, and saves space resources; and displays the content in the hidden input box in the editor, which can render the content on the page in real time. And because JS can be directly recognized and run by the target application, there is no need for a specific development or packaging environment, which greatly reduces development dependencies, and the plug-in can be deployed to any target application, improving the applicability and deployment flexibility of the plug-in. Furthermore, the code of the editor is encapsulated into a base class using object-oriented and singleton or multi-instance modes, and the parameters exposed to the outside are set, such as bianjiqi.html.

[0158] In an embodiment of the present invention, the editor and the page are optionally bidirectionally bound. This means that a target user can directly enter first content into the editor, which will then transfer the first content to the target application's page. Alternatively, the target user can enter content into the target application's page, which will then transfer the content to the editor. In other words, regardless of the method used, the editor can monitor the first content entered by the target user, improving the efficiency of content input into the editor and thereby facilitating improved content verification efficiency.

[0159] In an embodiment of the present invention, optionally, a filling example that meets the requirements of the rules is output to the target user, such as a YAML example, so that the target user can enter the first content according to the example. This allows users who do not understand the grammar to quickly enter content that meets the requirements. Outputting the example to the user first is helpful in reducing the occurrence of incorrect content input or improving the efficiency of verification after content input. Alternatively, a filling example that meets the requirements of the rules is output to the target user, such as a YAML example, so that the target user can fill in the first content according to the example, and then generate a file that meets the requirements of the rules for the first content with one click.

[0160] In an embodiment of the present invention, optionally, when the editor plug-in is initialized, the corresponding DOM node can be specified, and the initialization process, that is, the instance initialization, can be pushed into the Web Worker for processing without affecting other operations during the process, so that the script can run in the background without blocking the front-end page, and even in complex task calculations or data processing, it can still provide an efficient and smooth user experience.

[0161] The verification module 202 is used to determine the data type of the first content, the numerical value corresponding to the data type, and the business field corresponding to the data type based on the editor, and perform a verification operation on the data type of the first content and the numerical value corresponding to the data type to obtain a verification result, and based on the verification result, perform a verification operation on the business field corresponding to the data type of the first content to obtain a content verification result of the first content.

[0162] The display module 203 is configured to display the first content on a page of a target application according to the content verification result.

[0163] In the embodiments of the present invention, it should be noted that the input and verification of the first content are implemented synchronously. That is, while the target user is entering the first content into the editor, the front-end simultaneously performs verification operations on the first content being input in real time based on the editor. Furthermore, if the first content is verified to contain non-compliant content, such as grammatical non-compliance, this will be displayed in real time on the page or in the editor, such as a red error message appearing below the editor. Clicking the error line will scroll the cursor to the specified position, facilitating user input.

[0164] It can be seen that implementation Figure 2 The described device monitors the content input by the user into the editor through an editor integrated on the target application, wherein the editor is an editor of YAML type that has been initialized by an instance on the target application, and the editor is integrated on the target application in the form of an editor plug-in; the front end is based on the editor, and performs verification operations on the data type of the content input by the user, the numerical value corresponding to the data type, and the business field corresponding to the data type to obtain the corresponding content verification result, and then performs a display operation on the content on the page of the target application based on the content verification result. That is, by integrating the editor on the target application, such as a browser, there is no need to download the corresponding client to edit the relevant content and verify the content in real time, which simplifies content editing and error correction operations, improves content editing efficiency and accuracy, and outputs erroneous content, such as grammatical errors, to the user in a timely and clear manner so that the user can clearly know the error location in a timely manner, which is conducive to improving the efficiency and accuracy of content correction.

[0165] In the embodiment of the present invention, optionally, the verification module 202 performs a verification operation on the data type of the first content and a numerical value corresponding to the data type to obtain a verification result, and performs a verification operation on the service field corresponding to the data type of the first content based on the verification result to obtain a content verification result for the first content. Specific methods include:

[0166] Verifying, based on the editor, whether the data type of the first content is one of a predetermined YAML data type set and whether a value corresponding to the data type of the first content is within a preset value range, and obtaining a verification result;

[0167] When the verification result indicates that the data type of the first content is one of the YAML data types and the value corresponding to the data type of the first content is within a preset value range, determining whether the business field corresponding to the first content meets the preset field condition, and obtaining a content verification result for the first content;

[0168] Wherein, when it is determined that the business field corresponding to the first content meets the preset field condition, the content verification result is used to indicate that the first content has passed the verification;

[0169] When the verification result is used to indicate that the data type of the first content is not one of the predetermined YAML data type set or the numerical value corresponding to the data type of the first content is not within the preset numerical range, or when it is determined that the business field corresponding to the first content does not meet the preset field conditions, the content verification result is used to indicate that the first content has failed the verification.

[0170] In an embodiment of the present invention, optionally, the data type and the corresponding numerical value of the first content are verified based on the A.json file in the editor, and the business field corresponding to the data type of the first content is verified based on the B.json file in the editor. Among them, the YAML data type includes but is not limited to one of enumerated data, integer data, and Boolean data types. Different data types have different corresponding preset numerical ranges and corresponding business fields. For example, the preset numerical range corresponding to integer data is 42 to 1337, and the corresponding business field is 3.9.

[0171] It can be seen that the embodiment of the present invention can also perform syntax verification on the data type, value and field of the content input by the user on the front end. If there are errors, the errors can be quickly and comprehensively verified and displayed in a timely and accurate manner so that the user can quickly correct them.

[0172] In the embodiment of the present invention, further optionally, the specific manner in which the display module 203 performs a display operation on the first content on the page of the target application according to the content verification result includes:

[0173] When the content verification result indicates that the first content has failed verification, determining, based on the content verification result, second content in the first content that has failed verification;

[0174] Displaying the second content in an editor of the target application in a first preset display manner, so that the target user can perform a modification operation on the second content;

[0175] When it is detected that the target content has completed the modification of the second content, the verification module 202 is triggered to re-execute the above-mentioned YAML verification operation based on the editor on the first content to obtain the content verification result of the first content.

[0176] In an embodiment of the present invention, the first preset display mode can optionally be a pre-set unified display mode for each type of error, such as uniformly displaying incoherent sentences with yellow underlines and red text. It can also be a display mode pre-determined by the target user, or it can be a display mode adaptively determined by the front end based on the attribute parameters of the currently used device (such as screen size, resolution, etc.), the attribute parameters of the content (such as font type, font size), and the attribute parameters of the target user (such as student, wearing glasses, etc.). Furthermore, the error type of the second content and its position in the first content can also be output in combination with voice.

[0177] It can be seen that the embodiment of the present invention can also select a suitable display method to display erroneous content to the user, thereby improving the display accuracy and pertinence of the erroneous content, so that the user can quickly and accurately capture the erroneous content and correct it.

[0178] In an optional embodiment, the verification module 202 performs a YAML verification operation on the first content based on the editor to obtain a content verification result of the first content, further comprising:

[0179] When the content verification result indicates that the first content has passed verification, the first content is transmitted to the backend via a predetermined transmission protocol. Alternatively, an interactive operation triggered by the target user on the page of the target application with respect to the first content is detected to obtain an interactive operation result. Based on the interactive operation result, the first content is transmitted to the backend via a predetermined transmission protocol to trigger the backend to perform a configuration verification operation on the received first content, obtain a configuration verification result, and return the configuration verification result to the frontend.

[0180] A configuration verification result is received as a content verification result of the first content.

[0181] In this optional embodiment, the transmission protocol may include, but is not limited to, Websocket, TCP, UDP, and SCTP protocols. Interaction operations include, but are not limited to, an operation triggered by the target user on a "Submit" button on a page or editor, or an operation in which the target user verbally outputs "Submit," or an operation detected by the target user to indicate "Submit," such as a blink or a W-shaped gesture.

[0182] In this optional embodiment, optionally, the backend performs a configuration verification operation on the received first content, obtains a configuration verification result, and returns the configuration verification result to the frontend. Specifically, the backend transmits the first content to a processing engine, such as a docker engine, to trigger the processing engine to perform a configuration verification on the first content, obtain a configuration verification result, and transmit it to the frontend through the backend. The configuration verification result includes but is not limited to one or more of the file length verification result (such as the length is too long or too short, etc.) and / or the file type verification result (such as the lack of pictures, etc.), the configuration amount (such as the need to add 100 lines of text, add 3 pictures of people), and the accuracy and validity of the file path. Furthermore, the processing engine can be combined with systems such as Linux or MACO.

[0183] In this optional embodiment, the content transmission between the front-end and the back-end can be optionally performed in a variety of encoding methods, such as base64, plain text (allowed to contain line breaks), etc.

[0184] It can be seen that this optional embodiment further verifies the configuration of the content on the back end on the basis of the syntax verification that has been performed on the front end. Through the mutual cooperation of the front end and the back end, the consumption of storage and computing resources on each end is saved, the time cost of the front end and the back end transmission is greatly shortened, and the flexibility, efficiency and accuracy of the verification are improved without sacrificing the correctness; and through the back-end engine verification method, the configuration of the content is verified without blocking the content editing and verification on the front end, and even in complex task calculations or data processing, it can still provide an efficient and smooth user experience.

[0185] In this optional embodiment, the specific manner in which the display module 203 performs a display operation on the first content on the page of the target application according to the content verification result includes:

[0186] When the content verification result indicates that the target content fails the configuration verification, filtering the third content that fails the verification from the first content according to the content verification result, and displaying the third content on the page of the target application in the second preset display mode;

[0187] When the content verification result indicates that the target content has passed the configuration verification, display parameters of the editor in the page of the target application are determined, such as the display parameters corresponding to the editor include display size and / or display resolution, and the display size corresponding to the editor includes display height and / or display width;

[0188] Calculate the amount of content that needs to be displayed on the target application page per unit time based on the display parameters corresponding to the editor.

[0189] In this optional embodiment, the second preset display mode can be set in the same manner as the first preset display mode, which will not be described in detail here. Alternatively, the second preset display mode can be determined based solely on the error type and configuration amount of the third content, or in combination with at least one of the factors considered in determining the first preset display mode.

[0190] In this optional embodiment, optionally, the display parameters corresponding to the editor can be understood as the display parameters of the editor itself, or as the display parameters of the page where the editor is located. Further, the amount of content required to be displayed can be understood as the area of ​​the editor or page, such as 1 / 4 area, or can be understood as the number of items (virtual list) displayed on the editor or page, such as 18 items. Specifically, as the screen of the editor or page becomes larger and the resolution becomes higher, the amount of content that can be displayed becomes more. Further, when there is new content to be displayed, if the position required for the content to be displayed is larger than the area that the editor or page can present, the front end will delete the content of the editor or part of the page position (such as the top) from the visible area, and display the new content in sequence, and so on. This can improve the compatibility of the target application, such as being compatible with older protocol browsers.

[0191] It can be seen that this optional embodiment can also improve the display accuracy of erroneous content by feeding back the errors verified by the back-end engine to the front-end for display, and displaying them in a display mode that matches the user, so as to facilitate quick correction by the user. Furthermore, when the back-end engine also passes the verification, the correct content is displayed in combination with the current display parameters of the editor or page, thereby improving the accuracy of the content display and the readability of the content; and by using a virtual list of lost old content, it can cope with massive file content, such as in scenarios where multiple lines are operated simultaneously, and realize content editing and verification, ensuring smooth operation of content display without frame drops or freezes.

[0192] In another optional embodiment, Figure 3 3 is a schematic diagram of the structure of another device for processing content in an editor disclosed in an embodiment of the present invention. As shown in FIG3 , the device may further include:

[0193] A determination module 204, configured to determine a business scenario of the first content;

[0194] A screening module 205 is configured to screen out fourth content requiring a target identifier from the first content based on the business scenario of the first content;

[0195] A setting module 206 is configured to set a target identifier matching the fourth content for the fourth content in the editor of the target application;

[0196] The display module 203 is further configured to display the fourth content according to the target identifier corresponding to the fourth content.

[0197] In this optional embodiment, the target identifier can optionally include a read-only identifier. Furthermore, it can also include but is not limited to one or more of a copy-only identifier, a modification-only identifier, and a retain-only revision format identifier, depending on the specific business scenario. And different business scenarios require different fourth contents of the target identifier. For example, after the docker container application is installed, the business party hopes to only allow viewing in the project console, not modification. For this reason, the read-only identifier is turned on, and it is notified in yellow text below the editor that editing is not supported. If the user insists on editing, a bubble will appear, prompting that it cannot be modified, and this is a read-only configuration.

[0198] It can be seen that this optional embodiment sets corresponding identifiers for different contents in different business scenarios to restrict users from operating relevant content in the business scenario, thereby reducing the occurrence of relevant content being modified and further improving the security of the content.

[0199] Example 3

[0200] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. Figure 4 The electronic device described can be applied to any scenario where content editing is required. Figure 4 As shown, the electronic device may include:

[0201] A memory 301 storing executable program code;

[0202] a processor 302 coupled to the memory 301;

[0203] Furthermore, it may also include an input interface 303 and an output interface 304 coupled to the processor 302;

[0204] The processor 302 calls the executable program code stored in the storage 301 to execute part or all of the steps of the method for processing content in the editor described in the first embodiment of the present invention.

[0205] Example 4

[0206] like Figure 5 As shown, Figure 5 This is a schematic diagram of the structure of a system for processing content in an editor disclosed in an embodiment of the present invention. Figure 5 As shown, the system includes Figure 2 or Figure 3The device, a backend in communication with the device, and a network-attached storage device in communication with both the backend and the device. The device and the backend exchange data via a preset transmission protocol to execute some or all of the steps of the method for processing content in an editor described in the first embodiment of the present invention.

[0207] or,

[0208] like Figure 6 As shown, Figure 6 This is a schematic diagram of the structure of another processing system for remote access based on a browser disclosed in an embodiment of the present invention. Figure 6 As shown, the system includes Figure 4 The electronic device and the network attached storage device in communication with the electronic device. The electronic device is used to execute some or all of the steps of the method for processing content in the editor described in the first embodiment of the present invention;

[0209] The communication protocol between the device, the backend, and the network-attached storage device, or the communication protocol between the electronic device and the network-attached storage device, includes but is not limited to one of HTTP, IP, Wi-Fi, DNS, and HTTPS. The preset transmission protocol includes but is not limited to one of Websocket, TCP, UDP, and SCTP.

[0210] Example 5

[0211] An embodiment of the present invention discloses a computer-readable storage medium storing computer instructions. When the computer instructions are called, they are used to execute some or all of the steps of the method for processing content in an editor described in the first embodiment of the present invention.

[0212] Example 6

[0213] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps in the method for processing content in an editor described in Example 1.

[0214] The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Those skilled in the art can understand and implement the present invention without inventive effort.

[0215] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by means of hardware. Based on this understanding, the above technical solution, in essence, or the portion that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, including a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0216] Finally, it should be noted that the method, device, electronic device and system for processing content in an editor disclosed in the embodiments of the present invention are only preferred embodiments of the present invention, and are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features therein may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for processing content in an editor, the method being applied to a front end having a target application installed thereon, the front end being communicatively connected to a network attached storage device, the front end accessing the network attached storage device through the target application, characterized in that: The method comprises: The front end monitors first content input by a target user into an editor integrated on the target application through an editor integrated on the target application, wherein the editor is a YAML-type editor that has been instance-initialized on the target application and is integrated on the target application in the form of an editor plug-in; The front end determines, based on the editor, a data type of the first content, a value corresponding to the data type, and a business field corresponding to the data type, performs a verification operation on the data type of the first content and the value corresponding to the data type to obtain a verification result, and performs a verification operation on the business field corresponding to the data type of the first content based on the verification result to obtain a content verification result of the first content; The front end performs a display operation on the first content on the page of the target application according to the content verification result, and the editor is located in the page of the target application.

2. The method for processing content in an editor according to claim 1, characterized in that: The editor plugin is determined in the following way: Obtain a verification rule file for verifying the content, wherein the verification rule file includes a YAML syntax verification rule file and / or a configuration verification rule file; Setting the verification rule file in the code of the editor, wherein the code of the editor is a YAML language service type code; In the editor plug-in, an instance of the editor is created based on the code provided with the verification rule file, to obtain an editor plug-in including the instance of the editor; The editor plug-in is used to be integrated into the target application, and the editor plug-in is stored in a predetermined target directory.

3. The method for processing content in an editor according to claim 1 or 2, characterized in that: The front end performs a verification operation on the data type of the first content and a numerical value corresponding to the data type to obtain a verification result, and performs a verification operation on the service field corresponding to the data type of the first content based on the verification result to obtain a content verification result of the first content, including: The front end verifies whether the data type of the first content is one of a predetermined YAML data type set and whether the value corresponding to the data type of the first content is within a preset value range, to obtain a verification result; When the verification result indicates that the data type of the first content is one of the YAML data types and the value corresponding to the data type of the first content is within a preset value range, the front end determines whether the business field corresponding to the first content meets the preset field condition, and obtains the content verification result of the first content; Wherein, when it is determined that the business field corresponding to the first content meets the preset field condition, the content verification result is used to indicate that the first content has passed the verification; When the verification result is used to indicate that the data type of the first content is not one of the predetermined YAML data type set or the numerical value corresponding to the data type of the first content is not within a preset numerical range, or when it is determined that the business field corresponding to the first content does not meet the preset field condition, the content verification result is used to indicate that the first content has failed the verification.

4. The method for processing content in an editor according to claim 3, wherein: The front end performs a display operation on the first content on the page of the target application according to the content verification result, including: When the content verification result indicates that the first content has failed verification, the front end determines, based on the content verification result, a second content in the first content that has failed verification; The front end displays the second content in an editor of the target application in a first preset display mode, so that the target user can perform a modification operation on the second content; The method further comprises: When it is detected that the target content has completed the correction of the second content, the front end re-executes the YAML verification operation on the first content based on the editor to obtain the content verification result of the first content.

5. The method for processing content in an editor according to claim 3, characterized in that: The method further comprises: When the content verification result indicates that the first content has passed verification, the front end transmits the first content to the back end via a predetermined transmission protocol. Alternatively, the front end detects an interactive operation triggered by the target user on the page of the target application program with respect to the first content, obtains an interactive operation result, and transmits the first content to the back end via a predetermined transmission protocol based on the interactive operation result, thereby triggering the back end to perform a configuration verification operation on the received first content, obtain a configuration verification result, and return the configuration verification result to the front end. The front end receives the configuration verification result as a content verification result of the first content.

6. The method for processing content in an editor according to claim 5, characterized in that: The front end performs a display operation on the first content on the page of the target application according to the content verification result, including: When the content verification result indicates that the target content fails the configuration verification, the front end filters third content that fails the verification from the first content according to the content verification result, and displays the third content on the page of the target application in a second preset display mode; The method further comprises: When the content verification result indicates that the target content has passed the configuration verification, the front end determines display parameters of the editor in the page of the target application, where the display parameters corresponding to the editor include display size and / or display resolution, and the display size corresponding to the editor includes display height and / or display width; The front end calculates the amount of content required to be displayed on the page of the target application within a unit time based on the display parameters corresponding to the editor.

7. The method for processing content in an editor according to any one of claims 1 to 6, characterized in that: The method further comprises: The front end determines a business scenario of the first content; The front end filters out fourth content requiring a target identifier from the first content according to a business scenario of the first content; The front end sets, in the editor of the target application, a target identifier matching the fourth content for the fourth content; The front end performs a display operation on the fourth content according to the target identifier corresponding to the fourth content.

8. A device for processing content in an editor, the device being applied to a front end having a target application installed thereon, the front end being communicatively connected to a network attached storage device, the front end accessing the network attached storage device through the target application, characterized in that: The device comprises: a monitoring module, configured to monitor, through an editor integrated on the target application, first content input by a target user into the editor, wherein the editor is a YAML-type editor that has been instance-initialized on the target application and is integrated on the target application in the form of an editor plug-in; a verification module configured to determine, based on the editor, a data type of the first content, a value corresponding to the data type, and a service field corresponding to the data type, perform a verification operation on the data type of the first content and the value corresponding to the data type to obtain a verification result, and perform a verification operation on the service field corresponding to the data type of the first content based on the verification result to obtain a content verification result for the first content; A display module is configured to display the first content on a page of the target application according to the content verification result, wherein the editor is located in the page of the target application.

9. An electronic device, characterized in that: The electronic device comprises: a memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the method for processing content in an editor according to any one of claims 1 to 7.

10. A system for processing content in an editor, characterized in that: The system comprises the apparatus for processing content in an editor according to claim 8, a backend in communication with the apparatus, and a network attached storage device in communication with both the backend and the apparatus, wherein the apparatus and the backend exchange data via a preset transmission protocol to execute the method for processing content in an editor according to any one of claims 1 to 7; or The system comprises the electronic device according to claim 9 and a network attached storage device communicatively connected to the electronic device, wherein the electronic device is configured to execute the method for processing content in an editor according to any one of claims 1 to 7.

11. A computer storage medium, characterized in that The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the method for processing content in an editor according to any one of claims 1 to 7.