A method and apparatus for data processing
By using image data consisting of description files and code, the problems of high manpower and material costs and information lag in real-time information updates are solved, thus enabling real-time updates of image data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING SANKUAI ONLINE TECH CO LTD
- Filing Date
- 2021-05-18
- Publication Date
- 2026-06-02
AI Technical Summary
In scenarios where information is updated in real time, existing technologies suffer from high costs in terms of manpower and resources, as well as information lag when creating new images to display the latest information.
The method uses image data consisting of a description file and image code. It obtains the target description file and code by parsing the image data, requests an update to the description file from the server, determines the final image data based on the updated description file and the target description file, and generates and displays the final image.
There is no need to manually recreate images, saving manpower and resources, enabling real-time updates of image data, and reducing the lag in information display.
Smart Images

Figure CN113342336B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a data processing method and apparatus. Background Technology
[0002] Currently, in scenarios where information can be updated in real time, information can usually be displayed to users in the form of images. For example, in a sales performance display scenario, images containing information such as current sales figures can be shown to users.
[0003] As time goes on, the information displayed in the image is constantly updated. Since common images are composed of pixels, it is impossible to make real-time changes to the image based on the information of each pixel. Therefore, in order to show users real-time information, it is necessary to continuously create and replace the images with the latest information.
[0004] Recreating images with the latest information would incur significant human and material costs, and the information presented to users in this way would also be somewhat outdated. Summary of the Invention
[0005] This specification provides a data processing method and apparatus to partially solve the aforementioned problems existing in the prior art.
[0006] The embodiments in this specification adopt the following technical solutions:
[0007] This specification provides a data processing method where image data consists of a description file and image code. The description file describes the content of the image corresponding to the image data. The method includes:
[0008] Acquire image data of the target image;
[0009] The image data is parsed to obtain the target description file and target image code that make up the image data.
[0010] Based on the target image code, a request to obtain an updated description file is sent to the server;
[0011] Receive the updated description file, and determine the final image data based on at least one of the updated description file, the target description file, and the target image code;
[0012] Based on the final image data, a final image is generated and displayed.
[0013] Optionally, acquiring the image data of the target image includes:
[0014] Pre-processed image data is determined from the local machine or the server and used as the image data for the target image.
[0015] Optionally, sending a request to the server to obtain an updated description file based on the target image code includes:
[0016] The target image code is compiled into executable code using a pre-stored compiler.
[0017] By executing the executable code, a communication connection is established with the server, and a request to obtain an updated description file is sent to the server.
[0018] Optionally, sending a request to the server to obtain an updated description file based on the target image code includes:
[0019] Record the current moment, and send a request to the server to obtain an updated description file at preset time intervals by executing the target image code;
[0020] The step of receiving the updated description file and determining the final image data based on at least one of the updated description file, the target description file, and the target image code includes:
[0021] For each request to obtain an updated description file, the server receives the updated description file returned by the server for this request, obtains the target description file in the final image data corresponding to the previous request, and determines the final image data corresponding to this request based on the received updated description file, at least one of the obtained target description files, and the target image code.
[0022] Optionally, determining the final image data based on at least one of the updated description file, the target description file, and the target image code includes:
[0023] Based on the updated description file and the target description file, the final description file is determined;
[0024] The final image data is determined based on the final description file and the target image code.
[0025] Optionally, determining the final description file based on the updated description file and the target description file includes:
[0026] For each target description file, determine its type based on its attributes;
[0027] Based on the type of each target description file, select the target description file from among the target description files;
[0028] The final description file is determined based on the selected target description file and the updated description file.
[0029] Optionally, determining the final description file based on the updated description file and the target description file specifically includes:
[0030] Determine the differences between the updated description file and the target description file;
[0031] Based on a preset difference threshold, the final description file is determined from the updated description file and the target description file.
[0032] This specification provides a data processing apparatus. Image data consists of a description file and image code. The description file describes the content of the image corresponding to the image data. The apparatus includes:
[0033] The acquisition module is used to acquire image data of the target image;
[0034] The parsing module is used to parse the image data to obtain the target description file and target image code that make up the image data;
[0035] The sending module is used to send a request to the server to obtain an updated description file based on the target image code;
[0036] A receiving module is configured to receive the updated description file and determine the final image data based on at least one of the updated description file, the target description file, and the target image code;
[0037] The display module is used to generate and display the final image based on the final image data.
[0038] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described data processing method.
[0039] This specification provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described data processing method.
[0040] The above-described at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects:
[0041] In this specification, image data may consist of a description file and an image code. The description file is used to describe the content of the image corresponding to the image data. First, the image data of the target image can be obtained. Then, the image data is parsed to obtain the target description file and the target image code that make up the image data. After that, according to the target image code, a request to obtain an updated description file is sent to the server. Subsequently, the updated description file is received, and the final image data can be determined according to at least one of the updated description file, the target description file, and the target image code. Finally, the final image can be generated and displayed according to the final image data.
[0042] The data processing method provided in this manual can obtain an updated description file from the server and determine the final image data based on the updated description file and the target description file, thereby generating the final image without having to manually recreate a new image. This not only saves a lot of manpower and resources, but also enables real-time updating of image data. Attached Figure Description
[0043] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:
[0044] Figure 1 This is a flowchart of a data processing method provided in an embodiment of this specification;
[0045] Figure 2 A flowchart illustrating a data processing method provided in an embodiment of this specification;
[0046] Figure 3 This is a schematic diagram comparing a target image and a final image, provided as an embodiment of this specification.
[0047] Figure 4 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of this specification;
[0048] Figure 5 This is a schematic diagram of an electronic device used to implement the above-described data processing method, as provided in the embodiments of this specification. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0050] Currently, in most scenarios, information can be continuously updated over time. For example, in sales performance display scenarios, information such as sales figures can change constantly. In these scenarios, to present information to users, multimedia files such as pictures, images, and photos containing the information to be displayed can be created, allowing users to understand the information through multimedia files.
[0051] Typically, multimedia files such as pictures, images, and photos are composed of pixels. When displayed on a terminal, different pixel values can display different colors. By setting the values of the pixels, text, lines, and other content can be represented.
[0052] When the content to be displayed in a multimedia file changes—for example, sales figures change—a new multimedia file needs to be created to replace it in order to show users the latest information. Obviously, this method not only incurs human and material costs, but also may result in errors in the newly created multimedia file. Furthermore, this method cannot effectively update information in real time, leading to a certain lag in the information presented to users.
[0053] In practice, the aforementioned problems arise in any scenario where information is updated in real time, especially when displaying updated information using multimedia files such as pictures, photos, and images. Therefore, this specification provides a data processing method to partially solve the problems described above.
[0054] The images provided in this specification differ from existing methods that use pixels for description. They are described using structured data, serving as a data structure in themselves, such as vector graphics. Images can be obtained from description files and image code; that is, image data can consist of description files and image code. The description file describes the content of the image corresponding to the image data. Executing the image code and loading the description file yields the corresponding image. Furthermore, by executing the image code, a request to the server for an updated description file can be sent. This allows for receiving the updated description file from the server, enabling image processing based on the updated description file, such as updating the image content. Compared to existing methods, this specification eliminates the need for manual intervention in image updates, reducing the waste of manpower and resources, minimizing errors during the update process, and achieving real-time information updates.
[0055] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0056] Figure 1A flowchart of a data processing method provided in this specification embodiment may specifically include the following steps:
[0057] S100: Acquire image data of the target image.
[0058] In this specification, image data containing image code and description files can be pre-created and stored. The image data can be stored on a terminal, a server, or a third-party platform with storage capabilities. The terminal is an electronic device with image display capabilities, including mobile phones and computers. The terminal may also have a client or browser installed for loading and displaying the image.
[0059] Therefore, when acquiring image data of a target image, it can be obtained from a terminal, server, or third-party platform that stores the image data of the target image.
[0060] It should be noted that terminals, servers, and third-party platforms can all contain storage modules. These storage modules include a storage area and an execution host environment. The target image data is stored in the storage area, and the image code can be executed through the execution host environment. Therefore, the target image data can be pre-processed before being retrieved from the storage module.
[0061] Specifically, the entity that preprocesses the image data of the target image can be one of the following: the terminal where the storage module resides, the server, or a third-party platform. Taking the terminal as the entity, the terminal can parse the image data of the target image to obtain image code and a description file. The terminal then transmits the image code to the execution host environment. Based on the execution host environment, the terminal executes the image code, thereby requesting an update to the description file from the server. The terminal can receive the updated description file sent by the server and process the image data of the target image based on the updated description file and the parsed description file. For a detailed explanation of the specific implementation method of the terminal preprocessing the image data of the target image, please refer to the following content.
[0062] Of course, this manual also supports directly acquiring the image data of the target image without preprocessing it. The difference lies in the fact that if the image data of the target image is not preprocessed, the information in the acquired target image is the original information (i.e., the information at the time the image data of the target image was created). When the target image is processed to obtain the final image, the information displayed in the image can directly jump from the information at the time the target image was created to the real-time information at the current moment. However, if the image data of the target image is preprocessed, the information displayed in the target image when acquiring the image data is the real-time information at the moment the target image data was acquired.
[0063] S102: Parse the image data to obtain the target description file and target image code that make up the image data.
[0064] After obtaining the image data of the target image, the terminal can parse the image data to obtain the target description file and the target image code.
[0065] The target description file can be used to describe the content of the target image. For example, the target description file can determine the length, width, color and other information of the lines in the target image. By combining different lines, information such as patterns and text can be obtained, that is, the information displayed to the user.
[0066] The target image code, also known as source code, can be pre-written by developers using languages such as C and assembly, based on relevant coding standards. After the target image code is compiled by a compiler, a machine-readable language is obtained. The compiler can then provide an execution host environment, which can be embedded in applications such as browsers and client applications.
[0067] In this specification, the terminal may also include a display module. Both the display module and the storage module can read and parse image data to obtain a target description file and target image code. Furthermore, both can include an execution host environment to execute the target image code, thereby obtaining an updated description file stored on the server and processing the image data based on the updated description file. Compared to the storage module, the display module can also display the target image or the final image.
[0068] S104: Based on the target image code, send a request to the server to obtain an updated description file.
[0069] After parsing the image data of the target image to obtain the target image code, the target image code can be executed based on the execution host environment, thereby sending a request to the server to obtain an updated description file.
[0070] Specifically, the target image code can be compiled into executable code using a pre-stored compiler. By executing the executable code, a communication connection can be established with the server, and a request to obtain an updated description file can be sent to the server.
[0071] The compiler can be stored in the terminal or server, for example, it can be built into a browser or client. The compiler provides an execution host environment, which can compile the target image code into machine-readable language, i.e., executable code. The terminal can establish a communication connection with the server by executing the executable code. Once the connection is successful, it can send a request to the server to obtain an updated description file. Alternatively, the terminal can also maintain communication with the server via a wired connection, such as using a network cable, and directly send a request to the server to obtain an updated description file after executing the executable code.
[0072] Furthermore, since the information displayed in the images can change in real time, in order to update the information in real time, the target image code can send a request to the server to obtain an updated description file at preset time intervals. This allows for timely acquisition of the updated description file and processing of the target image based on it. The preset time interval can be determined according to actual needs; the shorter the time interval, the less lag in the information displayed to the user, and the longer the time interval, the greater the lag in the information displayed to the user.
[0073] Specifically, when sending a request to the server to obtain the updated description file at the current moment, the current moment can be recorded and timed. When the timeout period is reached, the request to obtain the updated description file can be sent to the server again. That is, the time interval can be preset to t. After sending a request to the server to obtain the updated description file at time T, the request can be sent again at times T+t, ..., T+nt.
[0074] S106: Receive the updated description file, and determine the final image data based on at least one of the updated description file, the target description file, and the target image code.
[0075] After sending a request to the server to retrieve the update description file, you can receive the update description file returned by the server in response to the request. In fact, each time a request to retrieve the update description file is sent to the server, an update description file will be returned by the server. The update description file returned by the server is the description file corresponding to the latest information during the real-time information update process.
[0076] After obtaining the updated description file, the final description file can be determined first based on the updated description file and the target description file. Then, the final image data can be determined based on the final description file and the target image code.
[0077] Since the executable code can send multiple requests to the server to obtain the updated description file after execution, for each request to obtain the updated description file, the server can receive the updated description file returned by the server according to the request, and obtain the target description file in the final image data corresponding to the previous request. Based on the received updated description file, at least one of the obtained target description files, and the target image code, the final image data corresponding to the current request can be determined.
[0078] In this specification, because a request to obtain an updated description file can be sent to the server at each preset time interval, and the updated description file can be received at each preset time interval, the final image data can be determined at each preset time interval. Therefore, the final image is generated based on the continuously updated final image data, achieving the effect of real-time updating of information in the image.
[0079] For ease of description, the following explanation focuses on the process of determining the final image data corresponding to a single request for obtaining an updated description file.
[0080] First, determine the final description file.
[0081] In a preferred embodiment, the description files can be divided into two categories: replaceable description files and non-replaceable description files. Generally, replaceable description files describe information that can change in real time, while non-replaceable description files describe information that does not change. For example, in a sales performance display scenario, replaceable description files may describe real-time changing sales figures, while non-replaceable description files may describe background patterns of images, company logos, or other information.
[0082] Therefore, in this specification, after obtaining the updated description file, the target description file can be filtered based on the type of target description file, and the final description file can be determined based on the filtering results and the updated description file.
[0083] Specifically, for each target description file, the type of the target description file is determined based on its attributes. Based on the type of each target description file, a target description file is selected from among the target description files. Based on the selected target description file and the updated description file, the final description file is determined.
[0084] Furthermore, if the attribute of the target description file is replaceable, then the type of the target description file is replaceable, that is, the target description file is a replaceable description file. If the attribute of the target description file is non-replaceable, then the type of the target description file is non-replaceable, that is, the target description file is a non-replaceable description file. Considering the actual situation, when the information displayed in the image changes, generally only the changed information can be changed, while other unchanged information can be retained. Therefore, according to the type of each target description file, a non-replaceable description file can be selected from each target description file, and the non-replaceable description file and the updated description file can be used as the final description file.
[0085] Of course, in some special scenarios, there are cases where an update description file is directly added to the existing target description file. In such cases, there is no need to select from the target description files; all target description files and the update description file can be used as the final description file. Furthermore, this specification also supports selecting alternative description files based on the type of each target description file, and using these alternative description files and the update description file as the final description file.
[0086] In another preferred embodiment, the differences between the updated description file and the target description file can be determined, and the final description file can be determined from the updated description file and the target description file according to a preset difference threshold.
[0087] Specifically, the differences between the updated description file and the target description file in several preset dimensions can be determined. Based on the differences in each dimension, the difference value between the updated description file and the target description file can be determined. When the difference value is greater than the difference threshold, since the updated description file can describe the information updated in real time, it can be directly used as the final description file. When the difference value is not greater than the difference threshold, it means that the information has not been updated, or the updated information is only slightly different from the information before the update. Therefore, it is not necessary to display the updated information in real time. Thus, the target description file can be directly used as the final description file. That is, there is no need to update the target image, or the final image is the target image.
[0088] Of course, in this specification, the updated description file can also be directly compared with the target description file. If the comparison result is consistent, the target description file can be used as the final description file, that is, there is no need to process the target image. If the comparison result is inconsistent, the updated description file can be used as the final description file.
[0089] After the final description file is determined, the final image data can be composed of the final description file and the target image code.
[0090] S108: Generate and display the final image based on the final image data.
[0091] After generating the final image data, the target image code can be executed and the final description file can be loaded to generate the final image. The final image can then be displayed in real time through the display system.
[0092] Figure 2 This is a flowchart illustrating a data processing method provided in an embodiment of this specification. Figure 2 In this system, the storage system can reside on a terminal, server, or third-party platform, while the display system can reside on the terminal. Before retrieving image data of the target image from the storage system, the storage system can parse the image data to obtain image code and a description file. A compiler built into the storage system can compile the image code to obtain executable code. Executing the executable code retrieves an updated description file. Based on the updated description file and the parsed description file, the description file in the image data is updated, thus obtaining the target image data. After obtaining the target image data through the terminal's display system, the image data can also be parsed to obtain a target description file and target image code. A compiler built into the display system can compile the target image code to obtain executable code, which is then executed to obtain an updated description file. Based on the updated description file, the target description file, and the target image code, the final image data can be determined, and the final image is generated and displayed to the user.
[0093] Figure 3 This is a schematic diagram comparing a target image and a final image, provided as an embodiment of this specification. Figure 3 In this context, target image data can consist of target image code, target description file 1, and target description file 2. Target description file 1 is a description file of a replaceable type, and target description file 2 is a description file of a non-replaceable type. The target image generated from the target image data can be as follows: Figure 2 The target image is shown in the image. Target description file 1 describes the content as "XXXXXX". An updated description file is obtained by executing the target image code. The updated description file describes the content as "YYYYYY". It is determined that the difference between the updated description file and target description file 1 is greater than a preset difference threshold. Therefore, target description file 1 is replaced with the updated description file, resulting in final image data composed of the updated description file, target description file 2, and target image code. The final image generated from the final image data can be shown as follows: Figure 2 The final image is shown in the image.
[0094] Based on the data processing method described above, this specification also provides a schematic diagram of a data processing apparatus, as shown in the embodiments below. Figure 4 As shown.
[0095] Figure 4 This is a schematic diagram of a data processing apparatus provided in an embodiment of this specification. The image data consists of a description file and image code. The description file describes the content of the image corresponding to the image data. The apparatus includes:
[0096] The acquisition module 400 is used to acquire image data of the target image;
[0097] The parsing module 402 is used to parse the image data to obtain the target description file and target image code that make up the image data;
[0098] The sending module 404 is used to send a request to the server to obtain an updated description file according to the target image code;
[0099] The receiving module 406 is configured to receive the updated description file and determine the final image data based on at least one of the updated description file, the target description file, and the target image code;
[0100] The display module 408 is used to generate and display the final image based on the final image data.
[0101] Since the updated description file can be obtained from the server, and the final image data can be determined based on the updated description file and the target description file, thereby generating the final image, this manual does not require the manual re-creation of new images, which not only saves a lot of manpower and resources, but also achieves the effect of real-time updating of image data.
[0102] Optionally, the acquisition module 400 is specifically used to determine pre-processed image data from the local machine or the server as the image data of the target image.
[0103] Optionally, the sending module 404 is specifically used to compile the target image code into executable code using a pre-stored compiler; to establish a communication connection with the server by executing the executable code; and to send a request to the server to obtain an updated description file.
[0104] Optionally, the sending module 404 is specifically used to record the current time and send a request to obtain an updated description file to the server at preset time intervals by executing the target image code;
[0105] The receiving module 406 is specifically used to, for each sent request to obtain an updated description file, receive the updated description file returned by the server according to the request, obtain the target description file in the final image data corresponding to the previous request, and determine the final image data corresponding to the current request based on the received updated description file, at least one of the obtained target description files, and the target image code.
[0106] Optionally, the receiving module 406 is specifically configured to: determine a final description file based on the updated description file and the target description file; and determine the final image data based on the final description file and the target image code.
[0107] Optionally, the receiving module 406 is specifically configured to: determine the type of each target description file based on its attributes; select a target description file from among the target description files based on its type; and determine the final description file based on the selected target description file and the updated description file.
[0108] Optionally, the receiving module 406 is specifically configured to: determine the difference between the updated description file and the target description file; and determine the final description file in the updated description file and the target description file according to a preset difference threshold.
[0109] This specification also provides a computer-readable storage medium storing a computer program that can be used to perform the data processing method described above.
[0110] Based on the data processing method described above, the embodiments of this specification also propose... Figure 5 The diagram shows a schematic structural representation of the electronic device. Figure 5 At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to implement the data processing method described above.
[0111] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0112] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0113] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0114] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0115] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.
[0116] Those skilled in the art will understand that embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0117] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0118] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0119] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0120] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0121] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0122] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0123] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0124] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0125] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0126] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0127] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.
Claims
1. A data processing method, characterized in that, Image data consists of a description file and image code. The description file describes the content of the image corresponding to the image data. The method includes: Acquire image data of the target image; The image data is parsed to obtain the target description file and target image code that make up the image data. Based on the target image code, a request to obtain an updated description file is sent to the server; Receive the updated description file, and determine the final image data based on at least one of the updated description file, the target description file, and the target image code; Based on the final image data, a final image is generated and displayed. When the content of the image described by the updated description file is different from the content of the image described by the target description file, the final image displayed by the updated description file is different from the image displayed by the target description file in terms of content.
2. The method as described in claim 1, characterized in that, The acquisition of image data for the target image includes: Pre-processed image data is determined from the local machine or the server and used as the image data for the target image.
3. The method as described in claim 1, characterized in that, The step of sending a request to the server to obtain an updated description file based on the target image code includes: The target image code is compiled into executable code using a pre-stored compiler. By executing the executable code, a communication connection is established with the server, and a request to obtain an updated description file is sent to the server.
4. The method as described in claim 1, characterized in that, The step of sending a request to the server to obtain an updated description file based on the target image code includes: Record the current moment, and send a request to the server to obtain an updated description file at preset time intervals by executing the target image code; The step of receiving the updated description file and determining the final image data based on at least one of the updated description file, the target description file, and the target image code includes: For each request to obtain an updated description file, the server receives the updated description file returned by the server for this request, obtains the target description file in the final image data corresponding to the previous request, and determines the final image data corresponding to this request based on the received updated description file, at least one of the obtained target description files, and the target image code.
5. The method as described in claim 1, characterized in that, Determining the final image data based on at least one of the updated description file, the target description file, and the target image code includes: Based on the updated description file and the target description file, the final description file is determined; The final image data is determined based on the final description file and the target image code.
6. The method as described in claim 5, characterized in that, The step of determining the final description file based on the updated description file and the target description file includes: For each target description file, determine its type based on its attributes; Based on the type of each target description file, select the target description file from among the target description files; The final description file is determined based on the selected target description file and the updated description file.
7. The method as described in claim 5, characterized in that, The step of determining the final description file based on the updated description file and the target description file specifically includes: Determine the differences between the updated description file and the target description file; Based on a preset difference threshold, the final description file is determined from the updated description file and the target description file.
8. A data processing apparatus, characterized in that, Image data consists of a description file and image code. The description file describes the content of the image corresponding to the image data. The device includes: The acquisition module is used to acquire image data of the target image; The parsing module is used to parse the image data to obtain the target description file and target image code that make up the image data; The sending module is used to send a request to the server to obtain an updated description file based on the target image code; A receiving module is configured to receive the updated description file and determine the final image data based on at least one of the updated description file, the target description file, and the target image code; The display module is used to generate and display a final image based on the final image data. When the content of the image described by the updated description file is different from the content of the image described by the target description file, the final image displayed by the updated description file is different from the image displayed by the target description file in terms of content.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1-7.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method described in any one of claims 1-7.