CN111083563B - Debugging method and device of television UI (user interface) control, television and storage medium - Google Patents

Debugging method and device of television UI (user interface) control, television and storage medium Download PDF

Info

Publication number
CN111083563B
CN111083563B CN201911403631.7A CN201911403631A CN111083563B CN 111083563 B CN111083563 B CN 111083563B CN 201911403631 A CN201911403631 A CN 201911403631A CN 111083563 B CN111083563 B CN 111083563B
Authority
CN
China
Prior art keywords
information
control
instruction
preset
debugging
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
Application number
CN201911403631.7A
Other languages
Chinese (zh)
Other versions
CN111083563A (en
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 Kangguan Intelligent Technology Co ltd
Original Assignee
Shenzhen Kangguan Intelligent 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 Kangguan Intelligent Technology Co ltd filed Critical Shenzhen Kangguan Intelligent Technology Co ltd
Priority to CN201911403631.7A priority Critical patent/CN111083563B/en
Publication of CN111083563A publication Critical patent/CN111083563A/en
Application granted granted Critical
Publication of CN111083563B publication Critical patent/CN111083563B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/485End-user interface for client configuration

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention discloses a debugging method and device of a television UI control, a television and a storage medium, wherein the method comprises the steps of calling a preset callback function if a serial interface is detected to receive a control debugging instruction sent by a server; receiving serial port instruction information forwarded by the serial interface, and realizing interrupt processing on the received serial port instruction information according to the preset callback function to obtain intermediate information; analyzing the intermediate information according to a preset processing rule to obtain a target instruction, an ID address of a control to be processed and target position information; calling a corresponding preset application program interface according to the target instruction; and debugging the control to be processed according to the called application program interface, the ID address of the control to be processed and the target position information. The method and the device can quickly debug the television UI control in real time, and improve the working efficiency and the user experience.

Description

Debugging method and device of television UI (user interface) control, television and storage medium
Technical Field
The invention relates to the technical field of televisions, in particular to a method and a device for debugging a television UI control, a television and a storage medium.
Background
At present, smart televisions in the market are the mainstream of user selection, and are provided with an intelligent operating system convenient for user operation. The television without the operating system is a member of the low-end market field, and even if the television has inferior functions to the smart television, the television still has certain user selection. In general, when one conducts debugging management of a television without an operating system, it is necessary to modify software code or the like provided on the television itself. Particularly, for the adjustment of the coordinates of the UI control of the tv without the os, the current method of modifying the relevant software codes to perform upgrade validation is used to adjust the coordinates of the UI control of the tv, and this method of modifying and compiling the software codes not only wastes a lot of time, but also brings great inconvenience to the user.
Disclosure of Invention
The embodiment of the invention provides a method and a device for debugging a television UI control, a television and a storage medium, which can quickly debug the television UI control in real time and improve the working efficiency and the user experience.
In a first aspect, an embodiment of the present invention provides a method for debugging a UI control of a television, where the method includes:
if the fact that the serial interface receives a control debugging instruction sent by a server is detected, calling a preset callback function, wherein the control debugging instruction comprises serial port instruction information;
receiving serial port instruction information forwarded by the serial interface, and realizing interrupt processing on the received serial port instruction information according to the preset callback function to obtain intermediate information;
analyzing the intermediate information according to a preset processing rule to obtain a target instruction, an ID address of a control to be processed and target position information, wherein different target instructions are associated with different preset application program interfaces;
calling a corresponding preset application program interface according to the target instruction;
and debugging the control to be processed according to the called application program interface, the ID address of the control to be processed and the target position information.
In a second aspect, an embodiment of the present invention further provides a device for debugging a UI control of a television, where the device includes:
the function calling unit is used for calling a preset callback function if detecting that the serial interface receives a control debugging instruction sent by the server, wherein the control debugging instruction comprises serial port instruction information;
the information processing unit is used for receiving the serial port instruction information forwarded by the serial interface and realizing the interrupt processing of the received serial port instruction information according to the preset callback function so as to obtain intermediate information;
the information analysis unit is used for analyzing the intermediate information according to a preset processing rule to obtain a target instruction, an ID address of the control to be processed and target position information, wherein different target instructions are associated with different preset application program interfaces;
the interface calling unit is used for calling a corresponding preset application program interface according to the target instruction;
and the debugging unit is used for debugging the control to be processed according to the called application program interface, the ID address of the control to be processed and the target position information.
In a third aspect, an embodiment of the present invention further provides a television, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the method when executing the computer program.
In a fourth aspect, the present invention further provides a storage medium storing a computer program, where the computer program can implement the above method when executed by a processor in a television.
The embodiment of the invention provides a method and a device for debugging a television UI control, a television and a storage medium. The method provided by the embodiment of the invention can be used for rapidly debugging the television UI control in real time, and the working efficiency and the user experience are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart illustrating a method for debugging a UI control of a television according to an embodiment of the present invention;
FIG. 2 is a schematic sub-flow chart of a method for debugging a UI control of a television according to an embodiment of the present invention;
fig. 3 is a sub-flow diagram of a method for debugging a UI control of a television according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for debugging a UI control of a television according to another embodiment of the present invention;
FIG. 5 is a schematic block diagram of a debugging apparatus for a television UI control provided by an embodiment of the present invention;
FIG. 6 is a schematic block diagram of an information processing unit of a debugging apparatus for a television UI control according to an embodiment of the present invention;
fig. 7 is a schematic block diagram of an information parsing unit of a debugging apparatus for a television UI control according to an embodiment of the present invention;
FIG. 8 is a schematic block diagram of a debugging apparatus for a television UI control according to another embodiment of the present invention;
fig. 9 is a schematic structural diagram of a television according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
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 invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention 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.
Referring to fig. 1, fig. 1 is a schematic flowchart of a method for debugging a UI control of a television according to an embodiment of the present invention. The method can be operated in a television or other terminals without an operating system. The terminal is in communication connection with the server through the serial interface. Specifically, as shown in fig. 1, the steps of the method include steps S101 to S105.
Step S101, if it is detected that the serial interface receives a control debugging instruction sent by the server, calling a preset callback function, wherein the control debugging instruction comprises serial port instruction information.
In this embodiment, if it is detected that the serial interface receives a control debugging instruction sent by the server through the serial protocol, at this time, a callback function that is registered and set in advance may be called. Generally, the control debugging instruction may include serial port instruction information, and the related operations on each control may be implemented by analyzing the serial port instruction information. For example, the spatial modulation instruction sent by the server may implement operations such as moving the coordinates of the UI control of the television without the operating system.
The preset callback function is a function called by a function pointer. If a function pointer (function address) is passed as a parameter to another function, when this pointer is used to call the function it points to, the pointed-to function is the callback function. The callback function is not directly called by the implementer of the function, but is called by another party when a specific event or condition occurs, for responding to the event or condition.
Optionally, the callback function may be an MDrv _ UART _ RecvHandler function, and the server sends a control debugging instruction to the serial interface of the terminal and then can be processed in the MDrv _ UART _ RecvHandler function.
And step S102, receiving the serial port instruction information forwarded by the serial interface, and realizing interrupt processing of the received serial port instruction information according to the preset callback function to obtain intermediate information.
In this embodiment, if the serial port instruction information forwarded by the serial interface is received, the received serial port instruction information may be subjected to terminal processing according to the called preset callback function, so as to obtain intermediate information.
As shown in FIG. 2, in one embodiment, the step S102 may include steps S201 to S204.
Step S201, receiving the 0 th byte of the serial port instruction information forwarded by the serial port.
In this embodiment, the serial port instruction information may be interrupted in the callback function. Wherein the callback function may be an MDrv _ UART _ RecvHandler function. Specifically, the terminal may receive the 0 th byte of the serial port instruction information forwarded by the serial interface first, and determine the 0 th byte first, so as to perform subsequent operations.
Step S202, judging whether the 0 th byte in the serial port instruction information is 0xAC according to the preset callback function.
In this embodiment, the terminal may further determine whether the 0 th byte is 0xAC according to the preset callback function. The AC is a data header, and when the AC is received, the serial port instruction information meets the requirement of the data header received this time, and at this time, the terminal can continue to receive the related information data. If the 0 th byte is not 0xAC, the data reception is not continued, i.e. the serial command message is received unsuccessfully.
Step S203, if yes, continue to receive the first byte and the second byte in the serial port instruction information, so as to determine the total instruction length of the serial port instruction information according to the received first byte and second byte.
In this embodiment, if the 0 th byte in the serial port instruction information is 0xAC, it indicates that data can be continuously received, that is, the first byte and the second byte in the serial port instruction information are continuously received, so as to determine the total instruction length of the serial port instruction information according to the received first byte and second byte
Specifically, when the first (0 th byte) data of 0xAC is received, the first byte and the second byte are continuously received, wherein, since the serial port instruction information can be relatively long (facilitating the expansion of the subsequent instruction), for example, may be longer than one byte, it may not be enough to use one byte to represent the total length of the instruction, so that two bytes are used to represent the total length of the total instruction, and there are high bytes and low bytes in two bytes. Therefore, the first byte is the high byte of the total length of the serial port instruction information this time, and the second byte is the low byte of the total length of the serial port instruction information this time. The total length of the serial port instruction information can be known through the first byte and the second byte, and the rest bytes are received according to the length to calculate the receiving until the information of the corresponding bytes is received.
Step S204, continuously receiving a corresponding number of bytes according to the determined total length of the instruction, and combining all the received bytes into an intermediate message.
In this embodiment, after the corresponding number of bytes is continuously received according to the determined total length of the instruction, all the received bytes can be combined into one intermediate information, so as to interrupt the serial port instruction information.
Step S103, analyzing the intermediate information according to a preset processing rule to obtain a target instruction, an ID address of the control to be processed and target position information, wherein different target instructions are associated with different preset application program interfaces.
In this embodiment, the terminal may analyze the intermediate information according to a preset processing rule, so as to obtain a target instruction, an ID address of the control to be processed, and target position information included in the intermediate information. The preset processing rule is a rule that can identify related information included in the intermediate information after the interrupt processing.
The target instruction refers to an instruction which can implement processing of the control to be processed, and generally, different target instructions are associated with different preset application program interfaces. The application program interface refers to the ID address of the control to be processed in the terminal and refers to the position of the control to be processed in the terminal, so that the position of the control to be processed can be conveniently and accurately determined in the debugging process of the control to be processed. The target position information refers to a position of a target where the to-be-processed control is supposed to be located after the to-be-processed control is debugged according to the target instruction.
As shown in FIG. 3, in one embodiment, the step S103 may include steps S301 to S302.
Step S301, judging whether the intermediate information accords with a preset format according to a preset processing function.
Whether the intermediate information conforms to a preset format or not can be judged through a preset processing function, so that the relevant information can be read from the intermediate information. The intermediate information is instruction information for which interrupt processing has been performed.
For example, the preset processing function may be a UART _ automation command function. Wherein, the preset format can be AC Len _ H Len _ L0B 8000 Data CS, the AC indication is 0 th byte; len _ H is a high byte of the total length of the current instruction, and Len _ L is a low byte of the total length of the current instruction; 0B 8000 is the division of the functional bit, which can be a specific operation instruction for the control of the terminal; the Data comprises enumeration definition Data, a target x coordinate, a target y coordinate and the like of the control to be processed, each Data is two bytes, so the Data has 6 bytes in total, and intermediate information with 13 bytes can be fixed as AC 000D 0B 8000 Data CS; and CS is a preset Checksum checking method, and the condition that the addition conversion of all Data into char types is 0xFF is met, and Data can be processed if the addition conversion of all Data into char types is met.
Of course, the CS is used as a preset verification method, and in this embodiment, the CS may not be set according to requirements. If so, reference may be made to the method in the embodiment shown in fig. 4.
Step S302, if the intermediate information accords with a preset format, the intermediate information is analyzed to obtain a corresponding target instruction, an ID address of the control to be processed and target position information.
In this embodiment, it can be known that if the intermediate information conforms to the preset format, the intermediate information can be quickly analyzed according to the meaning represented by each data set in the preset format, that is, the corresponding target instruction, the ID address of the control to be processed, and the target position information are obtained.
For example, regarding the intermediate information, such as for hexadecimal, the UI control of the mobile terminal, such as moving the coordinate of the UI control located at 7 in the tv without os to (34,307), the corresponding intermediate information would then be: AC 000D 0B 0800000700220133D 6. The AC is a data header, and when the AC is received, the received AC meets the data header requirement received by the current instruction, and the subsequent data can be continuously received; 000D is the total length of the instruction, 0x000D is converted into decimal 13, which has 13 bytes, and the reception will be actively stopped after the 13 th byte is received; 0B 0800 is the distinction of functional bits, and can be understood that the three bytes are specific instructions for the control to be processed, and the instruction at the position is the movement of the coordinate of the control to be processed, namely a target instruction; 0007, the ID address of the control to be processed is set correctly, and the position of the control to be processed can be determined; 0022 is X coordinate of the moved position, and after conversion to decimal, 0X0022 is 34, 0133 is Y coordinate of the moved position, and after conversion to decimal, 0X0133 is 307, so that the X coordinate and the Y coordinate together constitute target position information; d6 is CS (Checksum check) to ensure that the 13 bytes are added together and the low byte data is equal to 0xFF to facilitate verification of the intermediate information.
Similarly, the CS as a preset verification method may also be set according to requirements in this embodiment, that is, the preset format in the intermediate information may be 12 bytes, that is, for the above example, 000D of the intermediate information may be changed to 000C. If the verification setting is performed, the method in the embodiment shown in fig. 4 may be specifically referred to.
And step S104, calling a corresponding preset application program interface according to the target instruction.
In this embodiment, a corresponding preset application program interface may be called according to the target instruction, where the preset application program interface may be MApp _ ZUI _ API _ moveallsucessors, which is an application program interface used by a system in a television without an operating system. By calling the application program interface, the operations such as movement of the television UI control can be realized.
And step S105, debugging the control to be processed according to the called application program interface, the ID address of the control to be processed and the target position information.
In this embodiment, when the called application program interface is operated, the position of the control to be processed can be determined according to the ID address of the control to be processed, and the debugging of the control to be processed is realized according to the target position information, such as the operation of moving the control to be processed.
In an embodiment, the step S101 further includes the following steps:
and step S101a, initializing the serial port function of the serial interface according to a preset initialization function.
In this embodiment, after a television without an os as a terminal is turned on, a serial interface of the terminal needs to be initialized by a preset initialization function, so that a serial communication baud rate is 115200bps, a data bit is 8, and parity check is not performed and serial communication is started, thereby ensuring normal communication. Optionally, the preset initialization function is an MDrv _ UART _ debug init function.
Referring to fig. 4, fig. 4 is a schematic flowchart of a method for debugging a UI control of a television according to another embodiment of the present invention. The method can be operated in a television or other terminals without an operating system. As shown in fig. 4, the device information further includes a factory equipment number and a MAC address, so the steps of the method include steps S401 to S405. The related explanations and detailed descriptions of the steps similar to steps S101-S105 in the above embodiment are not repeated herein, and the following detailed descriptions are the added steps in this embodiment.
Step S401, if it is detected that the serial interface receives a control debugging instruction sent by the server, calling a preset callback function, wherein the control debugging instruction comprises serial port instruction information.
Step S402, receiving the serial port instruction information forwarded by the serial interface, and implementing the interrupt processing of the received serial port instruction information according to the preset callback function to obtain intermediate information.
Step S403, analyzing the intermediate information according to a preset processing rule to obtain a target instruction, an ID address of the control to be processed, target position information, and verification information, where different target instructions are associated with different preset application program interfaces, and different verification information is associated with different verification rules.
In this embodiment, the terminal may analyze the intermediate information according to a preset processing rule, so as to obtain a target instruction, an ID address of the control to be processed, target position information, and verification information included in the intermediate information. The preset processing rule is a rule that can identify related information included in the intermediate information after the interrupt processing.
The target instruction refers to an instruction which can implement processing of the control to be processed, and generally, different target instructions are associated with different preset application program interfaces. The application program interface refers to the ID address of the control to be processed in the terminal and refers to the position of the control to be processed in the terminal, so that the position of the control to be processed can be conveniently and accurately determined in the debugging process of the control to be processed. The target position information refers to a position of a target where the to-be-processed control is supposed to be located after the to-be-processed control is debugged according to the target instruction. The verification information refers to information capable of verifying the intermediate information, each verification information can be associated with a corresponding verification rule, and accurate serial port instruction information can be obtained through processing of the verification information to prevent misoperation.
Step S404a, invoking the verification rule associated with the verification information according to the verification information.
In this embodiment, since the check information is associated with the corresponding check rule, in order to verify the intermediate information at this time, the check rule associated with the check information needs to be called for subsequent processing.
Step S404b, verifying the intermediate information according to the verification rule to obtain a target verification value.
In this embodiment, the intermediate message may be checked according to the invoked check rule, so as to obtain a corresponding target check value.
Step S404c, determining whether the target verification value is a preset standard value;
in this embodiment, in order to determine whether the intermediate information meets a preset requirement, it may be determined whether the target check value is a preset standard value, and if the target check value is not the preset standard value, it indicates that the intermediate information is invalid, and the debugging of the UI control of the television is failed.
And S404, if yes, the verification is passed, and a corresponding preset application program interface is called according to the target instruction.
In this embodiment, if the target verification value is a preset standard value, it indicates that the verification is acceptable, and at this time, a corresponding preset application program interface may be called according to the target instruction for corresponding processing.
And S405, debugging the control to be processed according to the called application program interface, the ID address of the control to be processed and the target position information.
In summary, the embodiment of the present invention provides a method for debugging a UI control of a television. The method provided by the embodiment of the invention can be used for rapidly debugging the television UI control in real time, and the working efficiency and the user experience are improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), or the like.
Referring to fig. 5, in response to the above-mentioned method for debugging a UI control of a television, an embodiment of the present invention further provides a device for debugging a UI control of a television, where the device 100 includes: function calling section 101, information processing section 102, information analyzing section 103, interface calling section 104, and debugging section 105.
The function calling unit 101 is configured to call a preset callback function if it is detected that the serial interface receives a control debugging instruction sent by the server, where the control debugging instruction includes serial port instruction information.
In this embodiment, if it is detected that the serial interface receives a control debugging instruction sent by the server through the serial protocol, at this time, a callback function that is registered and set in advance may be called. Generally, the control debugging instruction may include serial port instruction information, and the related operations on each control may be implemented by analyzing the serial port instruction information. For example, the spatial modulation instruction sent by the server may implement operations such as moving the coordinates of the UI control of the television without the operating system.
The preset callback function is a function called by a function pointer. If a function pointer (function address) is passed as a parameter to another function, when this pointer is used to call the function it points to, the pointed-to function is the callback function. The callback function is not directly called by the implementer of the function, but is called by another party when a specific event or condition occurs, for responding to the event or condition.
Optionally, the callback function may be an MDrv _ UART _ RecvHandler function, and the server sends a control debugging instruction to the serial interface of the terminal and then can be processed in the MDrv _ UART _ RecvHandler function.
And the information processing unit 102 is configured to receive the serial port instruction information forwarded by the serial interface, and interrupt the received serial port instruction information according to the preset callback function to obtain intermediate information.
In this embodiment, if the serial port instruction information forwarded by the serial interface is received, the received serial port instruction information may be subjected to terminal processing according to the called preset callback function, so as to obtain intermediate information.
As shown in fig. 6, in an embodiment, the information processing unit 102 may include a first receiving unit 201, a byte judging unit 202, a second receiving unit 203, and a byte combining unit 204.
The first receiving unit 201 is configured to receive the 0 th byte of the serial port instruction information forwarded by the serial interface.
In this embodiment, the serial port instruction information may be interrupted in the callback function. Wherein the callback function may be an MDrv _ UART _ RecvHandler function. Specifically, the terminal may receive the 0 th byte of the serial port instruction information forwarded by the serial interface first, and determine the 0 th byte first, so as to perform subsequent operations.
The byte judgment unit 202 is configured to judge whether a 0 th byte in the serial port instruction information is 0xAC according to the preset callback function.
In this embodiment, the terminal may further determine whether the 0 th byte is 0xAC according to the preset callback function. The AC is a data header, and when the AC is received, the serial port instruction information meets the requirement of the data header received this time, and at this time, the terminal can continue to receive the related information data. If the 0 th byte is not 0xAC, the data reception is not continued, i.e. the serial command message is received unsuccessfully.
The second receiving unit 203 is configured to continue to receive the first byte and the second byte in the serial port instruction information if the serial port instruction information is received, so as to determine the total instruction length of the serial port instruction information according to the received first byte and second byte.
In this embodiment, if the 0 th byte in the serial port instruction information is 0xAC, it indicates that data can be continuously received, that is, the first byte and the second byte in the serial port instruction information are continuously received, so as to determine the total instruction length of the serial port instruction information according to the received first byte and second byte
Specifically, when the first (0 th byte) data of 0xAC is received, the first byte and the second byte are continuously received, wherein, since the serial port instruction information can be relatively long (facilitating the expansion of the subsequent instruction), for example, may be longer than one byte, it may not be enough to use one byte to represent the total length of the instruction, so that two bytes are used to represent the total length of the total instruction, and there are high bytes and low bytes in two bytes. Therefore, the first byte is the high byte of the total length of the serial port instruction information this time, and the second byte is the low byte of the total length of the serial port instruction information this time. The total length of the serial port instruction information can be known through the first byte and the second byte, and the rest bytes are received according to the length to calculate the receiving until the information of the corresponding bytes is received.
The byte combination unit 204 is configured to continue receiving a corresponding number of bytes according to the determined total length of the instruction, and combine all the received bytes into an intermediate message.
In this embodiment, after the corresponding number of bytes is continuously received according to the determined total length of the instruction, all the received bytes can be combined into one intermediate information, so as to interrupt the serial port instruction information.
The information analyzing unit 103 is configured to analyze the intermediate information according to a preset processing rule to obtain a target instruction, an ID address of the control to be processed, and target position information, where different target instructions are associated with different preset application program interfaces.
In this embodiment, the terminal may analyze the intermediate information according to a preset processing rule, so as to obtain a target instruction, an ID address of the control to be processed, and target position information included in the intermediate information. The preset processing rule is a rule that can identify related information included in the intermediate information after the interrupt processing.
The target instruction refers to an instruction which can implement processing of the control to be processed, and generally, different target instructions are associated with different preset application program interfaces. The application program interface refers to the ID address of the control to be processed in the terminal and refers to the position of the control to be processed in the terminal, so that the position of the control to be processed can be conveniently and accurately determined in the debugging process of the control to be processed. The target position information refers to a position of a target where the to-be-processed control is supposed to be located after the to-be-processed control is debugged according to the target instruction.
As shown in fig. 7, in an embodiment, the information parsing unit 103 may include a format determining unit 301 and an information obtaining unit 302.
The format determining unit 301 is configured to determine whether the intermediate information conforms to a preset format according to a preset processing function.
Whether the intermediate information conforms to a preset format or not can be judged through a preset processing function, so that the relevant information can be read from the intermediate information. The intermediate information is instruction information for which interrupt processing has been performed.
For example, the preset processing function may be a UART _ automation command function. Wherein, the preset format can be AC Len _ H Len _ L0B 8000 Data CS, the AC indication is 0 th byte; len _ H is a high byte of the total length of the current instruction, and Len _ L is a low byte of the total length of the current instruction; 0B 8000 is the division of the functional bit, which can be a specific operation instruction for the control of the terminal; the Data comprises enumeration definition Data, a target x coordinate, a target y coordinate and the like of the widget to be processed, each Data is two bytes, so the Data has 6 bytes in total, and intermediate information with 13 bytes can be fixed as AC 000D 0B 8000 Data CS; and CS is a preset Checksum checking method, and the condition that the addition conversion of all Data into char types is 0xFF is met, and Data can be processed if the addition conversion of all Data into char types is met.
Of course, the CS is used as a preset verification method, and in this embodiment, the CS may not be set according to requirements. If so, reference may be made specifically to the apparatus in the embodiment shown in fig. 8.
An information obtaining unit 302, configured to, if the intermediate information conforms to a preset format, parse the intermediate information to obtain a corresponding target instruction, an ID address of the control to be processed, and target position information.
In this embodiment, it can be known that if the intermediate information conforms to the preset format, the intermediate information can be quickly analyzed according to the meaning represented by each data set in the preset format, that is, the corresponding target instruction, the ID address of the control to be processed, and the target position information are obtained.
For example, regarding the intermediate information, such as for hexadecimal, the UI control of the mobile terminal, such as moving the coordinate of the UI control located at 7 in the tv without os to (34,307), the corresponding intermediate information would then be: AC 000D 0B 0800000700220133D 6. The AC is a data header, and when the AC is received, the received AC meets the data header requirement received by the current instruction, and the subsequent data can be continuously received; 000D is the total length of the instruction, 0x000D is converted into decimal 13, which has 13 bytes, and the reception will be actively stopped after the 13 th byte is received; 0B 0800 is the distinction of functional bits, and can be understood that the three bytes are specific instructions for the control to be processed, and the instruction at the position is the movement of the coordinate of the control to be processed, namely a target instruction; 0007, the ID address of the control to be processed is set correctly, and the position of the control to be processed can be determined; 0022 is X coordinate of the moved position, and after conversion to decimal, 0X0022 is 34, 0133 is Y coordinate of the moved position, and after conversion to decimal, 0X0133 is 307, so that the X coordinate and the Y coordinate together constitute target position information; d6 is CS (Checksum check) to ensure that the 13 bytes are added together and the low byte data is equal to 0xFF to facilitate verification of the intermediate information.
Similarly, the CS as a preset verification method may also be set according to requirements in this embodiment, that is, the preset format in the intermediate information may be 12 bytes, that is, for the above example, 000D of the intermediate information may be changed to 000C. If the verification setting is performed, the apparatus in the embodiment shown in fig. 8 may be specifically referred to.
And the interface calling unit 104 is configured to call a corresponding preset application program interface according to the target instruction.
In this embodiment, a corresponding preset application program interface may be called according to the target instruction, where the preset application program interface may be MApp _ ZUI _ API _ moveallsucessors, which is an application program interface used by a system in a television without an operating system. By calling the application program interface, the operations such as movement of the television UI control can be realized.
And the debugging unit 105 is used for realizing the debugging of the control to be processed according to the called application program interface, the ID address of the control to be processed and the target position information.
In this embodiment, when the called application program interface is operated, the position of the control to be processed can be determined according to the ID address of the control to be processed, and the debugging of the control to be processed is realized according to the target position information, such as the operation of moving the control to be processed.
In an embodiment, the function calling unit 101 further includes the following units:
the initialization unit 101a is configured to perform serial port function initialization on the serial interface according to a preset initialization function.
In this embodiment, after a television without an os as a terminal is turned on, a serial interface of the terminal needs to be initialized by a preset initialization function, so that a serial communication baud rate is 115200bps, a data bit is 8, and parity check is not performed and serial communication is started, thereby ensuring normal communication. Optionally, the preset initialization function is an MDrv _ UART _ debug init function.
Referring to fig. 8, in response to the above-mentioned method for debugging a UI control of a television, another embodiment of the present invention further provides a device for debugging a UI control of a television, where the device 400 includes: function calling section 401, information processing section 402, information analyzing section 403, rule calling section 404a, verification section 404b, verification value judging section 404c, interface calling section 404, and debugging section 405.
The function calling unit 401 is configured to call a preset callback function if it is detected that the serial interface receives a control debugging instruction sent by the server, where the control debugging instruction includes serial port instruction information.
The information processing unit 402 is configured to receive serial port instruction information forwarded by the serial interface, and interrupt processing of the received serial port instruction information according to the preset callback function, so as to obtain intermediate information.
The information analyzing unit 403 is configured to analyze the intermediate information according to a preset processing rule to obtain a target instruction, an ID address of a control to be processed, target position information, and verification information, where different target instructions are associated with different preset application program interfaces, and different verification information is associated with different verification rules.
In this embodiment, the terminal may analyze the intermediate information according to a preset processing rule, so as to obtain a target instruction, an ID address of the control to be processed, target position information, and verification information included in the intermediate information. The preset processing rule is a rule that can identify related information included in the intermediate information after the interrupt processing.
The target instruction refers to an instruction which can implement processing of the control to be processed, and generally, different target instructions are associated with different preset application program interfaces. The application program interface refers to the ID address of the control to be processed in the terminal and refers to the position of the control to be processed in the terminal, so that the position of the control to be processed can be conveniently and accurately determined in the debugging process of the control to be processed. The target position information refers to a position of a target where the to-be-processed control is supposed to be located after the to-be-processed control is debugged according to the target instruction. The verification information refers to information capable of verifying the intermediate information, each verification information can be associated with a corresponding verification rule, and accurate serial port instruction information can be obtained through processing of the verification information to prevent misoperation.
The rule invoking unit 404a is configured to invoke the verification rule associated with the verification information according to the verification information.
In this embodiment, since the check information is associated with the corresponding check rule, in order to check the intermediate information, the check rule associated with the check information needs to be called for subsequent processing
The verifying unit 404b is configured to verify the intermediate information according to the verification rule to obtain a target verification value.
In this embodiment, the intermediate message may be checked according to the invoked check rule, so as to obtain a corresponding target check value.
The check value determining unit 404c is configured to determine whether the target check value is a preset standard value.
In this embodiment, in order to determine whether the intermediate information meets a preset requirement, it may be determined whether the target check value is a preset standard value, and if the target check value is not the preset standard value, it indicates that the intermediate information is invalid, and the debugging of the UI control of the television is failed.
And the interface calling unit 404 is configured to, if yes, check the pass, and call a corresponding preset application program interface according to the target instruction.
In this embodiment, if the target verification value is a preset standard value, it indicates that the verification is acceptable, and at this time, a corresponding preset application program interface may be called according to the target instruction for corresponding processing.
The debugging unit 405 is configured to implement debugging of the control to be processed according to the called application program interface, the ID address of the control to be processed, and the target location information.
It should be noted that, as can be clearly understood by those skilled in the art, for the specific implementation process of the debugging apparatus 100 and each unit of the television UI control, reference may be made to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, no further description is provided here.
As can be seen from the above, in terms of hardware implementation, the function calling unit 101, the information processing unit 102, the information analyzing unit 103, the interface calling unit 104, the debugging unit 105, and the like may be embedded in a debugging device that is independent of the tv UI control in a hardware form, or may be stored in a memory of the debugging device of the tv UI control in a software form, so that the processor calls and executes operations corresponding to the above units. The processor can be a Central Processing Unit (CPU), a microprocessor, a singlechip and the like.
The debugging means of the above-mentioned television UI control can be implemented in the form of a computer program, and the computer program can be run on the television set as shown in fig. 9.
Fig. 9 is a schematic structural diagram of a television according to the present invention. Referring to fig. 9, the television 500 includes a processor 502, a memory, an internal memory 504, and a serial interface 505 connected by a system bus 501, wherein the memory may include a nonvolatile storage medium 503 and the internal memory 504.
The non-volatile storage medium 503 may store a computer program 5031, and when executed, the computer program 5031 may cause the processor 502 to execute a debugging method of the tv UI control.
The processor 502 is used to provide computing and control capabilities to support the operation of the entire television 500.
The internal memory 504 provides an environment for running the computer program 5031 in the non-volatile storage medium 503, and when the computer program 5031 is executed by the processor 502, the processor 502 can be caused to execute a debugging method of the UI control of the television.
The serial interface 505 is used for communication connection with other devices. Those skilled in the art will appreciate that the structure shown in fig. 9 is a block diagram of only a portion of the structure relevant to the present application, and does not constitute a limitation on the television 500 to which the present application is applied, and that a particular television 500 may include more or less components than those shown in the figures, or combine certain components, or have a different arrangement of components.
The processor 502 is configured to run the computer program 5031 stored in the memory to implement the steps in the debugging method of the UI control of the television.
It should be understood that in the embodiment of the present Application, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be understood by those skilled in the art that all or part of the flow of the method implementing the above embodiments may be implemented by a computer program instructing associated hardware. The computer program may be stored in a storage medium. The computer program is executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a storage medium. The storage medium stores a computer program, and the computer program causes a processor of the television to execute the steps in the debugging method of the television UI control when being executed by the processor. The storage medium is an entity and non-transitory storage medium, and may be various entity storage media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. 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 invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be merged, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present invention 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, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention may be substantially or partially contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a television to execute all or part of the steps of the method according to the embodiments of the present invention.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A debugging method of a television UI control is characterized by comprising the following steps:
if the fact that the serial interface receives a control debugging instruction sent by a server is detected, calling a preset callback function, wherein the control debugging instruction comprises serial port instruction information;
receiving serial port instruction information forwarded by the serial interface, and realizing interrupt processing on the received serial port instruction information according to the preset callback function to obtain intermediate information;
analyzing the intermediate information according to a preset processing rule to obtain a target instruction, an ID address of a control to be processed and target position information, wherein different target instructions are associated with different preset application program interfaces;
calling a corresponding preset application program interface according to the target instruction;
and debugging the control to be processed according to the called application program interface, the ID address of the control to be processed and the target position information.
2. The debugging method according to claim 1, wherein the step of receiving serial port instruction information forwarded by the serial interface and implementing interrupt processing on the received serial port instruction information according to the preset callback function to obtain intermediate information comprises:
receiving the 0 th byte of the serial port instruction information forwarded by the serial interface;
judging whether the 0 th byte in the serial port instruction information is 0xAC according to the preset callback function;
if so, continuing to receive a first byte and a second byte in the serial port instruction information so as to determine the total instruction length of the serial port instruction information according to the received first byte and second byte;
and continuously receiving a corresponding number of bytes according to the determined total length of the instruction, and combining all the received bytes into intermediate information.
3. The debugging method according to claim 1, wherein the step of parsing the intermediate information according to a preset processing rule to obtain a target instruction, an ID address of a control to be processed, and target location information comprises:
judging whether the intermediate information conforms to a preset format or not according to a preset processing function;
and if the intermediate information conforms to the preset format, analyzing the intermediate information to acquire a corresponding target instruction, the ID address of the control to be processed and target position information.
4. The debugging method according to claim 3, wherein the preset processing function is a UART _ AutomationCommand function.
5. The debugging method according to claim 1, wherein the intermediate information further includes check information, different check information is associated with different check rules, and before the step of calling the corresponding preset application program interface according to the target instruction, the method further includes:
calling a verification rule associated with the verification information according to the verification information;
verifying the intermediate information according to the verification rule to obtain a target verification value;
judging whether the target check value is a preset standard value or not;
if yes, the verification is passed, and the step of calling the corresponding preset application program interface according to the target instruction is executed.
6. The debugging method according to claim 1, wherein the calling a preset callback function if it is detected that the serial interface receives a control debugging instruction sent by the server, wherein before the step of the control debugging instruction including serial port instruction information, the method further comprises:
and initializing the serial port function of the serial interface according to a preset initialization function.
7. The debugging method according to claim 6, wherein the preset initialization function is an MDrv _ UART _ debug init function.
8. An apparatus for debugging UI controls of a television, the apparatus comprising:
the function calling unit is used for calling a preset callback function if detecting that the serial interface receives a control debugging instruction sent by the server, wherein the control debugging instruction comprises serial port instruction information;
the information processing unit is used for receiving the serial port instruction information forwarded by the serial interface and realizing the interrupt processing of the received serial port instruction information according to the preset callback function so as to obtain intermediate information;
the information analysis unit is used for analyzing the intermediate information according to a preset processing rule to obtain a target instruction, an ID address of the control to be processed and target position information, wherein different target instructions are associated with different preset application program interfaces;
the interface calling unit is used for calling a corresponding preset application program interface according to the target instruction;
and the debugging unit is used for debugging the control to be processed according to the called application program interface, the ID address of the control to be processed and the target position information.
9. A television set, characterized in that it comprises a memory on which a computer program is stored and a processor which, when executing the computer program, implements the steps of the method according to any one of claims 1 to 7.
10. A storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor in a television set, implements the steps of the method according to any one of claims 1-7.
CN201911403631.7A 2019-12-30 2019-12-30 Debugging method and device of television UI (user interface) control, television and storage medium Active CN111083563B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911403631.7A CN111083563B (en) 2019-12-30 2019-12-30 Debugging method and device of television UI (user interface) control, television and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911403631.7A CN111083563B (en) 2019-12-30 2019-12-30 Debugging method and device of television UI (user interface) control, television and storage medium

