CN109698971B - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN109698971B
CN109698971B CN201910036361.4A CN201910036361A CN109698971B CN 109698971 B CN109698971 B CN 109698971B CN 201910036361 A CN201910036361 A CN 201910036361A CN 109698971 B CN109698971 B CN 109698971B
Authority
CN
China
Prior art keywords
command
frc
related information
read
command related
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
CN201910036361.4A
Other languages
Chinese (zh)
Other versions
CN109698971A (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.)
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Visual 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 Hisense Visual Technology Co Ltd filed Critical Hisense Visual Technology Co Ltd
Priority to CN201910036361.4A priority Critical patent/CN109698971B/en
Publication of CN109698971A publication Critical patent/CN109698971A/en
Application granted granted Critical
Publication of CN109698971B publication Critical patent/CN109698971B/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/41Structure of client; Structure of client peripherals
    • H04N21/426Internal components of the client ; Characteristics thereof
    • 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

Abstract

The application discloses a data processing method, which comprises the following steps: obtaining command related information according to command operation, wherein the command related information comprises a command number and command parameters; and then, creating a structure body, storing the command related information of the same command operation into the same structure body, storing a structure body pointer pointing to the command related information corresponding to the command operation into an FRC communication sequence storage container, locking, and sending the command related information of the same command operation to the FRC through the IIC when the read-write lock right is obtained, so that the problem of collision when a plurality of functional modules communicate with the FRC at the same time is solved.

Description

