Binary file processing method, device, vehicle and storage medium
By introducing interactive rendering layer and parsing adaptation layer in binary file processing, filtering and transmitting target analytical data, the problem of low binary file processing efficiency in the prior art is solved, and more efficient data processing and transmission is achieved.
Patent Information
- Application Number
- CN202410671715.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-05-28
AI Technical Summary
In the prior art, the processing efficiency of binary files is low, resulting in efficiency problems in data processing and transmission.
The interactive rendering layer detects user operations and sends the operations to the parsing adaptation layer. The parsing adaptation layer parses the target binary file, filters out the target parsing data, and sends it to the interactive rendering layer. The interactive rendering layer renders based on the target parsing data.
Reduce the amount of data transmission and time-consuming transmission of analytical data, and improve the processing efficiency of binary files.
Smart Images

Figure CN118642649B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of data processing and vehicle technology, and in particular to a binary file processing method, device, vehicle and storage medium. Background Art
[0002] At present, binary files have the advantages of saving storage space, fast and accurate storage, etc., and have been widely used in the fields of vehicle CAN (Controller Area Network) data storage, operating system and software development data storage, multimedia data storage, etc. However, the binary file processing method in the related art has the problem of low processing efficiency. Summary of the invention
[0003] The present disclosure provides a binary file processing method, device, vehicle, server, and computer-readable storage medium to at least solve the problem of low binary file processing efficiency in the related art. The technical solution of the present disclosure is as follows:
[0004] According to a first aspect of an embodiment of the present disclosure, a binary file processing method is provided, including: an interactive rendering layer detecting a user operation, and sending the user operation to a parsing adaptation layer; the parsing adaptation layer parsing a target binary file to obtain an original parsed data set; the parsing adaptation layer filtering out target parsed data from the original parsed data set based on the user operation, and sending the target parsed data to the interactive rendering layer; the interactive rendering layer rendering display content corresponding to the target binary file based on the target parsed data.
[0005] In one embodiment of the present disclosure, the parsing adaptation layer filters out target parsing data from the original parsing data set based on the user's operation, including: the parsing adaptation layer determines target screening parameters of the target parsing data based on the user's operation, wherein the target screening parameters include at least one of the data category, collection time and value range of the target parsing data; the parsing adaptation layer filters out the target parsing data from the original parsing data set based on the target screening parameters.
[0006] In one embodiment of the present disclosure, before the parsing adaptation layer filters out the target parsing data from the original parsing data set based on the target screening parameters, it also includes: the parsing adaptation layer obtains historical screening parameters of historical parsing data; the parsing adaptation layer identifies that the target screening parameters are different from each of the historical screening parameters.
[0007] In one embodiment of the present disclosure, the method further includes: the parsing adaptation layer identifying that the target screening parameter is the same as the historical screening parameter; and the parsing adaptation layer using the historical parsing data corresponding to the historical screening parameter as the target parsing data.
[0008] In one embodiment of the present disclosure, the parsing adaptation layer determines the target screening parameters of the target parsing data based on the user's operation, including:
[0009] The parsing adaptation layer uses the target category as the data category of the target parsing data based on the user's selection operation on the target category;
[0010] The parsing adaptation layer determines, based on the user's zooming operation on the displayed content, a data category of the parsed data to be displayed in the zoomed displayed content as the data category of the target parsed data, and / or determines a collection time of the parsed data to be displayed in the zoomed displayed content as the collection time of the target parsed data;
[0011] The analysis adaptation layer determines, based on the user's movement operation on the displayed content, a data category of the analysis data to be displayed in the displayed content after the movement, as the data category of the target analysis data, and / or determines a collection time of the analysis data to be displayed in the displayed content after the movement, as the collection time of the target analysis data.
[0012] In one embodiment of the present disclosure, the method further includes: the interactive rendering layer sending the user's operation to the life cycle layer; the life cycle layer determining a target state currently in the life cycle based on the user's operation, and sending the target state to the interactive rendering layer and the parsing adaptation layer; the interactive rendering layer determining a first process based on the target state, and executing the first process; and / or the parsing adaptation layer determining a second process based on the target state, and executing the second process.
[0013] In one embodiment of the present disclosure, the method further includes: the interactive rendering layer sending the execution result of the first process to the lifecycle layer; the parsing adaptation layer sending the execution result of the second process to the lifecycle layer; the lifecycle layer determining the target state based on the execution result of the target process, wherein the target process includes the first process and / or the second process; returning to execute the sending of the target state to the interactive rendering layer and the parsing adaptation layer and subsequent steps.
[0014] In one embodiment of the present disclosure, the lifecycle layer determines the target state based on the execution result of the target process, including: the lifecycle layer identifies that the target process only includes the first process or the second process, and the target process is executed successfully, and updates the target state; the lifecycle layer identifies that the target process only includes the first process or the second process, and the target process fails to execute, and keeps the target state unchanged; the lifecycle layer identifies that the target process includes the first process and the second process, and both the first process and the second process are executed successfully, and updates the target state; the lifecycle layer identifies that the target process includes the first process and the second process, and at least one of the first process and the second process fails to execute, and keeps the target state unchanged.
[0015] In one embodiment of the present disclosure, the interactive rendering layer renders the display content corresponding to the target binary file based on the target parsed data, including: the interactive rendering layer calls an open graphics library OpenGL, and renders the display content based on the target parsed data through the OpenGL.
[0016] In one embodiment of the present disclosure, the interactive rendering layer renders the display content corresponding to the target binary file based on the target parsed data, including: the interactive rendering layer obtains that the canvas width occupied by the display content is X unit length; the interactive rendering layer determines that the target number of data to be rendered is less than or equal to X; the interactive rendering layer downsamples the target parsed data to obtain the target number of data to be rendered; the interactive rendering layer renders the display content based on the target number of data to be rendered, wherein the canvas width occupied by each of the data to be rendered is greater than or equal to 1 unit length.
[0017] In one embodiment of the present disclosure, at least one of the interactive rendering layer, the parsing adaptation layer, and the lifecycle layer is compiled based on WebAssembly.
[0018] In one embodiment of the present disclosure, the target binary file carries control area network (CAN) data.
[0019] According to a second aspect of an embodiment of the present disclosure, a binary file processing device is provided, including: a detection module, configured to detect a user operation through an interactive rendering layer, and send the user operation to a parsing adaptation layer; a parsing module, configured to parse a target binary file through the parsing adaptation layer to obtain an original parsed data set; a screening module, configured to filter target parsed data from the original parsed data set based on the user operation through the parsing adaptation layer, and send the target parsed data to the interactive rendering layer; and a rendering module, configured to render display content corresponding to the target binary file based on the target parsed data through the interactive rendering layer.
[0020] In one embodiment of the present disclosure, the screening module is further configured to execute: determining target screening parameters of the target parsed data based on the user's operation through the parsing adaptation layer, wherein the target screening parameters include at least one of the data category, collection time and value range of the target parsed data; and filtering out the target parsed data from the original parsed data set based on the target screening parameters through the parsing adaptation layer.
[0021] In one embodiment of the present disclosure, before filtering out the target parsing data from the original parsing data set based on the target screening parameters through the parsing adaptation layer, the screening module is further configured to execute: obtaining historical screening parameters of historical parsing data through the parsing adaptation layer; and identifying through the parsing adaptation layer that the target screening parameters are different from each of the historical screening parameters.
[0022] In one embodiment of the present disclosure, the screening module is further configured to execute: identifying through the parsing adaptation layer that the target screening parameter is the same as the historical screening parameter; and using through the parsing adaptation layer the historical parsing data corresponding to the historical screening parameter as the target parsing data.
[0023] In one embodiment of the present disclosure, the screening module is further configured to execute:
[0024] Based on the user's selection operation on the target category, the target category is used as the data category of the target parsed data by the parsing adaptation layer;
[0025] Determining, by the analysis adaptation layer, based on the user's zooming operation on the displayed content, a data category of the analyzed data to be displayed in the zoomed displayed content as the data category of the target analyzed data, and / or determining a collection time of the analyzed data to be displayed in the zoomed displayed content as the collection time of the target analyzed data;
[0026] Based on the user's moving operation on the displayed content, the analysis adaptation layer determines the data category of the analysis data to be displayed in the displayed content after the movement as the data category of the target analysis data, and / or determines the collection time of the analysis data to be displayed in the displayed content after the movement as the collection time of the target analysis data.
[0027] In one embodiment of the present disclosure, the device further includes a processing module, which is configured to execute: sending the user's operation to the life cycle layer through the interactive rendering layer; determining a target state currently in the life cycle based on the user's operation through the life cycle layer, and sending the target state to the interactive rendering layer and the parsing adaptation layer; determining a first process based on the target state through the interactive rendering layer, and executing the first process; and / or determining a second process based on the target state through the parsing adaptation layer, and executing the second process.
[0028] In one embodiment of the present disclosure, the processing module is further configured to execute: sending the execution result of the first process to the lifecycle layer through the interactive rendering layer; sending the execution result of the second process to the lifecycle layer through the parsing adaptation layer; determining the target state based on the execution result of the target process through the lifecycle layer, wherein the target process includes the first process and / or the second process; and returning to execute the step of sending the target state to the interactive rendering layer and the parsing adaptation layer and subsequent steps.
[0029] In one embodiment of the present disclosure, the processing module is further configured to perform: identifying through the lifecycle layer that the target process only includes the first process or the second process, and the target process is executed successfully, updating the target state; identifying through the lifecycle layer that the target process only includes the first process or the second process, and the target process fails to execute, keeping the target state unchanged; identifying through the lifecycle layer that the target process includes the first process and the second process, and both the first process and the second process are executed successfully, updating the target state; identifying through the lifecycle layer that the target process includes the first process and the second process, and at least one of the first process and the second process fails to execute, keeping the target state unchanged.
[0030] In one embodiment of the present disclosure, the rendering module is further configured to execute: calling an open graphics library OpenGL through the interactive rendering layer, and rendering the display content based on the target parsed data through the OpenGL.
[0031] In one embodiment of the present disclosure, the rendering module is further configured to execute: obtaining, through the interactive rendering layer, a canvas width occupied by the display content as X unit lengths; determining, through the interactive rendering layer, that a target number of data to be rendered is less than or equal to X; downsampling, through the interactive rendering layer, the target parsed data to obtain the target number of data to be rendered; and rendering, through the interactive rendering layer, the display content based on the target number of data to be rendered, wherein a canvas width occupied by each of the data to be rendered is greater than or equal to 1 unit length.
[0032] In one embodiment of the present disclosure, at least one of the interactive rendering layer, the parsing adaptation layer, and the lifecycle layer is compiled based on WebAssembly.
[0033] In one embodiment of the present disclosure, the target binary file carries control area network (CAN) data.
[0034] According to a third aspect of an embodiment of the present disclosure, a vehicle is provided, comprising a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the steps of the method described in the first aspect of the embodiment of the present disclosure.
[0035] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method described in the first aspect of the embodiment of the present disclosure are implemented.
[0036] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects: compared with the related art in which the parsing adaptation layer sends all the parsing data to the interactive rendering layer, the parsing adaptation layer in the present solution can take into account the user's operation, filter out the target parsing data from the original parsing data set, and send the target parsing data to the interactive rendering layer, that is, only the filtered part of the parsing data needs to be sent to the interactive rendering layer so that the interactive rendering layer renders the display content, thereby reducing the transmission data volume and transmission time of the parsing data and improving the processing efficiency of binary files.
[0037] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0039] Figure 1 The figure is a flowchart of a method for processing a binary file according to an exemplary embodiment.
[0040] Figure 2 The figure is a flowchart of a method for processing a binary file according to another exemplary embodiment.
[0041] Figure 3 The figure is a flowchart of a method for processing a binary file according to another exemplary embodiment.
[0042] Figure 4 The figure is a flowchart of a method for processing a binary file according to another exemplary embodiment.
[0043] Figure 5 The figure is a flowchart of a method for processing a binary file according to another exemplary embodiment.
[0044] Figure 6 The present invention is a block diagram of a binary file processing device according to an exemplary embodiment.
[0045] Figure 7 is a block diagram of a vehicle according to an exemplary embodiment. DETAILED DESCRIPTION
[0046] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0047] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0048] Figure 1 is a flowchart of a method for processing a binary file according to an exemplary embodiment. Figure 1 As shown, the binary file processing method of the embodiment of the present disclosure includes the following steps.
[0049] S101: The interactive rendering layer detects the user's operation and sends the user's operation to the parsing adaptation layer.
[0050] It should be noted that the execution subject of the binary file processing method of the embodiment of the present disclosure is an electronic device, such as a mobile phone, a notebook, a desktop computer, a vehicle-mounted terminal, a robot, a drone, a smart home appliance, a wearable device, etc. Among them, the wearable device may include a wrist-worn device (such as a smart watch, a smart bracelet), a head-worn device, a foot-worn device, etc. The binary file processing method of the embodiment of the present disclosure can be executed by the binary file processing device of the embodiment of the present disclosure, and the binary file processing device of the embodiment of the present disclosure can be configured in any electronic device to execute the binary file processing method of the embodiment of the present disclosure.
[0051] It should be noted that the interactive rendering layer and the parsing adaptation layer belong to the same application. The interactive rendering layer and the parsing adaptation layer can interact with each other. The relevant content of the parsing adaptation layer can be found in the following embodiments, which will not be repeated here.
[0052] In one embodiment, at least one of the interactive rendering layer and the parsing adaptation layer is compiled based on WebAssembly. It should be noted that WebAssembly (WASM for short) is a portable, small-sized, and fast-loading binary format bytecode standard. Thus, at least one of the interactive rendering layer and the parsing adaptation layer can be compiled based on WebAssembly, and at least one of the interactive rendering layer and the parsing adaptation layer can be run in multiple scenarios such as browsers and IoT (Internet of Things) terminals, that is, cross-terminal operation is achieved, with portability, and runs at a speed close to that of native code, which helps to improve the processing speed of binary files, avoid browser crashes, and slow running problems, and is particularly suitable for browser application scenarios.
[0053] In one embodiment, the method further includes encapsulating at least one of the interactive rendering layer and the parsing adaptation layer into a container, thereby ensuring the consistency, portability, and repeatability of the application. For example, the interactive rendering layer and the parsing adaptation layer compiled based on WebAssembly can be encapsulated into a cloud container that supports WebAssembly.
[0054] It should be noted that there are not too many restrictions on user operations. For example, it may include upload operations or selection operations for target binary files, selection operations for target categories, selection operations for target collection times, entry operations or selection operations for target collection time periods, entry operations or selection operations for target value ranges, zoom operations on the display content of target binary files, move operations on the display content (such as translation, rotation, etc.), and size adjustment operations on the display content.
[0055] It should be noted that there are no excessive restrictions on the target binary file. For example, the target binary file carries CAN (Controller Area Network) data. For example, the target binary file carries operating system and software development data. For example, the target binary file carries multimedia data (such as images, audio, etc.).
[0056] It should be noted that the target category is a data category of the target parsing data, and the display content is not limited too much, for example, it can include a signal chart. The relevant content of the target parsing data can be found in the following embodiments, which will not be repeated here.
[0057] S102, the parsing adaptation layer parses the target binary file to obtain an original parsed data set.
[0058] It should be noted that the original analysis data set includes multiple original analysis data, and there is no excessive limitation on the original analysis data. For example, it may include signal values, sampling times corresponding to signal values, signal categories, etc.
[0059] It should be noted that the parsing adaptation layer parses the target binary file to obtain the original parsed data set, which can be implemented by using any binary file parsing method in the relevant technology, and no excessive restrictions are made here.
[0060] In one embodiment, the parsing adaptation layer parses the target binary file to obtain an original parsed data set, including the parsing adaptation layer acquiring the correspondence between signals and channels, and the parsing adaptation layer converting the binary data in the target binary file into structured data of signals and channels based on the correspondence.
[0061] In some examples, parsing the adaptation layer to obtain the correspondence between the signal and the channel includes parsing the adaptation layer based on a DBC (Database Controller Area Network) file to obtain the correspondence between the signal and the channel.
[0062] In some examples, the parsing adaptation layer converts binary data in a target binary file into structured data of signals and channels based on the correspondence, including converting first binary data in the target binary file into structured data with data signals and channels, and converting second binary data in the target binary file into structured data without data signals and channels based on the correspondence.
[0063] In one embodiment, the method further includes the parsing adaptation layer storing the original parsed data set into a local storage space.
[0064] S103, the parsing adaptation layer filters out target parsing data from the original parsing data set based on the user's operation, and sends the target parsing data to the interactive rendering layer.
[0065] It should be noted that the target parsed data is part of the data in the original parsed data set, that is, part of the original parsed data.
[0066] In one embodiment, the parsing adaptation layer screens out target parsing data from the original parsing data set based on the user's operation, including the parsing adaptation layer obtaining a mapping relationship between the candidate operation and the candidate parsing data, and the parsing adaptation layer obtaining the candidate parsing data having a mapping relationship with the user's operation as the target parsing data. It is understandable that different candidate operations may map different candidate parsing data.
[0067] S104: The interactive rendering layer renders display content corresponding to the target binary file based on the target parsed data.
[0068] It should be noted that the interactive rendering layer renders the display content corresponding to the target binary file based on the target parsed data, and can be implemented by using any binary file rendering method in the relevant technology, which is not limited here.
[0069] In one embodiment, the interactive rendering layer renders the display content corresponding to the target binary file based on the target parsed data, including the interactive rendering layer calling OpenGL (Open Graphics Library), and rendering the display content based on the target parsed data through OpenGL. Thus, in the method, the interactive rendering layer can call OpenGL to render the display content, and directly render it to the canvas through OpenGL. The interactive rendering layer does not need to communicate with the upper client, thereby avoiding the extra memory consumption and communication interaction time consumption generated when the interactive rendering layer communicates with the upper client, and improving the rendering speed.
[0070] In one embodiment, the interactive rendering layer renders the display content corresponding to the target binary file based on the target parsed data, including the interactive rendering layer obtaining that the canvas width occupied by the display content is X unit lengths, the interactive rendering layer determining that the target number of data to be rendered is less than or equal to X, the interactive rendering layer downsampling the target parsed data to obtain the target number of data to be rendered, and the interactive rendering layer rendering the display content based on the target number of data to be rendered, wherein the canvas width occupied by each data to be rendered is greater than or equal to 1 unit length. Thus, the interactive rendering layer can downsample the target parsed data to ensure that the target number of data to be rendered is always less than or equal to the canvas width, thereby improving the rendering speed.
[0071] It should be noted that there are no excessive restrictions on the unit length, for example, it may include 1px (Pixel), and the horizontal area of the canvas occupied by any two to-be-rendered data does not overlap. The interactive rendering layer downsamples the target parsed data, and any downsampling method in the relevant technology may be used to implement it, and there are no excessive restrictions here, for example, the downsampling method may include the LTTB (Largest Triangle Three Buckets) algorithm.
[0072] In the binary file processing method provided by the embodiment of the present disclosure, the interactive rendering layer detects the user's operation and sends the user's operation to the parsing adaptation layer, the parsing adaptation layer parses the target binary file to obtain the original parsing data set, the parsing adaptation layer filters out the target parsing data from the original parsing data set based on the user's operation, and sends the target parsing data to the interactive rendering layer, and the interactive rendering layer renders the display content corresponding to the target binary file based on the target parsing data. Therefore, compared with the related art in which the parsing adaptation layer sends all the parsing data to the interactive rendering layer, the parsing adaptation layer in this solution can take into account the user's operation, filter out the target parsing data from the original parsing data set, and send the target parsing data to the interactive rendering layer, that is, only the filtered part of the parsing data needs to be sent to the interactive rendering layer so that the interactive rendering layer can render the display content, which reduces the transmission data volume and transmission time of the parsing data and improves the processing efficiency of the binary file.
[0073] Figure 2 is a flowchart of a method for processing a binary file according to another exemplary embodiment. Figure 2 As shown, the binary file processing method of the embodiment of the present disclosure includes the following steps.
[0074] S201: The interactive rendering layer detects the user's operation and sends the user's operation to the parsing adaptation layer.
[0075] S202, the parsing adaptation layer parses the target binary file to obtain an original parsed data set.
[0076] The relevant contents of steps S201 - S202 can be found in the above embodiment and will not be described again here.
[0077] S203, the analysis adaptation layer determines a target screening parameter of the target analysis data based on the user's operation, wherein the target screening parameter includes at least one of a data category, a collection time, and a value range of the target analysis data.
[0078] S204, the parsing adaptation layer filters out target parsing data from the original parsing data set based on the target screening parameters.
[0079] It should be noted that the target analysis data has at least one data category, collection time, and value range, and the value range of the target analysis data is not excessively limited. For example, it can be determined by at least one of the upper limit value and the lower limit value of the target analysis data.
[0080] In the embodiments of the present disclosure, the parsing adaptation layer determines the target screening parameters of the target parsing data based on the user's operation, including the following possible implementations:
[0081] Method 1: The parsing adaptation layer uses the target category as the data category of the target parsing data based on the user's selection operation on the target category.
[0082] It should be noted that there are not too many restrictions on the selection operation. For example, it can include click operations (such as single-click operations, double-click operations), drag operations, etc.
[0083] For example, the user can click on signal 1 on the interactive interface. Correspondingly, the interactive rendering layer can detect the above operation and send the above operation to the parsing adaptation layer. The parsing adaptation layer can use signal 1 as the data category of the target parsing data and filter out the parsing data with the data category of signal 1 from the original parsing data set as the target parsing data. It should be noted that in this embodiment, signal 1 is the target category.
[0084] Method 2: The analysis adaptation layer uses the target collection time as the collection time of the target analysis data based on the user's selection operation on the target collection time.
[0085] For example, the user can click on the collection time 1 to 10 on the interactive interface. Correspondingly, the interactive rendering layer can detect the above operation and send the above operation to the analysis adaptation layer. The analysis adaptation layer can use the collection time 1 to 10 as the collection time of the target analysis data, and filter out the analysis data of the collection time 1 to 10 from the original analysis data set as the target analysis data. It should be noted that in this embodiment, the collection time 1 to 10 are all target collection times.
[0086] Mode 3: Based on the user's input operation or selection operation for the target collection time period, the analysis adaptation layer uses each target collection moment in the target collection time period as the collection moment of the target analysis data.
[0087] For example, the user can perform an input operation for the collection time period A on the interactive interface. Accordingly, the interactive rendering layer can detect the above operation and send the above operation to the analysis adaptation layer. The analysis adaptation layer can use each collection moment in the collection time period A as the collection moment of the target analysis data, and filter out the analysis data of the collection time period A from the original analysis data set as the target analysis data. It should be noted that the collection time period A in this embodiment is the target collection time period.
[0088] Mode 4: The parsing adaptation layer uses the target value range as the value range of the target parsing data based on the user's input operation or selection operation on the target value range.
[0089] For example, the user can perform an input operation for the value range B on the interactive interface. Accordingly, the interactive rendering layer can detect the above operation and send the above operation to the parsing adaptation layer. The parsing adaptation layer can use the value range B as the value range of the target parsing data and filter out the parsing data of the value range B from the original parsing data set as the target parsing data. It should be noted that the value range B in this embodiment is the target value range.
[0090] Method 5: The analysis adaptation layer determines, based on the user's zooming operation on the displayed content, a data category of the analyzed data to be displayed in the zoomed displayed content as the data category of the target analyzed data, and / or determines a collection time of the analyzed data to be displayed in the zoomed displayed content as the collection time of the target analyzed data.
[0091] It is understandable that the user's zooming operation on the display content (such as a signal chart) may cause changes in the data category and acquisition time of the analyzed data to be displayed in the display content.
[0092] For example, the user can perform a zoom operation on the signal chart 1 on the interactive interface. Accordingly, the interactive rendering layer can detect the above operation and send the above operation to the analysis adaptation layer. The analysis adaptation layer can determine the data category of the analysis data to be displayed in the zoomed signal chart 1 as the data category of the target analysis data, and / or determine the collection time of the analysis data to be displayed in the zoomed signal chart 1 as the collection time of the target analysis data.
[0093] Method 6: The analysis adaptation layer determines, based on the user's movement operation on the displayed content, a data category of the analyzed data to be displayed in the displayed content after the movement, as the data category of the target analyzed data, and / or determines a collection time of the analyzed data to be displayed in the displayed content after the movement, as the collection time of the target analyzed data.
[0094] It is understandable that the user's movement operation on the display content (such as a signal chart) may cause changes in the data category and acquisition time of the analyzed data to be displayed in the display content.
[0095] For example, the user can perform a translation operation on the signal chart 2 on the interactive interface. Accordingly, the interactive rendering layer can detect the above operation and send the above operation to the analysis adaptation layer. The analysis adaptation layer can determine the data category of the analysis data to be displayed in the translated signal chart 2 as the data category of the target analysis data, and / or determine the collection time of the analysis data to be displayed in the translated signal chart 2 as the collection time of the target analysis data.
[0096] S205: The parsing adaptation layer sends the target parsed data to the interactive rendering layer.
[0097] S206: The interactive rendering layer renders display content corresponding to the target binary file based on the target parsed data.
[0098] The relevant contents of steps S205-S206 can be found in the above embodiment and will not be repeated here.
[0099] In the binary file processing method provided by the embodiment of the present disclosure, the parsing adaptation layer determines the target screening parameters of the target parsing data based on the user's operation, wherein the target screening parameters include at least one of the data category, collection time and value range of the target parsing data, and the parsing adaptation layer screens the target parsing data from the original parsing data set based on the target screening parameters. Thus, the parsing adaptation layer can determine the target screening parameters taking into account the user's operation to screen the target parsing data from the original parsing data set to achieve the screening of the parsing data.
[0100] Figure 3 is a flowchart of a method for processing a binary file according to another exemplary embodiment. Figure 3 As shown, the binary file processing method of the embodiment of the present disclosure includes the following steps.
[0101] S301: The interactive rendering layer detects the user's operation and sends the user's operation to the parsing adaptation layer.
[0102] S302, the parsing adaptation layer parses the target binary file to obtain an original parsed data set.
[0103] S303, the analysis adaptation layer determines a target screening parameter of the target analysis data based on the user's operation, wherein the target screening parameter includes at least one of a data category, a collection time, and a value range of the target analysis data.
[0104] The relevant contents of steps S301 - S303 can be found in the above embodiment and will not be described again here.
[0105] S304, the parsing adaptation layer obtains historical screening parameters of historical parsing data.
[0106] It should be noted that the target parsing data refers to the parsing data transmitted in the current round. In this embodiment, the current round is not the first round. The historical parsing data refers to the parsing data transmitted in the historical rounds. The historical rounds are the rounds before the current round. There is at least one historical round. For example, if the current round is the second round, the historical rounds may include the first round. If the current round is the third round, the historical rounds may include the first and second rounds.
[0107] It should be noted that there is a corresponding relationship between the historical analysis data and the historical screening parameters, and the historical analysis data is obtained by screening based on the historical screening parameters of the historical analysis data.
[0108] In one implementation, the parsing adaptation layer obtains the historical screening parameters of the historical parsing data, including the parsing adaptation layer obtaining the historical screening parameters from a local storage space.
[0109] In one embodiment, the method further includes analyzing the adaptation layer to store the historical screening parameters into the current storage space.
[0110] S305, the parsing adaptation layer identifies that the target screening parameter is different from each historical screening parameter.
[0111] S306, the parsing adaptation layer filters out target parsing data from the original parsing data set based on the target screening parameters.
[0112] It is understandable that if the target screening parameter is different from each historical screening parameter, it indicates that the target parsing data to be screened is different from each historical parsing data. In this case, the parsing adaptation layer needs to screen out the target parsing data based on the target screening parameter.
[0113] For example, if the historical filtering parameters include historical filtering parameters 1 to 3, and the historical analysis data include historical analysis data A, B, and C, the historical filtering parameter of historical analysis data A is historical filtering parameter 1, the historical filtering parameter of historical analysis data B is historical filtering parameter 2, the historical filtering parameter of historical analysis data C is historical filtering parameter 3, and the target filtering parameter is target filtering parameter 4.
[0114] If the target screening parameter 4 is different from the historical screening parameters 1 to 3, the analysis adaptation layer can identify that the target screening parameter 4 is different from the historical screening parameters 1 to 3, and the analysis adaptation layer can filter out the target analysis data D from the original analysis data set based on the target screening parameter 4.
[0115] S307, the parsing adaptation layer identifies that the target screening parameter is the same as the historical screening parameter.
[0116] S308, the parsing adaptation layer uses the historical parsing data corresponding to the historical screening parameters as target parsing data.
[0117] It can be understood that if the target filtering parameters are the same as the historical filtering parameters, it indicates that the target parsing data to be screened is the same as the historical parsing data corresponding to the historical filtering parameters. At this time, the parsing adaptation layer does not need to filter again based on the target filtering parameters, and can directly use the historical parsing data corresponding to the historical filtering parameters as the target parsing data.
[0118] For example, let’s continue with the above historical screening parameters 1 to 3 and target screening parameter 4.
[0119] If the target screening parameter 4 is the same as the historical screening parameter 1, the analysis adaptation layer recognizes that the target screening parameter 4 is the same as the historical screening parameter 1, and the analysis adaptation layer uses the historical analysis data A corresponding to the historical screening parameter 1 as the target analysis data D.
[0120] If the target screening parameter 4 is the same as the historical screening parameter 2, the analysis adaptation layer recognizes that the target screening parameter 4 is the same as the historical screening parameter 2, and the analysis adaptation layer uses the historical analysis data B corresponding to the historical screening parameter 2 as the target analysis data D.
[0121] If the target screening parameter 4 is the same as the historical screening parameter 3, the analysis adaptation layer recognizes that the target screening parameter 4 is the same as the historical screening parameter 3, and the analysis adaptation layer uses the historical analysis data C corresponding to the historical screening parameter 3 as the target analysis data D.
[0122] S309: The parsing adaptation layer sends the target parsed data to the interactive rendering layer.
[0123] S310: The interactive rendering layer renders display content corresponding to the target binary file based on the target parsed data.
[0124] The relevant contents of steps S309-S310 can be found in the above embodiment and will not be repeated here.
[0125] The embodiment of the present disclosure provides a method for processing binary files, in which the parsing adaptation layer obtains historical screening parameters of historical parsing data, and only filters out target parsing data based on the target screening parameters when the target screening parameters are different from each historical screening parameter. When the target screening parameters are the same as the historical screening parameters, the historical parsing data corresponding to the historical screening parameters are directly used as the target parsing data, which can reduce the number of screening times and improve the processing efficiency of binary files.
[0126] Figure 4 is a flowchart of a method for processing a binary file according to another exemplary embodiment. Figure 4 As shown, the binary file processing method of the embodiment of the present disclosure includes the following steps.
[0127] S401: The interactive rendering layer detects the user's operation and sends the user's operation to the parsing adaptation layer.
[0128] The relevant contents of step S401 can be found in the above embodiment and will not be described again here.
[0129] S402: The interactive rendering layer sends the user's operation to the lifecycle layer.
[0130] S403, the life cycle layer determines the target state currently in the life cycle based on the user's operation, and sends the target state to the interactive rendering layer and the parsing adaptation layer.
[0131] It should be noted that the interactive rendering layer, parsing adaptation layer and life cycle layer belong to the same application. The interactive rendering layer, parsing adaptation layer and life cycle layer can interact with each other. The life cycle refers to the life cycle of processing binary files, which may include multiple candidate states, and multiple candidate states include the target state. There is no excessive limitation on the candidate states, for example, they may include the initialization state, parsing state, rendering state, destruction state, etc.
[0132] In one implementation, the lifecycle layer is obtained by abstracting the parsing adaptation layer.
[0133] In one embodiment, the life cycle layer determines the target state currently in the life cycle based on the user's operation, including the life cycle layer obtaining a mapping relationship between a candidate operation and a candidate state, and obtaining a candidate state having a mapping relationship with the user's operation as the target state. It is understandable that different candidate operations may map to different candidate states.
[0134] In one implementation, the lifecycle layer determines the current target state in the lifecycle based on the user's operation, including the lifecycle layer identifying the user's operation as an upload operation or a selection operation for the target binary file, and the lifecycle layer determining the target state to be an initialization state.
[0135] In one embodiment, the life cycle layer determines the target state currently in the life cycle based on the user's operation, including the life cycle layer identifying the user's operation as a rendering operation for display content, and the life cycle layer determining the target state as a rendering state. The rendering operation for display content may include a selection operation for a target category, a selection operation for a target acquisition time, an entry operation or a selection operation for a target acquisition time period, an entry operation or a selection operation for a target value range, a zoom operation for the display content of a target binary file, a movement operation (such as translation, rotation, etc.) for the display content, and a size adjustment operation for the display content.
[0136] In one implementation, the lifecycle layer determines the target state currently in the lifecycle based on the user's operation, including the lifecycle layer identifying that the user's operation is an upload operation or a selection operation for a newly added binary file, and the lifecycle layer determining that the target state is a destroyed state. It should be noted that the newly added binary file and the target binary file are different binary files.
[0137] S404: The interactive rendering layer determines a first process based on the target state and executes the first process.
[0138] S405, the parsing adaptation layer determines a second process based on the target state, and executes the second process.
[0139] It should be noted that after step S403, at least one of steps S404 and S405 is executed. The execution order of steps S404 and S405 is not limited too much, for example, after step S404, step S405 is executed, or after step S405, step S404 is executed, or steps S404 and S405 are executed in parallel.
[0140] It should be noted that there are no excessive limitations on the first process and the second process, and both the first process and the second process may include at least one step.
[0141] In one embodiment, the interactive rendering layer determines the first process based on the target state, which may include the interactive rendering layer obtaining a mapping relationship between the candidate state and the first candidate process, and the interactive rendering layer obtaining the first candidate process having a mapping relationship with the target state as the first process. It is understandable that different candidate states may map to different first candidate processes.
[0142] In one embodiment, the parsing adaptation layer determines the first process based on the target state, which may include the parsing adaptation layer obtaining a mapping relationship between the candidate state and the second candidate process, and the parsing adaptation layer obtaining the second candidate process having a mapping relationship with the target state as the second process. It is understandable that the second candidate processes mapped to different candidate states may be different.
[0143] In one embodiment, the parsing adaptation layer determines a second process based on the target state and executes the second process, including the parsing adaptation layer identifying the target state as an initialization state, the parsing adaptation layer determining that the second process includes determining a parsing category of the target binary file, and the parsing adaptation layer determining the parsing category of the target binary file.
[0144] In one embodiment, the parsing adaptation layer determines a second process based on a target state and executes the second process, including the parsing adaptation layer identifying the target state as a parsing state, the parsing adaptation layer determining that the second process includes parsing a target binary file to obtain an original parsed data set, and the parsing adaptation layer parsing the target binary file to obtain an original parsed data set.
[0145] In one implementation, the parsing adaptation layer determines the second process based on the target state and executes the second process, including the parsing adaptation layer identifying the target state as a rendering state, the parsing adaptation layer determining the second process includes filtering out target parsing data from an original parsing data set based on a user operation, and also includes sending the target parsing data to an interactive rendering layer, and the parsing adaptation layer filters out the target parsing data from an original parsing data set based on the user operation and sends the target parsing data to the interactive rendering layer.
[0146] In one implementation, the interactive rendering layer determines a first process based on a target state and executes the first process, including the interactive rendering layer identifying that the target state is a rendering state, the interactive rendering layer determining that the first process includes rendering display content corresponding to a target binary file based on target parsed data, and the interactive rendering layer rendering display content corresponding to the target binary file based on the target parsed data.
[0147] In one embodiment, the parsing adaptation layer determines a second process based on the target state and executes the second process, including the parsing adaptation layer identifying that the target state is a destruction state, the parsing adaptation layer determining that the second process includes deleting the parsed data of the target binary file from the local storage space, and the parsing adaptation layer deleting the parsed data of the target binary file from the local storage space.
[0148] In the binary file processing method provided by the embodiment of the present disclosure, the interactive rendering layer sends the user's operation to the life cycle layer. The life cycle layer determines the target state currently in the life cycle based on the user's operation, and sends the target state to the interactive rendering layer and the parsing adaptation layer. The interactive rendering layer determines the first process based on the target state and executes the first process, and / or the parsing adaptation layer determines the second process based on the target state and executes the second process. Thus, the life cycle layer can determine the target state currently in the life cycle taking into account the user's operation, and notify the interactive rendering layer and the parsing adaptation layer of the target state, so that the interactive rendering layer can determine and execute the first process taking into account the target state, and / or the parsing adaptation layer can determine and execute the second process taking into account the target state.
[0149] Figure 5 is a flowchart of a method for processing a binary file according to another exemplary embodiment. Figure 5As shown, the binary file processing method of the embodiment of the present disclosure includes the following steps.
[0150] S501: The interactive rendering layer detects the user's operation and sends the user's operation to the parsing adaptation layer and the life cycle layer.
[0151] S502: The life cycle layer determines the target state currently in the life cycle based on the user's operation.
[0152] S503: The lifecycle layer sends the target state to the interactive rendering layer and the parsing adaptation layer.
[0153] S504: The interactive rendering layer determines a first process based on the target state and executes the first process.
[0154] S505: The parsing adaptation layer determines a second process based on the target state and executes the second process.
[0155] The relevant contents of steps S501-S505 can be found in the above embodiment and will not be repeated here.
[0156] S506: The interactive rendering layer sends the execution result of the first process to the lifecycle layer.
[0157] S507: The parsing adaptation layer sends the execution result of the second process to the lifecycle layer.
[0158] S508, the lifecycle layer determines a target state based on the execution result of the target process, wherein the target process includes the first process and / or the second process.
[0159] It should be noted that after step S508, the process returns to step S503 and subsequent steps.
[0160] It should be noted that there are no excessive restrictions on the execution result of the first process. For example, it may include successful execution of the first process, failed execution of the first process, etc.
[0161] In the embodiments of the present disclosure, the lifecycle layer determines the target state based on the execution result of the target process, including the following possible implementations:
[0162] Method 1: The lifecycle layer identifies that the target process only includes the first process or the second process, and the target process is executed successfully, and the target state is updated.
[0163] In one implementation, the lifecycle layer identifies that the target process only includes the first process, and the first process is executed successfully, and the target state is updated.
[0164] In one implementation, the lifecycle layer identifies that the target process only includes the second process, and the second process is successfully executed, and updates the target state.
[0165] In one implementation, updating the target state includes taking the next candidate state of the target state in the life cycle as the target state.
[0166] Method 2: The lifecycle layer identifies that the target process only includes the first process or the second process, and the target process fails to execute, and the target state remains unchanged.
[0167] In one implementation, the lifecycle layer identifies that the target process only includes the first process, and the first process fails to execute, and the target state remains unchanged.
[0168] In one implementation, the lifecycle layer identifies that the target process only includes the second process, and the second process fails to execute, and the target state remains unchanged.
[0169] Mode 3: The lifecycle layer identifies that the target process includes the first process and the second process, and both the first process and the second process are successfully executed, and the target state is updated.
[0170] Mode 4: The lifecycle layer identifies that the target process includes a first process and a second process, and at least one of the first process and the second process fails to execute, and the target state remains unchanged.
[0171] In one implementation, the lifecycle layer identifies that the target process includes a first process and a second process, and the first process fails to execute, and the target state remains unchanged.
[0172] In one implementation, the lifecycle layer identifies that the target process includes a first process and a second process, and the second process fails to execute, and the target state remains unchanged.
[0173] In one implementation, the lifecycle layer identifies that the target process includes a first process and a second process, and both the first process and the second process fail to execute, and the target state remains unchanged.
[0174] The following is a specific example to introduce the binary file processing method of the embodiment of the present disclosure.
[0175] For example, the interactive rendering layer detects the user's upload operation or selection operation on the target binary file, and sends the above operation to the parsing adaptation layer and the life cycle layer. Based on the above operation, the life cycle layer determines that the target state is the initialization state, and sends the initialization state to the interactive rendering layer and the parsing adaptation layer. The parsing adaptation layer identifies that the target state is the initialization state, and the parsing adaptation layer determines that the second process A includes determining the parsing category of the target binary file. The parsing adaptation layer determines the parsing category of the target binary file. That is, the first process does not exist in the initialization state, and the second process A exists.
[0176] The parsing adaptation layer sends the successful execution of the second process A to the lifecycle layer, the lifecycle layer updates the target state to the parsing state, and sends the parsing state to the interactive rendering layer and the parsing adaptation layer, the parsing adaptation layer identifies the target state as the parsing state, the parsing adaptation layer determines that the second process B includes parsing the target binary file to obtain the original parsed data set, and the parsing adaptation layer parses the target binary file to obtain the original parsed data set. That is, the first process does not exist in the parsing state, and the second process B exists.
[0177] The parsing adaptation layer sends the successful execution of the second process B to the lifecycle layer. The interactive rendering layer detects the user's selection operation on signal 1 and sends the above operation to the parsing adaptation layer and the lifecycle layer. Based on the above operation and the successful execution of the second process B, the lifecycle layer updates the target state to the rendering state and sends the rendering state to the interactive rendering layer and the parsing adaptation layer.
[0178] The parsing adaptation layer identifies that the target state is a rendering state. The parsing adaptation layer determines that the second process C includes filtering out target parsing data from the original parsing data set based on the user's operation, and also includes sending the target parsing data to the interactive rendering layer. The parsing adaptation layer filters out the target parsing data from the original parsing data set based on the user's operation, and sends the target parsing data to the interactive rendering layer.
[0179] The interactive rendering layer identifies that the target state is a rendering state. The interactive rendering layer determines that the first process D includes rendering the display content corresponding to the target binary file based on the target parsing data. The interactive rendering layer renders the display content corresponding to the target binary file based on the target parsing data.
[0180] It can be understood that there are a first process D and a second process C in the parsing state.
[0181] The parsing adaptation layer sends the successful execution of the second process C to the lifecycle layer, and the interactive rendering layer sends the successful execution of the first process D to the lifecycle layer. The interactive rendering layer detects the user's upload operation or selection operation for the newly added binary file, and sends the above operation to the parsing adaptation layer and the lifecycle layer. Based on the above operation, the successful execution of the second process C and the successful execution of the first process D, the lifecycle layer updates the target state to the destroyed state, and sends the destroyed state to the interactive rendering layer and the parsing adaptation layer.
[0182] The parsing adaptation layer identifies the target state as the destroyed state, determines that the second process E includes deleting the parsed data of the target binary file from the local storage space, and deletes the parsed data of the target binary file from the local storage space. That is, the first process does not exist in the destroyed state, but the second process E exists.
[0183] The parsing and adaptation layer sends the successful execution of the second process E to the life cycle layer. The life cycle layer updates the target state to the initialization state based on the user's upload operation or selection operation for the newly added binary file and the successful execution of the second process E, and sends the initialization state to the interactive rendering layer and the parsing and adaptation layer. The subsequent steps can refer to the above embodiment and will not be repeated here.
[0184] In the binary file processing method provided by the embodiment of the present disclosure, the interactive rendering layer sends the execution result of the first process to the life cycle layer, the parsing adaptation layer sends the execution result of the second process to the life cycle layer, and the life cycle layer determines the target state based on the execution result of the target process, wherein the target process includes the first process and / or the second process, and the return execution sends the target state to the interactive rendering layer and the parsing adaptation layer and subsequent steps. Thus, the interactive rendering layer and the parsing adaptation layer can both feed back the execution results of their own processes to the life cycle layer, and the life cycle layer can determine the target state based on the execution results of the first process and / or the second process.
[0185] Based on any of the above embodiments, at least one of the interactive rendering layer, the parsing adaptation layer, and the life cycle layer is compiled based on WebAssembly. Thus, at least one of the interactive rendering layer, the parsing adaptation layer, and the life cycle layer can be compiled based on WebAssembly, and at least one layer can run in multiple scenarios such as browsers and IoT (Internet of Things) terminals, that is, cross-terminal operation is achieved, with portability, and runs at a speed close to that of native code, which helps to improve the processing speed of binary files, avoid browser crashes, and slow running problems, and is particularly suitable for browser application scenarios.
[0186] In one embodiment, the method further includes encapsulating at least one of the interactive rendering layer, the parsing adaptation layer, and the lifecycle layer into a container, thereby ensuring the consistency, portability, and repeatability of the application. For example, the interactive rendering layer, the parsing adaptation layer, and the lifecycle layer compiled based on WebAssembly can be encapsulated into a cloud container that supports WebAssembly.
[0187] In one implementation, the interactive rendering layer is deployed on the client, and the parsing adaptation layer and the life cycle layer are deployed on the server. Thus, a client+server deployment architecture can be adopted to implement the deployment of the interactive rendering layer, the parsing adaptation layer and the life cycle layer.
[0188] In one implementation, the interactive rendering layer, the parsing adaptation layer, and the lifecycle layer are all deployed on the client.
[0189] Figure 6is a block diagram of a binary file processing device according to an exemplary embodiment. Figure 6 The binary file processing device 100 of the embodiment of the present disclosure includes: a detection module 110, a parsing module 120, a screening module 130 and a rendering module 140.
[0190] The detection module 110 is configured to detect the user's operation through the interactive rendering layer and send the user's operation to the parsing adaptation layer;
[0191] The parsing module 120 is configured to parse the target binary file through the parsing adaptation layer to obtain an original parsed data set;
[0192] The screening module 130 is configured to screen target parsed data from the original parsed data set based on the user's operation through the parsing adaptation layer, and send the target parsed data to the interactive rendering layer;
[0193] The rendering module 140 is configured to execute rendering of display content corresponding to the target binary file based on the target parsed data through the interactive rendering layer.
[0194] In one embodiment of the present disclosure, the screening module 130 is further configured to execute: determining target screening parameters of the target parsed data based on the user's operation through the parsing adaptation layer, wherein the target screening parameters include at least one of the data category, collection time and value range of the target parsed data; and filtering out the target parsed data from the original parsed data set based on the target screening parameters through the parsing adaptation layer.
[0195] In one embodiment of the present disclosure, before filtering out the target parsing data from the original parsing data set based on the target screening parameters through the parsing adaptation layer, the screening module 130 is also configured to execute: obtaining historical screening parameters of historical parsing data through the parsing adaptation layer; identifying through the parsing adaptation layer that the target screening parameters are different from each of the historical screening parameters.
[0196] In one embodiment of the present disclosure, the screening module 130 is further configured to execute: identifying through the parsing adaptation layer that the target screening parameter is the same as the historical screening parameter; and using through the parsing adaptation layer the historical parsing data corresponding to the historical screening parameter as the target parsing data.
[0197] In one embodiment of the present disclosure, the screening module 130 is further configured to execute:
[0198] Based on the user's selection operation on the target category, the target category is used as the data category of the target parsed data by the parsing adaptation layer;
[0199] Determining, by the analysis adaptation layer, based on the user's zooming operation on the displayed content, a data category of the analyzed data to be displayed in the zoomed displayed content as the data category of the target analyzed data, and / or determining a collection time of the analyzed data to be displayed in the zoomed displayed content as the collection time of the target analyzed data;
[0200] Based on the user's moving operation on the displayed content, the analysis adaptation layer determines the data category of the analysis data to be displayed in the displayed content after the movement as the data category of the target analysis data, and / or determines the collection time of the analysis data to be displayed in the displayed content after the movement as the collection time of the target analysis data.
[0201] In one embodiment of the present disclosure, the device 100 further includes a processing module, which is configured to execute: sending the user's operation to the life cycle layer through the interactive rendering layer; determining a target state currently in the life cycle based on the user's operation through the life cycle layer, and sending the target state to the interactive rendering layer and the parsing adaptation layer; determining a first process based on the target state through the interactive rendering layer, and executing the first process; and / or determining a second process based on the target state through the parsing adaptation layer, and executing the second process.
[0202] In one embodiment of the present disclosure, the processing module is further configured to execute: sending the execution result of the first process to the lifecycle layer through the interactive rendering layer; sending the execution result of the second process to the lifecycle layer through the parsing adaptation layer; determining the target state based on the execution result of the target process through the lifecycle layer, wherein the target process includes the first process and / or the second process; and returning to execute the step of sending the target state to the interactive rendering layer and the parsing adaptation layer and subsequent steps.
[0203] In one embodiment of the present disclosure, the processing module is further configured to perform: identifying through the lifecycle layer that the target process only includes the first process or the second process, and the target process is executed successfully, updating the target state; identifying through the lifecycle layer that the target process only includes the first process or the second process, and the target process fails to execute, keeping the target state unchanged; identifying through the lifecycle layer that the target process includes the first process and the second process, and both the first process and the second process are executed successfully, updating the target state; identifying through the lifecycle layer that the target process includes the first process and the second process, and at least one of the first process and the second process fails to execute, keeping the target state unchanged.
[0204] In one embodiment of the present disclosure, the rendering module 140 is further configured to execute: calling an open graphics library OpenGL through the interactive rendering layer, and rendering the display content based on the target parsed data through the OpenGL.
[0205] In one embodiment of the present disclosure, the rendering module 140 is further configured to execute: obtaining, through the interactive rendering layer, that the canvas width occupied by the display content is X unit length; determining, through the interactive rendering layer, that the target number of data to be rendered is less than or equal to X; downsampling, through the interactive rendering layer, the target parsed data to obtain the target number of data to be rendered; and rendering, through the interactive rendering layer, the display content based on the target number of data to be rendered, wherein the canvas width occupied by each of the data to be rendered is greater than or equal to 1 unit length.
[0206] In one embodiment of the present disclosure, at least one of the interactive rendering layer, the parsing adaptation layer, and the lifecycle layer is compiled based on WebAssembly.
[0207] In one embodiment of the present disclosure, the target binary file carries control area network (CAN) data.
[0208] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0209] In the binary file processing device provided by the embodiment of the present disclosure, the interactive rendering layer detects the user's operation and sends the user's operation to the parsing adaptation layer. The parsing adaptation layer parses the target binary file to obtain the original parsing data set. The parsing adaptation layer filters out the target parsing data from the original parsing data set based on the user's operation and sends the target parsing data to the interactive rendering layer. The interactive rendering layer renders the display content corresponding to the target binary file based on the target parsing data. Therefore, compared with the parsing adaptation layer sending all the parsing data to the interactive rendering layer in the related art, the parsing adaptation layer in this solution can take into account the user's operation, filter out the target parsing data from the original parsing data set, and send the target parsing data to the interactive rendering layer, that is, only the filtered part of the parsing data needs to be sent to the interactive rendering layer so that the interactive rendering layer can render the display content, which reduces the transmission data volume and transmission time of the parsing data and improves the processing efficiency of the binary file.
[0210] Figure 7 2 is a block diagram of a vehicle according to an exemplary embodiment. For example, vehicle 200 may be a hybrid vehicle, a non-hybrid vehicle, an electric vehicle, a fuel cell vehicle, or other types of vehicles. Vehicle 200 may be an autonomous vehicle, a semi-autonomous vehicle, or a non-autonomous vehicle.
[0211] Reference Figure 7 , the vehicle 200 may include various subsystems, such as an infotainment system 210, a perception system 220, a decision control system 230, a drive system 240, and a computing platform 250. The vehicle 200 may also include more or fewer subsystems, and each subsystem may include multiple components. In addition, each subsystem and each component of the vehicle 200 may be interconnected by wire or wireless means.
[0212] In some embodiments, the infotainment system 210 may include a communication system, an entertainment system, and a navigation system, among others.
[0213] The perception system 220 may include several sensors for sensing information about the environment around the vehicle 200. For example, the perception system 220 may include a global positioning system (the global positioning system may be a GPS system, or a Beidou system or other positioning systems), an inertial measurement unit (IMU), a laser radar, a millimeter wave radar, an ultrasonic radar, and a camera.
[0214] The decision control system 230 may include a computing system, a vehicle controller, a steering system, a throttle, and a braking system.
[0215] The drive system 240 may include components that provide power movement for the vehicle 200. In one embodiment, the drive system 240 may include an engine, an energy source, a transmission system, and wheels. The engine may be one or a combination of an internal combustion engine, an electric motor, and an air compression engine. The engine can convert energy provided by the energy source into mechanical energy.
[0216] Some or all functions of the vehicle 200 are controlled by a computing platform 250. The computing platform 250 may include at least one processor 251 and a memory 252, and the processor 251 may execute instructions 253 stored in the memory 252.
[0217] The processor 251 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.
[0218] The memory 252 may be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0219] In addition to instructions 253 , memory 252 may also store data, such as road maps, route information, and data such as the location, direction, and speed of the vehicle. The data stored in memory 252 may be used by computing platform 250 .
[0220] In the embodiment of the present disclosure, the processor 251 may execute the instruction 253 to implement all or part of the steps of the binary file processing method provided by the present disclosure.
[0221] In the vehicle of the disclosed embodiment, the interactive rendering layer detects the user's operation and sends the user's operation to the parsing adaptation layer. The parsing adaptation layer parses the target binary file to obtain the original parsing data set. The parsing adaptation layer filters out the target parsing data from the original parsing data set based on the user's operation and sends the target parsing data to the interactive rendering layer. The interactive rendering layer renders the display content corresponding to the target binary file based on the target parsing data. Therefore, compared with the related art in which the parsing adaptation layer sends all the parsing data to the interactive rendering layer, the parsing adaptation layer in this solution can take into account the user's operation, filter out the target parsing data from the original parsing data set, and send the target parsing data to the interactive rendering layer, that is, only the filtered part of the parsing data needs to be sent to the interactive rendering layer so that the interactive rendering layer can render the display content, which reduces the transmission data volume and transmission time of the parsing data and improves the processing efficiency of binary files.
[0222] In order to implement the above embodiments, the present disclosure further proposes a server, comprising a processor; a memory for storing processor executable instructions; wherein the processor is configured to implement the steps of the binary file processing method provided by the present disclosure.
[0223] In order to implement the above embodiments, the present disclosure further proposes a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the binary file processing method provided by the present disclosure are implemented.
[0224] Alternatively, the computer readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, or the like.
[0225] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0226] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for processing a binary file, characterized in that: include: The interactive rendering layer detects the user's operation and sends the user's operation to the parsing adaptation layer, wherein the interactive rendering layer and the parsing adaptation layer belong to the same application; The parsing adaptation layer parses the target binary file to obtain an original parsed data set; The parsing adaptation layer filters out target parsing data from the original parsing data set based on the user's operation, and sends the target parsing data to the interactive rendering layer; The interactive rendering layer renders display content corresponding to the target binary file based on the target parsed data; The parsing adaptation layer filters out target parsing data from the original parsing data set based on the user's operation, including: The analysis adaptation layer determines a target screening parameter of the target analysis data based on the user's operation, wherein the target screening parameter includes at least one of a data category, a collection time, and a value range of the target analysis data; The parsing adaptation layer filters out the target parsing data from the original parsing data set based on the target screening parameter; The analysis adaptation layer determines the target screening parameters of the target analysis data based on the user's operation, including: The parsing adaptation layer uses the target category as the data category of the target parsing data based on the user's selection operation on the target category; The parsing adaptation layer determines, based on the user's zooming operation on the displayed content, a data category of the parsed data to be displayed in the zoomed displayed content as the data category of the target parsed data, and / or determines a collection time of the parsed data to be displayed in the zoomed displayed content as the collection time of the target parsed data; The analysis adaptation layer determines, based on the user's movement operation on the displayed content, a data category of the analysis data to be displayed in the displayed content after the movement, as the data category of the target analysis data, and / or determines a collection time of the analysis data to be displayed in the displayed content after the movement, as the collection time of the target analysis data.
2. The method according to claim 1, characterized in that Before the parsing adaptation layer filters out the target parsing data from the original parsing data set based on the target screening parameter, the parsing adaptation layer further includes: The parsing adaptation layer obtains historical screening parameters of historical parsing data; The parsing adaptation layer identifies that the target screening parameter is different from each of the historical screening parameters.
3. The method according to claim 2, characterized in that The method further comprises: The parsing adaptation layer identifies that the target screening parameter is the same as the historical screening parameter; The analysis adaptation layer uses the historical analysis data corresponding to the historical screening parameters as the target analysis data.
4. The method according to claim 1, characterized in that: The method further comprises: The interactive rendering layer sends the user's operation to the life cycle layer; The life cycle layer determines a target state currently in the life cycle based on the user's operation, and sends the target state to the interactive rendering layer and the parsing adaptation layer; The interactive rendering layer determines a first process based on the target state and executes the first process; and / or, The parsing adaptation layer determines a second process based on the target state and executes the second process.
5. The method according to claim 4, characterized in that The method further comprises: The interactive rendering layer sends the execution result of the first process to the lifecycle layer; The parsing and adaptation layer sends the execution result of the second process to the lifecycle layer; The lifecycle layer determines the target state based on the execution result of the target process, wherein the target process includes the first process and / or the second process; Return to execute the step of sending the target state to the interactive rendering layer and the parsing adaptation layer and subsequent steps.
6. The method according to claim 5, characterized in that The lifecycle layer determines the target state based on the execution result of the target process, including: The lifecycle layer identifies that the target process only includes the first process or the second process, and the target process is successfully executed, and updates the target state; The lifecycle layer identifies that the target process only includes the first process or the second process, and the target process fails to execute, and keeps the target state unchanged; The lifecycle layer identifies that the target process includes the first process and the second process, and both the first process and the second process are successfully executed, and updates the target state; The lifecycle layer identifies that the target process includes the first process and the second process, and at least one of the first process and the second process fails to execute, and the target state remains unchanged.
7. The method according to claim 1, characterized in that The interactive rendering layer renders display content corresponding to the target binary file based on the target parsed data, including: The interactive rendering layer calls the open graphics library OpenGL, and renders the display content based on the target parsed data through the OpenGL.
8. The method according to claim 1, characterized in that The interactive rendering layer renders display content corresponding to the target binary file based on the target parsed data, including: The interactive rendering layer obtains a canvas width occupied by the display content as X unit lengths; The interactive rendering layer determines that the target number of data to be rendered is less than or equal to X; The interactive rendering layer downsamples the target parsed data to obtain the target number of data to be rendered; The interactive rendering layer renders the display content based on the target number of data to be rendered, wherein a canvas width occupied by each data to be rendered is greater than or equal to 1 unit length.
9. The method according to any one of claims 4 to 8, characterized in that: At least one of the interactive rendering layer, the parsing adaptation layer, and the lifecycle layer is compiled based on WebAssembly.
10. The method according to any one of claims 1 to 8, characterized in that The target binary file carries control area network (CAN) data.
11. A binary file processing device, characterized in that: include: A detection module is configured to detect a user operation through the interactive rendering layer and send the user operation to the parsing adaptation layer, wherein the interactive rendering layer and the parsing adaptation layer belong to the same application; A parsing module, configured to parse the target binary file through the parsing adaptation layer to obtain an original parsed data set; a screening module configured to screen target parsed data from the original parsed data set based on the user's operation through the parsing adaptation layer, and send the target parsed data to the interactive rendering layer; A rendering module, configured to execute rendering of display content corresponding to the target binary file based on the target parsed data through the interactive rendering layer; The parsing adaptation layer filters out target parsing data from the original parsing data set based on the user's operation, including: The analysis adaptation layer determines a target screening parameter of the target analysis data based on the user's operation, wherein the target screening parameter includes at least one of a data category, a collection time, and a value range of the target analysis data; The parsing adaptation layer filters out the target parsing data from the original parsing data set based on the target screening parameter; The analysis adaptation layer determines the target screening parameters of the target analysis data based on the user's operation, including: The parsing adaptation layer uses the target category as the data category of the target parsing data based on the user's selection operation on the target category; The parsing adaptation layer determines, based on the user's zooming operation on the displayed content, a data category of the parsed data to be displayed in the zoomed displayed content as the data category of the target parsed data, and / or determines a collection time of the parsed data to be displayed in the zoomed displayed content as the collection time of the target parsed data; The analysis adaptation layer determines, based on the user's movement operation on the displayed content, a data category of the analysis data to be displayed in the displayed content after the movement, as the data category of the target analysis data, and / or determines a collection time of the analysis data to be displayed in the displayed content after the movement, as the collection time of the target analysis data.
12. A vehicle, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Implement the steps of the method according to any one of claims 1 to 10.
13. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Interface display method and device
CN117891546A