Publications (2)

Publication Number Publication Date
CN111083563A CN111083563A (en) 2020-04-28
CN111083563B true CN111083563B (en) 2021-09-07

Family

ID=70320211

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911403631.7A Active CN111083563B (en) 2019-12-30 2019-12-30 Debugging method and device of television UI (user interface) control, television and storage medium

Country Status (1)

Country Link
CN (1) CN111083563B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104298602A (en) * 2014-10-27 2015-01-21 北京神州绿盟信息安全科技股份有限公司 Method and device for debugging application program
CN105589823A (en) * 2014-10-22 2016-05-18 乐视移动智能信息技术(北京)有限公司 Method, apparatus and circuit for realizing USB (universal serial bus) interface multiplexing MHL (mobile high-definition link)
CN105589701A (en) * 2014-10-21 2016-05-18 阿里巴巴集团控股有限公司 Client application partial updating method and apparatus
CN109725923A (en) * 2018-12-27 2019-05-07 广州华多网络科技有限公司 A kind of software light weight update method, device and equipment
CN109800159A (en) * 2018-12-27 2019-05-24 百富计算机技术(深圳)有限公司 Program debugging method, program debugging device, terminal device and storage medium
CN109885314A (en) * 2019-02-28 2019-06-14 天津字节跳动科技有限公司 Small routine autoplacement method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9921984B2 (en) * 2014-12-23 2018-03-20 Intel Corporation Delivering interrupts to user-level applications
US10216663B2 (en) * 2016-12-30 2019-02-26 Nxp Usa, Inc. System and method for autonomous time-based debugging

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105589701A (en) * 2014-10-21 2016-05-18 阿里巴巴集团控股有限公司 Client application partial updating method and apparatus
CN105589823A (en) * 2014-10-22 2016-05-18 乐视移动智能信息技术(北京)有限公司 Method, apparatus and circuit for realizing USB (universal serial bus) interface multiplexing MHL (mobile high-definition link)
CN104298602A (en) * 2014-10-27 2015-01-21 北京神州绿盟信息安全科技股份有限公司 Method and device for debugging application program
CN109725923A (en) * 2018-12-27 2019-05-07 广州华多网络科技有限公司 A kind of software light weight update method, device and equipment
CN109800159A (en) * 2018-12-27 2019-05-24 百富计算机技术(深圳)有限公司 Program debugging method, program debugging device, terminal device and storage medium
CN109885314A (en) * 2019-02-28 2019-06-14 天津字节跳动科技有限公司 Small routine autoplacement method and device

