Editing method, device, computer equipment and storage medium for screen detection application
By using the visual editing interface in the screen detection application to obtain the function type and detection scheme parameters, and generate application code, it solves the problem of low code writing efficiency for non-professional programmers and improves the efficiency of code generation and output.
Patent Information
- Application Number
- CN202011418987.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-07
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-12-07
AI Technical Summary
Non-professional programmers are less efficient when writing and modifying screen detection application code, resulting in limited development and maintenance efficiency.
An editing method for screen detection applications is provided. By displaying a visual editing interface, the function type and detection scheme parameters are obtained, the application code is generated, and the difficulty of writing code is reduced, so that non-professional programmers can participate in code writing.
It improves the efficiency of code generation and output, reduces the requirements for programmers, enables non-professional programmers to participate in code writing, and simplifies the code writing process.
Smart Images

Figure CN112506501B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an editing method, device, computer equipment and storage medium for screen detection applications. Background Art
[0002] With the continuous development and update of electronic screens, screen manufacturers have put forward higher and higher requirements on the stability and development and maintenance efficiency of screen detection applications, which also poses great challenges to the developers and maintainers of screen detection applications.
[0003] In traditional technology, professional programmers usually write the running code of the screen detection application. However, due to the shortage of talents in the industry, more and more non-professional programmers have to participate in the writing and modification of the screen detection application code.
[0004] However, for non-professional programmers, it is very difficult to write and modify the screen detection application code, which leads to low efficiency in writing and modifying the code. Summary of the invention
[0005] Based on this, it is necessary to provide a screen detection application editing method, device, computer equipment and storage medium that can improve development efficiency to address the problem of low efficiency in writing and modifying screen detection application code by non-professional programmers in the above-mentioned traditional technology.
[0006] A method for editing a screen detection application, the method comprising:
[0007] In response to an editing instruction for the screen detection application, displaying a visual editing interface;
[0008] Acquire a function type of the screen detection application, and display a control area corresponding to the function type of the screen detection application in the visual editing interface;
[0009] Acquire a detection scheme of the screen detection application, and determine scheme parameters corresponding to the detection scheme in the control area;
[0010] Based on the scheme parameters determined in the control area, application code of the screen detection application is generated.
[0011] In one of the embodiments, it also includes: loading the application code of the screen detection application in a code editor and displaying the application code; obtaining a modification instruction for the application code, and modifying the application code in the code editor based on the modification instruction to obtain a modified application code.
[0012] In one of the embodiments, it also includes: generating and displaying a timing diagram of the scheme parameters according to the scheme parameters corresponding to the detection scheme loaded in the control area, wherein the timing diagram is generated according to the parameters related to the timing in the scheme parameters.
[0013] In one of the embodiments, the obtaining of the detection scheme of the screen detection application and determining the scheme parameters corresponding to the detection scheme in the control area include: selecting the detection scheme corresponding to the screen detection application from a preconfigured scheme list, and loading the scheme parameters corresponding to the selected detection scheme in the control area; or, if the detection scheme corresponding to the screen detection application does not exist in the preconfigured scheme list, obtaining the external storage path of the detection scheme corresponding to the screen detection application, and loading the scheme parameters of the detection scheme into the control area based on the external storage path; or, if the detection scheme corresponding to the screen detection application does not exist in the preconfigured scheme list and there is no external storage path for the detection scheme corresponding to the screen detection application, obtaining corresponding parameter information based on the control area, using the parameter information as the scheme parameters, and generating a detection scheme corresponding to the screen detection application.
[0014] In one of the embodiments, the detection scheme includes a signal-based detection scheme; before selecting the detection scheme corresponding to the screen detection application from the pre-configured scheme list, the method also includes: obtaining a signal mode and corresponding signal parameters; establishing an association relationship between the signal mode and the corresponding signal parameters, and generating a corresponding detection scheme based on the association relationship; and adding the detection scheme to the scheme list.
[0015] In one of the embodiments, the detection scheme includes a power-based detection scheme; before selecting the detection scheme corresponding to the screen detection application from the pre-configured scheme list, the method also includes: obtaining a power mode and corresponding power parameters; establishing an association relationship between the power mode and the corresponding power parameters, and generating a corresponding detection scheme based on the association relationship; and adding the detection scheme to the scheme list.
[0016] In one of the embodiments, the detection scheme includes a picture-based detection scheme; before selecting the detection scheme corresponding to the screen detection application from the pre-configured scheme list, the method also includes: obtaining loaded picture resources, and generating a preview image based on the loaded picture resources; in response to an action editing instruction for the preview image, obtaining action parameters of the preview image; establishing an association relationship between the preview image and the corresponding action parameters, and generating a corresponding detection scheme based on the association relationship; and adding the detection scheme to the scheme list.
[0017] A device for editing a screen detection application, the device comprising:
[0018] A display module, for displaying a visual editing interface in response to an editing instruction for a screen detection application;
[0019] An acquisition module, used for acquiring a function type of the screen detection application, and displaying a control area corresponding to the function type of the screen detection application in the visual editing interface;
[0020] A determination module, used to obtain a detection scheme of the screen detection application, and determine scheme parameters corresponding to the detection scheme in the control area;
[0021] A code generation module is used to generate application code for the screen detection application based on the solution parameters determined in the control area.
[0022] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0023] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.
[0024] The above-mentioned screen detection application editing method, device, computer equipment and storage medium, by responding to the editing instruction of the screen detection application, displaying a visual editing interface, and obtaining the function type of the screen detection application, displaying the control area corresponding to the function type of the screen detection application in the visual editing interface, and then obtaining the detection scheme of the screen detection application, loading the scheme parameters corresponding to the detection scheme in the control area, and generating the application code of the screen detection application based on the scheme parameters determined in the control area. Since the editing process of the screen detection application in this embodiment is completed in the visual editing interface, rather than direct code writing in the traditional technology, the requirements for code writers are relatively low, so that non-professional programmers can also participate in the code writing of the screen detection application, and improve the efficiency of code generation and output. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 A schematic diagram of a flow chart of a method for editing a screen detection application in one embodiment;
[0026] Figure 2 is a flow chart of a method for editing a screen detection application in another embodiment;
[0027] Figure 3 A schematic flow chart of steps for generating a signal-based detection scheme in one embodiment;
[0028] Figure 4 A schematic diagram of a flow chart of steps for generating a power-based detection scheme in one embodiment;
[0029] Figure 5 A schematic diagram of a flow chart of steps for generating a picture-based detection solution in an embodiment;
[0030] Figure 6 is a structural block diagram of an editing device for a screen detection application in one embodiment;
[0031] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0033] In one embodiment, Figure 1 As shown, a method for editing a screen detection application is provided. This embodiment uses the method applied to a terminal as an example. It can be understood that the terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. In this embodiment, the method includes the following steps:
[0034] Step 102: Display a visual editing interface in response to an editing instruction applied to the screen detection.
[0035] Among them, the screen detection application is an executable code that runs in the screen inspection machine to detect the electronic screen. Usually, the executable code is a source file written by professional programmers in a language supported by the development tool. It is a set of ordered numbers or letters, and is a symbol representing an objective entity and its attributes. The editing instruction is an instruction or command to edit or modify the screen detection application. The visual editing interface is an interface of a rich information text editor that provides "visualization" or "what you see is what you get". Specifically, the visual editing interface can be implemented using the Lua scripting language.
[0036] In this embodiment, in order to enable non-professional programmers to efficiently participate in the code writing of the screen detection application, an editing instruction for the screen detection application can be initiated through the terminal, and the terminal responds to the editing instruction and displays a visual editing interface, thereby providing a more friendly editing method for editing or modifying the screen detection application.
[0037] Step 104 , obtaining the function type of the screen detection application, and displaying a control area corresponding to the function type of the screen detection application in the visual editing interface.
[0038] Among them, the function type refers to a category or identification that distinguishes multiple functions according to different properties. Specifically, the function type of the screen detection application refers to the category or identification of the function that the screen detection application needs to achieve. The control area is an object area with which the user can interact to input or operate data. It can be understood that the control area has a corresponding relationship with the function type of the screen detection application, that is, each function type of the screen detection application has a corresponding control area. In this embodiment, by obtaining the function type of the screen detection application, the control area corresponding to the function type is displayed in the visual editing interface.
[0039] Step 106, obtaining a detection scheme of the screen detection application, and determining scheme parameters corresponding to the detection scheme in the control area.
[0040] Among them, the detection scheme is a specific and operational detection plan deployed from the aspects of detection purpose, detection requirements, detection methods, etc., which specifically includes signal-based detection plans, power-based detection plans, and image-based detection plans. The scheme parameters are the operation data corresponding to the detection scheme, that is, the specific parameter values of the detection purpose, detection requirements, and detection methods. In this embodiment, by obtaining the detection scheme of the screen detection application, the scheme parameters corresponding to the detection scheme are loaded in the control area.
[0041] Step 108: Generate application code for the screen detection application based on the solution parameters determined in the control area.
[0042] In this embodiment, based on the control area displayed in the above-mentioned visual editing interface and the solution parameters corresponding to the detection solution loaded in the control area, the application code of the screen detection application is generated, that is, the application code corresponding to the screen detection application is obtained by converting from the visual editing interface to the code.
[0043] The above-mentioned editing method of the screen detection application, by responding to the editing instruction of the screen detection application, displays a visual editing interface, obtains the function type of the screen detection application, displays the control area corresponding to the function type of the screen detection application in the visual editing interface, and then obtains the detection scheme of the screen detection application, loads the scheme parameters corresponding to the detection scheme in the control area, and generates the application code of the screen detection application based on the control area and the scheme parameters corresponding to the detection scheme loaded in the control area. Since the editing process of the screen detection application in this embodiment is completed in the visual editing interface instead of direct code writing in the traditional technology, the requirements for code writers are relatively low, so that non-professional programmers can also participate in the code writing of the screen detection application, and the efficiency of code generation and output is improved.
[0044] In one embodiment, Figure 2 As shown, after generating the application code of the screen detection application, the above method further includes the following steps:
[0045] Step 202: Load the application code of the screen detection application in the code editor and display the application code.
[0046] The code editor is a development tool used to edit application code during application development. In this embodiment, the code editor may be an open source Lua code editor. Specifically, by loading the application code of the screen detection application generated above into the code editor, the application code may be displayed through the code editor to facilitate previewing and modification of the application code.
[0047] Step 204 , obtaining a modification instruction for the application code, and modifying the application code in a code editor based on the modification instruction to obtain a modified application code.
[0048] The modification instruction refers to an instruction or command to modify the application code. In this embodiment, when a modification instruction for the displayed application code is obtained, the application code can also be modified in the code editor according to the modification instruction. For example, the arrangement of numbers or letters in the application code can be modified, or numbers or letters in the application code can be deleted or added, so as to obtain the modified application code.
[0049] In the above embodiment, the application code of the screen detection application is loaded in the code editor, and the application code is displayed. By obtaining the modification instruction of the application code, the application code is modified in the code editor based on the modification instruction, thereby obtaining the modified application code. Not only the convenience of upgrading and revising the application code is improved, but also, for professional programmers, the generated application code can be modified and checked without changing the original programming habits, thereby improving the code development efficiency to a certain extent.
[0050] In one embodiment, after the scheme parameters corresponding to the detection scheme are loaded in the control area, the above-mentioned method further includes: generating and displaying a timing diagram of the scheme parameters according to the scheme parameters corresponding to the detection scheme loaded in the control area. Among them, the timing diagram of the present application is an interactive diagram that has a dynamic change effect and can reflect the timing relationship based on the change of the scheme parameters in the detection scheme. Specifically, the timing diagram can be displayed in the form of a timing diagram control, and the timing diagram control is a control for displaying the timing diagram. In the present embodiment, based on the scheme parameters corresponding to the detection scheme loaded in the control area, a timing diagram with a dynamic change effect and a timing relationship is generated, and displayed in the timing diagram control.
[0051] In one embodiment, in the above step 106, a detection scheme for a screen detection application is obtained, and scheme parameters corresponding to the detection scheme are loaded in the control area. Specifically, the following may be included: a detection scheme corresponding to the screen detection application is selected from a pre-configured scheme list, and scheme parameters corresponding to the selected detection scheme are loaded in the control area; or, if the detection scheme corresponding to the screen detection application does not exist in the pre-configured scheme list, an external storage path of the detection scheme corresponding to the screen detection application is obtained, and scheme parameters of the detection scheme are loaded into the control area based on the external storage path; or, if the detection scheme corresponding to the screen detection application does not exist in the pre-configured scheme list, and there is no external storage path for the detection scheme corresponding to the screen detection application, corresponding parameter information is obtained based on the control area, and the parameter information is used as scheme parameters to generate a detection scheme corresponding to the screen detection application.
[0052] For example, the detection scheme includes a signal-based detection scheme, such as Figure 3 As shown, before selecting a detection scheme corresponding to the screen detection application from the pre-configured scheme list, the method further includes:
[0053] Step 302: Acquire the signal mode and corresponding signal parameters.
[0054] Among them, the signal mode refers to the signal transmission standard used when detecting the electronic screen, for example, including but not limited to EDP (Embedded Display Port) mode, V-BY-ONE (which refers to the signal transmission interface standard suitable for the display) mode, etc. Signal parameters refer to the parameter values corresponding to the signal mode. Specifically, the signal parameters include the common parameters and unique parameters of the signal mode, among which the common parameters are parameters that will be used in any signal mode, such as the signal interface type, signal output mode, and signal polarity settings, etc., and the unique parameters can reflect the differences between different signal modes. For example, for the EDP mode, its unique parameters need to select whether the port is DP-STD or DP-JAE; for the V-BY-ONE mode, it is necessary to fill in LANE (number of signal channels), such as 8, 16, 32 or 64.
[0055] Step 304: Establish an association relationship between the signal pattern and the corresponding signal parameter, and generate a corresponding detection scheme based on the association relationship.
[0056] Specifically, based on the signal pattern and the corresponding signal parameters obtained above, an association relationship between the two can be established, and a corresponding signal-based detection scheme can be generated according to the established association relationship.
[0057] Step 306: Add the detection scheme to the scheme list.
[0058] In this embodiment, by obtaining the signal mode and the corresponding signal parameters, and establishing the association relationship between the signal mode and the corresponding signal parameters, a corresponding detection scheme is generated based on the association relationship, and the detection scheme is added to the scheme list, thereby completing the configuration of the scheme list. In the process of visual editing of the screen detection application, the required detection scheme can be obtained through the configured scheme list, and then the scheme parameters corresponding to the detection scheme are loaded, thereby greatly improving the editing efficiency of the screen detection application.
[0059] In the above embodiment, a related signal timing diagram can also be generated according to the acquired signal mode and the corresponding signal parameters, and displayed in the timing diagram control. Specifically, the signal timing diagram can simulate a display screen of a preset shape, and generate graphics of different shapes that can reflect the timing relationship based on the corresponding signal parameters, so that the editor can intuitively see the timing relationship of the signal.
[0060] Furthermore, the detection scheme may also include a detection scheme based on power supply. Figure 4 As shown, before selecting a detection scheme corresponding to the screen detection application from the pre-configured scheme list, the method further includes:
[0061] Step 402, obtaining a power mode and corresponding power parameters.
[0062] Among them, the power mode refers to the parameter control that dynamically adds or deletes the power supply part. The power supply parameters refer to the parameter values of the input corresponding parameter controls. Specifically, the parameter controls of the power supply part include the parameter controls of the VIO part of the communication signal and the parameter controls of the GPIO (General-purpose input / output) part, as well as the classification controls of the output adjustable power supply of the screen inspection machine and the backlight drive power supply. The power supply parameters include specific parameter values such as power supply channel, enable alarm, voltage value, current value, upper and lower limit protection values, and switch power delay time.
[0063] Step 404: establishing an association relationship between the power mode and the corresponding power parameter, and generating a corresponding detection scheme based on the association relationship.
[0064] Specifically, based on the power mode and the corresponding power parameters obtained above, an association relationship between the two can be established, and a corresponding power-based detection solution can be generated according to the established association relationship.
[0065] Step 406, adding the detection scheme to the scheme list.
[0066] In this embodiment, by obtaining the power mode and the corresponding power parameters, and establishing an association relationship between the power mode and the corresponding power parameters, a corresponding detection scheme is generated based on the association relationship, and the detection scheme is added to the scheme list, thereby completing the configuration of the scheme list. In the process of visual editing of the screen detection application, the required detection scheme can be obtained through the configured scheme list, and then the scheme parameters corresponding to the detection scheme are loaded, thereby greatly improving the editing efficiency of the screen detection application.
[0067] In the above embodiment, a related power timing diagram can also be generated according to the acquired power mode and the corresponding power parameters, and displayed in the timing diagram control. Specifically, the power timing diagram can form a line graph according to the startup delay and shutdown delay of each power parameter, because the startup delay and shutdown delay of each power parameter are usually in a sequential relationship, so the editor can intuitively see the startup sequence and shutdown sequence of all parameters through the timing diagram generated by each power parameter.
[0068] Furthermore, the detection scheme may also include a picture-based detection scheme, such as Figure 5 As shown, before selecting a detection scheme corresponding to the screen detection application from the pre-configured scheme list, the method further includes:
[0069] Step 502: Obtain loaded image resources, and generate a preview image based on the loaded image resources.
[0070] The image resource refers to the image data needed to be used in the process of detecting the electronic screen. The process of loading the image resource can be the process of importing the image resource. In this embodiment, a preview image is generated based on the loaded image resource and displayed through a visual editing interface.
[0071] Step 504: in response to the action editing instruction for the preview image, obtain the action parameters of the preview image.
[0072] Among them, the action editing instruction refers to the action instruction or command set for the preview image. For example, the action editing instruction includes adding a delay time, such as 1s, before the image is displayed, so that the device will wait for the delay time before displaying the image after receiving the command; the action editing instruction also includes waiting for a preset time after displaying the image, and rotating the image when the preset time arrives; the action editing instruction also includes editing the display order of the image, etc. The action parameters are the corresponding action parameters obtained based on the action editing instruction, such as the time parameters of the delayed display, etc. In this embodiment, the action parameters for the preview image are obtained by responding to the action editing instruction for the preview image.
[0073] Step 506: Establish an association relationship between the preview image and the corresponding action parameter, and generate a corresponding detection solution based on the association relationship.
[0074] Specifically, based on the preview image obtained above and the corresponding action parameters, an association relationship between the two can be established, and a corresponding image-based detection solution can be generated according to the established association relationship.
[0075] Step 508: Add the detection scheme to the scheme list.
[0076] In this embodiment, by acquiring loaded image resources, generating a preview image based on the loaded image resources, responding to the action editing instruction of the preview image, and acquiring the action parameters of the preview image, an association relationship between the preview image and the corresponding action parameters is established, a corresponding detection scheme is generated based on the association relationship, and the detection scheme is added to the scheme list, thereby completing the configuration of the scheme list. In the process of visual editing of the screen detection application, the required detection scheme can be obtained through the configured scheme list, and then the scheme parameters corresponding to the detection scheme are loaded, thereby greatly improving the editing efficiency of the screen detection application.
[0077] In one embodiment, after the corresponding detection scheme is generated based on the association relationship, an executable script file can be generated according to the corresponding detection scheme, and the script file can be previewed through a visual editing interface. The generated script file can also be sent to a screen inspection machine so that the screen inspection machine runs the script file to inspect the electronic screen, thereby greatly facilitating the transplantation of the detection scheme and code utilization.
[0078] In one embodiment, the method of the present application is further described below through a specific embodiment, which may include the following steps:
[0079] Step 1: Launch the visual editor.
[0080] Step 2: Select the function type of the screen detection application to be edited.
[0081] Step 3: Display the corresponding control area according to the function type selected above. If there is a corresponding detection plan under the function type, execute step 4. If there is no corresponding detection plan under the function type, execute step 5 or step 6.
[0082] Step 4: Select the required solution components based on the detection solutions available under the function type, and load the corresponding solution parameters in the control area.
[0083] Step 5: A new solution file is automatically generated. All the generated parameters are default values. You can modify the corresponding parameters through the visual editor and save the solution file based on the modified parameters.
[0084] Step 6: Load the externally stored solution file according to the selected path.
[0085] Step 7: Generate a script file executable by the screen inspection machine based on the above solution file and corresponding solution parameters.
[0086] Step 8: Preview the generated script file through the visual editor.
[0087] Step 9: The visual editor compiles the script file and sends it to the screen checker.
[0088] In the above embodiment, an executable script file of the screen detection application is generated by a visual editor. Since the interface of the visual editor is simple and easy to understand, the user does not need to have a programming foundation, so that non-professional programmers can also participate in the code writing of the screen detection application, and the efficiency of code generation and output is improved.
[0089] It should be understood that although Figure 1-Figure 5The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-Figure 5 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0090] In one embodiment, Figure 6 As shown, a device for editing a screen detection application is provided, comprising: a display module 601, an acquisition module 602, a determination module 603 and a code generation module 604, wherein:
[0091] Display module 601, for displaying a visual editing interface in response to an editing instruction for a screen detection application;
[0092] An acquisition module 602 is used to acquire a function type of the screen detection application, and display a control area corresponding to the function type of the screen detection application in the visual editing interface;
[0093] A determination module 603 is used to obtain a detection scheme of the screen detection application, and determine scheme parameters corresponding to the detection scheme in the control area;
[0094] The code generation module 604 is used to generate application code of the screen detection application based on the solution parameters determined in the control area.
[0095] In one embodiment, a modification module is also included, which is used to load the application code of the screen detection application in a code editor and display the application code; obtain modification instructions for the application code, and modify the application code in the code editor based on the modification instructions to obtain modified application code.
[0096] In one embodiment, it also includes a timing diagram generation module, which is used to generate and display a timing diagram of the scheme parameters according to the scheme parameters corresponding to the detection scheme loaded in the control area, and the timing diagram is generated according to the parameters related to the timing in the scheme parameters.
[0097] In one embodiment, the determination module is specifically used to: select a detection scheme corresponding to the screen detection application from a pre-configured scheme list, and load scheme parameters corresponding to the selected detection scheme in the control area; or, if the detection scheme corresponding to the screen detection application does not exist in the pre-configured scheme list, obtain an external storage path of the detection scheme corresponding to the screen detection application, and load scheme parameters of the detection scheme into the control area based on the external storage path; or, if the detection scheme corresponding to the screen detection application does not exist in the pre-configured scheme list, and there is no external storage path for the detection scheme corresponding to the screen detection application, obtain corresponding parameter information based on the control area, use the parameter information as the scheme parameters, and generate a detection scheme corresponding to the screen detection application.
[0098] In one embodiment, the detection scheme includes a signal-based detection scheme; the device also includes a scheme generation module, which is used to obtain a signal pattern and corresponding signal parameters; establish an association relationship between the signal pattern and the corresponding signal parameters, and generate a corresponding detection scheme based on the association relationship; and add the detection scheme to the scheme list.
[0099] In one embodiment, the detection scheme includes a power supply-based detection scheme; the scheme generation module is also used to: obtain a power supply mode and corresponding power supply parameters; establish an association relationship between the power supply mode and the corresponding power supply parameters, and generate a corresponding detection scheme based on the association relationship; and add the detection scheme to the scheme list.
[0100] In one embodiment, the detection scheme includes a picture-based detection scheme; the scheme generation module is also used to: obtain loaded picture resources, and generate a preview image based on the loaded picture resources; in response to an action editing instruction for the preview image, obtain action parameters of the preview image; establish an association relationship between the preview image and the corresponding action parameters, and generate a corresponding detection scheme based on the association relationship; and add the detection scheme to the scheme list.
[0101] The specific definition of the editing device of the screen detection application can be found in the definition of the editing method of the screen detection application in the above text, which will not be repeated here. Each module in the editing device of the above screen detection application can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0102] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for editing a screen detection application is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0103] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0104] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0105] In response to an editing instruction for the screen detection application, displaying a visual editing interface;
[0106] Acquire a function type of the screen detection application, and display a control area corresponding to the function type of the screen detection application in the visual editing interface;
[0107] Acquire a detection scheme of the screen detection application, and determine scheme parameters corresponding to the detection scheme in the control area;
[0108] Based on the scheme parameters determined in the control area, application code of the screen detection application is generated.
[0109] In one embodiment, when the processor executes the computer program, the following steps are also implemented: loading the application code of the screen detection application in a code editor and displaying the application code; obtaining a modification instruction for the application code, and modifying the application code in the code editor based on the modification instruction to obtain a modified application code.
[0110] In one embodiment, when the processor executes the computer program, the following steps are also implemented: based on the scheme parameters corresponding to the detection scheme loaded in the control area, a timing diagram of the scheme parameters is generated and displayed, wherein the timing diagram is generated based on the parameters related to the timing in the scheme parameters.
[0111] In one embodiment, when the processor executes the computer program, the following steps are also implemented: selecting a detection scheme corresponding to the screen detection application from a preconfigured scheme list, and loading scheme parameters corresponding to the selected detection scheme in the control area; or, if the detection scheme corresponding to the screen detection application does not exist in the preconfigured scheme list, obtaining an external storage path of the detection scheme corresponding to the screen detection application, and loading scheme parameters of the detection scheme into the control area based on the external storage path; or, if the detection scheme corresponding to the screen detection application does not exist in the preconfigured scheme list, and there is no external storage path for the detection scheme corresponding to the screen detection application, obtaining corresponding parameter information based on the control area, using the parameter information as the scheme parameters, and generating a detection scheme corresponding to the screen detection application.
[0112] In one embodiment, the detection scheme includes a signal-based detection scheme; when the processor executes the computer program, the following steps are also implemented: obtaining a signal pattern and corresponding signal parameters; establishing an association relationship between the signal pattern and the corresponding signal parameters, and generating a corresponding detection scheme based on the association relationship; and adding the detection scheme to the scheme list.
[0113] In one embodiment, the detection scheme includes a power supply-based detection scheme; when the processor executes the computer program, the following steps are also implemented: obtaining a power supply mode and corresponding power supply parameters; establishing an association relationship between the power supply mode and the corresponding power supply parameters, and generating a corresponding detection scheme based on the association relationship; and adding the detection scheme to the scheme list.
[0114] In one embodiment, the detection scheme includes a picture-based detection scheme; when the processor executes the computer program, the following steps are also implemented: obtaining loaded picture resources, and generating a preview image based on the loaded picture resources; in response to an action editing instruction for the preview image, obtaining action parameters of the preview image; establishing an association relationship between the preview image and the corresponding action parameters, and generating a corresponding detection scheme based on the association relationship; and adding the detection scheme to the scheme list.
[0115] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0116] In response to an editing instruction for the screen detection application, displaying a visual editing interface;
[0117] Acquire a function type of the screen detection application, and display a control area corresponding to the function type of the screen detection application in the visual editing interface;
[0118] Acquire a detection scheme of the screen detection application, and determine scheme parameters corresponding to the detection scheme in the control area;
[0119] Based on the scheme parameters determined in the control area, application code of the screen detection application is generated.
[0120] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: loading the application code of the screen detection application in a code editor and displaying the application code; obtaining modification instructions for the application code, modifying the application code in the code editor based on the modification instructions, and obtaining modified application code.
[0121] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the scheme parameters corresponding to the detection scheme loaded in the control area, a timing diagram of the scheme parameters is generated and displayed, wherein the timing diagram is generated based on the parameters related to the timing in the scheme parameters.
[0122] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: selecting a detection scheme corresponding to the screen detection application from a pre-configured scheme list, and loading scheme parameters corresponding to the selected detection scheme in the control area; or, if the detection scheme corresponding to the screen detection application does not exist in the pre-configured scheme list, obtaining an external storage path of the detection scheme corresponding to the screen detection application, and loading scheme parameters of the detection scheme into the control area based on the external storage path; or, if the detection scheme corresponding to the screen detection application does not exist in the pre-configured scheme list, and there is no external storage path for the detection scheme corresponding to the screen detection application, obtaining corresponding parameter information based on the control area, using the parameter information as the scheme parameters, and generating a detection scheme corresponding to the screen detection application.
[0123] In one embodiment, the detection scheme includes a signal-based detection scheme; when the computer program is executed by the processor, the following steps are also implemented: obtaining a signal pattern and corresponding signal parameters; establishing an association relationship between the signal pattern and the corresponding signal parameters, and generating a corresponding detection scheme based on the association relationship; and adding the detection scheme to the scheme list.
[0124] In one embodiment, the detection scheme includes a power supply-based detection scheme; when the computer program is executed by the processor, the following steps are also implemented: obtaining a power supply mode and corresponding power supply parameters; establishing an association relationship between the power supply mode and the corresponding power supply parameters, and generating a corresponding detection scheme based on the association relationship; and adding the detection scheme to the scheme list.
[0125] In one embodiment, the detection scheme includes a picture-based detection scheme; when the computer program is executed by the processor, the following steps are also implemented: obtaining loaded picture resources, and generating a preview image based on the loaded picture resources; in response to an action editing instruction for the preview image, obtaining action parameters of the preview image; establishing an association relationship between the preview image and the corresponding action parameters, and generating a corresponding detection scheme based on the association relationship; and adding the detection scheme to the scheme list.
[0126] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0127] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0128] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for editing a screen detection application, characterized in that: The method comprises: In response to an editing instruction for the screen detection application, displaying a visual editing interface; Acquire a function type of the screen detection application, and display a control area corresponding to the function type of the screen detection application in the visual editing interface; Acquire a detection scheme of the screen detection application, and determine scheme parameters corresponding to the detection scheme in the control area; the detection scheme is a specific detection plan with operability, including any one of a signal-based detection scheme, a power-based detection scheme, and a picture-based detection scheme, and the scheme parameters are operation data corresponding to the detection scheme; Based on the scheme parameters determined in the control area, application code of the screen detection application is generated.
2. The method according to claim 1, characterized in that The method further comprises: Loading the application code of the screen detection application in a code editor and displaying the application code; A modification instruction for the application code is obtained, and the application code is modified in the code editor based on the modification instruction to obtain a modified application code.
3. The method according to claim 1, characterized in that: The method further comprises: According to the scheme parameters corresponding to the detection scheme loaded in the control area, a timing diagram of the scheme parameters is generated and displayed, wherein the timing diagram is generated according to the parameters related to the timing in the scheme parameters.
4. The method according to claim 1, characterized in that: The acquiring the detection scheme of the screen detection application and determining scheme parameters corresponding to the detection scheme in the control area include: Selecting a detection scheme corresponding to the screen detection application from a pre-configured scheme list, and loading scheme parameters corresponding to the selected detection scheme in the control area; or, If there is no detection scheme corresponding to the screen detection application in the pre-configured scheme list, obtaining an external storage path of the detection scheme corresponding to the screen detection application, and loading scheme parameters of the detection scheme into the control area based on the external storage path; or, If there is no detection scheme corresponding to the screen detection application in the pre-configured scheme list, and there is no external storage path for the detection scheme corresponding to the screen detection application, then corresponding parameter information is obtained based on the control area, and the parameter information is used as the scheme parameter to generate a detection scheme corresponding to the screen detection application.
5. The method according to claim 4, characterized in that The detection scheme includes a signal-based detection scheme; before selecting a detection scheme corresponding to the screen detection application from a preconfigured scheme list, the method further includes: Get the signal mode and corresponding signal parameters; Establishing an association relationship between the signal pattern and the corresponding signal parameter, and generating a corresponding detection scheme based on the association relationship; Add the detection scheme to the scheme list.
6. The method according to claim 4, characterized in that The detection scheme includes a power-based detection scheme; before selecting a detection scheme corresponding to the screen detection application from a preconfigured scheme list, the method further includes: Get the power mode and corresponding power parameters; Establishing an association relationship between the power mode and the corresponding power parameter, and generating a corresponding detection scheme based on the association relationship; Add the detection scheme to the scheme list.
7. The method according to claim 4, characterized in that The detection scheme includes a picture-based detection scheme; before selecting a detection scheme corresponding to the screen detection application from a preconfigured scheme list, the method further includes: Get the loaded image resources and generate preview images based on the loaded image resources; In response to an action editing instruction for the preview image, acquiring an action parameter of the preview image; Establishing an association relationship between the preview image and the corresponding action parameter, and generating a corresponding detection scheme based on the association relationship; Add the detection scheme to the scheme list.
8. An editing device for a screen detection application, characterized in that: The device comprises: A display module, for displaying a visual editing interface in response to an editing instruction for a screen detection application; An acquisition module, used for acquiring a function type of the screen detection application, and displaying a control area corresponding to the function type of the screen detection application in the visual editing interface; a determination module, configured to obtain a detection scheme of the screen detection application, and determine scheme parameters corresponding to the detection scheme in the control area; the detection scheme is a specific detection plan with operability, including any one of a signal-based detection scheme, a power-based detection scheme, and a picture-based detection scheme, and the scheme parameters are operation data corresponding to the detection scheme; A code generation module is used to generate application code for the screen detection application based on the solution parameters determined in the control area.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Safety compliance detection method and device, computer equipment and storage medium
CN111047309A
Engineering file processing method and device, computer equipment and storage medium
CN111552503A