Data processing method and device
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a data processing method and apparatus.
Background
With the continuous improvement of user demands, high-definition televisions become the mainstream of the market. However, the high definition television generally uses a separation scheme of "1 + 1" including a System On Chip (SOC) Chip and a back-end image quality processing Chip (FRC, Frame Rate Conversion) Chip to process the high definition image, that is, the image processing process is migrated to the back-end image quality processing Chip to be processed.
The main functions of the FRC chip include: MEMC (Motion estimation and Motion Compensation), image quality processing, regional backlight control (localized dimming). The implementation of MEMC and image quality processing function both require SOC chip to refresh the image information in real time to FRC chip for processing, while the implementation of local dimming function also requires user's setting to be refreshed in real time to FRC chip for processing. The above actions are initiated and called in different threads, and only one Inter-Integrated Circuit (IIC) channel is used for communication with the FRC chip, which may cause IIC communication conflict when multiple threads initiate IIC read-write operations simultaneously, thereby causing FRC function failure and poor user experience.
Therefore, a method is needed for solving the conflict problem when multifunctional modules communicate with the FRC at the same time.
Disclosure of Invention
The embodiment of the application provides a data processing method, which is used for solving the problem of conflict when a multifunctional module is communicated with an FRC at the same time.
In a first aspect, a data processing method is provided, including:
obtaining command related information according to the command operation, wherein the command related information comprises a command number and command parameters;
if the first read-write lock authority is obtained, storing a structure body pointer pointing to the command related information corresponding to the command operation into an FRC communication sequence storage container;
and then, if a second read-write lock authority is obtained, obtaining the command related information according to the structure body pointer pointing to the command related information corresponding to the command operation, and sending the command related information to the FRC to execute the command operation.
Optionally, the command number is used to indicate a type of the command, and the command parameter is set for a parameter related to execution of the command.
Optionally, if the first read-write lock permission is obtained, the storing the structure pointer pointing to the command related information into the FRC communication sequence storage container specifically includes:
creating a structural body, and storing the command related information corresponding to the command operation into the structural body;
if the first read-write lock authority is obtained, storing a structure body pointer pointing to the command related information corresponding to the command operation into an FRC communication sequence storage container; otherwise, the block waits.
Optionally, after storing the structural body pointing to the command related information corresponding to the command operation in the FRC communication order storage container, the method includes: and releasing the read-write permission of the first read-write lock.
Optionally, sending the command related information to the FRC to perform the command operation includes:
sending the command parameters to the FRC through the IIC for storage; sending the command number to the FRC through the IIC to trigger the FRC to generate an interrupt; and the FRC analyzes the command parameter according to the command number so as to execute the command operation.
Optionally, after sending the command related information to the FRC to perform the command operation, the method includes: and releasing the read-write permission of the second read-write lock.
Optionally, after sending the command related information to the FRC to perform the command operation, the method includes: and if the third read-write lock authority is obtained, deleting the structural body pointer pointing to the command related information corresponding to the command operation from the FRC communication sequence storage container, and releasing the structural body memory storing the command related information.
In a second aspect, a data processing apparatus is provided, including:
the acquisition module is used for acquiring command related information according to the command operation, wherein the command related information comprises a command number and command parameters;
the first processing module is used for storing a structure body pointer pointing to the command related information corresponding to the command operation into an FRC communication sequence storage container if the first read-write lock authority is obtained;
and the second processing module is used for acquiring the command related information according to the structure body pointer pointing to the command related information corresponding to the command operation and sending the command related information to the FRC to execute the command operation if the second read-write lock authority is acquired.
In a third aspect, a data processing apparatus is provided, including: a processor; a memory; and a computer program; wherein the computer program is stored in the memory and configured to be executed by the processor, the computer program comprising instructions for performing the method of any of the first aspects above.
In a fourth aspect, there is provided a computer readable storage medium storing computer instructions which, when executed by a processor, implement the method of any of the first aspects described above.
Drawings
Fig. 1 is a schematic system framework diagram of a smart television to which an embodiment of the present invention is applicable;
FIG. 2 is a schematic diagram of an application scenario applicable to the embodiment of the present application;
fig. 3 is a schematic diagram of FRC communication collision according to an embodiment of the present application;
fig. 4 is a flowchart of a data processing method according to an embodiment of the present application;
fig. 5 is a flowchart of a data processing method according to an embodiment of the present application;
fig. 6 is a schematic diagram of an FRC communication sequential storage container according to an embodiment of the present application;
fig. 7 is a schematic diagram illustrating an operation of an FRC communication sequential storage container according to an embodiment of the present application;
fig. 8 is a schematic diagram illustrating an operation of an FRC communication sequential storage container according to an embodiment of the present application;
fig. 9 is a flowchart of a data processing method according to an embodiment of the present application;
fig. 10 is a schematic diagram of a data processing apparatus according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application.
Detailed Description
The following detailed description of embodiments of the present application will be made with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present application, are given by way of illustration and explanation only, and are not intended to limit the present application.
It should be noted that the terms "first" and "second" are used herein to distinguish similar objects and are not necessarily used to describe a particular FRC communication order or sequence.
The execution main body of the data processing method provided by the embodiment of the application can be a data processing device or a terminal for executing the data processing method. Specifically, the terminal may be a terminal device such as a smart television, a computer, or the like, and the application does not limit the type of the device. The following description is given by way of example of smart electronics, without specific recitation, and the described solution is equally applicable to other types of devices.
Fig. 1 schematically illustrates a system framework of a smart tv suitable for use in an embodiment of the present application.
Before describing the intelligent television system framework, the related terms are explained as follows:
FRC (frame Rate conversion), frame Rate conversion chip, which is used to insert new picture generated by calculation between the images of original signal source, to make the moving track of object in the picture more flow and improve the dynamic definition greatly.
Soc (system On chip), system On chip or system On chip, is an integrated circuit with a dedicated target, which contains the complete system and has the entire content of embedded software.
TCON, also called logic board, screen drive board, central control board. The TCON board is used for converting LVDS image data input signals (input signals comprise RGB data signals, clock signals and control signals) sent by the digital board into LVDS signals capable of driving the liquid crystal screen after being processed by the logic board, and then directly sending the LVDS signals to the LVDS receiving chip of the liquid crystal screen. The image data signals are stored by processing the shift register, the clock signals are converted into control signals which can be identified by the screen, and the column-row signals RSDS control the work of MOSFET tubes in the screen to control the torsion degree of liquid crystal molecules. And driving the liquid crystal screen to display images.
As shown in fig. 1, the FRC chip is interposed between the SOC main chip and the TCON. Partial functions (such as image quality processing) originally realized by the SOC main chip are transferred to the FRC chip for realization. The image information is sent to the FRC chip by the SOC main chip through a Lane bus, and other commands for controlling the working state of the FRC chip are sent to the FRC chip by the SOC through an IIC bus. And after the FRC completes the related processing of the image, sending the processed image data to a screen end TCON. Illustratively, in a specific processing procedure, the SOC image unit sends data such as noise amount, frame delay and the like to the FRC every 16ms, the backlight unit sends backlight value size to the FRC every 200ms, and in addition, when a user performs image brightness setting, contrast setting and regional backlight intensity setting, the corresponding function is triggered to send data to the FRC. All of the above operations are transmitted over the same IIC bus.
The technical problem of the present application is explained in detail by taking the image unit and the backlight unit in fig. 2 as an example. Under the television system structure shown in fig. 1, as shown in fig. 2, the image module and the backlight module initiate an FRC communication operation when the timing time is up, specifically, initiate an action of writing data and commands to the FRC. The IIC hardware design principle of FRC is as follows: when the SOC main chip writes data to the FRC through the IIC, command parameters (CmdParams) are written firstly, then command numbers (CmdID) are written, two IIC communications are actually completed, the FRC processes the received data only after receiving the command numbers, and namely, one complete FRC write operation comprises one IIC write operation for completing command parameter sending and one IIC write operation for completing command number sending. However, when the IIC is locked and unlocked, the integrity of two IIC communications (i.e., one complete IIC communication of FRC) cannot be guaranteed for one IIC communication, and therefore the following problems may be caused: when the backlight module performs FRC communication, if the image module starts communication again during the period when the command parameter is sent and the command number is not sent, the command parameter of the backlight module is covered by the command parameter of the image module, resulting in that the command number corresponds to wrong command parameter information. Specifically, as shown in fig. 3, in both the image module and the backlight module, each time communication is performed to the FRC, the command parameter is sent to the FRC command parameter buffer register, and then the command number is sent to another register. The FRC generates an interrupt upon detecting a change in the contents of the command number register and then reads the command parameters from the command parameter register. If the image module and the backlight module initiate FRC communication at the same time, the backlight module is supposed to initiate FRC communication for one time, first the backlight module sends a first command parameter to a command parameter register specified by the FRC through the IIC for storage, then the backlight module needs to send a first command number to the FRC according to a normal flow to trigger the FRC to generate interruption, and then the FRC analyzes the first command parameter according to the first command number. However, if the image module also initiates an FRC communication, the second command parameter sent by the image module is stored in the command parameter register, the first command parameter sent by the backlight module is overwritten, and then the FRC receives the first command number sent by the backlight module and generates an interrupt, and analyzes the command parameter in the command parameter register. However, the second command parameter stored in the command parameter register is not matched with the first command number, which may cause the command operations of the image module and the backlight module to be disabled. Especially, when a user performs UI operations, such as image brightness adjustment, if a plurality of middleware function modules (such as a backlight module and an image module) all start a function of regularly calling FRC communication and the data size is large, the image brightness adjustment function cannot be normally executed when communication conflicts, which may cause the UI interface to wait all the time, and does not respond to the adjustment operations of the user, and the user experience is affected due to the fact that the image brightness adjustment function is stuck.
To solve the above problems, the following solutions are proposed.
As shown in fig. 4, a flowchart of a data processing method provided in an embodiment of the present application is a flowchart, where the flowchart may be implemented by a data processing apparatus of a smart television, and includes the following steps:
s401, when receiving a command operation, obtaining command related information according to the command operation, wherein the command related information comprises a command number and command parameters.
Illustratively, the command operation comprises the image module and the backlight module periodically sending communication commands to the FRC; or sending a communication command to the FRC according to the image brightness of the UI operation and the adjustment of the backlight parameter, and executing the communication command by the FRC.
The command number is used for indicating the type of the command, and the command parameters are set for relevant parameters of command execution. Illustratively, when a UI backlight adjustment operation is received, acquiring command related information of the UI backlight adjustment operation, including a command number CmdID =0x3f and a command parameter CmParams =0xff, where CmdID =0x3f indicates that the command is UI backlight brightness adjustment, and CmParams =0xff indicates that the backlight brightness is adjusted to a maximum brightness value of 255; when a command operation sent by an image module is received, command related information of the command operation is acquired, wherein the command related information comprises a command number CmdID =0x02 and a command parameter CmdParams =0x 010 x 060 xff 0x32, wherein CmdID =0x02 represents that the image module sends image information to FRC at regular time, and CmdParams =0x 010 x 060 xff 0x32 represents the noise amount (0 x010 x 06) and the frame delay information (0 xff 0x 32) of the image respectively.
S402, a structural body is created, and the command related information belonging to the same command operation is stored in the same structural body.
In the present application, one structure stores command-related information belonging to the same command operation, including a data set of a command number and a command parameter, which may be declared as a variable, a pointer, or an array. And the command related information of one command operation is packaged into a structural body, so that the related information of the complete FRC communication of one command operation can be conveniently identified.
Optionally, command number data is placed in the first storage area of the structure body, and the command number data is determined by a specification provided by the FRC; the second memory area of the structure stores command parameter data corresponding to the command number, and the data length is also determined by the specification provided by the FRC. When command operation is received, the corresponding command number and command parameter are inquired according to the command operation, and then the command number and the command parameter are sequentially stored to the corresponding positions of the structure body according to the organization form of data storage.
And S403, storing the pointer pointing to the structure body in an FRC sequential storage container and locking the pointer so that only one command operation can be executed at the same time.
The read-write lock comprises a read lock and a write lock which are mutually exclusive, and only one of the read lock and the write lock can be operated at the same time. The structural body storing the command related information of the same command operation is locked, so that the fact that the command related information belonging to the same command operation can only be transmitted to the FRC through the IIC at the same time is achieved, the integrity of two times of FRC communication belonging to one command is guaranteed, and the non-correspondence between the command number received by the FRC end and the command parameter is avoided.
S404, when the read-write lock authority is obtained, the command related information of the same command operation is sent to the FRC through the IIC.
Specifically, when the structure acquires the read-write lock right, the command number and the command parameter stored in the structure are acquired, the command parameter is sent to a command parameter register specified by the FRC through the IIC to be stored, then the command number is sent to the FRC to trigger the FRC to generate interruption, and then the FRC analyzes the command parameter according to the command number to execute the command operation corresponding to the structure.
According to the hardware characteristic of the FRC, when the command related information of the same command operation is sent to the FRC through the IIC, the command number and the parameters need to be simply packaged: taking the backlight adjustment command operation as an example, if the command number and parameters for adjusting the backlight once are: the command number actually recognized by the FRC is the command number which is shifted to the left by 24 bits + the parameter length, so that the actual command number is 0X01000001, and a 4-byte command number is actually sent; the same parameter is also shifted to the left by 24 bits, actually sending: 0XFF 000000. The receiving logic of the FRC is: when the FRC command receiving register receives the effective command number, the parameter receiving interrupt task is triggered. The command number is parsed during the interrupt, and the parameter length is first obtained, e.g., if the parameter length is 1, the first byte in the data receiving register is obtained and used to complete the task specified by the command number, e.g., if the backlight value is adjusted to 0 XFF. And exiting the interrupt after completing the complete IIC command operation, and continuously waiting for the interrupt trigger of the next command number.
According to the scheme, the command parameters and the command numbers of the command operation are packaged into the structural body, and the mutual exclusivity of the read-write lock is utilized when the structural body is executed, so that the command numbers and the command parameters of one command operation can be transmitted only after the command numbers and the command parameters of the next command operation are transmitted and executed by the FRC, and the problem of communication conflict caused by mismatching of the FRC command numbers and the command parameters is avoided.
Fig. 5 is a flowchart of a data processing method according to an embodiment of the present application. The method comprises the following steps:
s501, when a command operation is received, command related information is obtained according to the command operation, wherein the command related information comprises a command number and command parameters.
S502, a structural body is created, and the command related information belonging to the same command operation is stored in the same structural body.
And S503, if the first read-write permission is obtained, storing the pointer pointing to the structure body into an FRC communication sequence storage container, and locking.
The first read-write permission is a pointer which points to a structural body containing command related information corresponding to command operation and is written into the FRC communication sequence storage container.
In one possible implementation, the structure pointer structure _ pointer corresponding to the structure is stored to the tail of the FRC communication order container Vector through push _ back ().
The FRC communication sequence storage container is realized by a C + + built-in type of a Vector, and is used for realizing the control of the FRC communication sequence of each functional module: a Vector Chinese name order container for sequentially storing structure pointers, such as the FRC communication order storage container shown in FIG. 6, wherein the Struct _1 pointer points to the structure Struct _1, the first element of the Struct _1 structure stores the command number CmdID =0x02 of the FRC communication, all command parameters CmdParams =0x 010 x 060 xff 0x32 corresponding to the command are stored from the second parameter, wherein CmdID =0x02 represents the timing of image modules to transmit image information to the FRC, CmdParams =0x 010 x 060 xff 0x32 represents the noise amount (0 x010 x 06) and frame delay information (0 xff 0x 32) of the image respectively; the first element of the Struct _2 structure stores the command number CmdID =0x 03 of the FRC communication, and the second element stores the command parameter CmdParams =0xff corresponding to the command, wherein CmdID =0x 03 indicates that the command is used to set the backlight, and CmdParams =0xff indicates that the backlight is set to be 255.
And if the first read-write permission is not obtained, blocking waiting.
Further, after the pointer pointing to the structure body is stored in the FRC communication sequence storage container, the method further includes releasing the read-write permission of the read-write lock.
When the SOC receives a command operation initiated by any module, steps S501-504 are executed without waiting for the completion of the real FRC communication corresponding to the command operation.
For example, to explain the above steps by taking backlight brightness adjustment as an example, as shown in fig. 7, after receiving a command of UI adjusting the backlight brightness to the maximum, the main chip SOC dynamically allocates a memory, and creates a structure struct _7, where the structure stores a command number CmdID =0x3f and a command parameter CmParams =0xff of the backlight brightness adjustment command, where CmdID =0x3f indicates that the command is UI backlight brightness adjustment, and CmParams =0xff indicates that the backlight brightness is adjusted to the maximum brightness value. And then the backlight brightness adjusting command blocks to wait for obtaining the read-write lock authority, and after the read-write lock authority is obtained, a pointer corresponding to the sturct _7 structural body is stored at the tail end of the FRC communication sequence container.
S504, if the second read-write lock authority is obtained, the command related information stored by the structural body is obtained according to the pointer pointing to the structural body in the FRC communication sequence storage container, and the command related information is sequentially sent to the FRC.
The second read-write lock authority refers to performing FRC communication of command related information in a structure pointed by a structure pointer stored in an FRC communication sequence storage container. The method specifically comprises the step of sequentially sending a command number and a command parameter in the structural body to the FRC through the IIC bus, and the FRC is used for executing command operation corresponding to the command number and the command parameter.
Further, after the command operation is executed according to the command-related information, the method further includes: and releasing the read-write permission of the second read-write lock.
Optionally, the obtaining the command related information stored in the structure according to the pointer pointing to the structure in the FRC communication order storage container, and sending the command related information to the FRC sequentially includes:
and if the third read-write lock authority is obtained, deleting the pointer pointing to the structure body from the FRC communication sequence storage container, and releasing the memory of the structure body. For example, the FRC communicates with other functional modules according to the module operation sequence written in the FRC communication sequence storage container, as shown in fig. 8: after the command operation pointed by Struct _1 is executed in the steps S501-S505, the command operation is located at the head end of an FRC communication sequence storage container, if the third read-write lock permission is obtained, a Vector member function pop _ front () is executed to remove the first element Struct _1 of the Vector, and other elements in the Vector automatically move downwards by one position. Dynamically releasing the structure memory pointed by the structure pointer stored in the element; if the lock read-write authority cannot be reached, the waiting is blocked.
According to the command operation, command related information is obtained, wherein the command related information comprises a command number and command parameters; storing command related information belonging to the same command operation into a structural body, and placing the structural body in an FRC communication sequence storage container in a mode of acquiring a first read-write lock authority; and when the second read-write lock right is obtained, obtaining the command related information stored by the structure body according to the pointer pointing to the structure body, and sequentially sending the command related information to the FRC. The FRC communication operation that only one command operation can be executed at the same time is ensured through the FRC communication sequence storage container and the read-write lock, namely, the transmission of the matched command number and command parameters and the calling at an FRC end are ensured, and the problem of the conflict of the simultaneous communication of a plurality of functional modules and the FRC is avoided.
In a possible implementation manner, based on the above embodiment, a data processing method is provided in conjunction with fig. 6 to 8, as shown in fig. 9:
assuming that the current FRC communication sequence storage container is as shown in fig. 6, when the smart tv receives a UI backlight adjustment operation performed by a user, the following steps are performed:
s901a, receiving a command operation, and obtaining corresponding command related information, where the command related information includes a command number and command parameters.
When the SOC receives a UI backlight adjustment operation, acquiring relevant information of the current UI backlight adjustment, including a command number CmdID =0x3f and a command parameter CmParams =0xff, where CmdID =0x3f indicates that the command is UI backlight brightness adjustment, and CmParams =0xff indicates that the backlight brightness is adjusted to a maximum brightness value.
S902a, a structure is created, and the command-related information is stored in the structure.
Dynamically allocating memory, creating a structure struct _7, and storing a command number CmdID =0x3f and a command parameter CmParams =0xff to the structure.
S903a, block wait.
If the read-write lock authority is obtained, the steps S804 and S805 are continuously executed.
S904a stores the structure pointer pointing to the command related information to the tail end of the FRC communication order storage container.
And storing the structure pointer of the execution structure struct _7 to the tail end of the vector of the FRC communication sequence storage container.
S905a, releasing the read-write lock authority.
When the structure body pointer at the head end of the FRC communication sequence storage container obtains the right of the read-write lock, if the corresponding command operation is the unexecuted command operation, the following steps are executed:
s901b, the command parameter and command number pointed to by the structure pointer located at the head of the FRC communication sequential storage container are obtained.
The pointer of the structure body at the head end of the FRC communication sequence storage container is a struct _1 pointer, and command parameters CmParams =0xff in the structure body are obtained through analysis according to the struct _1 pointed by the pointer, wherein CmdID =0x3 f.
S902b, the command parameters and the command numbers are respectively transmitted to the FRC through II 2.
And sending the numerical value of the command parameter and the numerical value of the command number to the FRC in two times through the IIC.
S903b, the FRC performs a command operation according to the command parameter and the command number.
The FRC adjusts the backlight brightness to the maximum brightness value according to the command parameter and the command number.
S904b, the read-write lock authority is released.
When the structure body pointer at the head end of the FRC communication sequence storage container obtains the right of the read-write lock, if the corresponding command operation is the executed command operation, the following steps are executed:
s901c, calling pop _ front to remove the struct pointer at the head of the FRC communication sequential storage container;
s902c, moving down other pointer elements in the FRC communication order storage container by one position in order;
s903c, releasing the structure memory pointed by the head pointer of the FRC communication sequence storage container;
s904c, the read-write lock authority is released.
In one possible embodiment, the read-write lock used in the present application is implemented based on the native read-write lock rwlock provided by the linux system further encapsulated in the c + + language.
The working process of the native rwlock of the Linux is as follows:
1. after a Linux system is started, a rwlock needs to be initialized;
2. any thread needs to wait for blocking when using the read-write lock until obtaining the read-write permission of the lock;
3. executing the locked protected content;
4. and completing the execution of the protected content and releasing the read-write permission of the lock.
Preferably, the read-write lock is encapsulated into a C + + class, and the following steps are performed according to a workflow of the C + + class:
1. When any thread needs to use the lock, a local read-write lock class is created, and the constructor of the class completes the initialization of the lock;
2. later thread will automatically block and wait to obtain lock read-write permission
3. Executing content protected by lock
4. And completing the execution of the protected contents, returning the thread function, automatically releasing the local read-write lock class, calling a destructor of the class when releasing, and completing the operation of releasing the read-write permission of the lock by the destructor.
The use of the read-write lock only needs to create a read-write lock class, any operation of other related locks is automatically completed by the class, and a user does not need to call the read-write lock through a code. The lock is applied to the FRC communication sequence storage container, so that the protection of the object can be realized, and the user operation can be simplified compared with the native rwlock.
To sum up, the read-write lock authority is divided into three categories including insertion, deletion and execution of elements in the vector, wherein the elements in the vector correspond to the FRC communication thread initiated by the function module, so that the communication FRC communication sequence storage container and the read-write lock realize that only one vector thread can be operated at the same time, and FRC communication conflict is avoided.
Based on the same technical concept, the embodiment of the application also provides a data processing device.
As shown in fig. 10, a data processing apparatus provided in this embodiment of the present application may execute the above data processing method embodiment. The data processing apparatus 1000 includes: the system comprises an acquisition module 1001, a first processing module 1002 and a second processing module 1003.
An obtaining module 1001, configured to obtain command related information according to a command operation, where the command related information includes a command number and a command parameter;
the first processing module 1002 is configured to, if the first read-write lock permission is obtained, store a structure pointer pointing to the command related information in an FRC communication sequence storage container;
the second processing module 1003 is configured to, if the second read/write lock permission is obtained, obtain command related information according to the structure pointer pointing to the command related information, and sequentially send the command related information to the FRC.
Optionally, the command number is used to indicate a type of the command, and the command parameter is set for a parameter related to execution of the command.
Optionally, the obtaining module 1001 is further configured to create a structure, and store the command related information belonging to the same command operation into the same structure.
Optionally, the first processing module 1002 is specifically configured to: if the first read-write lock authority is obtained, storing a structure body pointer pointing to the command related information into an FRC communication sequence storage container; otherwise, blocking waiting; and releasing the read-write permission of the first read-write lock after the structure body pointer pointing to the command related information is stored in the FRC communication sequence storage container.
Optionally, the second processing module 1003 is specifically configured to: obtaining command related information according to a structure pointer pointing to the command related information, and respectively sending command parameters and command numbers in the command related information to the FRC through the IIC; and deleting the read-write permission of the second read-write lock after the command operation is executed.
Optionally, the data processing apparatus further includes a third processing module 1004, configured to delete the structure pointer pointing to the command related information from the FRC communication sequential storage container and release the structure memory of the command related information if a third read/write lock permission is obtained.
Based on the same technical concept, the embodiment of the present application further provides a data processing apparatus 1100, and the data processing apparatus 1100 can implement the flow executed by the data processing apparatus 1000 in the foregoing embodiment.
Fig. 11 shows a schematic structural diagram of a data processing apparatus 1100 provided in an embodiment of the present application, that is, shows another schematic structural diagram of the data processing apparatus 1000. As shown in fig. 11, the data processing apparatus 1100 includes a processor 1101 and a memory 1102. The processor 1101 may also be a controller. The processor 1101 is configured to enable the terminal to perform the functions involved in the aforementioned procedures. The memory 1102 is operatively coupled to the processor 1101 and retains program instructions and data necessary for the terminal. The processor 1101 is connected to the memory 1102, the memory 1102 is used for storing instructions, and the processor 1101 is used for executing the instructions stored in the memory 1102 to complete the steps of the method for the client device to execute the corresponding functions.
In the embodiment of the present application, for concepts, explanations, and detailed descriptions related to the technical solutions provided in the embodiments of the present disclosure, and other steps related to the data processing apparatus 1000 and the data processing apparatus 1100, please refer to the descriptions of the foregoing methods or other embodiments for these contents, which are not described herein again.
It should be noted that the processor referred to in the embodiments of the present disclosure may be a Central Processing Unit (CPU), a general purpose processor, a Digital Signal Processor (DSP), an application-specific integrated circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic devices, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. A processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, a DSP and a microprocessor, or the like. Wherein the memory may be integrated in the processor or may be provided separately from the processor.
The embodiment of the present application further provides a computer-readable storage medium for storing computer instructions, which when executed, can perform any one of the methods related to the foregoing terminal.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A data processing method, comprising:
obtaining command related information according to command operation, wherein the command related information comprises a command number and command parameters;
if the first read-write lock authority is obtained, storing a structure body pointer pointing to the command related information corresponding to the command operation into an FRC communication sequence storage container;
and if the second read-write lock authority is obtained, obtaining the command related information according to the structure body pointer pointing to the command related information corresponding to the command operation, and sending the command related information to an FRC chip to execute the command operation.
2. The method of claim 1,
the command number is used for indicating the type of the command, and the command parameters are set for relevant parameters of command execution.
3. The method of claim 1, wherein storing a structure pointer pointing to command related information corresponding to the command operation in an FRC communication sequence storage container if the first read-write lock authority is obtained comprises:
creating a structural body, and storing the command related information corresponding to the command operation into the structural body;
if the first read-write lock authority is obtained, storing a structure body pointer pointing to the command related information corresponding to the command operation into an FRC communication sequence storage container; otherwise, the block waits.
4. The method of claim 1 or 3, wherein storing the structure pointer to the command-related information corresponding to the command operation after the FRC communication order storage container comprises:
and releasing the read-write permission of the first read-write lock.
5. The method of claim 2, wherein the sending the command related information to an FRC chip to perform the command operation comprises:
sending the command parameters to the FRC chip through the IIC for storage;
sending the command number to the FRC chip through the IIC to trigger the FRC chip to generate an interrupt;
and the FRC chip analyzes the command parameters according to the command number so as to execute the command operation.
6. The method of claim 1 or 2, wherein after sending the command-related information to the FRC chip to perform the command operation, comprising:
and releasing the read-write permission of the second read-write lock.
7. The method of claim 1, wherein after sending the command related information to an FRC chip to perform the command operation, comprising:
and if the third read-write lock authority is obtained, deleting the structural body pointer pointing to the command related information corresponding to the command operation from the FRC communication sequence storage container, and releasing the structural body memory storing the command related information corresponding to the command operation.
8. An apparatus for data processing, comprising:
the acquisition module is used for acquiring command related information according to command operation, wherein the command related information comprises a command number and command parameters;
the first processing module is used for storing a structure body pointer pointing to the command related information corresponding to the command operation into an FRC communication sequence storage container if the first read-write lock authority is obtained;
and the second processing module is used for acquiring the command related information according to the structure body pointer pointing to the command related information corresponding to the command operation if the second read-write lock authority is acquired, and sending the command related information to the FRC chip to execute the command operation.
9. A data processing apparatus, comprising:
a processor;
a memory; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor, the computer program comprising instructions for performing the method of any of claims 1 to 7.
10. A computer-readable storage medium storing computer instructions which, when executed by a processor, implement the method of any one of claims 1 to 7.
CN201910036361.4A 2019-01-15 2019-01-15 Data processing method and device Active CN109698971B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910036361.4A CN109698971B (en) 2019-01-15 2019-01-15 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910036361.4A CN109698971B (en) 2019-01-15 2019-01-15 Data processing method and device

