CN117130702A - Graphic interface adjusting method and device, storage medium and electronic equipment - Google Patents

Graphic interface adjusting method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN117130702A
CN117130702A CN202310473073.1A CN202310473073A CN117130702A CN 117130702 A CN117130702 A CN 117130702A CN 202310473073 A CN202310473073 A CN 202310473073A CN 117130702 A CN117130702 A CN 117130702A
Authority
CN
China
Prior art keywords
target
graphical interface
configuration parameters
target configuration
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310473073.1A
Other languages
Chinese (zh)
Inventor
查先朋
程浩
许周达
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202310473073.1A priority Critical patent/CN117130702A/en
Publication of CN117130702A publication Critical patent/CN117130702A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application provides a method and a device for adjusting a graphical interface, a storage medium and electronic equipment, wherein the method comprises the following steps: responding to an adjustment request triggered by the initial graphical interface, and acquiring a target configuration file of the initial graphical interface; analyzing the target configuration file to obtain target configuration parameters matched with the adjustment request, wherein the target configuration parameters are used for indicating configuration parameters related to the target component on the initial graphical interface; the method comprises the steps of adjusting target configuration parameters to obtain a target image interface, wherein the target assembly changes along with adjustment of the target configuration parameters, the initial graphical interface is different from the target image interface in the adjustment change of the target assembly, and the technical problem of low adjustment efficiency of the observation graphical interface is solved by adopting the technical scheme.

Description

