CN113885997A - 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 PDF

Info

Publication number
CN113885997A
CN113885997A CN202111217676.2A CN202111217676A CN113885997A CN 113885997 A CN113885997 A CN 113885997A CN 202111217676 A CN202111217676 A CN 202111217676A CN 113885997 A CN113885997 A CN 113885997A
Authority
CN
China
Prior art keywords
dialog box
target
dialog
otx
display
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
CN202111217676.2A
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.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch 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 Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN202111217676.2A priority Critical patent/CN113885997A/en
Publication of CN113885997A publication Critical patent/CN113885997A/en
Pending legal-status Critical Current

Links

Images

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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • 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/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME 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/00Registering or indicating the working of vehicles
    • G07C5/08Registering or indicating performance data other than driving, working, idle, or waiting time, with or without registering driving, working, idle or waiting time
    • G07C5/0808Diagnosing performance data

Abstract

The application is applicable to the technical field of computers, and provides a dialog box display method, a dialog box display device, an electronic device 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 element set as a listening target; and if so, updating and displaying the corresponding target element according to the updated background variable. The embodiment of the application can accurately realize dynamic display of the dialog box.

Description

Dialog box display method and device, electronic equipment and storage medium
Technical Field
The present application belongs to the field of computer technologies, and in particular, to a dialog box display method and apparatus, an electronic device, and a storage medium.
Background
Currently, in many applications, the values of dialog elements in a dialog box can only be fixedly displayed according to initial settings, and dynamic display of the dialog box is difficult to achieve.
For example, during the execution of a vehicle diagnostic function, dialog boxes are often presented to prompt a user to perform a vehicle diagnostic operation. In an Open Test sequence eXchange (OTX) source file, a tag (simply referred to as a dialog box tag) for encapsulating data of a dialog box is "openscreen", the dialog box tag internally includes sub-tags such as "title" and "message", and the sub-tags are used for encapsulating data of a title and prompt information presented by the dialog box. However, because a dialog box is created in the process of analyzing the "openescreen" tag, when the title "and the prompt information" message "in the subsequent" openescreen "tag change, only the values of the" title "and the" message "are modified, and the openescreen tag does not appear, 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 dynamically display the title, the prompt information and other contents, thereby affecting the execution of the diagnostic process.
Disclosure of Invention
In view of this, embodiments of the present application provide a dialog box display method, an apparatus, an electronic device, and a storage medium, so as to solve the problem in the prior art of how to accurately implement dynamic display of a 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 element set as a listening target;
and if so, updating and displaying the corresponding target element according to the updated background variable.
Optionally, before detecting whether a background variable corresponding to a 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 the dialog box according to the initial value of the background variable of the preset dialog box element.
Optionally, before the invoking the target dynamic link library, the method further includes:
analyzing an OTX source file, and converting the OTX source file into a corresponding target code file; wherein the object code file contains code of the dialog interface, background variables corresponding to dialog elements of the dialog;
compiling the object code file into the object dynamic link library.
Optionally, the parsing the OTX source file, and converting the OTX source file into a corresponding object code file includes:
analyzing an OTX source file, and when a dialog box label is analyzed, creating a corresponding dialog box interface according to dialog box data packaged by the dialog box label;
selecting a background variable corresponding to the target element to perform monitoring target setting to obtain monitoring setting information;
and generating a target code file containing the dialog box interface, the background variable and the monitoring setting information.
Optionally, before the parsing the OTX source file, further comprising:
acquiring a vehicle identification code of a target vehicle;
and 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 the 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 memory sharing mode so that the dialog box is updated and displayed on the display interface, and the target element is updated and displayed.
A second aspect of an embodiment of the present application provides a dialog display device, including:
the detection unit is used for detecting whether background variables corresponding to target elements in the dialog box change or not in the display state of the dialog box; wherein the target element is a dialog 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 comprises:
the dynamic link library calling unit is used for calling a 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 initialization unit is used for displaying the 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 apparatus 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 code of the dialog interface, background variables corresponding to dialog elements of the dialog;
and the compiling unit is used for compiling the object code file into the object dynamic link library.
Optionally, the parsing unit is specifically configured to parse an OTX source file, and when a dialog box tag is parsed, create a corresponding dialog box interface according to dialog box data encapsulated by the dialog box tag; selecting a background variable corresponding to the target element to perform monitoring target setting to obtain monitoring setting information; and generating a target code file containing the dialog box interface, the background variable and the monitoring setting information.
Optionally, the dialog box display apparatus further includes:
a vehicle identification code acquisition unit for acquiring 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 apparatus further includes:
and the dialog box destroying unit is used for calling a dialog box closing interface and destroying the dialog box when a preset condition is met.
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 the updated display of the target element is achieved.
A third aspect of embodiments of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, causes the electronic device to implement the steps of the dialog display method as described.
A fourth aspect of 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 the steps of the dialog display method as described.
A fifth aspect of embodiments of the present application provides a computer program product, which, when run on an electronic device, causes the electronic device to execute the dialog display method according to any one of the first aspects.
Compared with the prior art, the embodiment of the application has the advantages that: in the embodiment of the present application, some dialog elements in a dialog are set as listening targets in advance, and these dialog elements set as listening targets are referred to as target elements. And then, in the state of displaying the dialog box, if the background variable corresponding to the target element in the dialog box is detected to be changed, automatically updating and displaying the target element according to the updated background variable. Due to the fact that the target can be monitored, when background variables corresponding to the target elements change, updating display of the target elements can be automatically detected, dynamic updating display of the dialog box can be timely achieved, and flexibility and accuracy of dialog box display are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the embodiments or the description of the prior art will be briefly described below.
Fig. 1 is a schematic flow chart of an implementation of a first dialog box display method provided in an embodiment of the present application;
fig. 2 is a schematic flow chart of an implementation of a first dialog box display method provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of a dialog box 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 particular system structures, 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 explain the technical solution described in the present application, the following description will be given by way of specific examples.
It will 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 present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application 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 this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In addition, in the description of the present application, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Currently, during the execution of the vehicle diagnostic function, dialog boxes are often presented to prompt the user to operate the vehicle diagnostic process. In an OTX source file, a tag (simply referred to as a dialog box tag) for encapsulating data of a dialog box is "openscreen", the dialog box tag internally includes sub-tags such as "title" and "message", and the sub-tags are used for encapsulating data of a title and prompt information presented by the dialog box. However, a dialog box is created in the process of analyzing the "openescreen" tag, when the title "and the prompt information" message "in the subsequent" openescreen "tag are changed, only the values of background variables of the" title "and the" message "are modified, and the openescreen tag does not appear, so that the dialog box element of the previously created prompt dialog box cannot be changed, and therefore when the diagnostic function flow is executed according to the OTX source file, the dialog box cannot dynamically display the dialog box elements such as the title, the prompt information and the like, and the execution of the diagnostic flow is affected.
In order to solve the above technical problem, embodiments of the present application provide a dialog box display method, apparatus, electronic device, and storage medium, where in a dialog box display state, whether a background variable corresponding to a target element in the dialog box changes is detected; wherein the target element is a dialog element set as a listening target; and if so, updating and displaying the corresponding target element according to the updated background variable. Due to the fact that the target can be monitored, when background variables corresponding to the target elements change, updating display of the target elements can be automatically detected, dynamic updating display of the dialog box can be timely achieved, and flexibility and accuracy of dialog box display are improved.
The first embodiment is as follows:
fig. 1 shows a flowchart of a first dialog box display method provided in an embodiment of the present application, where an execution subject of the dialog box display method is an electronic device, and the dialog box display method is described in detail as follows:
in S101, 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 element set as a listening target.
In the embodiment of the application, the dialog box is displayed on the interface of the client after calling the interface function of the dialog box through the client installed in the electronic equipment 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 background program that may represent the text content, dialog element size, color, font, etc. that the dialog element is to display. The value can be a fixed value directly or 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".
Generally, when a dialog box is initially displayed, the initial display of the corresponding dialog box element may be implemented according to the initial value of the background variable. Subsequently, when the value corresponding to the background variable changes, the dialog box usually cannot know the change, so that it is difficult for the dialog box 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 a dialog, dialog elements that need to be dynamically displayed are set as a listening target in advance, and the dialog elements that are set as the listening target are referred to as target elements. And then, the client can detect whether the background variable of the target element changes in real time when the dialog box is opened and is in a display state.
In one embodiment, when creating the code corresponding to the dialog box, the background variable corresponding to the target element in the dialog box may be set as 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 background program can monitor whether the target object changes in real time, thereby realizing the monitoring of background variables of the target element. Wherein, a watcher object (watcher observer) refers to an object inherited to a watcher class in the watcher mode, where the object refers to an entity with a class attribute in an object-oriented programming language, which contains data to be operated on and a method by which the data can be operated on.
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 be changed, 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 background variables can be obtained through monitoring by the observer object in the observer mode, so as to realize the updated display of the target element.
In the embodiment of the application, due to the fact that the target is monitored, when the background variable corresponding to the target element changes, the update display of the target element can be automatically detected, dynamic update display of the dialog box can be timely achieved, and flexibility and accuracy of dialog box display are improved.
Example two:
fig. 2 is a flowchart illustrating a second dialog box display method provided in 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 in the embodiment of the application is further improved on the basis of the method in the first embodiment, and the same parts as the first embodiment are not described again. The dialog display method shown in fig. 2 is detailed 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 in advance according to a preset OTX source file.
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. After the electronic equipment starts the vehicle diagnosis client, the diagnosis function dynamic link library is called to start to execute the diagnosis function.
In S202, if a dialog interface is detected in the target dynamic link library, the dialog is displayed according to an initial value of a background variable of a preset dialog element.
After the target dynamic link library is called, when the target dynamic link library is operated in a background, if a dialog box interface is detected, the initial display of the dialog box is realized according to the initial value of a background variable stored in the target dynamic link library.
Illustratively, in the execution flow of the target dynamic link library, if an interface function named "openescreen" is detected, it is determined that a dialog box interface is currently detected, and a corresponding dialog box is created and initialized to be displayed according to interface parameters of the dialog box interface. Interface parameters of the dialog box interface comprise initial values of background variables corresponding to the dialog box elements, and the initial display of the dialog box elements corresponding to the dialog box is achieved according to the initial values of the background variables.
In S203, 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 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 by calling the target dynamic link library and when the dialog box interface is detected, so that the initial display of the dialog box can be flexibly and conveniently realized.
Optionally, before the invoking the target dynamic link library, the method further includes:
analyzing an OTX source file, and converting the OTX source file into a corresponding target code file; wherein the object code file contains code of the dialog interface, background variables corresponding to dialog elements of the dialog;
compiling the object code file into the object 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 content of the analyzed 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 either fixed values corresponding to the 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 the 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 the dialog box element label 'title' and 'message' in the OTX source file.
And after the object code file is obtained, compiling the object code file through a compiling tool to generate a corresponding object dynamic link library.
In the embodiment of the application, the OTX source file can be automatically converted into the corresponding object code file, and the object code file is compiled to generate the corresponding object dynamic link library, so that the electronic equipment can automatically analyze and realize the corresponding functional process only by acquiring the OTX source file, and therefore, the flexibility and convenience of program operation can be improved.
Optionally, the parsing the OTX source file, and converting the OTX source file into a corresponding object code file includes:
analyzing an OTX source file, and when a dialog box label is analyzed, creating a corresponding dialog box interface according to dialog box data packaged by the dialog box label;
selecting a background variable corresponding to the target element to perform monitoring target setting to obtain monitoring setting information;
and generating a target 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 obtained, the OTX source file is analyzed in sequence. And when the dialog box label 'openscreen' is analyzed, setting a corresponding dialog box interface according to dialog box data encapsulated by the dialog box label. In one embodiment, the dialog data includes unique identification information for the dialog and the values of the individual dialog elements that the dialog contains; for the target element with the value 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; and writing a function which can change the background variable and a change value of the background variable into the subsequent code. 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, the background variables corresponding to the target elements can be selected from the background variables corresponding to the 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 topic element and/or a background variable "message" corresponding to an information element in a dialog box are set as monitoring target objects inherited to a monitoring target class, and corresponding observer objects are set for the monitoring target objects for monitoring changes of the monitoring target objects. The information of these interception target objects and the information of the observer objects are taken as interception setting information.
Illustratively, the snoop target class is specified by three members:
m _ observer list, the list of observer objects to which the listening target object binds.
m _ iState, which monitors the target string value of the target object;
m _ strObj, the name of the snooping target object
And, there are four member functions:
a binding function Attach for binding the observer object corresponding to the monitoring target object;
a clearing function Detach for clearing the bound observer object;
a notification function Notify, configured to Notify the bound observer object that there is a change in the currently monitored target object;
a function SetState is set for changing the value of the interception target object.
Illustratively, for a background variable named "sc _ param _ tte" corresponding to a dialog box header element, a corresponding listening target 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 created. Illustratively, the preset observer object may be defined by an observer class concreteObserve.
The observer concrete observer class has three class members:
m _ strShowText, bound object and handle mapping of the hint box.
M _ vScreenArg, a dialog container for storing values of individual dialog elements.
M _ vsrtrk, stores the value of an object for use in finding which object has changed.
A member function:
and the Update function Update is used for notifying the interface to dynamically Update the dialog box according to the changed value after receiving the notification.
After each monitoring target object is created and the 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.
And generating a corresponding target code file in a combined manner according to the dialog box interface, the initial value and the change value of the background variable and the monitoring setting information.
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 tag and the background variable corresponding to the target element is selected to perform monitoring target setting, so that a target code file including the dialog box interface, the background variable and monitoring setting information can be accurately generated, and a target dynamic link library capable of monitoring changes of the target element can be accurately generated according to the target code file.
In an embodiment, after the target code file is generated and the corresponding target dynamic link library is run, if the background variable of the target element needs to be changed, an update value is input specifically through the above-mentioned setting function SetState according to the background variable set as the monitoring target object. And then, setting a function SetState to automatically call a notification function Notify, and notifying the name of the background variable which is changed currently and the corresponding update value to the observer object corresponding to the background variable. And the observer object acquires the name of the background variable which is changed currently and the corresponding update value according to the notification of the notification function. Then, the observer object finds the background variable consistent with the name of the changed background variable in the dialog box container through the Update function Update, and transmits the corresponding Update value to obtain the 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, so that the interface can redisplay the dialog box according to the latest value of the dialog box element, thereby realizing the updated display of the dialog box element to be updated.
Optionally, before the parsing the OTX source file, further comprising:
acquiring a vehicle identification code of a target vehicle;
and 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 the diagnosis starting instruction and starting the client, the electronic device automatically sends a Vehicle Identification Number (VIN) reading instruction to the target Vehicle. And then, acquiring the vehicle identification code returned by the target vehicle according to the VIN code reading instruction. And after the vehicle identification code is acquired, uploading the vehicle identification code to a server.
The server of the embodiment of the application prestores target diagnosis data packets corresponding to various vehicle types. The target Diagnostic DATA packet at least includes 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 (ODX) protocol. After the server obtains the vehicle identification code uploaded by the electronic equipment, the vehicle type information of the target vehicle is determined according to the vehicle identification code. And then, according to the model information of the target vehicle, acquiring a target diagnosis data packet stored in association with the model information of the target vehicle from the diagnosis data packet stored in association with the model information of the target vehicle, and returning the target diagnosis data packet to the electronic equipment. And 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 subsequently according to the OTX source file.
Optionally, the method further comprises:
and when the preset condition is met, calling a dialog box to close the interface, and destroying the dialog box.
In one embodiment, the OTX source file may be a file for describing a special function flow of vehicle diagnosis, and the target dynamic link library is specifically a dynamic link library for implementing a special function. The special function is a function which is complex in vehicle diagnosis and needs to be specially formulated according to vehicles of different vehicle types. In one embodiment, the special functions may include action testing, writing a vehicle identification code, matching keys, and the like. Correspondingly, in step S201, after the diagnostic client is operated and a start instruction for starting the special function is detected, the target dynamic link library is called to implement the corresponding special function.
Correspondingly, the preset condition is that the execution of the special function is finished. When the preset condition is met, the target dynamic library calls the dialog box to close the interface function closescreen, and the dialog box displayed currently is automatically destroyed, 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 memory sharing mode so that the dialog box is updated and displayed on the display interface, and the target element is updated and displayed.
In the embodiment of the present application, in the embodiment, the updated background variable may be updated to the dialog handle of the created dialog. 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 the 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.
According to the embodiment of the application, the target element can be accurately and efficiently updated and displayed through a shared memory mechanism.
Illustratively, the target element may be timing prompt information in a dialog box, and when detecting that a background variable corresponding to the timing prompt information changes, the background variable may be updated to implement dynamic display of the timing prompt information in a timed manner.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Example three:
fig. 3 is a schematic structural diagram of a dialog box display device according to an embodiment of the present application, and for convenience of description, only the portions related to the embodiment of the present application are shown:
the dialog box display device includes: a detection unit 31 and an update unit 32. Wherein:
the detection unit 31 is configured to detect whether a background variable corresponding to a target element in a dialog box changes in a state where the dialog box is displayed; wherein the target element is a dialog element set as a listening target.
And the updating unit 32 is 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 comprises:
the dynamic link library calling unit is used for calling a 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 initialization unit is used for displaying the 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 apparatus 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 code of the dialog interface, background variables corresponding to dialog elements of the dialog;
and the compiling unit is used for compiling the object code file into the object dynamic link library.
Optionally, the parsing unit is specifically configured to parse an OTX source file, and when a dialog box tag is parsed, create a corresponding dialog box interface according to dialog box data encapsulated by the dialog box tag; selecting a background variable corresponding to the target element to perform monitoring target setting to obtain monitoring setting information; and generating a target code file containing the dialog box interface, the background variable and the monitoring setting information.
Optionally, the dialog box display apparatus further includes:
a vehicle identification code acquisition unit for acquiring 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 apparatus further includes:
and the dialog box destroying unit is used for calling a dialog box closing interface and destroying the dialog box when a preset condition is met.
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 the updated display of the target element is achieved.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
Example three:
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 display program, stored in said memory 41 and operable on said processor 40. The processor 40, when executing the computer program 42, implements the steps in the above-described respective dialog display method embodiments, such as the steps S101 to S102 shown in fig. 1. Alternatively, the processor 40 executes the computer program 42 to implement the functions of the modules/units in the 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 accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 42 in the electronic device 4.
The electronic device 4 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The electronic device may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is merely an example of an electronic device 4 and does not constitute a limitation of the electronic device 4 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the electronic device may also include input-output devices, network access devices, buses, etc.
The Processor 40 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. 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 Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and 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 to temporarily store 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-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
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 implementation. 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 ways. For example, the above-described apparatus/electronic device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

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 element set as a listening target;
and if so, updating and displaying the corresponding target element according to the updated background variable.
2. The dialog display method of claim 1, wherein before detecting whether a background variable corresponding to a target element in the dialog changes in the state in which the dialog is displayed, 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;
and if the dialog box interface is detected in the target dynamic link library, displaying the dialog box according to the initial value of the background variable of the preset dialog box element.
3. The dialog display method of claim 2 further comprising, prior to said invoking the target dynamic link library:
analyzing an OTX source file, and converting the OTX source file into a corresponding target code file; wherein the object code file contains code of the dialog interface, background variables corresponding to dialog elements of the dialog;
compiling the object code file into the object dynamic link library.
4. The dialog display method of claim 3 wherein said parsing the OTX source file, converting the OTX source file into a corresponding object code file comprises:
analyzing an OTX source file, and when a dialog box label is analyzed, creating a corresponding dialog box interface according to dialog box data packaged by the dialog box label;
selecting a background variable corresponding to the target element to perform monitoring target setting to obtain monitoring setting information;
and generating a target code file containing the dialog box interface, the background variable and the monitoring setting information.
5. The dialog display method of claim 3 further comprising, prior to said parsing the OTX source file:
acquiring a vehicle identification code of a target vehicle;
and uploading the vehicle identification code to a target server, and acquiring the OTX source file returned by the target server.
6. The dialog display method of claim 2, further comprising:
and when the preset condition is met, calling a dialog box to close the interface, and destroying the dialog box.
7. The dialog box display method of claim 1, wherein said updating the display of the corresponding target element according to the updated background variable comprises:
and sending the updated background variable to a display interface in a memory sharing mode so that the dialog box is updated and displayed on the display interface, and the target element is updated and displayed.
8. A dialog display device, comprising:
the detection unit is used for detecting whether background variables corresponding to target elements in the dialog box change or not in the display state of the dialog box; wherein the target element is a dialog 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.
9. 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 carry out the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, causes an electronic device to carry out the steps of the method according to any one of claims 1 to 7.
CN202111217676.2A 2021-10-19 2021-10-19 Dialog box display method and device, electronic equipment and storage medium Pending CN113885997A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111217676.2A CN113885997A (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 CN113885997A (en) 2021-10-19 2021-10-19 Dialog box display method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113885997A true CN113885997A (en) 2022-01-04

Family

ID=79003709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111217676.2A Pending CN113885997A (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) CN113885997A (en)

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10105006A (en) * 1997-10-20 1998-04-24 Fuji Xerox Co Ltd Recorder
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
US20060253799A1 (en) * 2005-05-03 2006-11-09 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
CN102436339A (en) * 2011-08-17 2012-05-02 北京数码大方科技有限公司 Display control method and device for modal dialog boxes
CN102664748A (en) * 2012-03-28 2012-09-12 中国人民解放军国防科学技术大学 Interactive electronic technical manual-based online fault diagnosis equipment and online fault diagnosis method
US20140006932A1 (en) * 2011-03-01 2014-01-02 Fujitsu Limited Web page update notification device and web page update notification method
US9256651B1 (en) * 2013-09-24 2016-02-09 Emc Corporation Inheritance of properties files with locale chain support
CN108492346A (en) * 2018-03-19 2018-09-04 苏州思必驰信息科技有限公司 Realize the method and device of chart components
CN108965052A (en) * 2018-07-02 2018-12-07 上海稊米汽车科技有限公司 A kind of data reading system for the electronic control unit software debugging after entrucking
CN109426540A (en) * 2017-08-29 2019-03-05 北京国双科技有限公司 The click condition detection method and device of element, storage medium, processor
US20190377989A1 (en) * 2018-06-06 2019-12-12 Carbyne Ltd. Systems and methods for interfacing between software components
CN111897532A (en) * 2020-07-27 2020-11-06 上海宏路数据技术股份有限公司 Page element monitoring method, electronic device and medium
CN112304334A (en) * 2020-09-19 2021-02-02 中国航空工业集团公司洛阳电光设备研究所 Navigation component precision calculation method based on MFC dialog box
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
CN112905281A (en) * 2021-02-08 2021-06-04 北京字跳网络技术有限公司 View display method and device, electronic equipment and storage medium
CN113377614A (en) * 2021-06-08 2021-09-10 北京百度网讯科技有限公司 Generation method and device of call chain information, electronic equipment and storage medium

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5870088A (en) * 1996-05-09 1999-02-09 National Instruments Corporation System and method for editing a control via direct graphical user interaction
JPH10105006A (en) * 1997-10-20 1998-04-24 Fuji Xerox Co Ltd Recorder
JP2004348600A (en) * 2003-05-23 2004-12-09 Sony Corp Information processor and method, and program
US20060253799A1 (en) * 2005-05-03 2006-11-09 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
US20140006932A1 (en) * 2011-03-01 2014-01-02 Fujitsu Limited 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 boxes
CN102664748A (en) * 2012-03-28 2012-09-12 中国人民解放军国防科学技术大学 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
CN109426540A (en) * 2017-08-29 2019-03-05 北京国双科技有限公司 The click condition detection method and device of element, storage medium, processor
CN108492346A (en) * 2018-03-19 2018-09-04 苏州思必驰信息科技有限公司 Realize the method and device of chart components
US20190377989A1 (en) * 2018-06-06 2019-12-12 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
CN112304334A (en) * 2020-09-19 2021-02-02 中国航空工业集团公司洛阳电光设备研究所 Navigation component precision calculation method based on MFC dialog box
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
CN112905281A (en) * 2021-02-08 2021-06-04 北京字跳网络技术有限公司 View display method and device, electronic equipment and storage medium
CN113377614A (en) * 2021-06-08 2021-09-10 北京百度网讯科技有限公司 Generation method and device of call chain information, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
佚名: "使用Vue-TreeSelect组件的时候,用watch变量方式解决弹出编辑对话框界面无法触发更新的问题", Retrieved from the Internet <URL:https://www.cnblogs.com/wuhuacong/p/14684341.html> *
姜飞;谢致龙;岳蕊霞;: "对话框方式下的DLL软件混合编程与工程运用", 电气传动, no. 05, 20 May 2007 (2007-05-20) *

Similar Documents

Publication Publication Date Title
AU2014202907B2 (en) Migration Assessment for Cloud Computing Platforms
US5991536A (en) Object-oriented tool for registering objects for observation and causing notifications to be made in the event changes are made to an object which is being observed
CN107295064B (en) Web-based configuration type remote monitoring method, electronic equipment and storage medium
US20110161063A1 (en) Method, computer program product and apparatus for providing an interactive network simulator
US11586772B2 (en) Method and device for displaying information
US10667103B2 (en) Method and apparatus for software defined sensing
CN111026634A (en) Interface automation test system, method, device and storage medium
CN102135880A (en) Widget Framework
CN110110306B (en) Data display method and device, terminal and computer readable storage medium
CN115082247B (en) System production method, device, equipment, medium and product based on label library
CN112667307A (en) Extension method and extension device based on el-tabs
CN112100239A (en) Portrait generation method and apparatus for vehicle detection device, server and readable storage medium
CN111752820B (en) gRPC interface pressure test method, computer equipment and storage medium
CN114895935A (en) Method and device for flashing vehicle ECU, electronic equipment and storage medium
US20180060457A1 (en) Method and system for comparing block diagrams
CN109976744B (en) Visual programming method, system and terminal equipment
US9104573B1 (en) Providing relevant diagnostic information using ontology rules
CN112445490A (en) File sequence processing method and device, terminal equipment and storage medium
CN113885997A (en) Dialog box display method and device, electronic equipment and storage medium
CN116432624A (en) Micro-service API document generation method, device, equipment and storage medium
US10924362B2 (en) Management of software bugs in a data processing system
CN111580887B (en) Method, device, equipment and storage medium for acquiring PSU asset information
CN114095523B (en) Communication data processing method, device and system in comprehensive scheduling system
CN111813566B (en) Cross-process dragging method, device, equipment and computer readable storage medium
CN112949258A (en) Data processing method and device, electronic 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