CN113885997B - Dialog box display method and device, electronic equipment and storage medium - Google Patents
Dialog box display method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113885997B CN113885997B CN202111217676.2A CN202111217676A CN113885997B CN 113885997 B CN113885997 B CN 113885997B CN 202111217676 A CN202111217676 A CN 202111217676A CN 113885997 B CN113885997 B CN 113885997B
- Authority
- CN
- China
- Prior art keywords
- dialog box
- target
- background
- interface
- otx
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/252—Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C5/00—Registering or indicating the working of vehicles
- G07C5/08—Registering or indicating performance data other than driving, working, idle, or waiting time, with or without registering driving, working, idle or waiting time
- G07C5/0808—Diagnosing performance data
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Data Mining & Analysis (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application is applicable to the technical field of computers, and provides a dialog box display method, a dialog box display device, electronic equipment and a storage medium, wherein the dialog box display method comprises the following steps: detecting whether a background variable corresponding to a target element in a dialog box changes or not in a dialog box display state; wherein the target element is a dialog box element set as a listening target; if yes, updating and displaying the corresponding target element according to the updated background variable. The embodiment of the application can accurately realize the dynamic display of the dialog box.
Description
Technical Field
The present application belongs to the field of computer technology, and in particular, relates to a method and apparatus for displaying a dialog box, an electronic device, and a storage medium.
Background
Currently, in many applications, the values of dialog elements in a dialog box are generally only fixed for display according to an initial setting, and it is difficult to realize dynamic display of the dialog box.
For example, during the execution of diagnostic functions of a vehicle, dialog boxes often appear to prompt a user to perform diagnostic operations on the vehicle. In an open test sequence exchange (Open Test sequence eXchange, OTX) source file, a label for encapsulating data of a dialog box (abbreviated as a dialog box label) is "openscreen", and the dialog box label contains sub-labels such as "title" and "message" inside, and these sub-labels are used for encapsulating data of a title and a prompt information presented by the dialog box. However, since a dialog box is created during the process of parsing the "openscreen" tag, when the title "and the message" in the subsequent "openscreen" tag are changed, the values of the title "and the message" are only modified, the openscreen tag does not appear, and the content of the previously created prompt dialog box cannot be changed, so that when the diagnostic function process is executed according to the OTX source file, the dialog box cannot realize dynamic display of the contents such as the title, the message, and the like, thereby influencing execution of the diagnostic process.
Disclosure of Invention
In view of this, embodiments of the present application provide a method, an apparatus, an electronic device, and a storage medium for displaying a dialog box, so as to solve the problem in the prior art how to accurately implement dynamic display of the dialog box.
A first aspect of an embodiment of the present application provides a dialog box display method, including:
Detecting whether a background variable corresponding to a target element in a dialog box changes or not in a dialog box display state; wherein the target element is a dialog box element set as a listening target;
if yes, updating and displaying the corresponding target element according to the updated background variable.
Optionally, before detecting whether the background variable corresponding to the target element in the dialog box changes in the state of displaying the dialog box, the method further includes:
calling a target dynamic link library; the target dynamic link library is a dynamic link library generated according to an OTX source file;
And if the dialog box interface is detected in the target dynamic link library, displaying a dialog box according to the initial value of the background variable of the preset dialog box element.
Optionally, before the calling the target dynamic link library, the method further comprises:
Analyzing an OTX source file, and converting the OTX source file into a corresponding target code file; wherein the object code file contains the code of the dialog interface, a background variable corresponding to a dialog element of the dialog;
Compiling the target code file into the target dynamic link library.
Optionally, the parsing the OTX source file, converting the OTX source file into a corresponding object code file, includes:
analyzing an OTX source file, and when analyzing a dialog box label, creating a corresponding dialog box interface according to dialog box data packaged by the dialog box label;
selecting background variables corresponding to the target elements to set monitoring targets to obtain monitoring setting information;
And generating an object code file containing the dialog box interface, the background variable and the monitoring setting information.
Optionally, before the parsing the OTX source file, the method further includes:
acquiring a vehicle identification code of a target vehicle;
uploading the vehicle identification code to a target server, and acquiring the OTX source file returned by the target server.
Optionally, the method further comprises:
and when the preset condition is met, calling a dialog box to close an interface, and destroying the dialog box.
Optionally, the updating and displaying the corresponding target element according to the updated background variable includes:
And sending the updated background variable to a display interface in a shared memory mode, so that the display interface updates and displays the dialog box, and the updated display of the target element is realized.
A second aspect of an embodiment of the present application provides a dialog box display device, including:
The detection unit is used for detecting whether a background variable corresponding to a target element in a dialog box changes or not in a dialog box display state; wherein the target element is a dialog box element set as a listening target;
and the updating unit is used for updating and displaying the corresponding target element according to the updated background variable if the background variable of the target element changes.
Optionally, the dialog box display device further includes:
The dynamic link library calling unit is used for calling the target dynamic link library; the target dynamic link library is a dynamic link library generated according to an OTX source file;
And the dialog box initializing unit is used for displaying a dialog box according to the initial value of the background variable of the preset dialog box element if the dialog box interface is detected in the target dynamic link library.
Optionally, the dialog box display device further includes:
The analysis unit is used for analyzing the OTX source file and converting the OTX source file into a corresponding target code file; wherein the object code file contains the code of the dialog interface, a background variable corresponding to a dialog element of the dialog;
and the compiling unit is used for compiling the target code file into the target dynamic link library.
Optionally, the parsing unit is specifically configured to parse the OTX source file, and create a corresponding dialog box interface according to dialog box data encapsulated by the dialog box label when parsing the dialog box label; selecting background variables corresponding to the target elements to set monitoring targets to obtain monitoring setting information; and generating an object code file containing the dialog box interface, the background variable and the monitoring setting information.
Optionally, the dialog box display device further includes:
a vehicle identification code acquisition unit configured to acquire a vehicle identification code of a target vehicle;
And the OTX source file acquisition unit is used for uploading the vehicle identification code to a target server and acquiring the OTX source file returned by the target server.
Optionally, the dialog box display device further includes:
and the dialog box destroying unit is used for calling a dialog box to close the interface when the preset condition is met, and destroying the dialog box.
Optionally, the updating unit is specifically configured to send the updated background variable to a display interface in a shared memory manner, so that the display interface updates and displays the dialog box, and update and display of the target element is implemented.
A third aspect of the embodiments of the present application provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, which when executed by the processor causes the electronic device to implement the steps of the dialog box display method as described.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, causes an electronic device to implement steps of the dialog box display method.
A fifth aspect of an embodiment of the present application provides a computer program product, which when run on an electronic device, causes the electronic device to perform the dialog box display method of any of the first aspects described above.
Compared with the prior art, the embodiment of the application has the beneficial effects that: in the embodiment of the application, some dialog box elements in the dialog box are set as monitoring targets in advance, and the dialog box elements set as the monitoring targets are called target elements. And then, in the state of the dialog box display, if the background variable corresponding to the target element in the dialog box is detected to change, automatically updating and displaying the target element according to the updated background variable. The setting of the monitoring target can enable the updating display of the target element to be automatically detected and completed when the background variable corresponding to the target element changes, so that the dialog box can be dynamically updated and displayed in time, and the flexibility and accuracy of the dialog box display are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a schematic implementation flow chart of a first dialog box display method according to an embodiment of the present application;
Fig. 2 is a schematic implementation flow chart of a first dialog box display method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a dialog display device according to an embodiment of the present application;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to illustrate the technical scheme of the application, the following description is made by specific examples.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in the description of the present application, the terms "first," "second," "third," etc. are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Currently, during the execution of diagnostic functions of a vehicle, dialog boxes often appear to prompt a user to operate a diagnostic process of the vehicle. In the OTX source file, a label (abbreviated as a dialog box label) for packaging data of a dialog box is "openscreen", and the dialog box label contains sub-labels such as "title" and "message" inside, and these sub-labels are used for packaging data of titles and prompt messages presented by the dialog box. However, since a dialog box is created during the process of parsing the "openscreen" tag, when the title "and the prompt message" in the subsequent "openscreen" tag are changed, the values of the background variables of the title "and the" message "are only modified, the openscreen tag does not appear, and the dialog box element of the previously created prompt dialog box cannot be changed, so that when the diagnostic function process is executed according to the OTX source file, the dialog box cannot realize the dynamic display of the dialog box elements such as the title, the prompt message, and the like, thereby affecting the execution of the diagnostic process.
In order to solve the technical problems described above, embodiments of the present application provide a method, an apparatus, an electronic device, and a storage medium for displaying a dialog box, where in a state of displaying the dialog box, whether a background variable corresponding to a target element in the dialog box changes is detected; wherein the target element is a dialog box element set as a listening target; if yes, updating and displaying the corresponding target element according to the updated background variable. The setting of the monitoring target can enable the updating display of the target element to be automatically detected and completed when the background variable corresponding to the target element changes, so that the dialog box can be dynamically updated and displayed in time, and the flexibility and accuracy of the dialog box display are improved.
Embodiment one:
Fig. 1 is a flow chart of a first dialog box display method according to an embodiment of the present application, where an execution body of the dialog box display method is an electronic device, and the details are as follows:
In S101, in a state where a dialog box is displayed, detecting whether a background variable corresponding to a target element in the dialog box changes; wherein the target element is a dialog box element set as a listening target.
In the embodiment of the application, the dialog box is displayed on the interface of the client after the client installed on the electronic equipment calls the interface function of the dialog box in advance. The dialog box contains a plurality of dialog box elements, wherein the dialog box elements may include a title element, an information element, and the like. For each dialog element displayed in the dialog, there is a corresponding value in the daemon that may represent the text content, dialog element size, color, font, etc. that the dialog element is to display. The value may be a fixed value directly or may be a dynamic value stored in a background variable. For example, the background variable corresponding to the title element may be a variable named "title", and the background variable corresponding to the information element may be a variable named "message".
In general, when a dialog box is initialized for display, the corresponding dialog box element may be initially displayed according to an initial value of a background variable. When the value corresponding to the background variable is changed, the dialog box is not always informed of the change, so that the dialog box is difficult to accurately update the display according to the dynamic change of the background variable. In the embodiment of the application, the change of the background variable can be accurately detected by setting the monitoring target in advance.
Specifically, among dialog elements included in the dialog, a dialog element to be dynamically displayed is set as a listening target in advance, and the dialog element set as the listening target is referred to as a target element. Then, in the state that the dialog box is opened and displayed, the client can detect whether the background variable of the target element changes in real time.
In one embodiment, when the code corresponding to the dialog box is created, the background variable corresponding to the target element in the dialog box is set to be the monitoring target object in the observer mode through the observer mode, and the corresponding observer object is bound to the monitoring target object. Then, in the state of dialog box display, the observer object in the client-side background program can monitor whether the target object changes in real time, so that the monitoring of the background variable of the target element is realized. Wherein the observer object (ConcreteObserver) refers to an object inherited by an observer class in the observer mode, and the object refers to an entity with class attributes in an object-oriented programming language, and the entity contains data needing to be operated and a method capable of operating on the data.
In S102, if yes, the corresponding target element is updated and displayed according to the updated background variable.
When the background variable corresponding to the target element in the dialog box is detected to change, the display in the dialog box in the interface is refreshed according to the updated background variable, so that the display interface can read the updated background variable, and the updated display of the target element is realized.
In one embodiment, the updated display of the target element may be implemented by the observer object in observer mode listening for the updated background variable.
In the embodiment of the application, the setting of the monitoring target can enable the updating display of the target element to be automatically detected and completed when the background variable corresponding to the target element changes, so that the dialog box can be dynamically updated and displayed in time, and the flexibility and the accuracy of the dialog box display are improved.
Embodiment two:
Fig. 2 is a schematic flow chart of a second dialog box display method according to an embodiment of the present application, where an execution subject of the dialog box display method is an electronic device. The dialog box display method of the embodiment of the present application is further improved based on the method of the first embodiment, and the same points as the first embodiment are not described in detail. The dialog box display method shown in fig. 2 is described in detail as follows:
In S201, a target dynamic link library is called; the target dynamic link library is a dynamic link library generated according to the OTX source file.
In the embodiment of the application, the target dynamic link library is a dynamic link library generated by performing code conversion and compiling according to a preset OTX source file in advance.
In one embodiment, the OTX source file may be a file for describing a diagnostic function flow, and correspondingly, the target dynamic link library is a dynamic link library for implementing a diagnostic function. And after the electronic equipment starts the vehicle diagnosis client, calling the diagnosis function dynamic link library to start to execute the diagnosis function.
In S202, if a dialog box interface is detected in the target dynamic link library, a dialog box is displayed according to an initial value of a background variable of a preset dialog box element.
After the target dynamic link library is called, when the target dynamic link library is operated in the background, if the dialog box interface is detected, the initialization display of the dialog box is realized according to the initial value of the background variable stored in the target dynamic link library.
In the execution flow of the target dynamic link library, if an interface function named 'openscreen' is detected, it is determined that a dialog box interface is currently detected, and a corresponding dialog box is created and initialized according to interface parameters of the dialog box interface. The interface parameters of the dialog box interface comprise initial values of background variables corresponding to the dialog box elements, and the initialization display of the dialog box elements corresponding to the dialog box is realized according to the initial values of the background variables.
In S203, in a state in which a dialog box is displayed, detecting whether a background variable corresponding to a target element in the dialog box changes; wherein the target element is a dialog box element set as a listening target.
In S204, if yes, the corresponding target element is updated and displayed according to the updated background variable.
In the embodiment of the application, the dialog box is displayed according to the initial value of the background variable of the preset dialog box element when the dialog box interface is detected by calling the target dynamic link library, so that the initialization display of the dialog box can be flexibly and conveniently realized.
Optionally, before the calling the target dynamic link library, the method further comprises:
Analyzing an OTX source file, and converting the OTX source file into a corresponding target code file; wherein the object code file contains the code of the dialog interface, a background variable corresponding to a dialog element of the dialog;
Compiling the target code file into the target dynamic link library.
In the embodiment of the application, the electronic device can acquire the OTX source file before starting the diagnosis client, and analyze the OTX source file through a preset OTX analysis tool. And calling a code conversion tool according to the analyzed content of the OTX source file, and converting the content in the OTX source file into a corresponding target code file. Illustratively, the object code file is a C++ code file.
The object code file contains the code of the dialog interface and fixed values corresponding to dialog elements of the dialog or background variables for storing dynamically changeable values. The code of the dialog box interface is obtained by converting the data content packaged by a dialog box label "openscreen" in the OTX source file, and the background variable corresponding to the dialog box element can be obtained by converting the data content packaged by a dialog box element label "title" and "message" in the OTX source file.
After the target code file is obtained, the target code file is compiled through a compiling tool, and a corresponding target dynamic link library is generated.
In the embodiment of the application, the OTX source file can be automatically converted into the corresponding target code file, and the target code file is compiled to generate the corresponding target dynamic link library, so that the electronic equipment can automatically analyze and realize the corresponding functional flow only by acquiring the OTX source file, thereby improving the flexibility and convenience of program operation.
Optionally, the parsing the OTX source file, converting the OTX source file into a corresponding object code file, includes:
analyzing an OTX source file, and when analyzing a dialog box label, creating a corresponding dialog box interface according to dialog box data packaged by the dialog box label;
selecting background variables corresponding to the target elements to set monitoring targets to obtain monitoring setting information;
And generating an object code file containing the dialog box interface, the background variable and the monitoring setting information.
In the embodiment of the application, after the OTX source file is acquired, the OTX source file is analyzed in sequence. When the dialog box label 'openscreen' is parsed, setting a corresponding dialog box interface according to the dialog box data packaged by the dialog box label. In one embodiment, the dialog data includes unique identification information for the dialog and individual dialog element values contained in the dialog; for the target element whose value is stored in the background variable, the initial value and the subsequent change value of the background variable are sequentially stored in the dialog box data according to the execution sequence. When the dialog box interface is set, corresponding background variables can be set for each dialog box element according to the execution sequence, and initial values corresponding to the background variables are transmitted into the dialog box interface; then, in the subsequent code, a function capable of changing the background variable and a change value of the background variable are written. And then, taking the unique identification information and background variables of each dialog box element as initialized interface parameters.
After the dialog box interface is created, a background variable corresponding to the target element can be selected from all background variables corresponding to dialog box elements contained in the dialog box to perform monitoring target setting, and monitoring setting information is obtained. In one embodiment, a background variable "title" corresponding to a title element in a dialog box and/or a background variable "message" corresponding to an information element are set as monitor target objects inherited from a monitor target class, and corresponding observer objects are set for the monitor target objects to monitor changes of the monitor target objects. The information of these interception target objects and the information of the observer objects are taken as interception setting information.
Illustratively, the listening object class has in particular three members:
m_ ObserverList, the list of observer objects to which the listening object binds.
M_ iState, the target string value of the target object is monitored;
m_ strObj, word the name of the snoop target object
And, there are four member functions:
binding function Attach, which is used to bind the observer object corresponding to the monitoring target object;
a clearing function Detach for clearing bound observer objects;
a notification function Notify for notifying the bound observer object that there is a change in the current listening object;
A function SetState is set to change the value of the snoop target object.
For example, for a background variable named "sc_param_ ttitle" corresponding to a dialog header element, the corresponding listening object may be defined by the following code:
ConcreteSubject sc_param_title;
After the monitoring target object is set, a preset observer object is correspondingly required to be created. Illustratively, the preset observer object may be defined by an observer class ConcreteObserve.
The observer ConcreteObserve class has three class members:
M_ strShowText, handle map of bound object and hint box.
M_ VSCREENARG, dialog box container for storing the values of the individual dialog box elements.
M_ vStrKey stores the value of the object for finding which object changed.
A member function:
and the Update function Update is used for dynamically updating the dialog box according to the changed value to inform the interface after receiving the notification.
After each monitoring target object is created and a preset observer object is created, for each monitoring target object, the monitoring target object and the preset observer object are bound by calling a binding function Attach of the monitoring target object.
According to the dialog box interface, the initial value and the change value of the background variable and the monitoring setting information, the corresponding object code file can be generated in a combined mode.
In the embodiment of the application, when the OTX source file is analyzed, the corresponding dialog box interface can be set according to the dialog box data of the dialog box label, and the background variable corresponding to the target element can be selected for monitoring target setting, so that the target code file containing the dialog box interface, the background variable and monitoring setting information can be accurately generated, and the target dynamic link library capable of monitoring the change of the target element can be accurately generated according to the target code file.
In one embodiment, after the object code file is generated and the corresponding object dynamic connection library is run, if the background variable of the object element needs to be changed, the update value is specifically input through the setting function SetState in the background variable set as the listening object according to the above. Then, the setting function SetState automatically calls a notification function Notify to Notify the name of the current changed background variable and the corresponding updated value to the observer object corresponding to the background variable. And the observer object acquires the name of the background variable which is currently changed and the corresponding updated value according to the notification of the notification function. Then, the observer object finds a background variable which is consistent with the name of the changed background variable in the dialog box container through the Update function Update thereof, and transmits a corresponding Update value to obtain an updated background variable, wherein the updated dialog box container is the updated dialog box container. And then taking the updated dialog box container as a new interface parameter of the dialog box interface, and recalling the dialog box interface to enable the interface to redisplay the dialog box according to the latest dialog box element value, thereby realizing the updating display of the dialog box element to be updated.
Optionally, before the parsing the OTX source file, the method further includes:
acquiring a vehicle identification code of a target vehicle;
uploading the vehicle identification code to a target server, and acquiring the OTX source file returned by the target server.
In the embodiment of the application, after receiving a diagnosis starting instruction and starting a client, the electronic equipment automatically sends a vehicle identification code (Vehicle Identification Number, VIN) reading instruction to a target vehicle. And then, acquiring a vehicle identification code returned by the target vehicle according to the VIN code reading instruction. After the vehicle identification code is acquired, the vehicle identification code is uploaded to a server.
The server of the embodiment of the application pre-stores the target diagnosis data packets corresponding to various vehicle types. The target diagnostic DATA packet includes at least an OTX source file, and may further include an ODX source file packet (PACKAGED ODX DATA, PDX), where ODX is an open diagnostic DATA exchange (Open Diagnostic Data Exchange, ODX) protocol. After the server acquires the vehicle identification code uploaded by the electronic equipment, the server determines the vehicle type information of the target vehicle according to the vehicle identification code. And then, according to the vehicle type information of the target vehicle, acquiring a target diagnosis data packet stored in association with the vehicle type information of the target vehicle from the diagnosis data packets stored in association with the vehicle type information, and returning the target diagnosis data packet to the electronic equipment. The electronic equipment receives the target diagnosis data packet and acquires the OTX source file from the target diagnosis data packet for analysis.
In the embodiment of the application, the vehicle identification code of the target vehicle can be acquired and sent to the server, and the target diagnosis data packet corresponding to the vehicle identification code is acquired, so that the OTX source file can be accurately acquired, and the corresponding target dynamic link library can be accurately generated according to the OTX source file.
Optionally, the method further comprises:
and when the preset condition is met, calling a dialog box to close an interface, and destroying the dialog box.
In one embodiment, the OTX source file may be a file describing a specific function flow of vehicle diagnosis, and the target dynamic link library is specifically a dynamic link library for implementing a specific function. The special functions are complex functions in vehicle diagnosis and are specially formulated according to vehicles of different vehicle types. In one embodiment, the special functions may include functions of motion testing, writing a vehicle identification code, matching a key, and the like. Correspondingly, in step S201, specifically, after the electronic device runs the diagnostic client, after detecting a start instruction for starting a special function, the target dynamic link library is called to implement the corresponding special function.
Correspondingly, the preset condition is that the special function is executed. When the preset condition is detected to be met, the target dynamic library calls a dialog box closing interface function closescreen to automatically destroy the currently displayed dialog box, so that system resources can be released in time.
Optionally, the updating and displaying the corresponding target element according to the updated background variable includes:
And sending the updated background variable to a display interface in a shared memory mode, so that the display interface updates and displays the dialog box, and the updated display of the target element is realized.
In the embodiment of the present application, in the self embodiment, the updated background variable may be updated into the dialog box handle of the created dialog box. And then, the dialog box handle is shared to the display interface in a memory sharing mode, so that the updated background variable can be sent to the display interface in a memory sharing mode. And the display interface refreshes the display of the dialog box according to the acquired updated background variable, so that the target element can display the value of the updated background variable, and the updated display of the target element is realized.
In the embodiment of the application, the updating display of the target element can be accurately and efficiently realized through a shared memory mechanism.
The target element may be a timing prompt message in a dialog box, and when a background variable corresponding to the timing prompt message is detected to change, the updated background variable may be updated, so as to dynamically display the timing prompt message in a timing manner.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Embodiment III:
fig. 3 is a schematic structural diagram of a dialog display device according to an embodiment of the present application, and for convenience of explanation, only a portion related to the embodiment of the present application is shown:
The dialog box display device includes: a detection unit 31 and an update unit 32. Wherein:
a detection unit 31, configured to detect, in a state in which a dialog box is displayed, whether a background variable corresponding to a target element in the dialog box changes; wherein the target element is a dialog box element set as a listening target.
And an updating unit 32, configured to update and display the corresponding target element according to the updated background variable if the background variable of the target element changes.
Optionally, the dialog box display device further includes:
The dynamic link library calling unit is used for calling the target dynamic link library; the target dynamic link library is a dynamic link library generated according to an OTX source file;
And the dialog box initializing unit is used for displaying a dialog box according to the initial value of the background variable of the preset dialog box element if the dialog box interface is detected in the target dynamic link library.
Optionally, the dialog box display device further includes:
The analysis unit is used for analyzing the OTX source file and converting the OTX source file into a corresponding target code file; wherein the object code file contains the code of the dialog interface, a background variable corresponding to a dialog element of the dialog;
and the compiling unit is used for compiling the target code file into the target dynamic link library.
Optionally, the parsing unit is specifically configured to parse the OTX source file, and create a corresponding dialog box interface according to dialog box data encapsulated by the dialog box label when parsing the dialog box label; selecting background variables corresponding to the target elements to set monitoring targets to obtain monitoring setting information; and generating an object code file containing the dialog box interface, the background variable and the monitoring setting information.
Optionally, the dialog box display device further includes:
a vehicle identification code acquisition unit configured to acquire a vehicle identification code of a target vehicle;
And the OTX source file acquisition unit is used for uploading the vehicle identification code to a target server and acquiring the OTX source file returned by the target server.
Optionally, the dialog box display device further includes:
and the dialog box destroying unit is used for calling a dialog box to close the interface when the preset condition is met, and destroying the dialog box.
Optionally, the updating unit is specifically configured to send the updated background variable to a display interface in a shared memory manner, so that the display interface updates and displays the dialog box, and update and display of the target element is implemented.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
Embodiment III:
Fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present application. As shown in fig. 4, the electronic apparatus 4 of this embodiment includes: a processor 40, a memory 41 and a computer program 42, such as a dialog box display program, stored in the memory 41 and executable on the processor 40. The steps of the respective dialog box display method embodiments described above, such as steps S101 to S102 shown in fig. 1, are implemented when the processor 40 executes the computer program 42. Or the processor 40, when executing the computer program 42, performs the functions of the modules/units in the above-described device embodiments, such as the functions of the detection unit 31 to the update unit 32 shown in fig. 3.
Illustratively, the computer program 42 may be partitioned into one or more modules/units that are stored in the memory 41 and executed by the processor 40 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments are used to describe the execution of the computer program 42 in the electronic device 4.
The electronic device 4 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The electronic device may include, but is not limited to, a processor 40, a memory 41. It will be appreciated by those skilled in the art that fig. 4 is merely an example of the electronic device 4 and is not meant to be limiting of the electronic device 4, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the electronic device may further include an input-output device, a network access device, a bus, etc.
The Processor 40 may be a central processing unit (Central Processing Unit, CPU), other general purpose Processor, digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the electronic device 4, such as a hard disk or a memory of the electronic device 4. The memory 41 may also be an external storage device of the electronic device 4, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the electronic device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 41 is used for storing the computer program and other programs and data required by the electronic device. The memory 41 may also be used for temporarily storing data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment 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, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/electronic device and method may be implemented in other manners. For example, the apparatus/electronic device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., 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 may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical 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 on 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 integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.
Claims (7)
1. A dialog box display method, comprising:
Detecting whether a background variable corresponding to a target element in a dialog box changes or not in a dialog box display state; wherein the target element is a dialog box element set as a listening target;
if yes, updating and displaying the corresponding target element according to the updated background variable;
Before detecting whether the background variable corresponding to the target element in the dialog box changes in the state of displaying the dialog box, the method further comprises:
calling a target dynamic link library; the target dynamic link library is a dynamic link library generated according to an OTX source file;
If the dialog box interface is detected in the target dynamic link library, displaying a dialog box according to the initial value of the background variable of the preset dialog box element;
before the calling the target dynamic link library, the method further comprises the following steps:
Analyzing an OTX source file, and converting the OTX source file into a corresponding target code file; the object code file comprises the dialog box interface, an initial value and a change value of the background variable and monitoring setting information;
Compiling the target code file into the target dynamic link library;
The parsing the OTX source file, converting the OTX source file into a corresponding object code file, includes:
analyzing an OTX source file, and when analyzing a dialog box label, creating a corresponding dialog box interface according to dialog box data packaged by the dialog box label;
Selecting background variables corresponding to the target elements to set monitoring targets to obtain monitoring setting information; setting a background variable corresponding to the target element as a monitoring target object inherited to a monitoring target class, setting a corresponding observer object for the monitoring target object to monitor the change of the monitoring target object, and taking the information of the monitoring target object and the information of the observer object as the monitoring setting information;
Generating an object code file containing the dialog box interface, the initial value and the change value of the background variable and the monitoring setting information; the dialog box data comprise unique identification information of dialog boxes and dialog box element values contained in the dialog boxes; for a target element with a value stored in a background variable, sequentially storing an initial value and a subsequent change value of the background variable in dialog box data according to an execution sequence; when the dialog box interface is set, setting corresponding background variables for each dialog box element according to the execution sequence, inputting initial values corresponding to the background variables into the dialog box interface, writing functions capable of enabling the background variables to change and changing values of the background variables into subsequent codes, and taking the unique identification information and the background variables of each dialog box element as initialized interface parameters.
2. The dialog box display method of claim 1, further comprising, prior to said parsing the OTX source file:
acquiring a vehicle identification code of a target vehicle;
uploading the vehicle identification code to a target server, and acquiring the OTX source file returned by the target server.
3. The dialog display method of claim 1, wherein the method further comprises:
and when the preset condition is met, calling a dialog box to close an interface, and destroying the dialog box.
4. The dialog box display method of claim 1, wherein updating the display of the corresponding target element based on the updated background variable comprises:
And sending the updated background variable to a display interface in a shared memory mode, so that the display interface updates and displays the dialog box, and the updated display of the target element is realized.
5. A kind of dialogue box display device, characterized by comprising the following steps:
The detection unit is used for detecting whether a background variable corresponding to a target element in a dialog box changes or not in a dialog box display state; wherein the target element is a dialog box element set as a listening target;
the updating unit is used for updating and displaying the corresponding target element according to the updated background variable if the background variable of the target element changes;
The dynamic link library calling unit is used for calling the target dynamic link library; the target dynamic link library is a dynamic link library generated according to an OTX source file;
A dialog box initializing unit, configured to display a dialog box according to an initial value of a background variable of a preset dialog box element if a dialog box interface is detected in the target dynamic link library;
before the calling the target dynamic link library, the method further comprises the following steps:
The analysis unit is used for analyzing the OTX source file and converting the OTX source file into a corresponding target code file; the object code file comprises the dialog box interface, an initial value and a change value of the background variable and monitoring setting information;
The compiling unit is used for compiling the target code file into the target dynamic link library;
The analysis unit is specifically configured to: analyzing an OTX source file, and when analyzing a dialog box label, creating a corresponding dialog box interface according to dialog box data packaged by the dialog box label; selecting background variables corresponding to the target elements to set monitoring targets to obtain monitoring setting information; setting a background variable corresponding to the target element as a monitoring target object inherited to a monitoring target class, setting a corresponding observer object for the monitoring target object to monitor the change of the monitoring target object, and taking the information of the monitoring target object and the information of the observer object as the monitoring setting information; generating an object code file containing the dialog box interface, the initial value and the change value of the background variable and the monitoring setting information; the dialog box data comprise unique identification information of dialog boxes and dialog box element values contained in the dialog boxes; for a target element with a value stored in a background variable, sequentially storing an initial value and a subsequent change value of the background variable in dialog box data according to an execution sequence; when the dialog box interface is set, setting corresponding background variables for each dialog box element according to the execution sequence, inputting initial values corresponding to the background variables into the dialog box interface, writing functions capable of enabling the background variables to change and changing values of the background variables into subsequent codes, and taking the unique identification information and the background variables of each dialog box element as initialized interface parameters.
6. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the computer program, when executed by the processor, causes the electronic device to implement the steps of the method of any one of claims 1 to 4.
7. A computer readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, causes an electronic device to carry out the steps of the method according to any one of claims 1 to 4.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111217676.2A CN113885997B (en) | 2021-10-19 | 2021-10-19 | Dialog box display method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111217676.2A CN113885997B (en) | 2021-10-19 | 2021-10-19 | Dialog box display method and device, electronic equipment and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113885997A CN113885997A (en) | 2022-01-04 |
| CN113885997B true CN113885997B (en) | 2024-09-10 |
Family
ID=79003709
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111217676.2A Active CN113885997B (en) | 2021-10-19 | 2021-10-19 | Dialog box display method and device, electronic equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113885997B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117931157A (en) * | 2024-01-30 | 2024-04-26 | 镁佳(北京)科技有限公司 | OTX language engine construction and editing method, device and computer equipment |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112519704A (en) * | 2020-12-18 | 2021-03-19 | 深圳市元征科技股份有限公司 | Vehicle diagnosis method, vehicle diagnosis device, computer equipment and storage medium |
| CN112667263A (en) * | 2021-01-05 | 2021-04-16 | 北京城市网邻信息技术有限公司 | Dynamic updating method and device of Flutter component, electronic equipment and storage medium |
Family Cites Families (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2970621B2 (en) * | 1997-10-20 | 1999-11-02 | 富士ゼロックス株式会社 | Display control device |
| US5870088A (en) * | 1996-05-09 | 1999-02-09 | National Instruments Corporation | System and method for editing a control via direct graphical user interaction |
| JP2004348600A (en) * | 2003-05-23 | 2004-12-09 | Sony Corp | Information processor and method, and program |
| US7721225B2 (en) * | 2005-05-03 | 2010-05-18 | Novell, Inc. | System and method for creating and presenting modal dialog boxes in server-side component web applications |
| WO2012042559A1 (en) * | 2010-09-28 | 2012-04-05 | 株式会社野村総合研究所 | Operation verification device, operation verification method, and operation verification program |
| JP6015648B2 (en) * | 2011-03-01 | 2016-10-26 | 富士通株式会社 | Web page update notification program, Web page update notification device, and Web page update notification method |
| CN102436339A (en) * | 2011-08-17 | 2012-05-02 | 北京数码大方科技有限公司 | Display control method and device for modal dialog box |
| CN102664748B (en) * | 2012-03-28 | 2014-07-09 | 中国人民解放军国防科学技术大学 | Interactive electronic technical manual-based online fault diagnosis equipment and online fault diagnosis method |
| US9256651B1 (en) * | 2013-09-24 | 2016-02-09 | Emc Corporation | Inheritance of properties files with locale chain support |
| CN109426540B (en) * | 2017-08-29 | 2021-07-30 | 北京国双科技有限公司 | Element click condition detection method and device, storage medium and processor |
| CN108492346B (en) * | 2018-03-19 | 2022-03-18 | 思必驰科技股份有限公司 | Method and device for realizing chart assembly |
| US10853703B2 (en) * | 2018-06-06 | 2020-12-01 | Carbyne Ltd. | Systems and methods for interfacing between software components |
| CN108965052A (en) * | 2018-07-02 | 2018-12-07 | 上海稊米汽车科技有限公司 | A kind of data reading system for the electronic control unit software debugging after entrucking |
| CN111897532A (en) * | 2020-07-27 | 2020-11-06 | 上海宏路数据技术股份有限公司 | Page element monitoring method, electronic device and medium |
| CN112304334B (en) * | 2020-09-19 | 2023-12-22 | 中国航空工业集团公司洛阳电光设备研究所 | Navigation component precision calculation method based on MFC dialog box |
| CN112905281A (en) * | 2021-02-08 | 2021-06-04 | 北京字跳网络技术有限公司 | View display method and device, electronic equipment and storage medium |
| CN113377614B (en) * | 2021-06-08 | 2023-07-25 | 北京百度网讯科技有限公司 | Method, device, electronic device and storage medium for generating call chain information |
-
2021
- 2021-10-19 CN CN202111217676.2A patent/CN113885997B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112519704A (en) * | 2020-12-18 | 2021-03-19 | 深圳市元征科技股份有限公司 | Vehicle diagnosis method, vehicle diagnosis device, computer equipment and storage medium |
| CN112667263A (en) * | 2021-01-05 | 2021-04-16 | 北京城市网邻信息技术有限公司 | Dynamic updating method and device of Flutter component, electronic equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113885997A (en) | 2022-01-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112445490B (en) | File sequence processing method, device, terminal equipment and storage medium | |
| CN109359194B (en) | Method and apparatus for predicting information categories | |
| US20150026666A1 (en) | Analysis system, analysis method, and computer program product | |
| Nikolov et al. | Conceptualization and scalable execution of big data workflows using domain-specific languages and software containers | |
| CN112729868A (en) | Vehicle diagnosis method, device, equipment and medium | |
| CN112527848A (en) | Multi-data-source-based report data query method, device, system and storage medium | |
| CN111343181A (en) | Message processing method and system, data pool and computer readable storage medium | |
| CN110866152A (en) | Fault code retrieval method and device, electronic equipment and readable storage medium | |
| CN113885997B (en) | Dialog box display method and device, electronic equipment and storage medium | |
| CN111177541A (en) | Data analysis method and device based on user tag generation time, server and storage medium | |
| CN110018845B (en) | Metadata version comparison method and device | |
| US20120060150A1 (en) | High performance execution in workflow bpm engine | |
| CN113419738A (en) | Interface document generation method and device and interface management equipment | |
| CN116432624A (en) | Micro-service API document generation method, device, equipment and storage medium | |
| CN115277421B (en) | Configuration information pushing method, device, electronic equipment and computer readable medium | |
| US20130339834A1 (en) | Dynamic presentation of a results set by a form-based software application | |
| CN110377331B (en) | Monitoring method, device, equipment and storage medium for issuing application program | |
| Camilli et al. | Event-based runtime verification of temporal properties using time basic petri nets | |
| CN118113963A (en) | Dynamic page generation method and device, electronic equipment and storage medium | |
| CN114721855A (en) | Vehicle diagnosis method, apparatus, device, and medium | |
| CN113935847A (en) | Online process risk processing method, device, server and medium | |
| CN114116769A (en) | Port alarm device and method for asset management platform | |
| CN112527443A (en) | Prompt box display method and device, electronic equipment and computer readable storage medium | |
| Frey et al. | MAMBA: A measurement architecture for model-based analysis | |
| CN116594960B (en) | Descriptive file format conversion method, descriptive file format conversion device, computer equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |