Image processing method and device, computer equipment and storage medium

By receiving image display messages delivered by the native platform, extracting texture identifiers and creating display parts in the Flutter application, it solves the problem that image resources cannot be displayed across platforms when migrating native platforms to Flutter application, and achieves a more flexible and intelligent image display effect.

CN119690428APending Publication Date: 2025-03-25CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411667917.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

During the process of the native platform gradually migrating to Flutter applications, some image resources cannot be displayed directly across platforms, resulting in inconsistent image display and inefficient efficiency.

Method used

Receive image display messages delivered by the native platform through a preset platform based on the preset platform channel, extract texture identifiers, and call pre-created display parts, pass the texture identifiers to the target attributes in the display parts, create corresponding container parts, and add them to the preset target UI tree to achieve cross-platform image display.

Benefits of technology

It effectively solves the problem that image resources cannot be displayed directly across platforms in the gradual migration of native platforms to Flutter applications, and improves the flexibility and intelligence of image display of applications in cross-platform environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690428A_ABST
    Figure CN119690428A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of data processing, and relates to an image processing method, which is applied to the field of financial science and technology, and comprises the following steps: receiving an image display message transmitted by a native platform based on a preset platform channel; extracting a texture identifier from the image display message; calling a pre-created display component; transmitting the texture identifier to a target attribute in the display component to obtain a corresponding target display component; creating a corresponding container component based on the target display component; and adding the container part to a preset target UI tree to display a target image corresponding to the texture identifier. The invention further provides an image processing device, computer equipment and a storage medium. In addition, the invention also relates to a block chain technology, and the target image can be stored in a block chain. According to the method and the device, the technical problem that image resources cannot be directly displayed in a cross-platform manner in a process of gradually migrating a native platform to a Flutter application is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of data processing technology and financial technology, and in particular to image processing methods, devices, computer equipment and storage media. Background Art

[0002] In the financial sector, with the rapid development of mobile technology, major financial institutions are actively seeking ways to improve their mobile application experience and efficiency. Native platform applications, such as applications developed based on iOS and Android systems, have dominated the market for some time. These applications provide high performance and rich user experience by making full use of the hardware and software features of their respective platforms.

[0003] However, with the ever-changing market demands and increasing user expectations, native platform applications are also facing some challenges. In particular, native platform applications are unable to cope with cross-platform compatibility, development costs and maintenance efficiency. In order to meet these challenges, financial institutions have begun to explore new technical frameworks to build or upgrade their mobile applications.

[0004] Flutter, an open source UI framework developed by Google, has gradually emerged in the financial field with its efficient rendering engine, rich component library and powerful cross-platform capabilities. Flutter allows developers to use the Dart programming language to achieve a consistent UI experience on iOS and Android platforms through a set of codes. This capability greatly reduces development costs, improves maintenance efficiency, and enables financial institutions to respond to market changes more quickly.

[0005] However, in the process of gradually migrating existing native platforms to Flutter applications, financial institutions also encountered some technical difficulties. In particular, in terms of image display, due to the differences between native platforms and Flutter in image rendering mechanisms, texture processing, and platform channel communication, some image resources cannot be directly displayed across platforms. Summary of the invention

[0006] The purpose of the embodiments of the present application is to propose an image processing method, apparatus, computer device and storage medium to solve the technical problem that some image resources cannot be directly displayed across platforms during the process of gradually migrating from existing native platforms to Flutter applications.

[0007] In order to solve the above technical problems, the present application provides an image processing method, which adopts the following technical solution:

[0008] Receiving an image display message transmitted by a native platform based on a preset platform channel;

[0009] Extracting a texture identifier from the image display message;

[0010] Call the pre-created display component;

[0011] Transferring the texture identifier to the target attribute in the display component to obtain a corresponding target display component;

[0012] Creating a corresponding container component based on the target display component;

[0013] The container component is added to a preset target UI tree to display a target image corresponding to the texture identifier.

[0014] Furthermore, before the step of receiving the image display message transmitted by the native platform through the preset platform channel, the method further includes:

[0015] Get the preset initial platform channel;

[0016] Optimizing the initial platform channel based on a preset communication optimization strategy to obtain a corresponding first platform channel;

[0017] Optimizing the first platform channel based on a preset transmission optimization strategy to obtain a corresponding second platform channel;

[0018] The platform channel is generated based on the second platform channel.

[0019] Furthermore, before the step of calling the pre-created display component, the method further includes:

[0020] Call the preset target constructor;

[0021] Create an initial display widget based on the target constructor;

[0022] Performing attribute setting processing on the initial display component to obtain a processed initial display component;

[0023] The processed initial display component is used as the display component.

[0024] Furthermore, the step of performing attribute setting processing on the initial display component to obtain the processed initial display component specifically includes:

[0025] Get preset size attribute information;

[0026] Get the preset frozen attribute information;

[0027] The initial display component is subjected to attribute setting processing based on the size attribute information and the frozen attribute information to obtain a processed initial display component.

[0028] Furthermore, the step of extracting the texture identifier from the image display message specifically includes:

[0029] Finding a specified identification key from the image display message;

[0030] Acquire a specified value corresponding to the specified identification key from the image display message;

[0031] The specified value is used as the texture identifier.

[0032] Furthermore, after the step of adding the container component to a preset target UI tree to display a target image corresponding to the texture identifier, the method further includes:

[0033] Call the preset cache database;

[0034] generating a target timeout corresponding to the target image;

[0035] Based on the target timeout period, the target image is stored in the cache database.

[0036] Furthermore, the image processing method further includes:

[0037] Get the preset error handling strategy;

[0038] Determining an error handling logic corresponding to the error handling strategy;

[0039] Corresponding application optimization processing is performed based on the error handling logic.

[0040] In order to solve the above technical problems, the embodiment of the present application further provides an image processing device, which adopts the following technical solution:

[0041] A receiving module, used for receiving an image display message transmitted by a native platform based on a preset platform channel;

[0042] An extraction module, used for extracting a texture identifier from the image display message;

[0043] The first calling module is used to call the pre-created display component;

[0044] A transfer module, used for transferring the texture identifier to the target attribute in the display component to obtain a corresponding target display component;

[0045] A first creation module, used to create a corresponding container component based on the target display component;

[0046] The display module is used to add the container component to a preset target UI tree to display a target image corresponding to the texture identifier.

[0047] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0048] Receiving an image display message transmitted by a native platform based on a preset platform channel;

[0049] Extracting a texture identifier from the image display message;

[0050] Call the pre-created display component;

[0051] Transferring the texture identifier to the target attribute in the display component to obtain a corresponding target display component;

[0052] Creating a corresponding container component based on the target display component;

[0053] The container component is added to a preset target UI tree to display a target image corresponding to the texture identifier.

[0054] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0055] Receiving an image display message transmitted by a native platform based on a preset platform channel;

[0056] Extracting a texture identifier from the image display message;

[0057] Call the pre-created display component;

[0058] Transferring the texture identifier to the target attribute in the display component to obtain a corresponding target display component;

[0059] Creating a corresponding container component based on the target display component;

[0060] The container component is added to a preset target UI tree to display a target image corresponding to the texture identifier.

[0061] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0062] The present application first receives an image display message transmitted by a native platform based on a preset platform channel; then extracts a texture identifier from the image display message; then calls a pre-created display component; subsequently passes the texture identifier to the target attribute in the display component to obtain a corresponding target display component; further creates a corresponding container component based on the target display component; and finally adds the container component to a preset target UI tree to display a target image corresponding to the texture identifier. After receiving an image display message transmitted by a native platform based on the use of a platform channel, the present application first extracts a texture identifier from the image display message, then passes the texture identifier to the target attribute in the pre-created display component to obtain a target display component, and creates a corresponding container component based on the target display component, and then adds the container component to a preset target UI tree to display a target image corresponding to the texture identifier, so that images from other native platforms can be displayed in the application to realize cross-platform image display, effectively solving the technical problem that image resources cannot be directly displayed across platforms in the process of gradual migration from native platforms to Flutter applications, and improving the flexibility and intelligence of cross-platform image display in applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0064] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0065] Figure 2 A flowchart of an embodiment of an image processing method according to the present application;

[0066] Figure 3 is a structural schematic diagram of an embodiment of an image processing device according to the present application;

[0067] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0068] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0069] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0070] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0071] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0072] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0073] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to the laptop computer 1011, tablet computer 1012 or mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.

[0074] The server 103 may be a server that provides various services, such as a background server that provides support for a web page displayed on the terminal device 101 .

[0075] It should be noted that the image processing method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the image processing device is generally arranged in the server / terminal device.