Also Published As

Publication number Publication date
CN111083563A (en) 2020-04-28

Similar Documents

Publication Publication Date Title
WO2020134634A1 (en) Program debugging method, program debugging apparatus, terminal device, and storage medium
CN110647490B (en) Data transmission method, device, equipment and computer storage medium
CN111045921A (en) Automatic interface testing method and device, computer equipment and storage medium
CN111209343B (en) Node data synchronization method, device, equipment and storage medium
CN110442502B (en) Point burying method, device, equipment and storage medium
CN111290806A (en) Calling method and device of application program interface, computer equipment and storage medium
US9215271B2 (en) Method and apparatus for executing application of mobile device
CN107861832B (en) Data verification method and device and readable storage medium
CN108156623B (en) Method and terminal for determining performance abnormity of wifi antenna
CN112996020B (en) Bluetooth-based automatic test method and device and Bluetooth test terminal
CN106952426B (en) Data processing method and device
CN111083563B (en) Debugging method and device of television UI (user interface) control, television and storage medium
CN106294119B (en) Test scheduling system and method and terminal equipment
CN101197959B (en) Terminal control method, system and equipment
CN110879756A (en) Method and device for processing abnormal cooperation process, computer equipment and storage medium
US20090094614A1 (en) Direct synchronous input
CN113282906B (en) Authority detection method, device, terminal and storage medium
CN113791808A (en) Bottom layer program upgrading method and device, computer equipment and storage medium
CN111813597A (en) Air conditioner
KR101400396B1 (en) Real-time embedded software deburgging method using memory address
CN108845932B (en) Unit testing method and device of network library, storage medium and terminal
CN112596751A (en) Compiling method, terminal, server and storage medium of application program installation package
CN112540799A (en) Management method, system, terminal device and storage medium of startup data
CN110908818A (en) Verification method, device, equipment and storage medium
CN113760577B (en) Dynamic connection answering device, processing method, control device 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