Publications (2)

Publication Number Publication Date
CN109698971A CN109698971A (en) 2019-04-30
CN109698971B true CN109698971B (en) 2021-07-06

Family

ID=66233970

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910036361.4A Active CN109698971B (en) 2019-01-15 2019-01-15 Data processing method and device

Country Status (1)

Country Link
CN (1) CN109698971B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111479154B (en) * 2020-04-03 2022-03-22 海信视像科技股份有限公司 Equipment and method for realizing sound and picture synchronization and computer readable storage medium
CN113076142B (en) * 2021-03-31 2022-12-27 海信视像科技股份有限公司 TCON parameter initialization method and display device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6112282A (en) * 1997-06-24 2000-08-29 Sun Microsystems, Inc. Apparatus for atomic locking-accessing-unlocking of a shared resource
CN105956111A (en) * 2016-05-03 2016-09-21 中山市奥创通风设备有限公司 Cloud service intelligent control system for air purifier
US9645825B2 (en) * 2015-01-15 2017-05-09 Texas Instruments Deutschland Gmbh Instruction cache with access locking
CN107153620A (en) * 2016-03-03 2017-09-12 青岛海信电器股份有限公司 A kind of data processing method and device
CN108572876A (en) * 2018-03-07 2018-09-25 北京神州绿盟信息安全科技股份有限公司 A kind of implementation method and device of Read-Write Locks

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5720243B2 (en) * 2010-12-28 2015-05-20 富士通セミコンダクター株式会社 Processor verification program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6112282A (en) * 1997-06-24 2000-08-29 Sun Microsystems, Inc. Apparatus for atomic locking-accessing-unlocking of a shared resource
US9645825B2 (en) * 2015-01-15 2017-05-09 Texas Instruments Deutschland Gmbh Instruction cache with access locking
CN107153620A (en) * 2016-03-03 2017-09-12 青岛海信电器股份有限公司 A kind of data processing method and device
CN105956111A (en) * 2016-05-03 2016-09-21 中山市奥创通风设备有限公司 Cloud service intelligent control system for air purifier
CN108572876A (en) * 2018-03-07 2018-09-25 北京神州绿盟信息安全科技股份有限公司 A kind of implementation method and device of Read-Write Locks

Also Published As

Publication number Publication date
CN109698971A (en) 2019-04-30

Similar Documents

Publication Publication Date Title
US10642405B2 (en) Drive control device for a display having display elements and touch detection electrodes
US6816163B2 (en) Updating image frames on a screen comprising memory
US9170975B2 (en) High speed overlay of idle I2C bus bandwidth
CN109698971B (en) Data processing method and device
US20060267987A1 (en) Master/slave graphics adapter arrangement
US7852307B2 (en) Multi-mode pulse width modulated displays
US11211023B2 (en) Display method of display device and display device
WO2011044241A1 (en) Integrated electronic paper display controller
US20180322087A1 (en) Devices and methods for transmission of events with a uniform latency on serial communication links
US7882380B2 (en) Work based clock management for display sub-system
US20110169849A1 (en) Buffer Underrun Handling
CN115857861A (en) Display control method, system, chip, electronic device and storage medium
US20030184550A1 (en) Virtual frame buffer control system
CN105427780B (en) System On Chip (SOC) device, display driver and SOC system
CN112367537A (en) Video acquisition-splicing-display system based on ZYNQ
CN110444156A (en) Display device and its driver
CN114237532A (en) Multi-window implementation method, device and medium based on Linux embedded system
US8730152B2 (en) System and method for reinitializing a screen controller of an electronic display device
US9363412B2 (en) Accelerator circuit and image processing apparatus
US11416167B2 (en) System, control method thereof, and storage medium
US6774918B1 (en) Video overlay processor with reduced memory and bus performance requirements
CN111656780B (en) Semiconductor device, display device, graphic processor, electronic apparatus, image processing method
US20220392412A1 (en) Handwritten reading device, report point data processing method thereof, and computer storage medium
US20160148336A1 (en) Data communication device and data communication system
CN103002346B (en) Video process apparatus, television equipment and method for processing video frequency

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 266100 No. 151, Zhuzhou Road, Laoshan District, Shandong, Qingdao

Applicant after: Hisense Video Technology Co.,Ltd.

Address before: 266100 No. 151, Zhuzhou Road, Laoshan District, Shandong, Qingdao

Applicant before: HISENSE ELECTRIC Co.,Ltd.

GR01 Patent grant
GR01 Patent grant