[0076] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0077] Continue to refer Figure 2 , shows a flow chart of an embodiment of the image processing method according to the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The image processing method provided in the embodiment of the present application can be applied to any scenario that requires image processing, and the image processing method can be applied to products in these scenarios, for example, image processing in the financial insurance field. The image processing method comprises the following steps:

[0078] Step S201: receiving an image display message transmitted by a native platform based on a preset platform channel.

[0079] In this embodiment, the electronic device (eg, Figure 1The server / terminal device shown in the figure) can obtain the image display message through a wired connection or a wireless connection. It should be noted that the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or developed in the future. The execution subject of this application is specifically a Flutter application, or simply referred to as an application. Flutter is an open source UI framework for building cross-platform mobile applications. It is developed using the Dart programming language and relies on the Flutter SDK. Flutter provides a wealth of components and APIs, allowing developers to efficiently build applications with native performance and appearance. The above-mentioned native platform may include an Android platform or an iOS platform. The native platform is responsible for providing texture resources and passing these texture resources to the Flutter application through a platform channel. Native platforms generally have higher graphics processing capabilities and can provide more complex and efficient texture rendering. Texture resources are a resource used for program sampling, which can be images, video frames, or rendered 3D graphics, etc. In Flutter applications, texture resources are generally provided by the native platform and displayed through Texture components. Texture resources can be static, such as a loaded image, or dynamic, such as a camera preview or a video frame.

[0080] Specifically, if the native platform is an Android platform, a TextureView or SurfaceView will be created in advance on the Android platform and the image will be loaded. Then the texture ID (i.e., texture identifier) ​​is obtained through TextureView or SurfaceTexture. Then, the platform channel (Platform Channel) is used to pass the image display message containing the texture ID to the Flutter application. In addition, if the native platform is an iOS platform, a UIImageView is created in advance on the iOS platform and the image is loaded into the view. Then, using the CoreAnimation framework, the UIImageView is converted into a texture and the texture ID is obtained. Subsequently, the platform channel (Platform Channel) is used to pass the image display message containing the texture ID to the Flutter application. Among them, the construction process of the above-mentioned platform channel will be further described in detail in the subsequent specific embodiments of this application, and will not be elaborated on here.

[0081] Step S202: extracting a texture identifier from the image display message.

[0082] In this embodiment, the specific implementation process of extracting the texture identifier from the image display message will be further described in detail in subsequent specific embodiments of the present application, and will not be elaborated on here.

[0083] Step S203: calling the pre-created display component.

[0084] In this embodiment, the Texture component may specifically be a Texture component. The creation process of the display component will be described in further detail in subsequent specific embodiments, and will not be elaborated on here.

[0085] Step S204: transferring the texture identifier to the target attribute in the display component to obtain a corresponding target display component.

[0086] In this embodiment, the target attribute is the textureId attribute of the Texture component. The obtained texture identifier can be passed to the textureId attribute of the Texture component to obtain the corresponding target display component.

[0087] Step S205: creating a corresponding container component based on the target display component.

[0088] In this embodiment, the container component refers to a created container component that contains the target display component, for example, a container such as a body of a Column, a Row, a Stack or a Scaffold may be used.

[0089] Step S206: adding the container component to a preset target UI tree to display a target image corresponding to the texture identifier.

[0090] In this embodiment, a container component can be added to the UI tree of the Flutter application, and the container component is ensured to be returned in the construction method of the Flutter application, so as to realize the display of the external texture, that is, to display the target image corresponding to the texture identifier. In addition, when gradually migrating the existing native platform to the Flutter application, the existing cache strategy, CDN strategy and format optimization can continue to be used. The use of external textures allows you to display native image data in the Flutter application, gradually replace the native interface, and realize progressive migration.

[0091] The present application first receives an image display message transmitted by a native platform based on a preset platform channel; then extracts a texture identifier from the image display message; then calls a pre-created display component; subsequently passes the texture identifier to the target attribute in the display component to obtain a corresponding target display component; further creates a corresponding container component based on the target display component; and finally adds the container component to a preset target UI tree to display a target image corresponding to the texture identifier. After receiving an image display message transmitted by a native platform based on the use of a platform channel, the present application first extracts a texture identifier from the image display message, then passes the texture identifier to the target attribute in the pre-created display component to obtain a target display component, and creates a corresponding container component based on the target display component, and then adds the container component to a preset target UI tree to display a target image corresponding to the texture identifier, so that images from other native platforms can be displayed in the application to realize cross-platform image display, effectively solving the technical problem that image resources cannot be directly displayed across platforms in the process of gradual migration from native platforms to Flutter applications, and improving the flexibility and intelligence of cross-platform image display in applications.