Graphic interface adjusting method and device, storage medium and electronic equipment
Technical Field
The embodiment of the application relates to the field of computers, in particular to a method and a device for adjusting a graphical interface, a storage medium and electronic equipment.
Background
Under video monitoring scenes, along with the development of artificial intelligence, the intelligent monitoring can use a specific monitoring algorithm to judge, identify and identify the scenes, a user can adjust the graphical interfaces according to different scenes, a plurality of graphical interfaces are usually constructed manually or the graphical interfaces are constructed and adjusted by using codes in the prior art, but under the condition that the application scenes are complex, the codes are required to be compiled for a plurality of times, repeated work can be caused, the codes cannot be reused, and the problem that the adjustment efficiency of the graphical interfaces is low exists.
There is no similar method to solve the above problems.
Disclosure of Invention
The embodiment of the invention provides a method and a device for adjusting a graphical interface, a storage medium and electronic equipment, which are used for at least solving the problem of high flow expense caused by large data volume in the running process of a bus in the related technology.
According to an embodiment of the present invention, there is provided a method for adjusting a graphical interface, including:
responding to an adjustment request triggered by an initial graphical interface, and acquiring a target configuration file of the initial graphical interface, wherein the target configuration file is a file for recording each configuration parameter of the initial graphical interface when the initial graphical interface is created, and the adjustment request is used for requesting adjustment of a target component on or outside the initial graphical interface;
Analyzing the target configuration file to obtain target configuration parameters matched with the adjustment request, wherein the target configuration parameters are used for indicating configuration parameters related to the target component on the initial graphical interface;
and adjusting the target configuration parameters to obtain a target image interface, wherein the target component changes along with the adjustment of the target configuration parameters, and the initial graphical interface is different from the target image interface in that the adjustment of the target component changes.
According to another aspect of the embodiment of the present application, there is also provided an adjustment device for a graphical interface, including:
the first obtaining unit is used for responding to an adjustment request triggered by an initial graphical interface, and obtaining a target configuration file of the initial graphical interface, wherein the target configuration file is a file used for recording each configuration parameter of the initial graphical interface when the initial graphical interface is created, and the adjustment request is used for requesting adjustment of a target component on or outside the initial graphical interface;
the first analysis unit is used for analyzing the target configuration file to obtain target configuration parameters matched with the adjustment request, wherein the target configuration parameters are used for indicating configuration parameters related to the target component on the initial graphical interface;
The first adjusting unit is configured to adjust the target configuration parameter to obtain a target image interface, where the target component changes along with adjustment of the target configuration parameter, and the initial graphical interface is different from the target image interface in that the adjustment of the target component changes.
As an alternative, the first obtaining unit includes:
the first acquisition module is used for acquiring target configuration parameters and parameter attributes of the target configuration parameter bureau from the configuration parameters to be configured according to a target algorithm;
and the second acquisition module is used for acquiring the target configuration file according to the target configuration parameters according to the target format.
As an optional solution, the second obtaining module includes:
the first naming sub-module is used for naming the files to be configured according to the target protocol;
and the first configuration submodule is used for configuring the file to be configured according to the root level element and the subset element, and the name corresponding to the root level element is consistent with the name of the subset element corresponding to the root level element.
As an alternative, the first parsing unit includes:
the first analysis module is used for analyzing the target configuration file and acquiring attribute information corresponding to the analyzed sub-level elements;
The first determining module is used for determining the target configuration parameters based on the attribute information corresponding to the sub-level elements;
and the first storage module is used for storing the target configuration parameters in the target container.
As an alternative, the apparatus further includes:
the third obtaining module is used for obtaining the target configuration parameters from the target container according to the algorithm name under the condition that the image interface adjustment instruction is detected after the target configuration parameters are stored in the target container;
and the second determining module is used for determining the target component to be adjusted based on the target configuration parameters to obtain a target image interface under the condition that the image interface adjustment instruction is detected after the target configuration parameters are stored in the target container.
As an alternative, the first adjusting unit includes:
a fourth obtaining module, configured to obtain, from the target container according to the target algorithm name, a parameter information set corresponding to the target configuration parameter, where the parameter information is used to indicate a base component type and a unit for displaying and modifying a parameter value;
a fifth obtaining module, configured to obtain the parameter information set and the target component corresponding to the parameter information set;
And the layout module is used for carrying out layout based on the target component and the parameter information set to obtain a target image interface.
As an alternative, the layout module includes:
the first acquisition sub-module is used for acquiring the sub-parameter information in the parameter information set;
the first construction sub-module is used for carrying out layout and construction on the components corresponding to the single sub-parameter information according to the basic component type to obtain a sub-target image;
and the second construction sub-module is used for combining a plurality of sub-target images to obtain the target image interface.
According to yet another aspect of embodiments of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the computer device performs the adjustment method of the graphical interface as above.
According to still another aspect of the embodiment of the present application, there is further provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the method for adjusting the graphical interface through the computer program.
In the embodiment of the application, a target configuration file of an initial graphical interface is obtained in response to an adjustment request triggered by the initial graphical interface, wherein the target configuration file is a file for recording each configuration parameter of the initial graphical interface when the initial graphical interface is created, and the adjustment request is used for requesting adjustment of a target component on or outside the initial graphical interface; analyzing the target configuration file to obtain target configuration parameters matched with the adjustment request, wherein the target configuration parameters are used for indicating configuration parameters related to the target component on the initial graphical interface; the target configuration parameters are adjusted to obtain a target image interface, wherein the target component changes along with the adjustment of the target configuration parameters, the initial graphical interface is different from the target image interface in the adjustment and change of the target component, the target configuration file is analyzed based on the configuration parameters, and the target component is adjusted based on the adjustment of the target configuration parameters, so that the aim of adjusting the graphical interface in a code-free and efficient manner is achieved, the technical effect of improving the adjustment efficiency of the graphical interface is achieved, and the technical problem of lower adjustment efficiency of the graphical interface is solved.
Drawings
FIG. 1 is a schematic illustration of an application environment of an alternative graphical interface adjustment method according to an embodiment of the present application;
FIG. 2 is a schematic illustration of a flow of an alternative graphical interface adjustment method according to an embodiment of the application;
FIG. 3 is a schematic diagram of an alternative graphical interface adjustment method according to an embodiment of the application;
FIG. 4 is a schematic diagram of another alternative graphical interface adjustment method according to an embodiment of the present application;
FIG. 5 is a schematic diagram of another alternative graphical interface adjustment method according to an embodiment of the application;
FIG. 6 is a schematic diagram of another alternative graphical interface adjustment method according to an embodiment of the application;
FIG. 7 is a schematic diagram of another alternative graphical interface adjustment method according to an embodiment of the application;
FIG. 8 is a schematic diagram of an alternative graphical interface adjustment device in accordance with an embodiment of the present application;
fig. 9 is a schematic structural view of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method embodiments provided by the embodiments of the present application may be performed in a computer terminal, a device terminal, or a similar computing apparatus. Taking a computer terminal as an example, fig. 1 is a schematic diagram of a hardware environment of a file processing method according to an embodiment of the present application. As shown in fig. 1, the computer terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, and in one exemplary embodiment, may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the computer terminal described above. For example, a computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than the equivalent functions shown in FIG. 1 or more than the functions shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a file processing method in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the computer terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
Optionally, as an optional implementation manner, as shown in fig. 2, the adjustment method of the graphical interface includes:
s202, a target configuration file of an initial graphical interface is obtained in response to an adjustment request triggered by the initial graphical interface, wherein the target configuration file is a file for recording each configuration parameter of the initial graphical interface when the initial graphical interface is created, and the adjustment request is used for requesting adjustment of a target component on or outside the initial graphical interface;
s204, analyzing the target configuration file to obtain target configuration parameters matched with the adjustment request, wherein the target configuration parameters are used for indicating configuration parameters associated with the target component on the initial graphical interface;
s206, adjusting the target configuration parameters to obtain a target image interface, wherein the target component changes along with the adjustment of the target configuration parameters, and the initial graphical interface is different from the target image interface in that the adjustment of the target component changes.
Optionally, in this embodiment, in step S202, the initial graphical interface may be, but is not limited to, a window where the user interacts with the application system, and is responsible for establishing and managing communication between the information system and the user, where the user may perform parameter modification and configuration on the initial graphical interface according to actual situations, and the target configuration file is a file for recording configuration parameters of the initial graphical interface when the initial graphical interface is established, and the adjustment request is used to adjust a target component on or outside the initial graphical interface, if the target component is on the initial graphical interface, only the position needs to be adjusted, or the addition of the target component may also be performed on the initial graphical interface according to needs, where unnecessary limitation is not made.
Optionally, in this embodiment, in step S204, the target configuration file indicates the configuration parameters associated by the target component on the initial graphical interface, and the format of the target configuration file may be, but is not limited to, a file in XML format, and the element attribute of the target configuration file may be, but is not limited to, obtained by recursion parsing.
Optionally, in the embodiment, in step S206, the target graphical interface may be, but is not limited to, a graphical interface after the target component is adjusted and changed on the initial graphical interface, the target component may be, but is not limited to, changed according to the adjustment of the target configuration parameter, for example, obtain the basic information such as the parameter name and the range of the target configuration parameter, use the above information to perform layout, set the basic component and the tag as one layout unit, and may, but is not limited to, construct and adjust one layout unit first, and then combine multiple layout units to form a complete graphical interface.
Alternatively, as shown in fig. 3, for example, the basic information of algorithm parameters is organized using XML configuration files, each XML file represents all parameters to be configured of an algorithm, the application program 302 reads all the XML files once after opening, stores the XML files in Json format after parsing and stores the XML files in a memory, and displays the XML files in the graphical interface 304 according to the name of the algorithm after reading.
It should be noted that, in this embodiment, the parameter configuration and issuing of the algorithm may use Json as the data interaction format, so after each parameter is configured in the graphical interface, the code implementation part will acquire each parameter value of the current algorithm, serialize each parameter according to the Json hierarchy in the protocol, and finally interact with the underlying server.
Optionally, in this embodiment, to generate a parameter configuration interface of a certain algorithm, if only a signal for selecting the algorithm is given in the main interface, the names of the algorithms may be stored in a list and displayed by using a drop-down frame, and after a certain algorithm is selected according to the algorithm name in the drop-down frame, the sub-interface may be naturally switched to the parameter configuration interface corresponding to the algorithm. Afterwards, the configuration of parameters, issuing and other works can be performed.
The GUI is a window for interaction between the user and the application system, and is responsible for constructing and managing the communication between the information system and the user. With the increasing application of modern graphical interface technology in industrial production and life practice, the expectation of friendly graphical interfaces is increasing.
The current method for generating the algorithm parameter configuration interface is very mature, namely, on the premise of knowing basic information of algorithm parameters, the interface is constructed by using graphic interface design software, and then the interface is added into a development environment for compiling; or directly construct a graphical interface using code compilation.
However, in the method, if the parameter change requires a software developer to re-open the design file for modification, and the developer is required to be familiar with all basic knowledge of interface development, codes cannot be reused for different algorithms, the embodiment of the application provides a method for quickly constructing an algorithm parameter configuration graphical interface without code compiling.
In the embodiment of the application, a target configuration file of an initial graphical interface is obtained in response to an adjustment request triggered by the initial graphical interface, wherein the target configuration file is a file for recording each configuration parameter of the initial graphical interface when the initial graphical interface is created, and the adjustment request is used for requesting adjustment of a target component on or outside the initial graphical interface; analyzing the target configuration file to obtain target configuration parameters matched with the adjustment request, wherein the target configuration parameters are used for indicating configuration parameters related to the target component on the initial graphical interface; the target configuration parameters are adjusted to obtain a target image interface, wherein the target component changes along with the adjustment of the target configuration parameters, the initial graphical interface is different from the target image interface in the adjustment and change of the target component, and the target component is adjusted based on the adjustment of the target configuration parameters by analyzing the target configuration file based on the configuration parameters, so that the aim of adjusting the graphical interface in a code-free and efficient manner is achieved, and the technical effect of improving the adjustment efficiency of the graphical interface is achieved.
As an alternative, the obtaining the target configuration file of the initial graphical interface includes:
acquiring a target configuration parameter and a parameter attribute of the target configuration parameter from the configuration parameter to be configured according to a target algorithm;
and acquiring a target configuration file according to the target configuration parameters according to the target format.
Optionally, in this embodiment, the parameter attribute may include, but is not limited to, a Json key of a parameter, a parameter name, a parameter range, or a numerical option corresponding to a parameter, a default value of a parameter, and a physical unit of a parameter, which are not redundantly limited herein, and the target algorithm may include, but is not limited to, a preset written file, use Json as a format of algorithm parameter interaction, and may include, but is not limited to, selecting a parameter to be configured according to an algorithm protocol.
According to the embodiment provided by the application, the target configuration parameters and the parameter attributes of the target configuration parameters are obtained from the configuration parameters to be configured according to the target algorithm; the target configuration file is acquired according to the target configuration parameters according to the target format, and the technical effect of improving the efficiency of acquiring the target configuration file is achieved.
As an alternative, obtaining the target configuration file according to the target configuration parameters according to the target format includes:
Naming the files to be configured according to the target protocol;
and configuring a file to be configured according to the root level element and the subset element, wherein the name corresponding to the root level element is consistent with the named name of the subset element corresponding to the root level element.
Optionally, in this embodiment, all the parameters and all the basic information of the parameters may be formed into one xml configuration file according to the format, and the configuration file is named by the algorithm name in the target protocol, so as to improve the distinction.
Further distances, such as shown in FIG. 4, are schematic diagrams of an algorithm protocol document 402 mapping XML configuration file 404, comprising root level elements and child level elements, wherein only one root level element is formatted as a < root node name > child level element; the number of sub-level elements corresponds to each algorithm parameter to be configured, for example, as shown in the figure, parameter 1 is mapped to sub-level element 1, parameter 2 is mapped to sub-level element 2, parameter n is mapped to sub-level element n, and the format may be, but is not limited to, < sub-node name attribute 1= [ value ] attribute 2= [ value ] attribute 3= [ value ].+ -. Sub-node name >.
It should be noted that the root node name and the child node names may be self-made, but the root node name and all child node names in each configuration file are the same, because the code parses the configuration file to distinguish the root node and the child node according to the node names.
By the embodiment provided by the application, the files to be configured are named according to the target protocol; the files to be configured are configured according to the root level elements and the subset elements, names corresponding to the root level elements are consistent with the named names of the subset elements corresponding to the root level elements, and the technical effect of improving the configuration efficiency of the configuration files is achieved.
As an alternative, parsing the target configuration file to obtain the target configuration parameter matched with the adjustment request includes:
analyzing the target configuration file, and obtaining attribute information corresponding to the analyzed sub-level elements;
determining a target configuration parameter based on attribute information corresponding to the sub-level elements;
the target configuration parameters are stored in a target container.
Alternatively, in this embodiment, the XML file may be read and recursively parsed to obtain the attribute of the sub-level element, where in the case of adding the target protocol, the configuration file needs to be written in a specified format and stored under the specified directory.
Optionally, in this embodiment, for example, fig. 5 is a schematic diagram of parsing an XML configuration file into a Json array, and parsing N XML files to obtain attributes of each sub-level element: parsing the library using a graphical programming language; the data storage of sub-level element attributes mainly includes: after the attribute of each sub-level element is analyzed, the members corresponding to the Json objects are combined into a Json object by all the attributes, and all the Json objects are stored in a Json array; the Json arrays analyzed by the xml files (algorithms) are stored in a map container, the names of the xml files (algorithms) are used as keys, and the corresponding N Json arrays are used as values.
According to the embodiment provided by the application, the target configuration parameters are determined based on the attribute information corresponding to the sub-level elements; the target configuration parameters are stored in the target container, so that the technical effect of improving the storage efficiency is achieved.
As an alternative, after storing the target configuration parameters in the target container, the method further includes:
under the condition that an image interface adjusting instruction is detected, acquiring target configuration parameters from a target container according to an algorithm name;
and determining a target component to be adjusted based on the target configuration parameters to obtain a target image interface.
According to the embodiment provided by the application, under the condition that the image interface adjustment instruction is detected, the target configuration parameters are obtained from the target container according to the algorithm name; and determining a target component to be adjusted based on the target configuration parameters to obtain a target image interface, thereby improving the efficiency of constructing the target image interface.
As an alternative, adjusting the target configuration parameter to obtain the target image interface includes:
acquiring a parameter information set corresponding to the target configuration parameter from the target container according to the target algorithm name, wherein the parameter information is used for indicating the type and unit of the basic component for displaying and modifying the parameter value;
Acquiring a parameter information set and a target component corresponding to the parameter information set;
and carrying out layout based on the target component and the parameter information set to obtain a target image interface.
According to the embodiment provided by the application, a parameter information set corresponding to the target configuration parameter is obtained from the target container according to the target algorithm name, and the parameter information is used for indicating the type and unit of the basic component for displaying and modifying the parameter value; acquiring a parameter information set and a target component corresponding to the parameter information set; and carrying out layout based on the target assembly and the parameter information set to obtain a target image interface, thereby realizing the technical effect of improving the efficiency of constructing the target image interface.
As an alternative, performing layout based on the target component and the parameter information set, and obtaining the target image interface includes:
acquiring sub-parameter information in a parameter information set;
carrying out layout and construction on components corresponding to the single sub-parameter information according to the type of the basic component to obtain a sub-target image;
and combining the plurality of sub-target images to obtain a target image interface.
According to the embodiment provided by the application, the sub-parameter information in the parameter information set is acquired; carrying out layout and construction on components corresponding to the single sub-parameter information according to the type of the basic component to obtain a sub-target image; and combining the plurality of sub-target images to obtain a target image interface, thereby realizing the technical effect of improving the efficiency of constructing the target image interface.
As an alternative, the adjustment method of the graphical interface is applied to a specific image construction scene, for example, as shown in fig. 6, and the specific steps are as follows:
step S602: searching the corresponding array in the container: the algorithm names are the basis for distinguishing different interfaces, and when a graphical interface is created, the corresponding Json arrays in the map container are searched according to the algorithm names;
step S604: display using a label: the information of the parameters comprises basic control types, parameter names, ranges, units and the like which are used for displaying and modifying the parameter values, and the information is directly displayed by using labels;
step S606: parameter information is acquired: acquiring each piece of parameter information in the Json array, and constructing a ui interface, wherein a plurality of different interface components are formed;
step S608: building a single interface: for the internal layout of a single interface component, the layout unit at the moment is a basic component and a label, and the layout mode of each interface component can be the same, or a unique layout can be combined according to the basic control type;
step S610: constructing a complete interface: all interface components are combined to form a complete graphical interface, and the layout unit is the interface component, and the layout mode can use classical vertical layout, horizontal layout or grid layout.
Further illustrative, for example, as shown in fig. 7, a schematic diagram of an array generating graphical interface is provided, n Json objects are obtained from the Json array, n graphical components are laid out based on each Json object, and finally all the graphical components are combined to construct an overall graphical interface.
Optionally, in this embodiment, the storing of the graphical interface includes: storing all constructed graphical interfaces into a map container, wherein the algorithm name is used as a key, and the graphical interface object widget is used as a value; when the displayed graphical interface is to be replaced, the corresponding interface can be acquired according to the algorithm name.
Optionally, in this embodiment, the parameters are configured, the parameters are obtained, and the parameters are serialized according to the protocol Json and the Json data is interacted with: after the graphical interface is generated, parameter configuration and data interaction are carried out.
Optionally, in this embodiment, a graphical interface is constructed, where the constructed interface has a fixed code implementation, and the layout of the constructed graphical interface is fixed, and if a new layout is required, the code is modified; however, for the configuration of the algorithm protocol parameters of the same type (for example, the monitoring algorithm basically belongs to the same type), the interface is single due to repeatability, so that the newly added layout does not need to be considered.
It should be noted that, for the existing scheme, if the method is applied to the development of the parameter configuration interface of the monitoring algorithm, a lot of development time will be consumed. Because when there are multiple algorithms parameters to be configured, multiple graphical interfaces need to be manually constructed and compiled multiple times, which can result in multiple repeated works; and after the software is packaged, if a new algorithm or algorithm parameters exist, the configuration of the new algorithm (parameters) is realized by adding codes again on the basis of the original codes, and then the software is packaged again, so that the graphical interface cannot be conveniently expanded and updated, and the method is extremely unfriendly to developers and users.
Compared with the existing optimal technology (using interface design software to construct a graphical interface), the present embodiment has the following advantages: code-free compiling and constructing a new parameter configuration graphical interface: to a certain extent, the code-free development graphical interface is more a great trend, because the graphical interface is developed for the user to interact with the system, if the code-free development graphical interface can be realized, the user can complete the development work of the related interface, thereby not only facilitating the user, but also saving a great deal of energy for the software developer. After the basic software architecture is developed, an application program can build the graphical interface only by reading the algorithm parameter configuration file, the writing of the configuration file does not need any software knowledge, and a user can write by himself after knowing the file writing format specification, so that the building work of the algorithm parameter configuration graphical interface is handed to the user, the software development cost is greatly reduced, and the algorithm can be applied to practice more quickly; the existing graphical interface is expanded very conveniently: aiming at the constructed parameter configuration graphical interface, if the range or name of the parameter needs to be changed or the parameter needs to be newly added on the basis of the current existing parameter, the requirements can be realized by modifying the xml configuration file without any change to the code, and the embodiment realizes the rapid and code-free increase and modification of the image interface through the analysis of the configuration file by the image analysis engine.
It will be appreciated that in the specific embodiments of the present application, related data such as user information is involved, and when the above embodiments of the present application are applied to specific products or technologies, user permissions or consents need to be obtained, and the collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
According to another aspect of the embodiment of the application, there is also provided an adjustment device for a graphical interface for implementing the adjustment method for a graphical interface. As shown in fig. 8, the apparatus includes:
a first obtaining unit 802, configured to obtain a target configuration file of an initial graphical interface in response to an adjustment request triggered by the initial graphical interface, where the target configuration file is a file for recording each configuration parameter of the initial graphical interface when the initial graphical interface is created, and the adjustment request is used for requesting adjustment of a target component on or off the initial graphical interface;
A first parsing unit 804, configured to parse the target configuration file to obtain a target configuration parameter that is matched with the adjustment request, where the target configuration parameter is used to indicate a configuration parameter associated with the target component on the initial graphical interface;
the first adjusting unit 806 is configured to adjust the target configuration parameter to obtain a target image interface, where the target component changes along with adjustment of the target configuration parameter, and the difference between the initial graphical interface and the target image interface is that the adjustment of the target component changes.
The specific embodiments may refer to the examples shown in the adjustment device of the above-mentioned graphical interface, and this example will not be described herein.
As an alternative, the first acquisition unit 802 includes:
the first acquisition module is used for acquiring the target configuration parameters and the parameter attributes of the target configuration parameter bureau from the configuration parameters to be configured according to the target algorithm;
and the second acquisition module is used for acquiring the target configuration file according to the target configuration parameters according to the target format.
The specific embodiments may refer to the examples shown in the adjustment device of the above-mentioned graphical interface, and this example will not be described herein.
As an alternative, the second obtaining module includes:
The first naming sub-module is used for naming the files to be configured according to the target protocol;
the first configuration sub-module is used for configuring the file to be configured according to the root level elements and the subset elements, and the names corresponding to the root level elements are consistent with the naming names of the subset elements corresponding to the root level elements.
The specific embodiments may refer to the examples shown in the adjustment device of the above-mentioned graphical interface, and this example will not be described herein.
As an alternative, the first parsing unit includes:
the first analysis module is used for analyzing the target configuration file and acquiring attribute information corresponding to the analyzed sub-level elements;
the first determining module is used for determining a target configuration parameter based on attribute information corresponding to the sub-level elements;
and the first storage module is used for storing the target configuration parameters in the target container.
The specific embodiments may refer to the examples shown in the adjustment device of the above-mentioned graphical interface, and this example will not be described herein.
As an alternative, the apparatus further includes:
the third acquisition module is used for acquiring the target configuration parameters from the target container according to the algorithm name under the condition that the image interface adjustment instruction is detected after the target configuration parameters are stored in the target container;
And the second determining module is used for determining a target component to be adjusted based on the target configuration parameters to obtain a target image interface under the condition that the image interface adjustment instruction is detected after the target configuration parameters are stored in the target container.
The specific embodiments may refer to the examples shown in the adjustment device of the above-mentioned graphical interface, and this example will not be described herein.
As an alternative, the first adjusting unit 806 includes:
the fourth acquisition module is used for acquiring a parameter information set corresponding to the target configuration parameter from the target container according to the target algorithm name, wherein the parameter information is used for indicating the type and unit of the basic component for displaying and modifying the parameter value;
the fifth acquisition module is used for acquiring the parameter information set and the target component corresponding to the parameter information set;
and the layout module is used for carrying out layout based on the target component and the parameter information set to obtain a target image interface.
The specific embodiments may refer to the examples shown in the adjustment device of the above-mentioned graphical interface, and this example will not be described herein.
As an alternative, the layout module includes:
the first acquisition sub-module is used for acquiring sub-parameter information in the parameter information set;
The first construction sub-module is used for carrying out layout and construction on the components corresponding to the single sub-parameter information according to the basic component type to obtain a sub-target image;
and the second construction submodule is used for combining the plurality of sub-target images to obtain a target image interface.
Specific embodiments may refer to examples shown in the above adjustment methods of the graphical interface, and this example is not described herein.
Alternatively, it will be understood by those skilled in the art that the structure shown in fig. 9 is only schematic, and the electronic device may also be a terminal device such as a smart phone (e.g. an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a mobile internet device (Mobile Internet Devices, MID), a PAD, etc. Fig. 9 is not limited to the structure of the electronic device described above. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 9, or have a different configuration than shown in FIG. 9.
The memory 902 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for adjusting a graphical interface in the embodiment of the present application, and the processor 904 executes the software programs and modules stored in the memory 902, thereby executing various functional applications and data processing, that is, implementing the method for adjusting a graphical interface. The memory 902 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 902 may further include memory remotely located relative to the processor 904, which may be connected to the terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 902 may be used to store information such as, but not limited to, target configuration parameters. As an example, as shown in fig. 9, the memory 902 may include, but is not limited to, a first obtaining unit 802, a first analyzing unit 804, and a first adjusting unit 806 in the adjusting device including the graphical interface. In addition, other module units in the adjustment device of the graphical interface may be included, but are not limited to, and are not described in detail in this example.
Optionally, the transmission device 906 is used to receive or transmit data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission means 906 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices and routers via a network cable to communicate with the internet or a local area network. In one example, the transmission device 906 is a Radio Frequency (RF) module for communicating wirelessly with the internet.
In addition, the electronic device further includes: a display 908 for displaying information such as the target configuration parameters; and a connection bus 910 for connecting the respective module parts in the above-described electronic device.
In other embodiments, the terminal device or the server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the plurality of nodes through a network communication. Among them, the nodes may form a Peer-To-Peer (P2P) network, and any type of computing device, such as a server, a terminal, etc., may become a node in the blockchain system by joining the Peer-To-Peer network.
According to a further aspect of the embodiments of the present application, there is also provided an electronic device for implementing the above-mentioned method of adjusting a graphical interface, as shown in fig. 9, the electronic device comprising a memory 902 and a processor 904, the memory 902 having stored therein a computer program, the processor 904 being arranged to perform the steps of any of the method embodiments described above by means of the computer program.
Alternatively, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of the computer network.
Alternatively, in the present embodiment, the processor may be configured to execute the steps in the adjustment method of the graphical interface by a computer program.
Alternatively, it will be understood by those skilled in the art that the structure shown in fig. 9 is only schematic, and the electronic device may also be a terminal device such as a smart phone (e.g. an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a mobile internet device (Mobile Internet Devices, MID), a PAD, etc. Fig. 9 is not limited to the structure of the electronic device described above. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 9, or have a different configuration than shown in FIG. 9.
The memory 902 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for adjusting a graphical interface in the embodiment of the present application, and the processor 904 executes the software programs and modules stored in the memory 902, thereby executing various functional applications and data processing, that is, implementing the method for adjusting a graphical interface. The memory 902 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 902 may further include memory remotely located relative to the processor 904, which may be connected to the terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 902 may be used to store information such as, but not limited to, a target configuration file. As an example, as shown in fig. 9, the memory 902 may include, but is not limited to, a first obtaining unit 802, a first analyzing unit 804, and a first adjusting unit 806 in the test apparatus including the software development kit. In addition, other module units in the testing device of the software development kit may be further included, but are not limited to, and are not described in detail in this example.
Optionally, the transmission device 906 is used to receive or transmit data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission means 906 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices and routers via a network cable to communicate with the internet or a local area network. In one example, the transmission device 906 is a Radio Frequency (RF) module for communicating wirelessly with the internet.
In addition, the electronic device further includes: a display 908 for displaying information such as the target configuration file; and a connection bus 910 for connecting the respective module parts in the above-described electronic device.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application should be included in the protection scope of the present application.
According to one aspect of the present application, there is provided a computer-readable storage medium, from which a processor of a computer device reads the computer instructions, the processor executing the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.
Alternatively, in the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, responding to an adjustment request triggered by an initial graphical interface, and acquiring a target configuration file of the initial graphical interface, wherein the target configuration file is a file for recording each configuration parameter of the initial graphical interface when the initial graphical interface is created, and the adjustment request is used for requesting adjustment of a target component on or outside the initial graphical interface;
s2, analyzing the target configuration file to obtain target configuration parameters matched with the adjustment request, wherein the target configuration parameters are used for indicating configuration parameters associated with the target component on the initial graphical interface;
S3, adjusting the target configuration parameters to obtain a target image interface, wherein the target assembly changes along with the adjustment of the target configuration parameters, and the difference between the initial graphical interface and the target image interface is that the adjustment of the target assembly changes.
Alternatively, in this embodiment, it will be understood by those skilled in the art that all or part of the steps in the methods of the above embodiments may be performed by a program for instructing a terminal device to execute the steps, where the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the method of the various embodiments of the present application.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided by the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and are merely a logical functional division, and there may be other manners of dividing the apparatus in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (10)

1. A method for adjusting a graphical interface, comprising:
responding to an adjustment request triggered by an initial graphical interface, and acquiring a target configuration file of the initial graphical interface, wherein the target configuration file is a file used for recording each configuration parameter of the initial graphical interface when the initial graphical interface is created, and the adjustment request is used for requesting adjustment of a target component on or outside the initial graphical interface;
analyzing the target configuration file to obtain target configuration parameters matched with the adjustment request, wherein the target configuration parameters are used for indicating configuration parameters associated with the target component on the initial graphical interface;
And adjusting the target configuration parameters to obtain a target image interface, wherein the target component changes along with the adjustment of the target configuration parameters, and the initial graphical interface is different from the target image interface in that the adjustment of the target component changes.
2. The method of claim 1, wherein the obtaining the target profile of the initial graphical interface comprises:
acquiring a target configuration parameter and a parameter attribute of the target configuration parameter office from the configuration parameters to be configured according to a target algorithm;
and acquiring the target configuration file according to the target configuration parameters according to a target format.
3. The method of claim 2, wherein the obtaining the target configuration file according to the target configuration parameters in a target format comprises:
naming the files to be configured according to the target protocol;
and configuring the file to be configured according to the root level element and the subset element, wherein the name corresponding to the root level element is consistent with the name of the subset element corresponding to the root level element.
4. The method of claim 1, wherein parsing the target configuration file to obtain target configuration parameters that match the adjustment request comprises:
Analyzing the target configuration file, and acquiring attribute information corresponding to the analyzed sub-level elements;
determining the target configuration parameters based on the attribute information corresponding to the sub-level elements;
the target configuration parameters are stored in a target container.
5. The method of claim 4, wherein after storing the target configuration parameters in a target container, further comprising:
under the condition that an image interface adjustment instruction is detected, acquiring the target configuration parameters from the target container according to an algorithm name;
and determining the target component to be adjusted based on the target configuration parameters to obtain a target image interface.
6. The method of claim 1, wherein the adjusting the target configuration parameter to obtain a target image interface comprises:
acquiring a parameter information set corresponding to the target configuration parameter from the target container according to the target algorithm name, wherein the parameter information is used for indicating the type and unit of a basic component for displaying and modifying the parameter value;
acquiring the parameter information set and the target component corresponding to the parameter information set; and carrying out layout based on the target component and the parameter information set to obtain a target image interface.
7. The method of claim 6, wherein the laying out based on the target component and the set of parameter information, the obtaining a target image interface comprises:
acquiring sub-parameter information in the parameter information set;
carrying out layout and construction on components corresponding to the single sub-parameter information according to the type of the basic component to obtain a sub-target image;
and combining the plurality of sub-target images to obtain the target image interface.
8. An adjustment device for a graphical interface, comprising:
the first acquisition unit is used for responding to an adjustment request triggered by an initial graphical interface, acquiring a target configuration file of the initial graphical interface, wherein the target configuration file is a file used for recording each configuration parameter of the initial graphical interface when the initial graphical interface is created, and the adjustment request is used for requesting adjustment of a target component on or outside the initial graphical interface;
the first analysis unit is used for analyzing the target configuration file to obtain target configuration parameters matched with the adjustment request, wherein the target configuration parameters are used for indicating configuration parameters associated with the target component on the initial graphical interface;
The first adjusting unit is used for adjusting the target configuration parameters to obtain a target image interface, wherein the target component changes along with the adjustment of the target configuration parameters, and the initial graphical interface is different from the target image interface in that the adjustment of the target component changes.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program when run performs the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of claims 1 to 7 by means of the computer program.
CN202310473073.1A 2023-04-26 2023-04-26 Graphic interface adjusting method and device, storage medium and electronic equipment Pending CN117130702A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310473073.1A CN117130702A (en) 2023-04-26 2023-04-26 Graphic interface adjusting method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310473073.1A CN117130702A (en) 2023-04-26 2023-04-26 Graphic interface adjusting method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117130702A true CN117130702A (en) 2023-11-28

Family

ID=88853412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310473073.1A Pending CN117130702A (en) 2023-04-26 2023-04-26 Graphic interface adjusting method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117130702A (en)

Similar Documents

Publication Publication Date Title
CN107861655B (en) Control matching method and device, computer equipment and storage medium
CN110795148B (en) Method and device for generating layout file and electronic equipment
US11163851B2 (en) Method, apparatus, computer device and storage medium of page displaying
CN106528129B (en) A kind of Web application interface generation system and method
CN106067080B (en) Configurable workflow capabilities are provided
US20140019597A1 (en) Semi-automatic discovery and generation of useful service blueprints
US10268961B2 (en) Generating predictive models to reconfigure electronic devices
CN110944048B (en) Service logic configuration method and device
CN104462616A (en) Dynamic data collection method based on configuration item
CN111556158B (en) Access method, access device, access equipment and storage medium of Internet of things platform
CN106681903B (en) Method and device for generating test case
CN104679500B (en) Method and device for realizing automatic generation of entity class
CN111782635B (en) Data processing method and device, storage medium and electronic device
CN106462406A (en) Interactive viewer of intermediate representations of client side code
CN109002334B (en) Operation and maintenance platform and data processing method thereof
CA3050159A1 (en) Artificial intelligence (ai) based automatic rule generation
CN109388791A (en) Chart Dynamic Display method, apparatus, computer equipment and storage medium
CN114036425A (en) Page access method, client, server and system
CN111782317A (en) Page testing method and device, storage medium and electronic device
CN110704394B (en) Report configuration modification method and device
CN112055062A (en) Data communication method, device, equipment and readable storage medium
CN104704473A (en) Model-based configuration capture and replay in a converged infrastructure system to support remote troubleshooting
KR102545045B1 (en) Method and apparatus for generating information
CN115756472B (en) Cloud-edge cooperative industrial equipment digital twin operation monitoring method and system
CN117130702A (en) Graphic interface adjusting method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination