User input verification method and device based on visual interface
By providing new and test controls in the visual interface, users can divide log configuration items into multiple configuration items for input and verify legality and verify, solving the problems of low efficiency and error-prone manual input, and improving logging Query accuracy and efficiency.
Patent Information
- Application Number
- CN202310722583.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-16
- Publication Date
- 2024-12-17
AI Technical Summary
When users manually enter configurations related to regular matches of logs, they are inefficient and error-prone, resulting in the inability to quickly and successfully match the logs they want to query.
Provide a user input verification method and device based on a visual interface. By adding new controls and test controls in the input box, users can divide configuration items into multiple configuration items for input, and verify legality based on preset verification rules. , automatically assemble content and call the log regular matching verification module of the backend for verification.
It simplifies user input operations, improves input efficiency, promptly detects and corrects input errors, avoids manual assembly errors and delayed repair problems, and ensures the correctness of log regular matching configurations.
Smart Images

Figure CN119148916A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for verifying user input based on a visual interface. Background Art
[0002] Generally, when a device or application is running, it can generate logs to record the running status. When users want to query these logs, they can enter the configuration related to the regular matching of the logs and submit it to the log query system. The log query system will perform regular matching on the configuration entered by the user and display the matched logs to the user.
[0003] However, currently, when users input configurations related to regular matching of logs, they often need to input them manually. Manual input is not only inefficient but also prone to input errors, resulting in failure to quickly and successfully match the desired logs. Summary of the invention
[0004] The embodiments of the present application provide a user input verification method and device based on a visual interface, which are used to solve the problem that when users manually input configurations related to regular matching of logs, the input efficiency is low and errors are prone to occur, resulting in the inability to quickly and successfully match logs.
[0005] To solve the above technical problems, the embodiments of the present application are implemented as follows:
[0006] In a first aspect, a user input verification method based on a visual interface is proposed, wherein the visual interface displays an input box, a new control, and a test control, and the method comprises:
[0007] When receiving a click operation of the user on the newly added control, adding a new row of configuration to the input box, the row of configuration including multiple configuration items related to the regular matching of the log;
[0008] Upon receiving first content input by the user based on the multiple configuration items, verifying the legitimacy of the first content based on preset verification rules;
[0009] When receiving the user's click operation on the test control, the content in the input box is automatically assembled and the back-end log regular matching verification module is called to perform log regular matching verification on the assembled target content.
[0010] In a second aspect, a user input verification device based on a visual interface is proposed, wherein the visual interface displays an input box, a new control, and a test control, and the device comprises:
[0011] A new module is added, when receiving a click operation of the user on the new control, adding a new line of configuration in the input box, wherein the line of configuration includes multiple configuration items related to the regular matching of the log;
[0012] a verification module, which, upon receiving the first content input by the user based on the multiple configuration items, verifies the legitimacy of the first content based on preset verification rules;
[0013] The test module, when receiving the user's click operation on the test control, automatically assembles the content in the input box and calls the back-end log regular matching verification module to perform log regular matching verification on the assembled target content.
[0014] In a third aspect, an electronic device is provided, the electronic device comprising:
[0015] Processor; and
[0016] A memory arranged to store computer executable instructions which, when executed, cause the processor to:
[0017] When a user clicks on a newly added control, a new row of configuration is added to the input box, where the row of configuration includes multiple configuration items related to regular matching of logs;
[0018] Upon receiving first content input by the user based on the multiple configuration items, verifying the legitimacy of the first content based on preset verification rules;
[0019] When receiving the user's click operation on the test control, the content in the input box is automatically assembled and the back-end log regular matching verification module is called to perform log regular matching verification on the assembled target content.
[0020] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by an electronic device including a plurality of application programs, the electronic device performs the following method:
[0021] When a user clicks on a newly added control, a new row of configuration is added to the input box, where the row of configuration includes multiple configuration items related to regular matching of logs;
[0022] Upon receiving first content input by the user based on the multiple configuration items, verifying the legitimacy of the first content based on preset verification rules;
[0023] When receiving the user's click operation on the test control, the content in the input box is automatically assembled and the back-end log regular matching verification module is called to perform log regular matching verification on the assembled target content.
[0024] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:
[0025] The embodiment of the present application can divide the configuration related to the regular matching of the log into multiple configuration items, and provide a new control in the visual input interface. When the user wants to enter content in the input box to query the log, a new row of configuration can be added to the input box by clicking the new control. The new row of configuration includes multiple configuration items related to the regular matching of the log. The user can enter content in the input box based on multiple configuration items, which can simplify the user's input operation and improve input efficiency. When the user enters the first content based on multiple configuration items, the legality of the first content can be verified based on the preset verification rules, so that when the content entered by the user is incorrect, it can be corrected in time. In addition, a test control can be provided in the visual input interface. By clicking the test control, the user can automatically assemble the input content and call the back-end log regular matching verification module to perform log regular matching verification on the assembled target content. This can not only avoid the problem that users manually enter separators to assemble the input content and make mistakes, but also can test the input content in advance by calling the back-end log regular matching verification module, so as to timely find out whether the log regular matching configuration is correct, and avoid the problem that the log cannot be queried and delayed repair due to regular matching failure when it is actually submitted to the log query system. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0027] Figure 1 It is a flowchart of a user input verification method based on a visual interface according to an embodiment of the present application;
[0028] Figure 2 It is a flowchart of a user input verification method based on a visual interface according to an embodiment of the present application;
[0029] Figure 3 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application;
[0030] Figure 4 It is a structural diagram of a user input verification device based on a visual interface according to an embodiment of the present application. DETAILED DESCRIPTION
[0031] Currently, when users want to query logs, they can enter the configuration related to the regular matching of logs in the input box provided by the visual interface. Specifically, users can manually enter the configuration related to the regular matching of logs in the input box, and then manually enter delimiters, such as colons and double vertical bars, and assemble each configuration through delimiters. After the configuration is completed, it is saved and submitted to the log query system at runtime. The log query system will perform regular matching of the assembled content and display the matching results to the user to achieve the purpose of log query.
[0032] However, since the user manually inputs the configuration related to the regular matching of the log, the input efficiency is low and it is easy to have input errors. For example, the user manually inputs the separator, using colons and double vertical bars to mark the input configuration, and the colons and double vertical bars have uppercase and lowercase issues, so it is easy to make input errors and cause assembly errors; for example, the user's manual input method may generate a large number of repeated inputs, resulting in low input efficiency; for example, there is currently no verification capability for the content entered by the user, and when the user enters illegal characters, it cannot be detected in time; for example, after the user configuration is completed, the regular matching configuration of the log can only be verified when it is running (that is, submitted to the log query system). When the regular matching configuration of the log is incorrect, it will cause matching failure, and the matching log cannot be queried. In addition, since the regular matching configuration of the log is incorrect only when it is actually running, there is still the problem of not being able to find errors in time and delaying the repair of correctness.
[0033] It can be seen that currently, when users manually input configurations related to regular matching of logs, there are problems such as low input efficiency and easy errors, which leads to the problem that logs cannot be matched quickly and successfully.
[0034] In order to solve the above technical problems, the embodiments of the present application provide a user input verification method and device based on a visual interface. The technical solution can divide the configuration related to the regular matching of the log into multiple configuration items, and provide a new control in the visual input interface. When the user wants to enter content in the input box for log query, a new row of configuration can be added to the input box by clicking the new control. The new row of configuration includes multiple configuration items related to the regular matching of the log. The user can enter content in the input box based on multiple configuration items, which can simplify the user's input operation and improve input efficiency. When the user enters the first content based on multiple configuration items, the legality of the first content can be verified based on preset verification rules. Verification, so that when the user input is incorrect, it can be detected in time to avoid user input errors; in addition, a test control can be provided in the visual input interface. The user can automatically assemble the input content by clicking the test control and call the back-end log regular matching verification module to perform log regular matching verification on the assembled target content. This can not only avoid the problem of users manually entering separators to assemble the input content, which is prone to errors, but also can test the input content in advance by calling the back-end log regular matching verification module, so as to timely discover whether the log regular matching configuration is correct, and avoid the problem of regular matching failure when it is actually submitted to the log query system, resulting in the inability to query the log and delayed repair.
[0035] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0036] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0037] Figure 1 It is a flowchart of a user input verification method based on a visual interface according to an embodiment of the present application. Figure 1 The illustrated embodiment may be executed by a front-end module corresponding to the visualization interface, and may specifically include the following steps.
[0038] S102: When a user clicks on a newly added control, a new row of configuration is added to the input box, where the row of configuration includes multiple configuration items related to regular matching of logs.
[0039] In an embodiment of the present application, a user can enter a configuration related to a regular match of a log in a visualization interface to perform a log query. Compared to the current visualization interface, the visualization interface, on the basis of displaying an input box, also adds a new control and a test control. Among them, the input box is used to input a configuration related to a regular match of a log. The new control is used to add a new row of configuration, and the new row of configuration may include multiple configuration items related to the regular match of the log, and the multiple configuration items are used for the user to input content. The test control is used to automatically assemble the content in the input box and perform a regular match check on the assembled content of the log.
[0040] It should be noted that the display position and appearance of the above-mentioned new controls and test controls can be set according to actual needs and are not specifically limited here.
[0041] When an input box, a new control, and a test control are displayed in the visual interface, the user can click (such as single-click, double-click, etc.) the new control when entering the configuration related to the regular match of the log. When the front-end module receives a click operation on the new control by the user, it can add a new row of configuration in the input box, and the row of configuration can include multiple configuration items related to the regular match of the log. After displaying a row of configuration, the user can input content based on the multiple configuration items in the row of configuration. Among them, adding a new row of configuration in the input box based on the user's click operation on the new control can be achieved through data two-way binding technology.
[0042] Since the embodiment of the present application can divide the configuration related to the regular matching of the log into multiple configuration items and provide a new control in the visual input interface, when the user wants to enter content in the input box for log query, a new line of configuration can be added to the input box by clicking the new control, and content can be entered in the input box based on the multiple configuration items contained in the line of configuration. Therefore, the user's input operation can be simplified and the input efficiency can be improved.
[0043] Optionally, as an embodiment, the multiple configuration items included in the above-mentioned line of configuration may include a line type item, a matching variable item, and a data type item. The line type item is used to characterize the type of a line of configuration, which may be, for example, G at the beginning, M in the middle, or E at the end. The data type is used to characterize the data type of a line of configuration, which may be, for example, a string type, a Boolean type, etc. The matching variable item is used to characterize the variable item related to the regular matching of the log.
[0044] When a row configuration includes the above row type item, matching variable item, and data type item, the following steps may also be included:
[0045] When receiving a click operation on a row type item by the user, displaying a first drop-down box, the first drop-down box including a plurality of row type alternative items;
[0046] In case of receiving the second content input by the user in the matching variable item, displaying the alternative items including the second content;
[0047] When a click operation on a data type item is received from the user, a second drop-down box is displayed, which includes a plurality of data type options.
[0048] In this embodiment, considering that the row types and data types related to the regular matching of the log are limited, a drop-down box can be provided for the row type item and the data type item, and all possible row types and data types are displayed in the drop-down box for the user to choose, thereby simplifying the user's input operation and improving input efficiency. Specifically, when the user clicks on the row type item, the front-end module can pop up a first drop-down box based on the user's click operation, and the first drop-down box includes multiple row type options. The user can select one of the options according to actual needs to enter the row type configuration. When the user clicks on the data type item, the front-end module can pop up a second drop-down box based on the user's click operation, and the second drop-down box includes multiple data type options. The user can select one of the options according to actual needs to enter the data type configuration. Among them, the display position of the first drop-down box and the second drop-down box can be set according to actual needs. For example, the first drop-down box can be displayed above or below the row type item, and the second drop-down box can be displayed above or below the data type item.
[0049] Considering that there are many situations for the matching variable item, the flexibility is high, so the matching variable item can allow the user to manually input. In addition, considering that the matching variable has a certain regularity, in order to simplify the user operation, alternatives related to the input content can be displayed for the user to choose according to the content input by the user. Specifically, all possible matching variable items can be stored in a database. When the user enters content (hereinafter referred to as the second content for the sake of distinction) in the matching variable item, the matching variable containing the second content can be queried from the database and displayed in the visual interface, that is, the alternative items containing the second content are displayed in the visual interface, and the user can select one of the alternatives according to actual needs to enter the matching variable item.
[0050] In this way, by providing alternatives for the user to choose in the row type item, the matching variable item and the data type item, the user input can be simplified, input errors can be avoided and input efficiency can be improved.
[0051] It should be noted that, in actual applications, users can add multiple lines of configuration in the input box by adding controls. Each line of configuration can include the above-mentioned line type items, matching variable items and data type items. Here, only the example of a user entering a line of configuration by adding controls is used to illustrate.
[0052] Optionally, as an embodiment, in order to facilitate the user to delete the input configuration, a delete control may be displayed in the visual interface. When the user wants to delete a row of configuration, the user may click the delete control. After receiving the user's click operation on the delete control, the front-end module may delete a row of configuration. The deleted row of configuration may be a row of configuration selected by the user or a row of configuration where the input cursor is located. Deleting a row of configuration in the input box based on the user's click operation on the delete control may be achieved through the existing data two-way binding technology.
[0053] Since the user can flexibly add or delete a row of configuration in the input box by adding controls and deleting controls, user operations can be simplified and user input efficiency can be improved.
[0054] S104: When receiving first content input by the user based on multiple configuration items, verify the legitimacy of the first content based on preset verification rules.
[0055] For any row of configuration entered by the user in the input box, after receiving the content entered by the user based on multiple configuration items (hereinafter referred to as the first content for the sake of distinction), the front-end module can verify the legitimacy of the first content based on preset verification rules. The legitimacy verification of the first content can be real-time verification, that is, in the process of the user entering content based on each configuration item, each item of content entered by the user can be verified in real time based on the preset verification rules. Alternatively, after the user completes the input of a row of configuration, the legitimacy of the row of content entered by the user can be verified based on the preset verification rules, which is not specifically limited here.
[0056] Optionally, as an embodiment, verifying the legitimacy of the first content based on a preset verification rule may include at least one of the following:
[0057] Verifying whether the first content contains illegal characters;
[0058] Verifying whether the first content contains an empty configuration item;
[0059] The length of the first content is verified.
[0060] Illegal characters may be characters that are not allowed to be input, which can be set according to actual needs and are not specifically limited here. Empty configuration items may be one or more configuration items in a line of configuration in which the user has not entered any content. The length of the first content may be the character length of the first content, and optionally, may be the character length of the content entered in the matching variable item. Verifying the length of the first content may be verifying whether the character length of the first content exceeds a preset length, which can be set according to actual needs and is not specifically limited here.
[0061] It should be noted that, in other possible implementations, the legality verification of the first content may also be other verifications. The above only takes the verification of illegal characters, empty configuration items and length as an example, and no further examples are given here.
[0062] After the above-mentioned legality verification is performed on the first content, the verification result may include the cases of passing the verification and failing the verification. Among them, passing the verification may include the following three items: the first content does not contain illegal characters for verification; the first content does not contain empty configuration items; the length of the first content does not exceed the preset length, that is, the first content can be considered to have passed the verification only when these three items are met. Failed verification may include at least one of the following items: the first content contains illegal characters; the first content contains empty configuration items; the length of the first content exceeds the preset length, that is, as long as one of these three items is not met, the first content can be considered to have failed the verification.
[0063] If the first content verification fails, a prompt message may be generated, which may be used to prompt the user that the first content input is incorrect, so that the user can find the error in time and adjust the input content in time. There may be many ways to prompt the message, for example, the incorrectly input content may be displayed in red, or the incorrectly input content may be underlined, etc., which will not be described one by one here.
[0064] S106: When a user clicks on the test control, the content in the input box is automatically assembled and a log regular matching verification module in the backend is called to perform a log regular matching verification on the assembled target content.
[0065] When the legality of the content input by the user is verified and passed, the user can click the test control to test. When the front-end module receives the user's click operation on the test control, it can automatically assemble the content in the input box, and at the same time, it can also call the back-end log regular matching verification module to perform log regular matching verification on the assembled content (hereinafter referred to as target content for easy distinction).
[0066] In this way, by automatically assembling the content in the input box, it is possible to avoid the problem of users manually entering separators to assemble the input content, which is prone to errors. By calling the back-end log regular matching verification module to test the input content in advance, it is possible to promptly discover whether the regular matching configuration of the log is correct, avoiding the problem of regular matching failure when actually submitting to the log query system for log query, resulting in the inability to query the log and delayed repair.
[0067] The automatic assembly of the content in the input box may include automatically adding separators between multiple input configurations. Specifically, the following steps may be included:
[0068] Identify the configuration items contained in each line of configuration in the input box;
[0069] Add corresponding separators between the configuration items in each line according to the recognition results;
[0070] Assemble the contents of the input box based on the delimiter.
[0071] Since each row of configuration can be divided into multiple configuration items in the embodiment of the present application, the configuration items in each row of configuration can be automatically identified during automatic assembly, and then separators can be automatically added between the configuration items. In this way, since the input content can be automatically assembled without the user having to manually enter separators, the problem of log matching failure caused by assembly errors can be avoided.
[0072] The above-mentioned log regular matching module can be a module used to verify whether the regular matching configuration of the log is correct during actual operation. In the embodiment of the present application, considering that the legality verification of the input content in S104 cannot verify whether the regular matching configuration of the log is correct, therefore, in order to verify the regular matching of the log in time, avoid the failure of regular matching during actual operation, resulting in the inability to match the log and the delay correction problem of the input content, the log regular matching verification module of the back end can be called to perform regular matching verification of the log on the assembled target content. Among them, when calling the log regular matching verification module of the back end, asynchronous JS and XML interaction technology can be used to implement it.
[0073] Optionally, as an embodiment, after calling the back-end log regular matching verification module to perform log regular matching verification on the assembled target content, the back-end log regular matching verification module can return the verification result to the front-end module, and the front-end module can display the verification result in a visual interface after receiving the verification result. Among them, the verification result can be a verification pass or a verification failure. Optionally, in the case where the verification result is a verification failure, the verification result can also include detailed information on the verification failure, such as the reason for the verification failure.
[0074] If the verification fails, the user can adjust the content in the input box. After the adjustment, the user can click the test control to perform a regular matching verification of the log on the adjusted content until the verification result is passed. In this way, the problem of delayed correction can be avoided.
[0075] If the verification is passed, the user can click the submit control in the visual interface. After receiving the user's click operation on the submit control, the front-end module can submit the verified content to the log query system for log query. Since the content submitted to the log query system is the content that has passed the regular match verification of the log, it can successfully match the log you want to query, meeting the user's log query needs.
[0076] The technical solution provided in the embodiment of the present application can divide the configuration related to the regular matching of the log into multiple configuration items, and provide a new control in the visual input interface. When the user wants to enter content in the input box for log query, a new row of configuration can be added to the input box by clicking the new control. The new row of configuration includes multiple configuration items related to the regular matching of the log. The user can enter content in the input box based on multiple configuration items, which can simplify the user's input operation and improve input efficiency. When the user enters the first content based on multiple configuration items, the legality of the first content can be verified based on the preset verification rules. In this way, when the content entered by the user is incorrect, It can be detected in time to avoid user input errors. In addition, a test control can be provided in the visual input interface. By clicking the test control, the user can automatically assemble the input content and call the back-end log regular matching verification module to perform log regular matching verification on the assembled target content. This can not only avoid the problem of users manually entering separators to assemble the input content, which is prone to errors, but also can test the input content in advance by calling the back-end log regular matching verification module, so as to timely discover whether the log regular matching configuration is correct, and avoid the problem of regular matching failure when it is actually submitted to the log query system, resulting in the inability to query the log and delayed repair.
[0077] To facilitate understanding of the technical solutions provided in the embodiments of the present application, please refer to Figure 2 The embodiment shown. Figure 2 The embodiment shown is Figure 1 The embodiments shown belong to the same inventive concept, Figure 2 The illustrated embodiment may include the following steps.
[0078] S201: When a user clicks on a newly added control, a new row of configuration is added to the input box, where the row of configuration includes a row type item, a matching variable item, and a data type item.
[0079] S202: When a click operation on a row type item is received from the user, a first drop-down box is displayed, wherein the first drop-down box includes a plurality of row type options.
[0080] S203: When receiving the second content input by the user in the matching variable item, displaying the candidate items including the second content.
[0081] S204: When receiving a click operation on a data type item from the user, display a second drop-down box, wherein the second drop-down box includes a plurality of data type options.
[0082] S205: When a click operation on the delete control is received, a row of configuration is deleted.
[0083] It should be noted that, in actual applications, the user can input one or more lines of configuration through the above S201 to S204, and the input method of each line of configuration is the same, and delete one or more lines of configuration through the above S205, thereby realizing dynamic configuration. Among them, the above S205 is optional, that is, the user can choose not to execute S205 when there is no need to delete the configuration.
[0084] S206: For any row of configuration, when receiving first content input by the user based on multiple configuration items, perform legality verification on the first content based on preset verification rules.
[0085] Verifying the legitimacy of the first content based on a preset verification rule may include at least one of the following:
[0086] Verifying whether the first content contains illegal characters;
[0087] Verifying whether the first content contains an empty configuration item;
[0088] The length of the first content is verified.
[0089] If the verification is successful, the user may continue to input through the above S201 to S204, or, if the user completes the input, S207 may be executed.
[0090] S207: When receiving a click operation on the test control by the user, the content in the input box is automatically assembled and the log regular matching verification module in the backend is called to perform a log regular matching verification on the assembled target content.
[0091] S208: Receive the verification result sent by the log regular expression matching verification module and display the verification result.
[0092] The verification results can include verification passed and verification failed. If the verification passes, the user can click the submit control to submit the verified content to the log query system for log query. If the verification fails, the user can adjust the content in the input box and continue to click the test control for verification until the verification passes.
[0093] The specific implementation of the above S201 to S208 can be found in Figure 1 The specific implementation methods of the corresponding steps in the illustrated embodiment will not be repeated here.
[0094] The dynamic configuration and automatic assembly part of the technical solution provided in the embodiment of the present application adopts the two-way data binding technology to establish a two-way data channel between the model layer and the view layer. When either of the two layers changes, the other layer will automatically make corresponding changes immediately. Based on this technology, the program function is used as a control transfer station to achieve the realization of dynamic configuration and automatic assembly functions. The legality verification part adopts the form verification technology. When the form is submitted, the input content can be passed into the preset verification function (i.e., the preset verification rule) for verification. If the verification is passed, the subsequent test steps are allowed. Otherwise, a specific error message is prompted and the test is blocked, thereby meeting the technical requirements for ensuring the correctness of the input items. The back-end visual real-time detection part adopts asynchronous JS and XML interaction technology. On the basis of not changing the page path, the back-end log regular matching verification module is called to partially update the view layer. Based on this technology, the program function is used as a control transfer station to achieve the realization of the visual real-time detection function.
[0095] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0096] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 3 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0097] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0098] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0099] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a user input verification device based on a visual interface at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0100] When a user clicks on a newly added control, a new row of configuration is added to the input box, where the row of configuration includes multiple configuration items related to regular matching of logs;
[0101] Upon receiving first content input by the user based on the multiple configuration items, verifying the legitimacy of the first content based on preset verification rules;
[0102] When receiving the user's click operation on the test control, the content in the input box is automatically assembled and the back-end log regular matching verification module is called to perform log regular matching verification on the assembled target content.
[0103] The above application Figure 3The method performed by the user input verification device based on the visual interface disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0104] The electronic device may also perform Figure 1 and Figure 2 The method is to realize a user input verification device based on a visual interface. Figure 1 and Figure 2 The functions in the illustrated embodiment will not be described in detail in the embodiments of the present application.
[0105] Of course, in addition to software implementation, the electronic device of the present application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0106] The embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to execute Figure 1 and Figure 2The method of the embodiment shown is specifically used to perform the following operations:
[0107] When a user clicks on a newly added control, a new row of configuration is added to the input box, where the row of configuration includes multiple configuration items related to regular matching of logs;
[0108] Upon receiving first content input by the user based on the multiple configuration items, verifying the legitimacy of the first content based on preset verification rules;
[0109] When receiving the user's click operation on the test control, the content in the input box is automatically assembled and the back-end log regular matching verification module is called to perform log regular matching verification on the assembled target content.
[0110] Figure 4 This is a schematic diagram of the structure of a user input verification device 40 based on a visual interface according to an embodiment of the present application. Figure 4 In a software implementation, the visual interface displays an input box, a new control, and a test control. The user input verification device 40 based on the visual interface may include: a new module 41, a verification module 42, and a test module 43, wherein:
[0111] A new module 41, when receiving a click operation of the user on the new control, adds a new line of configuration in the input box, wherein the line of configuration includes multiple configuration items related to the regular matching of the log;
[0112] A verification module 42, upon receiving the first content input by the user based on the multiple configuration items, performs legality verification on the first content based on preset verification rules;
[0113] The test module 43, when receiving the user's click operation on the test control, automatically assembles the content in the input box and calls the back-end log regular matching verification module to perform log regular matching verification on the assembled target content.
[0114] Optionally, the multiple configuration items include a row type item, a matching variable item and a data type item; wherein the newly added module 41 further includes:
[0115] When receiving a click operation of the user on the row type item, displaying a first drop-down box, wherein the first drop-down box includes a plurality of row type alternative items;
[0116] In case of receiving the second content input by the user in the matching variable item, displaying an alternative item including the second content;
[0117] When a click operation on the data type item is received from the user, a second drop-down box is displayed, wherein the second drop-down box includes a plurality of data type options.
[0118] Optionally, the verification module 42 verifies the legitimacy of the first content based on a preset verification rule, including at least one of the following:
[0119] Verifying whether the first content contains illegal characters;
[0120] Verifying whether the first content contains an empty configuration item;
[0121] The length of the first content is verified.
[0122] Optionally, the verification module 42 generates prompt information when determining that the first content fails the verification, wherein the prompt information is used to prompt that the first content is incorrect;
[0123] Wherein, the failure of the first content verification includes at least one of the following:
[0124] The first content contains illegal characters;
[0125] The first content includes an empty configuration item;
[0126] The length of the first content exceeds a preset length.
[0127] Optionally, the visual interface further includes a deletion control, and the device further includes a deletion module 44;
[0128] The deleting module 44 deletes a row of configuration when receiving a click operation on the delete control.
[0129] Optionally, the test module 43 automatically assembles the content in the input box, including:
[0130] Identify the configuration items contained in each row of configuration in the input box;
[0131] Add corresponding separators between the configuration items in each line according to the recognition results;
[0132] The content in the input box is assembled based on the separator.
[0133] Optionally, the test module 43, after calling the log regular matching verification module of the backend to perform log regular matching verification on the assembled target content, receives the verification result sent by the log regular matching verification module;
[0134] The verification result is displayed so that the user can adjust the content in the input box based on the verification result.
[0135] The user input verification device 40 based on the visual interface provided in the embodiment of the present application can also execute Figure 1 and Figure 2 The method is to realize a user input verification device based on a visual interface. Figure 1 and Figure 2 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.
[0136] In short, the above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0137] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0138] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0139] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0140] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
Claims
1. A user input verification method based on a visual interface, characterized in that: The visual interface displays an input box, a new control, and a test control, and the method includes: When receiving a click operation of the user on the newly added control, adding a new row of configuration to the input box, the row of configuration including multiple configuration items related to the regular matching of the log; Upon receiving first content input by the user based on the multiple configuration items, verifying the legitimacy of the first content based on preset verification rules; When receiving the user's click operation on the test control, the content in the input box is automatically assembled and the back-end log regular matching verification module is called to perform log regular matching verification on the assembled target content.
2. The method according to claim 1, characterized in that The multiple configuration items include a row type item, a matching variable item, and a data type item; wherein the method further includes: When receiving a click operation of the user on the row type item, displaying a first drop-down box, wherein the first drop-down box includes a plurality of row type alternative items; In case of receiving the second content input by the user in the matching variable item, displaying an alternative item including the second content; When a click operation on the data type item is received from the user, a second drop-down box is displayed, wherein the second drop-down box includes a plurality of data type options.
3. The method according to claim 1, characterized in that The first content is subjected to a legality verification based on a preset verification rule, including at least one of the following: Verifying whether the first content contains illegal characters; Verifying whether the first content contains an empty configuration item; The length of the first content is verified.
4. The method according to claim 3, characterized in that The method further comprises: If it is determined that the first content fails verification, generating prompt information, wherein the prompt information is used to prompt that the first content is incorrect; Wherein, the failure of the first content verification includes at least one of the following: The first content contains illegal characters; The first content includes an empty configuration item; The length of the first content exceeds a preset length.
5. The method according to claim 1, characterized in that The visual interface also includes a delete control, and the method further includes: When a click operation on the delete control is received, a row of configuration is deleted.
6. The method according to claim 1, characterized in that Automatically assembling the content in the input box, including: Identify the configuration items contained in each row of configuration in the input box; Add corresponding separators between the configuration items in each line according to the recognition results; The content in the input box is assembled based on the separator.
7. The method according to claim 1, characterized in that After calling the log regular matching verification module of the backend to perform log regular matching verification on the assembled target content, the method further includes: Receive the verification result sent by the log regular expression matching verification module; The verification result is displayed so that the user can adjust the content in the input box based on the verification result.
8. A user input verification device based on a visual interface, characterized in that: The visual interface displays an input box, a new control, and a test control, and the device includes: A new module is added, when receiving a click operation of the user on the new control, adding a new line of configuration in the input box, wherein the line of configuration includes multiple configuration items related to the regular matching of the log; a verification module, which, upon receiving the first content input by the user based on the multiple configuration items, verifies the legitimacy of the first content based on preset verification rules; The test module, when receiving the user's click operation on the test control, automatically assembles the content in the input box and calls the back-end log regular matching verification module to perform log regular matching verification on the assembled target content.
9. An electronic device, characterized in that: include: processor; as well as A memory arranged to store computer executable instructions which, when executed, cause the processor to: When a user clicks on a newly added control, a new row of configuration is added to the input box, where the row of configuration includes multiple configuration items related to regular matching of logs; Upon receiving first content input by the user based on the multiple configuration items, verifying the legitimacy of the first content based on preset verification rules; When receiving the user's click operation on the test control, the content in the input box is automatically assembled and the back-end log regular matching verification module is called to perform log regular matching verification on the assembled target content.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, which, when executed by an electronic device including a plurality of application programs, cause the electronic device to perform the following method: When a user clicks on a newly added control, a new row of configuration is added to the input box, where the row of configuration includes multiple configuration items related to regular matching of logs; Upon receiving first content input by the user based on the multiple configuration items, verifying the legitimacy of the first content based on preset verification rules; When receiving the user's click operation on the test control, the content in the input box is automatically assembled and the back-end log regular matching verification module is called to perform log regular matching verification on the assembled target content.