[0092] In some optional implementations, before step S201, the electronic device may further perform the following steps:

[0093] Get the preset initial platform channel.

[0094] In this embodiment, the initial platform channel may be a method channel (Method Channel) or a basic message channel (Basic Message Channel) pre-defined between the Flutter application and the native platform, which is used to transmit the texture ID (texture identifier).

[0095] The initial platform channel is optimized based on a preset communication optimization strategy to obtain a corresponding first platform channel.

[0096] In this embodiment, the communication optimization strategy includes: optimizing serialization and deserialization of platform channel communications to reduce data transmission delays and overhead.

[0097] The first platform channel is optimized based on a preset transmission optimization strategy to obtain a corresponding second platform channel.

[0098] In this embodiment, the policy content of the above transmission optimization policy includes: using a more efficient data format and encoding method for data transmission, such as using binary data instead of JSON.

[0099] The platform channel is generated based on the second platform channel.

[0100] In this embodiment, the obtained second platform channel can be directly used as the above platform channel. In the case of frequent communication, persistent connection technologies such as WebSocket can be further used to reduce the overhead of connection establishment and disconnection.

[0101] The present application obtains a preset initial platform channel; then optimizes the initial platform channel based on a preset communication optimization strategy to obtain a corresponding first platform channel; then optimizes the first platform channel based on a preset transmission optimization strategy to obtain a corresponding second platform channel; and subsequently generates the platform channel based on the second platform channel. The present application obtains a preset initial platform channel and then optimizes the initial platform channel based on a preset communication optimization strategy and a transmission optimization strategy, thereby enabling rapid and accurate generation of corresponding platform channels, effectively improving the efficiency and stability of platform channel communication, and reducing data transmission delays and overhead.

[0102] In some optional implementations of this embodiment, before step S203, the electronic device may further perform the following steps:

[0103] Calls the preset target constructor.

[0104] In this embodiment, the target constructor is specifically a Texture constructor of a Flutter application.

[0105] Creates an initial display widget based on the target constructor.

[0106] In this embodiment, a new Texture component, namely the above-mentioned initial display component, can be created by using the Texture constructor. When creating, the received texture ID is passed to the textureId parameter.

[0107] Performing attribute setting processing on the initial display component to obtain a processed initial display component.

[0108] In this embodiment, the specific implementation process of performing the attribute setting process on the initial display component to obtain the processed initial display component will be further described in detail in subsequent specific embodiments of the present application, and will not be elaborated on here.

[0109] The processed initial display component is used as the display component.

[0110] The present application creates an initial display component based on the preset target constructor, and then performs attribute setting processing on the initial display component to obtain the processed initial display component; and then uses the processed initial display component as the display component. The present application creates an initial display component based on the use of the target constructor, and then performs attribute setting processing on the initial display component, so that the construction of the display component can be completed efficiently and accurately, which improves the construction efficiency and construction intelligence of the display component, and is conducive to the subsequent use of the display component to realize the display processing of the target image corresponding to the texture identifier.

[0111] In some optional implementations, performing attribute setting processing on the initial display component to obtain the processed initial display component includes the following steps:

[0112] Gets the preset size attribute information.

[0113] In this embodiment, the size attribute information may include width attribute information and height attribute information. The width attribute information and the height attribute information are used to specify the size of the texture. The values ​​of the width attribute information and the height attribute information can be set according to actual business needs. Alternatively, if not set, the Texture component will try to determine the size based on the layout constraints of its parent container.

[0114] Gets the preset frozen attribute information.

[0115] In this embodiment, the freeze attribute information includes freeze attribute information. The value of the freeze attribute information can be set according to actual business needs. When the freeze attribute information is set to true, the Texture component will stop monitoring texture updates. This is usually used to reduce resource consumption when the texture is no longer needed.

[0116] The initial display component is subjected to attribute setting processing based on the size attribute information and the frozen attribute information to obtain a processed initial display component.

[0117] In this embodiment, the size attribute information may be used to set the size attribute of the initial display component, and the frozen attribute information may be used to set the frozen attribute of the initial display component, so as to obtain the processed initial display component.

[0118] The present application obtains preset size attribute information; and obtains preset frozen attribute information; and then performs attribute setting processing on the initial display component based on the size attribute information and the frozen attribute information to obtain the processed initial display component. The present application performs attribute setting processing on the initial display component based on the obtained size attribute information and the frozen attribute information, so as to achieve fast and accurate attribute setting processing for the initial display component, and ensure the accuracy and standardization of the processed initial display component.

[0119] In some optional implementations, step S202 includes the following steps:

[0120] A designated identification key is found from the image display message.

[0121] In this embodiment, the image display message is a message including a texture ID (texture identifier), and the message body of the image display message includes a key "textureId", the corresponding value of which is the texture ID.

[0122] A specified value corresponding to the specified identification key is obtained from the image display message.

[0123] In this embodiment, the designated identification key, ie, the value corresponding to textureId, may be extracted from the message body of the image display message to obtain the designated value, ie, the texture identification.

[0124] The specified value is used as the texture identifier.

[0125] The present application searches out a designated identification key from the image display message, and then obtains a designated value corresponding to the designated identification key from the image display message; and subsequently uses the designated value as the texture identification. The present application searches out a designated identification key from the image display message, and then obtains a designated value corresponding to the designated identification key from the image display message as the final texture identification, so as to realize fast and accurate extraction of the required texture identification from the image display message, thereby improving the extraction efficiency and accuracy of the texture identification.

[0126] In some optional implementations of this embodiment, after step S206, the electronic device may further perform the following steps:

[0127] Call the preset cache database.

[0128] In this embodiment, the cache database may specifically adopt redis cache.

[0129] A target timeout period corresponding to the target image is generated.

[0130] In this embodiment, there is no specific limitation on the selection of the above target timeout period, which can be set according to actual business needs, for example, it can be set to 30 minutes.

[0131] Based on the target timeout period, the target image is stored in the cache database.

[0132] In this embodiment, after the target image is stored in the cache database, the target image will be intelligently monitored, and when it is detected that the storage time of the target image in the cache database exceeds the above-mentioned target timeout time, the target image will be automatically deleted from the cache database to free up memory consumption of the cache database.

[0133] This application calls a preset cache database; then generates a target timeout corresponding to the target image; and subsequently stores the target image in the cache database based on the target timeout. After adding a container component to a preset target UI tree to display a target image corresponding to a texture identifier, this application will also automatically generate a target timeout corresponding to the target image, and store the target image based on the target timeout and the use of a cache database, so that when the corresponding texture needs to be displayed later, the required data can be directly obtained from the cache database, without the need for reloading, effectively reducing the number and overhead of external texture loading, thereby improving the efficiency and speed of texture display.

[0134] In some optional implementations of this embodiment, the electronic device may further perform the following steps:

[0135] Get the preset error handling strategy.

[0136] In this embodiment, the above error handling strategy may at least include an error detection strategy, a retry mechanism, and a fallback strategy.

[0137] An error handling logic corresponding to the error handling strategy is determined.

[0138] In this embodiment, the error handling logic corresponding to the above-mentioned error handling strategy includes the processing logic of the error detection strategy, the retry mechanism and the fallback strategy. Specifically, the processing logic of the above-mentioned error detection strategy includes: adding an error detection mechanism when establishing communication between the native platform and the Flutter application. For example, when the texture ID is sent through the platform channel, a confirmation message can be added to ensure that the Flutter application has correctly received the texture ID. The processing logic of the above-mentioned retry mechanism includes: o If a texture loading failure or communication interruption is detected, a retry mechanism can be implemented. For example, if the texture ID is not sent correctly, it can be resent and an upper limit on the number of retries can be set. The processing logic of the above-mentioned fallback strategy includes: if the retry fails, a fallback strategy can be implemented, such as displaying a placeholder image or an error message. Thereby ensuring that the user experience is not completely interrupted due to an image loading failure.

[0139] Corresponding application optimization processing is performed based on the error handling logic.

[0140] In this embodiment, the above error handling logic can be added to the Flutter application to deal with situations such as texture loading failure, communication interruption, or improper resource release when using external textures.

[0141] The present application obtains a preset error handling strategy; then determines the error handling logic corresponding to the error handling strategy; and subsequently performs corresponding application optimization processing based on the error handling logic. The present application determines the error handling logic corresponding to the preset error handling strategy, and then performs corresponding application optimization processing based on the error handling logic, so that error handling of texture loading errors that occur when using external textures can be automatically and intelligently performed, which is conducive to ensuring normal display processing of external textures.

[0142] In some optional implementations, the user information obtained is subject to the user's consent and complies with relevant laws and policies.

[0143] In addition, the non-Company software tools or components that appear in the embodiments of the present application are merely examples and do not represent actual use.

[0144] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0145] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned target image, the above-mentioned target image can also be stored in a node of a blockchain.

[0146] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0147] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0148] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0149] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0150] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0151] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of an image processing device, and the device embodiment is Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0152] like Figure 3 As shown, the image processing device 300 described in this embodiment includes: a receiving module 301, an extracting module 302, a first calling module 303, a transmitting module 304, a first creating module 305 and a display module 306. Among them:

[0153] The receiving module 301 is used to receive an image display message transmitted by a native platform based on a preset platform channel;

[0154] An extraction module 302, used to extract a texture identifier from the image display message;

[0155] A first calling module 303 is used to call a pre-created display component;

[0156] A transfer module 304, used to transfer the texture identifier to the target attribute in the display component to obtain a corresponding target display component;

[0157] A first creation module 305, used to create a corresponding container component based on the target display component;

[0158] The display module 306 is used to add the container component to a preset target UI tree to display a target image corresponding to the texture identifier.

[0159] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the image processing method in the aforementioned implementation mode, and are not described in detail here.

[0160] In some optional implementations of this embodiment, the image processing apparatus further includes:

[0161] A first acquisition module, used to acquire a preset initial platform channel;

[0162] A first optimization module, configured to optimize the initial platform channel based on a preset communication optimization strategy to obtain a corresponding first platform channel;

[0163] A second optimization module, configured to optimize the first platform channel based on a preset transmission optimization strategy to obtain a corresponding second platform channel;

[0164] A first generating module is used to generate the platform channel based on the second platform channel.

[0165] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the image processing method in the aforementioned implementation mode, and are not described in detail here.

[0166] In some optional implementations of this embodiment, the image processing device further includes:

[0167] The second calling module is used to call a preset target constructor;

[0168] A second building module, used to create an initial display component based on the target constructor;

[0169] A setting module, used for performing attribute setting processing on the initial display component to obtain the processed initial display component;

[0170] The first determining module is used to use the processed initial display component as the display component.

[0171] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the image processing method in the aforementioned implementation mode, and are not described in detail here.

[0172] In some optional implementations of this embodiment, the setting module includes:

[0173] The first acquisition submodule is used to acquire preset size attribute information;

[0174] The second acquisition submodule is used to acquire preset freezing attribute information;

[0175] The setting submodule is used to perform attribute setting processing on the initial display component based on the size attribute information and the frozen attribute information to obtain the processed initial display component.

[0176] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the image processing method in the aforementioned implementation mode, and are not described in detail here.

[0177] In some optional implementations of this embodiment, the extraction module 302 includes:

[0178] A search submodule, used for searching for a specified identification key from the image display message;

[0179] A third acquisition submodule, used to acquire a specified value corresponding to the specified identification key from the image display message;

[0180] The determination submodule is used to use the specified value as the texture identifier.

[0181] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the image processing method in the aforementioned implementation mode, and are not described in detail here.

[0182] In some optional implementations of this embodiment, the image processing apparatus further includes:

[0183] The third calling module is used to call the preset cache database;

[0184] A second generating module, used for generating a target timeout period corresponding to the target image;

[0185] A storage module is used to store the target image in the cache database based on the target timeout period.

[0186] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the image processing method in the aforementioned implementation mode, and are not described in detail here.

[0187] In some optional implementations of this embodiment, the image processing apparatus further includes:

[0188] The second acquisition module is used to acquire a preset error handling strategy;

[0189] A second determination module, used to determine the error handling logic corresponding to the error handling strategy;

[0190] A processing module is used to perform corresponding application optimization processing based on the error processing logic.

[0191] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the image processing method in the aforementioned implementation mode, and are not described in detail here.

[0192] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0193] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0194] The computer device may be a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with the user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0195] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the image processing method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0196] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the image processing method.

[0197] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0198] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0199] In an embodiment of the present application, firstly, an image display message transmitted by a native platform is received based on a preset platform channel; then a texture identifier is extracted from the image display message; then a pre-created display component is called; subsequently, the texture identifier is passed to the target attribute in the display component to obtain a corresponding target display component; further, a corresponding container component is created based on the target display component; finally, the container component is added to a preset target UI tree to display a target image corresponding to the texture identifier. After receiving an image display message transmitted by a native platform based on the use of a platform channel, the present application will first extract a texture identifier from the image display message, then pass the texture identifier to the target attribute in the pre-created display component to obtain a target display component, and create a corresponding container component based on the target display component, and then add the container component to the preset target UI tree to display a target image corresponding to the texture identifier, so that images from other native platforms can be displayed in the application to realize cross-platform image display, effectively solving the technical problem that image resources cannot be directly displayed across platforms in the process of gradual migration of native platforms to Flutter applications, and improving the flexibility and intelligence of cross-platform image display in applications.

[0200] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the image processing method as described above.

[0201] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0202] In an embodiment of the present application, firstly, an image display message transmitted by a native platform is received based on a preset platform channel; then a texture identifier is extracted from the image display message; then a pre-created display component is called; subsequently, the texture identifier is passed to the target attribute in the display component to obtain a corresponding target display component; further, a corresponding container component is created based on the target display component; finally, the container component is added to a preset target UI tree to display a target image corresponding to the texture identifier. After receiving an image display message transmitted by a native platform based on the use of a platform channel, the present application will first extract a texture identifier from the image display message, then pass the texture identifier to the target attribute in the pre-created display component to obtain a target display component, and create a corresponding container component based on the target display component, and then add the container component to the preset target UI tree to display a target image corresponding to the texture identifier, so that images from other native platforms can be displayed in the application to realize cross-platform image display, effectively solving the technical problem that image resources cannot be directly displayed across platforms in the process of gradual migration of native platforms to Flutter applications, and improving the flexibility and intelligence of cross-platform image display in applications.

[0203] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0204] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. An image processing method, characterized in that: The steps include: Receiving an image display message transmitted by a native platform based on a preset platform channel; Extracting a texture identifier from the image display message; Call the pre-created display component; Transferring the texture identifier to the target attribute in the display component to obtain a corresponding target display component; Creating a corresponding container component based on the target display component; The container component is added to a preset target UI tree to display a target image corresponding to the texture identifier.

2. The image processing method according to claim 1, characterized in that: Before the step of receiving the image display message transmitted by the native platform through the preset platform channel, the method further includes: Get the preset initial platform channel; Optimizing the initial platform channel based on a preset communication optimization strategy to obtain a corresponding first platform channel; Optimizing the first platform channel based on a preset transmission optimization strategy to obtain a corresponding second platform channel; The platform channel is generated based on the second platform channel.

3. The image processing method according to claim 1, characterized in that: Before the step of calling the pre-created display component, the method further includes: Call the preset target constructor; Create an initial display widget based on the target constructor; Performing attribute setting processing on the initial display component to obtain a processed initial display component; The processed initial display component is used as the display component.

4. The image processing method according to claim 3, characterized in that: The step of performing attribute setting processing on the initial display component to obtain the processed initial display component specifically includes: Get preset size attribute information; Get the preset frozen attribute information; The initial display component is subjected to attribute setting processing based on the size attribute information and the frozen attribute information to obtain a processed initial display component.

5. The image processing method according to claim 1, characterized in that: The step of extracting the texture identifier from the image display message specifically includes: Finding a specified identification key from the image display message; Acquire a specified value corresponding to the specified identification key from the image display message; The specified value is used as the texture identifier.

6. The image processing method according to claim 1, characterized in that: After the step of adding the container component to a preset target UI tree to display a target image corresponding to the texture identifier, the method further includes: Call the preset cache database; generating a target timeout corresponding to the target image; Based on the target timeout period, the target image is stored in the cache database.

7. The image processing method according to claim 1, characterized in that: The image processing method further includes: Get the preset error handling strategy; Determining an error handling logic corresponding to the error handling strategy; Corresponding application optimization processing is performed based on the error handling logic.

8. An image processing device, characterized in that: include: A receiving module, used for receiving an image display message transmitted by a native platform based on a preset platform channel; An extraction module, used for extracting a texture identifier from the image display message; The first calling module is used to call the pre-created display component; A transfer module, used for transferring the texture identifier to the target attribute in the display component to obtain a corresponding target display component; A first creation module, used to create a corresponding container component based on the target display component; The display module is used to add the container component to a preset target UI tree to display a target image corresponding to the texture identifier.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the image processing method according to any one of claims 1 to 7 when executing the computer-readable instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the image processing method according to any one of claims 1 to 7 are implemented.